blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
250
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
58
| license_type
stringclasses 2
values | repo_name
stringlengths 5
107
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 185
values | visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 15.7k
664M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 17
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 68
values | src_encoding
stringclasses 27
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 6
9.36M
| extension
stringclasses 31
values | content
stringlengths 4
9.36M
| authors
listlengths 1
1
| author
stringlengths 0
73
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
117095833f2179246e2436f71aa261242eb1acce
|
ede68a5b37b9995c1a43c5d35c308be0ef2b0676
|
/zst/chapter4/zst408c.c
|
a1f85cd790ff178c37659dc91b5372551e3a00b2
|
[] |
no_license
|
zstdgithub/zst2355
|
5bc454324b825f0b1d0d3cbe28ac882dfd20d09d
|
591350c3d3adc09bad564839c9d2aba70717ef81
|
refs/heads/master
| 2020-06-19T23:52:19.229269 | 2019-07-25T06:37:57 | 2019-07-25T06:37:57 | 196,918,221 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 258 |
c
|
/*
输入一个整数,连续显示出该整数个 *
*/
#include <stdio.h>
int main(void)
{
int no;
printf("请输入一个正数:");
scanf("%d", &no);
while (no-- > 0)
putchar('*');
putchar('\n');
return 0;
}
}
|
[
"[email protected]"
] | |
1a749bbcf116b684cc09900040144b3d8954b483
|
05e81653c49b0dcef323396f23c90ffacfaa0f5f
|
/deps/shttpd/src/compat_unix.c
|
e8fe9294d3a0401b7aa56f64c0df76eb97d729a1
|
[
"Beerware"
] |
permissive
|
gritzko/k7
|
5d8556427936a06022cc6ebedc19ab78f1e7a0a3
|
d82323836dccb384543f9690ad69202fa2ce1b52
|
refs/heads/master
| 2021-01-18T13:45:07.134377 | 2009-05-16T12:26:09 | 2009-05-16T12:26:09 | 193,822 | 2 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 2,420 |
c
|
/*
* Copyright (c) 2004-2005 Sergey Lyubka <[email protected]>
* All rights reserved
*
* "THE BEER-WARE LICENSE" (Revision 42):
* Sergey Lyubka wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return.
*/
#include "defs.h"
void
_shttpd_set_close_on_exec(int fd)
{
(void) fcntl(fd, F_SETFD, FD_CLOEXEC);
}
int
_shttpd_stat(const char *path, struct stat *stp)
{
return (stat(path, stp));
}
int
_shttpd_open(const char *path, int flags, int mode)
{
return (open(path, flags, mode));
}
int
_shttpd_remove(const char *path)
{
return (remove(path));
}
int
_shttpd_rename(const char *path1, const char *path2)
{
return (rename(path1, path2));
}
int
_shttpd_mkdir(const char *path, int mode)
{
return (mkdir(path, mode));
}
char *
_shttpd_getcwd(char *buffer, int maxlen)
{
return (getcwd(buffer, maxlen));
}
int
_shttpd_set_non_blocking_mode(int fd)
{
int ret = -1;
int flags;
if ((flags = fcntl(fd, F_GETFL, 0)) == -1) {
DBG(("nonblock: fcntl(F_GETFL): %d", ERRNO));
} else if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) != 0) {
DBG(("nonblock: fcntl(F_SETFL): %d", ERRNO));
} else {
ret = 0; /* Success */
}
return (ret);
}
#ifndef NO_CGI
int
_shttpd_spawn_process(struct conn *c, const char *prog, char *envblk,
char *envp[], int sock, const char *dir)
{
int ret;
pid_t pid;
const char *p, *interp = c->ctx->options[OPT_CGI_INTERPRETER];
envblk = NULL; /* unused */
if ((pid = vfork()) == -1) {
ret = -1;
_shttpd_elog(E_LOG, c, "redirect: fork: %s", strerror(errno));
} else if (pid == 0) {
/* Child */
(void) chdir(dir);
(void) dup2(sock, 0);
(void) dup2(sock, 1);
(void) closesocket(sock);
/* If error file is specified, send errors there */
if (c->ctx->error_log)
(void) dup2(fileno(c->ctx->error_log), 2);
if ((p = strrchr(prog, '/')) != NULL)
p++;
else
p = prog;
/* Execute CGI program */
if (interp == NULL) {
(void) execle(p, p, NULL, envp);
_shttpd_elog(E_FATAL, c, "redirect: exec(%s)", prog);
} else {
(void) execle(interp, interp, p, NULL, envp);
_shttpd_elog(E_FATAL, c, "redirect: exec(%s %s)",
interp, prog);
}
/* UNREACHED */
exit(EXIT_FAILURE);
} else {
/* Parent */
ret = 0;
(void) closesocket(sock);
}
return (ret);
}
#endif /* !NO_CGI */
|
[
"[email protected]"
] | |
45d5f08aa3c1e0aeaa84f80f98ca17469e0d6085
|
31c29fc7eb829f4893985e316c3e4ab9d9f2360b
|
/RandomPasswordGenerator.c
|
c17778c9130b3723fb6bb79db6533b467082db14
|
[] |
no_license
|
imsushant12/Random-Password-Generator
|
610a1e251c6d0e20c72664a4f179ea3d375f2ce5
|
52117b5f5543dd0d383121da2c8f056130e34e7a
|
refs/heads/main
| 2023-02-07T17:01:18.794864 | 2020-12-31T09:36:55 | 2020-12-31T09:36:55 | 325,764,863 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,943 |
c
|
//by Sushant Gaurav
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
int main()
{
int i = 0; //for executing the loops
int length = 0; //to input the size of password
int randomizer = 0;
//Seed the random-number generator with current time so that
//the numbers will be different every time we run.
srand((unsigned int)(time(NULL)));
char numbers [] = "0123456789"; //array of numbers
char letter [] = "abcdefghijklmnoqprstuvwyzx"; //array of small alphabets
char LETTER [] = "ABCDEFGHIJKLMNOQPRSTUYWVZX"; //array of capital alphabets
char symbols [] = "!@#$^&*?"; //array of all the special symbols
do
{
printf("\nEnter Password Length or press -1 to exit : ");
scanf("%d", &length);
char password[length]; //declaration of array to store the random password
randomizer = rand() % 4; //to select the randomizer inside the loop
for (i=0 ; i < length ; i++)
{
if(randomizer == 1)
{
password[i] = numbers[rand() % 10];
randomizer = rand() % 4;
printf("%c", password[i]);
}
else if (randomizer == 2)
{
password[i] = symbols[rand() % 8];
randomizer = rand() % 4;
printf("%c", password[i]);
}
else if (randomizer == 3)
{
password[i] = LETTER[rand() % 26];
randomizer = rand() % 4;
printf("%c", password[i]);
}
else
{
password[i] = letter[rand() % 26];
randomizer = rand() % 4;
printf("%c", password[i]);
}
}
}while(length != -1);
return 0;
}
|
[
"[email protected]"
] | |
63d29906089718417cf6e39c334c793b7fa39720
|
e3601afda3edaf5a1506229a6500caa952b7e06c
|
/Day 7 nested for practice/demo3.c
|
0a951310c54c7b91f7fe5ff8f41b75e49d1d3950
|
[] |
no_license
|
Santhoshkumaradoss/c-programming
|
f2e3b57d6393f9f4c75175f79c541f22021eb24e
|
e1d290e8ec513e94608673ce952516f5fa3b4dbb
|
refs/heads/main
| 2023-07-16T16:36:08.053991 | 2021-08-23T07:59:01 | 2021-08-23T07:59:01 | 388,423,484 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 192 |
c
|
#include<stdio.h>
void main()
{
int i,j;
for(i=5;i>0;i--)
{
for(j=1;j<=5;j++)
{
printf("%d",i);
}
printf("\n");
}
}
|
[
"[email protected]"
] | |
907cafd63c4fffac74574ccfe1f606855ca6080a
|
7b52d7a69260990308d692b5ab118eeca923bb74
|
/Digit Spelling.c
|
b0e8245852496caeb78dd3f4325e3ba0879f5c14
|
[] |
no_license
|
mehedi150/C-Programs
|
1c2e64d10e19be87c113841dcd76aaac9d741002
|
0b44316387fd0676978a56b892e7f2724dda9b02
|
refs/heads/main
| 2023-02-28T17:58:33.663982 | 2021-02-09T15:07:07 | 2021-02-09T15:07:07 | 307,125,862 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 741 |
c
|
//Switch keyword introduction with case,break and default
#include<stdio.h>
int
main ()
{
int digit;
printf ("Enter the digit: ");
scanf ("%d", &digit);
switch (digit)
{
case 0:
printf ("Zero\n");
break;
case 1:
printf ("One\n");
break;
case 2:
printf ("Two\n");
break;
case 3:
printf ("Three\n");
break;
case 4:
printf ("Four\n");
break;
case 5:
printf ("Five\n");
break;
case 6:
printf ("Six\n");
break;
case 7:
printf ("Seven\n");
break;
case 8:
printf ("Eight\n");
break;
case 9:
printf ("Nine\n");
default:
printf ("Not a valid digit");
}
return 0;
}
|
[
"[email protected]"
] | |
a7c3bff2c8d4dc93aa61122c5d39835185d51189
|
2d49e2d71aad0a4ff7feeaf382473c0fba9ae257
|
/project/Util/util.h
|
edc39ea87d981d614fcfde8568a7a2d0a253d114
|
[] |
no_license
|
IOrez/SystemProgramming_project
|
d5afd7421a87a6d6b65f8d8e91c7aea560efaded
|
b82e304bb1227d35176e235138664b6262a80bd3
|
refs/heads/main
| 2023-02-03T01:19:23.611779 | 2020-12-16T12:12:53 | 2020-12-16T12:12:53 | 314,717,526 | 0 | 1 | null | null | null | null |
UTF-8
|
C
| false | false | 73 |
h
|
void printTextBlock(TextBlock* Tb);
void eraseTextBlock(TextBlock* Tb);
|
[
"[email protected]"
] | |
afd39e9e9905d1b24cd424018c99bae7aca4eb0f
|
4a1b388fc7254e7f8fa2b72df9d61999bf7df341
|
/ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory.h
|
d54e9dccff4dcd37ddedbfc7f3533f8770ca47b1
|
[
"Apache-2.0"
] |
permissive
|
rapyuta-robotics/rclUE
|
a2055cf772d7ca4d7c36e991ee9c8920e0475fd2
|
7613773cd4c1226957603d705d68a2d2b4a69166
|
refs/heads/devel
| 2023-08-19T04:06:31.306109 | 2023-07-24T15:23:29 | 2023-07-24T15:23:29 | 334,819,367 | 75 | 17 |
Apache-2.0
| 2023-09-06T02:34:56 | 2021-02-01T03:29:17 |
C++
|
UTF-8
|
C
| false | false | 528 |
h
|
// generated from rosidl_generator_c/resource/idl.h.em
// with input from trajectory_msgs:msg/JointTrajectory.idl
// generated code does not contain a copyright notice
#ifndef TRAJECTORY_MSGS__MSG__JOINT_TRAJECTORY_H_
#define TRAJECTORY_MSGS__MSG__JOINT_TRAJECTORY_H_
#include "trajectory_msgs/msg/detail/joint_trajectory__struct.h"
#include "trajectory_msgs/msg/detail/joint_trajectory__functions.h"
#include "trajectory_msgs/msg/detail/joint_trajectory__type_support.h"
#endif // TRAJECTORY_MSGS__MSG__JOINT_TRAJECTORY_H_
|
[
"[email protected]"
] | |
7b8a68a3766b6eab6906a3271a73cca8b9b248bb
|
f3572f47a4d1da7746959bbe9bc8884825d3312b
|
/q7.c
|
0dff08a0781c0dd1fad75d8996f9cfd1c4596c53
|
[] |
no_license
|
vinayakbanga/Assignment4
|
173a0dcb0ae1cb7c90f022752e0813c7ce450c45
|
e0dcb64bab3e07a620da3d4e3256f33474d97838
|
refs/heads/main
| 2023-02-03T06:16:16.913792 | 2020-12-15T11:54:33 | 2020-12-15T11:54:33 | 321,651,512 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 402 |
c
|
//Write a C program to find sum of digits of a given number using recursion.
#include<stdio.h>
#include<math.h>
int Sum( int num);
int main(){
int num,sum;
printf("Enter the Number : ");
scanf("%d",&num);
sum=Sum(num);
printf("The sum of digits of %d is %d",num,sum);
return 0;
}
int Sum(int num){
if(num==0)
return 0;
return num%10+Sum(num/10);
}
|
[
"[email protected]"
] | |
d822a7d6be0a3748499ca0b8f3441c6078c8b990
|
0d681da76c3a0eeaaa4b80b92359ce206e4c4e69
|
/crawler/headers/sockets.h
|
c121f6cde9189a96ed66154b40996b0dead23e4e
|
[] |
no_license
|
IMSike/FormationVal
|
db1593e69b9e74488a0305fb97e8be2baab0b6ba
|
97f9b98c47af6d5593bb0097a98b1ee62ae81bf9
|
refs/heads/master
| 2020-05-01T18:20:31.402508 | 2019-05-14T11:28:48 | 2019-05-14T11:28:48 | 177,622,493 | 0 | 1 | null | null | null | null |
UTF-8
|
C
| false | false | 491 |
h
|
#if defined (WIN32)
#include <winsock2.h>
typedef int socklen_t;
#elif defined (linux)
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define closesocket(s) close(s)
typedef int SOCKET;
typedef struct sockaddr_in SOCKADDR_IN;
typedef struct sockaddr SOCKADDR;
#endif
#include <stdio.h>
#include <stdlib.h>
#define PORT 23
|
[
"[email protected]"
] | |
484d3d3b58543fe595d99b0a4ec2c295ccfe1c44
|
c5ee390344aa72c730ca27eff709edc046081061
|
/nitan4/d/foshan/npc/bee.c
|
bb7d773303fbbead1baa95f5f37d6b77c7d8086c
|
[] |
no_license
|
DoubleIce/Mud_NitanVersions
|
fb58143f4840c7a887b756215229ed4e0a5e62d9
|
2ab430649b29a611008b7cc765b4500b2702841a
|
refs/heads/master
| 2021-05-14T10:05:48.157950 | 2018-01-23T01:40:38 | 2018-01-23T01:40:38 | 116,339,674 | 0 | 0 | null | null | null | null |
GB18030
|
C
| false | false | 719 |
c
|
//bee.c
inherit NPC;
void create()
{
set_name("蜜蜂", ({"bee"}) );
set("race", "昆虫");
set("subrace", "飞虫");
set("age", 8);
set("long", "这是一只蜜蜂,正忙着采蜜。\n");
set("str", 40);
set("dex", 50);
set("limbs", ({ "头部", "身体", "翅膀", "尾刺" }) );
set("verbs", ({ "bite", "poke" }) );
set_temp("apply/attack", 33);
set_temp("apply/armor", 20);
set("chat_chance", 2);
set("chat_msg", ({
(: this_object(), "random_move" :),
"蜜蜂嗡嗡嗡飞过来,在你头上转了一圈,有飞走了。\n",
}) );
setup();
}
|
[
"[email protected]"
] | |
184c72931c337b63ca6ea8272d434cd4bd398aaa
|
39f31830ac27423cae1cd90c9665acbe03b003ef
|
/src/queue.c
|
b8ca3c69f22da80213ed61d3e688f5d4c135c7a7
|
[] |
no_license
|
alexskp/lem-in
|
96aa9eab94232b5b1426ee3602d80caf407da53c
|
5e2ba1b0caed6765b51f6d875595ee5944979810
|
refs/heads/master
| 2021-01-02T22:53:34.716497 | 2017-10-04T01:23:18 | 2017-10-04T01:23:18 | 99,414,453 | 0 | 0 | null | 2017-09-20T20:32:33 | 2017-08-05T09:56:54 |
C
|
UTF-8
|
C
| false | false | 668 |
c
|
#include "lem-in.h"
elem *get_last_elem(elem *head)
{
if (head == NULL)
return head;
while (head->next)
head = head->next;
return head;
}
void push(elem **head, room* content)
{
elem *last = get_last_elem(*head);
elem *new = (elem *)malloc(sizeof(elem));
new->content = content;
new->next = NULL;
if (last)
last->next = new;
else
(*head) = new;
}
room *pop(elem **head)
{
if (head == NULL)
error("Error! Can't pop element from empty queue!");
elem *pop_elem = (*head);
room *content = pop_elem->content;
(*head) = pop_elem->next;
free(pop_elem);
return content;
}
|
[
"[email protected]"
] | |
fb73896c6052211203af9ccb0f08fb530166ea24
|
bb3e5c0d4a67fb11f3c50bda6fc9f9462577c8d1
|
/head/mergestruct.h
|
acea730830948b2d0f5c7062031c06527295509c
|
[] |
no_license
|
aaditya889/Exploit-tools-in-C
|
45b816c94e7df5c42afa9d87b7ba51e9e1789cf5
|
5415361120988170d22d7a2bd0af7889f2f86e4e
|
refs/heads/master
| 2021-09-09T10:36:16.628887 | 2018-03-15T08:29:54 | 2018-03-15T08:29:54 | 119,353,999 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 967 |
h
|
/*It sorts a struct named node with two integers - 'a' and 'b' ( struct node {int a,b;}; ) . Call merge2(structure,start position,end position,flag);
note - end position is n-1 and flag is 1 to sort by 'a' and 2 to sort by 'b'!*/
struct node{
int a,b;};
void merge(struct node *arr,int s,int mid,int e,int fl);
void merge2(struct node *arr,int s,int e,int fl){
if(s==e)
return;
int mid=(s+e)/2;
merge2(arr,s,mid,fl);
merge2(arr,mid+1,e,fl);
merge(arr,s,mid,e,fl);
}
void merge(struct node *arr,int s,int mid,int e,int fl){
struct node ar[e-s+1];
int ptr=0;
int ss=s,ee=mid+1;
if(fl==1)
while(ss<=mid && ee<=e){
if(arr[ss].a<=arr[ee].a)
ar[ptr++]=arr[ss++];
else ar[ptr++]=arr[ee++];
}
else
while(ss<=mid && ee<=e){
if(arr[ss].b<=arr[ee].b)
ar[ptr++]=arr[ss++];
else ar[ptr++]=arr[ee++];
}
if(ss==mid+1){
while(ee<=e)
ar[ptr++]=arr[ee++];}
else{
while(ss<=mid)
ar[ptr++]=arr[ss++];}
for(int i=s;i<=e;i++)
arr[i]=ar[i-s];
} //end merge!
|
[
"[email protected]"
] | |
a00bd43c0a48409ce84043a8b958a88ef510a6d6
|
bd83c9fa885824e5b08810c76c03d3cbeb00bdf1
|
/images/fBWDownRight.h
|
6a8f8127cb631820f8888a02f57ac42a8830208c
|
[] |
no_license
|
jpleo122/HalftimeHunt
|
1202f697890d69f2d09aa3a2c2790b93ab2b0e27
|
e0e9102db7acec0f3ffe43d13da21cfa60e2cc6e
|
refs/heads/master
| 2020-04-08T17:09:52.186309 | 2018-11-28T19:52:03 | 2018-11-28T19:52:03 | 159,554,107 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 584 |
h
|
/*
* Exported with nin10kit v1.7
* Invocation command was nin10kit --mode=3 --resize=16x16 fBWDownRight fBWDownRight.png
* Time-stamp: Wednesday 11/21/2018, 04:06:49
*
* Image Information
* -----------------
* fBWDownRight.png 16@16
*
* All bug reports / feature requests are to be filed here https://github.com/TricksterGuy/nin10kit/issues
*/
#ifndef FBWDOWNRIGHT_H
#define FBWDOWNRIGHT_H
extern const unsigned short fBWDownRight[256];
#define FBWDOWNRIGHT_SIZE 512
#define FBWDOWNRIGHT_LENGTH 256
#define FBWDOWNRIGHT_WIDTH 16
#define FBWDOWNRIGHT_HEIGHT 16
#endif
|
[
"[email protected]"
] | |
e7da3f873aa157ed2fefc45122b5aeeba58e994f
|
5205b29c30019c9f2ada8bd172ce20efb284f8bd
|
/1st_grade/project/project1.c
|
19b7a6961b8e0d549ae109ff09d0ba4e0ef7ac48
|
[] |
no_license
|
hyunmin0317/C_Programming
|
f1cd043e516756ef34a207acf1d9d8ebb60a955b
|
efe7404a251ec22c843bcc1f679486c4cebf005f
|
refs/heads/master
| 2023-04-02T03:50:51.425366 | 2021-04-05T06:59:58 | 2021-04-05T06:59:58 | 332,246,179 | 1 | 0 | null | null | null | null |
UHC
|
C
| false | false | 1,659 |
c
|
#include <stdio.h>
#include <string.h>
typedef struct
{
char num[10];
char name[20];
int mid;
int final;
int practice;
int homework;
} Score;
void Swap(char* p, char* q)
{
char* tmp;
tmp = *p;
*p = *q;
*q = tmp;
}
void Upnum(Score* arr) {
for (int i = 0; i < 10; i++) {
for (int j = i + 1; j < 10; j++) {
if (strcmp(arr->num[j] > arr->num[j + 1]))
{
char tmp;
tmp = arr->num[j];
arr->num[j] = arr->num[j + 1];
arr->num[j + 1] = tmp;
}
}
}
for (int i = 0; i < 10; i++)
printf("%s %s %d %d %d %d\n", arr[i].num, arr[i].name, arr[i].mid,
arr[i].final, arr[i].practice, arr[i].homework);
}
void Read(Score* arr)
{
FILE* fp = fopen("data.txt", "r");
/*if (fp == NULL){
puts("파일 오픈 실패!");
return -1;
}*/
for (int i = 0; i < 10; i++) {
fscanf(fp, "%s %s %d %d %d %d ", arr[i].num, arr[i].name, &arr[i].mid,
&arr[i].final, &arr[i].practice, &arr[i].homework);
}
}
int main(void)
{
Score arr[10] = { {"201811111", "Cho", 60, 60, 48, 23}, {"201811112", "Lee", 70, 60, 50, 25},
{"201811113", "Kim" ,50, 60, 48, 23}, {"201811114", "Kwon", 80, 80, 64, 32},
{"201811115", "Park", 70, 70, 56, 28}, {"201711111", "Choi" ,90, 80, 70, 30},
{"201711112", "Won" ,90, 90, 72, 36}, {"201611111","Baek", 100, 100, 80, 40},
{"201611113", "Yoo", 70, 75, 56, 28}, {"201511112", "Song" ,80 , 85 , 64 , 32} };
FILE* fp = fopen("data.txt", "w");
for (int i = 0; i < 10; i++) {
fprintf(fp, "%s %s %d %d %d %d ", arr[i].num, arr[i].name, arr[i].mid,
arr[i].final, arr[i].practice, arr[i].homework);
}
Read(arr);
Upnum(arr);
fclose(fp);
return 0;
}
|
[
"[email protected]"
] | |
83f7949ea82b0bc069d999b2f9a0c42eca6730d7
|
cfc99437b085afa7304ed5a4eab2a90072c7e50e
|
/pintools/extras/crt/include/netinet/in.h
|
906596b0c312adbfc4828aba1b4057bb08695bb1
|
[
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
moraispgsi/pin-bootstrap
|
95498b63f88c311e4fe446259214266130aece3f
|
7315b4e1709f63f018781456f9c745fc6f020f22
|
refs/heads/master
| 2021-09-07T18:09:11.568374 | 2018-02-27T05:16:32 | 2018-02-27T05:16:32 | 122,972,429 | 0 | 1 |
MIT
| 2018-02-26T14:31:18 | 2018-02-26T13:17:08 |
C++
|
UTF-8
|
C
| false | false | 2,151 |
h
|
/*
* Copyright (C) 2008 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifdef TARGET_MAC
#ifdef lint
# define OLD_lint lint
# undef lint
#endif
#include_next <netinet/in.h>
#ifdef OLD_lint
# define lint OLD_lint
# undef OLD_lint
#endif
#elif !defined(_NETINET_IN_H_)
#define _NETINET_IN_H_
#include <endian.h>
#include <netinet/in6.h>
#include <sys/cdefs.h>
#include <sys/socket.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/ipv6.h>
__BEGIN_DECLS
#define IPPORT_RESERVED 1024
#define INET_ADDRSTRLEN 16
typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;
extern int bindresvport (int sd, struct sockaddr_in *sin);
static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
static const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
__END_DECLS
#endif /* _NETINET_IN_H_ */
|
[
"[email protected]"
] | |
276b55e49373102fd3b05c609dff6ff8c905e9cc
|
c5cb98ad5c3fa37ce761cb9b430b69e29a33141f
|
/d/wudujiao/road1.c
|
e3c15f4dd2d5909ecfc73b3151126101cac4483f
|
[] |
no_license
|
cao777/mudylfy
|
92669b53216a520a48cf2cca49ea08d4df4999c5
|
266685aa486ecf0e3616db87b5bf7ad5ea4e57e4
|
refs/heads/master
| 2023-03-16T20:58:21.877729 | 2019-12-13T07:39:24 | 2019-12-13T07:39:24 | null | 0 | 0 | null | null | null | null |
GB18030
|
C
| false | false | 564 |
c
|
// by mayue
inherit ROOM;
void create()
{
set("short", "黄土大道");
set("long", @LONG
这是一条向南的黄土大道,两旁是一片片绿油油的水田
和悠闲的牧童。大道上人流熙熙攘攘,过往的行人顶着炎炎烈
日满头大汗的匆匆赶路,似乎并无心欣赏这优美的田园风光。
LONG
);
set("outdoors", "wudujiao");
set("exits", ([
// "east" : __DIR__"zuixianlou",
"south" : __DIR__"road2",
// "west" : __DIR__"wumiao",
"north" : "/d/taishan/yidao",
]));
setup();
replace_program(ROOM);
}
|
[
"[email protected]"
] | |
37d18bf935765fb4a240d5d8ceb9081949706bc1
|
06391f236b8e8458ee0aff3805511552d7c6d9af
|
/074BCT526/Lab2/Lab 2.2.c
|
e3851e30d4eb93c0ba01bbec61a8b72ff0e95742
|
[] |
no_license
|
Salamander321/Lab1stsem
|
bd15395fd3544885069b73840440a5ae2db62a44
|
aabc41fa501f520c11b8a027e148f0a0e562ccd7
|
refs/heads/master
| 2021-01-24T04:02:13.265943 | 2018-02-26T05:32:26 | 2018-02-26T05:32:26 | 122,918,093 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 349 |
c
|
//This program reads 3 integers from user and displays them in forward and reverse order
#include <stdio.h>
int main()
{
int a, b, c;
printf("Enter any three integers:\n");
scanf("%d %d %d", &a, &b, &c);
printf("The forward order is: %d, %d, %d\n", a, b, c);
printf("The reverse order is: %d, %d, %d", c, b, a);
return 0;
}
|
[
"[email protected]"
] | |
f6055da12d8be301adccc8c7b26203b560a1a8f7
|
15b985b2cf6ac01d5db698c4afe95cc8af1c0d03
|
/TQ210_NoOS/7-nand-ecc/main.c
|
cd324f8bf28dc46a373c4158e676ae823a8f208b
|
[] |
no_license
|
mankumari20150105/TQ210N
|
ce0852f029ee9092aec9b87dd055f7677de7e2ea
|
3cc4c4dc1b780f5a6982a48571742e5874de1dfa
|
refs/heads/master
| 2023-03-16T15:41:47.272392 | 2019-07-23T14:02:46 | 2019-07-23T14:02:46 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,253 |
c
|
#include "types.h"
#include "uart.h"
void bzero(u8 *s, int size)
{
int i = 0;
for (; i < size; i++)
s[i] = 0;
}
/* 测试:使用Ecc校验写入一页数据,然后将某个位反转后不使用Ecc再此写入,然后使用Ecc校验读出数据 */
void main()
{
int i, ret;
u8 oob[64];
u8 buf[2048];
bzero(buf, 2048);
/* 1.擦除第0块 */
nand_erase(0);
for (i = 0; i < 2048; i++)
buf[i] = 0xAA;
printf("begin write data..\n");
/*
** 2.写入1页数据到0地址(正确数据,全部为0xAA)
** 同时将计算出的ECC校验码保存到oob中
*/
nand_select_chip();
nand_write_page_8bit(buf, 0, oob);
/* 3.擦除第0块 */
nand_erase(0);
/*
** 4.将第一个数据的第0位取反(0xAB),不使用应硬件ECC,将1页数据写入第0页
** 同时将上面记录下的ECC写入spare区
*/
buf[0] ^= 0x01;
nand_write_page(buf, 0, oob);
nand_deselect_chip();
bzero(buf, 2048);
/* 5.使用三星提供的8位硬件ECC校验拷贝函数读取一页数据 */
ret = NF8_ReadPage_8ECC(0, buf);
//ret = nand_read_page_8bit(buf, 0);
printf("\nret = %d\n", ret);
/* 打印第一个数据 */
for (i = 0; i < 10; i++)
printf("%X ", buf[i]);
}
|
[
"[email protected]"
] | |
85a44fb93d38dacaf2ac7fbf15558b907c2db091
|
b275da44ccc31a3566be8098fc2ba8aabfb58485
|
/sem_2/lab_08/source/wfs.c
|
7dda7815a8ecf26f3d9b803e3075eaf399033d26
|
[] |
no_license
|
SanSanchezzz/operating-systems
|
235e85499cf688fa4569412ad52522a4fd9c5b0a
|
ae5be073683e2c1dc018d20a73892f410872cf95
|
refs/heads/master
| 2022-10-31T18:57:43.953053 | 2020-06-16T17:26:11 | 2020-06-16T17:26:11 | 272,767,236 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 4,435 |
c
|
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/time.h>
#include <linux/slab.h>
#include <linux/version.h>
#define wfs_MAGIC_NUMBER 0x13131313
#define SLABNAME "wfs_cache"
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alexander Kupry");
MODULE_DESCRIPTION("lab_8");
static int size = 7;
module_param(size, int, 0);
static int number = 31;
module_param(number, int, 0);
static int sco = 0;
static void* *line = NULL;
static void co(void* p)
{
*(int*)p = (int)p;
sco++;
}
struct kmem_cache *cache = NULL;
static struct wfs_inode
{
int i_mode;
unsigned long i_ino;
} wfs_inode;
static struct inode *wfs_make_inode(struct super_block *sb, int mode)
{
struct inode *ret = new_inode(sb);
if (ret)
{
inode_init_owner(ret, NULL, mode);
ret->i_size = PAGE_SIZE;
ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
ret->i_private = &wfs_inode;
}
return ret;
}
static void wfs_put_super(struct super_block * sb)
{
printk(KERN_DEBUG "[wfs] super block destroyed!\n");
}
static struct super_operations const wfs_super_ops = {
.put_super = wfs_put_super,
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
static int wfs_fill_sb(struct super_block *sb, void *data, int silent)
{
struct inode* root = NULL;
sb->s_blocksize = PAGE_SIZE;
sb->s_blocksize_bits = PAGE_SHIFT;
sb->s_magic = wfs_MAGIC_NUMBER;
sb->s_op = &wfs_super_ops;
root = wfs_make_inode(sb, S_IFDIR | 0755);
if (!root)
{
printk (KERN_ERR "[wfs] inode allocation failed!\n");
return -ENOMEM;
}
root->i_op = &simple_dir_inode_operations;
root->i_fop = &simple_dir_operations;
sb->s_root = d_make_root(root);
if (!sb->s_root)
{
printk(KERN_ERR "[wfs] root creation failed!\n");
iput(root);
return -ENOMEM;
}
return 0;
}
static struct dentry* wfs_mount(struct file_system_type *type, int flags, char const *dev, void *data)
{
struct dentry* const entry = mount_nodev(type, flags, data, wfs_fill_sb);
if (IS_ERR(entry))
printk(KERN_ERR "[wfs] mounting failed!\n");
else
printk(KERN_DEBUG "[wfs] mounted!\n");
return entry;
}
static struct file_system_type wfs_type = {
.owner = THIS_MODULE,
.name = "wfs",
.mount = wfs_mount,
.kill_sb = kill_litter_super,
};
static int __init wfs_init(void)
{
int i;
int ret;
if (size < 0)
{
printk(KERN_ERR "[wfs] invalid argument\n");
return -EINVAL;
}
line = kmalloc(sizeof(void*) * number, GFP_KERNEL);
if (line == NULL)
{
printk(KERN_ERR "[wfs] kmalloc error\n" );
kfree(line);
return -ENOMEM;
}
for (i = 0; i < number; i++)
{
line[i] = NULL;
}
cache = kmem_cache_create(SLABNAME, size, 0, SLAB_HWCACHE_ALIGN, co);
if (cache == NULL)
{
printk(KERN_ERR "[wfs] kmem_cache_create error\n" );
kmem_cache_destroy(cache);
kfree(line);
return -ENOMEM;
}
for (i = 0; i < number; i++)
{
if (NULL == (line[i] = kmem_cache_alloc(cache, GFP_KERNEL))) {
printk(KERN_ERR "[wfs] kmem_cache_alloc error\n");
for (i = 0; i < number; i++)
{
kmem_cache_free(cache, line[i]);
}
kmem_cache_destroy(cache);
kfree(line);
return -ENOMEM;
}
}
printk(KERN_INFO "[wfs] allocate %d objects into slab: %s\n", number, SLABNAME);
printk(KERN_INFO "[wfs] object size %d bytes, full size %ld bytes\n", size, (long)size * number);
printk(KERN_INFO "[wfs] constructor called %d times\n", sco);
ret = register_filesystem(&wfs_type);
if (ret!= 0)
{
printk(KERN_ERR "[wfs] module cannot register filesystem!\n");
return ret;
}
printk(KERN_DEBUG "[wfs] module loaded!\n");
return 0;
}
static void __exit wfs_exit(void)
{
int i;
int ret;
for (i = 0; i < number; i++)
kmem_cache_free(cache, line[i]);
kmem_cache_destroy(cache);
kfree(line);
ret = unregister_filesystem(&wfs_type);
if (ret!= 0)
printk(KERN_ERR "[wfs] module cannot unregister filesystem!\n");
printk(KERN_DEBUG "[wfs] module unloaded!\n");
}
module_init(wfs_init);
module_exit(wfs_exit);
|
[
"[email protected]"
] | |
80f13832f89b72176e1f16abe554ba2555ce83e4
|
d1cd0e61a0d5ed2b5341bc9e996625fb677f4f23
|
/lib/asn1c/nr_rrc/RangeToBestCell.c
|
72748c5c5e091a8559d8d72765edfaa7bde3f6ee
|
[
"Apache-2.0"
] |
permissive
|
soumyadeepbi/free5GRAN
|
251bff61bfd30628f0861a285086ac94368de34f
|
4e92458e955f59d86463ce65ea08c5c06cc8a48e
|
refs/heads/master
| 2023-07-28T20:23:42.404672 | 2021-10-06T16:32:47 | 2021-10-06T16:32:47 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,825 |
c
|
/*
* Copyright 2020-2021 Telecom Paris
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "NR-RRC-Definitions"
* `asn1c -gen-PER -fcompound-names -findirect-choice -no-gen-example`
*/
#include "RangeToBestCell.h"
/*
* This type is implemented using Q_OffsetRange,
* so here we adjust the DEF accordingly.
*/
static asn_oer_constraints_t asn_OER_type_RangeToBestCell_constr_1 CC_NOTUSED = {
{ 0, 0 },
-1};
asn_per_constraints_t asn_PER_type_RangeToBestCell_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED, 5, 5, 0, 30 } /* (0..30) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const ber_tlv_tag_t asn_DEF_RangeToBestCell_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_RangeToBestCell = {
"RangeToBestCell",
"RangeToBestCell",
&asn_OP_NativeEnumerated,
asn_DEF_RangeToBestCell_tags_1,
sizeof(asn_DEF_RangeToBestCell_tags_1)
/sizeof(asn_DEF_RangeToBestCell_tags_1[0]), /* 1 */
asn_DEF_RangeToBestCell_tags_1, /* Same as above */
sizeof(asn_DEF_RangeToBestCell_tags_1)
/sizeof(asn_DEF_RangeToBestCell_tags_1[0]), /* 1 */
{ 0, 0, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_Q_OffsetRange_specs_1 /* Additional specs */
};
|
[
"[email protected]"
] | |
db4878047c236a0333a48f5426ebcb0ec97f6dac
|
e74d9cbd67b06b3ed26c444dd1b50ce231cb9e1c
|
/2019_6_26/2019_6_26/test.c
|
b1832a4ef9f0b4d06eba7599687e862723d06cd7
|
[] |
no_license
|
Asupi/C
|
6ce1a758cd298be4ab5189692fff2223a150447b
|
9a96c2d729f9fc2748909a12c64c2b316f582665
|
refs/heads/master
| 2022-01-22T22:52:45.922976 | 2019-06-26T02:14:48 | 2019-06-26T02:14:48 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,455 |
c
|
#define _CRT_SECURE_NO_WARNINGS
#include <unistd.h>
#include <fcntl.h>
#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int main() {
int count = 500;
while (count--) {
int i;
char Buf[800 * 480 * 3] = { 0 };
int tempbuf[800 * 480] = { 0 };
int lcd_buf1[800 * 480] = { 0 };
int lcd_buf2[800 * 480] = { 0 };
int j = 0;
int bmp1_fd = open("./1.bmp", O_RDONLY);
int bmp2_fd = open("./2.bmp", O_RDONLY);
int lcd_fd = open("/dev/fb0", O_RDWR);
//FILE * lcdout = fopen("/dev/fb0", "r");
lseek(bmp1_fd, 54, SEEK_SET);
lseek(bmp2_fd, 54, SEEK_SET);
read(bmp1_fd, Buf, 800 * 480 * 3);
for (i = 0; i<800 * 480; i++)
{
tempbuf[i] = Buf[2 + i * 3] << 16 | Buf[1 + i * 3] << 8 | Buf[i * 3];
}
for (i = 0; i < 800; i++) {
for (j = 0; j < 480; j++) {
lcd_buf1[(479 - j) * 800 + i] = tempbuf[j * 800 + i];
}
}
read(bmp2_fd, Buf, 800 * 480 * 3);
for (i = 0; i<800 * 480; i++)
{
tempbuf[i] = Buf[2 + i * 3] << 16 | Buf[1 + i * 3] << 8 | Buf[i * 3];
}
for (i = 0; i < 800; i++) {
for (j = 0; j < 480; j++) {
lcd_buf2[(479 - j) * 800 + i] = tempbuf[j * 800 + i];
}
}
int count = 50;
write(lcd_fd, lcd_buf1, 800 * 480 * 4);
close(lcd_fd);
//fflush(lcdout);
sleep(1);
lcd_fd = open("/dev/fb0", O_RDWR);
write(lcd_fd, lcd_buf2, 800 * 480 * 4);
close(lcd_fd);
sleep(1);
//fflush(lcdout);
close(bmp1_fd);
close(bmp2_fd);
}
return 0;
}
|
[
"[email protected]"
] | |
001386608af966cf59a7c805beef7faebad8fb03
|
b71b8bd385c207dffda39d96c7bee5f2ccce946c
|
/testcases/CWE457_Use_of_Uninitialized_Variable/s01/CWE457_Use_of_Uninitialized_Variable__struct_array_declare_partial_init_10.c
|
d935ee0c8e37bef442a4669ce6656dbd81ed4fb5
|
[] |
no_license
|
Sporknugget/Juliet_prep
|
e9bda84a30bdc7938bafe338b4ab2e361449eda5
|
97d8922244d3d79b62496ede4636199837e8b971
|
refs/heads/master
| 2023-05-05T14:41:30.243718 | 2021-05-25T16:18:13 | 2021-05-25T16:18:13 | 369,334,230 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 5,541 |
c
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE457_Use_of_Uninitialized_Variable__struct_array_declare_partial_init_10.c
Label Definition File: CWE457_Use_of_Uninitialized_Variable.c_array.label.xml
Template File: sources-sinks-10.tmpl.c
*/
/*
* @description
* CWE: 457 Use of Uninitialized Variable
* BadSource: partial_init Initialize part, but not all of the array
* GoodSource: Initialize data
* Sinks: use
* GoodSink: Initialize then use data
* BadSink : Use data
* Flow Variant: 10 Control flow: if(globalTrue) and if(globalFalse)
*
* */
#include "std_testcase.h"
#ifndef OMITBAD
void CWE457_Use_of_Uninitialized_Variable__struct_array_declare_partial_init_10_bad()
{
twoIntsStruct * data;
twoIntsStruct dataUninitArray[10];
data = dataUninitArray;
{
/* POTENTIAL FLAW: Partially initialize data */
{
int i;
for(i=0; i<(10/2); i++)
{
data[i].intOne = i;
data[i].intTwo = i;
}
}
}
{
/* POTENTIAL FLAW: Use data without initializing it */
{
int i;
for(i=0; i<10; i++)
{
printIntLine(data[i].intOne);
printIntLine(data[i].intTwo);
}
}
}
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodB2G1() - use badsource and goodsink by changing the second globalTrue to globalFalse */
static void goodB2G1()
{
twoIntsStruct * data;
twoIntsStruct dataUninitArray[10];
data = dataUninitArray;
{
/* POTENTIAL FLAW: Partially initialize data */
{
int i;
for(i=0; i<(10/2); i++)
{
data[i].intOne = i;
data[i].intTwo = i;
}
}
}
{
/* FIX: Ensure data is initialized before use */
{
int i;
for(i=0; i<10; i++)
{
data[i].intOne = i;
data[i].intTwo = i;
}
}
{
int i;
for(i=0; i<10; i++)
{
printIntLine(data[i].intOne);
printIntLine(data[i].intTwo);
}
}
}
}
/* goodB2G2() - use badsource and goodsink by reversing the blocks in the second if */
static void goodB2G2()
{
twoIntsStruct * data;
twoIntsStruct dataUninitArray[10];
data = dataUninitArray;
{
/* POTENTIAL FLAW: Partially initialize data */
{
int i;
for(i=0; i<(10/2); i++)
{
data[i].intOne = i;
data[i].intTwo = i;
}
}
}
{
/* FIX: Ensure data is initialized before use */
{
int i;
for(i=0; i<10; i++)
{
data[i].intOne = i;
data[i].intTwo = i;
}
}
{
int i;
for(i=0; i<10; i++)
{
printIntLine(data[i].intOne);
printIntLine(data[i].intTwo);
}
}
}
}
/* goodG2B1() - use goodsource and badsink by changing the first globalTrue to globalFalse */
static void goodG2B1()
{
twoIntsStruct * data;
twoIntsStruct dataUninitArray[10];
data = dataUninitArray;
{
/* FIX: Completely initialize data */
{
int i;
for(i=0; i<10; i++)
{
data[i].intOne = i;
data[i].intTwo = i;
}
}
}
{
/* POTENTIAL FLAW: Use data without initializing it */
{
int i;
for(i=0; i<10; i++)
{
printIntLine(data[i].intOne);
printIntLine(data[i].intTwo);
}
}
}
}
/* goodG2B2() - use goodsource and badsink by reversing the blocks in the first if */
static void goodG2B2()
{
twoIntsStruct * data;
twoIntsStruct dataUninitArray[10];
data = dataUninitArray;
{
/* FIX: Completely initialize data */
{
int i;
for(i=0; i<10; i++)
{
data[i].intOne = i;
data[i].intTwo = i;
}
}
}
{
/* POTENTIAL FLAW: Use data without initializing it */
{
int i;
for(i=0; i<10; i++)
{
printIntLine(data[i].intOne);
printIntLine(data[i].intTwo);
}
}
}
}
void CWE457_Use_of_Uninitialized_Variable__struct_array_declare_partial_init_10_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
}
#endif /* OMITGOOD */
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
CWE457_Use_of_Uninitialized_Variable__struct_array_declare_partial_init_10_good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
CWE457_Use_of_Uninitialized_Variable__struct_array_declare_partial_init_10_bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
|
[
"[email protected]"
] | |
9429ab167f1caf43392203f82fba38c10ad1a29d
|
5c255f911786e984286b1f7a4e6091a68419d049
|
/code/659e5202-ddf9-4ca4-a62d-90a264a7cc0c.c
|
de1f22e4360d61219494f5cd8e4a621c26ac0b11
|
[] |
no_license
|
nmharmon8/Deep-Buffer-Overflow-Detection
|
70fe02c8dc75d12e91f5bc4468cf260e490af1a4
|
e0c86210c86afb07c8d4abcc957c7f1b252b4eb2
|
refs/heads/master
| 2021-09-11T19:09:59.944740 | 2018-04-06T16:26:34 | 2018-04-06T16:26:34 | 125,521,331 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 265 |
c
|
#include <stdio.h>
int main() {
int i=4;
int j=12;
int k;
int l;
j = 53;
l = 64;
k = i/j;
l = i/j;
l = j/j;
l = l/j;
l = i/j;
l = l%j;
l = l-j;
k = k-k*i;
printf("vulnerability");
printf("%d%d\n",k,l);
return 0;
}
|
[
"[email protected]"
] | |
65245b4c995f0ea514691b9680f8e81347a186b6
|
7d4e986704942d95ad06a2684439fa4cfcff950b
|
/vendor/mediatek/proprietary/trustzone/atf/v1.0/plat/mt6797/sip_svc/sip_svc_common.c
|
d46f4db1559684565960ff8dc9db671eacc95d1a
|
[
"BSD-3-Clause"
] |
permissive
|
carlitros900/96Boards_mediatek-x20-sla-16.10
|
55c16062f7df3a7a25a13226e63c5fa4ccd4ff65
|
4f98957401249499f19102691a6e3ce13fe47d42
|
refs/heads/master
| 2021-01-04T01:26:47.443633 | 2020-02-13T17:53:31 | 2020-02-13T17:53:31 | 240,322,130 | 2 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 16,112 |
c
|
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or its licensors, any
* reproduction, modification, use or disclosure of MediaTek Software, and
* information contained herein, in whole or in part, shall be strictly
* prohibited.
*
* MediaTek Inc. (C) 2014. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek
* Software") have been modified by MediaTek Inc. All revisions are subject to
* any receiver's applicable license agreements with MediaTek Inc.
*/
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <runtime_svc.h>
#include <debug.h>
#include <sip_svc.h>
#include <sip_error.h>
#include <platform.h>
#include <mmio.h>
#include <console.h> //set_uart_flag(), clear_uart_flag();
#include "plat_private.h" //for atf_arg_t_ptr
#include "sip_private.h"
#include "scp.h"
#include "mt_cpuxgpt.h"
#include "mt_idvfs_api.h"
#include "mt_ocp_api.h"
#include <xlat_tables.h>
#include <emi_drv.h>
#include <log.h>
#include <cache/plat_cache.h>
#define ATF_OCP_DREQ 1 // PTP3 OCP + DREQ function
extern void dfd_disable(void);
/*******************************************************************************
* SIP top level handler for servicing SMCs.
******************************************************************************/
static struct kernel_info k_info;
static void save_kernel_info(uint64_t pc, uint64_t r0, uint64_t r1,
uint64_t k32_64)
{
k_info.k32_64 = k32_64;
k_info.pc=pc;
if ( LINUX_KERNEL_32 == k32_64 ) {
/* for 32 bits kernel */
k_info.r0=0;
k_info.r1=r0; /* machtype */
k_info.r2=r1; /* tags */
} else {
/* for 64 bits kernel */
k_info.r0=r0;
k_info.r1=r1;
}
}
static void set_kernel_k32_64(uint64_t k32_64)
{
k_info.k32_64 = k32_64;
}
uint64_t get_kernel_k32_64(void)
{
return k_info.k32_64;
}
uint64_t get_kernel_info_pc(void)
{
return k_info.pc;
}
uint64_t get_kernel_info_r0(void)
{
return k_info.r0;
}
uint64_t get_kernel_info_r1(void)
{
return k_info.r1;
}
uint64_t get_kernel_info_r2(void)
{
return k_info.r2;
}
extern void bl31_prepare_kernel_entry(uint64_t k32_64);
extern void el3_exit(void);
extern uint64_t sip_write_md_regs(uint32_t cmd_type, uint32_t value1,uint32_t value2, uint32_t value3);
extern unsigned long g_dormant_log_base;
/*******************************************************************************
* SMC Call for Kernel MCUSYS register write
******************************************************************************/
static uint64_t mcusys_write_count = 0;
static uint64_t sip_mcusys_write(unsigned int reg_addr, unsigned int reg_value)
{
if((reg_addr & 0xFFFF0000) != (MCUCFG_BASE & 0xFFFF0000))
return SIP_SVC_E_INVALID_Range;
/* Perform range check */
if(( MP0_MISC_CONFIG0 <= reg_addr && reg_addr <= MP0_MISC_CONFIG9 ) ||
( MP1_MISC_CONFIG0 <= reg_addr && reg_addr <= MP1_MISC_CONFIG9 )) {
return SIP_SVC_E_PERMISSION_DENY;
}
if (check_cpuxgpt_write_permission(reg_addr, reg_value) == 0) {
/* Not allow to clean enable bit[0], Force to set bit[0] as 1 */
reg_value |= 0x1;
}
mmio_write_32(reg_addr, reg_value);
dsb();
mcusys_write_count++;
return SIP_SVC_E_SUCCESS;
}
/*******************************************************************************
* SIP top level handler for servicing SMCs.
******************************************************************************/
uint64_t sip_smc_handler(uint32_t smc_fid,
uint64_t x1,
uint64_t x2,
uint64_t x3,
uint64_t x4,
void *cookie,
void *handle,
uint64_t flags)
{
uint64_t rc = 0;
uint32_t ns;
atf_arg_t_ptr teearg = >eearg;
/* Determine which security state this SMC originated from */
ns = is_caller_non_secure(flags);
//WARN("sip_smc_handler\n");
//WARN("id=0x%llx\n", smc_fid);
//WARN("x1=0x%llx, x2=0x%llx, x3=0x%llx, x4=0x%llx\n", x1, x2, x3, x4);
switch (smc_fid) {
case MTK_SIP_TBASE_HWUID_AARCH32:
{
if (ns)
SMC_RET1(handle, SMC_UNK);
SMC_RET4(handle, teearg->hwuid[0], teearg->hwuid[1],
teearg->hwuid[2], teearg->hwuid[3]);
break;
}
case MTK_SIP_KERNEL_MCUSYS_WRITE_AARCH32:
case MTK_SIP_KERNEL_MCUSYS_WRITE_AARCH64:
rc = sip_mcusys_write(x1, x2);
break;
case MTK_SIP_KERNEL_MCUSYS_ACCESS_COUNT_AARCH32:
case MTK_SIP_KERNEL_MCUSYS_ACCESS_COUNT_AARCH64:
rc = mcusys_write_count;
break;
case MTK_SIP_KERNEL_BOOT_AARCH32:
wdt_kernel_cb_addr = 0;
set_uart_flag();
printf("save kernel info\n");
save_kernel_info(x1, x2, x3, x4);
bl31_prepare_kernel_entry(x4);
printf("el3_exit\n");
clear_uart_flag();
SMC_RET0(handle);
break;
case MTK_SIP_LK_MD_REG_WRITE_AARCH32:
case MTK_SIP_LK_MD_REG_WRITE_AARCH64:
sip_write_md_regs((uint32_t)x1,(uint32_t)x2,(uint32_t)x3,(uint32_t)x4);
break;
case MTK_SIP_LK_WDT_AARCH32:
case MTK_SIP_LK_WDT_AARCH64:
set_kernel_k32_64(LINUX_KERNEL_32);
wdt_kernel_cb_addr = x1;
printf("MTK_SIP_LK_WDT : 0x%lx \n", wdt_kernel_cb_addr);
rc = teearg->atf_aee_debug_buf_start;
break;
case MTK_SIP_KERNEL_EMIMPU_WRITE_AARCH32:
case MTK_SIP_KERNEL_EMIMPU_WRITE_AARCH64:
rc = sip_emimpu_write(x1, x2);
break;
case MTK_SIP_KERNEL_EMIMPU_READ_AARCH32:
case MTK_SIP_KERNEL_EMIMPU_READ_AARCH64:
rc = (uint64_t)sip_emimpu_read(x1);
break;
case MTK_SIP_KERNEL_EMIMPU_SET_AARCH32:
case MTK_SIP_KERNEL_EMIMPU_SET_AARCH64:
//set_uart_flag();
//printf("Ahsin sip_emimpu_set_region_protection x1=%x x2=%x x3=%x\n",x1, x2, x3);
rc = sip_emimpu_set_region_protection(x1, x2, x3);
//clear_uart_flag();
break;
#if DEBUG
case MTK_SIP_KERNEL_GIC_DUMP_AARCH32:
case MTK_SIP_KERNEL_GIC_DUMP_AARCH64:
rc = mt_irq_dump_status(x1);
break;
#endif
#ifdef MTK_ATF_RAM_DUMP
case MTK_SIP_RAM_DUMP_ADDR_AARCH32:
atf_ram_dump_base = x1<<32| (x2&0xffffffff);
atf_ram_dump_size = x3<<32 | (x4&0xffffffff);
break;
case MTK_SIP_RAM_DUMP_ADDR_AARCH64:
atf_ram_dump_base = x1;
atf_ram_dump_size = x2;
break;
#endif
case MTK_SIP_DISABLE_DFD_AAACH32:
case MTK_SIP_DISABLE_DFD_AARCH64:
dfd_disable();
rc = 0;
break;
case MTK_SIP_KERNEL_WDT_AARCH32:
case MTK_SIP_KERNEL_WDT_AARCH64:
wdt_kernel_cb_addr = x1;
printf("MTK_SIP_KERNEL_WDT : 0x%lx \n", wdt_kernel_cb_addr);
printf("teearg->atf_aee_debug_buf_start : 0x%x \n",
teearg->atf_aee_debug_buf_start);
rc = teearg->atf_aee_debug_buf_start;
break;
case MTK_SIP_KERNEL_MSG_AARCH32:
case MTK_SIP_KERNEL_MSG_AARCH64:
if (x1 == 0x0) { //set
if (x2 == 1) {
// g_dormant_tslog_base = x3;
}
if (x2 == 2) {
g_dormant_log_base = x3;
}
}
else if (x1 == 0x01) { //get
}
rc = SIP_SVC_E_SUCCESS;
break;
case MTK_SIP_KERNEL_SCP_RESET_AARCH32:
case MTK_SIP_KERNEL_SCP_RESET_AARCH64:
sip_reset_scp(x1);
rc = 0;
break;
#if 1
case MTK_SIP_KERNEL_UDI_JTAG_CLOCK_AARCH32:
case MTK_SIP_KERNEL_UDI_JTAG_CLOCK_AARCH64:
rc = UDIRead(x1, x2);
break;
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSENABLE_AARCH32:
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSENABLE_AARCH64:
/* Fmax = 500 ~ 3000, Vproc_mv_x100 = 50000~120000, VSram_mv_x100 = 50000~120000 */
rc = API_BIGIDVFSENABLE(x1, x2, x3);
break;
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSDISABLE_AARCH32:
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSDISABLE_AARCH64:
rc = API_BIGIDVFSDISABLE();
break;
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSPLLSETFREQ_AARCH32:
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSPLLSETFREQ_AARCH64:
/* x1 range = 500 ~ 3000 */
rc = API_BIGPLLSETFREQ(x1);
break;
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSSRAMLDOSET_AARCH32:
case MTK_SIP_KERNEL_IDVFS_BIGIDVFSSRAMLDOSET_AARCH64:
/* x1 range = 60000 ~ 120000 (mv_x100) */
rc = BigSRAMLDOSet(x1);
break;
case MTK_SIP_KERNEL_IDVFS_IGIDVFSSWREQ_AARCH32:
case MTK_SIP_KERNEL_IDVFS_IGIDVFSSWREQ_AARCH64:
/* x1 swreq_reg value */
rc = API_BIGIDVFSSWREQ(x1);
break;
#endif
case MTK_SIP_KERNEL_OCP_WRITE_AARCH32:
case MTK_SIP_KERNEL_OCP_WRITE_AARCH64:
/* OCP_BASE_ADDR= 0x10220000, only for secure reg 0x10220000 ~ 0x10224000 */
if((x1 & 0xFFFFC000) != (OCP_BASE_ADDR & 0xFFFFC000))
return SIP_SVC_E_INVALID_Range;
mmio_write_32(x1, x2);
/* prinf("MTK_SIP_KERNEL_OCP_WRITE : addr(0x%x) value(0x%x)\n", x1,x2); */
break;
case MTK_SIP_KERNEL_OCP_READ_AARCH32:
case MTK_SIP_KERNEL_OCP_READ_AARCH64:
/* OCP_BASE_ADDR= 0x10220000, only for secure reg 0x10220000 ~ 0x10224000 */
if((x1 & 0xFFFFC000) != (OCP_BASE_ADDR & 0xFFFFC000))
return SIP_SVC_E_INVALID_Range;
rc = mmio_read_32(x1);
/* prinf("MTK_SIP_KERNEL_OCP_READ : addr(0x%x) value(0x%x)\n", x1, rc); */
break;
#if ATF_OCP_DREQ //OCP+DREQ
case MTK_SIP_KERNEL_BIGOCPCONFIG_AARCH32:
case MTK_SIP_KERNEL_BIGOCPCONFIG_AARCH64:
rc = BigOCPConfig(x1, x2);
break;
case MTK_SIP_KERNEL_BIGOCPSETTARGET_AARCH32:
case MTK_SIP_KERNEL_BIGOCPSETTARGET_AARCH64:
rc = BigOCPSetTarget(x1, x2);
break;
case MTK_SIP_KERNEL_BIGOCPENABLE1_AARCH32:
case MTK_SIP_KERNEL_BIGOCPENABLE1_AARCH64:
rc = BigOCPEnable(x1, 1, x2, x3);
break;
case MTK_SIP_KERNEL_BIGOCPENABLE0_AARCH32:
case MTK_SIP_KERNEL_BIGOCPENABLE0_AARCH64:
rc = BigOCPEnable(x1, 0, x2, x3);
break;
case MTK_SIP_KERNEL_BIGOCPDISABLE_AARCH32:
case MTK_SIP_KERNEL_BIGOCPDISABLE_AARCH64:
BigOCPDisable();
break;
case MTK_SIP_KERNEL_BIGOCPINTLIMIT_AARCH32:
case MTK_SIP_KERNEL_BIGOCPINTLIMIT_AARCH64:
rc = BigOCPIntLimit(x1, x2);
break;
case MTK_SIP_KERNEL_BIGOCPINTENDIS_AARCH32:
case MTK_SIP_KERNEL_BIGOCPINTENDIS_AARCH64:
rc = BigOCPIntEnDis(x1, x2);
break;
case MTK_SIP_KERNEL_BIGOCPINTCLR_AARCH32:
case MTK_SIP_KERNEL_BIGOCPINTCLR_AARCH64:
rc = BigOCPIntClr(x1, x2);
break;
case MTK_SIP_KERNEL_BIGOCPAVGPWRGET_AARCH32:
case MTK_SIP_KERNEL_BIGOCPAVGPWRGET_AARCH64:
rc = BigOCPAvgPwrGet(x1);
break;
case MTK_SIP_KERNEL_BIGOCPCAPTURE1_AARCH32:
case MTK_SIP_KERNEL_BIGOCPCAPTURE1_AARCH64:
rc = BigOCPCapture(1, x1, x2, x3);
break;
case MTK_SIP_KERNEL_BIGOCPCAPTURE0_AARCH32:
case MTK_SIP_KERNEL_BIGOCPCAPTURE0_AARCH64:
rc = BigOCPCapture(0, x1, x2, x3);
break;
// case MTK_SIP_KERNEL_BIGOCPCAPTURESTATUS_AARCH32:
// case MTK_SIP_KERNEL_BIGOCPCAPTURESTATUS_AARCH64:
// rc = BigOCPCaptureStatus(x1, x2, x3);
// break;
case MTK_SIP_KERNEL_BIGOCPCLKAVG_AARCH32:
case MTK_SIP_KERNEL_BIGOCPCLKAVG_AARCH64:
rc = BigOCPClkAvg(x1, x2);
break;
// case MTK_SIP_KERNEL_BIGOCPCLKAVGSTATUS_AARCH32:
// case MTK_SIP_KERNEL_BIGOCPCLKAVGSTATUS_AARCH64:
// rc = BigOCPClkAvgStatus(x1);
// break;
case MTK_SIP_KERNEL_LITTLEOCPCONFIG_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPCONFIG_AARCH64:
rc = LittleOCPConfig(x1, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPSETTARGET_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPSETTARGET_AARCH64:
rc = LittleOCPSetTarget(x1, x2);
break;
case MTK_SIP_KERNEL_LITTLEOCPENABLE_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPENABLE_AARCH64:
rc = LittleOCPEnable(x1, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPDISABLE_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPDISABLE_AARCH64:
rc = LittleOCPDisable(x1);
break;
case MTK_SIP_KERNEL_LITTLEOCPDVFSSET_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPDVFSSET_AARCH64:
rc = LittleOCPDVFSSet(x1, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPINTLIMIT_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPINTLIMIT_AARCH64:
rc = LittleOCPIntLimit(x1, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPINTENDIS_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPINTENDIS_AARCH64:
rc = LittleOCPIntEnDis(x1, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPINTCLR_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPINTCLR_AARCH64:
rc = LittleOCPIntClr(x1, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPAVGPWR_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPAVGPWR_AARCH64:
rc = LittleOCPAvgPwr(x1,x2,x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPCAPTURE00_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPCAPTURE00_AARCH64:
rc = LittleOCPCapture(x1, 0, 0, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPCAPTURE10_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPCAPTURE10_AARCH64:
rc = LittleOCPCapture(x1, 1, 0, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPCAPTURE11_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPCAPTURE11_AARCH64:
rc = LittleOCPCapture(x1, 1, 1, x2, x3);
break;
case MTK_SIP_KERNEL_LITTLEOCPAVGPWRGET_AARCH32:
case MTK_SIP_KERNEL_LITTLEOCPAVGPWRGET_AARCH64:
rc = LittleOCPAvgPwrGet(x1);
break;
// DREQ + SRAMLDO
case MTK_SIP_KERNEL_BIGSRAMLDOENABLE_AARCH32:
case MTK_SIP_KERNEL_BIGSRAMLDOENABLE_AARCH64:
rc = BigSRAMLDOEnable(x1);
break;
case MTK_SIP_KERNEL_BIGDREQHWEN_AARCH32:
case MTK_SIP_KERNEL_BIGDREQHWEN_AARCH64:
rc = BigDREQHWEn(x1, x2);
break;
case MTK_SIP_KERNEL_BIGDREQSWEN_AARCH32:
case MTK_SIP_KERNEL_BIGDREQSWEN_AARCH64:
rc = BigDREQSWEn(x1);
break;
case MTK_SIP_KERNEL_BIGDREQGET_AARCH32:
case MTK_SIP_KERNEL_BIGDREQGET_AARCH64:
rc = BigDREQGet();
break;
case MTK_SIP_KERNEL_LITTLEDREQSWEN_AARCH32:
case MTK_SIP_KERNEL_LITTLEDREQSWEN_AARCH64:
rc = LittleDREQSWEn(x1);
break;
case MTK_SIP_KERNEL_LITTLEDREQGET_AARCH32:
case MTK_SIP_KERNEL_LITTLEDREQGET_AARCH64:
rc = LittleDREQGet();
break;
case MTK_SIP_KERNEL_ICACHE_DUMP_AARCH32:
case MTK_SIP_KERNEL_ICACHE_DUMP_AARCH64:
rc = mt_icache_dump(x1, x2);
break;
#endif
default:
rc = SMC_UNK;
WARN("Unimplemented SIP Call: 0x%x \n", smc_fid);
}
SMC_RET1(handle, rc);
}
|
[
"[email protected]"
] | |
f76e38a3355d97c77d7365a875f2d3d5e4a70540
|
51635684d03e47ebad12b8872ff469b83f36aa52
|
/external/gcc-12.1.0/gcc/testsuite/gcc.dg/uninit-pr98583.c
|
6159c9512f40a06d75f965474a6a06860e2a5eb6
|
[
"LGPL-2.1-only",
"GPL-3.0-only",
"GCC-exception-3.1",
"GPL-2.0-only",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"FSFAP",
"Zlib",
"LicenseRef-scancode-public-domain"
] |
permissive
|
zhmu/ananas
|
8fb48ddfe3582f85ff39184fc7a3c58725fe731a
|
30850c1639f03bccbfb2f2b03361792cc8fae52e
|
refs/heads/master
| 2022-06-25T10:44:46.256604 | 2022-06-12T17:04:40 | 2022-06-12T17:04:40 | 30,108,381 | 59 | 8 |
Zlib
| 2021-09-26T17:30:30 | 2015-01-31T09:44:33 |
C
|
UTF-8
|
C
| false | false | 525 |
c
|
/* PR middle-end/98583 - missing -Wuninitialized reading from a second VLA
in its own block
{ dg-do compile }
{ dg-options "-O2 -Wall" }
{ dg-require-effective-target alloca } */
void f (int*);
void g (int);
void h1 (int n)
{
int a[n];
f (a);
int b[n];
g (b[1]); // { dg-warning "\\\[-Wuninitialized" }
}
void h2 (int n, int i, int j)
{
if (i)
{
int a[n];
f (a);
}
if (j)
{
int b[n];
g (b[1]); // { dg-warning "\\\[-Wmaybe-uninitialized" }
}
}
|
[
"[email protected]"
] | |
148e0ffdfff4d30dc384badf14a94eed39015198
|
f175bcab3c2f0aad7378c94ac220256982ab2027
|
/Temp/il2cppOutput/il2cppOutput/UnityEngine_UnityEngine_Events_InvokableCall_2_gen149250066MethodDeclarations.h
|
b4e78ea898f5fecd42475ab333d34baf47c7a46d
|
[] |
no_license
|
al2css/erpkunity
|
6618387e9a5b44378e70ccb859d3b33a7837268c
|
c618dc989963bcd7b7ec9fa9b17c39fff88bb89b
|
refs/heads/master
| 2020-07-22T04:59:49.139202 | 2017-06-23T16:33:13 | 2017-06-23T16:33:13 | 94,344,128 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 3,940 |
h
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <assert.h>
#include <exception>
// UnityEngine.Events.InvokableCall`2<System.Single,System.Single>
struct InvokableCall_2_t149250066;
// System.Object
struct Il2CppObject;
// System.Reflection.MethodInfo
struct MethodInfo_t;
// UnityEngine.Events.UnityAction`2<System.Single,System.Single>
struct UnityAction_2_t134459182;
// System.Object[]
struct ObjectU5BU5D_t3614634134;
#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_Object2689449295.h"
#include "mscorlib_System_Reflection_MethodInfo3330546337.h"
// System.Void UnityEngine.Events.InvokableCall`2<System.Single,System.Single>::.ctor(System.Object,System.Reflection.MethodInfo)
extern "C" void InvokableCall_2__ctor_m451078716_gshared (InvokableCall_2_t149250066 * __this, Il2CppObject * ___target0, MethodInfo_t * ___theFunction1, const MethodInfo* method);
#define InvokableCall_2__ctor_m451078716(__this, ___target0, ___theFunction1, method) (( void (*) (InvokableCall_2_t149250066 *, Il2CppObject *, MethodInfo_t *, const MethodInfo*))InvokableCall_2__ctor_m451078716_gshared)(__this, ___target0, ___theFunction1, method)
// System.Void UnityEngine.Events.InvokableCall`2<System.Single,System.Single>::.ctor(UnityEngine.Events.UnityAction`2<T1,T2>)
extern "C" void InvokableCall_2__ctor_m2243606533_gshared (InvokableCall_2_t149250066 * __this, UnityAction_2_t134459182 * ___action0, const MethodInfo* method);
#define InvokableCall_2__ctor_m2243606533(__this, ___action0, method) (( void (*) (InvokableCall_2_t149250066 *, UnityAction_2_t134459182 *, const MethodInfo*))InvokableCall_2__ctor_m2243606533_gshared)(__this, ___action0, method)
// System.Void UnityEngine.Events.InvokableCall`2<System.Single,System.Single>::add_Delegate(UnityEngine.Events.UnityAction`2<T1,T2>)
extern "C" void InvokableCall_2_add_Delegate_m687719050_gshared (InvokableCall_2_t149250066 * __this, UnityAction_2_t134459182 * ___value0, const MethodInfo* method);
#define InvokableCall_2_add_Delegate_m687719050(__this, ___value0, method) (( void (*) (InvokableCall_2_t149250066 *, UnityAction_2_t134459182 *, const MethodInfo*))InvokableCall_2_add_Delegate_m687719050_gshared)(__this, ___value0, method)
// System.Void UnityEngine.Events.InvokableCall`2<System.Single,System.Single>::remove_Delegate(UnityEngine.Events.UnityAction`2<T1,T2>)
extern "C" void InvokableCall_2_remove_Delegate_m4249474923_gshared (InvokableCall_2_t149250066 * __this, UnityAction_2_t134459182 * ___value0, const MethodInfo* method);
#define InvokableCall_2_remove_Delegate_m4249474923(__this, ___value0, method) (( void (*) (InvokableCall_2_t149250066 *, UnityAction_2_t134459182 *, const MethodInfo*))InvokableCall_2_remove_Delegate_m4249474923_gshared)(__this, ___value0, method)
// System.Void UnityEngine.Events.InvokableCall`2<System.Single,System.Single>::Invoke(System.Object[])
extern "C" void InvokableCall_2_Invoke_m3692277805_gshared (InvokableCall_2_t149250066 * __this, ObjectU5BU5D_t3614634134* ___args0, const MethodInfo* method);
#define InvokableCall_2_Invoke_m3692277805(__this, ___args0, method) (( void (*) (InvokableCall_2_t149250066 *, ObjectU5BU5D_t3614634134*, const MethodInfo*))InvokableCall_2_Invoke_m3692277805_gshared)(__this, ___args0, method)
// System.Boolean UnityEngine.Events.InvokableCall`2<System.Single,System.Single>::Find(System.Object,System.Reflection.MethodInfo)
extern "C" bool InvokableCall_2_Find_m762004677_gshared (InvokableCall_2_t149250066 * __this, Il2CppObject * ___targetObj0, MethodInfo_t * ___method1, const MethodInfo* method);
#define InvokableCall_2_Find_m762004677(__this, ___targetObj0, ___method1, method) (( bool (*) (InvokableCall_2_t149250066 *, Il2CppObject *, MethodInfo_t *, const MethodInfo*))InvokableCall_2_Find_m762004677_gshared)(__this, ___targetObj0, ___method1, method)
|
[
"[email protected]"
] | |
1a0785493e242017c97394486fd252c5eac36c76
|
b65b4e195223d843ce7a29d08d4faacd72df46b5
|
/src/fx.c
|
02c435d3a30b705ea5e28d49a8c7e27e38ab7707
|
[] |
no_license
|
mwkent/VocoderOSC
|
5451b4e867481036c1108de3efdf7c6c5b5c0457
|
75b6b487867115e2a2fb67cb6341012424ea5860
|
refs/heads/master
| 2020-05-30T20:19:30.992244 | 2014-04-29T17:05:13 | 2014-04-29T17:05:13 | 19,261,832 | 1 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 908 |
c
|
#include <stdio.h>
#include <stdlib.h>
#include "../headers/fx.h"
/**
* Fx:
* An audio effect psuedo-class, containing the function that processses the
* effect and saved data for the effect.
*/
/**
* fx_new: allocates and returns a new Fx,
* assuming fxData has already been allocated/initialized
*/
Fx* fx_new(AudioFx audioFx, FreeFx freeFx, void* fxData) {
Fx* fx = malloc(sizeof(Fx));
fx->audioFx = audioFx;
fx->freeFx = freeFx;
fx->fxData = fxData;
return fx;
}
/**
* fx_process: returns the output of audio effects processing
*/
float fx_process(Fx* fx, float input, int i, int bufLength) {
return fx->audioFx(input, i, bufLength, fx->fxData);
}
/**
* fx_free: frees fx
*/
void fx_free(Fx* fx) {
if (fx->fxData != NULL) {
fx->freeFx(fx->fxData);
}
free(fx);
}
// returns fx->fxData
void* fx_getData(Fx* fx) {
return fx->fxData;
}
|
[
"[email protected]"
] | |
d29bb86ff842fa4f949be8560e7026903f661190
|
de21f9075f55640514c29ef0f1fe3f0690845764
|
/regression/goto-instrument-wmm-core/ppc_safe120_TSO_OPT/safe120.c
|
38b17611f811675833d2a601d1280f8ead70352c
|
[
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSD-4-Clause"
] |
permissive
|
diffblue/cbmc
|
975a074ac445febb3b5715f8792beb545522dc18
|
decd2839c2f51a54b2ad0f3e89fdc1b4bf78cd16
|
refs/heads/develop
| 2023-08-31T05:52:05.342195 | 2023-08-30T13:31:51 | 2023-08-30T13:31:51 | 51,877,056 | 589 | 309 |
NOASSERTION
| 2023-09-14T18:49:17 | 2016-02-16T23:03:52 |
C++
|
UTF-8
|
C
| false | false | 1,196 |
c
|
void fence()
{
asm("sync");
}
void lwfence()
{
asm("lwsync");
}
void isync()
{
asm("isync");
}
int __unbuffered_cnt = 0;
int __unbuffered_p0_r1 = 0;
int __unbuffered_p1_r1 = 0;
int __unbuffered_p1_r3 = 0;
int __unbuffered_p2_r1 = 0;
int __unbuffered_p2_r3 = 0;
int x = 0;
int y = 0;
void *P0(void *arg)
{
__unbuffered_p0_r1 = 1;
y = __unbuffered_p0_r1;
// Instrumentation for CPROVER
fence();
__unbuffered_cnt++;
}
void *P1(void *arg)
{
__unbuffered_p1_r1 = y;
fence();
__unbuffered_p1_r3 = 1;
x = __unbuffered_p1_r3;
// Instrumentation for CPROVER
fence();
__unbuffered_cnt++;
}
void *P2(void *arg)
{
__unbuffered_p2_r1 = x;
fence();
__unbuffered_p2_r3 = y;
// Instrumentation for CPROVER
fence();
__unbuffered_cnt++;
}
int main()
{
__CPROVER_ASYNC_0:
P0(0);
__CPROVER_ASYNC_1:
P1(0);
__CPROVER_ASYNC_2:
P2(0);
__CPROVER_assume(__unbuffered_cnt == 3);
fence();
// EXPECT:exists
__CPROVER_assert(
!(__unbuffered_p1_r1 == 1 && __unbuffered_p2_r1 == 1 &&
__unbuffered_p2_r3 == 0),
"Program was expected to be safe for PPC, model checker should have said "
"NO.\nThis likely is a bug in the tool chain.");
return 0;
}
|
[
"[email protected]"
] | |
e8bde2ea53b9e4803c65a3da62245ed626e47e66
|
f955b71bc89bdf8da84c9807394f096d444684b4
|
/re2c/test/unicode_group_L_.8--encoding-policy(ignore).c
|
2d6249b2ac93e89d8f012b097af725f367637a9b
|
[
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] |
permissive
|
otaran/re2c
|
0d8ae1f6bd855e5ae2c003b96fbfbe4a22516f63
|
df19195968a158acf78eb4723c60925fbf1f6e04
|
refs/heads/master
| 2021-01-22T16:10:15.677837 | 2015-12-02T12:11:01 | 2015-12-02T12:11:01 | 47,002,105 | 1 | 0 | null | 2015-11-27T22:46:43 | 2015-11-27T22:46:43 | null |
UTF-8
|
C
| false | false | 35,987 |
c
|
/* Generated by re2c */
#line 1 "unicode_group_L_.8--encoding-policy(ignore).re"
#include <stdio.h>
#include "utf8.h"
#define YYCTYPE unsigned char
bool scan(const YYCTYPE * start, const YYCTYPE * const limit)
{
__attribute__((unused)) const YYCTYPE * YYMARKER; // silence compiler warnings when YYMARKER is not used
# define YYCURSOR start
L_:
#line 13 "unicode_group_L_.8--encoding-policy(ignore).c"
{
YYCTYPE yych;
yych = *YYCURSOR;
switch (yych) {
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z': goto yy4;
case 0xC2: goto yy6;
case 0xC3: goto yy7;
case 0xC4:
case 0xC5:
case 0xC8:
case 0xC9:
case 0xD0:
case 0xD1:
case 0xD3: goto yy8;
case 0xC6: goto yy9;
case 0xC7: goto yy10;
case 0xCA: goto yy11;
case 0xCD: goto yy12;
case 0xCE: goto yy13;
case 0xCF: goto yy14;
case 0xD2: goto yy15;
case 0xD4: goto yy16;
case 0xD5: goto yy17;
case 0xD6: goto yy18;
case 0xE1: goto yy19;
case 0xE2: goto yy20;
case 0xEA: goto yy21;
case 0xEF: goto yy22;
case 0xF0: goto yy23;
default: goto yy2;
}
yy2:
++YYCURSOR;
yy3:
#line 13 "unicode_group_L_.8--encoding-policy(ignore).re"
{ return YYCURSOR == limit; }
#line 101 "unicode_group_L_.8--encoding-policy(ignore).c"
yy4:
++YYCURSOR;
yy5:
#line 12 "unicode_group_L_.8--encoding-policy(ignore).re"
{ goto L_; }
#line 107 "unicode_group_L_.8--encoding-policy(ignore).c"
yy6:
yych = *++YYCURSOR;
switch (yych) {
case 0xAA:
case 0xB5:
case 0xBA: goto yy29;
default: goto yy3;
}
yy7:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy8:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy9:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy10:
yych = *++YYCURSOR;
switch (yych) {
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy11:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF: goto yy29;
default: goto yy3;
}
yy12:
yych = *++YYCURSOR;
switch (yych) {
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB6:
case 0xB7:
case 0xBB:
case 0xBC:
case 0xBD: goto yy29;
default: goto yy3;
}
yy13:
yych = *++YYCURSOR;
switch (yych) {
case 0x86:
case 0x88:
case 0x89:
case 0x8A:
case 0x8C:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy14:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy15:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy16:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy17:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy3;
}
yy18:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87: goto yy29;
default: goto yy3;
}
yy19:
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 0x82: goto yy65;
case 0x83: goto yy64;
case 0xB4: goto yy63;
case 0xB5: goto yy62;
case 0xB6: goto yy61;
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB: goto yy27;
case 0xBC: goto yy60;
case 0xBD: goto yy59;
case 0xBE: goto yy58;
case 0xBF: goto yy57;
default: goto yy3;
}
yy20:
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 0x84: goto yy56;
case 0x85: goto yy55;
case 0x86: goto yy54;
case 0xB0: goto yy53;
case 0xB1: goto yy52;
case 0xB2: goto yy27;
case 0xB3: goto yy51;
case 0xB4: goto yy50;
default: goto yy3;
}
yy21:
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 0x99: goto yy48;
case 0x9A: goto yy47;
case 0x9C: goto yy46;
case 0x9D: goto yy45;
case 0x9E: goto yy44;
case 0x9F: goto yy49;
default: goto yy3;
}
yy22:
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 0xAC: goto yy43;
case 0xBC: goto yy42;
case 0xBD: goto yy41;
default: goto yy3;
}
yy23:
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 0x90: goto yy26;
case 0x9D: goto yy24;
default: goto yy3;
}
yy24:
yych = *++YYCURSOR;
switch (yych) {
case 0x90:
case 0x96:
case 0x97:
case 0x98:
case 0x99: goto yy27;
case 0x91: goto yy35;
case 0x92: goto yy37;
case 0x93: goto yy38;
case 0x94: goto yy32;
case 0x95: goto yy31;
case 0x9A: goto yy34;
case 0x9B: goto yy30;
case 0x9C: goto yy36;
case 0x9D: goto yy33;
case 0x9E: goto yy39;
case 0x9F: goto yy40;
default: goto yy25;
}
yy25:
YYCURSOR = YYMARKER;
goto yy3;
yy26:
yych = *++YYCURSOR;
switch (yych) {
case 0x90: goto yy27;
case 0x91: goto yy28;
default: goto yy25;
}
yy27:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy28:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F: goto yy29;
default: goto yy25;
}
yy29:
yych = *++YYCURSOR;
goto yy5;
yy30:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy31:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x86:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy32:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE: goto yy29;
default: goto yy25;
}
yy33:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy34:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy35:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy36:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy37:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9E:
case 0x9F:
case 0xA2:
case 0xA5:
case 0xA6:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBB:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy38:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy39:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy40:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B: goto yy29;
default: goto yy25;
}
yy41:
yych = *++YYCURSOR;
switch (yych) {
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A: goto yy29;
default: goto yy25;
}
yy42:
yych = *++YYCURSOR;
switch (yych) {
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA: goto yy29;
default: goto yy25;
}
yy43:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97: goto yy29;
default: goto yy25;
}
yy44:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x90:
case 0x91:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9: goto yy29;
default: goto yy25;
}
yy45:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy46:
yych = *++YYCURSOR;
switch (yych) {
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy47:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97: goto yy29;
default: goto yy25;
}
yy48:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD: goto yy29;
default: goto yy25;
}
yy49:
yych = *++YYCURSOR;
switch (yych) {
case 0xBA: goto yy29;
default: goto yy25;
}
yy50:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5: goto yy29;
default: goto yy25;
}
yy51:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE: goto yy29;
default: goto yy25;
}
yy52:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy53:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy54:
yych = *++YYCURSOR;
switch (yych) {
case 0x83:
case 0x84: goto yy29;
default: goto yy25;
}
yy55:
yych = *++YYCURSOR;
switch (yych) {
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8E: goto yy29;
default: goto yy25;
}
yy56:
yych = *++YYCURSOR;
switch (yych) {
case 0x82:
case 0x87:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x95:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0xA4:
case 0xA6:
case 0xA8:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB9:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy57:
yych = *++YYCURSOR;
switch (yych) {
case 0x82:
case 0x83:
case 0x84:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC: goto yy29;
default: goto yy25;
}
yy58:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBE: goto yy29;
default: goto yy25;
}
yy59:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x99:
case 0x9B:
case 0x9D:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD: goto yy29;
default: goto yy25;
}
yy60:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy61:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A: goto yy29;
default: goto yy25;
}
yy62:
yych = *++YYCURSOR;
switch (yych) {
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
yy63:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
case 0x88:
case 0x89:
case 0x8A:
case 0x8B:
case 0x8C:
case 0x8D:
case 0x8E:
case 0x8F:
case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
case 0x98:
case 0x99:
case 0x9A:
case 0x9B:
case 0x9C:
case 0x9D:
case 0x9E:
case 0x9F:
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB: goto yy29;
default: goto yy25;
}
yy64:
yych = *++YYCURSOR;
switch (yych) {
case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85: goto yy29;
default: goto yy25;
}
yy65:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
case 0xA4:
case 0xA5:
case 0xA6:
case 0xA7:
case 0xA8:
case 0xA9:
case 0xAA:
case 0xAB:
case 0xAC:
case 0xAD:
case 0xAE:
case 0xAF:
case 0xB0:
case 0xB1:
case 0xB2:
case 0xB3:
case 0xB4:
case 0xB5:
case 0xB6:
case 0xB7:
case 0xB8:
case 0xB9:
case 0xBA:
case 0xBB:
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF: goto yy29;
default: goto yy25;
}
}
#line 14 "unicode_group_L_.8--encoding-policy(ignore).re"
}
static const unsigned int chars_L_ [] = {0x41,0x5a, 0x61,0x7a, 0xaa,0xaa, 0xb5,0xb5, 0xba,0xba, 0xc0,0xd6, 0xd8,0xf6, 0xf8,0x1ba, 0x1bc,0x1bf, 0x1c4,0x293, 0x295,0x2af, 0x370,0x373, 0x376,0x377, 0x37b,0x37d, 0x386,0x386, 0x388,0x38a, 0x38c,0x38c, 0x38e,0x3a1, 0x3a3,0x3f5, 0x3f7,0x481, 0x48a,0x527, 0x531,0x556, 0x561,0x587, 0x10a0,0x10c5, 0x1d00,0x1d2b, 0x1d62,0x1d77, 0x1d79,0x1d9a, 0x1e00,0x1f15, 0x1f18,0x1f1d, 0x1f20,0x1f45, 0x1f48,0x1f4d, 0x1f50,0x1f57, 0x1f59,0x1f59, 0x1f5b,0x1f5b, 0x1f5d,0x1f5d, 0x1f5f,0x1f7d, 0x1f80,0x1fb4, 0x1fb6,0x1fbc, 0x1fbe,0x1fbe, 0x1fc2,0x1fc4, 0x1fc6,0x1fcc, 0x1fd0,0x1fd3, 0x1fd6,0x1fdb, 0x1fe0,0x1fec, 0x1ff2,0x1ff4, 0x1ff6,0x1ffc, 0x2102,0x2102, 0x2107,0x2107, 0x210a,0x2113, 0x2115,0x2115, 0x2119,0x211d, 0x2124,0x2124, 0x2126,0x2126, 0x2128,0x2128, 0x212a,0x212d, 0x212f,0x2134, 0x2139,0x2139, 0x213c,0x213f, 0x2145,0x2149, 0x214e,0x214e, 0x2183,0x2184, 0x2c00,0x2c2e, 0x2c30,0x2c5e, 0x2c60,0x2c7c, 0x2c7e,0x2ce4, 0x2ceb,0x2cee, 0x2d00,0x2d25, 0xa640,0xa66d, 0xa680,0xa697, 0xa722,0xa76f, 0xa771,0xa787, 0xa78b,0xa78e, 0xa790,0xa791, 0xa7a0,0xa7a9, 0xa7fa,0xa7fa, 0xfb00,0xfb06, 0xfb13,0xfb17, 0xff21,0xff3a, 0xff41,0xff5a, 0x10400,0x1044f, 0x1d400,0x1d454, 0x1d456,0x1d49c, 0x1d49e,0x1d49f, 0x1d4a2,0x1d4a2, 0x1d4a5,0x1d4a6, 0x1d4a9,0x1d4ac, 0x1d4ae,0x1d4b9, 0x1d4bb,0x1d4bb, 0x1d4bd,0x1d4c3, 0x1d4c5,0x1d505, 0x1d507,0x1d50a, 0x1d50d,0x1d514, 0x1d516,0x1d51c, 0x1d51e,0x1d539, 0x1d53b,0x1d53e, 0x1d540,0x1d544, 0x1d546,0x1d546, 0x1d54a,0x1d550, 0x1d552,0x1d6a5, 0x1d6a8,0x1d6c0, 0x1d6c2,0x1d6da, 0x1d6dc,0x1d6fa, 0x1d6fc,0x1d714, 0x1d716,0x1d734, 0x1d736,0x1d74e, 0x1d750,0x1d76e, 0x1d770,0x1d788, 0x1d78a,0x1d7a8, 0x1d7aa,0x1d7c2, 0x1d7c4,0x1d7cb, 0x0,0x0};
static unsigned int encode_utf8 (const unsigned int * ranges, unsigned int ranges_count, unsigned char * s)
{
unsigned char * const s_start = s;
for (unsigned int i = 0; i < ranges_count - 2; i += 2)
for (unsigned int j = ranges[i]; j <= ranges[i + 1]; ++j)
s += re2c::utf8::rune_to_bytes (s, j);
re2c::utf8::rune_to_bytes (s, ranges[ranges_count - 1]);
return s - s_start + 1;
}
int main ()
{
YYCTYPE * buffer_L_ = new YYCTYPE [12908];
unsigned int buffer_len = encode_utf8 (chars_L_, sizeof (chars_L_) / sizeof (unsigned int), buffer_L_);
if (!scan (reinterpret_cast<const YYCTYPE *> (buffer_L_), reinterpret_cast<const YYCTYPE *> (buffer_L_ + buffer_len)))
printf("test 'L_' failed\n");
delete [] buffer_L_;
return 0;
}
|
[
"[email protected]"
] | |
ea1a5df073e09807fd9710460dd1eb04e9530f2b
|
76eda7985e7dd961a56e2eadf0a47f157f512d01
|
/hw3/hw3.c
|
225dd58be2702e9e370848b769a816133e4c4079
|
[] |
no_license
|
HCrane/ESP_Aufgaben
|
e042481c7c65c0fde42eb28dc64044c5af6f23ac
|
38c8ebc267e3b937a4e4e75a9e40773105242640
|
refs/heads/master
| 2021-03-27T10:31:57.326112 | 2016-11-14T21:01:08 | 2016-11-14T21:01:08 | 73,069,542 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 970 |
c
|
//------------------------------------------------------------------------------
// hw3.c
//
// Overflow Errors
//
// Group: 3 study assistant Lorenz Kofler
//
// Authors: Emanuel Moser 1430683
//
// Latest Changes: 07.11.2016 (by Emanuel Moser)
//------------------------------------------------------------------------------
//
#include <limits.h>
#include <stdio.h>
// signed int = int;
// because of history
int main()
{
int matr = 1430683;
int i = 0;
int overf = 0;
//startet teil1 mit *
for (i = 2; i < 10; (i++))
{
//checkt auf overflowerror
if ((INT_MAX / i) < matr)
{
printf("%10d * %d\n", matr,i);
printf("An overflow has occurred!\n");
overf = 1;
break;
}
else
{
printf("%10d * %d\n", matr,i);
matr = matr * i;
}
}
//divisionsausgabe
for (i = 2; i < 10; (i++))
{
if (!overf)
{
printf("%10d : %d\n", matr,i);
matr = matr / i;
}
}
return 0;
}
|
[
"[email protected]"
] | |
f69a5f227021656c158b8a83bd592c91c992ef4b
|
f1652f78986dbf1bd63009a7cf65b1832615f1c3
|
/ternary.c
|
cdeb3e9fedbf6635b702fe142c96b72f68aa63a0
|
[] |
no_license
|
asr1410/C
|
e3e5cb9ec85fa2d2b200c7a133fba2d99bea4401
|
7f930b556590f83f80b7c60032b316ce04ddf0cf
|
refs/heads/master
| 2023-06-21T04:49:05.537144 | 2021-08-04T13:45:59 | 2021-08-04T13:45:59 | 324,993,330 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 367 |
c
|
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int n;
int i = 1;
scanf("%d", &n);
// printf("%c", i == n - 1 ? '\n' : ' ');
if (i == n - 1)
{
printf("\n");
printf("hello");
}
else
{
printf(" ");
printf("hello");
}
}
|
[
"[email protected]"
] | |
4fbd93b31319737f63f122578c8d1d898930c2f1
|
30dc0046561385a66ba44c5642dde30ac0382a71
|
/cstring/ft_split.c
|
9faee184340ddc0a0581cd9af7e02e617c036c6b
|
[] |
no_license
|
dimashipicyn/libft
|
c8a1876e73073656b359fda14575f3813987aab1
|
81af3d298c53dcae8344f51ec086bc9e6ad8a392
|
refs/heads/main
| 2023-08-24T02:46:48.936101 | 2021-11-02T15:00:00 | 2021-11-02T15:00:00 | 364,843,964 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,062 |
c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_split.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lbespin <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/03 13:09:52 by lbespin #+# #+# */
/* Updated: 2020/11/06 16:44:08 by lbespin ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char **ft_split(char const *s, char c)
{
char buf[2];
buf[0] = c;
buf[1] = '\0';
if (!s)
return (0);
return (ft_split_reg((char *)s, buf));
}
|
[
"[email protected]"
] | |
4b22bdc071434776813574f6b8d2e524515c59bb
|
60ca11e36211ad18d1995370dacb9bf536b7da68
|
/libft/ft_strsub.c
|
b1bb9a415bbaf4b67219b5e1a727787e8ee294cd
|
[] |
no_license
|
Gwba56/get_next_line
|
729252d6a4941b41973461ea34453d00f61ad88e
|
1360d710179acc80188bd04c3b3282e07a0b34fd
|
refs/heads/master
| 2022-02-26T01:40:23.540024 | 2019-10-31T11:43:36 | 2019-10-31T11:43:36 | 218,752,049 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,105 |
c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strsub.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbarach- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/25 19:27:44 by gbarach- #+# #+# */
/* Updated: 2018/12/12 15:00:21 by gbarach- ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strsub(char const *s, unsigned int start, size_t len)
{
char *str;
str = ft_strnew(len);
if (str == NULL || !s)
return (NULL);
ft_strncpy(str, &s[start], len);
return (str);
}
|
[
"[email protected]"
] | |
04cb15d9d5f0d6cf1b3fab837c0fcc81f1a417b3
|
b53c2594642fda642d20016238b9e9a952ab314f
|
/framework/targetlibs/nrf5x_12/components/libraries/log/nrf_log_backend.h
|
4b2987a31a8182f6e5568e15497e3dd187abfa23
|
[
"MPL-2.0",
"ISC",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause"
] |
permissive
|
bnyf/Haiway
|
32862c6cb70b8ab190b0f679f14345789b795c08
|
7f00995201c8ffde058b4323797b7866d9422ca9
|
refs/heads/master
| 2023-02-02T21:51:07.297628 | 2020-01-12T12:36:00 | 2020-01-12T12:36:00 | 164,182,636 | 0 | 0 |
MIT
| 2019-01-05T04:45:23 | 2019-01-05T04:45:23 | null |
UTF-8
|
C
| false | false | 3,370 |
h
|
/**
* Copyright (c) 2016 - 2017, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* Nordic Semiconductor ASA integrated circuit.
*
* 5. Any software provided in binary form under this license must not be reverse
* engineered, decompiled, modified and/or disassembled.
*
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/**@file
* @addtogroup nrf_log Logger module
* @ingroup app_common
*
* @defgroup nrf_log_backend Backend of nrf_log
* @{
* @ingroup nrf_log
* @brief The nrf_log backend interface.
*/
#ifndef NRF_LOG_BACKEND_H__
#define NRF_LOG_BACKEND_H__
#include "nrf_log_ctrl.h"
#include "sdk_errors.h"
#include <stdbool.h>
/**
* @brief Function for initializing the logger backend.
*
* param blocking Set true if handler functions should block until completion.
*
* @return NRF_SUCCESS after successful initialization, error code otherwise.
*/
ret_code_t nrf_log_backend_init(bool blocking);
/**
* @brief Function for returning a pointer to a function for handling standard
* log entries (@ref NRF_LOG_ERROR, etc.).
*
* @return Pointer to a handler.
*/
nrf_log_std_handler_t nrf_log_backend_std_handler_get(void);
/**
* @brief Function for returning a pointer to a function for handling
* hexdumps (@ref NRF_LOG_HEXDUMP_ERROR, etc.).
*
* @return Pointer to a handler.
*/
nrf_log_hexdump_handler_t nrf_log_backend_hexdump_handler_get(void);
/**
* @brief Function for blocking reading of a byte from the backend.
*
* @return Byte.
*/
uint8_t nrf_log_backend_getchar(void);
#endif // NRF_LOG_BACKEND_H__
/** @} */
|
[
"[email protected]"
] | |
426ef4a4ecdeda85b090ca3b3a7a51315ebd4e46
|
06a4438b52481db8dd6af95440e46d8cbfcd7b46
|
/Tek1/B2 - Elementary programming in C (Part I)/Lemin/src/init_cell_list.c
|
55dc2c904d35940f1d6aa390f866e7c03441f9ba
|
[] |
no_license
|
josepvidalcanet/Epitech
|
f5bf3529c69fca9f10cb17f58cd82bcc076a8515
|
2222a7e5b433bcd847e1978b0efd813043fe01ec
|
refs/heads/master
| 2023-08-16T12:49:28.859792 | 2021-10-01T14:42:44 | 2021-10-01T14:42:44 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 321 |
c
|
/*
** EPITECH PROJECT, 2020
** CPE_lemin_2019
** File description:
** init_cell_list
*/
#include "load_graph.h"
cell_t *init_cell_list(char *name, cell_t *prev)
{
cell_t *cell = malloc(sizeof(cell_t));
cell->name = name;
cell->nb_link = 1;
cell->next = NULL;
cell->prev = prev;
return (cell);
}
|
[
"[email protected]"
] | |
4aba8d45703db0d985e4f5858183b5eead3659ac
|
51fea12ca9f66ddf27870d00d351776fa4e21bfd
|
/app/src/main/cpp/include/input.h-labels.h
|
d3959164b316687303ccb3c2ac9e9321ecc5fd70
|
[] |
no_license
|
SnowCat6/KernelGesture
|
2dbfa8a2185761b1a1b0eff01b9a301ca39ad7c7
|
332ae423de30ec118f56d9b4f525227b1fa456e6
|
refs/heads/master
| 2021-01-22T11:04:58.781640 | 2017-10-23T12:15:40 | 2017-10-23T12:15:40 | 92,669,739 | 9 | 2 | null | null | null | null |
UTF-8
|
C
| false | false | 15,402 |
h
|
static struct label input_prop_labels[] = {
LABEL(INPUT_PROP_POINTER),
LABEL(INPUT_PROP_DIRECT),
LABEL(INPUT_PROP_BUTTONPAD),
LABEL(INPUT_PROP_SEMI_MT),
LABEL(INPUT_PROP_TOPBUTTONPAD),
LABEL(INPUT_PROP_MAX),
LABEL_END,
};
static struct label ev_labels[] = {
LABEL(EV_SYN),
LABEL(EV_KEY),
LABEL(EV_REL),
LABEL(EV_ABS),
LABEL(EV_MSC),
LABEL(EV_SW),
LABEL(EV_LED),
LABEL(EV_SND),
LABEL(EV_REP),
LABEL(EV_FF),
LABEL(EV_PWR),
LABEL(EV_FF_STATUS),
LABEL(EV_MAX),
LABEL_END,
};
static struct label syn_labels[] = {
LABEL(SYN_REPORT),
LABEL(SYN_CONFIG),
LABEL(SYN_MT_REPORT),
LABEL(SYN_DROPPED),
LABEL(SYN_MAX),
LABEL_END,
};
static struct label key_labels[] = {
LABEL(KEY_RESERVED),
LABEL(KEY_ESC),
LABEL(KEY_1),
LABEL(KEY_2),
LABEL(KEY_3),
LABEL(KEY_4),
LABEL(KEY_5),
LABEL(KEY_6),
LABEL(KEY_7),
LABEL(KEY_8),
LABEL(KEY_9),
LABEL(KEY_0),
LABEL(KEY_MINUS),
LABEL(KEY_EQUAL),
LABEL(KEY_BACKSPACE),
LABEL(KEY_TAB),
LABEL(KEY_Q),
LABEL(KEY_W),
LABEL(KEY_E),
LABEL(KEY_R),
LABEL(KEY_T),
LABEL(KEY_Y),
LABEL(KEY_U),
LABEL(KEY_I),
LABEL(KEY_O),
LABEL(KEY_P),
LABEL(KEY_LEFTBRACE),
LABEL(KEY_RIGHTBRACE),
LABEL(KEY_ENTER),
LABEL(KEY_LEFTCTRL),
LABEL(KEY_A),
LABEL(KEY_S),
LABEL(KEY_D),
LABEL(KEY_F),
LABEL(KEY_G),
LABEL(KEY_H),
LABEL(KEY_J),
LABEL(KEY_K),
LABEL(KEY_L),
LABEL(KEY_SEMICOLON),
LABEL(KEY_APOSTROPHE),
LABEL(KEY_GRAVE),
LABEL(KEY_LEFTSHIFT),
LABEL(KEY_BACKSLASH),
LABEL(KEY_Z),
LABEL(KEY_X),
LABEL(KEY_C),
LABEL(KEY_V),
LABEL(KEY_B),
LABEL(KEY_N),
LABEL(KEY_M),
LABEL(KEY_COMMA),
LABEL(KEY_DOT),
LABEL(KEY_SLASH),
LABEL(KEY_RIGHTSHIFT),
LABEL(KEY_KPASTERISK),
LABEL(KEY_LEFTALT),
LABEL(KEY_SPACE),
LABEL(KEY_CAPSLOCK),
LABEL(KEY_F1),
LABEL(KEY_F2),
LABEL(KEY_F3),
LABEL(KEY_F4),
LABEL(KEY_F5),
LABEL(KEY_F6),
LABEL(KEY_F7),
LABEL(KEY_F8),
LABEL(KEY_F9),
LABEL(KEY_F10),
LABEL(KEY_NUMLOCK),
LABEL(KEY_SCROLLLOCK),
LABEL(KEY_KP7),
LABEL(KEY_KP8),
LABEL(KEY_KP9),
LABEL(KEY_KPMINUS),
LABEL(KEY_KP4),
LABEL(KEY_KP5),
LABEL(KEY_KP6),
LABEL(KEY_KPPLUS),
LABEL(KEY_KP1),
LABEL(KEY_KP2),
LABEL(KEY_KP3),
LABEL(KEY_KP0),
LABEL(KEY_KPDOT),
LABEL(KEY_ZENKAKUHANKAKU),
LABEL(KEY_102ND),
LABEL(KEY_F11),
LABEL(KEY_F12),
LABEL(KEY_RO),
LABEL(KEY_KATAKANA),
LABEL(KEY_HIRAGANA),
LABEL(KEY_HENKAN),
LABEL(KEY_KATAKANAHIRAGANA),
LABEL(KEY_MUHENKAN),
LABEL(KEY_KPJPCOMMA),
LABEL(KEY_KPENTER),
LABEL(KEY_RIGHTCTRL),
LABEL(KEY_KPSLASH),
LABEL(KEY_SYSRQ),
LABEL(KEY_RIGHTALT),
LABEL(KEY_LINEFEED),
LABEL(KEY_HOME),
LABEL(KEY_UP),
LABEL(KEY_PAGEUP),
LABEL(KEY_LEFT),
LABEL(KEY_RIGHT),
LABEL(KEY_END),
LABEL(KEY_DOWN),
LABEL(KEY_PAGEDOWN),
LABEL(KEY_INSERT),
LABEL(KEY_DELETE),
LABEL(KEY_MACRO),
LABEL(KEY_MUTE),
LABEL(KEY_VOLUMEDOWN),
LABEL(KEY_VOLUMEUP),
LABEL(KEY_POWER),
LABEL(KEY_KPEQUAL),
LABEL(KEY_KPPLUSMINUS),
LABEL(KEY_PAUSE),
LABEL(KEY_SCALE),
LABEL(KEY_KPCOMMA),
LABEL(KEY_HANGEUL),
LABEL(KEY_HANJA),
LABEL(KEY_YEN),
LABEL(KEY_LEFTMETA),
LABEL(KEY_RIGHTMETA),
LABEL(KEY_COMPOSE),
LABEL(KEY_STOP),
LABEL(KEY_AGAIN),
LABEL(KEY_PROPS),
LABEL(KEY_UNDO),
LABEL(KEY_FRONT),
LABEL(KEY_COPY),
LABEL(KEY_OPEN),
LABEL(KEY_PASTE),
LABEL(KEY_FIND),
LABEL(KEY_CUT),
LABEL(KEY_HELP),
LABEL(KEY_MENU),
LABEL(KEY_CALC),
LABEL(KEY_SETUP),
LABEL(KEY_SLEEP),
LABEL(KEY_WAKEUP),
LABEL(KEY_FILE),
LABEL(KEY_SENDFILE),
LABEL(KEY_DELETEFILE),
LABEL(KEY_XFER),
LABEL(KEY_PROG1),
LABEL(KEY_PROG2),
LABEL(KEY_WWW),
LABEL(KEY_MSDOS),
LABEL(KEY_COFFEE),
LABEL(KEY_CYCLEWINDOWS),
LABEL(KEY_MAIL),
LABEL(KEY_BOOKMARKS),
LABEL(KEY_COMPUTER),
LABEL(KEY_BACK),
LABEL(KEY_FORWARD),
LABEL(KEY_CLOSECD),
LABEL(KEY_EJECTCD),
LABEL(KEY_EJECTCLOSECD),
LABEL(KEY_NEXTSONG),
LABEL(KEY_PLAYPAUSE),
LABEL(KEY_PREVIOUSSONG),
LABEL(KEY_STOPCD),
LABEL(KEY_RECORD),
LABEL(KEY_REWIND),
LABEL(KEY_PHONE),
LABEL(KEY_ISO),
LABEL(KEY_CONFIG),
LABEL(KEY_HOMEPAGE),
LABEL(KEY_REFRESH),
LABEL(KEY_EXIT),
LABEL(KEY_MOVE),
LABEL(KEY_EDIT),
LABEL(KEY_SCROLLUP),
LABEL(KEY_SCROLLDOWN),
LABEL(KEY_KPLEFTPAREN),
LABEL(KEY_KPRIGHTPAREN),
LABEL(KEY_NEW),
LABEL(KEY_REDO),
LABEL(KEY_F13),
LABEL(KEY_F14),
LABEL(KEY_F15),
LABEL(KEY_F16),
LABEL(KEY_F17),
LABEL(KEY_F18),
LABEL(KEY_F19),
LABEL(KEY_F20),
LABEL(KEY_F21),
LABEL(KEY_F22),
LABEL(KEY_F23),
LABEL(KEY_F24),
LABEL(KEY_PLAYCD),
LABEL(KEY_PAUSECD),
LABEL(KEY_PROG3),
LABEL(KEY_PROG4),
LABEL(KEY_DASHBOARD),
LABEL(KEY_SUSPEND),
LABEL(KEY_CLOSE),
LABEL(KEY_PLAY),
LABEL(KEY_FASTFORWARD),
LABEL(KEY_BASSBOOST),
LABEL(KEY_PRINT),
LABEL(KEY_HP),
LABEL(KEY_CAMERA),
LABEL(KEY_SOUND),
LABEL(KEY_QUESTION),
LABEL(KEY_EMAIL),
LABEL(KEY_CHAT),
LABEL(KEY_SEARCH),
LABEL(KEY_CONNECT),
LABEL(KEY_FINANCE),
LABEL(KEY_SPORT),
LABEL(KEY_SHOP),
LABEL(KEY_ALTERASE),
LABEL(KEY_CANCEL),
LABEL(KEY_BRIGHTNESSDOWN),
LABEL(KEY_BRIGHTNESSUP),
LABEL(KEY_MEDIA),
LABEL(KEY_SWITCHVIDEOMODE),
LABEL(KEY_KBDILLUMTOGGLE),
LABEL(KEY_KBDILLUMDOWN),
LABEL(KEY_KBDILLUMUP),
LABEL(KEY_SEND),
LABEL(KEY_REPLY),
LABEL(KEY_FORWARDMAIL),
LABEL(KEY_SAVE),
LABEL(KEY_DOCUMENTS),
LABEL(KEY_BATTERY),
LABEL(KEY_BLUETOOTH),
LABEL(KEY_WLAN),
LABEL(KEY_UWB),
LABEL(KEY_UNKNOWN),
LABEL(KEY_VIDEO_NEXT),
LABEL(KEY_VIDEO_PREV),
LABEL(KEY_BRIGHTNESS_CYCLE),
LABEL(KEY_BRIGHTNESS_AUTO),
LABEL(KEY_DISPLAY_OFF),
LABEL(KEY_WWAN),
LABEL(KEY_RFKILL),
LABEL(KEY_MICMUTE),
LABEL(BTN_MISC),
LABEL(BTN_0),
LABEL(BTN_1),
LABEL(BTN_2),
LABEL(BTN_3),
LABEL(BTN_4),
LABEL(BTN_5),
LABEL(BTN_6),
LABEL(BTN_7),
LABEL(BTN_8),
LABEL(BTN_9),
LABEL(BTN_MOUSE),
LABEL(BTN_LEFT),
LABEL(BTN_RIGHT),
LABEL(BTN_MIDDLE),
LABEL(BTN_SIDE),
LABEL(BTN_EXTRA),
LABEL(BTN_FORWARD),
LABEL(BTN_BACK),
LABEL(BTN_TASK),
LABEL(BTN_JOYSTICK),
LABEL(BTN_TRIGGER),
LABEL(BTN_THUMB),
LABEL(BTN_THUMB2),
LABEL(BTN_TOP),
LABEL(BTN_TOP2),
LABEL(BTN_PINKIE),
LABEL(BTN_BASE),
LABEL(BTN_BASE2),
LABEL(BTN_BASE3),
LABEL(BTN_BASE4),
LABEL(BTN_BASE5),
LABEL(BTN_BASE6),
LABEL(BTN_DEAD),
LABEL(BTN_GAMEPAD),
LABEL(BTN_SOUTH),
LABEL(BTN_EAST),
LABEL(BTN_C),
LABEL(BTN_NORTH),
LABEL(BTN_WEST),
LABEL(BTN_Z),
LABEL(BTN_TL),
LABEL(BTN_TR),
LABEL(BTN_TL2),
LABEL(BTN_TR2),
LABEL(BTN_SELECT),
LABEL(BTN_START),
LABEL(BTN_MODE),
LABEL(BTN_THUMBL),
LABEL(BTN_THUMBR),
LABEL(BTN_DIGI),
LABEL(BTN_TOOL_PEN),
LABEL(BTN_TOOL_RUBBER),
LABEL(BTN_TOOL_BRUSH),
LABEL(BTN_TOOL_PENCIL),
LABEL(BTN_TOOL_AIRBRUSH),
LABEL(BTN_TOOL_FINGER),
LABEL(BTN_TOOL_MOUSE),
LABEL(BTN_TOOL_LENS),
LABEL(BTN_TOOL_QUINTTAP),
LABEL(BTN_TOUCH),
LABEL(BTN_STYLUS),
LABEL(BTN_STYLUS2),
LABEL(BTN_TOOL_DOUBLETAP),
LABEL(BTN_TOOL_TRIPLETAP),
LABEL(BTN_TOOL_QUADTAP),
LABEL(BTN_WHEEL),
LABEL(BTN_GEAR_DOWN),
LABEL(BTN_GEAR_UP),
LABEL(KEY_OK),
LABEL(KEY_SELECT),
LABEL(KEY_GOTO),
LABEL(KEY_CLEAR),
LABEL(KEY_POWER2),
LABEL(KEY_OPTION),
LABEL(KEY_INFO),
LABEL(KEY_TIME),
LABEL(KEY_VENDOR),
LABEL(KEY_ARCHIVE),
LABEL(KEY_PROGRAM),
LABEL(KEY_CHANNEL),
LABEL(KEY_FAVORITES),
LABEL(KEY_EPG),
LABEL(KEY_PVR),
LABEL(KEY_MHP),
LABEL(KEY_LANGUAGE),
LABEL(KEY_TITLE),
LABEL(KEY_SUBTITLE),
LABEL(KEY_ANGLE),
LABEL(KEY_ZOOM),
LABEL(KEY_MODE),
LABEL(KEY_KEYBOARD),
LABEL(KEY_SCREEN),
LABEL(KEY_PC),
LABEL(KEY_TV),
LABEL(KEY_TV2),
LABEL(KEY_VCR),
LABEL(KEY_VCR2),
LABEL(KEY_SAT),
LABEL(KEY_SAT2),
LABEL(KEY_CD),
LABEL(KEY_TAPE),
LABEL(KEY_RADIO),
LABEL(KEY_TUNER),
LABEL(KEY_PLAYER),
LABEL(KEY_TEXT),
LABEL(KEY_DVD),
LABEL(KEY_AUX),
LABEL(KEY_MP3),
LABEL(KEY_AUDIO),
LABEL(KEY_VIDEO),
LABEL(KEY_DIRECTORY),
LABEL(KEY_LIST),
LABEL(KEY_MEMO),
LABEL(KEY_CALENDAR),
LABEL(KEY_RED),
LABEL(KEY_GREEN),
LABEL(KEY_YELLOW),
LABEL(KEY_BLUE),
LABEL(KEY_CHANNELUP),
LABEL(KEY_CHANNELDOWN),
LABEL(KEY_FIRST),
LABEL(KEY_LAST),
LABEL(KEY_AB),
LABEL(KEY_NEXT),
LABEL(KEY_RESTART),
LABEL(KEY_SLOW),
LABEL(KEY_SHUFFLE),
LABEL(KEY_BREAK),
LABEL(KEY_PREVIOUS),
LABEL(KEY_DIGITS),
LABEL(KEY_TEEN),
LABEL(KEY_TWEN),
LABEL(KEY_VIDEOPHONE),
LABEL(KEY_GAMES),
LABEL(KEY_ZOOMIN),
LABEL(KEY_ZOOMOUT),
LABEL(KEY_ZOOMRESET),
LABEL(KEY_WORDPROCESSOR),
LABEL(KEY_EDITOR),
LABEL(KEY_SPREADSHEET),
LABEL(KEY_GRAPHICSEDITOR),
LABEL(KEY_PRESENTATION),
LABEL(KEY_DATABASE),
LABEL(KEY_NEWS),
LABEL(KEY_VOICEMAIL),
LABEL(KEY_ADDRESSBOOK),
LABEL(KEY_MESSENGER),
LABEL(KEY_DISPLAYTOGGLE),
LABEL(KEY_SPELLCHECK),
LABEL(KEY_LOGOFF),
LABEL(KEY_DOLLAR),
LABEL(KEY_EURO),
LABEL(KEY_FRAMEBACK),
LABEL(KEY_FRAMEFORWARD),
LABEL(KEY_CONTEXT_MENU),
LABEL(KEY_MEDIA_REPEAT),
LABEL(KEY_10CHANNELSUP),
LABEL(KEY_10CHANNELSDOWN),
LABEL(KEY_IMAGES),
LABEL(KEY_DEL_EOL),
LABEL(KEY_DEL_EOS),
LABEL(KEY_INS_LINE),
LABEL(KEY_DEL_LINE),
LABEL(KEY_FN),
LABEL(KEY_FN_ESC),
LABEL(KEY_FN_F1),
LABEL(KEY_FN_F2),
LABEL(KEY_FN_F3),
LABEL(KEY_FN_F4),
LABEL(KEY_FN_F5),
LABEL(KEY_FN_F6),
LABEL(KEY_FN_F7),
LABEL(KEY_FN_F8),
LABEL(KEY_FN_F9),
LABEL(KEY_FN_F10),
LABEL(KEY_FN_F11),
LABEL(KEY_FN_F12),
LABEL(KEY_FN_1),
LABEL(KEY_FN_2),
LABEL(KEY_FN_D),
LABEL(KEY_FN_E),
LABEL(KEY_FN_F),
LABEL(KEY_FN_S),
LABEL(KEY_FN_B),
LABEL(KEY_BRL_DOT1),
LABEL(KEY_BRL_DOT2),
LABEL(KEY_BRL_DOT3),
LABEL(KEY_BRL_DOT4),
LABEL(KEY_BRL_DOT5),
LABEL(KEY_BRL_DOT6),
LABEL(KEY_BRL_DOT7),
LABEL(KEY_BRL_DOT8),
LABEL(KEY_BRL_DOT9),
LABEL(KEY_BRL_DOT10),
LABEL(KEY_NUMERIC_0),
LABEL(KEY_NUMERIC_1),
LABEL(KEY_NUMERIC_2),
LABEL(KEY_NUMERIC_3),
LABEL(KEY_NUMERIC_4),
LABEL(KEY_NUMERIC_5),
LABEL(KEY_NUMERIC_6),
LABEL(KEY_NUMERIC_7),
LABEL(KEY_NUMERIC_8),
LABEL(KEY_NUMERIC_9),
LABEL(KEY_NUMERIC_STAR),
LABEL(KEY_NUMERIC_POUND),
LABEL(KEY_CAMERA_FOCUS),
LABEL(KEY_WPS_BUTTON),
LABEL(KEY_TOUCHPAD_TOGGLE),
LABEL(KEY_TOUCHPAD_ON),
LABEL(KEY_TOUCHPAD_OFF),
LABEL(KEY_CAMERA_ZOOMIN),
LABEL(KEY_CAMERA_ZOOMOUT),
LABEL(KEY_CAMERA_UP),
LABEL(KEY_CAMERA_DOWN),
LABEL(KEY_CAMERA_LEFT),
LABEL(KEY_CAMERA_RIGHT),
LABEL(BTN_TRIGGER_HAPPY1),
LABEL(BTN_TRIGGER_HAPPY2),
LABEL(BTN_TRIGGER_HAPPY3),
LABEL(BTN_TRIGGER_HAPPY4),
LABEL(BTN_TRIGGER_HAPPY5),
LABEL(BTN_TRIGGER_HAPPY6),
LABEL(BTN_TRIGGER_HAPPY7),
LABEL(BTN_TRIGGER_HAPPY8),
LABEL(BTN_TRIGGER_HAPPY9),
LABEL(BTN_TRIGGER_HAPPY10),
LABEL(BTN_TRIGGER_HAPPY11),
LABEL(BTN_TRIGGER_HAPPY12),
LABEL(BTN_TRIGGER_HAPPY13),
LABEL(BTN_TRIGGER_HAPPY14),
LABEL(BTN_TRIGGER_HAPPY15),
LABEL(BTN_TRIGGER_HAPPY16),
LABEL(BTN_TRIGGER_HAPPY17),
LABEL(BTN_TRIGGER_HAPPY18),
LABEL(BTN_TRIGGER_HAPPY19),
LABEL(BTN_TRIGGER_HAPPY20),
LABEL(BTN_TRIGGER_HAPPY21),
LABEL(BTN_TRIGGER_HAPPY22),
LABEL(BTN_TRIGGER_HAPPY23),
LABEL(BTN_TRIGGER_HAPPY24),
LABEL(BTN_TRIGGER_HAPPY25),
LABEL(BTN_TRIGGER_HAPPY26),
LABEL(BTN_TRIGGER_HAPPY27),
LABEL(BTN_TRIGGER_HAPPY28),
LABEL(BTN_TRIGGER_HAPPY29),
LABEL(BTN_TRIGGER_HAPPY30),
LABEL(BTN_TRIGGER_HAPPY31),
LABEL(BTN_TRIGGER_HAPPY32),
LABEL(BTN_TRIGGER_HAPPY33),
LABEL(BTN_TRIGGER_HAPPY34),
LABEL(BTN_TRIGGER_HAPPY35),
LABEL(BTN_TRIGGER_HAPPY36),
LABEL(BTN_TRIGGER_HAPPY37),
LABEL(BTN_TRIGGER_HAPPY38),
LABEL(BTN_TRIGGER_HAPPY39),
LABEL(BTN_TRIGGER_HAPPY40),
LABEL(KEY_MAX),
LABEL_END,
};
static struct label rel_labels[] = {
LABEL(REL_X),
LABEL(REL_Y),
LABEL(REL_Z),
LABEL(REL_RX),
LABEL(REL_RY),
LABEL(REL_RZ),
LABEL(REL_HWHEEL),
LABEL(REL_DIAL),
LABEL(REL_WHEEL),
LABEL(REL_MISC),
LABEL(REL_MAX),
LABEL_END,
};
static struct label abs_labels[] = {
LABEL(ABS_X),
LABEL(ABS_Y),
LABEL(ABS_Z),
LABEL(ABS_RX),
LABEL(ABS_RY),
LABEL(ABS_RZ),
LABEL(ABS_THROTTLE),
LABEL(ABS_RUDDER),
LABEL(ABS_WHEEL),
LABEL(ABS_GAS),
LABEL(ABS_BRAKE),
LABEL(ABS_HAT0X),
LABEL(ABS_HAT0Y),
LABEL(ABS_HAT1X),
LABEL(ABS_HAT1Y),
LABEL(ABS_HAT2X),
LABEL(ABS_HAT2Y),
LABEL(ABS_HAT3X),
LABEL(ABS_HAT3Y),
LABEL(ABS_PRESSURE),
LABEL(ABS_DISTANCE),
LABEL(ABS_TILT_X),
LABEL(ABS_TILT_Y),
LABEL(ABS_TOOL_WIDTH),
LABEL(ABS_VOLUME),
LABEL(ABS_MISC),
LABEL(ABS_MT_SLOT),
LABEL(ABS_MT_TOUCH_MAJOR),
LABEL(ABS_MT_TOUCH_MINOR),
LABEL(ABS_MT_WIDTH_MAJOR),
LABEL(ABS_MT_WIDTH_MINOR),
LABEL(ABS_MT_ORIENTATION),
LABEL(ABS_MT_POSITION_X),
LABEL(ABS_MT_POSITION_Y),
LABEL(ABS_MT_TOOL_TYPE),
LABEL(ABS_MT_BLOB_ID),
LABEL(ABS_MT_TRACKING_ID),
LABEL(ABS_MT_PRESSURE),
LABEL(ABS_MT_DISTANCE),
LABEL(ABS_MT_TOOL_X),
LABEL(ABS_MT_TOOL_Y),
LABEL(ABS_MAX),
LABEL_END,
};
static struct label sw_labels[] = {
LABEL(SW_LID),
LABEL(SW_TABLET_MODE),
LABEL(SW_HEADPHONE_INSERT),
LABEL(SW_RFKILL_ALL),
LABEL(SW_MICROPHONE_INSERT),
LABEL(SW_DOCK),
LABEL(SW_LINEOUT_INSERT),
LABEL(SW_JACK_PHYSICAL_INSERT),
LABEL(SW_VIDEOOUT_INSERT),
LABEL(SW_CAMERA_LENS_COVER),
LABEL(SW_KEYPAD_SLIDE),
LABEL(SW_FRONT_PROXIMITY),
LABEL(SW_ROTATE_LOCK),
LABEL(SW_LINEIN_INSERT),
LABEL(SW_MUTE_DEVICE),
LABEL(SW_MAX),
LABEL_END,
};
static struct label msc_labels[] = {
LABEL(MSC_SERIAL),
LABEL(MSC_PULSELED),
LABEL(MSC_GESTURE),
LABEL(MSC_RAW),
LABEL(MSC_SCAN),
LABEL(MSC_TIMESTAMP),
LABEL(MSC_MAX),
LABEL_END,
};
static struct label led_labels[] = {
LABEL(LED_NUML),
LABEL(LED_CAPSL),
LABEL(LED_SCROLLL),
LABEL(LED_COMPOSE),
LABEL(LED_KANA),
LABEL(LED_SLEEP),
LABEL(LED_SUSPEND),
LABEL(LED_MUTE),
LABEL(LED_MISC),
LABEL(LED_MAIL),
LABEL(LED_CHARGING),
LABEL(LED_MAX),
LABEL_END,
};
static struct label rep_labels[] = {
LABEL(REP_DELAY),
LABEL(REP_PERIOD),
LABEL(REP_MAX),
LABEL_END,
};
static struct label snd_labels[] = {
LABEL(SND_CLICK),
LABEL(SND_BELL),
LABEL(SND_TONE),
LABEL(SND_MAX),
LABEL_END,
};
static struct label mt_tool_labels[] = {
LABEL_END,
};
static struct label ff_status_labels[] = {
LABEL_END,
};
static struct label ff_labels[] = {
LABEL_END,
};
|
[
"[email protected]"
] | |
f642e5af298aff47b630e36c8ea37d6a6f203d63
|
d9b7675fd0f90e0b5ca8c081a0c22bdb214c366e
|
/STM32Cube_FW_L0_V1.10.0/Projects/STM32L073RZ-Nucleo/Examples_LL/USART/USART_WakeUpFromStop/Src/main.c
|
ba9506e76e1e19f2aba108e58e91c78c3f851838
|
[
"BSD-2-Clause",
"MIT"
] |
permissive
|
voltirex/stm32cube-fw-l0-v110x
|
d546761ccac6e7664fe3a8eb5bb6c4054ea5f9e5
|
28c901d0c28bf22c0dbec70b340ffcd98356da57
|
refs/heads/master
| 2020-04-02T02:29:18.820876 | 2018-10-20T14:06:37 | 2018-10-20T14:06:37 | 153,907,920 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 16,977 |
c
|
/**
******************************************************************************
* @file Examples_LL/USART/USART_WakeUpFromStop/Src/main.c
* @author MCD Application Team
* @brief This example describes how to configure USART peripheral in Asynchronous mode
* for being able to wake from Stop mode when a character is received on RX line using
* the STM32L0xx USART LL API.
* Peripheral initialization done using LL unitary services functions.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/** @addtogroup STM32L0xx_LL_Examples
* @{
*/
/** @addtogroup USART_WakeUpFromStop
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/**
* @brief Variables used for charcater reception from PC Com port
*/
__IO uint8_t ubFinalCharReceived = 0;
__IO uint32_t ubReceivedChar;
/**
* @brief Text string printed on PC Com port to inform MCU will enter in Stop Mode
*/
uint8_t aTextInfo[] = "\r\nUSART Example : MCU will now enter in Stop mode.\n\rEnter any character for waking up MCU.\r\n";
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
void LED_Init(void);
void LED_On(void);
void LED_Off(void);
void LED_Blinking(uint32_t Period);
void LED_Blinking_3s(void);
void Configure_USART1(void);
void Configure_PWR(void);
void PrepareUSARTToStopMode(void);
void EnterStopMode(void);
void PrintInfo(void);
/* Private functions ---------------------------------------------------------*/
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
/* Configure the system clock to 16 MHz */
SystemClock_Config();
/* Initialize LED2 */
LED_Init();
/* Configure Power IP */
Configure_PWR();
/* Configure USART1 (USART IP configuration and related GPIO initialization) */
Configure_USART1();
/* Start main program loop :
- make LED blink during 3 sec
- Enter Stop mode (LED turned Off)
- Wait for any character received on USART RX line for waking up MCU
*/
while (ubFinalCharReceived == 0)
{
/* LED blinks during 3 seconds */
LED_Blinking_3s();
/* Send Text Information on USART TX to PC Com port */
PrintInfo();
/* Prepare USART for entering Stop Mode */
PrepareUSARTToStopMode();
/* Enter Stop mode */
EnterStopMode();
/* At this point, MCU just wakes up from Stop mode */
}
/* Infinite loop */
while (1)
{
}
}
/**
* @brief This function configures USART1.
* @note This function is used to :
* -1- Enable GPIO clock and configures the USART1 pins.
* -2- NVIC Configuration for USART1 interrupts.
* -3- Enable the USART1 peripheral clock and clock source.
* -4- Configure USART1 functional parameters.
* -5- Enable USART1.
* @note Peripheral configuration is minimal configuration from reset values.
* Thus, some useless LL unitary functions calls below are provided as
* commented examples - setting is default configuration from reset.
* @param None
* @retval None
*/
void Configure_USART1(void)
{
/* (1) Enable GPIO clock and configures the USART1 pins **********************/
/* (TX on PA.9, RX on PA.10) **********************/
/* Enable the peripheral clock of GPIOA */
LL_IOP_GRP1_EnableClock(LL_IOP_GRP1_PERIPH_GPIOA);
/* Configure TX Pin as : Alternate function, High Speed, PushPull, Pull up */
LL_GPIO_SetPinMode(GPIOA, LL_GPIO_PIN_9, LL_GPIO_MODE_ALTERNATE);
LL_GPIO_SetAFPin_8_15(GPIOA, LL_GPIO_PIN_9, LL_GPIO_AF_4);
LL_GPIO_SetPinSpeed(GPIOA, LL_GPIO_PIN_9, LL_GPIO_SPEED_FREQ_HIGH);
LL_GPIO_SetPinOutputType(GPIOA, LL_GPIO_PIN_9, LL_GPIO_OUTPUT_PUSHPULL);
LL_GPIO_SetPinPull(GPIOA, LL_GPIO_PIN_9, LL_GPIO_PULL_NO);
/* Configure RX Pin as : Alternate function, High Speed, PushPull, Pull up */
LL_GPIO_SetPinMode(GPIOA, LL_GPIO_PIN_10, LL_GPIO_MODE_ALTERNATE);
LL_GPIO_SetAFPin_8_15(GPIOA, LL_GPIO_PIN_10, LL_GPIO_AF_4);
LL_GPIO_SetPinSpeed(GPIOA, LL_GPIO_PIN_10, LL_GPIO_SPEED_FREQ_HIGH);
LL_GPIO_SetPinOutputType(GPIOA, LL_GPIO_PIN_10, LL_GPIO_OUTPUT_PUSHPULL);
LL_GPIO_SetPinPull(GPIOA, LL_GPIO_PIN_10, LL_GPIO_PULL_NO);
/* (2) NVIC Configuration for USART1 interrupts */
/* - Set priority for USART1_IRQn */
/* - Enable USART1_IRQn */
NVIC_SetPriority(USART1_IRQn, 0);
NVIC_EnableIRQ(USART1_IRQn);
/* (3) Enable the USART1 peripheral clock and clock source ****************/
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_USART1);
/* Set USART1 clock source as HSI */
LL_RCC_SetUSARTClockSource(LL_RCC_USART1_CLKSOURCE_HSI);
/* (4) Configure USART1 functional parameters ********************************/
/* Disable USART1 prior modifying configuration registers */
/* Note: Commented as corresponding to Reset value */
// LL_USART_Disable(USART1);
/* TX/RX direction */
LL_USART_SetTransferDirection(USART1, LL_USART_DIRECTION_TX_RX);
/* 8 data bit, 1 start bit, 1 stop bit, no parity */
LL_USART_ConfigCharacter(USART1, LL_USART_DATAWIDTH_8B, LL_USART_PARITY_NONE, LL_USART_STOPBITS_1);
/* No Hardware Flow control */
/* Reset value is LL_USART_HWCONTROL_NONE */
// LL_USART_SetHWFlowCtrl(USART1, LL_USART_HWCONTROL_NONE);
/* Oversampling by 16 */
/* Reset value is LL_USART_OVERSAMPLING_16 */
// LL_USART_SetOverSampling(USART1, LL_USART_OVERSAMPLING_16);
/* Set Baudrate to 9600 using HSI frequency set to HSI_VALUE */
LL_USART_SetBaudRate(USART1, HSI_VALUE, LL_USART_OVERSAMPLING_16, 9600);
/* Set the wake-up event type : specify wake-up on RXNE flag */
LL_USART_SetWKUPType(USART1, LL_USART_WAKEUP_ON_RXNE);
/* (5) Enable USART1 **********************************************************/
LL_USART_Enable(USART1);
/* Polling USART initialisation */
while((!(LL_USART_IsActiveFlag_TEACK(USART1))) || (!(LL_USART_IsActiveFlag_REACK(USART1))))
{
}
}
/**
* @brief Function to configure and initialize PWR IP.
* @param None
* @retval None
*/
void Configure_PWR(void)
{
/* Enable Power Clock */
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR);
/* Ensure that HSI is wake-up system clock */
LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI);
}
/**
* @brief Function to configure USART for being ready to enter Stop mode.
* @param None
* @retval None
*/
void PrepareUSARTToStopMode(void)
{
/* Empty RX Fifo before entering Stop mode (Otherwise, characters already present in FIFO
will lead to immediate wake up */
while (LL_USART_IsActiveFlag_RXNE(USART1))
{
/* Read Received character. RXNE flag is cleared by reading of RDR register */
ubReceivedChar = LL_USART_ReceiveData8(USART1);
}
/* Clear OVERRUN flag */
LL_USART_ClearFlag_ORE(USART1);
/* Make sure that no USART transfer is on-going */
while(LL_USART_IsActiveFlag_BUSY(USART1) == 1)
{
}
/* Make sure that USART is ready to receive */
while(LL_USART_IsActiveFlag_REACK(USART1) == 0)
{
}
/* About to enter stop mode: switch off LED */
LED_Off();
/* Configure USART1 transfer interrupts : */
/* Clear WUF flag and enable the UART Wake Up from stop mode Interrupt */
LL_USART_ClearFlag_WKUP(USART1);
LL_USART_EnableIT_WKUP(USART1);
/* Enable Wake Up From Stop */
LL_USART_EnableInStopMode(USART1);
}
/**
* @brief Function to enter in Stop mode.
* @param None
* @retval None
*/
void EnterStopMode(void)
{
/** Request to enter STOP mode
* Following procedure describe in STM32L0xx Reference Manual
* See PWR part, section Low-power modes, STOP mode
*/
/** Set the regulator to low power before setting MODE_STOP.
* If the regulator remains in "main mode", it consumes
* more power without providing any additional feature. */
LL_PWR_SetRegulModeLP(LL_PWR_REGU_LPMODES_LOW_POWER);
/* Set STOP mode when CPU enters deepsleep */
LL_PWR_SetPowerMode(LL_PWR_MODE_STOP);
/* Set SLEEPDEEP bit of Cortex System Control Register */
LL_LPM_EnableDeepSleep();
/* Request Wait For Interrupt */
__WFI();
}
/**
* @brief Send Txt information message on USART Tx line (to PC Com port).
* @param None
* @retval None
*/
void PrintInfo(void)
{
uint32_t index = 0;
/* Send characters one per one, until last char to be sent */
for (index = 0; index < sizeof(aTextInfo); index++)
{
/* Wait for TXE flag to be raised */
while (!LL_USART_IsActiveFlag_TXE(USART1))
{
}
/* Write character in Transmit Data register.
TXE flag is cleared by writing data in TDR register */
LL_USART_TransmitData8(USART1, aTextInfo[index]);
}
/* Wait for TC flag to be raised for last char */
while (!LL_USART_IsActiveFlag_TC(USART1))
{
}
}
/**
* @brief Initialize LED2.
* @param None
* @retval None
*/
void LED_Init(void)
{
/* Enable the LED2 Clock */
LED2_GPIO_CLK_ENABLE();
/* Configure IO in output push-pull mode to drive external LED2 */
LL_GPIO_SetPinMode(LED2_GPIO_PORT, LED2_PIN, LL_GPIO_MODE_OUTPUT);
/* Reset value is LL_GPIO_OUTPUT_PUSHPULL */
//LL_GPIO_SetPinOutputType(LED2_GPIO_PORT, LED2_PIN, LL_GPIO_OUTPUT_PUSHPULL);
/* Reset value is LL_GPIO_SPEED_FREQ_LOW */
//LL_GPIO_SetPinSpeed(LED2_GPIO_PORT, LED2_PIN, LL_GPIO_SPEED_FREQ_LOW);
/* Reset value is LL_GPIO_PULL_NO */
//LL_GPIO_SetPinPull(LED2_GPIO_PORT, LED2_PIN, LL_GPIO_PULL_NO);
}
/**
* @brief Turn-on LED2.
* @param None
* @retval None
*/
void LED_On(void)
{
/* Turn LED2 on */
LL_GPIO_SetOutputPin(LED2_GPIO_PORT, LED2_PIN);
}
/**
* @brief Turn-off LED2.
* @param None
* @retval None
*/
void LED_Off(void)
{
/* Turn LED2 off */
LL_GPIO_ResetOutputPin(LED2_GPIO_PORT, LED2_PIN);
}
/**
* @brief Set LED2 to Blinking mode for an infinite loop (toggle period based on value provided as input parameter).
* @param Period : Period of time (in ms) between each toggling of LED
* This parameter can be user defined values. Pre-defined values used in that example are :
* @arg LED_BLINK_FAST : Fast Blinking
* @arg LED_BLINK_SLOW : Slow Blinking
* @arg LED_BLINK_ERROR : Error specific Blinking
* @retval None
*/
void LED_Blinking(uint32_t Period)
{
/* Toggle IO in an infinite loop */
while (1)
{
LL_GPIO_TogglePin(LED2_GPIO_PORT, LED2_PIN);
LL_mDelay(Period);
}
}
/**
* @brief Set LED2 to Blinking mode during 3s.
* @param None
* @retval None
*/
void LED_Blinking_3s(void)
{
uint32_t index=0;
/* Toggle IO in during 3s (15*200ms) */
for(index = 0; index < 15; index++)
{
LL_GPIO_TogglePin(LED2_GPIO_PORT, LED2_PIN);
LL_mDelay(200);
}
}
/**
* @brief System Clock Configuration
* The system Clock is configured as follows :
* System Clock source = HSI RC
* SYSCLK(Hz) = 16000000
* HCLK(Hz) = 16000000
* AHB Prescaler = 1
* APB1 Prescaler = 1
* APB2 Prescaler = 1
* HSI Frequency(Hz) = 16000000
* Flash Latency(WS) = 0
* @param None
* @retval None
*/
void SystemClock_Config(void)
{
LL_RCC_PLL_Disable();
/* Set new latency */
LL_FLASH_SetLatency(LL_FLASH_LATENCY_0);
/* HSI configuration and activation */
LL_RCC_HSI_Enable();
LL_RCC_HSI_DisableDivider();
while(LL_RCC_HSI_IsReady() != 1)
{
};
/* Sysclk activation on the HSI */
LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_HSI);
while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSI)
{
};
/* Set AHB & APB1 & APB2 prescaler*/
LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
/* Disable MSI */
LL_RCC_MSI_Disable();
while(LL_RCC_MSI_IsReady() != 0)
{
};
/* Set systick to 1ms in using frequency set to 16MHz */
LL_Init1msTick(16000000);
/* Update CMSIS variable (which can be updated also through SystemCoreClockUpdate function) */
LL_SetSystemCoreClock(16000000);
}
/******************************************************************************/
/* IRQ HANDLER TREATMENT Functions */
/******************************************************************************/
/**
* @brief Function called from USART IRQ Handler when RXNE flag is set
* Function is in charge of reading character received on USART RX line.
* @param None
* @retval None
*/
void USART_CharReception_Callback(void)
{
/* Read Received character. RXNE flag is cleared by reading of RDR register */
ubReceivedChar = LL_USART_ReceiveData8(USART1);
/* Check if received value is corresponding to specific one : S or s */
if ((ubReceivedChar == 'S') || (ubReceivedChar == 's'))
{
/* Turn LED2 On : Expected character has been received */
LED_On();
/* End of program : set boolean for main loop exit */
ubFinalCharReceived = 1;
}
/* Echo received character on TX */
LL_USART_TransmitData8(USART1, ubReceivedChar);
}
/**
* @brief Function called in case of error detected in USART IT Handler
* @param None
* @retval None
*/
void Error_Callback(void)
{
/* Disable USART1_IRQn */
NVIC_DisableIRQ(USART1_IRQn);
/* Unexpected event : Set LED2 to Blinking mode to indicate error occurs */
LED_Blinking(LED_BLINK_ERROR);
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d", file, line) */
/* Infinite loop */
while (1)
{
}
}
#endif
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
[
"[email protected]"
] | |
927f28f38c69a64ab510552cd5ff3b442b4b53dc
|
8d499ee299c55674a97a94f607eabd481941c908
|
/src/task/schedule.c
|
43162f5a6f5e5aa5bbc556d551a11d2ee0ad969a
|
[
"MIT"
] |
permissive
|
Smilemon/xbook2
|
8bef00b328544880d3309b2ea6f2d24f7771155c
|
1450d228ce538ae8ad1a2f96e442b8da22e06950
|
refs/heads/master
| 2023-08-28T03:39:07.784017 | 2021-10-25T14:18:46 | 2021-10-25T14:18:46 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 4,749 |
c
|
#include <xbook/schedule.h>
#include <xbook/task.h>
#include <xbook/clock.h>
#include <assert.h>
#include <xbook/debug.h>
#include <arch/interrupt.h>
#include <arch/task.h>
#define DEBUG_SCHED 0
scheduler_t scheduler;
const uint8_t sched_priority_levels[TASK_PRIO_LEVEL_MAX] = {1, 0, 1, 2, 3};
/*
TODO:优化动态优先级:当一个优先级高的线程长期获得优运行时,可以适当调低优先级。
当一个低先级高的线程长期没获得运行时,可以适当调提高优先级。
当前采取的是高优先级执行固定时间后就降低,不太好,没体现优先级的优势。
*/
uint8_t sched_calc_base_priority(uint32_t level)
{
if (level >= TASK_PRIO_LEVEL_MAX)
level = 0;
return sched_priority_levels[level];
}
uint8_t sched_calc_new_priority(task_t *task, char adjustment)
{
char priority = task->priority;
assert((priority <= TASK_PRIORITY_REALTIME));
if ((priority < TASK_PRIORITY_REALTIME)) {
priority = priority + adjustment;
if (priority >= TASK_PRIORITY_REALTIME)
priority = TASK_PRIORITY_REALTIME - 1;
if (priority < task->static_priority)
priority = task->static_priority;
}
return (uint8_t) priority;
}
static task_t *sched_queue_fetch_first(sched_unit_t *su)
{
task_t *task;
/* 总是选择优先级比较高的队列 */
while (!su->priority_queue[su->dynamic_priority].length) {
--su->dynamic_priority;
}
sched_queue_t *queue = &su->priority_queue[su->dynamic_priority];
task = list_first_owner(&queue->list, task_t, list);
--queue->length;
--su->tasknr;
list_del_init(&task->list);
return task;
}
task_t *get_next_task(sched_unit_t *su)
{
task_t *task = su->cur;
switch (task->state) {
case TASK_RUNNING:
task->ticks = task->timeslice;
task->state = TASK_READY;
case TASK_READY:
// Non-real-time tasks are dynamically prioritized
if (task->priority < TASK_PRIORITY_REALTIME && task->priority > TASK_PRIORITY_LOW) {
task->priority--;
if ((task->priority <= TASK_PRIORITY_LOW)) {
task->priority = task->static_priority;
}
}
sched_queue_add_tail(su, task);
default:
break;
}
task_t *next;
next = sched_queue_fetch_first(su);
return next;
}
static void sched_set_next_task(sched_unit_t *su, task_t *next)
{
fpu_save(&su->cur->fpu);
su->cur = next;
task_activate_when_sched(su->cur);
fpu_restore(&next->fpu);
}
void schedule()
{
unsigned long flags;
interrupt_save_and_disable(flags);
sched_unit_t *su = sched_get_cur_unit();
task_t *next = get_next_task(su);
task_t *cur = su->cur;
#if DEBUG_SCHED == 1
dbgprint("sched: switch from %d to %d\n", cur->pid, next->pid);
#endif
sched_set_next_task(su, next);
thread_switch_to_next(cur, next);
interrupt_restore_state(flags);
}
void sched_print_queue(sched_unit_t *su)
{
if (su == NULL) {
keprint(PRINT_ERR "[sched]: unit null!\n");
return;
}
keprint(PRINT_INFO "[sched]: queue list:\n");
sched_queue_t *queue;
task_t *task;
int i;
unsigned long flags;
spin_lock_irqsave(&scheduler.lock, flags);
for (i = 0; i < TASK_PRIORITY_MAX_NR; i++) {
queue = &su->priority_queue[i];
if (queue->length > 0) {
keprint(PRINT_NOTICE "qeuue prio: %d\n", queue->priority);
list_for_each_owner (task, &queue->list, list) {
keprint(PRINT_INFO "task=%s pid=%d prio=%d ->", task->name, task->pid, task->priority);
}
keprint(PRINT_NOTICE "\n");
}
}
spin_unlock_irqrestore(&scheduler.lock, flags);
}
void init_sched_unit(sched_unit_t *su, cpuid_t cpuid, unsigned long flags)
{
su->cpuid = cpuid;
su->flags = flags;
su->cur = NULL;
su->idle = NULL;
spinlock_init(&su->lock);
su->tasknr = 0;
su->dynamic_priority = 0;
sched_queue_t *queue;
int i;
for (i = 0; i < TASK_PRIORITY_MAX_NR; i++) {
queue = &su->priority_queue[i];
queue->priority = i;
queue->length = 0;
list_init(&queue->list);
spinlock_init(&queue->lock);
}
}
void schedule_init()
{
scheduler.tasknr = 0;
spinlock_init(&scheduler.lock);
cpuid_t cpu_list[CPU_NR_MAX];
cpu_get_attached_list(cpu_list, &scheduler.cpunr);
int i;
for (i = 0; i < scheduler.cpunr; i++) {
init_sched_unit(&scheduler.sched_unit_table[i], cpu_list[i], 0);
}
}
|
[
"[email protected]"
] | |
b65f80991e37dc46781d324bfb94b996d88706fa
|
68451597f045921cbf6151521287f3dbcf276f5f
|
/P0/P0_E6/entrega/P0_E6/prodEscalar.c
|
9560f8ce7c70f76a930b1e674c1b524bd363b592
|
[] |
no_license
|
ZnGAlex/programacion_ii
|
552084e8379387010899749758e7046881071712
|
09b15ceeae5262008725344539838c3c5ec30e25
|
refs/heads/master
| 2020-03-08T09:22:32.042751 | 2018-04-09T16:00:21 | 2018-04-09T16:00:21 | 128,045,614 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 551 |
c
|
#include "matriz.h"
matriz* prodEscalar(float s, matriz *M) {
matriz *aux = 0;
int i;
if (M != 0) {
//aux = creaMatriz(M->columnas, M->filas); as filas e columnas están cambiadas de orde
aux = creaMatriz(M->filas, M->columnas);
for (i = 0; i < aux->filas * aux->columnas; i++) {
*(aux->datos + i) = *(M->datos + i) * s;
}
return aux;
} else {
printf("A matriz non existe!!\n");
// Retornamos a matriz para eliminar o aviso ao compilar
return aux;
}
}
|
[
"[email protected]"
] | |
40eec62e99574d96c7769681a05bc1f4ba3042c8
|
6eae4a418410728dc606fde2577c7c96372049be
|
/c/dist/src/arithmetic.c
|
8756ae19363ae2d2af7d6fcbaef2de594bd7efbb
|
[] |
no_license
|
angiebeasley/gradescope-autograder-examples
|
b2b2b3fa5b53a00c728deaa6bc92ddee9a8b9b46
|
abaf073af8a9aecda61527fb821bd44da597b327
|
refs/heads/master
| 2022-12-16T20:04:57.270703 | 2020-09-14T18:18:05 | 2020-09-14T18:18:05 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 351 |
c
|
/*
* A simple arithmetic library
*
*/
/* See arithmetic.h */
float add(float a, float b)
{
/* YOUR CODE GOES HERE */
/* Replace 0.0 with an appropriate value */
return 0.0;
}
/* See arithmetic.h */
float multiply(float a, float b)
{
/* YOUR CODE GOES HERE */
/* Replace 0.0 with an appropriate value */
return 0.0;
}
|
[
"[email protected]"
] | |
0cbcad8e6e835707d9b09d427e3aaf65665c7417
|
2cb62bb59e3c4a5c5f58bf037ec948b0e242d41f
|
/e1000e/e1000.h
|
fee348dd68c5fd28a1f54b506c17e3fe9b79988e
|
[] |
no_license
|
muvarov/odp-linux-mdev
|
2212dd8a3e57f4c255c9b418f68a3a8b37e98692
|
fa4f47ea925f9e28fe6c8c217d19d06a8cd392d3
|
refs/heads/master
| 2020-03-19T01:59:28.695258 | 2018-03-20T17:25:51 | 2018-03-20T17:25:51 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 18,298 |
h
|
/* Intel PRO/1000 Linux driver
* Copyright(c) 1999 - 2015 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
* Contact Information:
* Linux NICS <[email protected]>
* e1000-devel Mailing List <[email protected]>
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*/
/* Linux PRO/1000 Ethernet Driver main header file */
#ifndef _E1000_H_
#define _E1000_H_
#include <linux/bitops.h>
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/io.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/crc32.h>
#include <linux/if_vlan.h>
#include <linux/timecounter.h>
#include <linux/net_tstamp.h>
#include <linux/ptp_clock_kernel.h>
#include <linux/ptp_classify.h>
#include <linux/mii.h>
#include <linux/mdio.h>
#include <linux/pm_qos.h>
#include "hw.h"
struct e1000_info;
#define e_dbg(format, arg...) \
netdev_dbg(hw->adapter->netdev, format, ## arg)
#define e_err(format, arg...) \
netdev_err(adapter->netdev, format, ## arg)
#define e_info(format, arg...) \
netdev_info(adapter->netdev, format, ## arg)
#define e_warn(format, arg...) \
netdev_warn(adapter->netdev, format, ## arg)
#define e_notice(format, arg...) \
netdev_notice(adapter->netdev, format, ## arg)
/* Interrupt modes, as used by the IntMode parameter */
#define E1000E_INT_MODE_LEGACY 0
#define E1000E_INT_MODE_MSI 1
#define E1000E_INT_MODE_MSIX 2
/* Tx/Rx descriptor defines */
#define E1000_DEFAULT_TXD 256
#define E1000_MAX_TXD 4096
#define E1000_MIN_TXD 64
#define E1000_DEFAULT_RXD 256
#define E1000_MAX_RXD 4096
#define E1000_MIN_RXD 64
#define E1000_MIN_ITR_USECS 10 /* 100000 irq/sec */
#define E1000_MAX_ITR_USECS 10000 /* 100 irq/sec */
#define E1000_FC_PAUSE_TIME 0x0680 /* 858 usec */
/* How many Tx Descriptors do we need to call netif_wake_queue ? */
/* How many Rx Buffers do we bundle into one write to the hardware ? */
#define E1000_RX_BUFFER_WRITE 16 /* Must be power of 2 */
#define AUTO_ALL_MODES 0
#define E1000_EEPROM_APME 0x0400
#define E1000_MNG_VLAN_NONE (-1)
#define DEFAULT_JUMBO 9234
/* Time to wait before putting the device into D3 if there's no link (in ms). */
#define LINK_TIMEOUT 100
/* Count for polling __E1000_RESET condition every 10-20msec.
* Experimentation has shown the reset can take approximately 210msec.
*/
#define E1000_CHECK_RESET_COUNT 25
#define DEFAULT_RDTR 0
#define DEFAULT_RADV 8
#define BURST_RDTR 0x20
#define BURST_RADV 0x20
#define PCICFG_DESC_RING_STATUS 0xe4
#define FLUSH_DESC_REQUIRED 0x100
/* in the case of WTHRESH, it appears at least the 82571/2 hardware
* writes back 4 descriptors when WTHRESH=5, and 3 descriptors when
* WTHRESH=4, so a setting of 5 gives the most efficient bus
* utilization but to avoid possible Tx stalls, set it to 1
*/
#define E1000_TXDCTL_DMA_BURST_ENABLE \
(E1000_TXDCTL_GRAN | /* set descriptor granularity */ \
E1000_TXDCTL_COUNT_DESC | \
(1u << 16) | /* wthresh must be +1 more than desired */\
(1u << 8) | /* hthresh */ \
0x1f) /* pthresh */
#define E1000_RXDCTL_DMA_BURST_ENABLE \
(0x01000000 | /* set descriptor granularity */ \
(4u << 16) | /* set writeback threshold */ \
(4u << 8) | /* set prefetch threshold */ \
0x20) /* set hthresh */
#define E1000_TIDV_FPD BIT(31)
#define E1000_RDTR_FPD BIT(31)
enum e1000_boards {
board_82571,
board_82572,
board_82573,
board_82574,
board_82583,
board_80003es2lan,
board_ich8lan,
board_ich9lan,
board_ich10lan,
board_pchlan,
board_pch2lan,
board_pch_lpt,
board_pch_spt,
board_pch_cnp
};
struct e1000_ps_page {
struct page *page;
u64 dma; /* must be u64 - written to hw */
};
/* wrappers around a pointer to a socket buffer,
* so a DMA handle can be stored along with the buffer
*/
struct e1000_buffer {
dma_addr_t dma;
struct sk_buff *skb;
union {
/* Tx */
struct {
unsigned long time_stamp;
u16 length;
u16 next_to_watch;
unsigned int segs;
unsigned int bytecount;
u16 mapped_as_page;
};
/* Rx */
struct {
/* arrays of page information for packet split */
struct e1000_ps_page *ps_pages;
struct page *page;
};
};
};
struct e1000_ring {
struct e1000_adapter *adapter; /* back pointer to adapter */
void *desc; /* pointer to ring memory */
dma_addr_t dma; /* phys address of ring */
unsigned int size; /* length of ring in bytes */
unsigned int count; /* number of desc. in ring */
u16 next_to_use;
u16 next_to_clean;
void __iomem *head;
void __iomem *tail;
/* array of buffer information structs */
struct e1000_buffer *buffer_info;
char name[IFNAMSIZ + 5];
u32 ims_val;
u32 itr_val;
void __iomem *itr_register;
int set_itr;
struct sk_buff *rx_skb_top;
};
/* PHY register snapshot values */
struct e1000_phy_regs {
u16 bmcr; /* basic mode control register */
u16 bmsr; /* basic mode status register */
u16 advertise; /* auto-negotiation advertisement */
u16 lpa; /* link partner ability register */
u16 expansion; /* auto-negotiation expansion reg */
u16 ctrl1000; /* 1000BASE-T control register */
u16 stat1000; /* 1000BASE-T status register */
u16 estatus; /* extended status register */
};
/* board specific private data structure */
struct e1000_adapter {
struct timer_list watchdog_timer;
struct timer_list phy_info_timer;
struct timer_list blink_timer;
struct work_struct reset_task;
struct work_struct watchdog_task;
const struct e1000_info *ei;
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
u32 bd_number;
u32 rx_buffer_len;
u16 mng_vlan_id;
u16 link_speed;
u16 link_duplex;
u16 eeprom_vers;
/* track device up/down/testing state */
unsigned long state;
/* Interrupt Throttle Rate */
u32 itr;
u32 itr_setting;
u16 tx_itr;
u16 rx_itr;
/* Tx - one ring per active queue */
struct e1000_ring *tx_ring ____cacheline_aligned_in_smp;
u32 tx_fifo_limit;
struct napi_struct napi;
unsigned int uncorr_errors; /* uncorrectable ECC errors */
unsigned int corr_errors; /* correctable ECC errors */
unsigned int restart_queue;
u32 txd_cmd;
bool detect_tx_hung;
bool tx_hang_recheck;
u8 tx_timeout_factor;
u32 tx_int_delay;
u32 tx_abs_int_delay;
unsigned int total_tx_bytes;
unsigned int total_tx_packets;
unsigned int total_rx_bytes;
unsigned int total_rx_packets;
/* Tx stats */
u64 tpt_old;
u64 colc_old;
u32 gotc;
u64 gotc_old;
u32 tx_timeout_count;
u32 tx_fifo_head;
u32 tx_head_addr;
u32 tx_fifo_size;
u32 tx_dma_failed;
u32 tx_hwtstamp_timeouts;
u32 tx_hwtstamp_skipped;
/* Rx */
bool (*clean_rx)(struct e1000_ring *ring, int *work_done,
int work_to_do) ____cacheline_aligned_in_smp;
void (*alloc_rx_buf)(struct e1000_ring *ring, int cleaned_count,
gfp_t gfp);
struct e1000_ring *rx_ring;
u32 rx_int_delay;
u32 rx_abs_int_delay;
/* Rx stats */
u64 hw_csum_err;
u64 hw_csum_good;
u64 rx_hdr_split;
u32 gorc;
u64 gorc_old;
u32 alloc_rx_buff_failed;
u32 rx_dma_failed;
u32 rx_hwtstamp_cleared;
unsigned int rx_ps_pages;
u16 rx_ps_bsize0;
u32 max_frame_size;
u32 min_frame_size;
/* OS defined structs */
struct net_device *netdev;
struct pci_dev *pdev;
/* structs defined in e1000_hw.h */
struct e1000_hw hw;
spinlock_t stats64_lock; /* protects statistics counters */
struct e1000_hw_stats stats;
struct e1000_phy_info phy_info;
struct e1000_phy_stats phy_stats;
/* Snapshot of PHY registers */
struct e1000_phy_regs phy_regs;
struct e1000_ring test_tx_ring;
struct e1000_ring test_rx_ring;
u32 test_icr;
u32 msg_enable;
unsigned int num_vectors;
struct msix_entry *msix_entries;
int int_mode;
u32 eiac_mask;
u32 irq_mask;
u32 eeprom_wol;
u32 wol;
u32 pba;
u32 max_hw_frame_size;
bool fc_autoneg;
unsigned int flags;
unsigned int flags2;
struct work_struct downshift_task;
struct work_struct update_phy_task;
struct work_struct print_hang_task;
int phy_hang_count;
u16 tx_ring_count;
u16 rx_ring_count;
struct hwtstamp_config hwtstamp_config;
struct delayed_work systim_overflow_work;
struct sk_buff *tx_hwtstamp_skb;
unsigned long tx_hwtstamp_start;
struct work_struct tx_hwtstamp_work;
spinlock_t systim_lock; /* protects SYSTIML/H regsters */
struct cyclecounter cc;
struct timecounter tc;
struct ptp_clock *ptp_clock;
struct ptp_clock_info ptp_clock_info;
struct pm_qos_request pm_qos_req;
s32 ptp_delta;
u16 eee_advert;
};
struct e1000_info {
enum e1000_mac_type mac;
unsigned int flags;
unsigned int flags2;
u32 pba;
u32 max_hw_frame_size;
s32 (*get_variants)(struct e1000_adapter *);
const struct e1000_mac_operations *mac_ops;
const struct e1000_phy_operations *phy_ops;
const struct e1000_nvm_operations *nvm_ops;
};
s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca);
/* The system time is maintained by a 64-bit counter comprised of the 32-bit
* SYSTIMH and SYSTIML registers. How the counter increments (and therefore
* its resolution) is based on the contents of the TIMINCA register - it
* increments every incperiod (bits 31:24) clock ticks by incvalue (bits 23:0).
* For the best accuracy, the incperiod should be as small as possible. The
* incvalue is scaled by a factor as large as possible (while still fitting
* in bits 23:0) so that relatively small clock corrections can be made.
*
* As a result, a shift of INCVALUE_SHIFT_n is used to fit a value of
* INCVALUE_n into the TIMINCA register allowing 32+8+(24-INCVALUE_SHIFT_n)
* bits to count nanoseconds leaving the rest for fractional nonseconds.
*/
#define INCVALUE_96MHZ 125
#define INCVALUE_SHIFT_96MHZ 17
#define INCPERIOD_SHIFT_96MHZ 2
#define INCPERIOD_96MHZ (12 >> INCPERIOD_SHIFT_96MHZ)
#define INCVALUE_25MHZ 40
#define INCVALUE_SHIFT_25MHZ 18
#define INCPERIOD_25MHZ 1
#define INCVALUE_24MHZ 125
#define INCVALUE_SHIFT_24MHZ 14
#define INCPERIOD_24MHZ 3
#define INCVALUE_38400KHZ 26
#define INCVALUE_SHIFT_38400KHZ 19
#define INCPERIOD_38400KHZ 1
/* Another drawback of scaling the incvalue by a large factor is the
* 64-bit SYSTIM register overflows more quickly. This is dealt with
* by simply reading the clock before it overflows.
*
* Clock ns bits Overflows after
* ~~~~~~ ~~~~~~~ ~~~~~~~~~~~~~~~
* 96MHz 47-bit 2^(47-INCPERIOD_SHIFT_96MHz) / 10^9 / 3600 = 9.77 hrs
* 25MHz 46-bit 2^46 / 10^9 / 3600 = 19.55 hours
*/
#define E1000_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 60 * 4)
#define E1000_MAX_82574_SYSTIM_REREADS 50
#define E1000_82574_SYSTIM_EPSILON (1ULL << 35ULL)
/* hardware capability, feature, and workaround flags */
#define FLAG_HAS_AMT BIT(0)
#define FLAG_HAS_FLASH BIT(1)
#define FLAG_HAS_HW_VLAN_FILTER BIT(2)
#define FLAG_HAS_WOL BIT(3)
/* reserved BIT(4) */
#define FLAG_HAS_CTRLEXT_ON_LOAD BIT(5)
#define FLAG_HAS_SWSM_ON_LOAD BIT(6)
#define FLAG_HAS_JUMBO_FRAMES BIT(7)
#define FLAG_READ_ONLY_NVM BIT(8)
#define FLAG_IS_ICH BIT(9)
#define FLAG_HAS_MSIX BIT(10)
#define FLAG_HAS_SMART_POWER_DOWN BIT(11)
#define FLAG_IS_QUAD_PORT_A BIT(12)
#define FLAG_IS_QUAD_PORT BIT(13)
#define FLAG_HAS_HW_TIMESTAMP BIT(14)
#define FLAG_APME_IN_WUC BIT(15)
#define FLAG_APME_IN_CTRL3 BIT(16)
#define FLAG_APME_CHECK_PORT_B BIT(17)
#define FLAG_DISABLE_FC_PAUSE_TIME BIT(18)
#define FLAG_NO_WAKE_UCAST BIT(19)
#define FLAG_MNG_PT_ENABLED BIT(20)
#define FLAG_RESET_OVERWRITES_LAA BIT(21)
#define FLAG_TARC_SPEED_MODE_BIT BIT(22)
#define FLAG_TARC_SET_BIT_ZERO BIT(23)
#define FLAG_RX_NEEDS_RESTART BIT(24)
#define FLAG_LSC_GIG_SPEED_DROP BIT(25)
#define FLAG_SMART_POWER_DOWN BIT(26)
#define FLAG_MSI_ENABLED BIT(27)
/* reserved BIT(28) */
#define FLAG_TSO_FORCE BIT(29)
#define FLAG_RESTART_NOW BIT(30)
#define FLAG_MSI_TEST_FAILED BIT(31)
#define FLAG2_CRC_STRIPPING BIT(0)
#define FLAG2_HAS_PHY_WAKEUP BIT(1)
#define FLAG2_IS_DISCARDING BIT(2)
#define FLAG2_DISABLE_ASPM_L1 BIT(3)
#define FLAG2_HAS_PHY_STATS BIT(4)
#define FLAG2_HAS_EEE BIT(5)
#define FLAG2_DMA_BURST BIT(6)
#define FLAG2_DISABLE_ASPM_L0S BIT(7)
#define FLAG2_DISABLE_AIM BIT(8)
#define FLAG2_CHECK_PHY_HANG BIT(9)
#define FLAG2_NO_DISABLE_RX BIT(10)
#define FLAG2_PCIM2PCI_ARBITER_WA BIT(11)
#define FLAG2_DFLT_CRC_STRIPPING BIT(12)
#define FLAG2_CHECK_RX_HWTSTAMP BIT(13)
#define FLAG2_CHECK_SYSTIM_OVERFLOW BIT(14)
#define E1000_RX_DESC_PS(R, i) \
(&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
#define E1000_RX_DESC_EXT(R, i) \
(&(((union e1000_rx_desc_extended *)((R).desc))[i]))
#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
#define E1000_TX_DESC(R, i) E1000_GET_DESC(R, i, e1000_tx_desc)
#define E1000_CONTEXT_DESC(R, i) E1000_GET_DESC(R, i, e1000_context_desc)
enum e1000_state_t {
__E1000_TESTING,
__E1000_RESETTING,
__E1000_ACCESS_SHARED_RESOURCE,
__E1000_DOWN
};
enum latency_range {
lowest_latency = 0,
low_latency = 1,
bulk_latency = 2,
latency_invalid = 255
};
extern char e1000e_driver_name[];
extern const char e1000e_driver_version[];
void e1000e_check_options(struct e1000_adapter *adapter);
void e1000e_set_ethtool_ops(struct net_device *netdev);
int e1000e_open(struct net_device *netdev);
int e1000e_close(struct net_device *netdev);
void e1000e_up(struct e1000_adapter *adapter);
void e1000e_down(struct e1000_adapter *adapter, bool reset);
void e1000e_reinit_locked(struct e1000_adapter *adapter);
void e1000e_reset(struct e1000_adapter *adapter);
void e1000e_power_up_phy(struct e1000_adapter *adapter);
int e1000e_setup_rx_resources(struct e1000_ring *ring);
int e1000e_setup_tx_resources(struct e1000_ring *ring);
void e1000e_free_rx_resources(struct e1000_ring *ring);
void e1000e_free_tx_resources(struct e1000_ring *ring);
void e1000e_get_stats64(struct net_device *netdev,
struct rtnl_link_stats64 *stats);
void e1000e_set_interrupt_capability(struct e1000_adapter *adapter);
void e1000e_reset_interrupt_capability(struct e1000_adapter *adapter);
void e1000e_get_hw_control(struct e1000_adapter *adapter);
void e1000e_release_hw_control(struct e1000_adapter *adapter);
void e1000e_write_itr(struct e1000_adapter *adapter, u32 itr);
void e1000e_trigger_lsc(struct e1000_adapter *adapter);
extern unsigned int copybreak;
extern const struct e1000_info e1000_82571_info;
extern const struct e1000_info e1000_82572_info;
extern const struct e1000_info e1000_82573_info;
extern const struct e1000_info e1000_82574_info;
extern const struct e1000_info e1000_82583_info;
extern const struct e1000_info e1000_ich8_info;
extern const struct e1000_info e1000_ich9_info;
extern const struct e1000_info e1000_ich10_info;
extern const struct e1000_info e1000_pch_info;
extern const struct e1000_info e1000_pch2_info;
extern const struct e1000_info e1000_pch_lpt_info;
extern const struct e1000_info e1000_pch_spt_info;
extern const struct e1000_info e1000_pch_cnp_info;
extern const struct e1000_info e1000_es2_info;
void e1000e_ptp_init(struct e1000_adapter *adapter);
void e1000e_ptp_remove(struct e1000_adapter *adapter);
static inline s32 e1000_phy_hw_reset(struct e1000_hw *hw)
{
return hw->phy.ops.reset(hw);
}
static inline s32 e1e_rphy(struct e1000_hw *hw, u32 offset, u16 *data)
{
return hw->phy.ops.read_reg(hw, offset, data);
}
static inline s32 e1e_rphy_locked(struct e1000_hw *hw, u32 offset, u16 *data)
{
return hw->phy.ops.read_reg_locked(hw, offset, data);
}
static inline s32 e1e_wphy(struct e1000_hw *hw, u32 offset, u16 data)
{
return hw->phy.ops.write_reg(hw, offset, data);
}
static inline s32 e1e_wphy_locked(struct e1000_hw *hw, u32 offset, u16 data)
{
return hw->phy.ops.write_reg_locked(hw, offset, data);
}
void e1000e_reload_nvm_generic(struct e1000_hw *hw);
static inline s32 e1000e_read_mac_addr(struct e1000_hw *hw)
{
if (hw->mac.ops.read_mac_addr)
return hw->mac.ops.read_mac_addr(hw);
return e1000_read_mac_addr_generic(hw);
}
static inline s32 e1000_validate_nvm_checksum(struct e1000_hw *hw)
{
return hw->nvm.ops.validate(hw);
}
static inline s32 e1000e_update_nvm_checksum(struct e1000_hw *hw)
{
return hw->nvm.ops.update(hw);
}
static inline s32 e1000_read_nvm(struct e1000_hw *hw, u16 offset, u16 words,
u16 *data)
{
return hw->nvm.ops.read(hw, offset, words, data);
}
static inline s32 e1000_write_nvm(struct e1000_hw *hw, u16 offset, u16 words,
u16 *data)
{
return hw->nvm.ops.write(hw, offset, words, data);
}
static inline s32 e1000_get_phy_info(struct e1000_hw *hw)
{
return hw->phy.ops.get_info(hw);
}
static inline u32 __er32(struct e1000_hw *hw, unsigned long reg)
{
return readl(hw->hw_addr + reg);
}
#define er32(reg) __er32(hw, E1000_##reg)
s32 __ew32_prepare(struct e1000_hw *hw);
void __ew32(struct e1000_hw *hw, unsigned long reg, u32 val);
#define ew32(reg, val) __ew32(hw, E1000_##reg, (val))
#define e1e_flush() er32(STATUS)
#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) \
(__ew32((a), (reg + ((offset) << 2)), (value)))
#define E1000_READ_REG_ARRAY(a, reg, offset) \
(readl((a)->hw_addr + reg + ((offset) << 2)))
#endif /* _E1000_H_ */
|
[
"[email protected]"
] | |
f898c4b878ae1a8d927cfc5b252c30411e39c03e
|
e53893ce84ac79344459c56324d91d1dc0375b25
|
/20210201/project/project/DRV/Iwdg/iwdg.h
|
0cec50d2fb001c0ad6b1912521fa1b5ae5366ec9
|
[] |
no_license
|
roxla/STM32
|
1cc18ff3717d693b804cbca01051309cf995e5da
|
c5f87014b6a9a0f5218acca0835fef1555ee842c
|
refs/heads/master
| 2023-04-30T00:23:06.687081 | 2021-05-16T06:39:34 | 2021-05-16T06:39:34 | 357,802,779 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 65 |
h
|
#ifndef _IWDG_H_
#define _IWDG_H_
void iwdg_init(void);
#endif
|
[
"[email protected]"
] | |
597a7a5bdd1006872855fea9f4d04c09e31422c7
|
f028b7d8358d6b6fda434ddce87339816fbf4db0
|
/defines.h
|
a46ed6679006a66950f5641868499791b5225bae
|
[] |
no_license
|
mushtukova/GetIpAddr
|
d72588a63c6da545840bebc81fad70cf0c0fdc1c
|
2ad94064e03b147489af41788d8f1fd902bc4113
|
refs/heads/master
| 2021-01-24T08:07:27.765301 | 2017-06-05T07:06:19 | 2017-06-05T07:06:19 | 93,372,497 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 93 |
h
|
#ifndef DEFINES_H
#define DEFINES_H
#define LibraryName "inetmib1.dll"
#endif // DEFINES_H
|
[
"[email protected]"
] | |
af1b333f16e35e241dc83da24c170b3dfa0ecab0
|
b28a9f8a8d2f1443cd1d3c00c0ceb240eaa939b7
|
/miniupnpd-1.6/miniupnpdctl.c
|
33b36c66a7d6d00778e768ac4ee0f80596e47d3d
|
[
"BSD-3-Clause"
] |
permissive
|
iptime-gpl/userapps_v508
|
c9c1f5673f5237b1a1d9b6b9ed9952d90a9ee627
|
0e81589051c4a18eb050085993f1471fcb3af2e8
|
refs/heads/master
| 2021-09-15T00:34:57.976519 | 2018-05-23T01:01:19 | 2018-05-23T01:01:19 | 118,983,922 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,494 |
c
|
/* $Id: miniupnpdctl.c,v 1.1.1.1 2016/08/10 07:06:45 mt7623 Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* (c) 2006-2012 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <signal.h>
#if 0
static void sighandler(int sig)
{
printf("received signal %d\n", sig);
}
#endif
int
main(int argc, char * * argv)
{
/*char test[] = "test!";*/
static const char command[] = "show all\n";
char buf[256];
int l;
int s;
struct sockaddr_un addr;
/*signal(SIGINT, sighandler);*/
s = socket(AF_UNIX, SOCK_STREAM, 0);
if(s<0)
{
perror("socket");
return 1;
}
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, "/var/run/miniupnpd.ctl",
sizeof(addr.sun_path));
if(connect(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_un)) < 0)
{
perror("connect");
close(s);
return 1;
}
printf("Connected.\n");
if(write(s, command, sizeof(command)) < 0)
{
perror("write");
close(s);
return 1;
}
for(;;)
{
l = read(s, buf, sizeof(buf));
if(l<0)
{
perror("read");
break;
}
if(l==0)
break;
/*printf("%d bytes read\n", l);*/
fflush(stdout);
if(write(fileno(stdout), buf, l) < 0) {
perror("error writing to stdout");
}
/*printf("\n");*/
}
close(s);
return 0;
}
|
[
"[email protected]"
] | |
5396bd08a7e145b134d3fb0c8b9fb2bb69b239de
|
114e3cf5ecb7b4b91c8b5c49297973216ab1c1b9
|
/C Primer Plus书本练习/第8章/8-6.c
|
661dec1cebc7a6c54ed3d91f938eac930b9a3035
|
[] |
no_license
|
WizardWoz/Some-Codes
|
6cb57a44d2825881684344985c4e22dea99fef64
|
d2e721654dfe954d2237025c812a866d7ba50749
|
refs/heads/master
| 2021-02-28T21:40:16.053208 | 2020-03-21T03:35:26 | 2020-03-21T03:35:26 | 245,734,630 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 412 |
c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <ctype.h>
#include <math.h>
char get_first(char ch);
int main(void){
char ch;
printf("Please enter some chars,I can recognize the first char,");
printf("not space:\n");
printf("The first char is:%c",get_first(ch));
return 0;
}
char get_first(char ch){
ch=getchar();
while(isspace(ch))
ch=getchar();
return ch;
}
|
[
"[email protected]"
] | |
b2ac5f451e8d34fb8793b206444055f43cde9767
|
e22879a289fb9229aaefd6716e4d6cb6f7222a7c
|
/Repetição/zero_e_par.c
|
939b21dba0d83e243ddf97f0400c63e11bf83e12
|
[
"MIT"
] |
permissive
|
vtr306/fup_moodle_list
|
355063123797bb1c5c690cae49000800ccf9ec71
|
59abde65e00af1b5bc40966a84639c6c1ad0e979
|
refs/heads/master
| 2022-11-18T02:24:09.631150 | 2020-07-20T17:44:05 | 2020-07-20T17:44:05 | 256,867,910 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 323 |
c
|
#include <stdio.h>
int main(){
int x,y,i, soma = 0;
scanf("%d %d", &x, &y);
if(x > y){
printf("invalido");
}
else{
for(i = x; i <= y; i++){
if(i%2==0){
soma+=i;
}
}
printf("%d", soma);
}
return 0;
}
|
[
"[email protected]"
] | |
2ea9fe688d311642d4003cba3d1fba3f9214f9bf
|
1a81861af73b305fe2e551646ca66e67f4bde460
|
/PROGRAM/DIALOGS/ENGLISH/OpiumBuyer.h
|
e25e7ac2d5586179efeccb6e2088fbe85f217799
|
[] |
no_license
|
q4a/new-horizons-old
|
f810a29192efd635a924f1b9004a849b40e9fe20
|
538f46734cf1211e18b8ab265803163c4352b805
|
refs/heads/master
| 2022-11-05T06:41:45.855483 | 2016-09-13T18:35:42 | 2016-09-13T18:35:42 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 925 |
h
|
string DLG_TEXT[19] = {
"I've got some wares you might want to take a look at.",
"Some smuggler told me you might be interested in my services.",
"Ssshtt! Don't tell others! *whispers* But he is right, though. Would you be able to fetch me some opium?",
"Sure, how much do you need?",
"I think I'll pass. That stuff can't bring any good.",
"Good! Please get me ",
" opium plants. That should keep my customers happy for a while again. Be quick about it tough! Their supplies are running short, so if you aren't back in 2 months, I will need to get it elsewhere and the deal is off. If you do manage to bring it in time, I will pay you ",
"Don't worry, I'll be back before you know it.",
"You seem to have some opium. But I asked you to bring me more. Please come back when you've got everything.",
"I'm sorry. I will be back soon!",
"Ah, that's exactly what I wanted. Here is your money.",
"Thank you kindly."
};
|
[
"[email protected]"
] | |
87211ee8a89ea99a398d303f317842f3a7c3b438
|
e68d88f8dc9f39b774946bb2bc8f87d2e720acb2
|
/cards/BulkG_EXO-15-002/WW_cards_13TeV/cards_mu_LPZ/LimitResult/Lim_mu_LPZ_BulkG_WW.C
|
dcfe2d681613505b3b587cf00fd3d0029462161d
|
[] |
no_license
|
cms-edbr/ExoDiBosonCombination
|
a039d0b09f27b1b4ba9c9ef0cf50e6a97aecdd3e
|
d684fd28492dcaa984b3a26331ed90d12708b3bd
|
refs/heads/master
| 2020-04-06T05:42:32.803701 | 2016-06-21T11:46:29 | 2016-06-21T11:46:29 | 32,182,220 | 0 | 1 | null | null | null | null |
UTF-8
|
C
| false | false | 19,326 |
c
|
{
//=========Macro generated from canvas: c2/c2
//========= (Tue Nov 24 19:26:21 2015) by ROOT version5.34/18
TCanvas *c2 = new TCanvas("c2", "c2",0,0,800,600);
gStyle->SetOptFit(1);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c2->SetHighLightColor(2);
c2->Range(213.75,-5.168831,4338.75,2.623377);
c2->SetFillColor(0);
c2->SetBorderMode(0);
c2->SetBorderSize(2);
c2->SetLogy();
c2->SetGridx();
c2->SetGridy();
c2->SetTickx(1);
c2->SetTicky(1);
c2->SetLeftMargin(0.13);
c2->SetRightMargin(0.07);
c2->SetTopMargin(0.08);
c2->SetBottomMargin(0.15);
c2->SetFrameFillStyle(0);
c2->SetFrameBorderMode(0);
c2->SetFrameFillStyle(0);
c2->SetFrameBorderMode(0);
TH1F *hframe__1 = new TH1F("hframe__1","",1000,750,4050);
hframe__1->SetMinimum(0.0001);
hframe__1->SetMaximum(100);
hframe__1->SetDirectory(0);
hframe__1->SetStats(0);
hframe__1->SetLineStyle(0);
hframe__1->SetMarkerStyle(20);
hframe__1->GetXaxis()->SetTitle("M_{G_{Bulk}} (GeV)");
hframe__1->GetXaxis()->CenterTitle(true);
hframe__1->GetXaxis()->SetLabelFont(42);
hframe__1->GetXaxis()->SetLabelOffset(0.007);
hframe__1->GetXaxis()->SetLabelSize(0.045);
hframe__1->GetXaxis()->SetTitleSize(0.06);
hframe__1->GetXaxis()->SetTitleOffset(1.1);
hframe__1->GetXaxis()->SetTitleFont(42);
hframe__1->GetYaxis()->SetTitle("#sigma_{95%} #times BR_{G_{Bulk}#rightarrow WW} (pb)");
hframe__1->GetYaxis()->CenterTitle(true);
hframe__1->GetYaxis()->SetNdivisions(505);
hframe__1->GetYaxis()->SetLabelFont(42);
hframe__1->GetYaxis()->SetLabelOffset(0.007);
hframe__1->GetYaxis()->SetLabelSize(0.045);
hframe__1->GetYaxis()->SetTitleSize(0.06);
hframe__1->GetYaxis()->SetTitleFont(42);
hframe__1->GetZaxis()->SetLabelFont(42);
hframe__1->GetZaxis()->SetLabelOffset(0.007);
hframe__1->GetZaxis()->SetLabelSize(0.05);
hframe__1->GetZaxis()->SetTitleSize(0.06);
hframe__1->GetZaxis()->SetTitleFont(42);
hframe__1->Draw(" ");
TGraphAsymmErrors *grae = new TGraphAsymmErrors(22);
grae->SetName("Graph0");
grae->SetTitle("Graph");
Int_t ci; // for color index setting
ci = TColor::GetColor("#ffff00");
grae->SetFillColor(ci);
grae->SetLineStyle(2);
grae->SetLineWidth(3);
grae->SetMarkerStyle(20);
grae->SetPoint(0,800,4.739786);
grae->SetPointError(0,0,0,0,0);
grae->SetPoint(1,1200,3.078788);
grae->SetPointError(1,0,0,0,0);
grae->SetPoint(2,1400,2.092769);
grae->SetPointError(2,0,0,0,0);
grae->SetPoint(3,1600,2.054544);
grae->SetPointError(3,0,0,0,0);
grae->SetPoint(4,1800,1.522122);
grae->SetPointError(4,0,0,0,0);
grae->SetPoint(5,2000,1.033766);
grae->SetPointError(5,0,0,0,0);
grae->SetPoint(6,2500,0.6448351);
grae->SetPointError(6,0,0,0,0);
grae->SetPoint(7,3000,0.4176553);
grae->SetPointError(7,0,0,0,0);
grae->SetPoint(8,3500,0.3248879);
grae->SetPointError(8,0,0,0,0);
grae->SetPoint(9,4000,0.2059676);
grae->SetPointError(9,0,0,0,0);
grae->SetPoint(10,4500,0.237434);
grae->SetPointError(10,0,0,0,0);
grae->SetPoint(11,4500,2.516644);
grae->SetPointError(11,0,0,0,0);
grae->SetPoint(12,4000,2.16832);
grae->SetPointError(12,0,0,0,0);
grae->SetPoint(13,3500,3.213294);
grae->SetPointError(13,0,0,0,0);
grae->SetPoint(14,3000,3.918651);
grae->SetPointError(14,0,0,0,0);
grae->SetPoint(15,2500,5.310858);
grae->SetPointError(15,0,0,0,0);
grae->SetPoint(16,2000,8.043321);
grae->SetPointError(16,0,0,0,0);
grae->SetPoint(17,1800,11.52433);
grae->SetPointError(17,0,0,0,0);
grae->SetPoint(18,1600,14.96934);
grae->SetPointError(18,0,0,0,0);
grae->SetPoint(19,1400,14.82826);
grae->SetPointError(19,0,0,0,0);
grae->SetPoint(20,1200,20.794);
grae->SetPointError(20,0,0,0,0);
grae->SetPoint(21,800,24.02123);
grae->SetPointError(21,0,0,0,0);
TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","Graph",100,430,4870);
Graph_Graph1->SetMinimum(0.1853708);
Graph_Graph1->SetMaximum(26.40276);
Graph_Graph1->SetDirectory(0);
Graph_Graph1->SetStats(0);
Graph_Graph1->SetLineStyle(0);
Graph_Graph1->SetMarkerStyle(20);
Graph_Graph1->GetXaxis()->SetLabelFont(42);
Graph_Graph1->GetXaxis()->SetLabelOffset(0.007);
Graph_Graph1->GetXaxis()->SetLabelSize(0.05);
Graph_Graph1->GetXaxis()->SetTitleSize(0.06);
Graph_Graph1->GetXaxis()->SetTitleOffset(0.9);
Graph_Graph1->GetXaxis()->SetTitleFont(42);
Graph_Graph1->GetYaxis()->SetLabelFont(42);
Graph_Graph1->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph1->GetYaxis()->SetLabelSize(0.05);
Graph_Graph1->GetYaxis()->SetTitleSize(0.06);
Graph_Graph1->GetYaxis()->SetTitleOffset(1.25);
Graph_Graph1->GetYaxis()->SetTitleFont(42);
Graph_Graph1->GetZaxis()->SetLabelFont(42);
Graph_Graph1->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph1->GetZaxis()->SetLabelSize(0.05);
Graph_Graph1->GetZaxis()->SetTitleSize(0.06);
Graph_Graph1->GetZaxis()->SetTitleFont(42);
grae->SetHistogram(Graph_Graph1);
grae->Draw("f");
grae = new TGraphAsymmErrors(22);
grae->SetName("Graph1");
grae->SetTitle("Graph");
ci = TColor::GetColor("#00ff00");
grae->SetFillColor(ci);
grae->SetLineStyle(2);
grae->SetLineWidth(3);
grae->SetMarkerStyle(20);
grae->SetPoint(0,800,6.57275);
grae->SetPointError(0,0,0,0,0);
grae->SetPoint(1,1200,4.444092);
grae->SetPointError(1,0,0,0,0);
grae->SetPoint(2,1400,3.044302);
grae->SetPointError(2,0,0,0,0);
grae->SetPoint(3,1600,3.012149);
grae->SetPointError(3,0,0,0,0);
grae->SetPoint(4,1800,2.261168);
grae->SetPointError(4,0,0,0,0);
grae->SetPoint(5,2000,1.558776);
grae->SetPointError(5,0,0,0,0);
grae->SetPoint(6,2500,0.9949872);
grae->SetPointError(6,0,0,0,0);
grae->SetPoint(7,3000,0.6874978);
grae->SetPointError(7,0,0,0,0);
grae->SetPoint(8,3500,0.5530215);
grae->SetPointError(8,0,0,0,0);
grae->SetPoint(9,4000,0.3620428);
grae->SetPointError(9,0,0,0,0);
grae->SetPoint(10,4500,0.4190786);
grae->SetPointError(10,0,0,0,0);
grae->SetPoint(11,4500,1.669942);
grae->SetPointError(11,0,0,0,0);
grae->SetPoint(12,4000,1.438808);
grae->SetPointError(12,0,0,0,0);
grae->SetPoint(13,3500,2.13221);
grae->SetPointError(13,0,0,0,0);
grae->SetPoint(14,3000,2.600256);
grae->SetPointError(14,0,0,0,0);
grae->SetPoint(15,2500,3.385161);
grae->SetPointError(15,0,0,0,0);
grae->SetPoint(16,2000,4.958483);
grae->SetPointError(16,0,0,0,0);
grae->SetPoint(17,1800,6.983786);
grae->SetPointError(17,0,0,0,0);
grae->SetPoint(18,1600,8.836365);
grae->SetPointError(18,0,0,0,0);
grae->SetPoint(19,1400,8.520137);
grae->SetPointError(19,0,0,0,0);
grae->SetPoint(20,1200,11.97679);
grae->SetPointError(20,0,0,0,0);
grae->SetPoint(21,800,15.36306);
grae->SetPointError(21,0,0,0,0);
TH1F *Graph_Graph2 = new TH1F("Graph_Graph2","Graph",100,430,4870);
Graph_Graph2->SetMinimum(0.3258385);
Graph_Graph2->SetMaximum(16.86317);
Graph_Graph2->SetDirectory(0);
Graph_Graph2->SetStats(0);
Graph_Graph2->SetLineStyle(0);
Graph_Graph2->SetMarkerStyle(20);
Graph_Graph2->GetXaxis()->SetLabelFont(42);
Graph_Graph2->GetXaxis()->SetLabelOffset(0.007);
Graph_Graph2->GetXaxis()->SetLabelSize(0.05);
Graph_Graph2->GetXaxis()->SetTitleSize(0.06);
Graph_Graph2->GetXaxis()->SetTitleOffset(0.9);
Graph_Graph2->GetXaxis()->SetTitleFont(42);
Graph_Graph2->GetYaxis()->SetLabelFont(42);
Graph_Graph2->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph2->GetYaxis()->SetLabelSize(0.05);
Graph_Graph2->GetYaxis()->SetTitleSize(0.06);
Graph_Graph2->GetYaxis()->SetTitleOffset(1.25);
Graph_Graph2->GetYaxis()->SetTitleFont(42);
Graph_Graph2->GetZaxis()->SetLabelFont(42);
Graph_Graph2->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph2->GetZaxis()->SetLabelSize(0.05);
Graph_Graph2->GetZaxis()->SetTitleSize(0.06);
Graph_Graph2->GetZaxis()->SetTitleFont(42);
grae->SetHistogram(Graph_Graph2);
grae->Draw("f");
grae = new TGraphAsymmErrors(11);
grae->SetName("Graph2");
grae->SetTitle("Graph");
grae->SetFillColor(1);
grae->SetLineStyle(2);
grae->SetLineWidth(3);
grae->SetMarkerStyle(24);
grae->SetMarkerSize(2);
grae->SetPoint(0,800,9.785365);
grae->SetPointError(0,0,0,0,0);
grae->SetPoint(1,1200,7.005954);
grae->SetPointError(1,0,0,0,0);
grae->SetPoint(2,1400,4.892683);
grae->SetPointError(2,0,0,0,0);
grae->SetPoint(3,1600,4.938623);
grae->SetPointError(3,0,0,0,0);
grae->SetPoint(4,1800,3.801591);
grae->SetPointError(4,0,0,0,0);
grae->SetPoint(5,2000,2.653074);
grae->SetPointError(5,0,0,0,0);
grae->SetPoint(6,2500,1.751488);
grae->SetPointError(6,0,0,0,0);
grae->SetPoint(7,3000,1.292082);
grae->SetPointError(7,0,0,0,0);
grae->SetPoint(8,3500,1.059507);
grae->SetPointError(8,0,0,0,0);
grae->SetPoint(9,4000,0.7149519);
grae->SetPointError(9,0,0,0,0);
grae->SetPoint(10,4500,0.8298036);
grae->SetPointError(10,0,0,0,0);
TH1F *Graph_Graph3 = new TH1F("Graph_Graph3","Graph",100,430,4870);
Graph_Graph3->SetMinimum(0.6434567);
Graph_Graph3->SetMaximum(10.69241);
Graph_Graph3->SetDirectory(0);
Graph_Graph3->SetStats(0);
Graph_Graph3->SetLineStyle(0);
Graph_Graph3->SetMarkerStyle(20);
Graph_Graph3->GetXaxis()->SetLabelFont(42);
Graph_Graph3->GetXaxis()->SetLabelOffset(0.007);
Graph_Graph3->GetXaxis()->SetLabelSize(0.05);
Graph_Graph3->GetXaxis()->SetTitleSize(0.06);
Graph_Graph3->GetXaxis()->SetTitleOffset(0.9);
Graph_Graph3->GetXaxis()->SetTitleFont(42);
Graph_Graph3->GetYaxis()->SetLabelFont(42);
Graph_Graph3->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph3->GetYaxis()->SetLabelSize(0.05);
Graph_Graph3->GetYaxis()->SetTitleSize(0.06);
Graph_Graph3->GetYaxis()->SetTitleOffset(1.25);
Graph_Graph3->GetYaxis()->SetTitleFont(42);
Graph_Graph3->GetZaxis()->SetLabelFont(42);
Graph_Graph3->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph3->GetZaxis()->SetLabelSize(0.05);
Graph_Graph3->GetZaxis()->SetTitleSize(0.06);
Graph_Graph3->GetZaxis()->SetTitleFont(42);
grae->SetHistogram(Graph_Graph3);
grae->Draw("l");
grae = new TGraphAsymmErrors(11);
grae->SetName("Graph3");
grae->SetTitle("Graph");
grae->SetFillColor(1);
grae->SetLineWidth(3);
grae->SetMarkerStyle(20);
grae->SetMarkerSize(1.6);
grae->SetPoint(0,800,17.89795);
grae->SetPointError(0,0,0,0,0);
grae->SetPoint(1,1200,4.123081);
grae->SetPointError(1,0,0,0,0);
grae->SetPoint(2,1400,5.401136);
grae->SetPointError(2,0,0,0,0);
grae->SetPoint(3,1600,6.574721);
grae->SetPointError(3,0,0,0,0);
grae->SetPoint(4,1800,3.482585);
grae->SetPointError(4,0,0,0,0);
grae->SetPoint(5,2000,2.368703);
grae->SetPointError(5,0,0,0,0);
grae->SetPoint(6,2500,2.046892);
grae->SetPointError(6,0,0,0,0);
grae->SetPoint(7,3000,2.030144);
grae->SetPointError(7,0,0,0,0);
grae->SetPoint(8,3500,1.038831);
grae->SetPointError(8,0,0,0,0);
grae->SetPoint(9,4000,0.6945193);
grae->SetPointError(9,0,0,0,0);
grae->SetPoint(10,4500,0.8167045);
grae->SetPointError(10,0,0,0,0);
TH1F *Graph_Graph4 = new TH1F("Graph_Graph4","Graph",100,430,4870);
Graph_Graph4->SetMinimum(0.6250673);
Graph_Graph4->SetMaximum(19.6183);
Graph_Graph4->SetDirectory(0);
Graph_Graph4->SetStats(0);
Graph_Graph4->SetLineStyle(0);
Graph_Graph4->SetMarkerStyle(20);
Graph_Graph4->GetXaxis()->SetLabelFont(42);
Graph_Graph4->GetXaxis()->SetLabelOffset(0.007);
Graph_Graph4->GetXaxis()->SetLabelSize(0.05);
Graph_Graph4->GetXaxis()->SetTitleSize(0.06);
Graph_Graph4->GetXaxis()->SetTitleOffset(0.9);
Graph_Graph4->GetXaxis()->SetTitleFont(42);
Graph_Graph4->GetYaxis()->SetLabelFont(42);
Graph_Graph4->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph4->GetYaxis()->SetLabelSize(0.05);
Graph_Graph4->GetYaxis()->SetTitleSize(0.06);
Graph_Graph4->GetYaxis()->SetTitleOffset(1.25);
Graph_Graph4->GetYaxis()->SetTitleFont(42);
Graph_Graph4->GetZaxis()->SetLabelFont(42);
Graph_Graph4->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph4->GetZaxis()->SetLabelSize(0.05);
Graph_Graph4->GetZaxis()->SetTitleSize(0.06);
Graph_Graph4->GetZaxis()->SetTitleFont(42);
grae->SetHistogram(Graph_Graph4);
grae->Draw("lp");
TGraph *graph = new TGraph(11);
graph->SetName("Graph4");
graph->SetTitle("Graph");
graph->SetFillColor(1);
graph->SetFillStyle(3344);
ci = TColor::GetColor("#ff0000");
graph->SetLineColor(ci);
graph->SetLineWidth(2);
graph->SetMarkerStyle(20);
graph->SetMarkerSize(2);
graph->SetPoint(0,800,0.07605829337);
graph->SetPoint(1,1200,0.006839560143);
graph->SetPoint(2,1400,0.002613740408);
graph->SetPoint(3,1600,0.0011483744);
graph->SetPoint(4,1800,0.000488293);
graph->SetPoint(5,2000,0.0002395188149);
graph->SetPoint(6,2500,4.485707788e-05);
graph->SetPoint(7,3000,9.824860871e-06);
graph->SetPoint(8,3500,4.197582786e-06);
graph->SetPoint(9,4000,2.438243797e-06);
graph->SetPoint(10,4500,2.089672565e-06);
TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","Graph",100,430,4870);
Graph_Graph1->SetMinimum(1.880705e-06);
Graph_Graph1->SetMaximum(0.08366391);
Graph_Graph1->SetDirectory(0);
Graph_Graph1->SetStats(0);
Graph_Graph1->SetLineStyle(0);
Graph_Graph1->SetMarkerStyle(20);
Graph_Graph1->GetXaxis()->SetLabelFont(42);
Graph_Graph1->GetXaxis()->SetLabelOffset(0.007);
Graph_Graph1->GetXaxis()->SetLabelSize(0.05);
Graph_Graph1->GetXaxis()->SetTitleSize(0.06);
Graph_Graph1->GetXaxis()->SetTitleOffset(0.9);
Graph_Graph1->GetXaxis()->SetTitleFont(42);
Graph_Graph1->GetYaxis()->SetLabelFont(42);
Graph_Graph1->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph1->GetYaxis()->SetLabelSize(0.05);
Graph_Graph1->GetYaxis()->SetTitleSize(0.06);
Graph_Graph1->GetYaxis()->SetTitleOffset(1.25);
Graph_Graph1->GetYaxis()->SetTitleFont(42);
Graph_Graph1->GetZaxis()->SetLabelFont(42);
Graph_Graph1->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph1->GetZaxis()->SetLabelSize(0.05);
Graph_Graph1->GetZaxis()->SetTitleSize(0.06);
Graph_Graph1->GetZaxis()->SetTitleFont(42);
graph->SetHistogram(Graph_Graph1);
graph->Draw("c");
TLegend *leg = new TLegend(0.4334171,0.6695804,0.9183417,0.8706294,NULL,"brNDC");
leg->SetBorderSize(0);
leg->SetTextSize(0.038);
leg->SetLineColor(1);
leg->SetLineStyle(1);
leg->SetLineWidth(2);
leg->SetFillColor(19);
leg->SetFillStyle(0);
TLegendEntry *entry=leg->AddEntry("Graph1","Asympt. CL_{S} Expected #pm 1#sigma","LF");
ci = TColor::GetColor("#00ff00");
entry->SetFillColor(ci);
entry->SetFillStyle(1001);
entry->SetLineColor(1);
entry->SetLineStyle(2);
entry->SetLineWidth(3);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(42);
entry=leg->AddEntry("Graph0","Asympt. CL_{S} Expected #pm 2#sigma","LF");
ci = TColor::GetColor("#ffff00");
entry->SetFillColor(ci);
entry->SetFillStyle(1001);
entry->SetLineColor(1);
entry->SetLineStyle(2);
entry->SetLineWidth(3);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(42);
entry=leg->AddEntry("Graph4","#sigma_{TH} #times BR_{G_{Bulk}#rightarrow WW} #tilde{k}=0.5","L");
ci = TColor::GetColor("#ff0000");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(2);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(42);
leg->Draw();
TPaveText *pt = new TPaveText(0.6595477,0.222028,0.8944724,0.3653846,"brNDC");
pt->SetBorderSize(0);
pt->SetFillColor(0);
pt->SetFillStyle(0);
pt->SetTextAlign(31);
pt->SetTextSize(0.038);
TText *text = pt->AddText("WZ category");
text = pt->AddText("0.6 < #tau_{21} < 0.75");
pt->Draw();
tex = new TLatex(0.93,0.936,"1.3 fb^{-1},W#rightarrow #mu#nu LP (13 TeV)");
tex->SetNDC();
tex->SetTextAlign(31);
tex->SetTextFont(42);
tex->SetTextSize(0.048);
tex->SetLineWidth(2);
tex->Draw();
tex = new TLatex(0.13,0.936,"");
tex->SetNDC();
tex->SetTextFont(61);
tex->SetTextSize(0.06);
tex->SetLineWidth(2);
tex->Draw();
tex = new TLatex(0.226,0.936,"");
tex->SetNDC();
tex->SetTextFont(52);
tex->SetTextSize(0.0456);
tex->SetLineWidth(2);
tex->Draw();
TH1F *hframe__2 = new TH1F("hframe__2","",1000,750,4050);
hframe__2->SetMinimum(0.0001);
hframe__2->SetMaximum(100);
hframe__2->SetDirectory(0);
hframe__2->SetStats(0);
hframe__2->SetLineStyle(0);
hframe__2->SetMarkerStyle(20);
hframe__2->GetXaxis()->SetTitle("M_{G_{Bulk}} (GeV)");
hframe__2->GetXaxis()->CenterTitle(true);
hframe__2->GetXaxis()->SetLabelFont(42);
hframe__2->GetXaxis()->SetLabelOffset(0.007);
hframe__2->GetXaxis()->SetLabelSize(0.045);
hframe__2->GetXaxis()->SetTitleSize(0.06);
hframe__2->GetXaxis()->SetTitleOffset(1.1);
hframe__2->GetXaxis()->SetTitleFont(42);
hframe__2->GetYaxis()->SetTitle("#sigma_{95%} #times BR_{G_{Bulk}#rightarrow WW} (pb)");
hframe__2->GetYaxis()->CenterTitle(true);
hframe__2->GetYaxis()->SetNdivisions(505);
hframe__2->GetYaxis()->SetLabelFont(42);
hframe__2->GetYaxis()->SetLabelOffset(0.007);
hframe__2->GetYaxis()->SetLabelSize(0.045);
hframe__2->GetYaxis()->SetTitleSize(0.06);
hframe__2->GetYaxis()->SetTitleFont(42);
hframe__2->GetZaxis()->SetLabelFont(42);
hframe__2->GetZaxis()->SetLabelOffset(0.007);
hframe__2->GetZaxis()->SetLabelSize(0.05);
hframe__2->GetZaxis()->SetTitleSize(0.06);
hframe__2->GetZaxis()->SetTitleFont(42);
hframe__2->Draw("sameaxis");
TH1F *hframe__3 = new TH1F("hframe__3","",1000,750,4050);
hframe__3->SetMinimum(0.0001);
hframe__3->SetMaximum(100);
hframe__3->SetDirectory(0);
hframe__3->SetStats(0);
hframe__3->SetLineStyle(0);
hframe__3->SetMarkerStyle(20);
hframe__3->GetXaxis()->SetTitle("M_{G_{Bulk}} (GeV)");
hframe__3->GetXaxis()->CenterTitle(true);
hframe__3->GetXaxis()->SetLabelFont(42);
hframe__3->GetXaxis()->SetLabelOffset(0.007);
hframe__3->GetXaxis()->SetLabelSize(0.045);
hframe__3->GetXaxis()->SetTitleSize(0.06);
hframe__3->GetXaxis()->SetTitleOffset(1.1);
hframe__3->GetXaxis()->SetTitleFont(42);
hframe__3->GetYaxis()->SetTitle("#sigma_{95%} #times BR_{G_{Bulk}#rightarrow WW} (pb)");
hframe__3->GetYaxis()->CenterTitle(true);
hframe__3->GetYaxis()->SetNdivisions(505);
hframe__3->GetYaxis()->SetLabelFont(42);
hframe__3->GetYaxis()->SetLabelOffset(0.007);
hframe__3->GetYaxis()->SetLabelSize(0.045);
hframe__3->GetYaxis()->SetTitleSize(0.06);
hframe__3->GetYaxis()->SetTitleFont(42);
hframe__3->GetZaxis()->SetLabelFont(42);
hframe__3->GetZaxis()->SetLabelOffset(0.007);
hframe__3->GetZaxis()->SetLabelSize(0.05);
hframe__3->GetZaxis()->SetTitleSize(0.06);
hframe__3->GetZaxis()->SetTitleFont(42);
hframe__3->Draw("sameaxig");
c2->Modified();
c2->cd();
c2->SetSelected(c2);
}
|
[
"[email protected]"
] | |
3b8103f5be3816fa973f01a4a50d4feb2ea299b4
|
194d8065ac192921b2510e8372f80414c9b234a8
|
/TJC-024-9341-18-pin-SPI-240x320-ili9341-2.4-inch-touch/chinese-driver/51_Code/基本刷屏测试/font/font.h
|
2a9cb90c822a1e1d69482ac4e76b69e8ffe5bb65
|
[] |
no_license
|
myelin/tiny-tft
|
314a596e160ff281daa602fcb77ecd6213225f9c
|
ee1f5ba0ec8b299ddec8aff89f2b3297f1ee8bb3
|
refs/heads/master
| 2021-01-10T19:48:04.133257 | 2017-07-03T23:23:30 | 2017-07-03T23:23:30 | 29,227,334 | 17 | 8 | null | null | null | null |
UTF-8
|
C
| false | false | 193 |
h
|
#ifndef __FONT_H
#define __FONT_H
extern unsigned char code image[];
extern unsigned char code hanzi[];
extern unsigned char code asc2_1608[1520];
#endif
|
[
"[email protected]"
] | |
69e8dc30b6727b08e4e790ee3247b3449b9aa6ca
|
5e7c3bf840b4428663e60d235139ae7655552cdc
|
/lab7Doesitwork/sensors.c
|
43139f0d2409c5385cf8df406f609d262933b463
|
[] |
no_license
|
Austinbolinger/ECE382Lab8
|
82480aeba200bca6c849d0d11a3459468d543edc
|
371e1bb04214b7dba26eaa2279c3f8380f087f85
|
refs/heads/master
| 2020-05-21T11:39:35.894772 | 2014-12-12T07:12:47 | 2014-12-12T07:12:47 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,682 |
c
|
#include <msp430.h>
#include "sensors.h"
int left() {
unsigned short sample[16]; // Just to analyze the values
unsigned char i = 0;
ADC10CTL0 = ADC10SHT_3 + ADC10ON; // ADC10ON, interrupt enabled
ADC10CTL1 = INCH_3; // input A2 (left sensor)
ADC10AE0 |= BIT3; // PA.1 ADC option select
ADC10CTL1 |= ADC10SSEL1 | ADC10SSEL0; // Select SMCLK
ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start
while (ADC10CTL1 & ADC10BUSY)
;
sample[i] = ADC10MEM;
i = (i+1) & 0xF;
return ADC10MEM;
}
int middle() {
unsigned short sample[16]; // Just to analyze the values
unsigned char i = 0;
ADC10CTL0 = ADC10SHT_3 + ADC10ON; // ADC10ON, interrupt enabled
ADC10CTL1 = INCH_4; // input A2 (left sensor)
ADC10AE0 |= BIT4; // PA.1 ADC option select
ADC10CTL1 |= ADC10SSEL1 | ADC10SSEL0; // Select SMCLK
ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start
while (ADC10CTL1 & ADC10BUSY)
;
sample[i] = ADC10MEM;
i = (i+1) & 0xF;
return ADC10MEM;
}
int right() {
unsigned short sample[16]; // Just to analyze the values
unsigned char i = 0;
ADC10CTL0 = ADC10SHT_3 + ADC10ON; // ADC10ON, interrupt enabled
ADC10CTL1 = INCH_6; // input A2 (left sensor)
ADC10AE0 |= BIT6; // PA.1 ADC option select
ADC10CTL1 |= ADC10SSEL1 | ADC10SSEL0; // Select SMCLK
ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start
while (ADC10CTL1 & ADC10BUSY)
;
sample[i] = ADC10MEM;
i = (i+1) & 0xF;
return ADC10MEM;
}
|
[
"[email protected]"
] | |
0616fdcec9d2ede4665776e8ff2aa8129ddce1b4
|
9f21a4925904137638aa24be875fbc6a33f696e7
|
/Algorithm/ThinkOflEinstein.h
|
4bb2aeafca6b13d7470bbdd571a4a783dc54e30a
|
[] |
no_license
|
WLucky/Algorithm
|
7b374b55f35e07292d33f5443b3325e6e4e28541
|
c3242be25c4d1cea539a4266b091a6ba5dafde4d
|
refs/heads/master
| 2020-04-10T21:32:05.755241 | 2016-09-15T05:55:40 | 2016-09-15T05:55:40 | 68,258,534 | 0 | 0 | null | null | null | null |
GB18030
|
C
| false | false | 4,372 |
h
|
#pragma once
/********************************************************************
FileName: ThinkOflEinstein.h
Description: 爱因斯坦的思考题
Author: wangpengjun
Created: 2016/9/15 12:23
*********************************************************************/
//表示属性的类型
enum ITEM_TYPE
{
color, nationality,drink,pet, cigarette
};
//属性的数据结构定义
typedef struct tagItem
{
ITEM_TYPE type;
int value;
}ITEM;
#define GROUPS_ITEMS 5
typedef struct tagGroup
{
ITEM items[GROUPS_ITEMS];
}GROUP;
//每次访问都要遍历items,找到合适的类型
//改进->每组的属性数目及类型都是固定的,使用一个维度
struct tagGroup2
{
int itemValue[GROUPS_ITEMS];
}GROUP2;
typedef enum tagItemType
{
type_house = 0,
type_nation = 1,
type_drink = 2,
type_pet = 3,
type_cigaret = 4
}ITEM_TYPE;
// if(group.itemValue[type_house]==COLOR_BLUE)
/****************************************************************************************************/
//以上为基本模型定义 下面为线索模型 判断一个枚举结果是否正确
//第一类 具有绑定关系的模型 如丹麦人喝茶
struct tagBind
{
ITEM_TYPE first_type;
int first_val;
ITEM_TYPE second_type;
int second_val;
};
/*将已知条件写入
const BIND binds[] =
{
{ type_house, COLOR_RED, type_nation, NATION_ENGLAND },
{ type_nation, NATION_SWEDEND, type_pet, PET_DOG },
{ type_nation, NATION_DANMARK, type_drink, DRINK_TEA },
{ type_house, COLOR_GREEN, type_drink, DRINK_COFFEE },
{ type_cigaret, CIGARET_PALLMALL, type_pet, PET_BIRD },
{ type_house, COLOR_YELLOW, type_cigaret, CIGARET_DUNHILL },
{ type_cigaret, CIGARET_BLUEMASTER, type_drink, DRINK_BEER },
{ type_nation, NATION_GERMANY, type_cigaret, CIGARET_PRINCE }
};
*/
//第二类元素 相邻关系 如养马的人和抽Dunhill香烟的人相邻
struct tagRelation
{
ITEM_TYPE type;
int val;
ITEM_TYPE relation_type;
int relation_val;
}RELATION;
//第三类 无法统一建立数学模型。直接判断
/*******************************************************************************************************/
//算法实现
/*
static int cnt = 0;
void DoGroupsfinalCheck(GROUP *groups)
{
cnt++;
if((cnt % 1000000) == 0)
printf("%d\n", cnt);
if(CheckAllGroupsBind(groups, binds) && CheckAllGroupsRelation(groups, relations))
{
PrintAllGroupsResult(groups, GROUPS_COUNT);
}
}
*/
/* 遍历房子颜色
void EnumHouseColors(GROUP *groups, int groupIdx)
{
if (groupIdx == GROUPS_COUNT)
{
ArrangeHouseNations(groups);
return;
}
for (int i = COLOR_BLUE; i <= COLOR_YELLOW; i++)
{
if (!IsGroupItemValueUsed(groups, groupIdx, type_house, i))
{
groups[groupIdx].itemValue[type_house] = i;
if (i == COLOR_GREEN) //应用线索(4):绿房子紧挨着白房子,在白房子的左边;
{
groups[++groupIdx].itemValue[type_house] = COLOR_WHITE;
}
EnumHouseColors(groups, groupIdx + 1);
if (i == COLOR_GREEN)
{
groupIdx--;
}
}
}
}
*/
/*
void EnumPeopleCigerts(GROUP *groups, int groupIdx)
{
if(groupIdx == GROUPS_COUNT)
{
DoGroupsfinalCheck(groups);
return;
}
for (int i = CIGARET_BLENDS; i <= CIGARET_BLUEMASTER; i++)
{
if (!IsGroupItemValueUsed(groups, groupIdx, type_cigaret, i))
{
groups[groupIdx].itemValue[type_cigaret] = i;
EnumPeopleCigerts(groups, groupIdx + 1);
}
}
}
*/
/*
int main(int argc, char* argv[])
{
GROUP groups[GROUPS_COUNT] = { { 0 } };
EnumHouseColors(groups, 0);
return 0;
}
*/
//总结:
/*
1.建立基本模型 int 数组来表示一组的状况 const int 某一属性如:白色 黄色等
2.建立线索模型 这个分析了条件 然后建立了两种线索,第三种无法建立线索 则放置在遍历中 无需判断
3.递归 穷举所有种类
4.递归的结束条件用来判断
if (groupIdx == GROUPS_COUNT)
{
ArrangeHouseNations(groups);
return;
}
4.注意事项:
遍历房子的递归中
if(i == COLOR_GREEN) //应用线索(4):绿房子紧挨着白房子,在白房子的左边;
{
groups[++groupIdx].itemValue[type_house] = COLOR_WHITE;
}
EnumHouseColors(groups, groupIdx + 1);
if(i == COLOR_GREEN)
{
groupIdx--;
}
最后恢复现场,因为还会有下次循环,而此时该房子不是绿色,所以需要取消上次的假设。
若递归中因为特殊情况进行了特殊处理,则递归后要进行回复。
*/
|
[
"[email protected]"
] | |
c37bf3a7e3dd384f72e76acc2ed7fc4daeb2ab62
|
3c960aa39872afe187023782431ca4678d585c62
|
/0x05-pointers_arrays_strings/7-leet.c
|
eecfdfd6dc72af9d820d1379d835e0734d002ebb
|
[] |
no_license
|
amlao/holbertonschool-low_level_programming
|
d36265a3d51401da2c9929cf9513cdc57456a742
|
31dc7d8349d57d97e80dcd9a0e5bc7c4fc5fb3cb
|
refs/heads/master
| 2018-11-22T16:28:34.980390 | 2018-09-04T08:03:44 | 2018-09-04T08:03:44 | 117,873,942 | 0 | 1 | null | null | null | null |
UTF-8
|
C
| false | false | 332 |
c
|
#include "holberton.h"
/**
* leet - encodes a string into 1337
* @s: string
* Return: string
*/
char *leet(char *s)
{
int i = 0;
int j = 0;
char array[] = "a4A4e3E3o0O0t7T7l1L1";
while (s[i] != '\0')
{
for (j = 0; j < array[j]; j += 2)
{
if (s[i] == array[j])
s[i] = array[j + 1];
}
i++;
}
return (s);
}
|
[
"[email protected]"
] | |
1b367314ea7e20b5c598011796b5aa667ab75f49
|
bb3b5d141fd0c9da21c8e2a6e47f5ef602e6384f
|
/src/rb.h
|
c221d5e44bd14c1390f78e74c89c66dc27004966
|
[] |
no_license
|
webosce/jemalloc
|
1eb98d769dac417bb0295b359bb522b048cd46fb
|
6989d2c72b3634a07128598aa9e222636e7843a3
|
refs/heads/webosce
| 2023-05-04T11:41:47.698921 | 2018-03-14T04:21:13 | 2018-03-14T04:21:13 | 145,512,866 | 0 | 0 | null | 2023-04-25T13:37:32 | 2018-08-21T05:47:38 |
C
|
UTF-8
|
C
| false | false | 36,872 |
h
|
/******************************************************************************
*
* Copyright (C) 2008 Jason Evans <[email protected]>.
* Copyright (c) 2008-2018 LG Electronics, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice(s), this list of conditions and the following disclaimer
* unmodified other than the allowable addition of one or more
* copyright notices.
* 2. Redistributions in binary form must reproduce the above copyright
* notice(s), this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*
* cpp macro implementation of left-leaning red-black trees.
*
* Usage:
*
* (Optional, see assert(3).)
* #define NDEBUG
*
* (Required.)
* #include <assert.h>
* #include <rb.h>
* ...
*
* All operations are done non-recursively. Parent pointers are not used, and
* color bits are stored in the least significant bit of right-child pointers,
* thus making node linkage as compact as is possible for red-black trees.
*
* Some macros use a comparison function pointer, which is expected to have the
* following prototype:
*
* int (a_cmp *)(a_type *a_node, a_type *a_other);
* ^^^^^^
* or a_key
*
* Interpretation of comparision function return values:
*
* -1 : a_node < a_other
* 0 : a_node == a_other
* 1 : a_node > a_other
*
* In all cases, the a_node or a_key macro argument is the first argument to the
* comparison function, which makes it possible to write comparison functions
* that treat the first argument specially.
*
******************************************************************************/
#ifndef RB_H_
#define RB_H_
//__FBSDID("$FreeBSD: head/lib/libc/stdlib/rb.h 178995 2008-05-14 18:33:13Z jasone $");
/* Node structure. */
#define rb_node(a_type) \
struct { \
a_type *rbn_left; \
a_type *rbn_right_red; \
}
/* Root structure. */
#define rb_tree(a_type) \
struct { \
a_type *rbt_root; \
a_type rbt_nil; \
}
/* Left accessors. */
#define rbp_left_get(a_type, a_field, a_node) \
((a_node)->a_field.rbn_left)
#define rbp_left_set(a_type, a_field, a_node, a_left) do { \
(a_node)->a_field.rbn_left = a_left; \
} while (0)
/* Right accessors. */
#define rbp_right_get(a_type, a_field, a_node) \
((a_type *) (((intptr_t) (a_node)->a_field.rbn_right_red) \
& ((ssize_t)-2)))
#define rbp_right_set(a_type, a_field, a_node, a_right) do { \
(a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) a_right) \
| (((uintptr_t) (a_node)->a_field.rbn_right_red) & ((size_t)1))); \
} while (0)
/* Color accessors. */
#define rbp_red_get(a_type, a_field, a_node) \
((bool) (((uintptr_t) (a_node)->a_field.rbn_right_red) \
& ((size_t)1)))
#define rbp_color_set(a_type, a_field, a_node, a_red) do { \
(a_node)->a_field.rbn_right_red = (a_type *) ((((intptr_t) \
(a_node)->a_field.rbn_right_red) & ((ssize_t)-2)) \
| ((ssize_t)a_red)); \
} while (0)
#define rbp_red_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) \
(a_node)->a_field.rbn_right_red) | ((size_t)1)); \
} while (0)
#define rbp_black_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_right_red = (a_type *) (((intptr_t) \
(a_node)->a_field.rbn_right_red) & ((ssize_t)-2)); \
} while (0)
/* Node initializer. */
#define rbp_node_new(a_type, a_field, a_tree, a_node) do { \
rbp_left_set(a_type, a_field, (a_node), &(a_tree)->rbt_nil); \
rbp_right_set(a_type, a_field, (a_node), &(a_tree)->rbt_nil); \
rbp_red_set(a_type, a_field, (a_node)); \
} while (0)
/* Tree initializer. */
#define rb_new(a_type, a_field, a_tree) do { \
(a_tree)->rbt_root = &(a_tree)->rbt_nil; \
rbp_node_new(a_type, a_field, a_tree, &(a_tree)->rbt_nil); \
rbp_black_set(a_type, a_field, &(a_tree)->rbt_nil); \
} while (0)
/* Tree operations. */
#define rbp_black_height(a_type, a_field, a_tree, r_height) do { \
a_type *rbp_bh_t; \
for (rbp_bh_t = (a_tree)->rbt_root, (r_height) = 0; \
rbp_bh_t != &(a_tree)->rbt_nil; \
rbp_bh_t = rbp_left_get(a_type, a_field, rbp_bh_t)) { \
if (rbp_red_get(a_type, a_field, rbp_bh_t) == false) { \
(r_height)++; \
} \
} \
} while (0)
#define rbp_first(a_type, a_field, a_tree, a_root, r_node) do { \
for ((r_node) = (a_root); \
rbp_left_get(a_type, a_field, (r_node)) != &(a_tree)->rbt_nil; \
(r_node) = rbp_left_get(a_type, a_field, (r_node))) { \
} \
} while (0)
#define rbp_last(a_type, a_field, a_tree, a_root, r_node) do { \
for ((r_node) = (a_root); \
rbp_right_get(a_type, a_field, (r_node)) != &(a_tree)->rbt_nil; \
(r_node) = rbp_right_get(a_type, a_field, (r_node))) { \
} \
} while (0)
#define rbp_next(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \
if (rbp_right_get(a_type, a_field, (a_node)) \
!= &(a_tree)->rbt_nil) { \
rbp_first(a_type, a_field, a_tree, rbp_right_get(a_type, \
a_field, (a_node)), (r_node)); \
} else { \
a_type *rbp_n_t = (a_tree)->rbt_root; \
assert(rbp_n_t != &(a_tree)->rbt_nil); \
(r_node) = &(a_tree)->rbt_nil; \
while (true) { \
int rbp_n_cmp = (a_cmp)((a_node), rbp_n_t); \
if (rbp_n_cmp < 0) { \
(r_node) = rbp_n_t; \
rbp_n_t = rbp_left_get(a_type, a_field, rbp_n_t); \
} else if (rbp_n_cmp > 0) { \
rbp_n_t = rbp_right_get(a_type, a_field, rbp_n_t); \
} else { \
break; \
} \
assert(rbp_n_t != &(a_tree)->rbt_nil); \
} \
} \
} while (0)
#define rbp_prev(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \
if (rbp_left_get(a_type, a_field, (a_node)) != &(a_tree)->rbt_nil) {\
rbp_last(a_type, a_field, a_tree, rbp_left_get(a_type, \
a_field, (a_node)), (r_node)); \
} else { \
a_type *rbp_p_t = (a_tree)->rbt_root; \
assert(rbp_p_t != &(a_tree)->rbt_nil); \
(r_node) = &(a_tree)->rbt_nil; \
while (true) { \
int rbp_p_cmp = (a_cmp)((a_node), rbp_p_t); \
if (rbp_p_cmp < 0) { \
rbp_p_t = rbp_left_get(a_type, a_field, rbp_p_t); \
} else if (rbp_p_cmp > 0) { \
(r_node) = rbp_p_t; \
rbp_p_t = rbp_right_get(a_type, a_field, rbp_p_t); \
} else { \
break; \
} \
assert(rbp_p_t != &(a_tree)->rbt_nil); \
} \
} \
} while (0)
#define rb_first(a_type, a_field, a_tree, r_node) do { \
rbp_first(a_type, a_field, a_tree, (a_tree)->rbt_root, (r_node)); \
if ((r_node) == &(a_tree)->rbt_nil) { \
(r_node) = NULL; \
} \
} while (0)
#define rb_last(a_type, a_field, a_tree, r_node) do { \
rbp_last(a_type, a_field, a_tree, (a_tree)->rbt_root, r_node); \
if ((r_node) == &(a_tree)->rbt_nil) { \
(r_node) = NULL; \
} \
} while (0)
#define rb_next(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \
rbp_next(a_type, a_field, a_cmp, a_tree, (a_node), (r_node)); \
if ((r_node) == &(a_tree)->rbt_nil) { \
(r_node) = NULL; \
} \
} while (0)
#define rb_prev(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \
rbp_prev(a_type, a_field, a_cmp, a_tree, (a_node), (r_node)); \
if ((r_node) == &(a_tree)->rbt_nil) { \
(r_node) = NULL; \
} \
} while (0)
#define rb_search(a_type, a_field, a_cmp, a_tree, a_key, r_node) do { \
int rbp_se_cmp; \
(r_node) = (a_tree)->rbt_root; \
while ((r_node) != &(a_tree)->rbt_nil \
&& (rbp_se_cmp = (a_cmp)((a_key), (r_node))) != 0) { \
if (rbp_se_cmp < 0) { \
(r_node) = rbp_left_get(a_type, a_field, (r_node)); \
} else { \
(r_node) = rbp_right_get(a_type, a_field, (r_node)); \
} \
} \
if ((r_node) == &(a_tree)->rbt_nil) { \
(r_node) = NULL; \
} \
} while (0)
/*
* Find a match if it exists. Otherwise, find the next greater node, if one
* exists.
*/
#define rb_nsearch(a_type, a_field, a_cmp, a_tree, a_key, r_node) do { \
a_type *rbp_ns_t = (a_tree)->rbt_root; \
(r_node) = NULL; \
while (rbp_ns_t != &(a_tree)->rbt_nil) { \
int rbp_ns_cmp = (a_cmp)((a_key), rbp_ns_t); \
if (rbp_ns_cmp < 0) { \
(r_node) = rbp_ns_t; \
rbp_ns_t = rbp_left_get(a_type, a_field, rbp_ns_t); \
} else if (rbp_ns_cmp > 0) { \
rbp_ns_t = rbp_right_get(a_type, a_field, rbp_ns_t); \
} else { \
(r_node) = rbp_ns_t; \
break; \
} \
} \
} while (0)
/*
* Find a match if it exists. Otherwise, find the previous lesser node, if one
* exists.
*/
#define rb_psearch(a_type, a_field, a_cmp, a_tree, a_key, r_node) do { \
a_type *rbp_ps_t = (a_tree)->rbt_root; \
(r_node) = NULL; \
while (rbp_ps_t != &(a_tree)->rbt_nil) { \
int rbp_ps_cmp = (a_cmp)((a_key), rbp_ps_t); \
if (rbp_ps_cmp < 0) { \
rbp_ps_t = rbp_left_get(a_type, a_field, rbp_ps_t); \
} else if (rbp_ps_cmp > 0) { \
(r_node) = rbp_ps_t; \
rbp_ps_t = rbp_right_get(a_type, a_field, rbp_ps_t); \
} else { \
(r_node) = rbp_ps_t; \
break; \
} \
} \
} while (0)
#define rbp_rotate_left(a_type, a_field, a_node, r_node) do { \
(r_node) = rbp_right_get(a_type, a_field, (a_node)); \
rbp_right_set(a_type, a_field, (a_node), \
rbp_left_get(a_type, a_field, (r_node))); \
rbp_left_set(a_type, a_field, (r_node), (a_node)); \
} while (0)
#define rbp_rotate_right(a_type, a_field, a_node, r_node) do { \
(r_node) = rbp_left_get(a_type, a_field, (a_node)); \
rbp_left_set(a_type, a_field, (a_node), \
rbp_right_get(a_type, a_field, (r_node))); \
rbp_right_set(a_type, a_field, (r_node), (a_node)); \
} while (0)
#define rbp_lean_left(a_type, a_field, a_node, r_node) do { \
bool rbp_ll_red; \
rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \
rbp_ll_red = rbp_red_get(a_type, a_field, (a_node)); \
rbp_color_set(a_type, a_field, (r_node), rbp_ll_red); \
rbp_red_set(a_type, a_field, (a_node)); \
} while (0)
#define rbp_lean_right(a_type, a_field, a_node, r_node) do { \
bool rbp_lr_red; \
rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \
rbp_lr_red = rbp_red_get(a_type, a_field, (a_node)); \
rbp_color_set(a_type, a_field, (r_node), rbp_lr_red); \
rbp_red_set(a_type, a_field, (a_node)); \
} while (0)
#define rbp_move_red_left(a_type, a_field, a_node, r_node) do { \
a_type *rbp_mrl_t, *rbp_mrl_u; \
rbp_mrl_t = rbp_left_get(a_type, a_field, (a_node)); \
rbp_red_set(a_type, a_field, rbp_mrl_t); \
rbp_mrl_t = rbp_right_get(a_type, a_field, (a_node)); \
rbp_mrl_u = rbp_left_get(a_type, a_field, rbp_mrl_t); \
if (rbp_red_get(a_type, a_field, rbp_mrl_u)) { \
rbp_rotate_right(a_type, a_field, rbp_mrl_t, rbp_mrl_u); \
rbp_right_set(a_type, a_field, (a_node), rbp_mrl_u); \
rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \
rbp_mrl_t = rbp_right_get(a_type, a_field, (a_node)); \
if (rbp_red_get(a_type, a_field, rbp_mrl_t)) { \
rbp_black_set(a_type, a_field, rbp_mrl_t); \
rbp_red_set(a_type, a_field, (a_node)); \
rbp_rotate_left(a_type, a_field, (a_node), rbp_mrl_t); \
rbp_left_set(a_type, a_field, (r_node), rbp_mrl_t); \
} else { \
rbp_black_set(a_type, a_field, (a_node)); \
} \
} else { \
rbp_red_set(a_type, a_field, (a_node)); \
rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \
} \
} while (0)
#define rbp_move_red_right(a_type, a_field, a_node, r_node) do { \
a_type *rbp_mrr_t; \
rbp_mrr_t = rbp_left_get(a_type, a_field, (a_node)); \
if (rbp_red_get(a_type, a_field, rbp_mrr_t)) { \
a_type *rbp_mrr_u, *rbp_mrr_v; \
rbp_mrr_u = rbp_right_get(a_type, a_field, rbp_mrr_t); \
rbp_mrr_v = rbp_left_get(a_type, a_field, rbp_mrr_u); \
if (rbp_red_get(a_type, a_field, rbp_mrr_v)) { \
rbp_color_set(a_type, a_field, rbp_mrr_u, \
rbp_red_get(a_type, a_field, (a_node))); \
rbp_black_set(a_type, a_field, rbp_mrr_v); \
rbp_rotate_left(a_type, a_field, rbp_mrr_t, rbp_mrr_u); \
rbp_left_set(a_type, a_field, (a_node), rbp_mrr_u); \
rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \
rbp_rotate_left(a_type, a_field, (a_node), rbp_mrr_t); \
rbp_right_set(a_type, a_field, (r_node), rbp_mrr_t); \
} else { \
rbp_color_set(a_type, a_field, rbp_mrr_t, \
rbp_red_get(a_type, a_field, (a_node))); \
rbp_red_set(a_type, a_field, rbp_mrr_u); \
rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \
rbp_rotate_left(a_type, a_field, (a_node), rbp_mrr_t); \
rbp_right_set(a_type, a_field, (r_node), rbp_mrr_t); \
} \
rbp_red_set(a_type, a_field, (a_node)); \
} else { \
rbp_red_set(a_type, a_field, rbp_mrr_t); \
rbp_mrr_t = rbp_left_get(a_type, a_field, rbp_mrr_t); \
if (rbp_red_get(a_type, a_field, rbp_mrr_t)) { \
rbp_black_set(a_type, a_field, rbp_mrr_t); \
rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \
rbp_rotate_left(a_type, a_field, (a_node), rbp_mrr_t); \
rbp_right_set(a_type, a_field, (r_node), rbp_mrr_t); \
} else { \
rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \
} \
} \
} while (0)
#define rb_insert(a_type, a_field, a_cmp, a_tree, a_node) do { \
a_type rbp_i_s; \
a_type *rbp_i_g, *rbp_i_p, *rbp_i_c, *rbp_i_t, *rbp_i_u; \
int rbp_i_cmp = 0; \
rbp_i_g = &(a_tree)->rbt_nil; \
rbp_left_set(a_type, a_field, &rbp_i_s, (a_tree)->rbt_root); \
rbp_right_set(a_type, a_field, &rbp_i_s, &(a_tree)->rbt_nil); \
rbp_black_set(a_type, a_field, &rbp_i_s); \
rbp_i_p = &rbp_i_s; \
rbp_i_c = (a_tree)->rbt_root; \
/* Iteratively search down the tree for the insertion point, */\
/* splitting 4-nodes as they are encountered. At the end of each */\
/* iteration, rbp_i_g->rbp_i_p->rbp_i_c is a 3-level path down */\
/* the tree, assuming a sufficiently deep tree. */\
while (rbp_i_c != &(a_tree)->rbt_nil) { \
rbp_i_t = rbp_left_get(a_type, a_field, rbp_i_c); \
rbp_i_u = rbp_left_get(a_type, a_field, rbp_i_t); \
if (rbp_red_get(a_type, a_field, rbp_i_t) \
&& rbp_red_get(a_type, a_field, rbp_i_u)) { \
/* rbp_i_c is the top of a logical 4-node, so split it. */\
/* This iteration does not move down the tree, due to the */\
/* disruptiveness of node splitting. */\
/* */\
/* Rotate right. */\
rbp_rotate_right(a_type, a_field, rbp_i_c, rbp_i_t); \
/* Pass red links up one level. */\
rbp_i_u = rbp_left_get(a_type, a_field, rbp_i_t); \
rbp_black_set(a_type, a_field, rbp_i_u); \
if (rbp_left_get(a_type, a_field, rbp_i_p) == rbp_i_c) { \
rbp_left_set(a_type, a_field, rbp_i_p, rbp_i_t); \
rbp_i_c = rbp_i_t; \
} else { \
/* rbp_i_c was the right child of rbp_i_p, so rotate */\
/* left in order to maintain the left-leaning */\
/* invariant. */\
assert(rbp_right_get(a_type, a_field, rbp_i_p) \
== rbp_i_c); \
rbp_right_set(a_type, a_field, rbp_i_p, rbp_i_t); \
rbp_lean_left(a_type, a_field, rbp_i_p, rbp_i_u); \
if (rbp_left_get(a_type, a_field, rbp_i_g) == rbp_i_p) {\
rbp_left_set(a_type, a_field, rbp_i_g, rbp_i_u); \
} else { \
assert(rbp_right_get(a_type, a_field, rbp_i_g) \
== rbp_i_p); \
rbp_right_set(a_type, a_field, rbp_i_g, rbp_i_u); \
} \
rbp_i_p = rbp_i_u; \
rbp_i_cmp = (a_cmp)((a_node), rbp_i_p); \
if (rbp_i_cmp < 0) { \
rbp_i_c = rbp_left_get(a_type, a_field, rbp_i_p); \
} else { \
assert(rbp_i_cmp > 0); \
rbp_i_c = rbp_right_get(a_type, a_field, rbp_i_p); \
} \
continue; \
} \
} \
rbp_i_g = rbp_i_p; \
rbp_i_p = rbp_i_c; \
rbp_i_cmp = (a_cmp)((a_node), rbp_i_c); \
if (rbp_i_cmp < 0) { \
rbp_i_c = rbp_left_get(a_type, a_field, rbp_i_c); \
} else { \
assert(rbp_i_cmp > 0); \
rbp_i_c = rbp_right_get(a_type, a_field, rbp_i_c); \
} \
} \
/* rbp_i_p now refers to the node under which to insert. */\
rbp_node_new(a_type, a_field, a_tree, (a_node)); \
if (rbp_i_cmp > 0) { \
rbp_right_set(a_type, a_field, rbp_i_p, (a_node)); \
rbp_lean_left(a_type, a_field, rbp_i_p, rbp_i_t); \
if (rbp_left_get(a_type, a_field, rbp_i_g) == rbp_i_p) { \
rbp_left_set(a_type, a_field, rbp_i_g, rbp_i_t); \
} else if (rbp_right_get(a_type, a_field, rbp_i_g) == rbp_i_p) {\
rbp_right_set(a_type, a_field, rbp_i_g, rbp_i_t); \
} \
} else { \
rbp_left_set(a_type, a_field, rbp_i_p, (a_node)); \
} \
/* Update the root and make sure that it is black. */\
(a_tree)->rbt_root = rbp_left_get(a_type, a_field, &rbp_i_s); \
rbp_black_set(a_type, a_field, (a_tree)->rbt_root); \
} while (0)
#define rb_remove(a_type, a_field, a_cmp, a_tree, a_node) do { \
a_type rbp_r_s; \
a_type *rbp_r_p, *rbp_r_c, *rbp_r_xp, *rbp_r_t, *rbp_r_u; \
int rbp_r_cmp; \
rbp_left_set(a_type, a_field, &rbp_r_s, (a_tree)->rbt_root); \
rbp_right_set(a_type, a_field, &rbp_r_s, &(a_tree)->rbt_nil); \
rbp_black_set(a_type, a_field, &rbp_r_s); \
rbp_r_p = &rbp_r_s; \
rbp_r_c = (a_tree)->rbt_root; \
rbp_r_xp = &(a_tree)->rbt_nil; \
/* Iterate down the tree, but always transform 2-nodes to 3- or */\
/* 4-nodes in order to maintain the invariant that the current */\
/* node is not a 2-node. This allows simple deletion once a leaf */\
/* is reached. Handle the root specially though, since there may */\
/* be no way to convert it from a 2-node to a 3-node. */\
rbp_r_cmp = (a_cmp)((a_node), rbp_r_c); \
if (rbp_r_cmp < 0) { \
rbp_r_t = rbp_left_get(a_type, a_field, rbp_r_c); \
rbp_r_u = rbp_left_get(a_type, a_field, rbp_r_t); \
if (rbp_red_get(a_type, a_field, rbp_r_t) == false \
&& rbp_red_get(a_type, a_field, rbp_r_u) == false) { \
/* Apply standard transform to prepare for left move. */\
rbp_move_red_left(a_type, a_field, rbp_r_c, rbp_r_t); \
rbp_black_set(a_type, a_field, rbp_r_t); \
rbp_left_set(a_type, a_field, rbp_r_p, rbp_r_t); \
rbp_r_c = rbp_r_t; \
} else { \
/* Move left. */\
rbp_r_p = rbp_r_c; \
rbp_r_c = rbp_left_get(a_type, a_field, rbp_r_c); \
} \
} else { \
if (rbp_r_cmp == 0) { \
assert((a_node) == rbp_r_c); \
if (rbp_right_get(a_type, a_field, rbp_r_c) \
== &(a_tree)->rbt_nil) { \
/* Delete root node (which is also a leaf node). */\
if (rbp_left_get(a_type, a_field, rbp_r_c) \
!= &(a_tree)->rbt_nil) { \
rbp_lean_right(a_type, a_field, rbp_r_c, rbp_r_t); \
rbp_right_set(a_type, a_field, rbp_r_t, \
&(a_tree)->rbt_nil); \
} else { \
rbp_r_t = &(a_tree)->rbt_nil; \
} \
rbp_left_set(a_type, a_field, rbp_r_p, rbp_r_t); \
} else { \
/* This is the node we want to delete, but we will */\
/* instead swap it with its successor and delete the */\
/* successor. Record enough information to do the */\
/* swap later. rbp_r_xp is the a_node's parent. */\
rbp_r_xp = rbp_r_p; \
rbp_r_cmp = 1; /* Note that deletion is incomplete. */\
} \
} \
if (rbp_r_cmp == 1) { \
if (rbp_red_get(a_type, a_field, rbp_left_get(a_type, \
a_field, rbp_right_get(a_type, a_field, rbp_r_c))) \
== false) { \
rbp_r_t = rbp_left_get(a_type, a_field, rbp_r_c); \
if (rbp_red_get(a_type, a_field, rbp_r_t)) { \
/* Standard transform. */\
rbp_move_red_right(a_type, a_field, rbp_r_c, \
rbp_r_t); \
} else { \
/* Root-specific transform. */\
rbp_red_set(a_type, a_field, rbp_r_c); \
rbp_r_u = rbp_left_get(a_type, a_field, rbp_r_t); \
if (rbp_red_get(a_type, a_field, rbp_r_u)) { \
rbp_black_set(a_type, a_field, rbp_r_u); \
rbp_rotate_right(a_type, a_field, rbp_r_c, \
rbp_r_t); \
rbp_rotate_left(a_type, a_field, rbp_r_c, \
rbp_r_u); \
rbp_right_set(a_type, a_field, rbp_r_t, \
rbp_r_u); \
} else { \
rbp_red_set(a_type, a_field, rbp_r_t); \
rbp_rotate_left(a_type, a_field, rbp_r_c, \
rbp_r_t); \
} \
} \
rbp_left_set(a_type, a_field, rbp_r_p, rbp_r_t); \
rbp_r_c = rbp_r_t; \
} else { \
/* Move right. */\
rbp_r_p = rbp_r_c; \
rbp_r_c = rbp_right_get(a_type, a_field, rbp_r_c); \
} \
} \
} \
if (rbp_r_cmp != 0) { \
while (true) { \
assert(rbp_r_p != &(a_tree)->rbt_nil); \
rbp_r_cmp = (a_cmp)((a_node), rbp_r_c); \
if (rbp_r_cmp < 0) { \
rbp_r_t = rbp_left_get(a_type, a_field, rbp_r_c); \
if (rbp_r_t == &(a_tree)->rbt_nil) { \
/* rbp_r_c now refers to the successor node to */\
/* relocate, and rbp_r_xp/a_node refer to the */\
/* context for the relocation. */\
if (rbp_left_get(a_type, a_field, rbp_r_xp) \
== (a_node)) { \
rbp_left_set(a_type, a_field, rbp_r_xp, \
rbp_r_c); \
} else { \
assert(rbp_right_get(a_type, a_field, \
rbp_r_xp) == (a_node)); \
rbp_right_set(a_type, a_field, rbp_r_xp, \
rbp_r_c); \
} \
rbp_left_set(a_type, a_field, rbp_r_c, \
rbp_left_get(a_type, a_field, (a_node))); \
rbp_right_set(a_type, a_field, rbp_r_c, \
rbp_right_get(a_type, a_field, (a_node))); \
rbp_color_set(a_type, a_field, rbp_r_c, \
rbp_red_get(a_type, a_field, (a_node))); \
if (rbp_left_get(a_type, a_field, rbp_r_p) \
== rbp_r_c) { \
rbp_left_set(a_type, a_field, rbp_r_p, \
&(a_tree)->rbt_nil); \
} else { \
assert(rbp_right_get(a_type, a_field, rbp_r_p) \
== rbp_r_c); \
rbp_right_set(a_type, a_field, rbp_r_p, \
&(a_tree)->rbt_nil); \
} \
break; \
} \
rbp_r_u = rbp_left_get(a_type, a_field, rbp_r_t); \
if (rbp_red_get(a_type, a_field, rbp_r_t) == false \
&& rbp_red_get(a_type, a_field, rbp_r_u) == false) { \
rbp_move_red_left(a_type, a_field, rbp_r_c, \
rbp_r_t); \
if (rbp_left_get(a_type, a_field, rbp_r_p) \
== rbp_r_c) { \
rbp_left_set(a_type, a_field, rbp_r_p, rbp_r_t);\
} else { \
rbp_right_set(a_type, a_field, rbp_r_p, \
rbp_r_t); \
} \
rbp_r_c = rbp_r_t; \
} else { \
rbp_r_p = rbp_r_c; \
rbp_r_c = rbp_left_get(a_type, a_field, rbp_r_c); \
} \
} else { \
/* Check whether to delete this node (it has to be */\
/* the correct node and a leaf node). */\
if (rbp_r_cmp == 0) { \
assert((a_node) == rbp_r_c); \
if (rbp_right_get(a_type, a_field, rbp_r_c) \
== &(a_tree)->rbt_nil) { \
/* Delete leaf node. */\
if (rbp_left_get(a_type, a_field, rbp_r_c) \
!= &(a_tree)->rbt_nil) { \
rbp_lean_right(a_type, a_field, rbp_r_c, \
rbp_r_t); \
rbp_right_set(a_type, a_field, rbp_r_t, \
&(a_tree)->rbt_nil); \
} else { \
rbp_r_t = &(a_tree)->rbt_nil; \
} \
if (rbp_left_get(a_type, a_field, rbp_r_p) \
== rbp_r_c) { \
rbp_left_set(a_type, a_field, rbp_r_p, \
rbp_r_t); \
} else { \
rbp_right_set(a_type, a_field, rbp_r_p, \
rbp_r_t); \
} \
break; \
} else { \
/* This is the node we want to delete, but we */\
/* will instead swap it with its successor */\
/* and delete the successor. Record enough */\
/* information to do the swap later. */\
/* rbp_r_xp is a_node's parent. */\
rbp_r_xp = rbp_r_p; \
} \
} \
rbp_r_t = rbp_right_get(a_type, a_field, rbp_r_c); \
rbp_r_u = rbp_left_get(a_type, a_field, rbp_r_t); \
if (rbp_red_get(a_type, a_field, rbp_r_u) == false) { \
rbp_move_red_right(a_type, a_field, rbp_r_c, \
rbp_r_t); \
if (rbp_left_get(a_type, a_field, rbp_r_p) \
== rbp_r_c) { \
rbp_left_set(a_type, a_field, rbp_r_p, rbp_r_t);\
} else { \
rbp_right_set(a_type, a_field, rbp_r_p, \
rbp_r_t); \
} \
rbp_r_c = rbp_r_t; \
} else { \
rbp_r_p = rbp_r_c; \
rbp_r_c = rbp_right_get(a_type, a_field, rbp_r_c); \
} \
} \
} \
} \
/* Update root. */\
(a_tree)->rbt_root = rbp_left_get(a_type, a_field, &rbp_r_s); \
} while (0)
/*
* The rb_wrap() macro provides a convenient way to wrap functions around the
* cpp macros. The main benefits of wrapping are that 1) repeated macro
* expansion can cause code bloat, especially for rb_{insert,remove)(), and
* 2) type, linkage, comparison functions, etc. need not be specified at every
* call point.
*/
#define rb_wrap(a_attr, a_prefix, a_tree_type, a_type, a_field, a_cmp) \
a_attr void \
a_prefix##new(a_tree_type *tree) { \
rb_new(a_type, a_field, tree); \
} \
a_attr a_type * \
a_prefix##first(a_tree_type *tree) { \
a_type *ret; \
rb_first(a_type, a_field, tree, ret); \
return (ret); \
} \
a_attr a_type * \
a_prefix##last(a_tree_type *tree) { \
a_type *ret; \
rb_last(a_type, a_field, tree, ret); \
return (ret); \
} \
a_attr a_type * \
a_prefix##next(a_tree_type *tree, a_type *node) { \
a_type *ret; \
rb_next(a_type, a_field, a_cmp, tree, node, ret); \
return (ret); \
} \
a_attr a_type * \
a_prefix##prev(a_tree_type *tree, a_type *node) { \
a_type *ret; \
rb_prev(a_type, a_field, a_cmp, tree, node, ret); \
return (ret); \
} \
a_attr a_type * \
a_prefix##search(a_tree_type *tree, a_type *key) { \
a_type *ret; \
rb_search(a_type, a_field, a_cmp, tree, key, ret); \
return (ret); \
} \
a_attr a_type * \
a_prefix##nsearch(a_tree_type *tree, a_type *key) { \
a_type *ret; \
rb_nsearch(a_type, a_field, a_cmp, tree, key, ret); \
return (ret); \
} \
a_attr a_type * \
a_prefix##psearch(a_tree_type *tree, a_type *key) { \
a_type *ret; \
rb_psearch(a_type, a_field, a_cmp, tree, key, ret); \
return (ret); \
} \
a_attr void \
a_prefix##insert(a_tree_type *tree, a_type *node) { \
rb_insert(a_type, a_field, a_cmp, tree, node); \
} \
a_attr void \
a_prefix##remove(a_tree_type *tree, a_type *node) { \
rb_remove(a_type, a_field, a_cmp, tree, node); \
}
/*
* The iterators simulate recursion via an array of pointers that store the
* current path. This is critical to performance, since a series of calls to
* rb_{next,prev}() would require time proportional to (n lg n), whereas this
* implementation only requires time proportional to (n).
*
* Since the iterators cache a path down the tree, any tree modification may
* cause the cached path to become invalid. In order to continue iteration,
* use something like the following sequence:
*
* {
* a_type *node, *tnode;
*
* rb_foreach_begin(a_type, a_field, a_tree, node) {
* ...
* rb_next(a_type, a_field, a_cmp, a_tree, node, tnode);
* rb_remove(a_type, a_field, a_cmp, a_tree, node);
* rb_foreach_next(a_type, a_field, a_cmp, a_tree, tnode);
* ...
* } rb_foreach_end(a_type, a_field, a_tree, node)
* }
*
* Note that this idiom is not advised if every iteration modifies the tree,
* since in that case there is no algorithmic complexity improvement over a
* series of rb_{next,prev}() calls, thus making the setup overhead wasted
* effort.
*/
#define rb_foreach_begin(a_type, a_field, a_tree, a_var) { \
/* Compute the maximum possible tree depth (3X the black height). */\
unsigned rbp_f_height; \
rbp_black_height(a_type, a_field, a_tree, rbp_f_height); \
rbp_f_height *= 3; \
{ \
/* Initialize the path to contain the left spine. */\
a_type *rbp_f_path[rbp_f_height]; \
a_type *rbp_f_node; \
bool rbp_f_synced = false; \
unsigned rbp_f_depth = 0; \
if ((a_tree)->rbt_root != &(a_tree)->rbt_nil) { \
rbp_f_path[rbp_f_depth] = (a_tree)->rbt_root; \
rbp_f_depth++; \
while ((rbp_f_node = rbp_left_get(a_type, a_field, \
rbp_f_path[rbp_f_depth-1])) != &(a_tree)->rbt_nil) { \
rbp_f_path[rbp_f_depth] = rbp_f_node; \
rbp_f_depth++; \
} \
} \
/* While the path is non-empty, iterate. */\
while (rbp_f_depth > 0) { \
(a_var) = rbp_f_path[rbp_f_depth-1];
/* Only use if modifying the tree during iteration. */
#define rb_foreach_next(a_type, a_field, a_cmp, a_tree, a_node) \
/* Re-initialize the path to contain the path to a_node. */\
rbp_f_depth = 0; \
if (a_node != NULL) { \
if ((a_tree)->rbt_root != &(a_tree)->rbt_nil) { \
rbp_f_path[rbp_f_depth] = (a_tree)->rbt_root; \
rbp_f_depth++; \
rbp_f_node = rbp_f_path[0]; \
while (true) { \
int rbp_f_cmp = (a_cmp)((a_node), \
rbp_f_path[rbp_f_depth-1]); \
if (rbp_f_cmp < 0) { \
rbp_f_node = rbp_left_get(a_type, a_field, \
rbp_f_path[rbp_f_depth-1]); \
} else if (rbp_f_cmp > 0) { \
rbp_f_node = rbp_right_get(a_type, a_field, \
rbp_f_path[rbp_f_depth-1]); \
} else { \
break; \
} \
assert(rbp_f_node != &(a_tree)->rbt_nil); \
rbp_f_path[rbp_f_depth] = rbp_f_node; \
rbp_f_depth++; \
} \
} \
} \
rbp_f_synced = true;
#define rb_foreach_end(a_type, a_field, a_tree, a_var) \
if (rbp_f_synced) { \
rbp_f_synced = false; \
continue; \
} \
/* Find the successor. */\
if ((rbp_f_node = rbp_right_get(a_type, a_field, \
rbp_f_path[rbp_f_depth-1])) != &(a_tree)->rbt_nil) { \
/* The successor is the left-most node in the right */\
/* subtree. */\
rbp_f_path[rbp_f_depth] = rbp_f_node; \
rbp_f_depth++; \
while ((rbp_f_node = rbp_left_get(a_type, a_field, \
rbp_f_path[rbp_f_depth-1])) != &(a_tree)->rbt_nil) { \
rbp_f_path[rbp_f_depth] = rbp_f_node; \
rbp_f_depth++; \
} \
} else { \
/* The successor is above the current node. Unwind */\
/* until a left-leaning edge is removed from the */\
/* path, or the path is empty. */\
for (rbp_f_depth--; rbp_f_depth > 0; rbp_f_depth--) { \
if (rbp_left_get(a_type, a_field, \
rbp_f_path[rbp_f_depth-1]) \
== rbp_f_path[rbp_f_depth]) { \
break; \
} \
} \
} \
} \
} \
}
#define rb_foreach_reverse_begin(a_type, a_field, a_tree, a_var) { \
/* Compute the maximum possible tree depth (3X the black height). */\
unsigned rbp_fr_height; \
rbp_black_height(a_type, a_field, a_tree, rbp_fr_height); \
rbp_fr_height *= 3; \
{ \
/* Initialize the path to contain the right spine. */\
a_type *rbp_fr_path[rbp_fr_height]; \
a_type *rbp_fr_node; \
bool rbp_fr_synced = false; \
unsigned rbp_fr_depth = 0; \
if ((a_tree)->rbt_root != &(a_tree)->rbt_nil) { \
rbp_fr_path[rbp_fr_depth] = (a_tree)->rbt_root; \
rbp_fr_depth++; \
while ((rbp_fr_node = rbp_right_get(a_type, a_field, \
rbp_fr_path[rbp_fr_depth-1])) != &(a_tree)->rbt_nil) { \
rbp_fr_path[rbp_fr_depth] = rbp_fr_node; \
rbp_fr_depth++; \
} \
} \
/* While the path is non-empty, iterate. */\
while (rbp_fr_depth > 0) { \
(a_var) = rbp_fr_path[rbp_fr_depth-1];
/* Only use if modifying the tree during iteration. */
#define rb_foreach_reverse_prev(a_type, a_field, a_cmp, a_tree, a_node) \
/* Re-initialize the path to contain the path to a_node. */\
rbp_fr_depth = 0; \
if (a_node != NULL) { \
if ((a_tree)->rbt_root != &(a_tree)->rbt_nil) { \
rbp_fr_path[rbp_fr_depth] = (a_tree)->rbt_root; \
rbp_fr_depth++; \
rbp_fr_node = rbp_fr_path[0]; \
while (true) { \
int rbp_fr_cmp = (a_cmp)((a_node), \
rbp_fr_path[rbp_fr_depth-1]); \
if (rbp_fr_cmp < 0) { \
rbp_fr_node = rbp_left_get(a_type, a_field, \
rbp_fr_path[rbp_fr_depth-1]); \
} else if (rbp_fr_cmp > 0) { \
rbp_fr_node = rbp_right_get(a_type, a_field,\
rbp_fr_path[rbp_fr_depth-1]); \
} else { \
break; \
} \
assert(rbp_fr_node != &(a_tree)->rbt_nil); \
rbp_fr_path[rbp_fr_depth] = rbp_fr_node; \
rbp_fr_depth++; \
} \
} \
} \
rbp_fr_synced = true;
#define rb_foreach_reverse_end(a_type, a_field, a_tree, a_var) \
if (rbp_fr_synced) { \
rbp_fr_synced = false; \
continue; \
} \
if (rbp_fr_depth == 0) { \
/* rb_foreach_reverse_sync() was called with a NULL */\
/* a_node. */\
break; \
} \
/* Find the predecessor. */\
if ((rbp_fr_node = rbp_left_get(a_type, a_field, \
rbp_fr_path[rbp_fr_depth-1])) != &(a_tree)->rbt_nil) { \
/* The predecessor is the right-most node in the left */\
/* subtree. */\
rbp_fr_path[rbp_fr_depth] = rbp_fr_node; \
rbp_fr_depth++; \
while ((rbp_fr_node = rbp_right_get(a_type, a_field, \
rbp_fr_path[rbp_fr_depth-1])) != &(a_tree)->rbt_nil) {\
rbp_fr_path[rbp_fr_depth] = rbp_fr_node; \
rbp_fr_depth++; \
} \
} else { \
/* The predecessor is above the current node. Unwind */\
/* until a right-leaning edge is removed from the */\
/* path, or the path is empty. */\
for (rbp_fr_depth--; rbp_fr_depth > 0; rbp_fr_depth--) {\
if (rbp_right_get(a_type, a_field, \
rbp_fr_path[rbp_fr_depth-1]) \
== rbp_fr_path[rbp_fr_depth]) { \
break; \
} \
} \
} \
} \
} \
}
#endif /* RB_H_ */
|
[
"[email protected]"
] | |
42046df355cd5009e9ebcb4096c75f66c01666f5
|
cd07051f8cf581cdc992e8bf4b3debbcacf25176
|
/EIFGENs/tictac/W_code/C9/ev1230d.c
|
9a1e4a4b9c5b1501e0eb9d17034cccd6cdf9c0df
|
[] |
no_license
|
hasahmad/TicTacToe
|
4084fb44a0309ad34adb040fb88e2127984c4108
|
1326d6498608b62786799f46808410f8355388e4
|
refs/heads/master
| 2020-03-29T17:56:35.370256 | 2018-09-25T00:45:31 | 2018-09-25T00:45:31 | 150,186,619 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 3,389 |
c
|
/*
* Class EV_ANY
*/
#include "eif_macros.h"
#ifdef __cplusplus
extern "C" {
#endif
static const EIF_TYPE_INDEX egt_0_1230 [] = {0xFF01,231,0xFFFF};
static const EIF_TYPE_INDEX egt_1_1230 [] = {0xFF01,247,1229,0xFFFF};
static const EIF_TYPE_INDEX egt_2_1230 [] = {0xFF01,1229,0xFFFF};
static const EIF_TYPE_INDEX egt_3_1230 [] = {0,0xFFFF};
static const EIF_TYPE_INDEX egt_4_1230 [] = {0,0xFFFF};
static const EIF_TYPE_INDEX egt_5_1230 [] = {0xFF01,1229,0xFFFF};
static const EIF_TYPE_INDEX egt_6_1230 [] = {0xFF01,1229,0xFFFF};
static const EIF_TYPE_INDEX egt_7_1230 [] = {0,0xFFFF};
static const EIF_TYPE_INDEX egt_8_1230 [] = {0xFF01,15,0xFFFF};
static const EIF_TYPE_INDEX egt_9_1230 [] = {0xFF01,231,0xFFFF};
static const EIF_TYPE_INDEX egt_10_1230 [] = {0xFF01,231,0xFFFF};
static const EIF_TYPE_INDEX egt_11_1230 [] = {0xFF01,25,0xFFFF};
static const EIF_TYPE_INDEX egt_12_1230 [] = {0xFF01,1229,0xFFFF};
static const EIF_TYPE_INDEX egt_13_1230 [] = {0xFF01,1330,0xFFFF};
static const EIF_TYPE_INDEX egt_14_1230 [] = {0xFF01,1351,0xFFFF};
static const struct desc_info desc_1230[] = {
{EIF_GENERIC(NULL), 17512, 0xFFFFFFFF},
{EIF_GENERIC(egt_0_1230), 0, 0xFFFFFFFF},
{EIF_GENERIC(egt_1_1230), 1, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 2, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 3, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 4, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 5, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 6, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 7, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 8, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 9, 0xFFFFFFFF},
{EIF_GENERIC(egt_2_1230), 10, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 17505, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 12, 0xFFFFFFFF},
{EIF_GENERIC(egt_3_1230), 13, 0xFFFFFFFF},
{EIF_GENERIC(egt_4_1230), 14, 0xFFFFFFFF},
{EIF_GENERIC(egt_5_1230), 15, 0xFFFFFFFF},
{EIF_GENERIC(egt_6_1230), 16, 0xFFFFFFFF},
{EIF_GENERIC(egt_7_1230), 17, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 18, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 19, 0xFFFFFFFF},
{EIF_GENERIC(egt_8_1230), 20, 0xFFFFFFFF},
{EIF_GENERIC(egt_9_1230), 21, 0xFFFFFFFF},
{EIF_GENERIC(egt_10_1230), 22, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 23, 0xFFFFFFFF},
{EIF_GENERIC(egt_11_1230), 24, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 17513, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 26, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 27, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x099B /*1229*/), 28, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x01C5 /*226*/), 29, 0xFFFFFFFF},
{EIF_GENERIC(egt_12_1230), 30, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x01 /*0*/), 17514, 0},
{EIF_GENERIC(NULL), 17515, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 17516, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 17517, 0xFFFFFFFF},
{EIF_GENERIC(egt_13_1230), 17518, 8},
{EIF_GENERIC(NULL), 17503, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 0x00, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 0x00, 0xFFFFFFFF},
{EIF_GENERIC(NULL), 17504, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 17506, 0xFFFFFFFF},
{EIF_GENERIC(egt_14_1230), 17507, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x01AD /*214*/), 17508, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 17509, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 17510, 0xFFFFFFFF},
{EIF_NON_GENERIC(0x018F /*199*/), 17511, 0xFFFFFFFF},
};
void Init1230(void)
{
IDSC(desc_1230, 0, 1229);
IDSC(desc_1230 + 1, 1, 1229);
IDSC(desc_1230 + 32, 449, 1229);
}
#ifdef __cplusplus
}
#endif
|
[
"[email protected]"
] | |
10e2b7db9b09dc3f9680016c09a2f3a6f65c0648
|
94e8344ee420ae4d2eb1643e95973845f341a3d2
|
/gcc_4.3.0_mutants/mutant100096_tree-ssa-forwprop.c
|
47eead28c6e76ca836a9c51d33d1f25ddf4474d1
|
[] |
no_license
|
agroce/compilermutants
|
94f1e9ac5b43e1f8e5c2fdc17fa627d434e082f3
|
dc2f572c9bfe1eb7a38999aaf61d5e0a2bc98991
|
refs/heads/master
| 2022-02-26T21:19:35.873618 | 2019-09-24T15:30:14 | 2019-09-24T15:30:14 | 207,345,370 | 1 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 41,513 |
c
|
/* Forward propagation of expressions for single use variables.
Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "ggc.h"
#include "tree.h"
#include "rtl.h"
#include "tm_p.h"
#include "basic-block.h"
#include "timevar.h"
#include "diagnostic.h"
#include "tree-flow.h"
#include "tree-pass.h"
#include "tree-dump.h"
#include "langhooks.h"
#include "flags.h"
/* This pass propagates the RHS of assignment statements into use
sites of the LHS of the assignment. It's basically a specialized
form of tree combination. It is hoped all of this can disappear
when we have a generalized tree combiner.
Note carefully that after propagation the resulting statement
must still be a proper gimple statement. Right now we simply
only perform propagations we know will result in valid gimple
code. One day we'll want to generalize this code.
One class of common cases we handle is forward propagating a single use
variable into a COND_EXPR.
bb0:
x = a COND b;
if (x) goto ... else goto ...
Will be transformed into:
bb0:
if (a COND b) goto ... else goto ...
Similarly for the tests (x == 0), (x != 0), (x == 1) and (x != 1).
Or (assuming c1 and c2 are constants):
bb0:
x = a + c1;
if (x EQ/NEQ c2) goto ... else goto ...
Will be transformed into:
bb0:
if (a EQ/NEQ (c2 - c1)) goto ... else goto ...
Similarly for x = a - c1.
Or
bb0:
x = !a
if (x) goto ... else goto ...
Will be transformed into:
bb0:
if (a == 0) goto ... else goto ...
Similarly for the tests (x == 0), (x != 0), (x == 1) and (x != 1).
For these cases, we propagate A into all, possibly more than one,
COND_EXPRs that use X.
Or
bb0:
x = (typecast) a
if (x) goto ... else goto ...
Will be transformed into:
bb0:
if (a != 0) goto ... else goto ...
(Assuming a is an integral type and x is a boolean or x is an
integral and a is a boolean.)
Similarly for the tests (x == 0), (x != 0), (x == 1) and (x != 1).
For these cases, we propagate A into all, possibly more than one,
COND_EXPRs that use X.
In addition to eliminating the variable and the statement which assigns
a value to the variable, we may be able to later thread the jump without
adding insane complexity in the dominator optimizer.
Also note these transformations can cascade. We handle this by having
a worklist of COND_EXPR statements to examine. As we make a change to
a statement, we put it back on the worklist to examine on the next
iteration of the main loop.
A second class of propagation opportunities arises for ADDR_EXPR
nodes.
ptr = &x->y->z;
res = *ptr;
Will get turned into
res = x->y->z;
Or
ptr = &x[0];
ptr2 = ptr + <constant>;
Will get turned into
ptr2 = &x[constant/elementsize];
Or
ptr = &x[0];
offset = index * element_size;
offset_p = (pointer) offset;
ptr2 = ptr + offset_p
Will get turned into:
ptr2 = &x[index];
We also propagate casts into SWITCH_EXPR and COND_EXPR conditions to
allow us to remove the cast and {NOT_EXPR,NEG_EXPR} into a subsequent
{NOT_EXPR,NEG_EXPR}.
This will (of course) be extended as other needs arise. */
static bool forward_propagate_addr_expr (tree name, tree rhs);
/* Set to true if we delete EH edges during the optimization. */
static bool cfg_changed;
/* Get the next statement we can propagate NAME's value into skipping
trivial copies. Returns the statement that is suitable as a
propagation destination or NULL_TREE if there is no such one.
This only returns destinations in a single-use chain. FINAL_NAME_P
if non-NULL is written to the ssa name that represents the use. */
static tree
get_prop_dest_stmt (tree name, tree *final_name_p)
{
use_operand_p use;
tree use_stmt;
do {
/* If name has multiple uses, bail out. */
if (!single_imm_use (name, &use, &use_stmt))
return NULL_TREE;
/* If this is not a trivial copy, we found it. */
if (TREE_CODE (use_stmt) != GIMPLE_MODIFY_STMT
|| TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 0)) != SSA_NAME
|| GIMPLE_STMT_OPERAND (use_stmt, 1) != name)
break;
/* Continue searching uses of the copy destination. */
name = GIMPLE_STMT_OPERAND (use_stmt, 0);
} while (1);
if (final_name_p)
*final_name_p = name;
return use_stmt;
}
/* Get the statement we can propagate from into NAME skipping
trivial copies. Returns the statement which defines the
propagation source or NULL_TREE if there is no such one.
If SINGLE_USE_ONLY is set considers only sources which have
a single use chain up to NAME. If SINGLE_USE_P is non-null,
it is set to whether the chain to NAME is a single use chain
or not. SINGLE_USE_P is not written to if SINGLE_USE_ONLY is set. */
static tree
get_prop_source_stmt (tree name, bool single_use_only, bool *single_use_p)
{
bool single_use = true;
do {
tree def_stmt = SSA_NAME_DEF_STMT (name);
if (!has_single_use (name))
{
single_use = false;
if (single_use_only)
return NULL_TREE;
}
/* If name is defined by a PHI node or is the default def, bail out. */
if (TREE_CODE (def_stmt) != GIMPLE_MODIFY_STMT)
return NULL_TREE;
/* If name is not a simple copy destination, we found it. */
if (TREE_CODE (GIMPLE_STMT_OPERAND (def_stmt, 1)) != SSA_NAME)
{
if (!single_use_only && single_use_p)
*single_use_p = single_use;
return def_stmt;
}
/* Continue searching the def of the copy source name. */
name = GIMPLE_STMT_OPERAND (def_stmt, 1);
} while (1);
}
/* Checks if the destination ssa name in DEF_STMT can be used as
propagation source. Returns true if so, otherwise false. */
static bool
can_propagate_from (tree def_stmt)
{
tree rhs = GIMPLE_STMT_OPERAND (def_stmt, 1);
/* If the rhs has side-effects we cannot propagate from it. */
if (TREE_SIDE_EFFECTS (rhs))
return false;
/* If the rhs is a load we cannot propagate from it. */
if (REFERENCE_CLASS_P (rhs))
return false;
/* We cannot propagate ssa names that occur in abnormal phi nodes. */
switch (TREE_CODE_LENGTH (TREE_CODE (rhs)))
{
case 3:
if (TREE_OPERAND (rhs, 2) != NULL_TREE
&& TREE_CODE (TREE_OPERAND (rhs, 2)) == SSA_NAME
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND (rhs, 2)))
return false;
case 2:
if (TREE_OPERAND (rhs, 1) != NULL_TREE
&& TREE_CODE (TREE_OPERAND (rhs, 1)) == SSA_NAME
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND (rhs, 1)))
return false;
/* MUTANT (rep_const) */ case -1:
if (TREE_OPERAND (rhs, 0) != NULL_TREE
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND (rhs, 0)))
return false;
break;
default:
return false;
}
/* If the definition is a conversion of a pointer to a function type,
then we can not apply optimizations as some targets require function
pointers to be canonicalized and in this case this optimization could
eliminate a necessary canonicalization. */
if ((TREE_CODE (rhs) == NOP_EXPR
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (rhs, 0)))
&& TREE_CODE (TREE_TYPE (TREE_TYPE
(TREE_OPERAND (rhs, 0)))) == FUNCTION_TYPE)
return false;
return true;
}
/* Remove a copy chain ending in NAME along the defs but not
further or including UP_TO_STMT. If NAME was replaced in
its only use then this function can be used to clean up
dead stmts. Returns true if UP_TO_STMT can be removed
as well, otherwise false. */
static bool
remove_prop_source_from_use (tree name, tree up_to_stmt)
{
block_stmt_iterator bsi;
tree stmt;
do {
if (!has_zero_uses (name))
return false;
stmt = SSA_NAME_DEF_STMT (name);
if (stmt == up_to_stmt)
return true;
bsi = bsi_for_stmt (stmt);
release_defs (stmt);
bsi_remove (&bsi, true);
name = GIMPLE_STMT_OPERAND (stmt, 1);
} while (TREE_CODE (name) == SSA_NAME);
return false;
}
/* Combine OP0 CODE OP1 in the context of a COND_EXPR. Returns
the folded result in a form suitable for COND_EXPR_COND or
NULL_TREE, if there is no suitable simplified form. If
INVARIANT_ONLY is true only gimple_min_invariant results are
considered simplified. */
static tree
combine_cond_expr_cond (enum tree_code code, tree type,
tree op0, tree op1, bool invariant_only)
{
tree t;
gcc_assert (TREE_CODE_CLASS (code) == tcc_comparison);
t = fold_binary (code, type, op0, op1);
if (!t)
return NULL_TREE;
/* Require that we got a boolean type out if we put one in. */
gcc_assert (TREE_CODE (TREE_TYPE (t)) == TREE_CODE (type));
/* Canonicalize the combined condition for use in a COND_EXPR. */
t = canonicalize_cond_expr_cond (t);
/* Bail out if we required an invariant but didn't get one. */
if (!t
|| (invariant_only
&& !is_gimple_min_invariant (t)))
return NULL_TREE;
return t;
}
/* Propagate from the ssa name definition statements of COND_EXPR
in statement STMT into the conditional if that simplifies it.
Returns zero if no statement was changed, one if there were
changes and two if cfg_cleanup needs to run. */
static int
forward_propagate_into_cond (tree cond_expr, tree stmt)
{
int did_something = 0;
do {
tree tmp = NULL_TREE;
tree cond = COND_EXPR_COND (cond_expr);
tree name, def_stmt, rhs0 = NULL_TREE, rhs1 = NULL_TREE;
bool single_use0_p = false, single_use1_p = false;
/* We can do tree combining on SSA_NAME and comparison expressions. */
if (COMPARISON_CLASS_P (cond)
&& TREE_CODE (TREE_OPERAND (cond, 0)) == SSA_NAME)
{
/* For comparisons use the first operand, that is likely to
simplify comparisons against constants. */
name = TREE_OPERAND (cond, 0);
def_stmt = get_prop_source_stmt (name, false, &single_use0_p);
if (def_stmt != NULL_TREE
&& can_propagate_from (def_stmt))
{
tree op1 = TREE_OPERAND (cond, 1);
rhs0 = GIMPLE_STMT_OPERAND (def_stmt, 1);
tmp = combine_cond_expr_cond (TREE_CODE (cond), boolean_type_node,
fold_convert (TREE_TYPE (op1), rhs0),
op1, !single_use0_p);
}
/* If that wasn't successful, try the second operand. */
if (tmp == NULL_TREE
&& TREE_CODE (TREE_OPERAND (cond, 1)) == SSA_NAME)
{
tree op0 = TREE_OPERAND (cond, 0);
name = TREE_OPERAND (cond, 1);
def_stmt = get_prop_source_stmt (name, false, &single_use1_p);
if (def_stmt == NULL_TREE
|| !can_propagate_from (def_stmt))
return did_something;
rhs1 = GIMPLE_STMT_OPERAND (def_stmt, 1);
tmp = combine_cond_expr_cond (TREE_CODE (cond), boolean_type_node,
op0,
fold_convert (TREE_TYPE (op0), rhs1),
!single_use1_p);
}
/* If that wasn't successful either, try both operands. */
if (tmp == NULL_TREE
&& rhs0 != NULL_TREE
&& rhs1 != NULL_TREE)
tmp = combine_cond_expr_cond (TREE_CODE (cond), boolean_type_node,
rhs0,
fold_convert (TREE_TYPE (rhs0), rhs1),
!(single_use0_p && single_use1_p));
}
else if (TREE_CODE (cond) == SSA_NAME)
{
name = cond;
def_stmt = get_prop_source_stmt (name, true, NULL);
if (def_stmt == NULL_TREE
|| !can_propagate_from (def_stmt))
return did_something;
rhs0 = GIMPLE_STMT_OPERAND (def_stmt, 1);
tmp = combine_cond_expr_cond (NE_EXPR, boolean_type_node, rhs0,
build_int_cst (TREE_TYPE (rhs0), 0),
false);
}
if (tmp)
{
if (dump_file && tmp)
{
fprintf (dump_file, " Replaced '");
print_generic_expr (dump_file, cond, 0);
fprintf (dump_file, "' with '");
print_generic_expr (dump_file, tmp, 0);
fprintf (dump_file, "'\n");
}
COND_EXPR_COND (cond_expr) = unshare_expr (tmp);
update_stmt (stmt);
/* Remove defining statements. */
remove_prop_source_from_use (name, NULL);
if (is_gimple_min_invariant (tmp))
did_something = 2;
else if (did_something == 0)
did_something = 1;
/* Continue combining. */
continue;
}
break;
} while (1);
return did_something;
}
/* We've just substituted an ADDR_EXPR into stmt. Update all the
relevant data structures to match. */
static void
tidy_after_forward_propagate_addr (tree stmt)
{
/* We may have turned a trapping insn into a non-trapping insn. */
if (maybe_clean_or_replace_eh_stmt (stmt, stmt)
&& tree_purge_dead_eh_edges (bb_for_stmt (stmt)))
cfg_changed = true;
if (TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 1)) == ADDR_EXPR)
recompute_tree_invariant_for_addr_expr (GIMPLE_STMT_OPERAND (stmt, 1));
mark_symbols_for_renaming (stmt);
}
/* DEF_RHS contains the address of the 0th element in an array.
USE_STMT uses type of DEF_RHS to compute the address of an
arbitrary element within the array. The (variable) byte offset
of the element is contained in OFFSET.
We walk back through the use-def chains of OFFSET to verify that
it is indeed computing the offset of an element within the array
and extract the index corresponding to the given byte offset.
We then try to fold the entire address expression into a form
&array[index].
If we are successful, we replace the right hand side of USE_STMT
with the new address computation. */
static bool
forward_propagate_addr_into_variable_array_index (tree offset,
tree def_rhs, tree use_stmt)
{
tree index;
/* Try to find an expression for a proper index. This is either
a multiplication expression by the element size or just the
ssa name we came along in case the element size is one. */
if (integer_onep (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (def_rhs)))))
index = offset;
else
{
/* Get the offset's defining statement. */
offset = SSA_NAME_DEF_STMT (offset);
/* The statement which defines OFFSET before type conversion
must be a simple GIMPLE_MODIFY_STMT. */
if (TREE_CODE (offset) != GIMPLE_MODIFY_STMT)
return false;
/* The RHS of the statement which defines OFFSET must be a
multiplication of an object by the size of the array elements.
This implicitly verifies that the size of the array elements
is constant. */
offset = GIMPLE_STMT_OPERAND (offset, 1);
if (TREE_CODE (offset) != MULT_EXPR
|| TREE_CODE (TREE_OPERAND (offset, 1)) != INTEGER_CST
|| !simple_cst_equal (TREE_OPERAND (offset, 1),
TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (def_rhs)))))
return false;
/* The first operand to the MULT_EXPR is the desired index. */
index = TREE_OPERAND (offset, 0);
}
/* Replace the pointer addition with array indexing. */
GIMPLE_STMT_OPERAND (use_stmt, 1) = unshare_expr (def_rhs);
TREE_OPERAND (TREE_OPERAND (GIMPLE_STMT_OPERAND (use_stmt, 1), 0), 1)
= index;
/* That should have created gimple, so there is no need to
record information to undo the propagation. */
fold_stmt_inplace (use_stmt);
tidy_after_forward_propagate_addr (use_stmt);
return true;
}
/* NAME is a SSA_NAME representing DEF_RHS which is of the form
ADDR_EXPR <whatever>.
Try to forward propagate the ADDR_EXPR into the use USE_STMT.
Often this will allow for removal of an ADDR_EXPR and INDIRECT_REF
node or for recovery of array indexing from pointer arithmetic.
Return true if the propagation was successful (the propagation can
be not totally successful, yet things may have been changed). */
static bool
forward_propagate_addr_expr_1 (tree name, tree def_rhs, tree use_stmt,
bool single_use_p)
{
tree lhs, rhs, array_ref;
/* Strip away any outer COMPONENT_REF/ARRAY_REF nodes from the LHS.
ADDR_EXPR will not appear on the LHS. */
lhs = GIMPLE_STMT_OPERAND (use_stmt, 0);
while (handled_component_p (lhs))
lhs = TREE_OPERAND (lhs, 0);
rhs = GIMPLE_STMT_OPERAND (use_stmt, 1);
/* Now see if the LHS node is an INDIRECT_REF using NAME. If so,
propagate the ADDR_EXPR into the use of NAME and fold the result. */
if (TREE_CODE (lhs) == INDIRECT_REF && TREE_OPERAND (lhs, 0) == name)
{
/* This should always succeed in creating gimple, so there is
no need to save enough state to undo this propagation. */
TREE_OPERAND (lhs, 0) = unshare_expr (def_rhs);
fold_stmt_inplace (use_stmt);
tidy_after_forward_propagate_addr (use_stmt);
/* Continue propagating into the RHS. */
}
/* Trivial cases. The use statement could be a trivial copy or a
useless conversion. Recurse to the uses of the lhs as copyprop does
not copy through differen variant pointers and FRE does not catch
all useless conversions. Treat the case of a single-use name and
a conversion to def_rhs type separate, though. */
else if (TREE_CODE (lhs) == SSA_NAME
&& (TREE_CODE (rhs) == NOP_EXPR
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& TREE_TYPE (rhs) == TREE_TYPE (def_rhs)
&& single_use_p)
{
GIMPLE_STMT_OPERAND (use_stmt, 1) = unshare_expr (def_rhs);
return true;
}
else if ((TREE_CODE (lhs) == SSA_NAME
&& rhs == name)
|| ((TREE_CODE (rhs) == NOP_EXPR
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& useless_type_conversion_p (TREE_TYPE (rhs),
TREE_TYPE (def_rhs))))
return forward_propagate_addr_expr (lhs, def_rhs);
/* Strip away any outer COMPONENT_REF, ARRAY_REF or ADDR_EXPR
nodes from the RHS. */
while (handled_component_p (rhs)
|| TREE_CODE (rhs) == ADDR_EXPR)
rhs = TREE_OPERAND (rhs, 0);
/* Now see if the RHS node is an INDIRECT_REF using NAME. If so,
propagate the ADDR_EXPR into the use of NAME and fold the result. */
if (TREE_CODE (rhs) == INDIRECT_REF && TREE_OPERAND (rhs, 0) == name)
{
/* This should always succeed in creating gimple, so there is
no need to save enough state to undo this propagation. */
TREE_OPERAND (rhs, 0) = unshare_expr (def_rhs);
fold_stmt_inplace (use_stmt);
tidy_after_forward_propagate_addr (use_stmt);
return true;
}
/* The remaining cases are all for turning pointer arithmetic into
array indexing. They only apply when we have the address of
element zero in an array. If that is not the case then there
is nothing to do. */
array_ref = TREE_OPERAND (def_rhs, 0);
if (TREE_CODE (array_ref) != ARRAY_REF
|| TREE_CODE (TREE_TYPE (TREE_OPERAND (array_ref, 0))) != ARRAY_TYPE
|| !integer_zerop (TREE_OPERAND (array_ref, 1)))
return false;
/* If the use of the ADDR_EXPR is not a POINTER_PLUS_EXPR, there
is nothing to do. */
if (TREE_CODE (rhs) != POINTER_PLUS_EXPR)
return false;
/* Try to optimize &x[0] p+ C where C is a multiple of the size
of the elements in X into &x[C/element size]. */
if (TREE_OPERAND (rhs, 0) == name
&& TREE_CODE (TREE_OPERAND (rhs, 1)) == INTEGER_CST)
{
tree orig = unshare_expr (rhs);
TREE_OPERAND (rhs, 0) = unshare_expr (def_rhs);
/* If folding succeeds, then we have just exposed new variables
in USE_STMT which will need to be renamed. If folding fails,
then we need to put everything back the way it was. */
if (fold_stmt_inplace (use_stmt))
{
tidy_after_forward_propagate_addr (use_stmt);
return true;
}
else
{
GIMPLE_STMT_OPERAND (use_stmt, 1) = orig;
update_stmt (use_stmt);
return false;
}
}
/* Try to optimize &x[0] p+ OFFSET where OFFSET is defined by
converting a multiplication of an index by the size of the
array elements, then the result is converted into the proper
type for the arithmetic. */
if (TREE_OPERAND (rhs, 0) == name
&& TREE_CODE (TREE_OPERAND (rhs, 1)) == SSA_NAME
/* Avoid problems with IVopts creating PLUS_EXPRs with a
different type than their operands. */
&& useless_type_conversion_p (TREE_TYPE (rhs), TREE_TYPE (name)))
{
bool res;
res = forward_propagate_addr_into_variable_array_index (TREE_OPERAND (rhs, 1),
def_rhs, use_stmt);
return res;
}
return false;
}
/* STMT is a statement of the form SSA_NAME = ADDR_EXPR <whatever>.
Try to forward propagate the ADDR_EXPR into all uses of the SSA_NAME.
Often this will allow for removal of an ADDR_EXPR and INDIRECT_REF
node or for recovery of array indexing from pointer arithmetic.
Returns true, if all uses have been propagated into. */
static bool
forward_propagate_addr_expr (tree name, tree rhs)
{
int stmt_loop_depth = bb_for_stmt (SSA_NAME_DEF_STMT (name))->loop_depth;
imm_use_iterator iter;
tree use_stmt;
bool all = true;
bool single_use_p = has_single_use (name);
FOR_EACH_IMM_USE_STMT (use_stmt, iter, name)
{
bool result;
tree use_rhs;
/* If the use is not in a simple assignment statement, then
there is nothing we can do. */
if (TREE_CODE (use_stmt) != GIMPLE_MODIFY_STMT)
{
all = false;
continue;
}
/* If the use is in a deeper loop nest, then we do not want
to propagate the ADDR_EXPR into the loop as that is likely
adding expression evaluations into the loop. */
if (bb_for_stmt (use_stmt)->loop_depth > stmt_loop_depth)
{
all = false;
continue;
}
push_stmt_changes (&use_stmt);
result = forward_propagate_addr_expr_1 (name, rhs, use_stmt,
single_use_p);
all &= result;
pop_stmt_changes (&use_stmt);
/* Remove intermediate now unused copy and conversion chains. */
use_rhs = GIMPLE_STMT_OPERAND (use_stmt, 1);
if (result
&& TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 0)) == SSA_NAME
&& (TREE_CODE (use_rhs) == SSA_NAME
|| ((TREE_CODE (use_rhs) == NOP_EXPR
|| TREE_CODE (use_rhs) == CONVERT_EXPR)
&& TREE_CODE (TREE_OPERAND (use_rhs, 0)) == SSA_NAME)))
{
block_stmt_iterator bsi = bsi_for_stmt (use_stmt);
release_defs (use_stmt);
bsi_remove (&bsi, true);
}
}
return all;
}
/* Forward propagate the comparison COND defined in STMT like
cond_1 = x CMP y to uses of the form
a_1 = (T')cond_1
a_1 = !cond_1
a_1 = cond_1 != 0
Returns true if stmt is now unused. */
static bool
forward_propagate_comparison (tree cond, tree stmt)
{
tree name = GIMPLE_STMT_OPERAND (stmt, 0);
tree use_stmt, tmp = NULL_TREE;
/* Don't propagate ssa names that occur in abnormal phis. */
if ((TREE_CODE (TREE_OPERAND (cond, 0)) == SSA_NAME
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND (cond, 0)))
|| (TREE_CODE (TREE_OPERAND (cond, 1)) == SSA_NAME
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND (cond, 1))))
return false;
/* Do not un-cse comparisons. But propagate through copies. */
use_stmt = get_prop_dest_stmt (name, &name);
if (use_stmt == NULL_TREE)
return false;
/* Conversion of the condition result to another integral type. */
if (TREE_CODE (use_stmt) == GIMPLE_MODIFY_STMT
&& (TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 1)) == CONVERT_EXPR
|| TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 1)) == NOP_EXPR
|| COMPARISON_CLASS_P (GIMPLE_STMT_OPERAND (use_stmt, 1))
|| TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 1)) == TRUTH_NOT_EXPR)
&& INTEGRAL_TYPE_P (TREE_TYPE (GIMPLE_STMT_OPERAND (use_stmt, 0))))
{
tree lhs = GIMPLE_STMT_OPERAND (use_stmt, 0);
tree rhs = GIMPLE_STMT_OPERAND (use_stmt, 1);
/* We can propagate the condition into a conversion. */
if (TREE_CODE (rhs) == CONVERT_EXPR
|| TREE_CODE (rhs) == NOP_EXPR)
{
/* Avoid using fold here as that may create a COND_EXPR with
non-boolean condition as canonical form. */
tmp = build2 (TREE_CODE (cond), TREE_TYPE (lhs),
TREE_OPERAND (cond, 0), TREE_OPERAND (cond, 1));
}
/* We can propagate the condition into X op CST where op
is EQ_EXRP or NE_EXPR and CST is either one or zero. */
else if (COMPARISON_CLASS_P (rhs)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME
&& TREE_CODE (TREE_OPERAND (rhs, 1)) == INTEGER_CST)
{
enum tree_code code = TREE_CODE (rhs);
tree cst = TREE_OPERAND (rhs, 1);
tmp = combine_cond_expr_cond (code, TREE_TYPE (lhs),
fold_convert (TREE_TYPE (cst), cond),
cst, false);
if (tmp == NULL_TREE)
return false;
}
/* We can propagate the condition into a statement that
computes the logical negation of the comparison result. */
else if (TREE_CODE (rhs) == TRUTH_NOT_EXPR)
{
tree type = TREE_TYPE (TREE_OPERAND (cond, 0));
bool nans = HONOR_NANS (TYPE_MODE (type));
enum tree_code code;
code = invert_tree_comparison (TREE_CODE (cond), nans);
if (code == ERROR_MARK)
return false;
tmp = build2 (code, TREE_TYPE (lhs), TREE_OPERAND (cond, 0),
TREE_OPERAND (cond, 1));
}
else
return false;
GIMPLE_STMT_OPERAND (use_stmt, 1) = unshare_expr (tmp);
update_stmt (use_stmt);
/* Remove defining statements. */
remove_prop_source_from_use (name, stmt);
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " Replaced '");
print_generic_expr (dump_file, rhs, dump_flags);
fprintf (dump_file, "' with '");
print_generic_expr (dump_file, tmp, dump_flags);
fprintf (dump_file, "'\n");
}
return true;
}
return false;
}
/* If we have lhs = ~x (STMT), look and see if earlier we had x = ~y.
If so, we can change STMT into lhs = y which can later be copy
propagated. Similarly for negation.
This could trivially be formulated as a forward propagation
to immediate uses. However, we already had an implementation
from DOM which used backward propagation via the use-def links.
It turns out that backward propagation is actually faster as
there's less work to do for each NOT/NEG expression we find.
Backwards propagation needs to look at the statement in a single
backlink. Forward propagation needs to look at potentially more
than one forward link. */
static void
simplify_not_neg_expr (tree stmt)
{
tree rhs = GIMPLE_STMT_OPERAND (stmt, 1);
tree rhs_def_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (rhs, 0));
/* See if the RHS_DEF_STMT has the same form as our statement. */
if (TREE_CODE (rhs_def_stmt) == GIMPLE_MODIFY_STMT
&& TREE_CODE (GIMPLE_STMT_OPERAND (rhs_def_stmt, 1)) == TREE_CODE (rhs))
{
tree rhs_def_operand =
TREE_OPERAND (GIMPLE_STMT_OPERAND (rhs_def_stmt, 1), 0);
/* Verify that RHS_DEF_OPERAND is a suitable SSA_NAME. */
if (TREE_CODE (rhs_def_operand) == SSA_NAME
&& ! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs_def_operand))
{
GIMPLE_STMT_OPERAND (stmt, 1) = rhs_def_operand;
update_stmt (stmt);
}
}
}
/* STMT is a SWITCH_EXPR for which we attempt to find equivalent forms of
the condition which we may be able to optimize better. */
static void
simplify_switch_expr (tree stmt)
{
tree cond = SWITCH_COND (stmt);
tree def, to, ti;
/* The optimization that we really care about is removing unnecessary
casts. That will let us do much better in propagating the inferred
constant at the switch target. */
if (TREE_CODE (cond) == SSA_NAME)
{
def = SSA_NAME_DEF_STMT (cond);
if (TREE_CODE (def) == GIMPLE_MODIFY_STMT)
{
def = GIMPLE_STMT_OPERAND (def, 1);
if (TREE_CODE (def) == NOP_EXPR)
{
int need_precision;
bool fail;
def = TREE_OPERAND (def, 0);
#ifdef ENABLE_CHECKING
/* ??? Why was Jeff testing this? We are gimple... */
gcc_assert (is_gimple_val (def));
#endif
to = TREE_TYPE (cond);
ti = TREE_TYPE (def);
/* If we have an extension that preserves value, then we
can copy the source value into the switch. */
need_precision = TYPE_PRECISION (ti);
fail = false;
if (! INTEGRAL_TYPE_P (ti))
fail = true;
else if (TYPE_UNSIGNED (to) && !TYPE_UNSIGNED (ti))
fail = true;
else if (!TYPE_UNSIGNED (to) && TYPE_UNSIGNED (ti))
need_precision += 1;
if (TYPE_PRECISION (to) < need_precision)
fail = true;
if (!fail)
{
SWITCH_COND (stmt) = def;
update_stmt (stmt);
}
}
}
}
}
/* Main entry point for the forward propagation optimizer. */
static unsigned int
tree_ssa_forward_propagate_single_use_vars (void)
{
basic_block bb;
unsigned int todoflags = 0;
cfg_changed = false;
FOR_EACH_BB (bb)
{
block_stmt_iterator bsi;
/* Note we update BSI within the loop as necessary. */
for (bsi = bsi_start (bb); !bsi_end_p (bsi); )
{
tree stmt = bsi_stmt (bsi);
/* If this statement sets an SSA_NAME to an address,
try to propagate the address into the uses of the SSA_NAME. */
if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT)
{
tree lhs = GIMPLE_STMT_OPERAND (stmt, 0);
tree rhs = GIMPLE_STMT_OPERAND (stmt, 1);
if (TREE_CODE (lhs) != SSA_NAME)
{
bsi_next (&bsi);
continue;
}
if (TREE_CODE (rhs) == ADDR_EXPR
/* We can also disregard changes in const qualifiers for
the dereferenced value. */
|| ((TREE_CODE (rhs) == NOP_EXPR
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (rhs))
/* But do not propagate changes in volatileness. */
&& (TYPE_VOLATILE (TREE_TYPE (TREE_TYPE (rhs)))
== TYPE_VOLATILE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0)))))
&& types_compatible_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))),
TREE_TYPE (TREE_TYPE (rhs)))))
{
if (!stmt_references_abnormal_ssa_name (stmt)
&& forward_propagate_addr_expr (lhs, rhs))
{
release_defs (stmt);
todoflags |= TODO_remove_unused_locals;
bsi_remove (&bsi, true);
}
else
bsi_next (&bsi);
}
else if ((TREE_CODE (rhs) == BIT_NOT_EXPR
|| TREE_CODE (rhs) == NEGATE_EXPR)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME)
{
simplify_not_neg_expr (stmt);
bsi_next (&bsi);
}
else if (TREE_CODE (rhs) == COND_EXPR)
{
int did_something;
fold_defer_overflow_warnings ();
did_something = forward_propagate_into_cond (rhs, stmt);
if (did_something == 2)
cfg_changed = true;
fold_undefer_overflow_warnings (!TREE_NO_WARNING (rhs)
&& did_something, stmt, WARN_STRICT_OVERFLOW_CONDITIONAL);
bsi_next (&bsi);
}
else if (COMPARISON_CLASS_P (rhs))
{
if (forward_propagate_comparison (rhs, stmt))
{
release_defs (stmt);
todoflags |= TODO_remove_unused_locals;
bsi_remove (&bsi, true);
}
else
bsi_next (&bsi);
}
else
bsi_next (&bsi);
}
else if (TREE_CODE (stmt) == SWITCH_EXPR)
{
simplify_switch_expr (stmt);
bsi_next (&bsi);
}
else if (TREE_CODE (stmt) == COND_EXPR)
{
int did_something;
fold_defer_overflow_warnings ();
did_something = forward_propagate_into_cond (stmt, stmt);
if (did_something == 2)
cfg_changed = true;
fold_undefer_overflow_warnings (did_something, stmt,
WARN_STRICT_OVERFLOW_CONDITIONAL);
bsi_next (&bsi);
}
else
bsi_next (&bsi);
}
}
if (cfg_changed)
todoflags |= TODO_cleanup_cfg;
return todoflags;
}
static bool
gate_forwprop (void)
{
return 1;
}
struct tree_opt_pass pass_forwprop = {
"forwprop", /* name */
gate_forwprop, /* gate */
tree_ssa_forward_propagate_single_use_vars, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_FORWPROP, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func
| TODO_ggc_collect
| TODO_update_ssa
| TODO_verify_ssa, /* todo_flags_finish */
0 /* letter */
};
/* Structure to keep track of the value of a dereferenced PHI result
and the set of virtual operands used for that dereference. */
struct phiprop_d
{
tree value;
tree vop_stmt;
};
/* Verify if the value recorded for NAME in PHIVN is still valid at
the start of basic block BB. */
static bool
phivn_valid_p (struct phiprop_d *phivn, tree name, basic_block bb)
{
tree vop_stmt = phivn[SSA_NAME_VERSION (name)].vop_stmt;
ssa_op_iter ui;
tree vuse;
/* The def stmts of all virtual uses need to be post-dominated
by bb. */
FOR_EACH_SSA_TREE_OPERAND (vuse, vop_stmt, ui, SSA_OP_VUSE)
{
tree use_stmt;
imm_use_iterator ui2;
bool ok = true;
FOR_EACH_IMM_USE_STMT (use_stmt, ui2, vuse)
{
/* If BB does not dominate a VDEF, the value is invalid. */
if (((TREE_CODE (use_stmt) == GIMPLE_MODIFY_STMT
&& !ZERO_SSA_OPERANDS (use_stmt, SSA_OP_VDEF))
|| TREE_CODE (use_stmt) == PHI_NODE)
&& !dominated_by_p (CDI_DOMINATORS, bb_for_stmt (use_stmt), bb))
{
ok = false;
BREAK_FROM_IMM_USE_STMT (ui2);
}
}
if (!ok)
return false;
}
return true;
}
/* Insert a new phi node for the dereference of PHI at basic_block
BB with the virtual operands from USE_STMT. */
static tree
phiprop_insert_phi (basic_block bb, tree phi, tree use_stmt,
struct phiprop_d *phivn, size_t n)
{
tree res, new_phi;
edge_iterator ei;
edge e;
/* Build a new PHI node to replace the definition of
the indirect reference lhs. */
res = GIMPLE_STMT_OPERAND (use_stmt, 0);
SSA_NAME_DEF_STMT (res) = new_phi = create_phi_node (res, bb);
/* Add PHI arguments for each edge inserting loads of the
addressable operands. */
FOR_EACH_EDGE (e, ei, bb->preds)
{
tree old_arg, new_var, tmp;
old_arg = PHI_ARG_DEF_FROM_EDGE (phi, e);
while (TREE_CODE (old_arg) == SSA_NAME
&& (SSA_NAME_VERSION (old_arg) >= n
|| phivn[SSA_NAME_VERSION (old_arg)].value == NULL_TREE))
{
tree def_stmt = SSA_NAME_DEF_STMT (old_arg);
old_arg = GIMPLE_STMT_OPERAND (def_stmt, 1);
}
if (TREE_CODE (old_arg) == SSA_NAME)
/* Reuse a formerly created dereference. */
new_var = phivn[SSA_NAME_VERSION (old_arg)].value;
else
{
old_arg = TREE_OPERAND (old_arg, 0);
new_var = create_tmp_var (TREE_TYPE (old_arg), NULL);
tmp = build2 (GIMPLE_MODIFY_STMT, void_type_node,
NULL_TREE, unshare_expr (old_arg));
if (TREE_CODE (TREE_TYPE (old_arg)) == COMPLEX_TYPE
|| TREE_CODE (TREE_TYPE (old_arg)) == VECTOR_TYPE)
DECL_GIMPLE_REG_P (new_var) = 1;
add_referenced_var (new_var);
new_var = make_ssa_name (new_var, tmp);
GIMPLE_STMT_OPERAND (tmp, 0) = new_var;
bsi_insert_on_edge (e, tmp);
update_stmt (tmp);
mark_symbols_for_renaming (tmp);
}
add_phi_arg (new_phi, new_var, e);
}
update_stmt (new_phi);
return res;
}
/* Propagate between the phi node arguments of PHI in BB and phi result
users. For now this matches
# p_2 = PHI <&x, &y>
<Lx>:;
p_3 = p_2;
z_2 = *p_3;
and converts it to
# z_2 = PHI <x, y>
<Lx>:;
Returns true if a transformation was done and edge insertions
need to be committed. Global data PHIVN and N is used to track
past transformation results. We need to be especially careful here
with aliasing issues as we are moving memory reads. */
static bool
propagate_with_phi (basic_block bb, tree phi, struct phiprop_d *phivn, size_t n)
{
tree ptr = PHI_RESULT (phi);
tree use_stmt, res = NULL_TREE;
block_stmt_iterator bsi;
imm_use_iterator ui;
use_operand_p arg_p, use;
ssa_op_iter i;
bool phi_inserted;
if (MTAG_P (SSA_NAME_VAR (ptr))
|| !POINTER_TYPE_P (TREE_TYPE (ptr))
|| !is_gimple_reg_type (TREE_TYPE (TREE_TYPE (ptr))))
return false;
/* Check if we can "cheaply" dereference all phi arguments. */
FOR_EACH_PHI_ARG (arg_p, phi, i, SSA_OP_USE)
{
tree arg = USE_FROM_PTR (arg_p);
/* Walk the ssa chain until we reach a ssa name we already
created a value for or we reach a definition of the form
ssa_name_n = &var; */
while (TREE_CODE (arg) == SSA_NAME
&& !SSA_NAME_IS_DEFAULT_DEF (arg)
&& (SSA_NAME_VERSION (arg) >= n
|| phivn[SSA_NAME_VERSION (arg)].value == NULL_TREE))
{
tree def_stmt = SSA_NAME_DEF_STMT (arg);
if (TREE_CODE (def_stmt) != GIMPLE_MODIFY_STMT)
return false;
arg = GIMPLE_STMT_OPERAND (def_stmt, 1);
}
if ((TREE_CODE (arg) != ADDR_EXPR
/* Avoid to have to decay *&a to a[0] later. */
|| !is_gimple_reg_type (TREE_TYPE (TREE_OPERAND (arg, 0))))
&& !(TREE_CODE (arg) == SSA_NAME
&& phivn[SSA_NAME_VERSION (arg)].value != NULL_TREE
&& phivn_valid_p (phivn, arg, bb)))
return false;
}
/* Find a dereferencing use. First follow (single use) ssa
copy chains for ptr. */
while (single_imm_use (ptr, &use, &use_stmt)
&& TREE_CODE (use_stmt) == GIMPLE_MODIFY_STMT
&& GIMPLE_STMT_OPERAND (use_stmt, 1) == ptr
&& TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 0)) == SSA_NAME)
ptr = GIMPLE_STMT_OPERAND (use_stmt, 0);
/* Replace the first dereference of *ptr if there is one and if we
can move the loads to the place of the ptr phi node. */
phi_inserted = false;
FOR_EACH_IMM_USE_STMT (use_stmt, ui, ptr)
{
ssa_op_iter ui2;
tree vuse;
/* Check whether this is a load of *ptr. */
if (!(TREE_CODE (use_stmt) == GIMPLE_MODIFY_STMT
&& TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 0)) == SSA_NAME
&& TREE_CODE (GIMPLE_STMT_OPERAND (use_stmt, 1)) == INDIRECT_REF
&& TREE_OPERAND (GIMPLE_STMT_OPERAND (use_stmt, 1), 0) == ptr
/* We cannot replace a load that may throw or is volatile. */
&& !tree_can_throw_internal (use_stmt)))
continue;
/* Check if we can move the loads. The def stmts of all virtual uses
need to be post-dominated by bb. */
FOR_EACH_SSA_TREE_OPERAND (vuse, use_stmt, ui2, SSA_OP_VUSE)
{
tree def_stmt = SSA_NAME_DEF_STMT (vuse);
if (!SSA_NAME_IS_DEFAULT_DEF (vuse)
&& (bb_for_stmt (def_stmt) == bb
|| !dominated_by_p (CDI_DOMINATORS,
bb, bb_for_stmt (def_stmt))))
goto next;
}
/* Found a proper dereference. Insert a phi node if this
is the first load transformation. */
if (!phi_inserted)
{
res = phiprop_insert_phi (bb, phi, use_stmt, phivn, n);
/* Remember the value we created for *ptr. */
phivn[SSA_NAME_VERSION (ptr)].value = res;
phivn[SSA_NAME_VERSION (ptr)].vop_stmt = use_stmt;
/* Remove old stmt. The phi is taken care of by DCE, if we
want to delete it here we also have to delete all intermediate
copies. */
bsi = bsi_for_stmt (use_stmt);
bsi_remove (&bsi, 0);
phi_inserted = true;
}
else
{
/* Further replacements are easy, just make a copy out of the
load. */
GIMPLE_STMT_OPERAND (use_stmt, 1) = res;
update_stmt (use_stmt);
}
next:;
/* Continue searching for a proper dereference. */
}
return phi_inserted;
}
/* Helper walking the dominator tree starting from BB and processing
phi nodes with global data PHIVN and N. */
static bool
tree_ssa_phiprop_1 (basic_block bb, struct phiprop_d *phivn, size_t n)
{
bool did_something = false;
basic_block son;
tree phi;
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
did_something |= propagate_with_phi (bb, phi, phivn, n);
for (son = first_dom_son (CDI_DOMINATORS, bb);
son;
son = next_dom_son (CDI_DOMINATORS, son))
did_something |= tree_ssa_phiprop_1 (son, phivn, n);
return did_something;
}
/* Main entry for phiprop pass. */
static unsigned int
tree_ssa_phiprop (void)
{
struct phiprop_d *phivn;
calculate_dominance_info (CDI_DOMINATORS);
phivn = XCNEWVEC (struct phiprop_d, num_ssa_names);
if (tree_ssa_phiprop_1 (ENTRY_BLOCK_PTR, phivn, num_ssa_names))
bsi_commit_edge_inserts ();
free (phivn);
return 0;
}
static bool
gate_phiprop (void)
{
return 1;
}
struct tree_opt_pass pass_phiprop = {
"phiprop", /* name */
gate_phiprop, /* gate */
tree_ssa_phiprop, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_FORWPROP, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func
| TODO_ggc_collect
| TODO_update_ssa
| TODO_verify_ssa, /* todo_flags_finish */
0 /* letter */
};
|
[
"[email protected]"
] | |
59886ffbc573dd8ce9e2bd7a50ef1df6739334e0
|
c0a144c9bcf49f2bc0d8a42fa12842cb6fd6a3e1
|
/tests/unsigned_long_long_array_tests.c
|
55bd832e8c9707661032bfd27736c16a5543fa72
|
[] |
no_license
|
seaneshbaugh/generic_array
|
1517e256f8baeeb5aa2b33b9182452fb22ce5d83
|
ab0bcf6499514794553a96d2b242bcfd0b02082f
|
refs/heads/master
| 2020-04-29T16:22:44.815329 | 2014-09-12T17:00:59 | 2014-09-12T17:00:59 | 21,359,882 | 2 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 27,799 |
c
|
#include "unsigned_long_long_array.h"
#include "unity.h"
#include "unity_fixture.h"
TEST_GROUP(UnsignedLongLongArrayTests);
UnsignedLongLongArray unsignedLongLongArray;
UnsignedLongLongArray otherUnsignedLongLongArray;
TEST_SETUP(UnsignedLongLongArrayTests) {
UnsignedLongLongArrayInitialize(&unsignedLongLongArray);
UnsignedLongLongArrayInitialize(&otherUnsignedLongLongArray);
}
TEST_TEAR_DOWN(UnsignedLongLongArrayTests) {
UnsignedLongLongArrayDeinitialize(&unsignedLongLongArray);
UnsignedLongLongArrayDeinitialize(&otherUnsignedLongLongArray);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayInitialLength) {
TEST_ASSERT_EQUAL(0, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayInitialCapacity) {
TEST_ASSERT_EQUAL(GA_INITIAL_CAPACITY, unsignedLongLongArray.capacity);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayInitializeFromEmptyPointer) {
unsigned long long values[] = { };
int result = UnsignedLongLongArrayInitializeFromPointer(&unsignedLongLongArray, values, 0);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, UnsignedLongLongArrayCount(&unsignedLongLongArray));
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayInitializeFromPointer) {
unsigned long long values[5] = { 1ULL, 2ULL, 3ULL, 4ULL, 5ULL };
int result = UnsignedLongLongArrayInitializeFromPointer(&unsignedLongLongArray, values, 5);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(5, UnsignedLongLongArrayCount(&unsignedLongLongArray));
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayPushOneElement) {
int result = UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(1, unsignedLongLongArray.length);
TEST_ASSERT_EQUAL(GA_INITIAL_CAPACITY, unsignedLongLongArray.capacity);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayPushCapacityPlusOneElements) {
int result;
for (size_t i = 0; i < GA_INITIAL_CAPACITY + 1; i++) {
result = UnsignedLongLongArrayPush(&unsignedLongLongArray, (unsigned long long)i);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
}
TEST_ASSERT_EQUAL(GA_INITIAL_CAPACITY + 1, unsignedLongLongArray.length);
TEST_ASSERT_EQUAL(GA_INITIAL_CAPACITY * GA_CAPACITY_MULTIPLIER, unsignedLongLongArray.capacity);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayAtZeroLength) {
unsigned long long x;
int result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayAtExistingElement) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
unsigned long long x;
int result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(3ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayAtLessThanZeroIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
unsigned long long x;
int result = UnsignedLongLongArrayAt(&unsignedLongLongArray, -2, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(4ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayAtGreaterThanLengthIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
unsigned long long x;
int result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 5, &x);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayAtLessThanNegativeLengthIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
unsigned long long x;
int result = UnsignedLongLongArrayAt(&unsignedLongLongArray, -6, &x);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayClear) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayClear(&unsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayConcatEmptyArrays) {
int result = UnsignedLongLongArrayConcat(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayConcatEmptyArrayToNonEmptyArray) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
int result = UnsignedLongLongArrayConcat(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(2, unsignedLongLongArray.length);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayConcatNonEmptyArrayToEmptyArray) {
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 2ULL);
int result = UnsignedLongLongArrayConcat(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(2, unsignedLongLongArray.length);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayConcatNonEmptyArrayToNonEmptyArray) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 4ULL);
int result = UnsignedLongLongArrayConcat(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(4, unsignedLongLongArray.length);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(3ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(4ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayCountEmptyArray) {
size_t result = UnsignedLongLongArrayCount(&unsignedLongLongArray);
TEST_ASSERT_EQUAL(0, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayCountNonEmptyArray) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
size_t result = UnsignedLongLongArrayCount(&unsignedLongLongArray);
TEST_ASSERT_EQUAL(2, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteFromEmptyArray) {
int result = UnsignedLongLongArrayDelete(&unsignedLongLongArray, 1ULL);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteNonExistingElement) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
int result = UnsignedLongLongArrayDelete(&unsignedLongLongArray, 3ULL);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(2, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteExistingElement) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
int result = UnsignedLongLongArrayDelete(&unsignedLongLongArray, 2ULL);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(1, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteAtZeroLength) {
int result = UnsignedLongLongArrayDeleteAt(&unsignedLongLongArray, 0);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteAtExistingElement) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayDeleteAt(&unsignedLongLongArray, 2);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(4, unsignedLongLongArray.length);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteAtLessThanZeroIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayDeleteAt(&unsignedLongLongArray, -2);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(4, unsignedLongLongArray.length);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(3ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteAtGreaterThanLengthIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayDeleteAt(&unsignedLongLongArray, 5);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDeleteAtLessThanNegativeLengthIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayDeleteAt(&unsignedLongLongArray, -6);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDropOneEmptyArray) {
int result = UnsignedLongLongArrayDrop(&unsignedLongLongArray, 1);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDropManyEmptyArray) {
int result = UnsignedLongLongArrayDrop(&unsignedLongLongArray, 10);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDropLessThanArrayLength) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayDrop(&unsignedLongLongArray, 3);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(2, unsignedLongLongArray.length);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayDropGreaterThanArrayLength) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayDrop(&unsignedLongLongArray, 6);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, unsignedLongLongArray.length);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayEmptyArrayIsEmpty) {
int result = UnsignedLongLongArrayIsEmpty(&unsignedLongLongArray);
TEST_ASSERT_EQUAL(1, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayNonEmptyArrayIsNotEmpty) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayIsEmpty(&unsignedLongLongArray);
TEST_ASSERT_EQUAL(0, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayPush) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
TEST_ASSERT_EQUAL(5, unsignedLongLongArray.length);
unsigned long long x;
int result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(1ULL, x);
result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(2ULL, x);
result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(3ULL, x);
result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(4ULL, x);
result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 4, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayMultipleElementArrayToString) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
char* asString;
int result = UnsignedLongLongArrayToString(&unsignedLongLongArray, &asString);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL_STRING("[1, 2, 3, 4, 5]", asString);
free(asString);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySetZeroLength) {
int result = UnsignedLongLongArraySet(&unsignedLongLongArray, 2, 5ULL);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySetExistingElement) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
int result = UnsignedLongLongArraySet(&unsignedLongLongArray, 2, 5ULL);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
unsigned long long x;
result = UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySetLessThanZeroIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
int result = UnsignedLongLongArraySet(&unsignedLongLongArray, -2, 5ULL);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
unsigned long long x;
result = UnsignedLongLongArrayAt(&unsignedLongLongArray, -2, &x);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySetGreaterThanLengthIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
int result = UnsignedLongLongArraySet(&unsignedLongLongArray, 4, 5ULL);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySetLessThanNegativeLengthIndex) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
int result = UnsignedLongLongArraySet(&unsignedLongLongArray, -5, 5ULL);
TEST_ASSERT_EQUAL(GA_ERROR_INDEX_OUT_OF_BOUNDS, result);
}
int UnsignedLongLongAscendingCompare(const void *a, const void *b) {
__GENERIC_ARRAY_TYPE__ f = *((__GENERIC_ARRAY_TYPE__*)a);
__GENERIC_ARRAY_TYPE__ s = *((__GENERIC_ARRAY_TYPE__*)b);
if (GENERIC_ARRAY_VALUES_GREATER_THAN(f, s)) {
return 1;
}
if (GENERIC_ARRAY_VALUES_LESS_THAN(f, s)) {
return -1;
}
return 0;
}
int UnsignedLongLongDescendingCompare(const void *a, const void *b) {
__GENERIC_ARRAY_TYPE__ f = *((__GENERIC_ARRAY_TYPE__*)a);
__GENERIC_ARRAY_TYPE__ s = *((__GENERIC_ARRAY_TYPE__*)b);
if (GENERIC_ARRAY_VALUES_LESS_THAN(f, s)) {
return 1;
}
if (GENERIC_ARRAY_VALUES_GREATER_THAN(f, s)) {
return -1;
}
return 0;
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySortEmptyArray) {
UnsignedLongLongArraySort(&unsignedLongLongArray, UnsignedLongLongAscendingCompare);
TEST_ASSERT_EQUAL(0, UnsignedLongLongArrayCount(&unsignedLongLongArray));
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySortAscending) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArraySort(&unsignedLongLongArray, UnsignedLongLongAscendingCompare);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(3ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 4, &x);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArraySortDescending) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArraySort(&unsignedLongLongArray, UnsignedLongLongDescendingCompare);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(5ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(3ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 4, &x);
TEST_ASSERT_EQUAL(1ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayOverlapEmptyArrays) {
int result = UnsignedLongLongArrayOverlap(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(0, UnsignedLongLongArrayCount(&unsignedLongLongArray));
TEST_ASSERT_EQUAL(0, UnsignedLongLongArrayCount(&otherUnsignedLongLongArray));
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayOverlapNonEmptyArrayWithEmptyArray) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayOverlap(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(5, UnsignedLongLongArrayCount(&unsignedLongLongArray));
TEST_ASSERT_EQUAL(0, UnsignedLongLongArrayCount(&otherUnsignedLongLongArray));
UnsignedLongLongArraySort(&unsignedLongLongArray, UnsignedLongLongAscendingCompare);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(3ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 4, &x);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayOverlapEmptyArrayWithNonEmptyArray) {
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayOverlap(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(5, UnsignedLongLongArrayCount(&unsignedLongLongArray));
TEST_ASSERT_EQUAL(5, UnsignedLongLongArrayCount(&otherUnsignedLongLongArray));
UnsignedLongLongArraySort(&unsignedLongLongArray, UnsignedLongLongAscendingCompare);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(3ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 4, &x);
TEST_ASSERT_EQUAL(5ULL, x);
}
TEST(UnsignedLongLongArrayTests, UnsignedLongLongArrayOverlapNonEmptyArrays) {
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
UnsignedLongLongArrayPush(&unsignedLongLongArray, 5ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 1ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 2ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 3ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 4ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 5ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 5ULL);
UnsignedLongLongArrayPush(&otherUnsignedLongLongArray, 5ULL);
int result = UnsignedLongLongArrayOverlap(&unsignedLongLongArray, &otherUnsignedLongLongArray);
TEST_ASSERT_EQUAL(GA_SUCCESS, result);
TEST_ASSERT_EQUAL(10, UnsignedLongLongArrayCount(&unsignedLongLongArray));
TEST_ASSERT_EQUAL(8, UnsignedLongLongArrayCount(&otherUnsignedLongLongArray));
UnsignedLongLongArraySort(&unsignedLongLongArray, UnsignedLongLongAscendingCompare);
unsigned long long x;
UnsignedLongLongArrayAt(&unsignedLongLongArray, 0, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 1, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 2, &x);
TEST_ASSERT_EQUAL(1ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 3, &x);
TEST_ASSERT_EQUAL(2ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 4, &x);
TEST_ASSERT_EQUAL(3ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 5, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 6, &x);
TEST_ASSERT_EQUAL(4ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 7, &x);
TEST_ASSERT_EQUAL(5ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 8, &x);
TEST_ASSERT_EQUAL(5ULL, x);
UnsignedLongLongArrayAt(&unsignedLongLongArray, 9, &x);
TEST_ASSERT_EQUAL(5ULL, x);
}
|
[
"[email protected]"
] | |
16a3f8fc84373a5205552df8433582891beb84a7
|
ff9955764e06c6ec944312a1a086c4dc451815ce
|
/IP-2019/Código/exercicio2ficha5.c
|
4115dbc327bb01d2721add8854fc4839bf71a48b
|
[] |
no_license
|
franciscoruivo/isec-material
|
cc90c444572f368848793c94972d5a0ca478e5f4
|
6c53af02c217255b05b927a5d1aeb8455ab522f9
|
refs/heads/main
| 2023-06-23T14:27:33.168116 | 2021-07-27T21:49:49 | 2021-07-27T21:49:49 | 499,131,181 | 2 | 0 | null | 2022-06-02T12:43:11 | 2022-06-02T12:43:11 | null |
UTF-8
|
C
| false | false | 637 |
c
|
#include <stdio.h>
int verificaLimites(int n,int sup,int inf);
void main()
{
int num,limS,limI;
char op;
printf("Insira o limite inferior e superior: ");
scanf("%d%d",&limI,&limS);
do{
printf("\nInsira o numero: ");
scanf("%d",&num);
if (verificaLimites(num,limS,limI)==1)
printf("DENTRO\n\n");
else
printf("FORA\n\n");
printf("Continuar?\t");
fflush(stdin);
scanf("%c",&op);
}while (op=='S' || op=='s');
}
int verificaLimites(int n,int sup,int inf)
{
if (n<=sup && n>=inf)
return 1;
else
return 0;
}
|
[
"[email protected]"
] | |
8b2231642fc3328226ca887810eb43ae11e2d3c9
|
7d2a5178df248ecaad56be4dffb891cfa109896d
|
/PETools/WindowsTools.h
|
0b85c4b9a8335b2a107c994647d7a045720034a9
|
[] |
no_license
|
arckiCriss/PETools
|
ce5845e75c3c38b2c025afdf139ef17585bcb286
|
12e64174e378759f4d5da5b2d9cc29ea5964bae8
|
refs/heads/master
| 2020-06-23T15:45:27.243797 | 2019-06-10T14:36:02 | 2019-06-10T14:36:02 | 198,667,979 | 1 | 0 | null | 2019-07-24T16:01:59 | 2019-07-24T16:01:58 | null |
GB18030
|
C
| false | false | 418 |
h
|
#pragma once
#include "pch.h"
//通过进程名打开进程
HANDLE OpenProcessByName(const TCHAR* processName, DWORD ACCESS);
//提升权限(要用管理员权限运行EXE)
bool Up();
//原样转换:十六进制的数和字符串
CHAR* HexToStr(DWORD srcHex);
CHAR* DecToStr(DWORD srcDec);
//打印十六进制数字hex和msg到OutputDebugString (四字节的hex数)
void ShowDbg(const char* msgStr, DWORD hex);
|
[
"[email protected]"
] | |
582404e0cc72360e43dbbd05789dc8e3779b6aa6
|
d54ebb3e29aba81f1e1703bdabaa02f25faa7015
|
/include/test_header.h
|
ce0973fac9751338acd6d64add4196134461a737
|
[] |
no_license
|
MusaTamzid05/RayTracer
|
023bcdc69703a6bfc7124ab0a2512a8f89082428
|
42a1dfc3baaff2c57ee8bedf0048c1a860dd2482
|
refs/heads/master
| 2023-01-02T14:23:55.940862 | 2020-10-21T22:50:01 | 2020-10-21T22:50:01 | 258,025,703 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 507 |
h
|
#ifndef TEST_HEADER_H
#define TEST_HEADER_H
#include <cppunit/TestCase.h>
#include <cppunit/TestFixture.h>
#include <cppunit/ui/text/TextTestRunner.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/XmlOutputter.h>
#include <netinet/in.h>
#endif
|
[
"[email protected]"
] | |
c4b6e26b76d2e6116ed1f6f875f67169d9d64a6a
|
df0c6a2220e92cde8828d176ca0380b3196f388d
|
/CO DETECTOR SORCE - RTC/Projects/STM32L073RZ-Nucleo/Examples_LL/GPIO/GPIO_InfiniteLedToggling_Init/Inc/main.h
|
193db0da0d51ba3cc78df95f6a0759085f6537b1
|
[
"BSD-2-Clause"
] |
permissive
|
AndyZenchonch/co-detector
|
f22a36dc4dc80ae3b92cf872fa96686ec13c39b6
|
e699e83c8d4596d7b9ca7d5628a5de5a2effed0b
|
refs/heads/master
| 2020-07-23T20:56:17.083874 | 2019-09-11T10:01:53 | 2019-09-11T10:01:53 | 207,702,353 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 3,209 |
h
|
/**
******************************************************************************
* @file Examples_LL/GPIO/GPIO_InfiniteLedToggling_Init/Inc/main.h
* @author MCD Application Team
* @version V1.8.0
* @date 25-November-2016
* @brief Header for main.c module
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
/* Includes ------------------------------------------------------------------*/
#include "stm32l0xx_ll_bus.h"
#include "stm32l0xx_ll_rcc.h"
#include "stm32l0xx_ll_system.h"
#include "stm32l0xx_ll_utils.h"
#include "stm32l0xx_ll_pwr.h"
#include "stm32l0xx_ll_gpio.h"
#if defined(USE_FULL_ASSERT)
#include "stm32_assert.h"
#endif /* USE_FULL_ASSERT */
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/**
* @brief LED2
*/
#define LED2_PIN LL_GPIO_PIN_5
#define LED2_GPIO_PORT GPIOA
#define LED2_GPIO_CLK_ENABLE() LL_IOP_GRP1_EnableClock(LL_IOP_GRP1_PERIPH_GPIOA)
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
#endif /* __MAIN_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
[
"[email protected]"
] | |
c76134486414c1c610e359a0351d59bf5c7155c1
|
3f4724ca578b8f87d340216e7f35456bf0ac304b
|
/src/include/hip/hip_proto.h
|
6affc30ccc6ca08451176c56f27f74efd872bfbd
|
[
"MIT"
] |
permissive
|
rektide/openhip
|
2df9ad4179e15c9876a389cc4cb5e9db9c79054d
|
2ffa5a2f965612d5deff56e8993b3c923464d0f9
|
refs/heads/master
| 2016-09-05T18:17:38.213910 | 2015-07-29T04:30:03 | 2015-07-29T04:30:03 | 39,873,306 | 3 | 2 | null | 2015-10-17T00:02:48 | 2015-07-29T04:31:03 |
C
|
UTF-8
|
C
| false | false | 9,683 |
h
|
/* -*- Mode:cc-mode; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/* vim: set ai sw=2 ts=2 et cindent cino={1s: */
/*
* Host Identity Protocol
* Copyright (c) 2002-2012 the Boeing Company
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* \file hip_proto.h
*
* \authors Jeff Ahrenholz, <[email protected]>
* Tom Henderson, <[email protected]>
*
* \brief Definitions for the HIP protocol.
*
*/
#ifndef _HIP_PROTO_H_
#define _HIP_PROTO_H_
#include <openssl/bn.h>
#include <openssl/hmac.h>
#include <openssl/rsa.h>
/*
* Protocol constants
*/
#define H_PROTO_UDP 17
#define HIP_UDP_PORT 10500
#define HIP_PROTO_VER 1
#define H_PROTO_HIP 139 /* IP layer protocol number for private encryption */
#define HIP_PAYLOAD_PROTOCOL 59
#define STATUS_PORT 4051 /* UDP port for obtaining status data */
#define SPI_RESERVED 255
#define HIP_ALIGN 4
#define ACCEPTABLE_R1_COUNT_RANGE 2
#define HIT_SIZE 16
#define HIT_PREFIX_TYPE1_SHA1 0x40
typedef enum {
UNASSOCIATED, /* State machine start */
I1_SENT, /* Initiating HIP */
I2_SENT, /* Waiting to finish HIP */
R2_SENT, /* Waiting to finish HIP */
ESTABLISHED, /* HIP SA established */
REKEYING, /* HIP SA established, rekeying */
CLOSING, /* HIP SA closing, no data can be sent */
CLOSED, /* HIP SA closed, no data can be sent */
E_FAILED /* HIP SA establishment failed */
} HIP_STATES;
/* HIP packet types */
typedef enum {
HIP_I1 = 1,
HIP_R1,
HIP_I2,
HIP_R2,
CER, /* 5 - removed from draft-ietf-hip-base-03 */
BOS = 11, /* 11 - removed from draft-ietf-hip-base-01 */
UPDATE = 16, /* 16 */
NOTIFY = 17, /* 17 */
CLOSE = 18, /* 18 */
CLOSE_ACK = 19, /* 19 */
HIP_HDRR, /* 20 */
} HIP_PACKETS;
/* HIP controls */
typedef enum {
CTL_ANON = 0x0001,
} HIP_CONTROLS;
/* HIP TLV parameters */
#define PARAM_ESP_INFO 65
#define PARAM_R1_COUNTER 128
#define PARAM_LOCATOR 193
#define PARAM_PUZZLE 257
#define PARAM_SOLUTION 321
#define PARAM_SEQ 385
#define PARAM_ACK 449
#define PARAM_DIFFIE_HELLMAN 513
#define PARAM_HIP_TRANSFORM 577
#define PARAM_ENCRYPTED 641
#define PARAM_HOST_ID 705
#define PARAM_CERT 768
#define PARAM_PROXY_TICKET 812
#define PARAM_AUTH_TICKET 822
#define PARAM_NOTIFY 832
#define PARAM_ECHO_REQUEST 897
#define PARAM_REG_INFO 930
#define PARAM_REG_REQUEST 932
#define PARAM_REG_RESPONSE 934
#define PARAM_REG_FAILED 936
#define PARAM_REG_REQUIRED /* TBD */
#define PARAM_ECHO_RESPONSE 961
#define PARAM_ESP_TRANSFORM 4095
#define PARAM_TRANSFORM_LOW 2048 /* defines range for transforms */
#define PARAM_TRANSFORM_HIGH 4095
#define PARAM_HMAC 61505
#define PARAM_HMAC_2 61569
#define PARAM_HIP_SIGNATURE_2 61633
#define PARAM_HIP_SIGNATURE 61697
#define PARAM_ESP_INFO_NOSIG 62565
#define PARAM_ECHO_REQUEST_NOSIG 63661
#define PARAM_ECHO_RESPONSE_NOSIG 63425
#define PARAM_FROM 65498
#define PARAM_RVS_HMAC 65500
#define PARAM_VIA_RVS 65502
#define PARAM_CRITICAL_BIT 0x0001
/* encryption algorithms */
typedef enum {
RESERVED, /* 0 */
ESP_AES_CBC_HMAC_SHA1, /* 1 */
ESP_3DES_CBC_HMAC_SHA1, /* 2 */
ESP_3DES_CBC_HMAC_MD5, /* 3 */
ESP_BLOWFISH_CBC_HMAC_SHA1, /* 4 */
ESP_NULL_HMAC_SHA1, /* 5 */
ESP_NULL_HMAC_MD5, /* 6 */
SUITE_ID_MAX, /* 7 */
} SUITE_IDS;
#define ENCR_NULL(a) ((a == ESP_NULL_HMAC_SHA1) || \
(a == ESP_NULL_HMAC_MD5))
/* Supported transforms are compressed into a bitmask... */
/* Default HIP transforms proposed when none are specified in config */
#define DEFAULT_HIP_TRANS \
((1 << ESP_AES_CBC_HMAC_SHA1) | \
(1 << ESP_3DES_CBC_HMAC_SHA1) | \
(1 << ESP_3DES_CBC_HMAC_MD5) | \
(1 << ESP_BLOWFISH_CBC_HMAC_SHA1) | \
(1 << ESP_NULL_HMAC_SHA1) | \
(1 << ESP_NULL_HMAC_MD5))
/* Default ESP transforms proposed when none are specified in config */
#define ESP_OFFSET 8
#define DEFAULT_ESP_TRANS \
((1 << (ESP_OFFSET + ESP_AES_CBC_HMAC_SHA1)) | \
(1 << (ESP_OFFSET + ESP_3DES_CBC_HMAC_SHA1)) | \
(1 << (ESP_OFFSET + ESP_3DES_CBC_HMAC_MD5)) | \
(1 << (ESP_OFFSET + ESP_BLOWFISH_CBC_HMAC_SHA1)) | \
(1 << (ESP_OFFSET + ESP_NULL_HMAC_SHA1)) | \
(1 << (ESP_OFFSET + ESP_NULL_HMAC_MD5)))
/* HI (signature) algorithms */
typedef enum {
HI_ALG_RESERVED,
HI_ALG_DSA = 3,
HI_ALG_RSA = 5,
} HI_ALGORITHMS;
#define HIP_RSA_DFT_EXP RSA_F4 /* 0x10001L = 65537; 3 and 17 are also common */
#define HI_TYPESTR(a) ((a == HI_ALG_DSA) ? "DSA" : \
(a == HI_ALG_RSA) ? "RSA" : "UNKNOWN")
/* SADB algorithms */
#define SADB_EALG_3DESCBC 3
#define SADB_X_EALG_BLOWFISHCBC 7
#define SADB_EALG_NULL 11
#define SADB_X_EALG_AESCBC 12
#define SADB_AALG_MD5HMAC 2
#define SADB_AALG_SHA1HMAC 3
/* HI Domain Identifier types */
typedef enum {
DIT_NONE, /* none included */
DIT_FQDN, /* Fully Qualified Domain Name, in binary format */
DIT_NAI, /* Network Access Identifier, binary, login@FQDN */
} HI_DIT;
typedef enum {
UNVERIFIED,
ACTIVE,
DEPRECATED,
DELETED, /* not in spec, but used when address is removed */
} ADDRESS_STATES;
typedef enum {
HIP_ENCRYPTION,
HIP_INTEGRITY,
ESP_ENCRYPTION,
ESP_AUTH,
} KEY_TYPES;
typedef enum {
GL_HIP_ENCRYPTION_KEY, /* 0 */
GL_HIP_INTEGRITY_KEY,
LG_HIP_ENCRYPTION_KEY,
LG_HIP_INTEGRITY_KEY,
GL_ESP_ENCRYPTION_KEY,
GL_ESP_AUTH_KEY,
LG_ESP_ENCRYPTION_KEY,
LG_ESP_AUTH_KEY /* 7 */
} HIP_KEYMAT_KEYS;
typedef enum {
KEY_LEN_NULL = 0, /* RFC 2410 */
KEY_LEN_MD5 = 16, /* 128 bits per RFC 2403 */
KEY_LEN_SHA1 = 20, /* 160 bits per RFC 2404 */
KEY_LEN_3DES = 24, /* 192 bits (3x64-bit keys) RFC 2451 */
KEY_LEN_AES = 16, /* 128 bits per RFC 3686; also 192, 256-bits */
KEY_LEN_BLOWFISH = 16, /* 128 bits per RFC 2451 */
} HIP_KEYLENS;
/* Diffie-Hellman Group IDs */
typedef enum {
DH_RESERVED,
DH_384,
DH_OAKLEY_1,
DH_MODP_1536,
DH_MODP_3072,
DH_MODP_6144,
DH_MODP_8192,
DH_MAX
} DH_GROUP_IDS;
/* choose default DH group here */
#define DEFAULT_DH_GROUP_ID DH_MODP_1536
#define DH_MAX_LEN 1024
/*
* HIP LOCATOR parameters
*/
#define LOCATOR_PREFERRED 0x01
#define LOCATOR_TRAFFIC_TYPE_BOTH 0x00
#define LOCATOR_TRAFFIC_TYPE_SIGNALING 0x01
#define LOCATOR_TRAFFIC_TYPE_DATA 0x02
#define LOCATOR_TYPE_IPV6 0x00
#define LOCATOR_TYPE_SPI_IPV6 0x01
/*
* Notify error types
*/
#define NOTIFY_UNSUPPORTED_CRITICAL_PARAMETER_TYPE 1
#define NOTIFY_INVALID_SYNTAX 7
#define NOTIFY_NO_DH_PROPOSAL_CHOSEN 14
#define NOTIFY_INVALID_DH_CHOSEN 15
#define NOTIFY_NO_HIP_PROPOSAL_CHOSEN 16
#define NOTIFY_INVALID_HIP_TRANSFORM_CHOSEN 17
#define NOTIFY_NO_ESP_PROPOSAL_CHOSEN 18
#define NOTIFY_INVALID_ESP_TRANSFORM_CHOSEN 19
#define NOTIFY_AUTHENTICATION_FAILED 24
#define NOTIFY_CHECKSUM_FAILED 26
#define NOTIFY_HMAC_FAILED 28
#define NOTIFY_ENCRYPTION_FAILED 32
#define NOTIFY_INVALID_HIT 40
#define NOTIFY_BLOCKED_BY_POLICY 42
#define NOTIFY_SERVER_BUSY_PLEASE_RETRY 44
#define NOTIFY_LOCATOR_TYPE_UNSUPPORTED 46
#define NOTIFY_I2_ACKNOWLEDGEMENT 16384
#define NOTIFY_LOSS_DETECT 16385
/*
* Registration types
*/
typedef enum {
REGTYPE_RESERVED,
REGTYPE_RVS, /* 1 = Rendezvous Server */
REGTYPE_RELAY_UDP_HIP, /* 2 = UDP/HIP NAT Relay Server */
REGTYPE_MR, /* 3 = Mobile Router */
} HIP_REGTYPES;
#endif /* !_HIP_PROTO_H_ */
|
[
"siliconja@4c5cb64f-9889-4596-9799-84b02dc3effa"
] |
siliconja@4c5cb64f-9889-4596-9799-84b02dc3effa
|
d4145fe86b04415f73d49772a2750deae44675fb
|
7ba4d2200e0b599e4b8d5b843b85d16675f00f04
|
/QIE10_Testing/src/draw_map_full.h
|
dafe2a2db90a58ca336445eb5641745320eeaf6d
|
[] |
no_license
|
ugtok/ngHCAL
|
f9cb1f4f6c81f489448e04557981c01b2daed349
|
5c0dc510f17ac8dcf59f2eb6521963bf4ab565e8
|
refs/heads/master
| 2021-01-18T15:37:32.817477 | 2017-02-16T15:21:54 | 2017-02-16T15:21:54 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 6,758 |
h
|
#include "TCanvas.h"
#include "TBox.h"
#include "TLatex.h"
static const int HF_num = 8;
static const int SL_num = 14;
static const int QI_num = 24;
static const int padMap[2][8] = { { 5,1,2,6,10,14,13,9 },{ 8,4,3,7,11,15,16,12 }};
int**** create_error_map(){
int**** lv2_err_map = new int***[2];
for (int side=0; side<2; side ++){
lv2_err_map[side] = new int**[HF_num];
for (int hf=0; hf<HF_num ; hf++) {
lv2_err_map[side][hf] = new int*[SL_num];
for (int sl=0 ; sl<SL_num ; sl++) {
lv2_err_map[side][hf][sl] = new int[QI_num];
}
}
}
for (int side=0; side<2; side++) {
for (int hf=0; hf<HF_num ; hf++) {
for (int sl=0 ; sl<SL_num ; sl++) {
for (int qi=0 ; qi<QI_num ; qi++) {
lv2_err_map[side][hf][sl][qi] = -1;
// -1 = disabled
// 0 = fail
// 1 = pass
}
}
}
}
return lv2_err_map;
}
void draw_map(int**** lv2_err_map, int run_num, char const* folder_name, char const* title){
/*
int HF_num_adj = 0;
for (int hf=0; hf<HF_num ; hf++) {
if (lv0_mask[hf] == 1) {
HF_num_adj++;
}
}
*/
int HF_num_adj = 1;
float HF_width = 0.97;
float HF_w_buffer = (1-HF_width)/2;
float HF_w_lower = 0 + HF_w_buffer;
float HF_w_upper = 1 - HF_w_buffer;
float HF_h = 0.8;
float HF_h_lower = 0.05;
float HF_h_unit = 1/((4*(float)HF_num_adj)+((float)HF_num_adj+1));
float SL_width = HF_width/(float)SL_num;
//float QI_height = (4*HF_h_unit)/(float)QI_num;
float QI_height = (HF_h)/(float)QI_num;
TCanvas *c1;
TPad *pad1;
TPad *pad2;
TBox *HF;
TBox *SL;
TBox *QI;
TBox *Quadrant;
TLatex *text = new TLatex;
char temp_text[512];
char figure_name[512];
char side_label[16];
int hf = 0;
bool crate_flag[2][HF_num] = {};
bool temp_flag = 0;
for (int side=0; side<2; side++) {
for (int hf_i=0 ; hf_i<HF_num ; hf_i++) {
temp_flag = 0;
for (int sl=0 ; sl<SL_num ; sl++) {
for (int qi=0 ; qi<QI_num ; qi++) {
if(lv2_err_map[side][hf_i][sl][qi] != -1) {
temp_flag = 1;
}
}
}
crate_flag[side][hf_i] = temp_flag;
}
}
c1 = new TCanvas("c1","c1",2000,1600);
pad1 = new TPad("title","title",0,.9,1.,1.);
pad2 = new TPad("pad","pad",0,0,1.,.9);
pad1->Draw();
pad2->Draw();
pad2->Divide(4,4);
for (int side =0; side<2; side++) {
if (side == 0) {
sprintf(side_label,"%s","M");
} else {
sprintf(side_label,"%s","P");
}
for (int hf_i=0 ; hf_i<HF_num ; hf_i++) {
pad2->cd(padMap[side][hf_i]);
if (crate_flag[side][hf_i] == 1) {
for (int sl=0 ; sl<SL_num ; sl++) {
for (int qi=0 ; qi<QI_num ; qi++) {
QI = new TBox( HF_w_lower+(sl*SL_width) , (HF_h+HF_h_lower) - (qi*QI_height) , HF_w_lower+((sl+1)*SL_width) , (HF_h+HF_h_lower) - ((qi+1)*QI_height) );
// QI = new TBox( HF_w_lower+(sl*SL_width) , (1-(((5*(1))-4)*HF_h_unit)) - (qi*QI_height) , HF_w_lower+((sl+1)*SL_width) , (1-(((5*(1))-4)*HF_h_unit)) - ((qi+1)*QI_height) );
if (lv2_err_map[side][hf_i][sl][qi] == 0) {
QI->SetFillColor(2);
} else if (lv2_err_map[side][hf_i][sl][qi] == 1){
QI->SetFillColor(3);
} else {
QI->SetFillColor(4);
}
QI->Draw();
sprintf(temp_text,"%i",qi+1);
text->SetTextAlign(23);
text->SetTextSize(0.7*QI_height);
//text->DrawLatex(HF_w_lower+((sl+0.4)*SL_width),(((5*(hf+1))-4)*HF_h_unit)+((qi+0.3)*QI_height),temp_text);
// text->DrawLatex( HF_w_lower+((sl+0.3)*SL_width) , (1-(((5*(1))-4)*HF_h_unit)) - ((qi+0.45)*QI_height) , temp_text );
text->DrawLatex( HF_w_lower+((sl+0.5)*SL_width) , (HF_h+HF_h_lower) - ((qi+0.45)*QI_height) , temp_text );
}
//SL = new TBox(HF_w_lower+(sl*SL_width),((5*(hf+1))-4)*HF_h_unit,HF_w_lower+((sl+1)*SL_width),(5*(hf+1))*HF_h_unit);
SL = new TBox(HF_w_lower+(sl*SL_width),HF_h_lower,HF_w_lower+((sl+1)*SL_width),HF_h_lower+HF_h);
SL->SetFillStyle(0);
SL->SetLineColor(1);
SL->SetLineStyle(2);
SL->SetLineWidth(1);
SL->Draw();
sprintf(temp_text,"SL%i",sl+1);
text->SetTextAlign(23);
text->SetTextSize(SL_width/4);
//text->DrawLatex(HF_w_lower+((sl+0.2)*SL_width),((5*(hf+1))-4.2)*HF_h_unit,temp_text);
text->DrawLatex(HF_w_lower+((sl+0.5)*SL_width),0.8*HF_h_lower,temp_text);
}
//HF = new TBox(HF_w_lower,((5*(hf+1))-4)*HF_h_unit,HF_w_upper,(5*(hf+1))*HF_h_unit);
HF = new TBox(HF_w_lower,HF_h_lower,HF_w_upper,HF_h_lower+HF_h);
// HF = new TBox(HF_w_lower,HF_h_unit,HF_w_upper,5*HF_h_unit);
HF->SetFillStyle(0);
HF->SetLineColor(1);
HF->SetLineStyle(1);
HF->SetLineWidth(1);
HF->Draw();
sprintf(temp_text,"HF%s0%i",side_label,hf_i+1);
text->SetTextAlign(23);
text->SetTextSize(0.6*HF_h_unit);
//text->DrawLatex(0.48,((5*(hf+1))-4.6)*HF_h_unit,temp_text);
// text->DrawLatex(0.37,((5*(1))-4.6)*HF_h_unit,temp_text);
text->DrawLatex(0.5,.95,temp_text);
hf++;
/* sprintf(figure_name,"$QIE10ROOT/img/%i/%s/%s_HF%s0%i.png",run_num,folder_name,title,side_label,hf_i+1); */
/* c1->SaveAs(figure_name); */
/* c1->Close(); */
}
}
}
c1->cd();
pad2->cd();
text->SetTextAlign(23);
text->SetTextSize(0.05);
sprintf(temp_text,"Q1");
text->DrawLatex(0.02,0.75,temp_text);
text->DrawLatex(0.77,0.75,temp_text);
sprintf(temp_text,"Q2");
text->DrawLatex(0.27,0.75,temp_text);
text->DrawLatex(0.52,0.75,temp_text);
sprintf(temp_text,"Q3");
text->DrawLatex(0.27,0.25,temp_text);
text->DrawLatex(0.52,0.25,temp_text);
sprintf(temp_text,"Q4");
text->DrawLatex(0.02,0.25,temp_text);
text->DrawLatex(0.77,0.25,temp_text);
Quadrant = new TBox();
Quadrant->SetFillStyle(0);
Quadrant->SetLineColor(1);
Quadrant->SetLineStyle(2);
Quadrant->SetLineWidth(2);
// Quadrant->Draw();
Quadrant->DrawBox(0,0,1,.5);
// Quadrant->DrawBox(0,0.5,1,1);
Quadrant->DrawBox(0.25,0,.75,1);
//Quadrant->DrawBox(0.75,0,1,1);
Quadrant->SetLineWidth(8);
Quadrant->DrawBox(0,0,.5,1);
Quadrant->DrawBox(0.5,0,1,1);
sprintf(temp_text,"HFP");
sprintf(temp_text,"HFM");
text->DrawLatex(0.25,0.995,temp_text);
sprintf(temp_text,"HFP");
text->DrawLatex(0.75,0.995,temp_text);
pad1->cd();
text->SetTextAlign(22);
sprintf(temp_text,"%s",title);
text->SetTextSize(0.75);
text->DrawLatex(0.5,0.5,temp_text);
string saveName = title;
replace(saveName.begin(),saveName.end(), ' ', '_');
sprintf(figure_name,"$QIE10ROOT/img/%i/%s/%s.png",run_num,folder_name,saveName.c_str());
c1->SaveAs(figure_name);
c1->Close();
}
|
[
"[email protected]"
] | |
a79c6dc6d07ea3da4308c36bb6fdb275b1cf3c3f
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/c++/Marlin/2016/8/language_an.h
|
9184d332f92c078b61c259c26d4caa71e9f0aea2
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null |
UTF-8
|
C
| false | false | 7,853 |
h
|
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Aragonese
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
*
*/
#ifndef LANGUAGE_AN_H
#define LANGUAGE_AN_H
#define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME " parada."
#define MSG_SD_INSERTED "Tarcheta colocada"
#define MSG_SD_REMOVED "Tarcheta retirada"
#define MSG_MAIN "Menu prencipal"
#define MSG_AUTOSTART " Autostart"
#define MSG_DISABLE_STEPPERS "Amortar motors"
#define MSG_AUTO_HOME "Levar a l'orichen"
#define MSG_LEVEL_BED_HOMING "Homing XYZ"
#define MSG_LEVEL_BED_WAITING "Click to Begin"
#define MSG_LEVEL_BED_DONE "Leveling Done!"
#define MSG_LEVEL_BED_CANCEL "Cancel"
#define MSG_SET_HOME_OFFSETS "Set home offsets"
#define MSG_HOME_OFFSETS_APPLIED "Offsets applied"
#define MSG_SET_ORIGIN "Establir zero"
#define MSG_PREHEAT_1 "Precalentar PLA"
#define MSG_PREHEAT_1_N "Precalentar PLA "
#define MSG_PREHEAT_1_ALL "Precalentar PLA a"
#define MSG_PREHEAT_1_BEDONLY "Prec. PLA Base"
#define MSG_PREHEAT_1_SETTINGS "Achustar tem. PLA"
#define MSG_PREHEAT_2 "Precalentar ABS"
#define MSG_PREHEAT_2_N "Precalentar ABS "
#define MSG_PREHEAT_2_ALL "Precalentar ABS a"
#define MSG_PREHEAT_2_BEDONLY "Prec. ABS Base"
#define MSG_PREHEAT_2_SETTINGS "Achustar tem. ABS"
#define MSG_COOLDOWN "Enfriar"
#define MSG_SWITCH_PS_ON "Enchegar Fuent"
#define MSG_SWITCH_PS_OFF "Desenchegar Fuent"
#define MSG_EXTRUDE "Extruir"
#define MSG_RETRACT "Retraer"
#define MSG_MOVE_AXIS "Mover Eixes"
#define MSG_MOVE_X "Move X"
#define MSG_MOVE_Y "Move Y"
#define MSG_MOVE_Z "Move Z"
#define MSG_MOVE_E "Extruder"
#define MSG_MOVE_01MM "Move 0.1mm"
#define MSG_MOVE_1MM "Move 1mm"
#define MSG_MOVE_10MM "Move 10mm"
#define MSG_SPEED "Velocidat"
#define MSG_NOZZLE "Nozzle"
#define MSG_BED "Base"
#define MSG_FAN_SPEED "Ixoriador"
#define MSG_FLOW "Fluxo"
#define MSG_CONTROL "Control"
#define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
#define MSG_AUTOTEMP "Autotemp"
#define MSG_ON "On"
#define MSG_OFF "Off"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ves-jerk"
#define MSG_VMAX "Vmax"
#define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax"
#define MSG_A_RETRACT "A-retrac."
#define MSG_XSTEPS "X trangos/mm"
#define MSG_YSTEPS "Y trangos/mm"
#define MSG_ZSTEPS "Z trangos/mm"
#define MSG_ESTEPS "E trangos/mm"
#define MSG_TEMPERATURE "Temperatura"
#define MSG_MOTION "Movimiento"
#define MSG_VOLUMETRIC "Filament"
#define MSG_VOLUMETRIC_ENABLED "E in mm3"
#define MSG_FILAMENT_DIAM "Fil. Dia."
#define MSG_CONTRAST "Contrast"
#define MSG_STORE_EPROM "Alzar Memoria"
#define MSG_LOAD_EPROM "Cargar Memoria"
#define MSG_RESTORE_FAILSAFE "Rest. d'emerchen."
#define MSG_REFRESH "Tornar a cargar"
#define MSG_WATCH "Monitorizar"
#define MSG_PREPARE "Preparar"
#define MSG_TUNE "Achustar"
#define MSG_PAUSE_PRINT "Pausar impresion"
#define MSG_RESUME_PRINT "Contin. impresion"
#define MSG_STOP_PRINT "Detener Impresion"
#define MSG_CARD_MENU "Menu de SD"
#define MSG_NO_CARD "No i hai tarcheta"
#define MSG_DWELL "Reposo..."
#define MSG_USERWAIT "Asperan. ordines"
#define MSG_RESUMING "Contin. impresion"
#define MSG_PRINT_ABORTED "Print aborted"
#define MSG_NO_MOVE "Sin movimiento"
#define MSG_KILLED "ATURADA D'EMERCH."
#define MSG_STOPPED "ATURADA."
#define MSG_CONTROL_RETRACT "Retraer mm"
#define MSG_CONTROL_RETRACT_SWAP "Swap Retraer mm"
#define MSG_CONTROL_RETRACTF "Retraer F"
#define MSG_CONTROL_RETRACT_ZLIFT "Devantar mm"
#define MSG_CONTROL_RETRACT_RECOVER "DesRet +mm"
#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Swap DesRet +mm"
#define MSG_CONTROL_RETRACT_RECOVERF "DesRet F"
#define MSG_AUTORETRACT "AutoRetr."
#define MSG_FILAMENTCHANGE "Cambear"
#define MSG_INIT_SDCARD "Encetan. tarcheta"
#define MSG_CNG_SDCARD "Cambiar tarcheta"
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST "first"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
#define MSG_DELTA_CALIBRATE_Z "Calibrate Z"
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // LANGUAGE_AN_H
|
[
"[email protected]"
] | |
a625a989872560b88031570e61df90ec013cc478
|
6f8f35b2ab953a61eb888b6ef0915839edc8038e
|
/src/map/party.c
|
b1d8a94fddb54c7f644d42962c0d96947c178078
|
[] |
no_license
|
GMVyLow/manner
|
8d5e34e35e8a77867afedcc9f2033be2afe47258
|
a9233f0a5b271761bbaa4d6667e98e04bae649ed
|
refs/heads/master
| 2021-01-10T17:33:22.031385 | 2015-12-20T14:43:26 | 2015-12-20T14:43:26 | 48,285,495 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 35,653 |
c
|
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#include "../common/cbasetypes.h"
#include "../common/timer.h"
#include "../common/socket.h" // last_tick
#include "../common/nullpo.h"
#include "../common/malloc.h"
#include "../common/random.h"
#include "../common/showmsg.h"
#include "../common/utils.h"
#include "../common/strlib.h"
#include "party.h"
#include "battleground.h"
#include "atcommand.h" //msg_txt()
#include "pc.h"
#include "map.h"
#include "instance.h"
#include "battle.h"
#include "intif.h"
#include "clif.h"
#include "log.h"
#include "skill.h"
#include "status.h"
#include "itemdb.h"
#include "mapreg.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static DBMap* party_db; // int party_id -> struct party_data* (releases data)
static DBMap* party_booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
static unsigned long party_booking_nextid = 1;
int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
int party_create_byscript;
/*==========================================
* Fills the given party_member structure according to the sd provided.
* Used when creating/adding people to a party. [Skotlex]
*------------------------------------------*/
static void party_fill_member(struct party_member* member, struct map_session_data* sd, unsigned int leader)
{
member->account_id = sd->status.account_id;
member->char_id = sd->status.char_id;
safestrncpy(member->name, sd->status.name, NAME_LENGTH);
member->class_ = sd->status.class_;
member->map = sd->mapindex;
member->lv = sd->status.base_level;
member->online = 1;
member->leader = leader;
}
/// Get the member_id of a party member.
/// Return -1 if not in party.
int party_getmemberid(struct party_data* p, struct map_session_data* sd)
{
int member_id;
nullpo_retr(-1, p);
if( sd == NULL )
return -1;// no player
ARR_FIND(0, MAX_PARTY, member_id,
p->party.member[member_id].account_id == sd->status.account_id &&
p->party.member[member_id].char_id == sd->status.char_id);
if( member_id == MAX_PARTY )
return -1;// not found
return member_id;
}
/*==========================================
* Request an available sd of this party
*------------------------------------------*/
struct map_session_data* party_getavailablesd(struct party_data *p)
{
int i;
nullpo_retr(NULL, p);
ARR_FIND(0, MAX_PARTY, i, p->data[i].sd != NULL);
return( i < MAX_PARTY ) ? p->data[i].sd : NULL;
}
/*==========================================
* Retrieves and validates the sd pointer for this party member [Skotlex]
*------------------------------------------*/
static TBL_PC* party_sd_check(int party_id, int account_id, int char_id)
{
TBL_PC* sd = map_id2sd(account_id);
if (!(sd && sd->status.char_id == char_id))
return NULL;
if( sd->status.party_id == 0 )
sd->status.party_id = party_id;// auto-join if not in a party
if (sd->status.party_id != party_id)
{ //If player belongs to a different party, kick him out.
intif_party_leave(party_id,account_id,char_id);
return NULL;
}
return sd;
}
/*==========================================
* Destructor
* Called in map shutdown, cleanup var
*------------------------------------------*/
void do_final_party(void)
{
party_db->destroy(party_db,NULL);
party_booking_db->destroy(party_booking_db,NULL); // Party Booking [Spiria]
}
// Constructor, init vars
void do_init_party(void)
{
party_db = idb_alloc(DB_OPT_RELEASE_DATA);
party_booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria]
add_timer_func_list(party_send_xy_timer, "party_send_xy_timer");
add_timer_interval(gettick()+battle_config.party_update_interval, party_send_xy_timer, 0, 0, battle_config.party_update_interval);
}
/// Party data lookup using party id.
struct party_data* party_search(int party_id)
{
if(!party_id)
return NULL;
return (struct party_data*)idb_get(party_db,party_id);
}
/// Party data lookup using party name.
struct party_data* party_searchname(const char* str)
{
struct party_data* p;
DBIterator *iter = db_iterator(party_db);
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
if( strncmpi(p->party.name,str,NAME_LENGTH) == 0 )
break;
}
dbi_destroy(iter);
return p;
}
int party_create(struct map_session_data *sd,char *name,int item,int item2)
{
struct party_member leader;
char tname[NAME_LENGTH];
safestrncpy(tname, name, NAME_LENGTH);
trim(tname);
if( !tname[0] )
{// empty name
return 0;
}
if( sd->status.party_id > 0 || sd->party_joining || sd->party_creating )
{// already associated with a party
clif_party_created(sd,2);
return -2;
}
sd->party_creating = true;
party_fill_member(&leader, sd, 1);
intif_create_party(&leader,name,item,item2);
return 1;
}
void party_created(int account_id,int char_id,int fail,int party_id,char *name)
{
struct map_session_data *sd;
sd=map_id2sd(account_id);
if (!sd || sd->status.char_id != char_id || !sd->party_creating )
{ //Character logged off before creation ack?
if (!fail) //break up party since player could not be added to it.
intif_party_leave(party_id,account_id,char_id);
return;
}
sd->party_creating = false;
if( !fail ) {
sd->status.party_id = party_id;
clif_party_created(sd,0); //Success message
//We don't do any further work here because the char-server sends a party info packet right after creating the party
if(party_create_byscript) { //returns party id in $@party_create_id if party is created by script
mapreg_setreg(add_str("$@party_create_id"),party_id);
party_create_byscript = 0;
}
}
else
clif_party_created(sd,1); // "party name already exists"
}
int party_request_info(int party_id, int char_id)
{
return intif_request_partyinfo(party_id, char_id);
}
/// Invoked (from char-server) when the party info is not found.
int party_recv_noinfo(int party_id, int char_id)
{
party_broken(party_id);
if( char_id != 0 )// requester
{
struct map_session_data* sd;
sd = map_charid2sd(char_id);
if( sd && sd->status.party_id == party_id )
sd->status.party_id = 0;
}
return 0;
}
static void party_check_state(struct party_data *p)
{
int i;
memset(&p->state, 0, sizeof(p->state));
for (i = 0; i < MAX_PARTY; i ++)
{
if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that.
switch (p->party.member[i].class_) {
case JOB_MONK:
case JOB_BABY_MONK:
case JOB_CHAMPION:
p->state.monk = 1;
break;
case JOB_STAR_GLADIATOR:
p->state.sg = 1;
break;
case JOB_SUPER_NOVICE:
case JOB_SUPER_BABY:
p->state.snovice = 1;
break;
case JOB_TAEKWON:
p->state.tk = 1;
break;
}
}
}
int party_recv_info(struct party* sp, int char_id)
{
struct party_data* p;
struct party_member* member;
struct map_session_data* sd;
int removed[MAX_PARTY];// member_id in old data
int removed_count = 0;
int added[MAX_PARTY];// member_id in new data
int added_count = 0;
int i;
int member_id;
nullpo_ret(sp);
p = (struct party_data*)idb_get(party_db, sp->party_id);
if( p != NULL )// diff members
{
for( member_id = 0; member_id < MAX_PARTY; ++member_id )
{
member = &p->party.member[member_id];
if( member->char_id == 0 )
continue;// empty
ARR_FIND(0, MAX_PARTY, i,
sp->member[i].account_id == member->account_id &&
sp->member[i].char_id == member->char_id);
if( i == MAX_PARTY )
removed[removed_count++] = member_id;
}
for( member_id = 0; member_id < MAX_PARTY; ++member_id )
{
member = &sp->member[member_id];
if( member->char_id == 0 )
continue;// empty
ARR_FIND(0, MAX_PARTY, i,
p->party.member[i].account_id == member->account_id &&
p->party.member[i].char_id == member->char_id);
if( i == MAX_PARTY )
added[added_count++] = member_id;
}
}
else
{
for( member_id = 0; member_id < MAX_PARTY; ++member_id )
if( sp->member[member_id].char_id != 0 )
added[added_count++] = member_id;
CREATE(p, struct party_data, 1);
idb_put(party_db, sp->party_id, p);
}
while( removed_count > 0 )// no longer in party
{
member_id = removed[--removed_count];
sd = p->data[member_id].sd;
if( sd == NULL )
continue;// not online
party_member_withdraw(sp->party_id, sd->status.account_id, sd->status.char_id);
}
memcpy(&p->party, sp, sizeof(struct party));
memset(&p->state, 0, sizeof(p->state));
memset(&p->data, 0, sizeof(p->data));
for( member_id = 0; member_id < MAX_PARTY; member_id++ )
{
member = &p->party.member[member_id];
if ( member->char_id == 0 )
continue;// empty
p->data[member_id].sd = party_sd_check(sp->party_id, member->account_id, member->char_id);
}
party_check_state(p);
while( added_count > 0 )// new in party
{
member_id = added[--added_count];
sd = p->data[member_id].sd;
if( sd == NULL )
continue;// not online
clif_charnameupdate(sd); //Update other people's display. [Skotlex]
clif_party_member_info(p,sd);
clif_party_option(p,sd,0x100);
clif_party_info(p,NULL);
if( p->instance_id != 0 )
instance_reqinfo(sd,p->instance_id);
}
if( char_id != 0 )// requester
{
sd = map_charid2sd(char_id);
if( sd && sd->status.party_id == sp->party_id && party_getmemberid(p,sd) == -1 )
sd->status.party_id = 0;// was not in the party
}
return 0;
}
int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
{
struct party_data *p;
int i;
nullpo_ret(sd);
if( ( p = party_search(sd->status.party_id) ) == NULL )
return 0;
// confirm if this player is a party leader
ARR_FIND(0, MAX_PARTY, i, p->data[i].sd == sd);
if( i == MAX_PARTY || !p->party.member[i].leader ) {
clif_displaymessage(sd->fd, msg_txt(sd,282));
return 0;
}
// confirm if there is an open slot in the party
ARR_FIND(0, MAX_PARTY, i, p->party.member[i].account_id == 0);
if( i == MAX_PARTY ) {
clif_party_inviteack(sd, (tsd?tsd->status.name:""), 3);
return 0;
}
// confirm whether the account has the ability to invite before checking the player
if( !pc_has_permission(sd, PC_PERM_PARTY) || (tsd && !pc_has_permission(tsd, PC_PERM_PARTY)) ) {
clif_displaymessage(sd->fd, msg_txt(sd,81)); // "Your GM level doesn't authorize you to preform this action on the specified player."
return 0;
}
if( tsd == NULL) {
clif_party_inviteack(sd, "", 7);
return 0;
}
if(!battle_config.invite_request_check) {
if (tsd->guild_invite>0 || tsd->trade_partner || tsd->adopt_invite) {
clif_party_inviteack(sd,tsd->status.name,0);
return 0;
}
}
if (!tsd->fd) { //You can't invite someone who has already disconnected.
clif_party_inviteack(sd,tsd->status.name,1);
return 0;
}
if( !battle_config.faction_allow_party && sd->status.faction_id != tsd->status.faction_id )
{
clif_displaymessage(sd->fd,"You cannot invite to party with other faction's members.");
return 0;
}
if( tsd->status.party_id > 0 || tsd->party_invite > 0 )
{// already associated with a party
clif_party_inviteack(sd,tsd->status.name,0);
return 0;
}
tsd->party_invite=sd->status.party_id;
tsd->party_invite_account=sd->status.account_id;
clif_party_invite(sd,tsd);
return 1;
}
int party_reply_invite(struct map_session_data *sd,int party_id,int flag)
{
struct map_session_data* tsd;
struct party_member member;
if( sd->party_invite != party_id )
{// forged
sd->party_invite = 0;
sd->party_invite_account = 0;
return 0;
}
tsd = map_id2sd(sd->party_invite_account);
if( flag == 1 && !sd->party_creating && !sd->party_joining )
{// accepted and allowed
sd->party_joining = true;
party_fill_member(&member, sd, 0);
intif_party_addmember(sd->party_invite, &member);
return 1;
}
else
{// rejected or failure
sd->party_invite = 0;
sd->party_invite_account = 0;
if( tsd != NULL )
clif_party_inviteack(tsd,sd->status.name,1);
return 0;
}
return 0;
}
//Invoked when a player joins:
//- Loads up party data if not in server
//- Sets up the pointer to him
//- Player must be authed/active and belong to a party before calling this method
void party_member_joined(struct map_session_data *sd)
{
struct party_data* p = party_search(sd->status.party_id);
int i;
if (!p)
{
party_request_info(sd->status.party_id, sd->status.char_id);
return;
}
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == sd->status.account_id && p->party.member[i].char_id == sd->status.char_id );
if (i < MAX_PARTY)
{
p->data[i].sd = sd;
if( p->instance_id )
instance_reqinfo(sd,p->instance_id);
}
else
sd->status.party_id = 0; //He does not belongs to the party really?
}
/// Invoked (from char-server) when a new member is added to the party.
/// flag: 0-success, 1-failure
int party_member_added(int party_id,int account_id,int char_id, int flag)
{
struct map_session_data *sd = map_id2sd(account_id),*sd2;
struct party_data *p = party_search(party_id);
int i;
if(sd == NULL || sd->status.char_id != char_id || !sd->party_joining ) {
if (!flag) //Char logged off before being accepted into party.
intif_party_leave(party_id,account_id,char_id);
return 0;
}
sd2 = map_id2sd(sd->party_invite_account);
sd->party_joining = false;
sd->party_invite = 0;
sd->party_invite_account = 0;
if (!p) {
ShowError("party_member_added: party %d not found.\n",party_id);
intif_party_leave(party_id,account_id,char_id);
return 0;
}
if( flag )
{// failed
if( sd2 != NULL )
clif_party_inviteack(sd2,sd->status.name,3);
return 0;
}
sd->status.party_id = party_id;
clif_party_member_info(p,sd);
clif_party_option(p,sd,0x100);
clif_party_info(p,sd);
if( sd2 != NULL )
clif_party_inviteack(sd2,sd->status.name,2);
for( i = 0; i < ARRAYLENGTH(p->data); ++i )
{// hp of the other party members
sd2 = p->data[i].sd;
if( sd2 && sd2->status.account_id != account_id && sd2->status.char_id != char_id )
clif_hpmeter_single(sd->fd, sd2->bl.id, sd2->battle_status.hp, sd2->battle_status.max_hp);
}
clif_party_hp(sd);
clif_party_xy(sd);
clif_charnameupdate(sd); //Update char name's display [Skotlex]
if( p->instance_id )
instance_reqinfo(sd,p->instance_id);
return 0;
}
/// Party member 'sd' requesting kick of member with <account_id, name>.
int party_removemember(struct map_session_data* sd, int account_id, char* name)
{
struct party_data *p;
int i;
p = party_search(sd->status.party_id);
if( p == NULL )
return 0;
// check the requesting char's party membership
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == sd->status.account_id && p->party.member[i].char_id == sd->status.char_id );
if( i == MAX_PARTY )
return 0; // request from someone not in party? o.O
if( !p->party.member[i].leader )
return 0; // only party leader may remove members
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == account_id && strncmp(p->party.member[i].name,name,NAME_LENGTH) == 0 );
if( i == MAX_PARTY )
return 0; // no such char in party
intif_party_leave(p->party.party_id,account_id,p->party.member[i].char_id);
return 1;
}
int party_removemember2(struct map_session_data *sd,int char_id,int party_id)
{
struct party_data *p;
if( sd ) {
if( !sd->status.party_id )
return -3;
intif_party_leave(sd->status.party_id,sd->status.account_id,sd->status.char_id);
return 1;
} else {
int i;
if( !(p = party_search(party_id)) )
return -2;
ARR_FIND(0,MAX_PARTY,i,p->party.member[i].char_id == char_id );
if( i >= MAX_PARTY )
return -1;
intif_party_leave(party_id,p->party.member[i].account_id,char_id);
return 1;
}
return 0;
}
/// Party member 'sd' requesting exit from party.
int party_leave(struct map_session_data *sd)
{
struct party_data *p;
int i;
p = party_search(sd->status.party_id);
if( p == NULL )
return 0;
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == sd->status.account_id && p->party.member[i].char_id == sd->status.char_id );
if( i == MAX_PARTY )
return 0;
intif_party_leave(p->party.party_id,sd->status.account_id,sd->status.char_id);
return 1;
}
/// Invoked (from char-server) when a party member leaves the party.
int party_member_withdraw(int party_id, int account_id, int char_id)
{
struct map_session_data* sd = map_id2sd(account_id);
struct party_data* p = party_search(party_id);
if( p ) {
int i;
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == account_id && p->party.member[i].char_id == char_id );
if( i < MAX_PARTY ) {
clif_party_withdraw(p,sd,account_id,p->party.member[i].name,0x0);
memset(&p->party.member[i], 0, sizeof(p->party.member[0]));
memset(&p->data[i], 0, sizeof(p->data[0]));
p->party.count--;
party_check_state(p);
}
}
if( sd && sd->status.party_id == party_id && sd->status.char_id == char_id ) {
#ifdef BOUND_ITEMS
int idxlist[MAX_INVENTORY]; //or malloc to reduce consumtion
int j,i;
j = pc_bound_chk(sd,3,idxlist);
for(i=0;i<j;i++)
pc_delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,1,LOG_TYPE_OTHER);
#endif
sd->status.party_id = 0;
clif_charnameupdate(sd); //Update name display [Skotlex]
//TODO: hp bars should be cleared too
if( p->instance_id ) {
int16 m = sd->bl.m;
if( map[m].instance_id ) { // User was on the instance map
if( map[m].save.map )
pc_setpos(sd, map[m].save.map, map[m].save.x, map[m].save.y, CLR_TELEPORT);
else
pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
}
}
}
return 0;
}
/// Invoked (from char-server) when a party is disbanded.
int party_broken(int party_id)
{
struct party_data* p;
int i;
p = party_search(party_id);
if( p == NULL )
return 0;
if( p->instance_id )
{
instance_data[p->instance_id].party_id = 0;
instance_destroy( p->instance_id );
}
for( i = 0; i < MAX_PARTY; i++ )
{
if( p->data[i].sd!=NULL )
{
clif_party_withdraw(p,p->data[i].sd,p->party.member[i].account_id,p->party.member[i].name,0x10);
p->data[i].sd->status.party_id=0;
}
}
idb_remove(party_db,party_id);
return 1;
}
int party_changeoption(struct map_session_data *sd,int exp,int item)
{
nullpo_ret(sd);
if( sd->status.party_id == 0 )
return -3;
intif_party_changeoption(sd->status.party_id,sd->status.account_id,exp,item);
return 0;
}
//options: 0-exp, 1-item share, 2-pickup distribution
int party_setoption(struct party_data *party, int option, int flag)
{
int i;
ARR_FIND(0,MAX_PARTY,i,party->party.member[i].leader);
if(i >= MAX_PARTY)
return 0;
switch(option) {
case 0:
intif_party_changeoption(party->party.party_id,party->party.member[i].account_id,flag,party->party.item);
break;
case 1:
if(flag) flag = party->party.item|1;
else flag = party->party.item&~1;
intif_party_changeoption(party->party.party_id,party->party.member[i].account_id,party->party.exp,flag);
break;
case 2:
if(flag) flag = party->party.item|2;
else flag = party->party.item&~2;
intif_party_changeoption(party->party.party_id,party->party.member[i].account_id,party->party.exp,flag);
break;
default:
return 0;
break;
}
return 1;
}
int party_optionchanged(int party_id,int account_id,int exp,int item,int flag)
{
struct party_data *p;
struct map_session_data *sd=map_id2sd(account_id);
if( (p=party_search(party_id))==NULL)
return 0;
//Flag&1: Exp change denied. Flag&2: Item change denied.
if(!(flag&0x01) && p->party.exp != exp)
p->party.exp=exp;
if(!(flag&0x10) && p->party.item != item) {
p->party.item=item;
}
clif_party_option(p,sd,flag);
return 0;
}
int party_changeleader(struct map_session_data *sd, struct map_session_data *tsd, struct party_data *p)
{
int mi, tmi;
if ( !p ) {
if (!sd || !sd->status.party_id)
return -1;
if (!tsd || tsd->status.party_id != sd->status.party_id) {
clif_displaymessage(sd->fd, msg_txt(sd,283));
return -3;
}
if ( map[sd->bl.m].flag.partylock )
{
clif_displaymessage(sd->fd, msg_txt(sd,287));
return 0;
}
if ((p = party_search(sd->status.party_id)) == NULL )
return -1;
ARR_FIND( 0, MAX_PARTY, mi, p->data[mi].sd == sd );
if (mi == MAX_PARTY)
return 0; //Shouldn't happen
if (!p->party.member[mi].leader)
{ //Need to be a party leader.
clif_displaymessage(sd->fd, msg_txt(sd,282));
return 0;
}
ARR_FIND( 0, MAX_PARTY, tmi, p->data[tmi].sd == tsd);
if (tmi == MAX_PARTY)
return 0; //Shouldn't happen
}
else {
ARR_FIND(0,MAX_PARTY,mi,p->party.member[mi].leader);
ARR_FIND(0,MAX_PARTY,tmi,p->data[tmi].sd == tsd);
}
//Change leadership.
p->party.member[mi].leader = 0;
if (p->data[mi].sd && p->data[mi].sd->fd)
clif_displaymessage(p->data[mi].sd->fd, msg_txt(sd,284));
p->party.member[tmi].leader = 1;
if (p->data[tmi].sd && p->data[tmi].sd->fd)
clif_displaymessage(p->data[tmi].sd->fd, msg_txt(sd,285));
//Update info.
intif_party_leaderchange(p->party.party_id,p->party.member[tmi].account_id,p->party.member[tmi].char_id);
clif_party_info(p,NULL);
return 1;
}
/// Invoked (from char-server) when a party member
/// - changes maps
/// - logs in or out
/// - gains a level (disabled)
int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short map,int online,int lv)
{
struct party_member* m;
struct party_data* p;
int i;
p = party_search(party_id);
if( p == NULL )
return 0;
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == account_id && p->party.member[i].char_id == char_id );
if( i == MAX_PARTY )
{
ShowError("party_recv_movemap: char %d/%d not found in party %s (id:%d)",account_id,char_id,p->party.name,party_id);
return 0;
}
m = &p->party.member[i];
m->map = map;
m->online = online;
m->lv = lv;
//Check if they still exist on this map server
p->data[i].sd = party_sd_check(party_id, account_id, char_id);
clif_party_info(p,NULL);
return 0;
}
void party_send_movemap(struct map_session_data *sd)
{
struct party_data *p;
if( sd->status.party_id==0 )
return;
intif_party_changemap(sd,1);
p=party_search(sd->status.party_id);
if (!p) return;
if(sd->state.connect_new) {
//Note that this works because this function is invoked before connect_new is cleared.
clif_party_option(p,sd,0x100);
clif_party_info(p,sd);
clif_party_member_info(p,sd);
}
if (sd->fd) { // synchronize minimap positions with the rest of the party
int i;
for(i=0; i < MAX_PARTY; i++) {
if (p->data[i].sd &&
p->data[i].sd != sd &&
p->data[i].sd->bl.m == sd->bl.m)
{
clif_party_xy_single(sd->fd, p->data[i].sd);
clif_party_xy_single(p->data[i].sd->fd, sd);
}
}
}
return;
}
void party_send_levelup(struct map_session_data *sd)
{
intif_party_changemap(sd,1);
}
int party_send_logout(struct map_session_data *sd)
{
struct party_data *p;
int i;
if(!sd->status.party_id)
return 0;
intif_party_changemap(sd,0);
p=party_search(sd->status.party_id);
if(!p) return 0;
ARR_FIND( 0, MAX_PARTY, i, p->data[i].sd == sd );
if( i < MAX_PARTY )
memset(&p->data[i], 0, sizeof(p->data[0]));
else
ShowError("party_send_logout: Failed to locate member %d:%d in party %d!\n", sd->status.account_id, sd->status.char_id, p->party.party_id);
return 1;
}
int party_send_message(struct map_session_data *sd,const char *mes,int len)
{
if(sd->status.party_id==0)
return 0;
intif_party_message(sd->status.party_id,sd->status.account_id,mes,len);
party_recv_message(sd->status.party_id,sd->status.account_id,mes,len);
// Chat logging type 'P' / Party Chat
log_chat(LOG_CHAT_PARTY, sd->status.party_id, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes);
return 0;
}
int party_recv_message(int party_id,int account_id,const char *mes,int len)
{
struct party_data *p;
if( (p=party_search(party_id))==NULL)
return 0;
clif_party_message(p,account_id,mes,len);
return 0;
}
int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv)
{
struct party_data *p;
struct map_session_data *p_sd;
int i;
if(!party_id || (p=party_search(party_id))==NULL)
return 0;
switch(skill_id) {
case TK_COUNTER: //Increase Triple Attack rate of Monks.
if (!p->state.monk) return 0;
break;
case MO_COMBOFINISH: //Increase Counter rate of Star Gladiators
if (!p->state.sg) return 0;
break;
case AM_TWILIGHT2: //Twilight Pharmacy, requires Super Novice
return p->state.snovice;
case AM_TWILIGHT3: //Twilight Pharmacy, Requires Taekwon
return p->state.tk;
default:
return 0; //Unknown case?
}
for(i=0;i<MAX_PARTY;i++){
if ((p_sd = p->data[i].sd) == NULL)
continue;
if (sd->bl.m != p_sd->bl.m)
continue;
switch(skill_id) {
case TK_COUNTER: //Increase Triple Attack rate of Monks.
if((p_sd->class_&MAPID_UPPERMASK) == MAPID_MONK
&& pc_checkskill(p_sd,MO_TRIPLEATTACK)) {
sc_start4(&p_sd->bl,&p_sd->bl,SC_SKILLRATE_UP,100,MO_TRIPLEATTACK,
50+50*skill_lv, //+100/150/200% rate
0,0,skill_get_time(SG_FRIEND, 1));
}
break;
case MO_COMBOFINISH: //Increase Counter rate of Star Gladiators
if((p_sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR
&& sd->sc.data[SC_READYCOUNTER]
&& pc_checkskill(p_sd,SG_FRIEND)) {
sc_start4(&p_sd->bl,&p_sd->bl,SC_SKILLRATE_UP,100,TK_COUNTER,
50+50*pc_checkskill(p_sd,SG_FRIEND), //+100/150/200% rate
0,0,skill_get_time(SG_FRIEND, 1));
}
break;
}
}
return 0;
}
int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct party_data* p;
DBIterator *iter = db_iterator(party_db);
// for each existing party,
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
int i;
if( !p->party.count )
{// no online party members so do not iterate
continue;
}
// for each member of this party,
for( i = 0; i < MAX_PARTY; i++ )
{
struct map_session_data* sd = p->data[i].sd;
if( !sd ) continue;
if( p->data[i].x != sd->bl.x || p->data[i].y != sd->bl.y )
{// perform position update
clif_party_xy(sd);
p->data[i].x = sd->bl.x;
p->data[i].y = sd->bl.y;
}
if (battle_config.party_hp_mode && p->data[i].hp != sd->battle_status.hp)
{// perform hp update
clif_party_hp(sd);
p->data[i].hp = sd->battle_status.hp;
}
}
}
dbi_destroy(iter);
return 0;
}
int party_send_xy_clear(struct party_data *p)
{
int i;
nullpo_ret(p);
for(i=0;i<MAX_PARTY;i++){
if(!p->data[i].sd) continue;
p->data[i].hp = 0;
p->data[i].x = 0;
p->data[i].y = 0;
}
return 0;
}
// exp share and added zeny share [Valaris]
int party_exp_share(struct party_data* p, struct block_list* src, unsigned int base_exp, unsigned int job_exp, int zeny)
{
struct map_session_data* sd[MAX_PARTY];
unsigned int i, c;
#ifdef RENEWAL_EXP
uint32 base_exp_bonus, job_exp_bonus;
#endif
nullpo_ret(p);
// count the number of players eligible for exp sharing
for (i = c = 0; i < MAX_PARTY; i++) {
if( (sd[c] = p->data[i].sd) == NULL || sd[c]->bl.m != src->m || pc_isdead(sd[c]) || (battle_config.idle_no_share && pc_isidle(sd[c])) )
continue;
c++;
}
if (c < 1)
return 0;
base_exp/=c;
job_exp/=c;
zeny/=c;
if (battle_config.party_even_share_bonus && c > 1)
{
double bonus = 100 + battle_config.party_even_share_bonus*(c-1);
if (base_exp)
base_exp = (unsigned int) cap_value(base_exp * bonus/100, 0, UINT_MAX);
if (job_exp)
job_exp = (unsigned int) cap_value(job_exp * bonus/100, 0, UINT_MAX);
if (zeny)
zeny = (unsigned int) cap_value(zeny * bonus/100, INT_MIN, INT_MAX);
}
#ifdef RENEWAL_EXP
base_exp_bonus = base_exp;
job_exp_bonus = job_exp;
#endif
for (i = 0; i < c; i++) {
#ifdef RENEWAL_EXP
if( !(src && src->type == BL_MOB && ((TBL_MOB*)src)->db->mexp) ){
TBL_MOB *md = BL_CAST(BL_MOB, src);
int rate = 0;
if (!md)
return 0;
rate = pc_level_penalty_mod(sd[i], md->db->lv, md->db->status.class_, 1);
base_exp = (unsigned int)cap_value(base_exp_bonus * rate / 100, 1, UINT_MAX);
job_exp = (unsigned int)cap_value(job_exp_bonus * rate / 100, 1, UINT_MAX);
}
#endif
pc_gainexp(sd[i], src, base_exp, job_exp, false);
if (zeny) // zeny from mobs [Valaris]
pc_getzeny(sd[i],zeny,LOG_TYPE_PICKDROP_MONSTER,NULL);
}
return 0;
}
//Does party loot. first_charid holds the charid of the player who has time priority to take the item.
int party_share_loot(struct party_data* p, struct map_session_data* sd, struct item* item_data, int first_charid)
{
TBL_PC* target = NULL;
int i;
if (p && p->party.item&2 && (first_charid || !(battle_config.party_share_type&1)))
{
//item distribution to party members.
if (battle_config.party_share_type&2)
{ //Round Robin
TBL_PC* psd;
i = p->itemc;
do {
i++;
if (i >= MAX_PARTY)
i = 0; // reset counter to 1st person in party so it'll stop when it reaches "itemc"
if( (psd = p->data[i].sd) == NULL || sd->bl.m != psd->bl.m || pc_isdead(psd) || (battle_config.idle_no_share && pc_isidle(psd)) )
continue;
if (pc_additem(psd,item_data,item_data->amount,LOG_TYPE_PICKDROP_PLAYER))
continue; //Chosen char can't pick up loot.
//Successful pick.
p->itemc = i;
target = psd;
break;
} while (i != p->itemc);
}
else
{ //Random pick
TBL_PC* psd[MAX_PARTY];
int count = 0;
//Collect pick candidates
for (i = 0; i < MAX_PARTY; i++) {
if( (psd[count] = p->data[i].sd) == NULL || psd[count]->bl.m != sd->bl.m || pc_isdead(psd[count]) || (battle_config.idle_no_share && pc_isidle(psd[count])) )
continue;
count++;
}
while (count > 0) { //Pick a random member.
i = rnd()%count;
if (pc_additem(psd[i],item_data,item_data->amount,LOG_TYPE_PICKDROP_PLAYER))
{ //Discard this receiver.
psd[i] = psd[count-1];
count--;
} else { //Successful pick.
target = psd[i];
break;
}
}
}
}
if (!target) {
target = sd; //Give it to the char that picked it up
if ((i=pc_additem(sd,item_data,item_data->amount,LOG_TYPE_PICKDROP_PLAYER)))
return i;
}
if( p && battle_config.party_show_share_picker && battle_config.show_picker_item_type&(1<<itemdb_type(item_data->nameid)) )
clif_party_show_picker(target, item_data);
return 0;
}
int party_send_dot_remove(struct map_session_data *sd)
{
if (sd->status.party_id)
clif_party_xy_remove(sd);
return 0;
}
// To use for Taekwon's "Fighting Chant"
// int c = 0;
// party_foreachsamemap(party_sub_count, sd, 0, &c);
int party_sub_count(struct block_list *bl, va_list ap)
{
struct map_session_data *sd = (TBL_PC *)bl;
if (sd->state.autotrade)
return 0;
if (battle_config.idle_no_share && pc_isidle(sd))
return 0;
return 1;
}
// To use for counting classes in a party.
int party_sub_count_class(struct block_list *bl, va_list ap)
{
struct map_session_data *sd = (TBL_PC *)bl;
unsigned int mask = va_arg(ap, unsigned int);
unsigned int mapid_class = va_arg(ap, unsigned int);
if( !party_sub_count(bl, ap) )
return 0;
if( (sd->class_&mask) != mapid_class )
return 0;
return 1;
}
/// Executes 'func' for each party member on the same map and in range (0:whole map)
int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_session_data *sd,int range,...)
{
struct party_data *p = NULL;
struct battleground_data *bg = NULL;
struct map_session_data *psd;
int i,x0,y0,x1,y1;
struct block_list *list[MAX_BG_MEMBERS];
int blockcount=0;
int total = 0; //Return value.
nullpo_ret(sd);
if( map[sd->bl.m].flag.battleground && (bg = bg_team_search(sd->bg_id)) == NULL )
return 0;
else if( !map[sd->bl.m].flag.battleground && (p = party_search(sd->status.party_id)) == NULL )
return 0;
x0=sd->bl.x-range;
y0=sd->bl.y-range;
x1=sd->bl.x+range;
y1=sd->bl.y+range;
if( bg )
{
for( i = 0; i < MAX_BG_MEMBERS; i++ )
{
if( (psd = bg->members[i].sd) == NULL )
continue;
if( psd->bl.m != sd->bl.m || !psd->bl.prev )
continue;
if( range && (psd->bl.x < x0 || psd->bl.y < y0 || psd->bl.x > x1 || psd->bl.y > y1) )
continue;
list[blockcount++] = &psd->bl;
}
}
else if( p )
{
for( i = 0; i < MAX_PARTY; i++ )
{
if( (psd = p->data[i].sd) == NULL )
continue;
if( psd->bl.m != sd->bl.m || !psd->bl.prev )
continue;
if( range && (psd->bl.x < x0 || psd->bl.y < y0 || psd->bl.x > x1 || psd->bl.y > y1) )
continue;
list[blockcount++] = &psd->bl;
}
}
else return 0;
map_freeblock_lock();
for(i=0;i<blockcount;i++)
{
va_list ap;
va_start(ap, range);
total += func(list[i], ap);
va_end(ap);
}
map_freeblock_unlock();
return total;
}
/*==========================================
* Party Booking in KRO [Spiria]
*------------------------------------------*/
static struct party_booking_ad_info* create_party_booking_data(void)
{
struct party_booking_ad_info *pb_ad;
CREATE(pb_ad, struct party_booking_ad_info, 1);
pb_ad->index = party_booking_nextid++;
return pb_ad;
}
void party_booking_register(struct map_session_data *sd, short level, short mapid, short* job)
{
struct party_booking_ad_info *pb_ad;
int i;
pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
if( pb_ad == NULL )
{
pb_ad = create_party_booking_data();
idb_put(party_booking_db, sd->status.char_id, pb_ad);
}
else
{// already registered
clif_PartyBookingRegisterAck(sd, 2);
return;
}
memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH);
pb_ad->starttime = (int)time(NULL);
pb_ad->p_detail.level = level;
pb_ad->p_detail.mapid = mapid;
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
clif_PartyBookingRegisterAck(sd, 0);
clif_PartyBookingInsertNotify(sd, pb_ad); // Notice
}
void party_booking_update(struct map_session_data *sd, short* job)
{
int i;
struct party_booking_ad_info *pb_ad;
pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
if( pb_ad == NULL )
return;
pb_ad->starttime = (int)time(NULL);// Update time.
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
clif_PartyBookingUpdateNotify(sd, pb_ad);
}
void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount)
{
struct party_booking_ad_info *pb_ad;
int i, count=0;
struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
bool more_result = false;
DBIterator* iter = db_iterator(party_booking_db);
memset(result_list, 0, sizeof(result_list));
for( pb_ad = dbi_first(iter); dbi_exists(iter); pb_ad = dbi_next(iter) )
{
if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
continue;
if (count >= PARTY_BOOKING_RESULTS){
more_result = true;
break;
}
if (mapid == 0 && job == -1)
result_list[count] = pb_ad;
else if (mapid == 0) {
for(i=0; i<PARTY_BOOKING_JOBS; i++)
if (pb_ad->p_detail.job[i] == job && job != -1)
result_list[count] = pb_ad;
} else if (job == -1){
if (pb_ad->p_detail.mapid == mapid)
result_list[count] = pb_ad;
}
if( result_list[count] )
{
count++;
}
}
dbi_destroy(iter);
clif_PartyBookingSearchAck(sd->fd, result_list, count, more_result);
}
bool party_booking_delete(struct map_session_data *sd)
{
struct party_booking_ad_info* pb_ad;
if((pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id))!=NULL)
{
clif_PartyBookingDeleteNotify(sd, pb_ad->index);
idb_remove(party_booking_db,sd->status.char_id);
}
return true;
}
|
[
"[email protected]"
] | |
c6b6499a1ad9aefeca4635a51cfec0774f8ec6e6
|
c6e14f68ba25b6c8a8699bebd14b6146793e59ab
|
/RRC/code/asn1c/IRAT-ParametersCDMA2000-HRPD.c
|
67a2b15cb485c7efb0294043eade6c6d86a0299a
|
[] |
no_license
|
Captain-One/C_Programe
|
2a049e0530b863c5ffa53fc55e4f0d96b1ce116f
|
2c2bc608a1f42f7ecf95e049cf48e45fdf090889
|
refs/heads/master
| 2021-07-13T14:49:09.308017 | 2020-06-16T06:49:46 | 2020-06-16T06:49:46 | 136,001,747 | 0 | 3 | null | null | null | null |
UTF-8
|
C
| false | false | 13,727 |
c
|
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "36331-b00.asn"
* `asn1c -S /usr/local/share/asn1c -fcompound-names -fskeletons-copy -gen-PER -pdu=auto`
*/
#include "IRAT-ParametersCDMA2000-HRPD.h"
static int
tx_ConfigHRPD_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static void
tx_ConfigHRPD_3_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
td->elements = asn_DEF_NativeEnumerated.elements;
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
}
static void
tx_ConfigHRPD_3_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
static int
tx_ConfigHRPD_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
static asn_dec_rval_t
tx_ConfigHRPD_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
static asn_enc_rval_t
tx_ConfigHRPD_3_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
static asn_dec_rval_t
tx_ConfigHRPD_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
static asn_enc_rval_t
tx_ConfigHRPD_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
static asn_dec_rval_t
tx_ConfigHRPD_3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static asn_enc_rval_t
tx_ConfigHRPD_3_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
tx_ConfigHRPD_3_inherit_TYPE_descriptor(td);
return td->uper_encoder(td, constraints, structure, per_out);
}
static int
rx_ConfigHRPD_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static void
rx_ConfigHRPD_6_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
td->elements = asn_DEF_NativeEnumerated.elements;
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
}
static void
rx_ConfigHRPD_6_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
static int
rx_ConfigHRPD_6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
static asn_dec_rval_t
rx_ConfigHRPD_6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
static asn_enc_rval_t
rx_ConfigHRPD_6_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
static asn_dec_rval_t
rx_ConfigHRPD_6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
static asn_enc_rval_t
rx_ConfigHRPD_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
static asn_dec_rval_t
rx_ConfigHRPD_6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static asn_enc_rval_t
rx_ConfigHRPD_6_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
rx_ConfigHRPD_6_inherit_TYPE_descriptor(td);
return td->uper_encoder(td, constraints, structure, per_out);
}
static asn_per_constraints_t asn_PER_type_tx_ConfigHRPD_constr_3 GCC_NOTUSED = {
{ APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_type_rx_ConfigHRPD_constr_6 GCC_NOTUSED = {
{ APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_tx_ConfigHRPD_value2enum_3[] = {
{ 0, 6, "single" },
{ 1, 4, "dual" }
};
static const unsigned int asn_MAP_tx_ConfigHRPD_enum2value_3[] = {
1, /* dual(1) */
0 /* single(0) */
};
static const asn_INTEGER_specifics_t asn_SPC_tx_ConfigHRPD_specs_3 = {
asn_MAP_tx_ConfigHRPD_value2enum_3, /* "tag" => N; sorted by tag */
asn_MAP_tx_ConfigHRPD_enum2value_3, /* N => "tag"; sorted by N */
2, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_tx_ConfigHRPD_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_tx_ConfigHRPD_3 = {
"tx-ConfigHRPD",
"tx-ConfigHRPD",
tx_ConfigHRPD_3_free,
tx_ConfigHRPD_3_print,
tx_ConfigHRPD_3_constraint,
tx_ConfigHRPD_3_decode_ber,
tx_ConfigHRPD_3_encode_der,
tx_ConfigHRPD_3_decode_xer,
tx_ConfigHRPD_3_encode_xer,
tx_ConfigHRPD_3_decode_uper,
tx_ConfigHRPD_3_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_tx_ConfigHRPD_tags_3,
sizeof(asn_DEF_tx_ConfigHRPD_tags_3)
/sizeof(asn_DEF_tx_ConfigHRPD_tags_3[0]) - 1, /* 1 */
asn_DEF_tx_ConfigHRPD_tags_3, /* Same as above */
sizeof(asn_DEF_tx_ConfigHRPD_tags_3)
/sizeof(asn_DEF_tx_ConfigHRPD_tags_3[0]), /* 2 */
&asn_PER_type_tx_ConfigHRPD_constr_3,
0, 0, /* Defined elsewhere */
&asn_SPC_tx_ConfigHRPD_specs_3 /* Additional specs */
};
static const asn_INTEGER_enum_map_t asn_MAP_rx_ConfigHRPD_value2enum_6[] = {
{ 0, 6, "single" },
{ 1, 4, "dual" }
};
static const unsigned int asn_MAP_rx_ConfigHRPD_enum2value_6[] = {
1, /* dual(1) */
0 /* single(0) */
};
static const asn_INTEGER_specifics_t asn_SPC_rx_ConfigHRPD_specs_6 = {
asn_MAP_rx_ConfigHRPD_value2enum_6, /* "tag" => N; sorted by tag */
asn_MAP_rx_ConfigHRPD_enum2value_6, /* N => "tag"; sorted by N */
2, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_rx_ConfigHRPD_tags_6[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_rx_ConfigHRPD_6 = {
"rx-ConfigHRPD",
"rx-ConfigHRPD",
rx_ConfigHRPD_6_free,
rx_ConfigHRPD_6_print,
rx_ConfigHRPD_6_constraint,
rx_ConfigHRPD_6_decode_ber,
rx_ConfigHRPD_6_encode_der,
rx_ConfigHRPD_6_decode_xer,
rx_ConfigHRPD_6_encode_xer,
rx_ConfigHRPD_6_decode_uper,
rx_ConfigHRPD_6_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_rx_ConfigHRPD_tags_6,
sizeof(asn_DEF_rx_ConfigHRPD_tags_6)
/sizeof(asn_DEF_rx_ConfigHRPD_tags_6[0]) - 1, /* 1 */
asn_DEF_rx_ConfigHRPD_tags_6, /* Same as above */
sizeof(asn_DEF_rx_ConfigHRPD_tags_6)
/sizeof(asn_DEF_rx_ConfigHRPD_tags_6[0]), /* 2 */
&asn_PER_type_rx_ConfigHRPD_constr_6,
0, 0, /* Defined elsewhere */
&asn_SPC_rx_ConfigHRPD_specs_6 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_IRAT_ParametersCDMA2000_HRPD_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct IRAT_ParametersCDMA2000_HRPD, supportedBandListHRPD),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_SupportedBandListHRPD,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"supportedBandListHRPD"
},
{ ATF_NOFLAGS, 0, offsetof(struct IRAT_ParametersCDMA2000_HRPD, tx_ConfigHRPD),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_tx_ConfigHRPD_3,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"tx-ConfigHRPD"
},
{ ATF_NOFLAGS, 0, offsetof(struct IRAT_ParametersCDMA2000_HRPD, rx_ConfigHRPD),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_rx_ConfigHRPD_6,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"rx-ConfigHRPD"
},
};
static const ber_tlv_tag_t asn_DEF_IRAT_ParametersCDMA2000_HRPD_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_IRAT_ParametersCDMA2000_HRPD_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* supportedBandListHRPD */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tx-ConfigHRPD */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* rx-ConfigHRPD */
};
static asn_SEQUENCE_specifics_t asn_SPC_IRAT_ParametersCDMA2000_HRPD_specs_1 = {
sizeof(struct IRAT_ParametersCDMA2000_HRPD),
offsetof(struct IRAT_ParametersCDMA2000_HRPD, _asn_ctx),
asn_MAP_IRAT_ParametersCDMA2000_HRPD_tag2el_1,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_IRAT_ParametersCDMA2000_HRPD = {
"IRAT-ParametersCDMA2000-HRPD",
"IRAT-ParametersCDMA2000-HRPD",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_IRAT_ParametersCDMA2000_HRPD_tags_1,
sizeof(asn_DEF_IRAT_ParametersCDMA2000_HRPD_tags_1)
/sizeof(asn_DEF_IRAT_ParametersCDMA2000_HRPD_tags_1[0]), /* 1 */
asn_DEF_IRAT_ParametersCDMA2000_HRPD_tags_1, /* Same as above */
sizeof(asn_DEF_IRAT_ParametersCDMA2000_HRPD_tags_1)
/sizeof(asn_DEF_IRAT_ParametersCDMA2000_HRPD_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_IRAT_ParametersCDMA2000_HRPD_1,
3, /* Elements count */
&asn_SPC_IRAT_ParametersCDMA2000_HRPD_specs_1 /* Additional specs */
};
|
[
"[email protected]"
] | |
1cd354e9b40645986bfc0c9821f5961c32a026d5
|
553ab8c15213304523962c94f875f262d4988bc2
|
/S5/prog_para/tp/exam2020/exo3.c
|
f8a8b55f142083eb30c7ab888a4f8e3061d3661f
|
[] |
no_license
|
arxaqapi/licence-info
|
d352c7ae1534dc2c32a89a096fb7ed5880ecd2c9
|
32b349ef5dea96d8aa0ad5e7187af88fcd4c73c0
|
refs/heads/master
| 2021-06-11T06:19:50.541029 | 2021-04-30T22:28:05 | 2021-04-30T22:28:05 | 167,515,246 | 0 | 1 | null | null | null | null |
UTF-8
|
C
| false | false | 732 |
c
|
#include <omp.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
int n = 1000;
int C[n + 1][n + 1];
memset(C, 0, sizeof(C[0][0]) * (n+1) * (n+1));
#pragma omp parallel for num_threads(4)
for (int i = 0; i <= n; i++)
{
C[i][0] = 1;
C[i][i] = 1;
}
// #pragma omp parallel for num_threads(4)
for (int i = 0; i <= n; i++)
{
#pragma omp parallel for num_threads(8)
for (int j = 1; j < i; j++)
{
C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
}
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
printf("%5d | ", C[i][j]);
}
printf("\n");
}
return 0;
}
|
[
"[email protected]"
] | |
a4b438cacec0abecbfd4bc4d49c7d63cdf3db8f2
|
6e0c0ced674ed8ff3bfe20fd85b420d31bd06093
|
/srcs/reader_plus.c
|
55ed016d3009e8decddaf8cb9ffcd7454656eab6
|
[] |
no_license
|
hecubauller/push_swap
|
7e08b8be07cb9971fbb41e462ef38534a5defd7c
|
ef4ea0b5b23db410c009ed4b09054f73160286d3
|
refs/heads/master
| 2020-07-02T09:21:29.792356 | 2019-10-02T05:43:29 | 2019-10-02T05:43:29 | 201,483,262 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 2,822 |
c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* reader_plus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: huller <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/09/19 23:46:24 by huller #+# #+# */
/* Updated: 2019/09/20 18:50:50 by huller ### ########.fr */
/* */
/* ************************************************************************** */
#include "../includes/checker.h"
char **getstring(int argc, char **argv, t_instr *in)
{
char **av_str;
av_str = NULL;
if (!(ft_strcmp(argv[1], "-v")))
in->viz = 1;
if (argc == 2 && !in->viz && ft_strchr(argv[1], ' '))
{
av_str = ft_strsplit(argv[1], ' ');
in->split++;
}
else if (argc == 3 && in->viz && ft_strchr(argv[2], ' '))
{
av_str = ft_strsplit(argv[2], ' ');
in->split += 2;
}
else if (in->viz && argc > 3)
in->viz = 2;
return (av_str);
}
int int_ch_2(t_ch **j, char *tmp)
{
(*j)->pos = 0;
if (tmp[(*j)->i] == '+')
(*j)->pos = 1;
if (tmp[(*j)->i] == '-')
(*j)->neg = -1;
if ((*j)->pos && ((tmp[++(*j)->i] == '-') || tmp[(*j)->i] == '+'))
return (ERROR);
while (tmp[(*j)->i] == '0')
(*j)->i++;
while (tmp[(*j)->i] >= '0' && tmp[(*j)->i] <= '9')
{
(*j)->cmp_str[++(*j)->k] = tmp[(*j)->i];
(*j)->i++;
}
return (SUCCESS);
}
int reader_cycle(char **argv, int *i, int *cnt, t_instr **in)
{
while (argv[*cnt])
{
(*i) = 0;
while (argv[*cnt][*i] &&
((argv[*cnt][*i] >= '0' && argv[*cnt][*i] <= '9') ||
argv[*cnt][*i] == '-' || argv[*cnt][*i] == '+'))
++(*i);
if (argv[*cnt][*i] || ((*cnt) == 1 && !(*in)->split && (*i) == 0))
return (ERROR);
(*cnt)++;
}
return (SUCCESS);
}
int check_valid_instr(char **line, t_instr *in)
{
if (!ft_strcmp(*line, "sa"))
in->inst |= SA;
else if (!ft_strcmp(*line, "sb"))
in->inst |= SB;
else if (!ft_strcmp(*line, "ss"))
in->inst |= SS;
else if (!ft_strcmp(*line, "ra"))
in->inst |= RA;
else if (!ft_strcmp(*line, "rb"))
in->inst |= RB;
else if (!ft_strcmp(*line, "rr"))
in->inst |= RR;
else if (!ft_strcmp(*line, "rra"))
in->inst |= RRA;
else if (!ft_strcmp(*line, "rrb"))
in->inst |= RRB;
else if (!ft_strcmp(*line, "rrr"))
in->inst |= RRR;
else if (!ft_strcmp(*line, "pa"))
in->inst |= PA;
else if (!ft_strcmp(*line, "pb"))
in->inst |= PB;
else
return (ERROR);
return (SUCCESS);
}
|
[
"[email protected]"
] | |
44e3c2f04be6434acf85e204bc2cd1eb9b9d0b57
|
9cff9488ca090460b675d74528861eadc5b55249
|
/Chapter10/Exercise10_01.c
|
2ebe2e512bbbeada21f8c7274018a354f6c1e2d7
|
[] |
no_license
|
AndrewMagdyGad/C-Primer-Plus
|
6bfc96b2a850f71e4dff4eeb3be5486ee3f68f7b
|
8a3f5f87fc755e5a58f9edee7f8002f248797c6b
|
refs/heads/master
| 2021-10-07T09:53:08.191915 | 2021-09-30T22:17:48 | 2021-09-30T22:17:48 | 209,302,452 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,315 |
c
|
/*
* Exercise10_01.c
*
* Created on: Jun 22, 2020
* Author: andrew
*/
#include <stdio.h>
#define MONTHS 12
#define YEARS 5
int main(void)
{
const float rain[YEARS][MONTHS] = {
{4.3, 4.3, 4.3, 3.0, 2.0, 1.2, 0.2, 0.2, 0.4, 2.4, 3.5, 6.6},
{8.5, 8.2, 1.2, 1.6, 2.4, 0.0, 5.2, 0.9, 0.3, 0.9, 1.4, 7.3},
{9.1, 8.5, 6.7, 4.3, 2.1, 0.8, 0.2, 0.2, 1.1, 2.3, 6.1, 8.4},
{7.2, 9.9, 8.4, 3.3, 1.2, 0.8, 0.4, 0.0, 0.6, 1.7, 4.3, 6.2},
{7.6, 5.6, 3.8, 2.8, 3.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 5.2}};
int year, month;
float subtot, total;
printf(" YEAR RAINFALL (inches)\n");
for (year = 0, total = 0; year < YEARS; year++)
{
for (month = 0, subtot = 0; month < MONTHS; month++)
subtot += *(*(rain + year) + month);
printf("%5d %15.1f\n", 2010 + year, subtot);
total += subtot;
}
printf("\nThe yearly average is %.1f inches.\n\n", total / YEARS);
printf("MONTHLY AVERAGES:\n\n");
printf(" Jan Feb Mar Apr May Jun Jul Aug Sep Oct ");
printf(" Nov Dec\n");
for (month = 0; month < MONTHS; month++)
{
for (year = 0, subtot = 0; year < YEARS; year++)
subtot += *(*(rain + year) + month);
printf("%4.1f ", subtot / YEARS);
}
printf("\n");
return 0;
}
|
[
"[email protected]"
] | |
7c06d64569f584ee4460d813da0762d4edeccd96
|
775e18988cfaf67fa980a755177abd8dc7cc66dd
|
/Reciever/Spi_Config.h
|
e97d9c5ac6f25aa1470d50212571b97cde2fa498
|
[] |
no_license
|
mahmoudashraf211/Project
|
03e03fb44e6c85c01d6eb27c10254107463122e3
|
5b85829dfddd93e99fb028f01c2b4d5a1bd051f8
|
refs/heads/main
| 2023-04-05T01:18:53.857968 | 2021-04-09T23:27:46 | 2021-04-09T23:27:46 | 356,340,067 | 1 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 372 |
h
|
/*
* Spi_Config.h
*
* Created: 4/6/2021 5:10:49 PM
* Author: 20111
*/
#ifndef SPI_CONFIG_H_
#define SPI_CONFIG_H_
#include "CPU_CONFIG.h"
#define MASTER 1
#define SLAVE 0
#define MOSI 5
#define MISO 6
#define CLK 7
#define SS 4
#define SPI_PORT DDRB
#define SPI_MODE SLAVE
typedef enum
{
SPI_NOK= 0 ,
SPI_OK= 1
}SPI_Status;
#endif /* SPI_CONFIG_H_ */
|
[
"[email protected]"
] | |
1eb7419a1b16d232fb14c516447a42e28f627c83
|
97658e79ac16e36dfad8055c4d19e08be61f4234
|
/linux/provevarie/esercizi/programmi/esercizi_sito/potenzedi2/pot.c
|
c59f2ea7507a100617d9ee48120cbc9d00ca30dd
|
[] |
no_license
|
DavideB45/DavideUnipi
|
09eca33fb2d82f4e43baf23a3c36d016036e4ecb
|
c3c498c8d4b45f7d554f1748e1c78d0e368b9004
|
refs/heads/master
| 2021-07-12T10:26:52.778423 | 2020-11-09T13:07:40 | 2020-11-09T13:07:40 | 221,219,602 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 462 |
c
|
#include <stdio.h>
int pot2(int n, int tot);
int read_positive_int(void);
int main(void){
int n;
n = read_positive_int();
printf("%d\n", pot2(n, 1));
return 0;
}
int pot2(int n, int tot){
if(n==0){
return tot;
}
else{
tot = tot*2;
return pot2(n-1, tot);
}
}
int read_positive_int(void){
int n;
while(scanf("%d", &n)!=1 || n<0){
scanf("%*[^\n]");
scanf("%*c");
printf("Errore. Inserisci un numero intero positivo\n");
}
return n;
}
|
[
"[email protected]"
] | |
75e334d561d9665f7ed4348fa4915519dfafb1c3
|
b5506f3b30d64d8d001bd371ff19c2c3b0de21b0
|
/source/hamming.c
|
2b2a667576234250ac8f1fc94e6b9ee1d5a71026
|
[
"LicenseRef-scancode-other-permissive",
"mpich2",
"CC-BY-4.0"
] |
permissive
|
Scrembetsch/MultiModal_pgapack
|
6f34374dfea668113575ea952cc78142cb9d6b9a
|
de671a8d3f228ef9d32faff4df6d663d405a9a69
|
refs/heads/main
| 2023-04-27T15:37:12.167704 | 2021-05-18T10:25:15 | 2021-05-18T10:25:15 | 368,472,529 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 4,816 |
c
|
/*
COPYRIGHT
The following is a notice of limited availability of the code, and disclaimer
which must be included in the prologue of the code and in all source listings
of the code.
(C) COPYRIGHT 2008 University of Chicago
Permission is hereby granted to use, reproduce, prepare derivative works, and
to redistribute to others. This software was authored by:
D. Levine
Mathematics and Computer Science Division
Argonne National Laboratory Group
with programming assistance of participants in Argonne National
Laboratory's SERS program.
GOVERNMENT LICENSE
Portions of this material resulted from work developed under a
U.S. Government Contract and are subject to the following license: the
Government is granted for itself and others acting on its behalf a paid-up,
nonexclusive, irrevocable worldwide license in this computer software to
reproduce, prepare derivative works, and perform publicly and display
publicly.
DISCLAIMER
This computer code material was prepared, in part, as an account of work
sponsored by an agency of the United States Government. Neither the United
States, nor the University of Chicago, nor any of their employees, makes any
warranty express or implied, or assumes any legal liability or responsibility
for the accuracy, completeness, or usefulness of any information, apparatus,
product, or process disclosed, or represents that its use would not infringe
privately owned rights.
*/
/*****************************************************************************
* FILE: hamming.c: This file contains the routines that have to do with
* Hamming distances.
*
* Authors: David M. Levine, Philip L. Hallstrom, David M. Noelle
*****************************************************************************/
#include "pgapack.h"
/*U****************************************************************************
PGAHammingDistance - Calculates the mean Hamming distance for a population
of binary strings. For all other data types returns a value of 0.0 and
prints a warning message.
Category: Utility
Inputs:
ctx - context variable
popindex - symbolic constant of the population for which the
Hamming distance is to be calculated
Output:
The mean Hamming distance in the population
Example:
PGAContext *ctx;
double hd;
:
hd = PGAHammingDistance(ctx, PGA_NEWPOP);
****************************************************************************U*/
double PGAHammingDistance( PGAContext *ctx, int popindex)
{
int i, j, hd, count=0;
double avg_hd = 0.;
PGAIndividual *pop = NULL; /* pointer to appropriate population */
PGADebugEntered("PGAHammingDistance");
switch (popindex) {
case PGA_OLDPOP:
pop = ctx->ga.oldpop;
break;
case PGA_NEWPOP:
pop = ctx->ga.newpop;
break;
default:
PGAError( ctx, "PGAHammingDistance: Invalid value of popindex:",
PGA_FATAL, PGA_INT, (void *) &popindex );
break;
}
switch (ctx->ga.datatype) {
case PGA_DATATYPE_BINARY:
for(i=0; i<ctx->ga.PopSize-1; ++i)
for ( j = i+1; j<ctx->ga.PopSize; ++j ) {
count++;
hd = PGABinaryHammingDistance( ctx,
(pop+i)->chrom, (pop+j)->chrom );
avg_hd += (double) hd;
}
avg_hd /= (double) count;
break;
case PGA_DATATYPE_INTEGER:
avg_hd = 0.0;
PGAError( ctx,
"PGAHammingDistance: No Hamming Distance for PGA_DATATYPE_INTEGER ",
PGA_WARNING,
PGA_DOUBLE,
(void *) &avg_hd );
break;
case PGA_DATATYPE_REAL:
avg_hd = 0;
PGAError( ctx,
"PGAHammingDistance: No Hamming Distance for PGA_DATATYPE_REAL ",
PGA_WARNING,
PGA_DOUBLE,
(void *) &avg_hd );
break;
case PGA_DATATYPE_CHARACTER:
avg_hd = 0;
PGAError( ctx,
"PGAHammingDistance: No Hamming Distance for PGA_DATATYPE_CHARACTER ",
PGA_WARNING,
PGA_DOUBLE,
(void *) &avg_hd );
break;
case PGA_DATATYPE_USER:
avg_hd = 0;
PGAError( ctx,
"PGAHammingDistance: No Hamming Distance for PGA_DATATYPE_USER ",
PGA_WARNING,
PGA_DOUBLE,
(void *) &avg_hd );
break;
default:
PGAError( ctx,
"PGAHammingDistance: Invalid value of datatype:",
PGA_FATAL,
PGA_INT,
(void *) &(ctx->ga.datatype) );
break;
}
PGADebugExited("PGAHammingDistance");
return(avg_hd);
}
|
[
"[email protected]"
] | |
373042a894d3257b961ce7278caba8ea0c0c1315
|
7265a1a2fe30a888303a99563a3c93bd09de3985
|
/src/test/pmem2_source_alignment/pmem2_source_alignment.c
|
37545a138b4cd18eebbf6cbaf547f4b07c1af6d1
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
rff/pmdk
|
002eee0f143bc46ee62ffc2104384307b9d0402a
|
12356154903781da3c2376d87a0c247088cc6c23
|
refs/heads/master
| 2020-11-25T00:03:46.811843 | 2020-03-17T11:19:47 | 2020-03-17T11:19:47 | 228,399,389 | 0 | 0 |
NOASSERTION
| 2020-01-15T11:29:23 | 2019-12-16T13:59:27 | null |
UTF-8
|
C
| false | false | 1,566 |
c
|
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* pmem2_source_alignment.c -- pmem2_source_alignment unittests
*/
#include <fcntl.h>
#include <stdint.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "libpmem2.h"
#include "unittest.h"
#include "ut_pmem2_utils.h"
#include "ut_pmem2_config.h"
#include "config.h"
#include "out.h"
/*
* test_get_alignment_success - simply checks returned value
*/
static int
test_get_alignment_success(const struct test_case *tc, int argc,
char *argv[])
{
if (argc < 1)
UT_FATAL("usage: test_get_alignment_success"
" <file> [alignment]");
int ret = 1;
char *file = argv[0];
int fd = OPEN(file, O_RDWR);
struct pmem2_source *src;
PMEM2_SOURCE_FROM_FD(&src, fd);
size_t alignment;
int ret2 = pmem2_source_alignment(src, &alignment);
UT_PMEM2_EXPECT_RETURN(ret2, 0);
size_t ref_alignment = Ut_mmap_align;
/* let's check if it is DEVDAX test */
if (argc >= 2) {
ref_alignment = ATOUL(argv[1]);
ret = 2;
}
UT_ASSERTeq(ref_alignment, alignment);
PMEM2_SOURCE_DELETE(&src);
CLOSE(fd);
return ret;
}
/*
* test_cases -- available test cases
*/
static struct test_case test_cases[] = {
TEST_CASE(test_get_alignment_success),
};
#define NTESTS (sizeof(test_cases) / sizeof(test_cases[0]))
int
main(int argc, char **argv)
{
START(argc, argv, "pmem2_source_alignment");
util_init();
out_init("pmem2_source_alignment", "TEST_LOG_LEVEL",
"TEST_LOG_FILE", 0, 0);
TEST_CASE_PROCESS(argc, argv, test_cases, NTESTS);
out_fini();
DONE(NULL);
}
|
[
"[email protected]"
] | |
7e552cab45f83a1f19c950cc6d37bb1a84b4f7a4
|
1447927a9f7034953e0a74c2998d2ef5e90f9e48
|
/libs/libtowel/srcs/twl_xstdlib/twl_randint.c
|
74fc9017666c92cb9a7fb571c26ec1ef1e3924c5
|
[] |
no_license
|
Thaeroon/RT
|
a397d66d2a39179ee027186ce01ea89d36a5de16
|
af8fd9bf1b5eaa33d5400169f4dba3fbca70f6df
|
refs/heads/master
| 2020-03-07T19:54:17.145298 | 2018-04-26T22:06:48 | 2018-04-26T22:06:48 | 126,860,904 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,035 |
c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* check_norris_loves_the_norminette.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: chuck <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2042/02/30 42:00:00 by chuck #+# #+# */
/* Updated: 2042/02/30 41:59:59 by chuck ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include <time.h>
int twl_randint(int start, int end)
{
srand(clock());
return (rand() % (end + 1 - start) + start);
}
|
[
"[email protected]"
] | |
59480e8d5fc4a990de33a66c850523aa9db0f182
|
b111b77f2729c030ce78096ea2273691b9b63749
|
/perf-native-large/project534/src/testComponent414/headers/testComponent414/lib13.h
|
e4ef6526e6645763ac95f0376428725dd0e6e32b
|
[] |
no_license
|
WeilerWebServices/Gradle
|
a1a55bdb0dd39240787adf9241289e52f593ccc1
|
6ab6192439f891256a10d9b60f3073cab110b2be
|
refs/heads/master
| 2023-01-19T16:48:09.415529 | 2020-11-28T13:28:40 | 2020-11-28T13:28:40 | 256,249,773 | 1 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 167 |
h
|
#ifndef PROJECT_HEADER_testComponent414_13_H
#define PROJECT_HEADER_testComponent414_13_H
int testComponent414_13();
#endif // PROJECT_HEADER_testComponent414_13_H
|
[
"[email protected]"
] | |
b0977973e2a621e89257e46fff6857de28c3431c
|
dc2c0e015b3ca7d49fd77ebf3d4511a7338e74b9
|
/Assignment2/sample/LYDB-master/defs.h
|
b838a5c810858e8dc91e089cf8efe937263fba78
|
[] |
no_license
|
rhf0410/COMP9315
|
2ff70d8ee2d684bbf9e90a33dd7bb1889cdfcf94
|
41d5f72184c3f4ff839b9da8359c16a597eadaa5
|
refs/heads/master
| 2021-05-16T23:31:04.007981 | 2020-03-27T11:29:14 | 2020-03-27T11:29:14 | 250,516,673 | 3 | 3 | null | null | null | null |
UTF-8
|
C
| false | false | 710 |
h
|
// defs.h ... global definitions
// part of Multi-attribute Linear-hashed Files
// Defines types and constants used throughout code
// Written by John Shepherd, April 2016
#ifndef DEFS_H
#define DEFS_H 1
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "util.h"
#define PAGESIZE 1024
#define NO_PAGE 0xffffffff
#define MAXERRMSG 200
#define MAXTUPLEN 200
#define MAXRELNAME 200
#define MAXFILENAME MAXRELNAME+8
#define OK 0
#define TRUE 1
#define FALSE 0
#define BASE 10
typedef char Bool;
typedef unsigned char Byte;
typedef int Status;
typedef unsigned int Offset;
typedef unsigned int Count;
typedef Offset PageID;
#endif
|
[
"[email protected]"
] | |
c7dd6b5d564a8fd67b5c7e312887fd6af1d4da82
|
3b2f7f5727028931edf46d97dc40f6ed30a4abba
|
/examples/testbed_native_ios/Pods/Headers/Public/React/RCTAnimation/RCTAnimationUtils.h
|
cc0a53808f6b57e22599b8127d678dbd0ce81c9c
|
[
"MIT"
] |
permissive
|
myboost/react-native-branch-deep-linking-attribution
|
e0ed526b9d50752e7c94577574baff59d516e478
|
e93d8802ceb159ee7806b804b60d7861fd536c01
|
refs/heads/master
| 2020-12-15T19:24:58.366784 | 2020-01-21T01:16:43 | 2020-01-21T01:16:43 | 235,228,684 | 0 | 0 |
MIT
| 2020-01-21T01:01:52 | 2020-01-21T01:01:51 | null |
UTF-8
|
C
| false | false | 86 |
h
|
../../../../../node_modules/react-native/Libraries/NativeAnimation/RCTAnimationUtils.h
|
[
"[email protected]"
] | |
af31a98ef5e1c7e1ca8ae3c3a60f8afb4236d7ec
|
0ce735bca910363a7eaa65d455af01fa6a0de086
|
/process_ipc/popen_2.c
|
afec984f056fc2fe390d0fce7029f6419175a6a4
|
[
"MIT"
] |
permissive
|
meghana-linux/c-practice
|
2b6010d931c23f00501cacf8e3d73b64b471d2ab
|
c5580622918fd535cafbf24ffd2612f05cd73cd0
|
refs/heads/master
| 2020-03-08T10:18:26.984512 | 2019-09-19T01:29:22 | 2019-09-19T01:29:22 | 128,069,760 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 937 |
c
|
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *pipe_fp, *infile;
char readbuf[80];
if( argc != 3) {
fprintf(stderr, "USAGE: popen3 [command] [filename]\n");
exit(1);
}
/* Open up input file */
if (( infile = fopen(argv[2], "rt")) == NULL)
{
perror("fopen");
exit(1);
}
/* Create one way pipe line with call to popen() */
if (( pipe_fp = popen(argv[1], "w")) == NULL)
{
perror("popen");
exit(1);
}
/* Processing loop */
do {
fgets(readbuf, 80, infile);
printf("n *** %s *** \n", readbuf);
if(feof(infile)) break;
fputs(readbuf, pipe_fp);
} while(!feof(infile));
fclose(infile);
pclose(pipe_fp);
return(0);
}
|
[
"[email protected]"
] | |
c891bcc4f454c9066bf40329a0bf2d8ba1f27e34
|
a1446c3f95df2dfe097a9bd6b463767b00f18140
|
/sys/dev/ic/comvar.h
|
3e80241e9f25757048e1abc78c66e79abef2dc65
|
[] |
no_license
|
chrissicool/l4openbsd
|
e2fb756debc1c3bdc1c2da509fa228c25a3185e8
|
077177814444e08500e47bc2488502f11469bc60
|
refs/heads/master
| 2021-04-09T17:12:53.122136 | 2011-08-22T16:52:58 | 2011-08-22T16:52:58 | 1,706,491 | 18 | 4 | null | 2017-04-06T19:17:29 | 2011-05-05T14:08:03 |
C
|
UTF-8
|
C
| false | false | 6,431 |
h
|
/* $OpenBSD: comvar.h,v 1.50 2010/08/06 21:04:14 kettenis Exp $ */
/* $NetBSD: comvar.h,v 1.5 1996/05/05 19:50:47 christos Exp $ */
/*
* Copyright (c) 1997 - 1998, Jason Downs. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christopher G. Demetriou
* for the NetBSD Project.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/timeout.h>
struct commulti_attach_args {
int ca_slave; /* slave number */
bus_space_tag_t ca_iot;
bus_space_handle_t ca_ioh;
int ca_iobase;
int ca_noien;
};
#define COM_IBUFSIZE (32 * 512)
#define COM_IHIGHWATER ((3 * COM_IBUFSIZE) / 4)
struct com_softc {
struct device sc_dev;
void *sc_ih;
bus_space_tag_t sc_iot;
struct tty *sc_tty;
struct timeout sc_dtr_tmo;
struct timeout sc_diag_tmo;
void *sc_si;
int sc_overflows;
int sc_floods;
int sc_errors;
int sc_halt;
bus_addr_t sc_iobase;
int sc_frequency;
bus_space_handle_t sc_ioh;
u_char sc_uarttype;
#define COM_UART_UNKNOWN 0x00 /* unknown */
#define COM_UART_8250 0x01 /* no fifo */
#define COM_UART_16450 0x02 /* no fifo */
#define COM_UART_16550 0x03 /* no working fifo */
#define COM_UART_16550A 0x04 /* 16 byte fifo */
#define COM_UART_ST16650 0x05 /* no working fifo */
#define COM_UART_ST16650V2 0x06 /* 32 byte fifo */
#define COM_UART_TI16750 0x07 /* 64 byte fifo */
#define COM_UART_ST16C654 0x08 /* 64 bytes fifo */
#define COM_UART_XR16850 0x10 /* 128 byte fifo */
#define COM_UART_PXA2X0 0x11 /* 16 byte fifo */
#define COM_UART_OX16C950 0x12 /* 128 byte fifo */
u_char sc_hwflags;
#define COM_HW_NOIEN 0x01
#define COM_HW_FIFO 0x02
#define COM_HW_SIR 0x20
#define COM_HW_CONSOLE 0x40
#define COM_HW_KGDB 0x80
u_char sc_swflags;
#define COM_SW_SOFTCAR 0x01
#define COM_SW_CLOCAL 0x02
#define COM_SW_CRTSCTS 0x04
#define COM_SW_MDMBUF 0x08
#define COM_SW_PPS 0x10
#define COM_SW_DEAD 0x20
int sc_fifolen;
u_char sc_msr, sc_mcr, sc_lcr, sc_ier;
u_char sc_dtr;
u_char sc_cua;
u_char sc_initialize; /* force initialization */
u_char *sc_ibuf, *sc_ibufp, *sc_ibufhigh, *sc_ibufend;
u_char sc_ibufs[2][COM_IBUFSIZE];
/* power management hooks */
int (*enable)(struct com_softc *);
void (*disable)(struct com_softc *);
int enabled;
};
int comprobe1(bus_space_tag_t, bus_space_handle_t);
int comstop(struct tty *, int);
int comintr(void *);
int com_detach(struct device *, int);
int com_activate(struct device *, int);
void com_resume(struct com_softc *);
void comdiag(void *);
int comspeed(long, long);
u_char com_cflag2lcr(tcflag_t); /* XXX undefined */
int comparam(struct tty *, struct termios *);
void comstart(struct tty *);
void comsoft(void *);
struct consdev;
int comcnattach(bus_space_tag_t, bus_addr_t, int, int, tcflag_t);
void comcnprobe(struct consdev *);
void comcninit(struct consdev *);
int comcngetc(dev_t);
void comcnputc(dev_t, int);
void comcnpollc(dev_t, int);
int com_common_getc(bus_space_tag_t, bus_space_handle_t);
void com_common_putc(bus_space_tag_t, bus_space_handle_t, int);
void com_raisedtr(void *);
#ifdef KGDB
extern bus_addr_t com_kgdb_addr;
extern bus_space_tag_t com_kgdb_iot;
extern bus_space_handle_t com_kgdb_ioh;
int com_kgdb_attach(bus_space_tag_t, bus_addr_t, int, int, tcflag_t);
int kgdbintr(void *);
#endif
void com_attach_subr(struct com_softc *);
extern int comdefaultrate;
extern int comconsrate;
extern int comconsfreq;
extern bus_addr_t comconsaddr;
extern bus_addr_t comsiraddr;
extern int comconsinit;
extern int comconsattached;
extern bus_space_tag_t comconsiot;
extern bus_space_handle_t comconsioh;
extern int comconsunit;
extern tcflag_t comconscflag;
|
[
"[email protected]"
] | |
f8a7f7da59674239ae582ac8f3111f8ee54052cf
|
06f72327ef69d3afab12be10d80d58548cd3b270
|
/code/mutants_b747cl/T0/b747cl_824.c
|
da646eda6f019a8e105fb69f23b4ba34d8572f98
|
[] |
no_license
|
unl-nimbus-lab/CE_Mutation
|
69df4c5e6f4b0a4eea41b3e04805b1613a02b9b4
|
76d69ca6005469cfe831ad309ce1636cf3da83c4
|
refs/heads/master
| 2021-05-17T03:16:55.496590 | 2020-03-27T16:57:12 | 2020-03-27T16:57:12 | 250,591,613 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 61,212 |
c
|
/*
* b747cl.c
*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* Code generation for model "b747cl".
*
* Model version : 1.189
* Simulink Coder version : 8.10 (R2016a) 10-Feb-2016
* C source code generated on : Thu Oct 13 13:00:47 2016
*
* Target selection: grt.tlc
* Note: GRT includes extra infrastructure and instrumentation for prototyping
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Emulation hardware selection:
* Differs from embedded hardware (MATLAB Host)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "b747cl.h"
#include "b747cl_private.h"
/* Block signals (auto storage) */
B_b747cl_T b747cl_B;
/* Block states (auto storage) */
DW_b747cl_T b747cl_DW;
/* Real-time model */
RT_MODEL_b747cl_T b747cl_M_;
RT_MODEL_b747cl_T *const b747cl_M = &b747cl_M_;
/*
* Time delay interpolation routine
*
* The linear interpolation is performed using the formula:
*
* (t2 - tMinusDelay) (tMinusDelay - t1)
* u(t) = ----------------- * u1 + ------------------- * u2
* (t2 - t1) (t2 - t1)
*/
real_T rt_TDelayInterpolate(
real_T tMinusDelay, /* tMinusDelay = currentSimTime - delay */
real_T tStart,
real_T *tBuf,
real_T *uBuf,
int_T bufSz,
int_T *lastIdx,
int_T oldestIdx,
int_T newIdx,
real_T initOutput,
boolean_T discrete,
boolean_T minorStepAndTAtLastMajorOutput)
{
int_T i;
real_T yout, t1, t2, u1, u2;
/*
* If there is only one data point in the buffer, this data point must be
* the t= 0 and tMinusDelay > t0, it ask for something unknown. The best
* guess if initial output as well
*/
if ((newIdx == 0) && (oldestIdx ==0 ) && (tMinusDelay > tStart))
return initOutput;
/*
* If tMinusDelay is less than zero, should output initial value
*/
if (tMinusDelay <= tStart)
return initOutput;
/* For fixed buffer extrapolation:
* if tMinusDelay is small than the time at oldestIdx, if discrete, output
* tailptr value, else use tailptr and tailptr+1 value to extrapolate
* It is also for fixed buffer. Note: The same condition can happen for transport delay block where
* use tStart and and t[tail] other than using t[tail] and t[tail+1].
* See below
*/
if ((tMinusDelay <= tBuf[oldestIdx] ) ) {
if (discrete) {
return(uBuf[oldestIdx]);
} else {
int_T tempIdx= oldestIdx + 1;
if (oldestIdx == bufSz-1)
tempIdx = 0;
t1= tBuf[oldestIdx];
t2= tBuf[tempIdx];
u1= uBuf[oldestIdx];
u2= uBuf[tempIdx];
if (t2 == t1) {
if (tMinusDelay >= t2) {
yout = u2;
} else {
yout = u1;
}
} else {
real_T f1 = (t2-tMinusDelay) / (t2-t1);
real_T f2 = 1.0 - f1;
/*
* Use Lagrange's interpolation formula. Exact outputs at t1, t2.
*/
yout = f1*u1 + f2*u2;
}
return yout;
}
}
/*
* When block does not have direct feedthrough, we use the table of
* values to extrapolate off the end of the table for delays that are less
* than 0 (less then step size). This is not completely accurate. The
* chain of events is as follows for a given time t. Major output - look
* in table. Update - add entry to table. Now, if we call the output at
* time t again, there is a new entry in the table. For very small delays,
* this means that we will have a different answer from the previous call
* to the output fcn at the same time t. The following code prevents this
* from happening.
*/
if (minorStepAndTAtLastMajorOutput) {
/* pretend that the new entry has not been added to table */
if (newIdx != 0) {
if (*lastIdx == newIdx) {
(*lastIdx)--;
}
newIdx--;
} else {
if (*lastIdx == newIdx) {
*lastIdx = bufSz-1;
}
newIdx = bufSz - 1;
}
}
i = *lastIdx;
if (tBuf[i] < tMinusDelay) {
/* Look forward starting at last index */
while (tBuf[i] < tMinusDelay) {
/* May occur if the delay is less than step-size - extrapolate */
if (i == newIdx)
break;
i = ( i < (bufSz-1) ) ? (i+1) : 0;/* move through buffer */
}
} else {
/*
* Look backwards starting at last index which can happen when the
* delay time increases.
*/
while (tBuf[i] >= tMinusDelay) {
/*
* Due to the entry condition at top of function, we
* should never hit the end.
*/
i = (i > 0) ? i-1 : (bufSz-1); /* move through buffer */
}
i = ( i < (bufSz-1) ) ? (i+1) : 0;
}
*lastIdx = i;
if (discrete) {
/*
* tempEps = 128 * eps;
* localEps = max(tempEps, tempEps*fabs(tBuf[i]))/2;
*/
double tempEps = (DBL_EPSILON) * 128.0;
double localEps = tempEps * fabs(tBuf[i]);
if (tempEps > localEps) {
localEps = tempEps;
}
localEps = localEps / 2.0;
if (tMinusDelay >= (tBuf[i] - localEps)) {
yout = uBuf[i];
} else {
if (i == 0) {
yout = uBuf[bufSz-1];
} else {
yout = uBuf[i-1];
}
}
} else {
if (i == 0) {
t1 = tBuf[bufSz-1];
u1 = uBuf[bufSz-1];
} else {
t1 = tBuf[i-1];
u1 = uBuf[i-1];
}
t2 = tBuf[i];
u2 = uBuf[i];
if (t2 == t1) {
if (tMinusDelay >= t2) {
yout = u2;
} else {
yout = u1;
}
} else {
real_T f1 = (t2-tMinusDelay) / (t2-t1);
real_T f2 = 1.0 - f1;
/*
* Use Lagrange's interpolation formula. Exact outputs at t1, t2.
*/
yout = f1*u1 + f2*u2;
}
}
return(yout);
}
real_T rt_urand_Upu32_Yd_f_pw_snf(uint32_T *u)
{
uint32_T lo;
uint32_T hi;
/* Uniform random number generator (random number between 0 and 1)
#define IA 16807 magic multiplier = 7^5
#define IM 2147483647 modulus = 2^31-1
#define IQ 127773 IM div IA
#define IR 2836 IM modulo IA
#define S 4.656612875245797e-10 reciprocal of 2^31-1
test = IA * (seed % IQ) - IR * (seed/IQ)
seed = test < 0 ? (test + IM) : test
return (seed*S)
*/
lo = *u % 127773U * 16807U;
hi = *u / 127773U * 2836U;
if (lo < hi) {
*u = 2147483647U - (hi - lo);
} else {
*u = lo - hi;
}
return (real_T)*u * 4.6566128752457969E-10;
}
real_T rt_nrand_Upu32_Yd_f_pw_snf(uint32_T *u)
{
real_T y;
real_T sr;
real_T si;
/* Normal (Gaussian) random number generator */
do {
sr = 2.0 * rt_urand_Upu32_Yd_f_pw_snf(u) - 1.0;
si = 2.0 * rt_urand_Upu32_Yd_f_pw_snf(u) - 1.0;
si = sr * sr + si * si;
} while (si > 1.0);
y = sqrt(-2.0 * log(si) / si) * sr;
return y;
}
real_T rt_powd_snf(real_T u0, real_T u1)
{
real_T y;
real_T tmp;
real_T tmp_0;
if (rtIsNaN(u0) || rtIsNaN(u1)) {
y = (rtNaN);
} else {
tmp = fabs(u0);
tmp_0 = fabs(u1);
if (rtIsInf(u1)) {
if (tmp == 1.0) {
y = (rtNaN);
} else if (tmp > 1.0) {
if (u1 > 0.0) {
y = (rtInf);
} else {
y = 0.0;
}
} else if (u1 > 0.0) {
y = 0.0;
} else {
y = (rtInf);
}
} else if (tmp_0 == 0.0) {
y = 1.0;
} else if (tmp_0 == 1.0) {
if (u1 > 0.0) {
y = u0;
} else {
y = 1.0 / u0;
}
} else if (u1 == 2.0) {
y = u0 * u0;
} else if ((u1 == 0.5) && (u0 >= 0.0)) {
y = sqrt(u0);
} else if ((u0 < 0.0) && (u1 > floor(u1))) {
y = (rtNaN);
} else {
y = pow(u0, u1);
}
}
return y;
}
/* Model output function */
static void b747cl_output(void)
{
/* local block i/o variables */
real_T rtb_Phi;
real_T rtb_chi;
real_T rtb_fpa;
real_T rtb_gamma;
real_T rtb_Vc;
real_T rtb_Ve;
real_T rtb_Tt;
real_T rtb_cbar;
real_T rtb_w;
int_T ci;
real_T rtb_WhiteNoise[40];
real_T rtb_Saturation4;
real_T rtb_Saturation1;
real_T rtb_Saturation2;
real_T rtb_psidot;
real_T rtb_S[6];
real_T rtb_axk;
real_T rtb_u[12];
real_T rtb_Ax;
real_T rtb_wdot;
real_T rtb_MatrixGain_a[3];
real_T rtb_MatrixGain[2];
real_T rtb_MatrixGain_f[2];
real_T TmpSignalConversionAtMatrixGain[19];
real_T TmpSignalConversionAtMatrixGa_m[9];
real_T Sum3[5];
real_T Sum1[4];
int32_T i;
real_T tmp[6];
real_T tmp_0[18];
real_T tmp_1[18];
real_T tmp_2[18];
real_T tmp_3[18];
real_T tmp_4[18];
real_T tmp_5[9];
real_T tmp_6[9];
real_T tmp_7[9];
real_T tmp_8[9];
real_T tmp_9[9];
real_T tmp_a[9];
real_T tmp_b[9];
real_T rtb_u_0[23];
real_T tmp_c[29];
real_T tmp_d[29];
real_T tmp_e[29];
real_T tmp_f[29];
real_T tmp_g[30];
real_T tmp_h[17];
real_T tmp_i[17];
real_T tmp_j[17];
real_T tmp_k[17];
real_T tmp_l[17];
real_T tmp_m[17];
real_T tmp_n[17];
real_T tmp_o[17];
real_T tmp_p[17];
real_T tmp_q[17];
real_T tmp_r[17];
real_T tmp_s[17];
real_T tmp_t[17];
real_T tmp_u[17];
real_T tmp_v[17];
real_T tmp_w[17];
real_T tmp_x[17];
real_T tmp_y[17];
real_T tmp_z[17];
real_T tmp_10[17];
real_T rtb_Sum3_idx_1;
real_T rtb_Sum3_idx_2;
/* DiscreteIntegrator: '<S9>/Discrete-Time Integrator' */
memcpy(&b747cl_B.DiscreteTimeIntegrator[0],
&b747cl_DW.DiscreteTimeIntegrator_DSTATE[0], 12U * sizeof(real_T));
/* ToWorkspace: '<Root>/Aircraft States' */
rt_UpdateLogVar((LogVar *)(LogVar*) (b747cl_DW.AircraftStates_PWORK.LoggedData),
&b747cl_B.DiscreteTimeIntegrator[0], 0);
/* ToWorkspace: '<Root>/airspeed' */
rt_UpdateLogVar((LogVar *)(LogVar*) (b747cl_DW.airspeed_PWORK.LoggedData),
&b747cl_B.DiscreteTimeIntegrator[0], 0);
/* ToWorkspace: '<Root>/alititude' */
rt_UpdateLogVar((LogVar *)(LogVar*) (b747cl_DW.alititude_PWORK.LoggedData),
&b747cl_B.DiscreteTimeIntegrator[11], 0);
/* ToWorkspace: '<Root>/theta' */
rt_UpdateLogVar((LogVar *)(LogVar*) (b747cl_DW.theta_PWORK.LoggedData),
&b747cl_B.DiscreteTimeIntegrator[7], 0);
for (i = 0; i < 40; i++) {
/* Gain: '<S3>/Output' incorporates:
* RandomNumber: '<S3>/White Noise'
*/
b747cl_B.Output[i] = b747cl_P.Output_Gain[i] * b747cl_DW.NextOutput[i];
/* RandomNumber: '<S3>/White Noise' */
rtb_WhiteNoise[i] = b747cl_DW.NextOutput[i];
}
for (i = 0; i < 12; i++) {
/* Gain: '<S9>/ *1' */
b747cl_B.u[i] = b747cl_P.u_Gain * b747cl_B.DiscreteTimeIntegrator[i];
/* Gain: '<S2>/ *1' */
b747cl_B.u_a[i] = b747cl_P.u_Gain_o * b747cl_B.DiscreteTimeIntegrator[i];
}
/* Fcn: '<S18>/g' */
/* CHANGED LINE BY SE */
b747cl_B.g = rt_powd_snf(6371020.0 / (6371020.0 + b747cl_B.u_a[11] * 2), 2.0) *
9.80665;
/* Fcn: '<S18>/T' */
b747cl_B.T = 288.15 - 0.0065 * b747cl_B.u_a[11];
/* Fcn: '<S18>/ps' */
rtb_Saturation4 = b747cl_B.g / 1.86584;
rtb_Saturation1 = b747cl_B.T / 288.15;
if ((rtb_Saturation1 < 0.0) && (rtb_Saturation4 > floor(rtb_Saturation4))) {
rtb_Saturation1 = -rt_powd_snf(-rtb_Saturation1, rtb_Saturation4);
} else {
rtb_Saturation1 = rt_powd_snf(rtb_Saturation1, rtb_Saturation4);
}
b747cl_B.ps = 101325.0 * rtb_Saturation1;
/* End of Fcn: '<S18>/ps' */
/* Fcn: '<S18>/rho' */
b747cl_B.rho = b747cl_B.ps / (287.053 * b747cl_B.T);
/* Fcn: '<S18>/mu' */
if (b747cl_B.T < 0.0) {
rtb_Saturation4 = -rt_powd_snf(-b747cl_B.T, 1.5);
} else {
rtb_Saturation4 = rt_powd_snf(b747cl_B.T, 1.5);
}
b747cl_B.mu = 1.4579999999999998E-6 * rtb_Saturation4 / (b747cl_B.T + 110.4);
/* End of Fcn: '<S18>/mu' */
/* Fcn: '<S15>/a' */
rtb_Saturation4 = 401.8743 * b747cl_B.T;
if (rtb_Saturation4 < 0.0) {
b747cl_B.a = -sqrt(-rtb_Saturation4);
} else {
b747cl_B.a = sqrt(rtb_Saturation4);
}
/* End of Fcn: '<S15>/a' */
/* Fcn: '<S15>/M' */
b747cl_B.M = b747cl_B.u_a[0] / b747cl_B.a;
/* Fcn: '<S15>/qdyn' */
b747cl_B.qdyn = 0.5 * b747cl_B.rho * rt_powd_snf(b747cl_B.u_a[0], 2.0);
/* Fcn: '<S23>/cos alpha' */
b747cl_B.cosalpha = cos(b747cl_B.u_a[1]);
/* Fcn: '<S19>/Fcn' */
b747cl_B.Fcn = rt_powd_snf(b747cl_B.u_a[1], 2.0);
/* Fcn: '<S19>/Fcn1' */
b747cl_B.Fcn1 = rt_powd_snf(b747cl_B.u_a[1], 3.0);
/* Fcn: '<S19>/Fcn2' */
b747cl_B.Fcn2 = rt_powd_snf(b747cl_B.u_a[2], 2.0);
/* Fcn: '<S19>/Fcn3' */
b747cl_B.Fcn3 = rt_powd_snf(b747cl_B.u_a[2], 3.0);
/* Fcn: '<S20>/pb//2V' */
b747cl_B.pb2V = 0.5 * b747cl_B.u_a[3] * 59.74 / b747cl_B.u_a[0];
/* Fcn: '<S20>/qc//2V' */
b747cl_B.qc2V = 0.5 * b747cl_B.u_a[4] * 8.32 / b747cl_B.u_a[0];
/* Fcn: '<S20>/rb//2V' */
b747cl_B.rb2V = 0.5 * b747cl_B.u_a[5] * 59.74 / b747cl_B.u_a[0];
/* TransportDelay: '<S4>/ delay' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
real_T tMinusDelay = simTime - b747cl_P.delay_Delay;
b747cl_B.delay = rt_TDelayInterpolate(
tMinusDelay,
0.0,
*tBuffer,
*uBuffer,
b747cl_DW.delay_IWORK.CircularBufSize,
&b747cl_DW.delay_IWORK.Last,
b747cl_DW.delay_IWORK.Tail,
b747cl_DW.delay_IWORK.Head,
(b747cl_P.delay_InitOutput),
0,
0);
}
/* DiscreteStateSpace: '<S36>/Discrete State-Space' */
{
b747cl_B.DiscreteStateSpace = b747cl_P.DiscreteStateSpace_C*
b747cl_DW.DiscreteStateSpace_DSTATE;
b747cl_B.DiscreteStateSpace += b747cl_P.DiscreteStateSpace_D*b747cl_B.delay;
}
/* RateLimiter: '<S4>/Rate Limiter1' */
if (b747cl_DW.LastMajorTime == (rtInf)) {
b747cl_B.RateLimiter1 = b747cl_B.DiscreteStateSpace;
} else {
rtb_psidot = b747cl_M->Timing.t[0] - b747cl_DW.LastMajorTime;
rtb_axk = rtb_psidot * b747cl_P.RateLimiter1_RisingLim;
rtb_Saturation2 = b747cl_B.DiscreteStateSpace - b747cl_DW.PrevY;
if (rtb_Saturation2 > rtb_axk) {
b747cl_B.RateLimiter1 = b747cl_DW.PrevY + rtb_axk;
} else {
rtb_psidot *= b747cl_P.RateLimiter1_FallingLim;
if (rtb_Saturation2 < rtb_psidot) {
b747cl_B.RateLimiter1 = b747cl_DW.PrevY + rtb_psidot;
} else {
b747cl_B.RateLimiter1 = b747cl_B.DiscreteStateSpace;
}
}
}
/* End of RateLimiter: '<S4>/Rate Limiter1' */
/* Saturate: '<S4>/Saturation4' */
if (b747cl_B.RateLimiter1 > b747cl_P.Saturation4_UpperSat) {
rtb_Saturation4 = b747cl_P.Saturation4_UpperSat;
} else if (b747cl_B.RateLimiter1 < b747cl_P.Saturation4_LowerSat) {
rtb_Saturation4 = b747cl_P.Saturation4_LowerSat;
} else {
rtb_Saturation4 = b747cl_B.RateLimiter1;
}
/* End of Saturate: '<S4>/Saturation4' */
/* TransportDelay: '<S4>/delay' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK_f.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK_f.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
real_T tMinusDelay = simTime - b747cl_P.delay_Delay_m;
b747cl_B.delay_h = rt_TDelayInterpolate(
tMinusDelay,
0.0,
*tBuffer,
*uBuffer,
b747cl_DW.delay_IWORK_j.CircularBufSize,
&b747cl_DW.delay_IWORK_j.Last,
b747cl_DW.delay_IWORK_j.Tail,
b747cl_DW.delay_IWORK_j.Head,
b747cl_P.delay_InitOutput_b,
0,
0);
}
/* DiscreteStateSpace: '<S37>/Discrete State-Space' */
{
b747cl_B.DiscreteStateSpace_f = b747cl_P.DiscreteStateSpace_C_l*
b747cl_DW.DiscreteStateSpace_DSTATE_g;
b747cl_B.DiscreteStateSpace_f += b747cl_P.DiscreteStateSpace_D_m*
b747cl_B.delay_h;
}
/* RateLimiter: '<S4>/Rate Limiter2' */
if (b747cl_DW.LastMajorTime_l == (rtInf)) {
b747cl_B.RateLimiter2 = b747cl_B.DiscreteStateSpace_f;
} else {
rtb_psidot = b747cl_M->Timing.t[0] - b747cl_DW.LastMajorTime_l;
rtb_axk = rtb_psidot * b747cl_P.RateLimiter2_RisingLim;
rtb_Saturation2 = b747cl_B.DiscreteStateSpace_f - b747cl_DW.PrevY_o;
if (rtb_Saturation2 > rtb_axk) {
b747cl_B.RateLimiter2 = b747cl_DW.PrevY_o + rtb_axk;
} else {
rtb_psidot *= b747cl_P.RateLimiter2_FallingLim;
if (rtb_Saturation2 < rtb_psidot) {
b747cl_B.RateLimiter2 = b747cl_DW.PrevY_o + rtb_psidot;
} else {
b747cl_B.RateLimiter2 = b747cl_B.DiscreteStateSpace_f;
}
}
}
/* End of RateLimiter: '<S4>/Rate Limiter2' */
/* Saturate: '<S4>/Saturation1' */
if (b747cl_B.RateLimiter2 > b747cl_P.Saturation1_UpperSat) {
rtb_Saturation1 = b747cl_P.Saturation1_UpperSat;
} else if (b747cl_B.RateLimiter2 < b747cl_P.Saturation1_LowerSat) {
rtb_Saturation1 = b747cl_P.Saturation1_LowerSat;
} else {
rtb_Saturation1 = b747cl_B.RateLimiter2;
}
/* End of Saturate: '<S4>/Saturation1' */
/* TransportDelay: '<S4>/delay ' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK_e.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK_e.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
real_T tMinusDelay = simTime - b747cl_P.delay_Delay_c;
b747cl_B.delay_m = rt_TDelayInterpolate(
tMinusDelay,
0.0,
*tBuffer,
*uBuffer,
b747cl_DW.delay_IWORK_g.CircularBufSize,
&b747cl_DW.delay_IWORK_g.Last,
b747cl_DW.delay_IWORK_g.Tail,
b747cl_DW.delay_IWORK_g.Head,
b747cl_P.delay_InitOutput_ba,
0,
0);
}
/* DiscreteStateSpace: '<S38>/Discrete State-Space' */
{
b747cl_B.DiscreteStateSpace_a = b747cl_P.DiscreteStateSpace_C_g*
b747cl_DW.DiscreteStateSpace_DSTATE_m;
b747cl_B.DiscreteStateSpace_a += b747cl_P.DiscreteStateSpace_D_a*
b747cl_B.delay_m;
}
/* RateLimiter: '<S4>/Rate Limiter3' */
if (b747cl_DW.LastMajorTime_e == (rtInf)) {
b747cl_B.RateLimiter3 = b747cl_B.DiscreteStateSpace_a;
} else {
rtb_psidot = b747cl_M->Timing.t[0] - b747cl_DW.LastMajorTime_e;
rtb_axk = rtb_psidot * b747cl_P.RateLimiter3_RisingLim;
rtb_Saturation2 = b747cl_B.DiscreteStateSpace_a - b747cl_DW.PrevY_e;
if (rtb_Saturation2 > rtb_axk) {
b747cl_B.RateLimiter3 = b747cl_DW.PrevY_e + rtb_axk;
} else {
rtb_psidot *= b747cl_P.RateLimiter3_FallingLim;
if (rtb_Saturation2 < rtb_psidot) {
b747cl_B.RateLimiter3 = b747cl_DW.PrevY_e + rtb_psidot;
} else {
b747cl_B.RateLimiter3 = b747cl_B.DiscreteStateSpace_a;
}
}
}
/* End of RateLimiter: '<S4>/Rate Limiter3' */
/* Saturate: '<S4>/Saturation2' */
if (b747cl_B.RateLimiter3 > b747cl_P.Saturation2_UpperSat) {
rtb_Saturation2 = b747cl_P.Saturation2_UpperSat;
} else if (b747cl_B.RateLimiter3 < b747cl_P.Saturation2_LowerSat) {
rtb_Saturation2 = b747cl_P.Saturation2_LowerSat;
} else {
rtb_Saturation2 = b747cl_B.RateLimiter3;
}
/* End of Saturate: '<S4>/Saturation2' */
/* Product: '<S19>/Product' incorporates:
* Constant: '<Root>/stabs'
*/
b747cl_B.Product = b747cl_P.stabs_Value * b747cl_B.u_a[1];
/* SignalConversion: '<S22>/TmpSignal ConversionAtMatrix GainInport1' incorporates:
* Constant: '<Root>/stabs'
* Constant: '<S19>/const'
* Constant: '<S19>/const1'
* Product: '<S19>/Product1'
* Product: '<S19>/Product2'
* Product: '<S19>/Product3'
*/
TmpSignalConversionAtMatrixGain[0] = b747cl_P.const_Value;
TmpSignalConversionAtMatrixGain[1] = b747cl_B.u_a[1];
TmpSignalConversionAtMatrixGain[2] = b747cl_B.Fcn;
TmpSignalConversionAtMatrixGain[3] = b747cl_B.Fcn1;
TmpSignalConversionAtMatrixGain[4] = b747cl_B.u_a[2];
TmpSignalConversionAtMatrixGain[5] = b747cl_B.Fcn2;
TmpSignalConversionAtMatrixGain[6] = b747cl_B.Fcn3;
TmpSignalConversionAtMatrixGain[7] = b747cl_B.pb2V;
TmpSignalConversionAtMatrixGain[8] = b747cl_B.qc2V;
TmpSignalConversionAtMatrixGain[9] = b747cl_B.rb2V;
TmpSignalConversionAtMatrixGain[10] = rtb_Saturation4;
TmpSignalConversionAtMatrixGain[11] = b747cl_P.stabs_Value;
TmpSignalConversionAtMatrixGain[12] = rtb_Saturation1;
TmpSignalConversionAtMatrixGain[13] = rtb_Saturation2;
TmpSignalConversionAtMatrixGain[14] = b747cl_B.Product;
TmpSignalConversionAtMatrixGain[15] = rtb_Saturation2 * b747cl_B.u_a[1];
TmpSignalConversionAtMatrixGain[16] = rtb_Saturation1 * b747cl_B.u_a[1];
TmpSignalConversionAtMatrixGain[17] = rtb_Saturation4 * b747cl_B.Fcn2;
TmpSignalConversionAtMatrixGain[18] = b747cl_P.const1_Value;
/* StateSpace: '<S22>/Matrix Gain' */
for (i = 0; i < 6; i++) {
rtb_S[i] = 0.0;
for (ci = 0; ci < 19; ci++) {
rtb_S[i] += b747cl_P.AM_M[ci * 6 + i] * TmpSignalConversionAtMatrixGain[ci];
}
}
/* End of StateSpace: '<S22>/Matrix Gain' */
/* Fcn: '<S23>/sin alpha' */
b747cl_B.sinalpha = sin(b747cl_B.u_a[1]);
/* Gain: '<S21>/S' incorporates:
* Product: '<S23>/Product2'
* Product: '<S23>/Product3'
* Product: '<S23>/Product4'
* Product: '<S23>/Product5'
* Sum: '<S23>/Sum3'
* Sum: '<S23>/Sum4'
*/
tmp[0] = b747cl_B.sinalpha * rtb_S[2] - b747cl_B.cosalpha * rtb_S[0];
tmp[1] = rtb_S[1];
tmp[2] = (0.0 - b747cl_B.sinalpha * rtb_S[0]) - b747cl_B.cosalpha * rtb_S[2];
tmp[3] = rtb_S[3];
tmp[4] = rtb_S[4];
tmp[5] = rtb_S[5];
for (i = 0; i < 6; i++) {
rtb_S[i] = b747cl_P.fmdims_S * tmp[i];
}
/* End of Gain: '<S21>/S' */
/* TransportDelay: '<S4>/ delay ' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK_a.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK_a.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
real_T tMinusDelay = simTime - b747cl_P.delay_Delay_k;
b747cl_B.delay_o = rt_TDelayInterpolate(
tMinusDelay,
0.0,
*tBuffer,
*uBuffer,
b747cl_DW.delay_IWORK_i.CircularBufSize,
&b747cl_DW.delay_IWORK_i.Last,
b747cl_DW.delay_IWORK_i.Tail,
b747cl_DW.delay_IWORK_i.Head,
b747cl_P.delay_InitOutput_a,
0,
0);
}
/* DiscreteStateSpace: '<S35>/Discrete State-Space' */
{
rtb_w = b747cl_P.DiscreteStateSpace_C_g5*
b747cl_DW.DiscreteStateSpace_DSTATE_d;
rtb_w += b747cl_P.DiscreteStateSpace_D_o*b747cl_B.delay_o;
}
/* Gain: '<S4>/Force [N]' */
rtb_w *= b747cl_P.ForceN_Gain;
/* Saturate: '<S4>/Saturation3' */
if (rtb_w > b747cl_P.Saturation3_UpperSat) {
b747cl_B.Saturation3 = b747cl_P.Saturation3_UpperSat;
} else if (rtb_w < b747cl_P.Saturation3_LowerSat) {
b747cl_B.Saturation3 = b747cl_P.Saturation3_LowerSat;
} else {
b747cl_B.Saturation3 = rtb_w;
}
/* End of Saturate: '<S4>/Saturation3' */
/* Fcn: '<S12>/Xgr' */
b747cl_B.Xgr = -288772.0 * b747cl_B.g * sin(b747cl_B.u_a[7]);
/* Fcn: '<S12>/Ygr' */
b747cl_B.Ygr = 288772.0 * b747cl_B.g * cos(b747cl_B.u_a[7]) * sin
(b747cl_B.u_a[8]);
/* Fcn: '<S12>/Zgr' */
b747cl_B.Zgr = 288772.0 * b747cl_B.g * cos(b747cl_B.u_a[7]) * cos
(b747cl_B.u_a[8]);
/* Fcn: '<S11>/-Xw//m' incorporates:
* Constant: '<Root>/Wind'
*/
rtb_w = (b747cl_B.u_a[4] * b747cl_P.Wind_Value[2] + b747cl_P.Wind_Value[3]) -
b747cl_B.u_a[5] * b747cl_P.Wind_Value[1];
/* Gain: '<S11>/gain' */
b747cl_B.gain[0] = -b747cl_P.fw_m * rtb_w;
/* Fcn: '<S11>/-Yw//m' incorporates:
* Constant: '<Root>/Wind'
*/
memcpy(&tmp_0[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_0[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_1[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_1[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_2[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_2[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_3[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_3[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_4[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_4[i + 12] = b747cl_P.Wind_Value[i];
}
/* Gain: '<S11>/gain' incorporates:
* Fcn: '<S11>/-Yw//m'
*/
b747cl_B.gain[1] = ((tmp_0[16] - tmp_1[3] * tmp_2[14]) + tmp_3[5] * tmp_4[12])
* -b747cl_P.fw_m;
/* Fcn: '<S11>/-Zw//m' incorporates:
* Constant: '<Root>/Wind'
*/
memcpy(&tmp_0[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_0[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_1[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_1[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_2[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_2[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_3[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_3[i + 12] = b747cl_P.Wind_Value[i];
}
memcpy(&tmp_4[0], &b747cl_B.u_a[0], 12U * sizeof(real_T));
for (i = 0; i < 6; i++) {
tmp_4[i + 12] = b747cl_P.Wind_Value[i];
}
/* Gain: '<S11>/gain' incorporates:
* Fcn: '<S11>/-Zw//m'
*/
b747cl_B.gain[2] = ((tmp_1[3] * tmp_2[13] + tmp_0[17]) - tmp_3[4] * tmp_4[12])
* -b747cl_P.fw_m;
/* Fcn: '<S21>/qdyn * S * CX' */
tmp_6[2] = b747cl_B.qdyn;
for (i = 0; i < 6; i++) {
tmp_5[i + 3] = rtb_S[i];
tmp_6[i + 3] = rtb_S[i];
}
/* Sum: '<S10>/Sum3' incorporates:
* Fcn: '<S21>/qdyn * S * CX'
*/
rtb_axk = ((tmp_5[3] * tmp_6[2] + b747cl_B.Saturation3) + b747cl_B.Xgr) +
b747cl_B.gain[0];
/* Fcn: '<S21>/qdyn * S * CY' */
tmp_7[2] = b747cl_B.qdyn;
for (i = 0; i < 6; i++) {
tmp_5[i + 3] = rtb_S[i];
tmp_7[i + 3] = rtb_S[i];
}
/* Sum: '<S10>/Sum3' incorporates:
* Fcn: '<S21>/qdyn * S * CY'
*/
rtb_Sum3_idx_1 = ((tmp_5[4] * tmp_7[2] + 0.0) + b747cl_B.Ygr) + b747cl_B.gain
[1];
/* Fcn: '<S21>/qdyn * S * CZ' */
tmp_8[2] = b747cl_B.qdyn;
for (i = 0; i < 6; i++) {
tmp_5[i + 3] = rtb_S[i];
tmp_8[i + 3] = rtb_S[i];
}
/* Sum: '<S10>/Sum3' incorporates:
* Fcn: '<S21>/qdyn * S * CZ'
*/
rtb_Sum3_idx_2 = ((tmp_5[5] * tmp_8[2] + 0.0) + b747cl_B.Zgr) + b747cl_B.gain
[2];
/* Fcn: '<S21>/qdyn * S * Cl' */
tmp_9[2] = b747cl_B.qdyn;
/* Fcn: '<S21>/qdyn * S * Cm' */
tmp_a[2] = b747cl_B.qdyn;
/* Fcn: '<S21>/qdyn * S * Cn' */
tmp_b[2] = b747cl_B.qdyn;
for (i = 0; i < 6; i++) {
/* Fcn: '<S21>/qdyn * S * Cl' */
tmp_5[i + 3] = rtb_S[i];
tmp_9[i + 3] = rtb_S[i];
/* Fcn: '<S21>/qdyn * S * Cm' */
tmp_6[i + 3] = rtb_S[i];
tmp_a[i + 3] = rtb_S[i];
/* Fcn: '<S21>/qdyn * S * Cn' */
tmp_7[i + 3] = rtb_S[i];
tmp_b[i + 3] = rtb_S[i];
}
/* Fcn: '<S13>/cos alpha' */
b747cl_B.cosalpha_k = cos(b747cl_B.u_a[1]);
/* Fcn: '<S13>/sin alpha' */
b747cl_B.sinalpha_f = sin(b747cl_B.u_a[1]);
/* Fcn: '<S13>/cos beta' */
b747cl_B.cosbeta = cos(b747cl_B.u_a[2]);
/* Fcn: '<S13>/sin beta' */
b747cl_B.sinbeta = sin(b747cl_B.u_a[2]);
/* Fcn: '<S13>/tan beta' */
b747cl_B.tanbeta = tan(b747cl_B.u_a[2]);
/* Fcn: '<S13>/sin psi' */
b747cl_B.sinpsi = sin(b747cl_B.u_a[6]);
/* Fcn: '<S13>/cos psi' */
b747cl_B.cospsi = cos(b747cl_B.u_a[6]);
/* Fcn: '<S13>/sin theta' */
b747cl_B.sintheta = sin(b747cl_B.u_a[7]);
/* Fcn: '<S13>/cos theta' */
b747cl_B.costheta = cos(b747cl_B.u_a[7]);
/* Fcn: '<S13>/sin phi' */
b747cl_B.sinphi = sin(b747cl_B.u_a[8]);
/* Fcn: '<S13>/cos phi' */
b747cl_B.cosphi = cos(b747cl_B.u_a[8]);
/* Fcn: '<S29>/Fcn' */
b747cl_B.Fcn_a = rt_powd_snf(b747cl_B.u[3], 2.0);
/* Fcn: '<S29>/Fcn1' */
b747cl_B.Fcn1_m = b747cl_B.u[3] * b747cl_B.u[4];
/* Fcn: '<S29>/Fcn2' */
b747cl_B.Fcn2_o = b747cl_B.u[3] * b747cl_B.u[5];
/* Fcn: '<S29>/Fcn3' */
b747cl_B.Fcn3_e = rt_powd_snf(b747cl_B.u[4], 2.0);
/* Fcn: '<S29>/Fcn4' */
b747cl_B.Fcn4 = b747cl_B.u[4] * b747cl_B.u[5];
/* Fcn: '<S29>/Fcn5' */
b747cl_B.Fcn5 = rt_powd_snf(b747cl_B.u[5], 2.0);
/* SignalConversion: '<S31>/TmpSignal ConversionAtMatrix GainInport1' incorporates:
* Fcn: '<S21>/qdyn * S * Cl'
* Gain: '<S21>/b'
*/
TmpSignalConversionAtMatrixGa_m[3] = b747cl_B.Fcn_a;
TmpSignalConversionAtMatrixGa_m[4] = b747cl_B.Fcn1_m;
TmpSignalConversionAtMatrixGa_m[5] = b747cl_B.Fcn2_o;
TmpSignalConversionAtMatrixGa_m[6] = b747cl_B.Fcn3_e;
TmpSignalConversionAtMatrixGa_m[7] = b747cl_B.Fcn4;
TmpSignalConversionAtMatrixGa_m[8] = b747cl_B.Fcn5;
TmpSignalConversionAtMatrixGa_m[0] = tmp_5[6] * tmp_9[2] * b747cl_P.fmdims_b;
/* StateSpace: '<S31>/Matrix Gain' */
rtb_MatrixGain_a[0] = 0.0;
/* SignalConversion: '<S31>/TmpSignal ConversionAtMatrix GainInport1' incorporates:
* Fcn: '<S21>/qdyn * S * Cm'
* Gain: '<S21>/cbar'
*/
TmpSignalConversionAtMatrixGa_m[1] = tmp_6[7] * tmp_a[2] *
b747cl_P.fmdims_cbar;
/* StateSpace: '<S31>/Matrix Gain' */
rtb_MatrixGain_a[1] = 0.0;
/* SignalConversion: '<S31>/TmpSignal ConversionAtMatrix GainInport1' incorporates:
* Fcn: '<S21>/qdyn * S * Cn'
* Gain: '<S21>/b '
*/
TmpSignalConversionAtMatrixGa_m[2] = tmp_7[8] * tmp_b[2] * b747cl_P.fmdims_b;
/* StateSpace: '<S31>/Matrix Gain' */
rtb_MatrixGain_a[2] = 0.0;
for (i = 0; i < 3; i++) {
for (ci = 0; ci < 9; ci++) {
rtb_MatrixGain_a[i] += b747cl_P.GM2_M[ci * 3 + i] *
TmpSignalConversionAtMatrixGa_m[ci];
}
}
/* Fcn: '<S27>/psi dot' */
rtb_psidot = (b747cl_B.u[4] * b747cl_B.sinphi + b747cl_B.u[5] *
b747cl_B.cosphi) / b747cl_B.costheta;
/* Gain: '<S9>/+1' */
for (i = 0; i < 12; i++) {
rtb_u[i] = b747cl_P.u_Gain_m * b747cl_B.DiscreteTimeIntegrator[i];
}
/* End of Gain: '<S9>/+1' */
/* Fcn: '<S25>/w' */
rtb_w = rtb_u[0] * b747cl_B.sinalpha_f * b747cl_B.cosbeta;
/* Fcn: '<S25>/u' */
memcpy(&rtb_u_0[0], &rtb_u[0], 12U * sizeof(real_T));
/* Sum: '<S9>/Sum' incorporates:
* Constant: '<Root>/Wind'
* Fcn: '<S25>/u'
*/
b747cl_B.Sum[0] = rtb_u_0[0] * b747cl_B.cosalpha_k * b747cl_B.cosbeta +
b747cl_P.Wind_Value[0];
/* Fcn: '<S25>/v' */
memcpy(&rtb_u_0[0], &rtb_u[0], 12U * sizeof(real_T));
/* Sum: '<S9>/Sum' incorporates:
* Constant: '<Root>/Wind'
* Fcn: '<S25>/v'
*/
b747cl_B.Sum[1] = rtb_u_0[0] * b747cl_B.sinbeta + b747cl_P.Wind_Value[1];
b747cl_B.Sum[2] = b747cl_P.Wind_Value[2] + rtb_w;
/* Fcn: '<S30>/tmp1' */
rtb_Ax = (b747cl_B.Sum[1] * b747cl_B.sinphi + b747cl_B.Sum[2] *
b747cl_B.cosphi) * b747cl_B.sintheta + b747cl_B.Sum[0] *
b747cl_B.costheta;
/* Fcn: '<S30>/tmp2' */
rtb_wdot = b747cl_B.Sum[1] * b747cl_B.cosphi - b747cl_B.Sum[2] *
b747cl_B.sinphi;
/* Gain: '<S9>/xfix' incorporates:
* Fcn: '<S28>/V dot'
*/
b747cl_B.xfix[0] = ((rtb_axk * b747cl_B.cosalpha_k * b747cl_B.cosbeta +
rtb_Sum3_idx_1 * b747cl_B.sinbeta) + rtb_Sum3_idx_2 *
b747cl_B.sinalpha_f * b747cl_B.cosbeta) / 288772.0 *
b747cl_P.xfix_Gain;
/* Fcn: '<S28>/alpha dot' */
memcpy(&tmp_c[0], &b747cl_B.u[0], 12U * sizeof(real_T));
memcpy(&tmp_d[0], &b747cl_B.u[0], 12U * sizeof(real_T));
memcpy(&tmp_e[0], &b747cl_B.u[0], 12U * sizeof(real_T));
memcpy(&tmp_f[0], &b747cl_B.u[0], 12U * sizeof(real_T));
/* Gain: '<S9>/xfix' incorporates:
* Fcn: '<S26>/beta dot correction'
* Fcn: '<S28>/alpha dot'
* Fcn: '<S28>/beta dot'
*/
b747cl_B.xfix[1] = (((-rtb_axk * b747cl_B.sinalpha_f + rtb_Sum3_idx_2 *
b747cl_B.cosalpha_k) / (288772.0 * tmp_c[0] *
b747cl_B.cosbeta) - (tmp_d[3] * b747cl_B.cosalpha_k + tmp_e[5] *
b747cl_B.sinalpha_f) * b747cl_B.tanbeta) + tmp_f[4]) * b747cl_P.xfix_Gain;
b747cl_B.xfix[2] = ((((-rtb_axk * b747cl_B.cosalpha_k * b747cl_B.sinbeta +
rtb_Sum3_idx_1 * b747cl_B.cosbeta) - rtb_Sum3_idx_2 * b747cl_B.sinalpha_f *
b747cl_B.sinbeta) / (288772.0 * b747cl_B.u[0]) +
b747cl_B.u[3] * b747cl_B.sinalpha_f) - b747cl_B.u[5] *
b747cl_B.cosalpha_k) / (1.0 - b747cl_B.cosbeta *
b747cl_B.rho * 59.74 * 510.95 * 0.0 / 1.155088E+6) * b747cl_P.xfix_Gain;
b747cl_B.xfix[3] = b747cl_P.xfix_Gain * rtb_MatrixGain_a[0];
b747cl_B.xfix[4] = b747cl_P.xfix_Gain * rtb_MatrixGain_a[1];
b747cl_B.xfix[5] = b747cl_P.xfix_Gain * rtb_MatrixGain_a[2];
b747cl_B.xfix[6] = b747cl_P.xfix_Gain * rtb_psidot;
/* Fcn: '<S27>/theta dot' */
memcpy(&tmp_c[0], &b747cl_B.u[0], 12U * sizeof(real_T));
memcpy(&tmp_d[0], &b747cl_B.u[0], 12U * sizeof(real_T));
/* Gain: '<S9>/xfix' incorporates:
* Fcn: '<S27>/theta dot'
*/
b747cl_B.xfix[7] = (tmp_c[4] * b747cl_B.cosphi - tmp_d[5] * b747cl_B.sinphi) *
b747cl_P.xfix_Gain;
/* Fcn: '<S27>/phi dot' */
memcpy(&tmp_g[0], &b747cl_B.u[0], 12U * sizeof(real_T));
/* Gain: '<S9>/xfix' incorporates:
* Fcn: '<S27>/phi dot'
* Fcn: '<S30>/H dot'
* Fcn: '<S30>/xe dot'
* Fcn: '<S30>/ye dot'
*/
b747cl_B.xfix[8] = (rtb_psidot * b747cl_B.sintheta + tmp_g[3]) *
b747cl_P.xfix_Gain;
b747cl_B.xfix[9] = (rtb_Ax * b747cl_B.cospsi - rtb_wdot * b747cl_B.sinpsi) *
b747cl_P.xfix_Gain;
b747cl_B.xfix[10] = (rtb_Ax * b747cl_B.sinpsi + rtb_wdot * b747cl_B.cospsi) *
b747cl_P.xfix_Gain;
b747cl_B.xfix[11] = (b747cl_B.Sum[0] * b747cl_B.sintheta - (b747cl_B.Sum[1] *
b747cl_B.sinphi + b747cl_B.Sum[2] * b747cl_B.cosphi) * b747cl_B.costheta) *
b747cl_P.xfix_Gain;
/* Fcn: '<S34>/u dot' */
tmp_i[0] = b747cl_B.cosalpha_k;
tmp_j[2] = b747cl_B.cosbeta;
tmp_k[4] = b747cl_B.u_a[0];
tmp_m[1] = b747cl_B.sinalpha_f;
tmp_n[2] = b747cl_B.cosbeta;
tmp_p[0] = b747cl_B.cosalpha_k;
tmp_q[3] = b747cl_B.sinbeta;
for (i = 0; i < 12; i++) {
/* Gain: '<S2>/+1' */
rtb_psidot = b747cl_P.u_Gain_b * b747cl_B.xfix[i];
/* Sum: '<Root>/Sum' */
rtb_WhiteNoise[i] = b747cl_B.Output[i] + b747cl_B.DiscreteTimeIntegrator[i];
rtb_WhiteNoise[i + 12] = b747cl_B.Output[i + 12] + b747cl_B.xfix[i];
/* Fcn: '<S34>/u dot' */
tmp_h[i + 5] = rtb_psidot;
tmp_i[i + 5] = rtb_psidot;
tmp_j[i + 5] = rtb_psidot;
tmp_k[i + 5] = rtb_psidot;
tmp_l[i + 5] = rtb_psidot;
tmp_m[i + 5] = rtb_psidot;
tmp_n[i + 5] = rtb_psidot;
tmp_o[i + 5] = rtb_psidot;
tmp_p[i + 5] = rtb_psidot;
tmp_q[i + 5] = rtb_psidot;
/* Gain: '<S2>/+1' */
rtb_u[i] = rtb_psidot;
}
/* Sum: '<Root>/Sum' incorporates:
* Fcn: '<S34>/u dot'
*/
rtb_WhiteNoise[24] = (tmp_h[5] * tmp_i[0] * tmp_j[2] - (tmp_l[6] * tmp_m[1] *
tmp_n[2] + tmp_o[7] * tmp_p[0] * tmp_q[3]) * tmp_k[4]) + b747cl_B.Output[24];
/* Fcn: '<S34>/v dot' */
tmp_r[3] = b747cl_B.sinbeta;
tmp_s[4] = b747cl_B.u_a[0];
tmp_t[2] = b747cl_B.cosbeta;
memcpy(&tmp_h[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_r[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_s[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_t[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_i[5], &rtb_u[0], 12U * sizeof(real_T));
/* Sum: '<Root>/Sum' incorporates:
* Fcn: '<S34>/v dot'
*/
rtb_WhiteNoise[25] = (tmp_s[4] * tmp_t[2] * tmp_i[7] + tmp_h[5] * tmp_r[3]) +
b747cl_B.Output[25];
/* Fcn: '<S34>/wdot' */
tmp_u[1] = b747cl_B.sinalpha_f;
tmp_v[2] = b747cl_B.cosbeta;
tmp_w[4] = b747cl_B.u_a[0];
tmp_x[0] = b747cl_B.cosalpha_k;
tmp_y[2] = b747cl_B.cosbeta;
tmp_z[1] = b747cl_B.sinalpha_f;
tmp_10[3] = b747cl_B.sinbeta;
memcpy(&tmp_h[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_u[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_v[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_w[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_i[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_x[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_y[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_j[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_z[5], &rtb_u[0], 12U * sizeof(real_T));
memcpy(&tmp_10[5], &rtb_u[0], 12U * sizeof(real_T));
/* Sum: '<Root>/Sum' incorporates:
* Constant: '<Root>/stabs'
* Fcn: '<S32>/Ax'
* Fcn: '<S32>/Ay'
* Fcn: '<S32>/Az'
* Fcn: '<S32>/axk'
* Fcn: '<S32>/ayk'
* Fcn: '<S32>/azk'
* Fcn: '<S34>/wdot'
*/
rtb_WhiteNoise[26] = ((tmp_i[6] * tmp_x[0] * tmp_y[2] - tmp_j[7] * tmp_z[1] *
tmp_10[3]) * tmp_w[4] + tmp_h[5] * tmp_u[1] * tmp_v[2]) + b747cl_B.Output[26];
rtb_WhiteNoise[27] = b747cl_B.Output[27] + b747cl_B.pb2V;
rtb_WhiteNoise[28] = b747cl_B.Output[28] + b747cl_B.qc2V;
rtb_WhiteNoise[29] = b747cl_B.Output[29] + b747cl_B.rb2V;
rtb_WhiteNoise[30] = (rtb_axk - b747cl_B.Xgr) / 2.8318859337999998E+6 +
b747cl_B.Output[30];
rtb_WhiteNoise[31] = (rtb_Sum3_idx_1 - b747cl_B.Ygr) / 2.8318859337999998E+6 +
b747cl_B.Output[31];
rtb_WhiteNoise[32] = (rtb_Sum3_idx_2 - b747cl_B.Zgr) / 2.8318859337999998E+6 +
b747cl_B.Output[32];
rtb_WhiteNoise[33] = rtb_axk / 2.8318859337999998E+6 + b747cl_B.Output[33];
rtb_WhiteNoise[34] = rtb_Sum3_idx_1 / 2.8318859337999998E+6 + b747cl_B.Output
[34];
rtb_WhiteNoise[35] = rtb_Sum3_idx_2 / 2.8318859337999998E+6 + b747cl_B.Output
[35];
rtb_WhiteNoise[36] = b747cl_B.Output[36] + rtb_Saturation4;
rtb_WhiteNoise[37] = b747cl_B.Output[37] + rtb_Saturation1;
rtb_WhiteNoise[38] = b747cl_B.Output[38] + rtb_Saturation2;
rtb_WhiteNoise[39] = b747cl_B.Output[39] + b747cl_P.stabs_Value;
/* Sum: '<S1>/Sum3' incorporates:
* Constant: '<S1>/y0([1 2 5 8 12])'
*/
Sum3[2] = b747cl_P.y0125812_Value[2] - rtb_WhiteNoise[4];
Sum3[3] = b747cl_P.y0125812_Value[3] - rtb_WhiteNoise[7];
Sum3[4] = b747cl_P.y0125812_Value[4] - rtb_WhiteNoise[11];
Sum3[0] = b747cl_P.y0125812_Value[0] - rtb_WhiteNoise[0];
/* StateSpace: '<S5>/Matrix Gain' */
rtb_MatrixGain[0] = 0.0;
/* Sum: '<S1>/Sum3' incorporates:
* Constant: '<S1>/y0([1 2 5 8 12])'
*/
Sum3[1] = b747cl_P.y0125812_Value[1] - rtb_WhiteNoise[1];
/* StateSpace: '<S5>/Matrix Gain' */
rtb_MatrixGain[1] = 0.0;
/* Sum: '<S1>/Sum1' incorporates:
* Constant: '<S1>/y0([3 4 6 9])'
*/
Sum1[2] = b747cl_P.y03469_Value[2] - rtb_WhiteNoise[5];
Sum1[3] = b747cl_P.y03469_Value[3] - rtb_WhiteNoise[8];
for (i = 0; i < 2; i++) {
/* StateSpace: '<S5>/Matrix Gain' */
for (ci = 0; ci < 5; ci++) {
rtb_MatrixGain[i] += b747cl_P.Klg_M[(ci << 1) + i] * Sum3[ci];
}
/* Sum: '<S1>/Sum1' incorporates:
* Constant: '<S1>/y0([3 4 6 9])'
*/
Sum1[i] = b747cl_P.y03469_Value[i] - rtb_WhiteNoise[i + 2];
/* StateSpace: '<S6>/Matrix Gain' */
rtb_MatrixGain_f[i] = 0.0;
}
/* StateSpace: '<S6>/Matrix Gain' */
for (i = 0; i < 2; i++) {
rtb_Saturation4 = b747cl_P.Klt_M[6 + i] * Sum1[3] + (b747cl_P.Klt_M[4 + i] *
Sum1[2] + (b747cl_P.Klt_M[2 + i] * Sum1[1] + (b747cl_P.Klt_M[i] * Sum1[0]
+ rtb_MatrixGain_f[i])));
rtb_MatrixGain_f[i] = rtb_Saturation4;
}
/* Sum: '<S1>/Sum5' incorporates:
* Constant: '<Root>/The 747 Pilot Was Here'
* Constant: '<S1>/c5'
* Gain: '<S1>/wind6'
*/
b747cl_B.Sum5 = b747cl_P.wind6_Gain * b747cl_P.The747PilotWasHere_Value +
b747cl_P.c5_Value;
/* Gain: '<S1>/wind2' */
b747cl_B.wind2 = b747cl_P.wind2_Gain * 0.0;
/* Gain: '<S1>/wind4' */
b747cl_B.wind4 = b747cl_P.wind4_Gain * 0.0;
/* Gain: '<S1>/wind5' */
b747cl_B.wind5 = b747cl_P.wind5_Gain * 0.0;
/* ManualSwitch: '<S1>/Switch' incorporates:
* Constant: '<S1>/c1'
* Constant: '<S1>/c4'
* Sum: '<S1>/Sum2'
* Sum: '<S1>/Sum4'
*/
if (b747cl_P.Switch_CurrentSetting == 1) {
b747cl_B.Switch[0] = b747cl_B.Sum5;
b747cl_B.Switch[1] = b747cl_B.wind2;
b747cl_B.Switch[2] = b747cl_B.wind4;
b747cl_B.Switch[3] = b747cl_B.wind5;
} else {
b747cl_B.Switch[0] = b747cl_P.c4_Value[0] + rtb_MatrixGain[0];
b747cl_B.Switch[2] = b747cl_P.c1_Value[0] + rtb_MatrixGain_f[0];
b747cl_B.Switch[1] = b747cl_P.c4_Value[1] + rtb_MatrixGain[1];
b747cl_B.Switch[3] = b747cl_P.c1_Value[1] + rtb_MatrixGain_f[1];
}
/* End of ManualSwitch: '<S1>/Switch' */
/* Fcn: '<S16>/qc' */
rtb_Saturation4 = 0.2 * rt_powd_snf(b747cl_B.M, 2.0) + 1.0;
if (rtb_Saturation4 < 0.0) {
rtb_Saturation4 = -rt_powd_snf(-rtb_Saturation4, 3.5);
} else {
rtb_Saturation4 = rt_powd_snf(rtb_Saturation4, 3.5);
}
/* Fcn: '<S16>/Vc' incorporates:
* Fcn: '<S16>/qc'
*/
rtb_Saturation4 = (rtb_Saturation4 - 1.0) * b747cl_B.ps / 101325.0 + 1.0;
if (rtb_Saturation4 < 0.0) {
rtb_Saturation4 = -rt_powd_snf(-rtb_Saturation4, 0.2857142857142857);
} else {
rtb_Saturation4 = rt_powd_snf(rtb_Saturation4, 0.2857142857142857);
}
rtb_Saturation4 = (rtb_Saturation4 - 1.0) * 579000.0;
if (rtb_Saturation4 < 0.0) {
rtb_Vc = -sqrt(-rtb_Saturation4);
} else {
rtb_Vc = sqrt(rtb_Saturation4);
}
/* End of Fcn: '<S16>/Vc' */
/* Fcn: '<S16>/Ve' */
rtb_Saturation4 = b747cl_B.qdyn * 1.63265;
if (rtb_Saturation4 < 0.0) {
rtb_Ve = -sqrt(-rtb_Saturation4);
} else {
rtb_Ve = sqrt(rtb_Saturation4);
}
/* End of Fcn: '<S16>/Ve' */
/* Fcn: '<S17>/Tt' */
rtb_Tt = (0.2 * rt_powd_snf(b747cl_B.M, 2.0) + 1.0) * b747cl_B.T;
/* Gain: '<S17>/cbar' incorporates:
* Fcn: '<S17>/Re'
*/
rtb_cbar = b747cl_B.rho * b747cl_B.u_a[0] / b747cl_B.mu * b747cl_P.ad3_cbar;
/* Fcn: '<S33>/Phi' */
rtb_Phi = cos(b747cl_B.u_a[7] - 0.0464959) * b747cl_B.u_a[8];
/* Fcn: '<S33>/chi' */
rtb_chi = b747cl_B.u_a[2] + b747cl_B.u_a[6];
/* Fcn: '<S33>/fpa' */
rtb_fpa = rtb_u[0] / 9.80665;
/* Fcn: '<S33>/gamma' */
rtb_Saturation4 = rtb_u[11] / b747cl_B.u_a[0];
if (rtb_Saturation4 > 1.0) {
rtb_Saturation4 = 1.0;
} else {
if (rtb_Saturation4 < -1.0) {
rtb_Saturation4 = -1.0;
}
}
rtb_gamma = asin(rtb_Saturation4);
/* End of Fcn: '<S33>/gamma' */
/* Clock: '<Root>/Clock' */
b747cl_B.Clock = b747cl_M->Timing.t[0];
/* ToWorkspace: '<Root>/To Workspace4' */
rt_UpdateLogVar((LogVar *)(LogVar*) (b747cl_DW.ToWorkspace4_PWORK.LoggedData),
&b747cl_B.Clock, 0);
}
/* Model update function */
static void b747cl_update(void)
{
int32_T iU;
/* Update for DiscreteIntegrator: '<S9>/Discrete-Time Integrator' */
for (iU = 0; iU < 12; iU++) {
b747cl_DW.DiscreteTimeIntegrator_DSTATE[iU] +=
b747cl_P.DiscreteTimeIntegrator_gainval * b747cl_B.xfix[iU];
}
/* End of Update for DiscreteIntegrator: '<S9>/Discrete-Time Integrator' */
/* Update for RandomNumber: '<S3>/White Noise' */
for (iU = 0; iU < 40; iU++) {
b747cl_DW.NextOutput[iU] = rt_nrand_Upu32_Yd_f_pw_snf(&b747cl_DW.RandSeed[iU])
* b747cl_P.WhiteNoise_StdDev + b747cl_P.WhiteNoise_Mean;
}
/* End of Update for RandomNumber: '<S3>/White Noise' */
/* Update for TransportDelay: '<S4>/ delay' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
b747cl_DW.delay_IWORK.Head = ((b747cl_DW.delay_IWORK.Head <
(b747cl_DW.delay_IWORK.CircularBufSize-1)) ? (b747cl_DW.delay_IWORK.Head+1)
: 0);
if (b747cl_DW.delay_IWORK.Head == b747cl_DW.delay_IWORK.Tail) {
b747cl_DW.delay_IWORK.Tail = ((b747cl_DW.delay_IWORK.Tail <
(b747cl_DW.delay_IWORK.CircularBufSize-1)) ? (b747cl_DW.delay_IWORK.Tail
+1) : 0);
}
(*tBuffer)[b747cl_DW.delay_IWORK.Head] = simTime;
(*uBuffer)[b747cl_DW.delay_IWORK.Head] = b747cl_B.Switch[1];
}
/* Update for DiscreteStateSpace: '<S36>/Discrete State-Space' */
{
real_T xnew[1];
xnew[0] = b747cl_P.DiscreteStateSpace_A*b747cl_DW.DiscreteStateSpace_DSTATE;
xnew[0] += b747cl_P.DiscreteStateSpace_B*b747cl_B.delay;
(void) memcpy(&b747cl_DW.DiscreteStateSpace_DSTATE, xnew,
sizeof(real_T)*1);
}
/* Update for RateLimiter: '<S4>/Rate Limiter1' */
b747cl_DW.PrevY = b747cl_B.RateLimiter1;
b747cl_DW.LastMajorTime = b747cl_M->Timing.t[0];
/* Update for TransportDelay: '<S4>/delay' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK_f.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK_f.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
b747cl_DW.delay_IWORK_j.Head = ((b747cl_DW.delay_IWORK_j.Head <
(b747cl_DW.delay_IWORK_j.CircularBufSize-1)) ?
(b747cl_DW.delay_IWORK_j.Head+1) : 0);
if (b747cl_DW.delay_IWORK_j.Head == b747cl_DW.delay_IWORK_j.Tail) {
b747cl_DW.delay_IWORK_j.Tail = ((b747cl_DW.delay_IWORK_j.Tail <
(b747cl_DW.delay_IWORK_j.CircularBufSize-1)) ?
(b747cl_DW.delay_IWORK_j.Tail+1) : 0);
}
(*tBuffer)[b747cl_DW.delay_IWORK_j.Head] = simTime;
(*uBuffer)[b747cl_DW.delay_IWORK_j.Head] = b747cl_B.Switch[2];
}
/* Update for DiscreteStateSpace: '<S37>/Discrete State-Space' */
{
real_T xnew[1];
xnew[0] = b747cl_P.DiscreteStateSpace_A_d*
b747cl_DW.DiscreteStateSpace_DSTATE_g;
xnew[0] += b747cl_P.DiscreteStateSpace_B_h*b747cl_B.delay_h;
(void) memcpy(&b747cl_DW.DiscreteStateSpace_DSTATE_g, xnew,
sizeof(real_T)*1);
}
/* Update for RateLimiter: '<S4>/Rate Limiter2' */
b747cl_DW.PrevY_o = b747cl_B.RateLimiter2;
b747cl_DW.LastMajorTime_l = b747cl_M->Timing.t[0];
/* Update for TransportDelay: '<S4>/delay ' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK_e.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK_e.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
b747cl_DW.delay_IWORK_g.Head = ((b747cl_DW.delay_IWORK_g.Head <
(b747cl_DW.delay_IWORK_g.CircularBufSize-1)) ?
(b747cl_DW.delay_IWORK_g.Head+1) : 0);
if (b747cl_DW.delay_IWORK_g.Head == b747cl_DW.delay_IWORK_g.Tail) {
b747cl_DW.delay_IWORK_g.Tail = ((b747cl_DW.delay_IWORK_g.Tail <
(b747cl_DW.delay_IWORK_g.CircularBufSize-1)) ?
(b747cl_DW.delay_IWORK_g.Tail+1) : 0);
}
(*tBuffer)[b747cl_DW.delay_IWORK_g.Head] = simTime;
(*uBuffer)[b747cl_DW.delay_IWORK_g.Head] = b747cl_B.Switch[3];
}
/* Update for DiscreteStateSpace: '<S38>/Discrete State-Space' */
{
real_T xnew[1];
xnew[0] = b747cl_P.DiscreteStateSpace_A_b*
b747cl_DW.DiscreteStateSpace_DSTATE_m;
xnew[0] += b747cl_P.DiscreteStateSpace_B_i*b747cl_B.delay_m;
(void) memcpy(&b747cl_DW.DiscreteStateSpace_DSTATE_m, xnew,
sizeof(real_T)*1);
}
/* Update for RateLimiter: '<S4>/Rate Limiter3' */
b747cl_DW.PrevY_e = b747cl_B.RateLimiter3;
b747cl_DW.LastMajorTime_e = b747cl_M->Timing.t[0];
/* Update for TransportDelay: '<S4>/ delay ' */
{
real_T **uBuffer = (real_T**)&b747cl_DW.delay_PWORK_a.TUbufferPtrs[0];
real_T **tBuffer = (real_T**)&b747cl_DW.delay_PWORK_a.TUbufferPtrs[1];
real_T simTime = b747cl_M->Timing.t[0];
b747cl_DW.delay_IWORK_i.Head = ((b747cl_DW.delay_IWORK_i.Head <
(b747cl_DW.delay_IWORK_i.CircularBufSize-1)) ?
(b747cl_DW.delay_IWORK_i.Head+1) : 0);
if (b747cl_DW.delay_IWORK_i.Head == b747cl_DW.delay_IWORK_i.Tail) {
b747cl_DW.delay_IWORK_i.Tail = ((b747cl_DW.delay_IWORK_i.Tail <
(b747cl_DW.delay_IWORK_i.CircularBufSize-1)) ?
(b747cl_DW.delay_IWORK_i.Tail+1) : 0);
}
(*tBuffer)[b747cl_DW.delay_IWORK_i.Head] = simTime;
(*uBuffer)[b747cl_DW.delay_IWORK_i.Head] = b747cl_B.Switch[0];
}
/* Update for DiscreteStateSpace: '<S35>/Discrete State-Space' */
{
real_T xnew[1];
xnew[0] = b747cl_P.DiscreteStateSpace_A_n*
b747cl_DW.DiscreteStateSpace_DSTATE_d;
xnew[0] += b747cl_P.DiscreteStateSpace_B_e*b747cl_B.delay_o;
(void) memcpy(&b747cl_DW.DiscreteStateSpace_DSTATE_d, xnew,
sizeof(real_T)*1);
}
/* Update absolute time for base rate */
/* The "clockTick0" counts the number of times the code of this task has
* been executed. The absolute time is the multiplication of "clockTick0"
* and "Timing.stepSize0". Size of "clockTick0" ensures timer will not
* overflow during the application lifespan selected.
* Timer of this task consists of two 32 bit unsigned integers.
* The two integers represent the low bits Timing.clockTick0 and the high bits
* Timing.clockTickH0. When the low bit overflows to 0, the high bits increment.
*/
if (!(++b747cl_M->Timing.clockTick0)) {
++b747cl_M->Timing.clockTickH0;
}
b747cl_M->Timing.t[0] = b747cl_M->Timing.clockTick0 *
b747cl_M->Timing.stepSize0 + b747cl_M->Timing.clockTickH0 *
b747cl_M->Timing.stepSize0 * 4294967296.0;
{
/* Update absolute timer for sample time: [0.05s, 0.0s] */
/* The "clockTick1" counts the number of times the code of this task has
* been executed. The absolute time is the multiplication of "clockTick1"
* and "Timing.stepSize1". Size of "clockTick1" ensures timer will not
* overflow during the application lifespan selected.
* Timer of this task consists of two 32 bit unsigned integers.
* The two integers represent the low bits Timing.clockTick1 and the high bits
* Timing.clockTickH1. When the low bit overflows to 0, the high bits increment.
*/
if (!(++b747cl_M->Timing.clockTick1)) {
++b747cl_M->Timing.clockTickH1;
}
b747cl_M->Timing.t[1] = b747cl_M->Timing.clockTick1 *
b747cl_M->Timing.stepSize1 + b747cl_M->Timing.clockTickH1 *
b747cl_M->Timing.stepSize1 * 4294967296.0;
}
}
/* Model initialize function */
static void b747cl_initialize(void)
{
/* Start for ToWorkspace: '<Root>/Aircraft States' */
{
int_T dimensions[1] = { 12 };
b747cl_DW.AircraftStates_PWORK.LoggedData = rt_CreateLogVar(
b747cl_M->rtwLogInfo,
0.0,
rtmGetTFinal(b747cl_M),
b747cl_M->Timing.stepSize0,
(&rtmGetErrorStatus(b747cl_M)),
"x",
SS_DOUBLE,
0,
0,
0,
12,
1,
dimensions,
NO_LOGVALDIMS,
(NULL),
(NULL),
1000,
1,
0.05,
1);
if (b747cl_DW.AircraftStates_PWORK.LoggedData == (NULL))
return;
}
/* Start for ToWorkspace: '<Root>/airspeed' */
{
int_T dimensions[1] = { 1 };
b747cl_DW.airspeed_PWORK.LoggedData = rt_CreateLogVar(
b747cl_M->rtwLogInfo,
0.0,
rtmGetTFinal(b747cl_M),
/* Time and Space category mutation - template T0: dataype of time is multiplied by 1000.
* Before mutation => b747cl_M->Timing.stepSize0,
* Mutation begins */
b747cl_M->Timing.stepSize0* 1000,
/* Mutation ends */
(&rtmGetErrorStatus(b747cl_M)),
"airspeed",
SS_DOUBLE,
0,
0,
0,
1,
1,
dimensions,
NO_LOGVALDIMS,
(NULL),
(NULL),
0,
1,
0.05,
1);
if (b747cl_DW.airspeed_PWORK.LoggedData == (NULL))
return;
}
/* Start for ToWorkspace: '<Root>/alititude' */
{
int_T dimensions[1] = { 1 };
b747cl_DW.alititude_PWORK.LoggedData = rt_CreateLogVar(
b747cl_M->rtwLogInfo,
0.0,
rtmGetTFinal(b747cl_M),
b747cl_M->Timing.stepSize0,
(&rtmGetErrorStatus(b747cl_M)),
"altitude",
SS_DOUBLE,
0,
0,
0,
1,
1,
dimensions,
NO_LOGVALDIMS,
(NULL),
(NULL),
0,
1,
0.05,
1);
if (b747cl_DW.alititude_PWORK.LoggedData == (NULL))
return;
}
/* Start for ToWorkspace: '<Root>/theta' */
{
int_T dimensions[1] = { 1 };
b747cl_DW.theta_PWORK.LoggedData = rt_CreateLogVar(
b747cl_M->rtwLogInfo,
0.0,
rtmGetTFinal(b747cl_M),
b747cl_M->Timing.stepSize0,
(&rtmGetErrorStatus(b747cl_M)),
"theta",
SS_DOUBLE,
0,
0,
0,
1,
1,
dimensions,
NO_LOGVALDIMS,
(NULL),
(NULL),
0,
1,
0.05,
1);
if (b747cl_DW.theta_PWORK.LoggedData == (NULL))
return;
}
/* Start for TransportDelay: '<S4>/ delay' */
{
real_T *pBuffer = &b747cl_DW.delay_RWORK.TUbufferArea[0];
b747cl_DW.delay_IWORK.Tail = 0;
b747cl_DW.delay_IWORK.Head = 0;
b747cl_DW.delay_IWORK.Last = 0;
b747cl_DW.delay_IWORK.CircularBufSize = 1024;
pBuffer[0] = (b747cl_P.delay_InitOutput);
pBuffer[1024] = b747cl_M->Timing.t[0];
b747cl_DW.delay_PWORK.TUbufferPtrs[0] = (void *) &pBuffer[0];
b747cl_DW.delay_PWORK.TUbufferPtrs[1] = (void *) &pBuffer[1024];
}
/* Start for TransportDelay: '<S4>/delay' */
{
real_T *pBuffer = &b747cl_DW.delay_RWORK_g.TUbufferArea[0];
b747cl_DW.delay_IWORK_j.Tail = 0;
b747cl_DW.delay_IWORK_j.Head = 0;
b747cl_DW.delay_IWORK_j.Last = 0;
b747cl_DW.delay_IWORK_j.CircularBufSize = 1024;
pBuffer[0] = b747cl_P.delay_InitOutput_b;
pBuffer[1024] = b747cl_M->Timing.t[0];
b747cl_DW.delay_PWORK_f.TUbufferPtrs[0] = (void *) &pBuffer[0];
b747cl_DW.delay_PWORK_f.TUbufferPtrs[1] = (void *) &pBuffer[1024];
}
/* Start for TransportDelay: '<S4>/delay ' */
{
real_T *pBuffer = &b747cl_DW.delay_RWORK_o.TUbufferArea[0];
b747cl_DW.delay_IWORK_g.Tail = 0;
b747cl_DW.delay_IWORK_g.Head = 0;
b747cl_DW.delay_IWORK_g.Last = 0;
b747cl_DW.delay_IWORK_g.CircularBufSize = 1024;
pBuffer[0] = b747cl_P.delay_InitOutput_ba;
pBuffer[1024] = b747cl_M->Timing.t[0];
b747cl_DW.delay_PWORK_e.TUbufferPtrs[0] = (void *) &pBuffer[0];
b747cl_DW.delay_PWORK_e.TUbufferPtrs[1] = (void *) &pBuffer[1024];
}
/* Start for TransportDelay: '<S4>/ delay ' */
{
real_T *pBuffer = &b747cl_DW.delay_RWORK_p.TUbufferArea[0];
b747cl_DW.delay_IWORK_i.Tail = 0;
b747cl_DW.delay_IWORK_i.Head = 0;
b747cl_DW.delay_IWORK_i.Last = 0;
b747cl_DW.delay_IWORK_i.CircularBufSize = 1024;
pBuffer[0] = b747cl_P.delay_InitOutput_a;
pBuffer[1024] = b747cl_M->Timing.t[0];
b747cl_DW.delay_PWORK_a.TUbufferPtrs[0] = (void *) &pBuffer[0];
b747cl_DW.delay_PWORK_a.TUbufferPtrs[1] = (void *) &pBuffer[1024];
}
/* Start for ToWorkspace: '<Root>/To Workspace4' */
{
int_T dimensions[1] = { 1 };
b747cl_DW.ToWorkspace4_PWORK.LoggedData = rt_CreateLogVar(
b747cl_M->rtwLogInfo,
0.0,
rtmGetTFinal(b747cl_M),
b747cl_M->Timing.stepSize0,
(&rtmGetErrorStatus(b747cl_M)),
"t",
SS_DOUBLE,
0,
0,
0,
1,
1,
dimensions,
NO_LOGVALDIMS,
(NULL),
(NULL),
1000,
1,
0.05,
1);
if (b747cl_DW.ToWorkspace4_PWORK.LoggedData == (NULL))
return;
}
{
int32_T iU;
uint32_T tseed;
int32_T r;
int32_T t;
real_T y1;
/* InitializeConditions for DiscreteIntegrator: '<S9>/Discrete-Time Integrator' */
memcpy(&b747cl_DW.DiscreteTimeIntegrator_DSTATE[0], &b747cl_P.DTB747_x0[0],
12U * sizeof(real_T));
/* InitializeConditions for RandomNumber: '<S3>/White Noise' */
for (iU = 0; iU < 40; iU++) {
y1 = floor(b747cl_P.WhiteNoise_Seed[iU]);
if (rtIsNaN(y1) || rtIsInf(y1)) {
y1 = 0.0;
} else {
y1 = fmod(y1, 4.294967296E+9);
}
tseed = y1 < 0.0 ? (uint32_T)-(int32_T)(uint32_T)-y1 : (uint32_T)y1;
r = (int32_T)(tseed >> 16U);
t = (int32_T)(tseed & 32768U);
tseed = ((((tseed - ((uint32_T)r << 16U)) + t) << 16U) + t) + r;
if (tseed < 1U) {
tseed = 1144108930U;
} else {
if (tseed > 2147483646U) {
tseed = 2147483646U;
}
}
y1 = rt_nrand_Upu32_Yd_f_pw_snf(&tseed) * b747cl_P.WhiteNoise_StdDev +
b747cl_P.WhiteNoise_Mean;
b747cl_DW.NextOutput[iU] = y1;
b747cl_DW.RandSeed[iU] = tseed;
}
/* End of InitializeConditions for RandomNumber: '<S3>/White Noise' */
/* InitializeConditions for DiscreteStateSpace: '<S36>/Discrete State-Space' */
b747cl_DW.DiscreteStateSpace_DSTATE = b747cl_P.IIR2_x0;
/* InitializeConditions for RateLimiter: '<S4>/Rate Limiter1' */
b747cl_DW.LastMajorTime = (rtInf);
/* InitializeConditions for DiscreteStateSpace: '<S37>/Discrete State-Space' */
b747cl_DW.DiscreteStateSpace_DSTATE_g = b747cl_P.IIR3_x0;
/* InitializeConditions for RateLimiter: '<S4>/Rate Limiter2' */
b747cl_DW.LastMajorTime_l = (rtInf);
/* InitializeConditions for DiscreteStateSpace: '<S38>/Discrete State-Space' */
b747cl_DW.DiscreteStateSpace_DSTATE_m = b747cl_P.IIR4_x0;
/* InitializeConditions for RateLimiter: '<S4>/Rate Limiter3' */
b747cl_DW.LastMajorTime_e = (rtInf);
/* InitializeConditions for DiscreteStateSpace: '<S35>/Discrete State-Space' */
b747cl_DW.DiscreteStateSpace_DSTATE_d = b747cl_P.IIR1_x0;
}
}
/* Model terminate function */
static void b747cl_terminate(void)
{
/* (no terminate code required) */
}
/*========================================================================*
* Start of Classic call interface *
*========================================================================*/
void MdlOutputs(int_T tid)
{
b747cl_output();
UNUSED_PARAMETER(tid);
}
void MdlUpdate(int_T tid)
{
b747cl_update();
UNUSED_PARAMETER(tid);
}
void MdlInitializeSizes(void)
{
}
void MdlInitializeSampleTimes(void)
{
}
void MdlInitialize(void)
{
}
void MdlStart(void)
{
b747cl_initialize();
}
void MdlTerminate(void)
{
b747cl_terminate();
}
/* Registration function */
RT_MODEL_b747cl_T *b747cl(void)
{
/* Registration code */
/* initialize non-finites */
rt_InitInfAndNaN(sizeof(real_T));
/* initialize real-time model */
(void) memset((void *)b747cl_M, 0,
sizeof(RT_MODEL_b747cl_T));
{
/* Setup solver object */
rtsiSetSimTimeStepPtr(&b747cl_M->solverInfo, &b747cl_M->Timing.simTimeStep);
rtsiSetTPtr(&b747cl_M->solverInfo, &rtmGetTPtr(b747cl_M));
rtsiSetStepSizePtr(&b747cl_M->solverInfo, &b747cl_M->Timing.stepSize0);
rtsiSetErrorStatusPtr(&b747cl_M->solverInfo, (&rtmGetErrorStatus(b747cl_M)));
rtsiSetRTModelPtr(&b747cl_M->solverInfo, b747cl_M);
}
rtsiSetSimTimeStep(&b747cl_M->solverInfo, MAJOR_TIME_STEP);
rtsiSetSolverName(&b747cl_M->solverInfo,"FixedStepDiscrete");
/* Initialize timing info */
{
int_T *mdlTsMap = b747cl_M->Timing.sampleTimeTaskIDArray;
mdlTsMap[0] = 0;
mdlTsMap[1] = 1;
b747cl_M->Timing.sampleTimeTaskIDPtr = (&mdlTsMap[0]);
b747cl_M->Timing.sampleTimes = (&b747cl_M->Timing.sampleTimesArray[0]);
b747cl_M->Timing.offsetTimes = (&b747cl_M->Timing.offsetTimesArray[0]);
/* task periods */
b747cl_M->Timing.sampleTimes[0] = (0.0);
b747cl_M->Timing.sampleTimes[1] = (0.05);
/* task offsets */
b747cl_M->Timing.offsetTimes[0] = (0.0);
b747cl_M->Timing.offsetTimes[1] = (0.0);
}
rtmSetTPtr(b747cl_M, &b747cl_M->Timing.tArray[0]);
{
int_T *mdlSampleHits = b747cl_M->Timing.sampleHitArray;
mdlSampleHits[0] = 1;
mdlSampleHits[1] = 1;
b747cl_M->Timing.sampleHits = (&mdlSampleHits[0]);
}
rtmSetTFinal(b747cl_M, 30.0);
b747cl_M->Timing.stepSize0 = 0.05;
b747cl_M->Timing.stepSize1 = 0.05;
/* Setup for data logging */
{
static RTWLogInfo rt_DataLoggingInfo;
rt_DataLoggingInfo.loggingInterval = NULL;
b747cl_M->rtwLogInfo = &rt_DataLoggingInfo;
}
/* Setup for data logging */
{
rtliSetLogXSignalInfo(b747cl_M->rtwLogInfo, (NULL));
rtliSetLogXSignalPtrs(b747cl_M->rtwLogInfo, (NULL));
rtliSetLogT(b747cl_M->rtwLogInfo, "");
rtliSetLogX(b747cl_M->rtwLogInfo, "");
rtliSetLogXFinal(b747cl_M->rtwLogInfo, "");
rtliSetLogVarNameModifier(b747cl_M->rtwLogInfo, "rt_");
rtliSetLogFormat(b747cl_M->rtwLogInfo, 0);
rtliSetLogMaxRows(b747cl_M->rtwLogInfo, 0);
rtliSetLogDecimation(b747cl_M->rtwLogInfo, 1);
rtliSetLogY(b747cl_M->rtwLogInfo, "");
rtliSetLogYSignalInfo(b747cl_M->rtwLogInfo, (NULL));
rtliSetLogYSignalPtrs(b747cl_M->rtwLogInfo, (NULL));
}
b747cl_M->solverInfoPtr = (&b747cl_M->solverInfo);
b747cl_M->Timing.stepSize = (0.05);
rtsiSetFixedStepSize(&b747cl_M->solverInfo, 0.05);
rtsiSetSolverMode(&b747cl_M->solverInfo, SOLVER_MODE_SINGLETASKING);
/* block I/O */
b747cl_M->ModelData.blockIO = ((void *) &b747cl_B);
(void) memset(((void *) &b747cl_B), 0,
sizeof(B_b747cl_T));
/* parameters */
b747cl_M->ModelData.defaultParam = ((real_T *)&b747cl_P);
/* states (dwork) */
b747cl_M->ModelData.dwork = ((void *) &b747cl_DW);
(void) memset((void *)&b747cl_DW, 0,
sizeof(DW_b747cl_T));
/* Initialize Sizes */
b747cl_M->Sizes.numContStates = (0); /* Number of continuous states */
b747cl_M->Sizes.numY = (0); /* Number of model outputs */
b747cl_M->Sizes.numU = (0); /* Number of model inputs */
b747cl_M->Sizes.sysDirFeedThru = (0);/* The model is not direct feedthrough */
b747cl_M->Sizes.numSampTimes = (2); /* Number of sample times */
b747cl_M->Sizes.numBlocks = (168); /* Number of blocks */
b747cl_M->Sizes.numBlockIO = (66); /* Number of block outputs */
b747cl_M->Sizes.numBlockPrms = (340);/* Sum of parameter "widths" */
return b747cl_M;
}
/*========================================================================*
* End of Classic call interface *
*========================================================================*/
|
[
"[email protected]"
] | |
e1b4fcd8ade715c3c08276a1fd4c4e734b283b55
|
8352d0e9d93b67b72e0a398c2e2fa5d6d8499cb9
|
/5.1/interfaces/openSSL/include/openssl/engine.h
|
b3b78080166943dea1b7f7d3597ac6d8217f3f6a
|
[] |
no_license
|
thunderZH963/exata-app
|
d561b4987864c501ba0aff6c8f166c9cc0f268b7
|
d158783613b91d5a4780a9973423029b1d64947c
|
refs/heads/main
| 2023-01-13T16:05:03.191297 | 2020-11-18T03:05:38 | 2020-11-18T03:05:38 | 313,181,752 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 41,733 |
h
|
/* openssl/engine.h */
/* Written by Geoff Thorpe ([email protected]) for the OpenSSL
* project 2000.
*/
/* ====================================================================
* Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* [email protected].
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* ([email protected]). This product includes software written by Tim
* Hudson ([email protected]).
*
*/
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
* ECDH support in OpenSSL originally developed by
* SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
*/
#ifndef HEADER_ENGINE_H
#define HEADER_ENGINE_H
#include <openssl/opensslconf.h>
#ifdef OPENSSL_NO_ENGINE
#error ENGINE is disabled.
#endif
#ifndef OPENSSL_NO_DEPRECATED
#include <openssl/bn.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif
#ifndef OPENSSL_NO_ECDH
#include <openssl/ecdh.h>
#endif
#ifndef OPENSSL_NO_ECDSA
#include <openssl/ecdsa.h>
#endif
#include <openssl/rand.h>
#include <openssl/ui.h>
#include <openssl/err.h>
#endif
#include <openssl/ossl_typ.h>
#include <openssl/symhacks.h>
#include <openssl/x509.h>
#ifdef __cplusplus
extern "C" {
#endif
/* These flags are used to control combinations of algorithm (methods)
* by bitwise "OR"ing. */
#define ENGINE_METHOD_RSA (unsigned int)0x0001
#define ENGINE_METHOD_DSA (unsigned int)0x0002
#define ENGINE_METHOD_DH (unsigned int)0x0004
#define ENGINE_METHOD_RAND (unsigned int)0x0008
#define ENGINE_METHOD_ECDH (unsigned int)0x0010
#define ENGINE_METHOD_ECDSA (unsigned int)0x0020
#define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
#define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
#define ENGINE_METHOD_STORE (unsigned int)0x0100
#define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200
#define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400
/* Obvious all-or-nothing cases. */
#define ENGINE_METHOD_ALL (unsigned int)0xFFFF
#define ENGINE_METHOD_NONE (unsigned int)0x0000
/* This(ese) flag(s) controls behaviour of the ENGINE_TABLE mechanism used
* internally to control registration of ENGINE implementations, and can be set
* by ENGINE_set_table_flags(). The "NOINIT" flag prevents attempts to
* initialise registered ENGINEs if they are not already initialised. */
#define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001
/* ENGINE flags that can be set by ENGINE_set_flags(). */
/* #define ENGINE_FLAGS_MALLOCED 0x0001 */ /* Not used */
/* This flag is for ENGINEs that wish to handle the various 'CMD'-related
* control commands on their own. Without this flag, ENGINE_ctrl() handles these
* control commands on behalf of the ENGINE using their "cmd_defns" data. */
#define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002
/* This flag is for ENGINEs who return new duplicate structures when found via
* "ENGINE_by_id()". When an ENGINE must store state (eg. if ENGINE_ctrl()
* commands are called in sequence as part of some stateful process like
* key-generation setup and execution), it can set this flag - then each attempt
* to obtain the ENGINE will result in it being copied into a new structure.
* Normally, ENGINEs don't declare this flag so ENGINE_by_id() just increments
* the existing ENGINE's structural reference count. */
#define ENGINE_FLAGS_BY_ID_COPY (int)0x0004
/* ENGINEs can support their own command types, and these flags are used in
* ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input each
* command expects. Currently only numeric and string input is supported. If a
* control command supports none of the _NUMERIC, _STRING, or _NO_INPUT options,
* then it is regarded as an "internal" control command - and not for use in
* config setting situations. As such, they're not available to the
* ENGINE_ctrl_cmd_string() function, only raw ENGINE_ctrl() access. Changes to
* this list of 'command types' should be reflected carefully in
* ENGINE_cmd_is_executable() and ENGINE_ctrl_cmd_string(). */
/* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */
#define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001
/* accepts string input (cast from 'void*' to 'const char *', 4th parameter to
* ENGINE_ctrl) */
#define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002
/* Indicates that the control command takes *no* input. Ie. the control command
* is unparameterised. */
#define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004
/* Indicates that the control command is internal. This control command won't
* be shown in any output, and is only usable through the ENGINE_ctrl_cmd()
* function. */
#define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008
/* NB: These 3 control commands are deprecated and should not be used. ENGINEs
* relying on these commands should compile conditional support for
* compatibility (eg. if these symbols are defined) but should also migrate the
* same functionality to their own ENGINE-specific control functions that can be
* "discovered" by calling applications. The fact these control commands
* wouldn't be "executable" (ie. usable by text-based config) doesn't change the
* fact that application code can find and use them without requiring per-ENGINE
* hacking. */
/* These flags are used to tell the ctrl function what should be done.
* All command numbers are shared between all engines, even if some don't
* make sense to some engines. In such a case, they do nothing but return
* the error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. */
#define ENGINE_CTRL_SET_LOGSTREAM 1
#define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2
#define ENGINE_CTRL_HUP 3 /* Close and reinitialise any
handles/connections etc. */
#define ENGINE_CTRL_SET_USER_INTERFACE 4 /* Alternative to callback */
#define ENGINE_CTRL_SET_CALLBACK_DATA 5 /* User-specific data, used
when calling the password
callback and the user
interface */
#define ENGINE_CTRL_LOAD_CONFIGURATION 6 /* Load a configuration, given
a string that represents a
file name or so */
#define ENGINE_CTRL_LOAD_SECTION 7 /* Load data from a given
section in the already loaded
configuration */
/* These control commands allow an application to deal with an arbitrary engine
* in a dynamic way. Warn: Negative return values indicate errors FOR THESE
* COMMANDS because zero is used to indicate 'end-of-list'. Other commands,
* including ENGINE-specific command types, return zero for an error.
*
* An ENGINE can choose to implement these ctrl functions, and can internally
* manage things however it chooses - it does so by setting the
* ENGINE_FLAGS_MANUAL_CMD_CTRL flag (using ENGINE_set_flags()). Otherwise the
* ENGINE_ctrl() code handles this on the ENGINE's behalf using the cmd_defns
* data (set using ENGINE_set_cmd_defns()). This means an ENGINE's ctrl()
* handler need only implement its own commands - the above "meta" commands will
* be taken care of. */
/* Returns non-zero if the supplied ENGINE has a ctrl() handler. If "not", then
* all the remaining control commands will return failure, so it is worth
* checking this first if the caller is trying to "discover" the engine's
* capabilities and doesn't want errors generated unnecessarily. */
#define ENGINE_CTRL_HAS_CTRL_FUNCTION 10
/* Returns a positive command number for the first command supported by the
* engine. Returns zero if no ctrl commands are supported. */
#define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11
/* The 'long' argument specifies a command implemented by the engine, and the
* return value is the next command supported, or zero if there are no more. */
#define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12
/* The 'void*' argument is a command name (cast from 'const char *'), and the
* return value is the command that corresponds to it. */
#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
/* The next two allow a command to be converted into its corresponding string
* form. In each case, the 'long' argument supplies the command. In the NAME_LEN
* case, the return value is the length of the command name (not counting a
* trailing EOL). In the NAME case, the 'void*' argument must be a string buffer
* large enough, and it will be populated with the name of the command (WITH a
* trailing EOL). */
#define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14
#define ENGINE_CTRL_GET_NAME_FROM_CMD 15
/* The next two are similar but give a "short description" of a command. */
#define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16
#define ENGINE_CTRL_GET_DESC_FROM_CMD 17
/* With this command, the return value is the OR'd combination of
* ENGINE_CMD_FLAG_*** values that indicate what kind of input a given
* engine-specific ctrl command expects. */
#define ENGINE_CTRL_GET_CMD_FLAGS 18
/* ENGINE implementations should start the numbering of their own control
* commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc). */
#define ENGINE_CMD_BASE 200
/* NB: These 2 nCipher "chil" control commands are deprecated, and their
* functionality is now available through ENGINE-specific control commands
* (exposed through the above-mentioned 'CMD'-handling). Code using these 2
* commands should be migrated to the more general command handling before these
* are removed. */
/* Flags specific to the nCipher "chil" engine */
#define ENGINE_CTRL_CHIL_SET_FORKCHECK 100
/* Depending on the value of the (long)i argument, this sets or
* unsets the SimpleForkCheck flag in the CHIL API to enable or
* disable checking and workarounds for applications that fork().
*/
#define ENGINE_CTRL_CHIL_NO_LOCKING 101
/* This prevents the initialisation function from providing mutex
* callbacks to the nCipher library. */
/* If an ENGINE supports its own specific control commands and wishes the
* framework to handle the above 'ENGINE_CMD_***'-manipulation commands on its
* behalf, it should supply a null-terminated array of ENGINE_CMD_DEFN entries
* to ENGINE_set_cmd_defns(). It should also implement a ctrl() handler that
* supports the stated commands (ie. the "cmd_num" entries as described by the
* array). NB: The array must be ordered in increasing order of cmd_num.
* "null-terminated" means that the last ENGINE_CMD_DEFN element has cmd_num set
* to zero and/or cmd_name set to NULL. */
typedef struct ENGINE_CMD_DEFN_st
{
unsigned int cmd_num; /* The command number */
const char *cmd_name; /* The command name itself */
const char *cmd_desc; /* A short description of the command */
unsigned int cmd_flags; /* The input the command expects */
} ENGINE_CMD_DEFN;
/* Generic function pointer */
typedef int (*ENGINE_GEN_FUNC_PTR)(void);
/* Generic function pointer taking no arguments */
typedef int (*ENGINE_GEN_INT_FUNC_PTR)(ENGINE *);
/* Specific control function pointer */
typedef int (*ENGINE_CTRL_FUNC_PTR)(ENGINE *, int, long, void *, void (*f)(void));
/* Generic load_key function pointer */
typedef EVP_PKEY * (*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *,
UI_METHOD *ui_method, void *callback_data);
typedef int (*ENGINE_SSL_CLIENT_CERT_PTR)(ENGINE *, SSL *ssl,
STACK_OF(X509_NAME) *ca_dn, X509 **pcert, EVP_PKEY **pkey,
STACK_OF(X509) **pother, UI_METHOD *ui_method, void *callback_data);
/* These callback types are for an ENGINE's handler for cipher and digest logic.
* These handlers have these prototypes;
* int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid);
* int foo(ENGINE *e, const EVP_MD **digest, const int **nids, int nid);
* Looking at how to implement these handlers in the case of cipher support, if
* the framework wants the EVP_CIPHER for 'nid', it will call;
* foo(e, &p_evp_cipher, NULL, nid); (return zero for failure)
* If the framework wants a list of supported 'nid's, it will call;
* foo(e, NULL, &p_nids, 0); (returns number of 'nids' or -1 for error)
*/
/* Returns to a pointer to the array of supported cipher 'nid's. If the second
* parameter is non-NULL it is set to the size of the returned array. */
typedef int (*ENGINE_CIPHERS_PTR)(ENGINE *, const EVP_CIPHER **, const int **, int);
typedef int (*ENGINE_DIGESTS_PTR)(ENGINE *, const EVP_MD **, const int **, int);
typedef int (*ENGINE_PKEY_METHS_PTR)(ENGINE *, EVP_PKEY_METHOD **, const int **, int);
typedef int (*ENGINE_PKEY_ASN1_METHS_PTR)(ENGINE *, EVP_PKEY_ASN1_METHOD **, const int **, int);
/* STRUCTURE functions ... all of these functions deal with pointers to ENGINE
* structures where the pointers have a "structural reference". This means that
* their reference is to allowed access to the structure but it does not imply
* that the structure is functional. To simply increment or decrement the
* structural reference count, use ENGINE_by_id and ENGINE_free. NB: This is not
* required when iterating using ENGINE_get_next as it will automatically
* decrement the structural reference count of the "current" ENGINE and
* increment the structural reference count of the ENGINE it returns (unless it
* is NULL). */
/* Get the first/last "ENGINE" type available. */
ENGINE *ENGINE_get_first(void);
ENGINE *ENGINE_get_last(void);
/* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */
ENGINE *ENGINE_get_next(ENGINE *e);
ENGINE *ENGINE_get_prev(ENGINE *e);
/* Add another "ENGINE" type into the array. */
int ENGINE_add(ENGINE *e);
/* Remove an existing "ENGINE" type from the array. */
int ENGINE_remove(ENGINE *e);
/* Retrieve an engine from the list by its unique "id" value. */
ENGINE *ENGINE_by_id(const char *id);
/* Add all the built-in engines. */
void ENGINE_load_openssl(void);
void ENGINE_load_dynamic(void);
#ifndef OPENSSL_NO_STATIC_ENGINE
void ENGINE_load_4758cca(void);
void ENGINE_load_aep(void);
void ENGINE_load_atalla(void);
void ENGINE_load_chil(void);
void ENGINE_load_cswift(void);
void ENGINE_load_nuron(void);
void ENGINE_load_sureware(void);
void ENGINE_load_ubsec(void);
void ENGINE_load_padlock(void);
void ENGINE_load_capi(void);
#ifndef OPENSSL_NO_GMP
void ENGINE_load_gmp(void);
#endif
#ifndef OPENSSL_NO_GOST
void ENGINE_load_gost(void);
#endif
#endif
void ENGINE_load_cryptodev(void);
void ENGINE_load_builtin_engines(void);
/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation
* "registry" handling. */
unsigned int ENGINE_get_table_flags(void);
void ENGINE_set_table_flags(unsigned int flags);
/* Manage registration of ENGINEs per "table". For each type, there are 3
* functions;
* ENGINE_register_***(e) - registers the implementation from 'e' (if it has one)
* ENGINE_unregister_***(e) - unregister the implementation from 'e'
* ENGINE_register_all_***() - call ENGINE_register_***() for each 'e' in the list
* Cleanup is automatically registered from each table when required, so
* ENGINE_cleanup() will reverse any "register" operations. */
int ENGINE_register_RSA(ENGINE *e);
void ENGINE_unregister_RSA(ENGINE *e);
void ENGINE_register_all_RSA(void);
int ENGINE_register_DSA(ENGINE *e);
void ENGINE_unregister_DSA(ENGINE *e);
void ENGINE_register_all_DSA(void);
int ENGINE_register_ECDH(ENGINE *e);
void ENGINE_unregister_ECDH(ENGINE *e);
void ENGINE_register_all_ECDH(void);
int ENGINE_register_ECDSA(ENGINE *e);
void ENGINE_unregister_ECDSA(ENGINE *e);
void ENGINE_register_all_ECDSA(void);
int ENGINE_register_DH(ENGINE *e);
void ENGINE_unregister_DH(ENGINE *e);
void ENGINE_register_all_DH(void);
int ENGINE_register_RAND(ENGINE *e);
void ENGINE_unregister_RAND(ENGINE *e);
void ENGINE_register_all_RAND(void);
int ENGINE_register_STORE(ENGINE *e);
void ENGINE_unregister_STORE(ENGINE *e);
void ENGINE_register_all_STORE(void);
int ENGINE_register_ciphers(ENGINE *e);
void ENGINE_unregister_ciphers(ENGINE *e);
void ENGINE_register_all_ciphers(void);
int ENGINE_register_digests(ENGINE *e);
void ENGINE_unregister_digests(ENGINE *e);
void ENGINE_register_all_digests(void);
int ENGINE_register_pkey_meths(ENGINE *e);
void ENGINE_unregister_pkey_meths(ENGINE *e);
void ENGINE_register_all_pkey_meths(void);
int ENGINE_register_pkey_asn1_meths(ENGINE *e);
void ENGINE_unregister_pkey_asn1_meths(ENGINE *e);
void ENGINE_register_all_pkey_asn1_meths(void);
/* These functions register all support from the above categories. Note, use of
* these functions can result in static linkage of code your application may not
* need. If you only need a subset of functionality, consider using more
* selective initialisation. */
int ENGINE_register_complete(ENGINE *e);
int ENGINE_register_all_complete(void);
/* Send parametrised control commands to the engine. The possibilities to send
* down an integer, a pointer to data or a function pointer are provided. Any of
* the parameters may or may not be NULL, depending on the command number. In
* actuality, this function only requires a structural (rather than functional)
* reference to an engine, but many control commands may require the engine be
* functional. The caller should be aware of trying commands that require an
* operational ENGINE, and only use functional references in such situations. */
int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
/* This function tests if an ENGINE-specific command is usable as a "setting".
* Eg. in an application's config file that gets processed through
* ENGINE_ctrl_cmd_string(). If this returns zero, it is not available to
* ENGINE_ctrl_cmd_string(), only ENGINE_ctrl(). */
int ENGINE_cmd_is_executable(ENGINE *e, int cmd);
/* This function works like ENGINE_ctrl() with the exception of taking a
* command name instead of a command number, and can handle optional commands.
* See the comment on ENGINE_ctrl_cmd_string() for an explanation on how to
* use the cmd_name and cmd_optional. */
int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
long i, void *p, void (*f)(void), int cmd_optional);
/* This function passes a command-name and argument to an ENGINE. The cmd_name
* is converted to a command number and the control command is called using
* 'arg' as an argument (unless the ENGINE doesn't support such a command, in
* which case no control command is called). The command is checked for input
* flags, and if necessary the argument will be converted to a numeric value. If
* cmd_optional is non-zero, then if the ENGINE doesn't support the given
* cmd_name the return value will be success anyway. This function is intended
* for applications to use so that users (or config files) can supply
* engine-specific config data to the ENGINE at run-time to control behaviour of
* specific engines. As such, it shouldn't be used for calling ENGINE_ctrl()
* functions that return data, deal with binary data, or that are otherwise
* supposed to be used directly through ENGINE_ctrl() in application code. Any
* "return" data from an ENGINE_ctrl() operation in this function will be lost -
* the return value is interpreted as failure if the return value is zero,
* success otherwise, and this function returns a boolean value as a result. In
* other words, vendors of 'ENGINE'-enabled devices should write ENGINE
* implementations with parameterisations that work in this scheme, so that
* compliant ENGINE-based applications can work consistently with the same
* configuration for the same ENGINE-enabled devices, across applications. */
int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
int cmd_optional);
/* These functions are useful for manufacturing new ENGINE structures. They
* don't address reference counting at all - one uses them to populate an ENGINE
* structure with personalised implementations of things prior to using it
* directly or adding it to the builtin ENGINE list in OpenSSL. These are also
* here so that the ENGINE structure doesn't have to be exposed and break binary
* compatibility! */
ENGINE *ENGINE_new(void);
int ENGINE_free(ENGINE *e);
int ENGINE_up_ref(ENGINE *e);
int ENGINE_set_id(ENGINE *e, const char *id);
int ENGINE_set_name(ENGINE *e, const char *name);
int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth);
int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth);
int ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth);
int ENGINE_set_ECDSA(ENGINE *e, const ECDSA_METHOD *ecdsa_meth);
int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth);
int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth);
int ENGINE_set_STORE(ENGINE *e, const STORE_METHOD *store_meth);
int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f);
int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);
int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);
int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f);
int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);
int ENGINE_set_load_ssl_client_cert_function(ENGINE *e,
ENGINE_SSL_CLIENT_CERT_PTR loadssl_f);
int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);
int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f);
int ENGINE_set_flags(ENGINE *e, int flags);
int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
/* These functions allow control over any per-structure ENGINE data. */
int ENGINE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
void *ENGINE_get_ex_data(const ENGINE *e, int idx);
/* This function cleans up anything that needs it. Eg. the ENGINE_add() function
* automatically ensures the list cleanup function is registered to be called
* from ENGINE_cleanup(). Similarly, all ENGINE_register_*** functions ensure
* ENGINE_cleanup() will clean up after them. */
void ENGINE_cleanup(void);
/* These return values from within the ENGINE structure. These can be useful
* with functional references as well as structural references - it depends
* which you obtained. Using the result for functional purposes if you only
* obtained a structural reference may be problematic! */
const char *ENGINE_get_id(const ENGINE *e);
const char *ENGINE_get_name(const ENGINE *e);
const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e);
const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e);
const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e);
const ECDSA_METHOD *ENGINE_get_ECDSA(const ENGINE *e);
const DH_METHOD *ENGINE_get_DH(const ENGINE *e);
const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e);
const STORE_METHOD *ENGINE_get_STORE(const ENGINE *e);
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e);
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);
ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e);
ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e);
ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);
ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e);
ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);
ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);
const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);
const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);
const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
const char *str, int len);
const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
const char *str, int len);
const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
int ENGINE_get_flags(const ENGINE *e);
/* FUNCTIONAL functions. These functions deal with ENGINE structures
* that have (or will) be initialised for use. Broadly speaking, the
* structural functions are useful for iterating the list of available
* engine types, creating new engine types, and other "list" operations.
* These functions actually deal with ENGINEs that are to be used. As
* such these functions can fail (if applicable) when particular
* engines are unavailable - eg. if a hardware accelerator is not
* attached or not functioning correctly. Each ENGINE has 2 reference
* counts; structural and functional. Every time a functional reference
* is obtained or released, a corresponding structural reference is
* automatically obtained or released too. */
/* Initialise a engine type for use (or up its reference count if it's
* already in use). This will fail if the engine is not currently
* operational and cannot initialise. */
int ENGINE_init(ENGINE *e);
/* Free a functional reference to a engine type. This does not require
* a corresponding call to ENGINE_free as it also releases a structural
* reference. */
int ENGINE_finish(ENGINE *e);
/* The following functions handle keys that are stored in some secondary
* location, handled by the engine. The storage may be on a card or
* whatever. */
EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
UI_METHOD *ui_method, void *callback_data);
EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
UI_METHOD *ui_method, void *callback_data);
int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s,
STACK_OF(X509_NAME) *ca_dn, X509 **pcert, EVP_PKEY **ppkey,
STACK_OF(X509) **pother,
UI_METHOD *ui_method, void *callback_data);
/* This returns a pointer for the current ENGINE structure that
* is (by default) performing any RSA operations. The value returned
* is an incremented reference, so it should be free'd (ENGINE_finish)
* before it is discarded. */
ENGINE *ENGINE_get_default_RSA(void);
/* Same for the other "methods" */
ENGINE *ENGINE_get_default_DSA(void);
ENGINE *ENGINE_get_default_ECDH(void);
ENGINE *ENGINE_get_default_ECDSA(void);
ENGINE *ENGINE_get_default_DH(void);
ENGINE *ENGINE_get_default_RAND(void);
/* These functions can be used to get a functional reference to perform
* ciphering or digesting corresponding to "nid". */
ENGINE *ENGINE_get_cipher_engine(int nid);
ENGINE *ENGINE_get_digest_engine(int nid);
ENGINE *ENGINE_get_pkey_meth_engine(int nid);
ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid);
/* This sets a new default ENGINE structure for performing RSA
* operations. If the result is non-zero (success) then the ENGINE
* structure will have had its reference count up'd so the caller
* should still free their own reference 'e'. */
int ENGINE_set_default_RSA(ENGINE *e);
int ENGINE_set_default_string(ENGINE *e, const char *def_list);
/* Same for the other "methods" */
int ENGINE_set_default_DSA(ENGINE *e);
int ENGINE_set_default_ECDH(ENGINE *e);
int ENGINE_set_default_ECDSA(ENGINE *e);
int ENGINE_set_default_DH(ENGINE *e);
int ENGINE_set_default_RAND(ENGINE *e);
int ENGINE_set_default_ciphers(ENGINE *e);
int ENGINE_set_default_digests(ENGINE *e);
int ENGINE_set_default_pkey_meths(ENGINE *e);
int ENGINE_set_default_pkey_asn1_meths(ENGINE *e);
/* The combination "set" - the flags are bitwise "OR"d from the
* ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()"
* function, this function can result in unnecessary static linkage. If your
* application requires only specific functionality, consider using more
* selective functions. */
int ENGINE_set_default(ENGINE *e, unsigned int flags);
void ENGINE_add_conf_module(void);
/* Deprecated functions ... */
/* int ENGINE_clear_defaults(void); */
/**************************/
/* DYNAMIC ENGINE SUPPORT */
/**************************/
/* Binary/behaviour compatibility levels */
#define OSSL_DYNAMIC_VERSION (unsigned long)0x00020000
/* Binary versions older than this are too old for us (whether we're a loader or
* a loadee) */
#define OSSL_DYNAMIC_OLDEST (unsigned long)0x00020000
/* When compiling an ENGINE entirely as an external shared library, loadable by
* the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' structure
* type provides the calling application's (or library's) error functionality
* and memory management function pointers to the loaded library. These should
* be used/set in the loaded library code so that the loading application's
* 'state' will be used/changed in all operations. The 'static_state' pointer
* allows the loaded library to know if it shares the same static data as the
* calling application (or library), and thus whether these callbacks need to be
* set or not. */
typedef void *(*dyn_MEM_malloc_cb)(size_t);
typedef void *(*dyn_MEM_realloc_cb)(void *, size_t);
typedef void (*dyn_MEM_free_cb)(void *);
typedef struct st_dynamic_MEM_fns {
dyn_MEM_malloc_cb malloc_cb;
dyn_MEM_realloc_cb realloc_cb;
dyn_MEM_free_cb free_cb;
} dynamic_MEM_fns;
/* FIXME: Perhaps the memory and locking code (crypto.h) should declare and use
* these types so we (and any other dependant code) can simplify a bit?? */
typedef void (*dyn_lock_locking_cb)(int,int,const char *,int);
typedef int (*dyn_lock_add_lock_cb)(int*,int,int,const char *,int);
typedef struct CRYPTO_dynlock_value *(*dyn_dynlock_create_cb)(
const char *,int);
typedef void (*dyn_dynlock_lock_cb)(int,struct CRYPTO_dynlock_value *,
const char *,int);
typedef void (*dyn_dynlock_destroy_cb)(struct CRYPTO_dynlock_value *,
const char *,int);
typedef struct st_dynamic_LOCK_fns {
dyn_lock_locking_cb lock_locking_cb;
dyn_lock_add_lock_cb lock_add_lock_cb;
dyn_dynlock_create_cb dynlock_create_cb;
dyn_dynlock_lock_cb dynlock_lock_cb;
dyn_dynlock_destroy_cb dynlock_destroy_cb;
} dynamic_LOCK_fns;
/* The top-level structure */
typedef struct st_dynamic_fns {
void *static_state;
const ERR_FNS *err_fns;
const CRYPTO_EX_DATA_IMPL *ex_data_fns;
dynamic_MEM_fns mem_fns;
dynamic_LOCK_fns lock_fns;
} dynamic_fns;
/* The version checking function should be of this prototype. NB: The
* ossl_version value passed in is the OSSL_DYNAMIC_VERSION of the loading code.
* If this function returns zero, it indicates a (potential) version
* incompatibility and the loaded library doesn't believe it can proceed.
* Otherwise, the returned value is the (latest) version supported by the
* loading library. The loader may still decide that the loaded code's version
* is unsatisfactory and could veto the load. The function is expected to
* be implemented with the symbol name "v_check", and a default implementation
* can be fully instantiated with IMPLEMENT_DYNAMIC_CHECK_FN(). */
typedef unsigned long (*dynamic_v_check_fn)(unsigned long ossl_version);
#define IMPLEMENT_DYNAMIC_CHECK_FN() \
OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \
if (v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \
return 0; }
/* This function is passed the ENGINE structure to initialise with its own
* function and command settings. It should not adjust the structural or
* functional reference counts. If this function returns zero, (a) the load will
* be aborted, (b) the previous ENGINE state will be memcpy'd back onto the
* structure, and (c) the shared library will be unloaded. So implementations
* should do their own internal cleanup in failure circumstances otherwise they
* could leak. The 'id' parameter, if non-NULL, represents the ENGINE id that
* the loader is looking for. If this is NULL, the shared library can choose to
* return failure or to initialise a 'default' ENGINE. If non-NULL, the shared
* library must initialise only an ENGINE matching the passed 'id'. The function
* is expected to be implemented with the symbol name "bind_engine". A standard
* implementation can be instantiated with IMPLEMENT_DYNAMIC_BIND_FN(fn) where
* the parameter 'fn' is a callback function that populates the ENGINE structure
* and returns an int value (zero for failure). 'fn' should have prototype;
* [static] int fn(ENGINE *e, const char *id); */
typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
const dynamic_fns *fns);
#define IMPLEMENT_DYNAMIC_BIND_FN(fn) \
OPENSSL_EXPORT \
int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \
if (ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \
if (!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \
fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \
return 0; \
CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \
CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \
CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \
CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \
CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \
if (!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \
return 0; \
if (!ERR_set_implementation(fns->err_fns)) return 0; \
skip_cbs: \
if (!fn(e,id)) return 0; \
return 1; }
/* If the loading application (or library) and the loaded ENGINE library share
* the same static data (eg. they're both dynamically linked to the same
* libcrypto.so) we need a way to avoid trying to set system callbacks - this
* would fail, and for the same reason that it's unnecessary to try. If the
* loaded ENGINE has (or gets from through the loader) its own copy of the
* libcrypto static data, we will need to set the callbacks. The easiest way to
* detect this is to have a function that returns a pointer to some static data
* and let the loading application and loaded ENGINE compare their respective
* values. */
void *ENGINE_get_static_state(void);
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
void ENGINE_setup_bsd_cryptodev(void);
#endif
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
*/
void ERR_load_ENGINE_strings(void);
/* Error codes for the ENGINE functions. */
/* Function codes. */
#define ENGINE_F_DYNAMIC_CTRL 180
#define ENGINE_F_DYNAMIC_GET_DATA_CTX 181
#define ENGINE_F_DYNAMIC_LOAD 182
#define ENGINE_F_DYNAMIC_SET_DATA_CTX 183
#define ENGINE_F_ENGINE_ADD 105
#define ENGINE_F_ENGINE_BY_ID 106
#define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 170
#define ENGINE_F_ENGINE_CTRL 142
#define ENGINE_F_ENGINE_CTRL_CMD 178
#define ENGINE_F_ENGINE_CTRL_CMD_STRING 171
#define ENGINE_F_ENGINE_FINISH 107
#define ENGINE_F_ENGINE_FREE_UTIL 108
#define ENGINE_F_ENGINE_GET_CIPHER 185
#define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177
#define ENGINE_F_ENGINE_GET_DIGEST 186
#define ENGINE_F_ENGINE_GET_NEXT 115
#define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 193
#define ENGINE_F_ENGINE_GET_PKEY_METH 192
#define ENGINE_F_ENGINE_GET_PREV 116
#define ENGINE_F_ENGINE_INIT 119
#define ENGINE_F_ENGINE_LIST_ADD 120
#define ENGINE_F_ENGINE_LIST_REMOVE 121
#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150
#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151
#define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 194
#define ENGINE_F_ENGINE_NEW 122
#define ENGINE_F_ENGINE_REMOVE 123
#define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189
#define ENGINE_F_ENGINE_SET_DEFAULT_TYPE 126
#define ENGINE_F_ENGINE_SET_ID 129
#define ENGINE_F_ENGINE_SET_NAME 130
#define ENGINE_F_ENGINE_TABLE_REGISTER 184
#define ENGINE_F_ENGINE_UNLOAD_KEY 152
#define ENGINE_F_ENGINE_UNLOCKED_FINISH 191
#define ENGINE_F_ENGINE_UP_REF 190
#define ENGINE_F_INT_CTRL_HELPER 172
#define ENGINE_F_INT_ENGINE_CONFIGURE 188
#define ENGINE_F_INT_ENGINE_MODULE_INIT 187
#define ENGINE_F_LOG_MESSAGE 141
/* Reason codes. */
#define ENGINE_R_ALREADY_LOADED 100
#define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133
#define ENGINE_R_CMD_NOT_EXECUTABLE 134
#define ENGINE_R_COMMAND_TAKES_INPUT 135
#define ENGINE_R_COMMAND_TAKES_NO_INPUT 136
#define ENGINE_R_CONFLICTING_ENGINE_ID 103
#define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119
#define ENGINE_R_DH_NOT_IMPLEMENTED 139
#define ENGINE_R_DSA_NOT_IMPLEMENTED 140
#define ENGINE_R_DSO_FAILURE 104
#define ENGINE_R_DSO_NOT_FOUND 132
#define ENGINE_R_ENGINES_SECTION_ERROR 148
#define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102
#define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105
#define ENGINE_R_ENGINE_SECTION_ERROR 149
#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128
#define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129
#define ENGINE_R_FINISH_FAILED 106
#define ENGINE_R_GET_HANDLE_FAILED 107
#define ENGINE_R_ID_OR_NAME_MISSING 108
#define ENGINE_R_INIT_FAILED 109
#define ENGINE_R_INTERNAL_LIST_ERROR 110
#define ENGINE_R_INVALID_ARGUMENT 143
#define ENGINE_R_INVALID_CMD_NAME 137
#define ENGINE_R_INVALID_CMD_NUMBER 138
#define ENGINE_R_INVALID_INIT_VALUE 151
#define ENGINE_R_INVALID_STRING 150
#define ENGINE_R_NOT_INITIALISED 117
#define ENGINE_R_NOT_LOADED 112
#define ENGINE_R_NO_CONTROL_FUNCTION 120
#define ENGINE_R_NO_INDEX 144
#define ENGINE_R_NO_LOAD_FUNCTION 125
#define ENGINE_R_NO_REFERENCE 130
#define ENGINE_R_NO_SUCH_ENGINE 116
#define ENGINE_R_NO_UNLOAD_FUNCTION 126
#define ENGINE_R_PROVIDE_PARAMETERS 113
#define ENGINE_R_RSA_NOT_IMPLEMENTED 141
#define ENGINE_R_UNIMPLEMENTED_CIPHER 146
#define ENGINE_R_UNIMPLEMENTED_DIGEST 147
#define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101
#define ENGINE_R_VERSION_INCOMPATIBILITY 145
#ifdef __cplusplus
}
#endif
#endif
|
[
"[email protected]"
] | |
2590f730f4698fa86233afacdd8701d4a2d4520d
|
4d0db586e0c2f5bc90876880c8ba8551d604b0d3
|
/Temp/StagingArea/Data/il2cppOutput/t1210MD.h
|
b9bfcdf6f484495060a9e3024e9b2afcd980b5e1
|
[] |
no_license
|
Dwarph/SpaceInvaders
|
3ba670da67f962e13aa6d7532d444a379ce36b93
|
59625044233e8b85fbb3849b07f9e6fcbf64bd01
|
refs/heads/master
| 2021-01-18T20:27:42.523283 | 2018-03-03T16:24:13 | 2018-03-03T16:24:13 | 72,147,597 | 1 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 432 |
h
|
#pragma once
#include <stdint.h>
#include <assert.h>
#include <exception>
#include "codegen/il2cpp-codegen.h"
struct t1210;
struct t1208;
#include "t1209.h"
extern "C" t1208 * m5170 (t7 * __this , int32_t p0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
extern "C" t1208 * m5171 (t7 * __this , const MethodInfo* method) IL2CPP_METHOD_ATTR;
extern "C" t1208 * m5172 (t7 * __this , const MethodInfo* method) IL2CPP_METHOD_ATTR;
|
[
"[email protected]"
] | |
e7f39d0dae7552d925a8df96889d8c844b430e75
|
a073ba435ac5ac987c16abe5fd1491ac24be9cbd
|
/sjtwo-c/toolchains/windows/mingw/include/oleacc.h
|
bed683a937b9a887b382fa3da145213028cca9d6
|
[] |
no_license
|
ChrisFSF/CMPE146-MP3-project
|
f2fb34c89e84126b67ef184dfaa966a122a63c9b
|
e1f40417d0a98521dba06e0b7c169cecb4aa6340
|
refs/heads/master
| 2023-02-09T06:15:42.240261 | 2021-01-07T01:48:20 | 2021-01-07T01:48:20 | 261,683,682 | 4 | 2 | null | 2020-05-08T21:08:42 | 2020-05-06T07:28:23 |
C++
|
UTF-8
|
C
| false | false | 8,460 |
h
|
#ifndef _OLEACC_H
#define _OLEACC_H
#if __GNUC__ >=3
#pragma GCC system_header
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define DISPID_ACC_PARENT (-5000)
#define DISPID_ACC_CHILDCOUNT (-5001)
#define DISPID_ACC_CHILD (-5002)
#define DISPID_ACC_NAME (-5003)
#define DISPID_ACC_VALUE (-5004)
#define DISPID_ACC_DESCRIPTION (-5005)
#define DISPID_ACC_ROLE (-5006)
#define DISPID_ACC_STATE (-5007)
#define DISPID_ACC_HELP (-5008)
#define DISPID_ACC_HELPTOPIC (-5009)
#define DISPID_ACC_KEYBOARDSHORTCUT (-5010)
#define DISPID_ACC_FOCUS (-5011)
#define DISPID_ACC_SELECTION (-5012)
#define DISPID_ACC_DEFAULTACTION (-5013)
#define DISPID_ACC_SELECT (-5014)
#define DISPID_ACC_LOCATION (-5015)
#define DISPID_ACC_NAVIGATE (-5016)
#define DISPID_ACC_HITTEST (-5017)
#define DISPID_ACC_DODEFAULTACTION (-5018)
#define NAVDIR_DOWN 2
#define NAVDIR_FIRSTCHILD 7
#define NAVDIR_LASTCHILD 8
#define NAVDIR_LEFT 3
#define NAVDIR_NEXT 5
#define NAVDIR_PREVIOUS 6
#define NAVDIR_RIGHT 4
#define NAVDIR_UP 1
#define ROLE_SYSTEM_ALERT 8
#define ROLE_SYSTEM_ANIMATION 54
#define ROLE_SYSTEM_APPLICATION 14
#define ROLE_SYSTEM_BORDER 19
#define ROLE_SYSTEM_BUTTONDROPDOWN 56
#define ROLE_SYSTEM_BUTTONDROPDOWNGRID 58
#define ROLE_SYSTEM_BUTTONMENU 57
#define ROLE_SYSTEM_CARET 7
#define ROLE_SYSTEM_CELL 29
#define ROLE_SYSTEM_CHARACTER 32
#define ROLE_SYSTEM_CHART 17
#define ROLE_SYSTEM_CHECKBUTTON 44
#define ROLE_SYSTEM_CLIENT 10
#define ROLE_SYSTEM_CLOCK 61
#define ROLE_SYSTEM_COLUMN 27
#define ROLE_SYSTEM_COLUMNHEADER 25
#define ROLE_SYSTEM_COMBOBOX 46
#define ROLE_SYSTEM_CURSOR 6
#define ROLE_SYSTEM_DIAGRAM 53
#define ROLE_SYSTEM_DIAL 49
#define ROLE_SYSTEM_DIALOG 18
#define ROLE_SYSTEM_DOCUMENT 15
#define ROLE_SYSTEM_DROPLIST 47
#define ROLE_SYSTEM_EQUATION 55
#define ROLE_SYSTEM_GRAPHIC 40
#define ROLE_SYSTEM_GRIP 4
#define ROLE_SYSTEM_GROUPING 20
#define ROLE_SYSTEM_HELPBALLOON 31
#define ROLE_SYSTEM_HOTKEYFIELD 50
#define ROLE_SYSTEM_INDICATOR 39
#define ROLE_SYSTEM_LINK 30
#define ROLE_SYSTEM_LIST 33
#define ROLE_SYSTEM_LISTITEM 34
#define ROLE_SYSTEM_MENUBAR 2
#define ROLE_SYSTEM_MENUITEM 12
#define ROLE_SYSTEM_MENUPOPUP 11
#define ROLE_SYSTEM_OUTLINE 35
#define ROLE_SYSTEM_OUTLINEITEM 36
#define ROLE_SYSTEM_PAGETAB 37
#define ROLE_SYSTEM_PAGETABLIST 60
#define ROLE_SYSTEM_PANE 16
#define ROLE_SYSTEM_PROGRESSBAR 48
#define ROLE_SYSTEM_PROPERTYPAGE 38
#define ROLE_SYSTEM_PUSHBUTTON 43
#define ROLE_SYSTEM_RADIOBUTTON 45
#define ROLE_SYSTEM_ROW 28
#define ROLE_SYSTEM_ROWHEADER 26
#define ROLE_SYSTEM_SCROLLBAR 3
#define ROLE_SYSTEM_SEPARATOR 21
#define ROLE_SYSTEM_SLIDER 51
#define ROLE_SYSTEM_SOUND 5
#define ROLE_SYSTEM_SPINBUTTON 52
#define ROLE_SYSTEM_STATICTEXT 41
#define ROLE_SYSTEM_STATUSBAR 23
#define ROLE_SYSTEM_TABLE 24
#define ROLE_SYSTEM_TEXT 42
#define ROLE_SYSTEM_TITLEBAR 1
#define ROLE_SYSTEM_TOOLBAR 22
#define ROLE_SYSTEM_TOOLTIP 13
#define ROLE_SYSTEM_WHITESPACE 59
#define ROLE_SYSTEM_WINDOW 9
#define STATE_SYSTEM_UNAVAILABLE 0x00000001
#define STATE_SYSTEM_SELECTED 0x00000002
#define STATE_SYSTEM_FOCUSED 0x00000004
#define STATE_SYSTEM_PRESSED 0x00000008
#define STATE_SYSTEM_CHECKED 0x00000010
#define STATE_SYSTEM_MIXED 0x00000020
#define STATE_SYSTEM_READONLY 0x00000040
#define STATE_SYSTEM_HOTTRACKED 0x00000080
#define STATE_SYSTEM_DEFAULT 0x00000100
#define STATE_SYSTEM_EXPANDED 0x00000200
#define STATE_SYSTEM_COLLAPSED 0x00000400
#define STATE_SYSTEM_BUSY 0x00000800
#define STATE_SYSTEM_FLOATING 0x00001000
#define STATE_SYSTEM_MARQUEED 0x00002000
#define STATE_SYSTEM_ANIMATED 0x00004000
#define STATE_SYSTEM_INVISIBLE 0x00008000
#define STATE_SYSTEM_OFFSCREEN 0x00010000
#define STATE_SYSTEM_SIZEABLE 0x00020000
#define STATE_SYSTEM_MOVEABLE 0x00040000
#define STATE_SYSTEM_SELFVOICING 0x00080000
#define STATE_SYSTEM_FOCUSABLE 0x00100000
#define STATE_SYSTEM_SELECTABLE 0x00200000
#define STATE_SYSTEM_LINKED 0x00400000
#define STATE_SYSTEM_TRAVERSED 0x00800000
#define STATE_SYSTEM_MULTISELECTABLE 0x01000000
#define STATE_SYSTEM_EXTSELECTABLE 0x02000000
#define STATE_SYSTEM_ALERT_LOW 0x04000000
#define STATE_SYSTEM_ALERT_MEDIUM 0x08000000
#define STATE_SYSTEM_ALERT_HIGH 0x10000000
#define STATE_SYSTEM_VALID 0x1fffffff
/* http://opensource.adobe.com/wiki/display/flexsdk/Accessibility+for+Spark+Components */
#define STATE_SYSTEM_NORMAL 0x00000000
#define STATE_SYSTEM_PROTECTED 0x20000000
#define STATE_SYSTEM_HASPOPUP 0x40000000
typedef enum tagSELFLAG
{
SELFLAG_NONE = 0,
SELFLAG_TAKEFOCUS = 1,
SELFLAG_TAKESELECTION = 2,
SELFLAG_EXTENDSELECTION = 4,
SELFLAG_ADDSELECTION = 8,
SELFLAG_REMOVESELECTION = 16
} SELFLAG;
#define SELFLAG_VALID 0x0000001F
/* DEFINE_GUID(LIBID_Accessibility, 0x1ea4dbf0, 0x3c3b,0x11cf, 0x81, 0x0c, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); */
/* DEFINE_GUID(IID_IAccessible, 0x618736e0, 0x3c3d,0x11cf, 0x81, 0x0c, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); */
EXTERN_C const IID LIBID_Accessibility;
EXTERN_C const IID IID_IAccessible;
#define INTERFACE IAccessible
DECLARE_INTERFACE_(IAccessible, IDispatch)
{
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
STDMETHOD(get_accParent)(THIS_ IDispatch**) PURE;
STDMETHOD(get_accChildCount)(THIS_ long*) PURE;
STDMETHOD(get_accChild)(THIS_ VARIANT, IDispatch **) PURE;
STDMETHOD(get_accName)(THIS_ VARIANT, BSTR*) PURE;
STDMETHOD(get_accValue)(THIS_ VARIANT, BSTR*) PURE;
STDMETHOD(get_accDescription)(THIS_ VARIANT, BSTR*) PURE;
STDMETHOD(get_accRole)(THIS_ VARIANT, VARIANT*) PURE;
STDMETHOD(get_accState)(THIS_ VARIANT, VARIANT*) PURE;
STDMETHOD(get_accHelp)(THIS_ VARIANT, BSTR*) PURE;
STDMETHOD(get_accHelpTopic)(THIS_ BSTR*, VARIANT, long*) PURE;
STDMETHOD(get_accKeyboardShortcut)(THIS_ VARIANT, BSTR*) PURE;
STDMETHOD(get_accFocus)(THIS_ VARIANT*) PURE;
STDMETHOD(get_accSelection)(THIS_ VARIANT*) PURE;
STDMETHOD(get_accDefaultAction)(THIS_ VARIANT, BSTR*) PURE;
STDMETHOD(accSelect)(THIS_ long, VARIANT) PURE;
STDMETHOD(accLocation)(THIS_ long*, long*, long*, long*, VARIANT) PURE;
STDMETHOD(accNavigate)(THIS_ long, VARIANT, VARIANT*) PURE;
STDMETHOD(accHitTest)(THIS_ long, long, VARIANT*) PURE;
STDMETHOD(accDoDefaultAction)(THIS_ VARIANT) PURE;
STDMETHOD(put_accName)(THIS_ VARIANT, BSTR) PURE;
STDMETHOD(put_accValue)(THIS_ VARIANT, BSTR) PURE;
};
#undef INTERFACE
typedef IAccessible* LPACCESSIBLE;
STDAPI AccessibleChildren(IAccessible*,LONG,LONG,VARIANT*,LONG*);
STDAPI AccessibleObjectFromEvent(HWND,DWORD,DWORD,IAccessible**,VARIANT*);
STDAPI AccessibleObjectFromPoint(POINT,IAccessible**,VARIANT*);
STDAPI AccessibleObjectFromWindow(HWND,DWORD,REFIID,void**);
STDAPI CreateStdAccessibleObject(HWND,LONG,REFIID,void**);
STDAPI CreateStdAccessibleProxyA(HWND,LPCSTR,LONG,REFIID,void**);
STDAPI CreateStdAccessibleProxyW(HWND,LPCWSTR,LONG,REFIID,void**);
void WINAPI GetOleaccVersionInfo(DWORD*,DWORD*);
UINT WINAPI GetRoleTextA(DWORD,LPSTR,UINT);
UINT WINAPI GetRoleTextW(DWORD,LPWSTR,UINT);
UINT WINAPI GetStateTextA(DWORD,LPSTR,UINT);
UINT WINAPI GetStateTextW(DWORD,LPWSTR,UINT);
LRESULT WINAPI LresultFromObject(REFIID,WPARAM,LPUNKNOWN);
STDAPI ObjectFromLresult(LRESULT,REFIID,WPARAM,void**);
STDAPI WindowFromAccessibleObject(IAccessible*,HWND*);
#ifdef UNICODE
#define CreateStdAccessibleProxy CreateStdAccessibleProxyW
#define GetRoleText GetRoleTextW
#define GetStateText GetStateTextW
#else
#define CreateStdAccessibleProxy CreateStdAccessibleProxyA
#define GetRoleText GetRoleTextA
#define GetStateText GetStateTextA
#endif
#ifdef __cplusplus
}
#endif
#endif /* _OLEACC_H */
|
[
"[email protected]"
] | |
bbba760e3fbbf772ba255cdfeb4595979a7d496e
|
6f2eccc98594abb6f1d811a89d438f2b46207370
|
/2/program_practice_2_6.c
|
417b0e2adeb4ecb506c833e79914452bc89c3181
|
[] |
no_license
|
octay/program_practice_hdu
|
1855bbc3dda0230882f57ba2e1f323724d3895b2
|
8da1d0279fd9c20bc5672ca57a9203f5c0412ddb
|
refs/heads/main
| 2023-08-28T01:08:46.925721 | 2021-10-13T06:25:34 | 2021-10-13T06:25:34 | 354,863,776 | 8 | 3 | null | null | null | null |
UTF-8
|
C
| false | false | 3,026 |
c
|
# include<stdio.h>
# include<stdlib.h>
# define MAX 100
struct maze{
int r, c;
int inr, inc;
int outr, outc;
int map[MAX][MAX];
int count;
};
void initlist(struct maze *p, int r, int c, int inr, int inc, int outr, int outc);
void dfs(struct maze *p, int curr, int curc);
void print_map(struct maze *p);
void print_route(struct maze *p);
int main(int argc, char const *argv[]) {
struct maze *p = (struct maze *)malloc(sizeof(struct maze));
int r, c, inr, inc, outr, outc;
printf("input the pattern of maze and the coordinates of start and exit \n");
scanf("%d%d%d%d%d%d", &r, &c, &inr, &inc, &outr, &outc);
// r和c是从1开始计数的, 旨在记录行数和列数, 而坐标则从(0,0)开始.
initlist(p, r, c, inr, inc, outr, outc);
if(inr == outr && inc == outc) {
printf("the start and exit shouldn\'t be the same position \n");
exit(0);
}
printf("then input the whole maze \n");
printf("with 1 for obstacles and 0 for channels \n");
int i, j, n;
for(i = 0; i < r; i++) for(j = 0; j < c; j++){
scanf("%d", &n);
p -> map[i][j] = n;
}
if(p -> map[inr][inc] != 0 || p -> map[outr][outc] != 0){
printf("the start and exit shouldn\'t be obstacles \n");
exit(0);
}
dfs(p, inr, inc);
if(p -> count == 0) printf("find solution not \n");
return 0;
}
void initlist(struct maze *p, int r, int c, int inr, int inc, int outr, int outc){
p -> r = r;
p -> c = c;
p -> inr = inr;
p -> inc = inc;
p -> outr = outr;
p -> outc = outc;
p -> count = 0;
}
void dfs(struct maze *p, int curr, int curc){
if(curr == p -> outr && curc == p -> outc){
p -> count ++;
p -> map[curr][curc] = 2;
print_route(p);
// 也可选print_map()来打印
p -> map[curr][curc] = 0;
return;
}
else{
p -> map[curr][curc] = 2;
if (curr > 0 && p -> map[curr - 1][curc] == 0) dfs(p, curr - 1, curc);
if (curr < p -> r && p -> map[curr + 1][curc] == 0) dfs(p, curr + 1, curc);
if (curc > 0 && p -> map[curr][curc - 1] == 0) dfs(p, curr, curc - 1);
if (curr < p -> c && p -> map[curr][curc + 1] == 0) dfs(p, curr, curc + 1);
p -> map[curr][curc] = 0; // 从这里出发无法到达出口,或者在下一次规划路线时避开.
}
}
void print_map(struct maze *p){
int i, j;
printf("solution %d:\n", p -> count);
for(i = 0; i < p->r; i++){
for(j = 0;j < p -> c; j++) printf("%4d", p -> map[i][j]);
printf("\n");
}
putchar('\n');
}
void print_route(struct maze *p){
int i, j;
int route = 0, not_route = 1;
printf("solution %d:\n", p -> count);
for(i = 0; i < p->r; i++){
for(j = 0;j < p -> c; j++){
if(p -> map[i][j] == 2) printf("%4d", route);
else printf("%4d", not_route);
}
printf("\n");
}
putchar('\n');
}
|
[
"[email protected]"
] | |
0f73035f6ac17f00590ca2f5309faecb1a13254d
|
0811739e6df5d373a8765abb55b3ca107752d406
|
/new_emi/25.c
|
b6881e4cb1d1ccbd26bc54ba1e0a075226073998
|
[] |
no_license
|
hz90937880/NewDecFuzzer
|
12981d53dd64e9a4ef881d4879b7abb3050ff849
|
dcef22907354415c0f4fdce8a102f0dc71844eba
|
refs/heads/master
| 2023-04-15T18:04:11.235871 | 2021-03-25T21:32:01 | 2021-03-25T21:32:01 | 351,564,252 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 8,395 |
c
|
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.3.0
* Git version: unknown
* Options: --no-arrays --no-structs --no-unions --no-safe-math --no-pointers --no-longlong --max-funcs 1 --max-expr-complexity 5 --output ./tmp/src_code/csmith_test_1447.c
* Seed: 3224376083
*/
#define NO_LONGLONG
#include "csmith.h"
static long __undefined;
/* --- Struct/Union Declarations --- */
/* --- GLOBAL VARIABLES --- */
static volatile int8_t g_10 = 0x13;/* VOLATILE GLOBAL g_10 */
static uint32_t g_33 = 0U;
static int32_t g_34 = 0xCFD8F271;
static uint32_t g_37 = 8U;
static int32_t g_44 = 0x8914BE49;
static volatile int16_t g_56 = 0x1994;/* VOLATILE GLOBAL g_56 */
static uint32_t g_58 = 4294967290U;
static uint32_t g_70 = 0xEDBCC772;
static int32_t g_71 = 0x0676DFA5;
static uint32_t g_90 = 0x224C6ACE;
static volatile uint32_t g_121 = 0x39C81172;/* VOLATILE GLOBAL g_121 */
/* --- FORWARD DECLARATIONS --- */
static int32_t func_1(void);
static void packed_printf(int d)
{
printf("%d\n", d);
}
static int set_var(int8_t g_10_l, uint32_t g_33_l, int32_t g_34_l, uint32_t g_37_l, int32_t g_44_l, int16_t g_56_l, uint32_t g_58_l, uint32_t g_70_l, int32_t g_71_l, uint32_t g_90_l, uint32_t g_121_l){
g_10 = g_10_l;g_33 = g_33_l;g_34 = g_34_l;g_37 = g_37_l;g_44 = g_44_l;g_56 = g_56_l;g_58 = g_58_l;g_70 = g_70_l;g_71 = g_71_l;g_90 = g_90_l;g_121 = g_121_l;
return 0;
}
/* --- FUNCTIONS --- */
/* ------------------------------------------ */
/*
* reads : g_10 g_33 g_37 g_34 g_58 g_44 g_71 g_56 g_90 g_70 g_121
* writes: g_33 g_34 g_37 g_44 g_58 g_70 g_71 g_90 g_121
*/
static int32_t func_1(void)
{
int8_t g_10_l = 0x13;
uint32_t g_33_l = 0U;
int32_t g_34_l = 0xCFD8F271;
uint32_t g_37_l = 8U;
int32_t g_44_l = 0x8914BE49;
int16_t g_56_l = 0x1994;
uint32_t g_58_l = 4294967290U;
uint32_t g_70_l = 0xEDBCC772;
int32_t g_71_l = 0x0676DFA5;
uint32_t g_90_l = 0x224C6ACE;
uint32_t g_121_l = 0x39C81172;
/* block id: 0 */
uint32_t l_4 = 0x2667A876;
uint32_t l_5 = 0x6444696A;
uint16_t l_18 = 6U;
int8_t l_29 = 0x60;
int32_t l_35 = (-1);
int32_t l_36 = 0x4BC795C3;
lbl_124:;
l_5 = ((int16_t)l_4 << (int16_t)6);
if ((((uint16_t)((int16_t)(-3) >> (int16_t)g_10_l) << (uint16_t)1) , (((uint16_t)(-(uint32_t)l_4) << (uint16_t)((((uint16_t)(((int8_t)(g_10_l , 0xA4) << (int8_t)l_18) , 0U) >> (uint16_t)1) || 0xD82C32B9) <= l_5)) > l_4)))
{ /* block id: 2 */
int32_t l_32 = (-4);
int32_t l_53 = (-1);
const uint32_t l_92 = 0xADB69C52;
if (((int8_t)((int16_t)((uint32_t)(((((uint16_t)((int8_t)(l_29 = 0) / (int8_t)(g_34_l = ((int16_t)0xA802 % (int16_t)(g_33_l |= l_32)))) * (uint16_t)l_35) && l_32) && g_10_l) && l_36) / (uint32_t)l_32) * (int16_t)4U) - (int8_t)0x37))
{ /* block id: 6 */
uint8_t l_65 = 252U;
int32_t l_91 = (-1);
uint16_t l_109 = 1U;
for (l_32 = (-9); (l_32 <= 27); l_32++)
{ /* block id: 10 */
int8_t l_47 = 8;
int32_t l_57 = 9;
uint32_t l_89 = 0xA6FBAAEE;
if ((((int8_t)(g_33_l >= (g_44_l = (g_37_l && (g_10_l != (7U != l_32))))) >> (int8_t)6) | 0xD5))
{ /* block id: 12 */
uint32_t l_52 = 0x82B5DFEB;
l_5--;
}
else
{ /* block id: 19 */
int32_t l_78 = 0x0713981D;
g_71_l &= ((int32_t)(((uint8_t)l_65 * (uint8_t)(((((g_70_l = ((uint8_t)(0xE474C77A == ((int16_t)(0x148C | 0U) >> (int16_t)8)) / (uint8_t)(-1))) , g_37_l) || g_10_l) != g_44_l) , 0)) | g_34_l) % (int32_t)l_47);
g_44_l = (0U > 0xD4);
l_91 ^= (((int16_t)(g_90_l = ((((uint8_t)((((int8_t)l_78 % (int8_t)((int8_t)(((-10) | 0x6C33) , ((uint32_t)((int16_t)(l_89 = ((uint8_t)((uint8_t)l_32 << (uint8_t)2) * (uint8_t)l_18)) + (int16_t)l_47) - (uint32_t)g_71_l)) % (int8_t)0x0C)) > g_44_l) == g_44_l) + (uint8_t)l_65) | g_33_l) == 0U)) << (int16_t)l_57) & g_56_l);
g_44_l = l_92;
}
}
if (l_92)
{ /* block id: 29 */
for (l_5 = (-24); (l_5 != 39); l_5 += 9)
{ /* block id: 32 */
set_var(g_10_l, g_33_l, g_34_l, g_37_l, g_44_l, g_56_l, g_58_l, g_70_l, g_71_l, g_90_l, g_121_l);return g_33_l;
}
}
else
{ /* block id: 35 */
int16_t l_101 = 0;
int32_t l_102 = 0x95210A6D;
l_102 = (((uint8_t)0x7C << (uint8_t)5) && (((int32_t)g_44_l + (int32_t)(0 ^ ((uint8_t)l_4 + (uint8_t)l_101))) >= l_53));
l_91 = (-1);
}
}
else
{ /* block id: 40 */
if ((((uint8_t)g_56_l % (uint8_t)((uint16_t)65532U * (uint16_t)(-3))) == (((int8_t)((int16_t)(((g_90_l >= l_92) <= 0x32) & l_29) * (int16_t)g_34_l) * (int8_t)252U) <= 5U)))
{ /* block id: 41 */
set_var(g_10_l, g_33_l, g_34_l, g_37_l, g_44_l, g_56_l, g_58_l, g_70_l, g_71_l, g_90_l, g_121_l);return g_10_l;
}
else
{ /* block id: 43 */
}
}
set_var(g_10_l, g_33_l, g_34_l, g_37_l, g_44_l, g_56_l, g_58_l, g_70_l, g_71_l, g_90_l, g_121_l);return g_44_l;
}
else
{ /* block id: 49 */
g_44_l = ((int16_t)l_35 >> (int16_t)g_44_l);
}
g_44_l = (((int16_t)g_58_l - (int16_t)(((((g_71_l = g_71_l) || ((uint8_t)g_34_l % (uint8_t)l_29)) <= g_34_l) , g_71_l) >= l_35)) , g_34_l);
set_var(g_10_l, g_33_l, g_34_l, g_37_l, g_44_l, g_56_l, g_58_l, g_70_l, g_71_l, g_90_l, g_121_l);return g_70_l;
}
/* ---------------------------------------- */
int main (int argc, char* argv[])
{
int print_hash_value = 0;
if (argc == 2 && strcmp(argv[1], "1") == 0) print_hash_value = 1;
platform_main_begin();
crc32_gentab();
func_1();
transparent_crc(g_10, "g_10", print_hash_value);
transparent_crc(g_33, "g_33", print_hash_value);
transparent_crc(g_34, "g_34", print_hash_value);
transparent_crc(g_37, "g_37", print_hash_value);
transparent_crc(g_44, "g_44", print_hash_value);
transparent_crc(g_56, "g_56", print_hash_value);
transparent_crc(g_58, "g_58", print_hash_value);
transparent_crc(g_70, "g_70", print_hash_value);
transparent_crc(g_71, "g_71", print_hash_value);
transparent_crc(g_90, "g_90", print_hash_value);
transparent_crc(g_121, "g_121", print_hash_value);
platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
return 0;
}
/************************ statistics *************************
XXX max struct depth: 0
breakdown:
depth: 0, occurrence: 30
XXX total union variables: 0
XXX non-zero bitfields defined in structs: 0
XXX zero bitfields defined in structs: 0
XXX const bitfields defined in structs: 0
XXX volatile bitfields defined in structs: 0
XXX structs with bitfields in the program: 0
breakdown:
XXX full-bitfields structs in the program: 0
breakdown:
XXX times a bitfields struct's address is taken: 0
XXX times a bitfields struct on LHS: 0
XXX times a bitfields struct on RHS: 0
XXX times a single bitfield on LHS: 0
XXX times a single bitfield on RHS: 0
XXX max expression depth: 18
breakdown:
depth: 1, occurrence: 25
depth: 2, occurrence: 6
depth: 5, occurrence: 1
depth: 7, occurrence: 1
depth: 8, occurrence: 1
depth: 9, occurrence: 1
depth: 10, occurrence: 1
depth: 12, occurrence: 1
depth: 13, occurrence: 2
depth: 14, occurrence: 1
depth: 18, occurrence: 1
XXX total number of pointers: 0
XXX times a non-volatile is read: 69
XXX times a non-volatile is write: 24
XXX times a volatile is read: 8
XXX times read thru a pointer: 0
XXX times a volatile is write: 1
XXX times written thru a pointer: 0
XXX times a volatile is available for access: 49
XXX percentage of non-volatile access: 91.2
XXX forward jumps: 0
XXX backward jumps: 1
XXX stmts: 27
XXX max block depth: 5
breakdown:
depth: 0, occurrence: 4
depth: 1, occurrence: 3
depth: 2, occurrence: 5
depth: 3, occurrence: 7
depth: 4, occurrence: 7
depth: 5, occurrence: 1
XXX percentage a fresh-made variable is used: 29.7
XXX percentage an existing variable is used: 70.3
********************* end of statistics **********************/
|
[
"[email protected]"
] | |
d34ccb4de4ce0d77e62dfcea29fafd9192c84d56
|
c8d179bf5fd5d9a8584851dd97204ae1a6f9c7d6
|
/LPC2148/_Módulos do ARM LPC2148/delay_loop.c
|
baa5259b6290e81381956d45177a0e193a8632d0
|
[] |
no_license
|
dtgmariano/ARM-101
|
63ea0ae59b8f32e97508376b2955a6bbe757de3e
|
cab7e55232af9225e20dede423e5954c7c1782c1
|
refs/heads/master
| 2020-04-24T23:18:13.367098 | 2014-11-06T13:01:31 | 2014-11-06T13:01:31 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 5,062 |
c
|
/* =============================== C/C++ HEADER FILE ================================ */
/**
\file
\description
\copyright (c) LASEC www.lasec.feelt.ufu.br
*/
/* ================================================================================== */
/*
CHANGES:
---------------
Date Author Description
27/03/2011 felipe v1.0 Released
07/04/2011 fabiovince v1.1
*/
#include "cpu_init.h"
//--------------------------------------------------------------------------------------
//--- delay_ms implementado com loops --------------------------------------------------
#if (cpuMHz == cristal_12MHz_cpu_60MHz)
void delay_ms(int tempo)
{
int j;
while(tempo--)
{
for(j = 0 ; j <= 3295 ; j++)
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_48MHz)
void delay_ms(int tempo)
{
int j;
while(tempo--)
{
for(j = 0 ; j <= 2636; j++)
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_36MHz)
void delay_ms(int tempo)
{
int j;
while(tempo--)
{
for(j = 0 ; j <= 1977; j++)
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_24MHz)
void delay_ms(int tempo)
{
int j;
while(tempo--)
{
for(j = 0 ; j <= 1318; j++)
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_12MHz)
void delay_ms(int tempo)
{
int j;
while(tempo--)
{
for(j = 0 ; j <= 659; j++)
asm volatile ("NOP");
}
}
#endif
//--------------------------------------------------------------------------------------
//--- delay_us implementado com loops --------------------------------------------------
#if (cpuMHz == cristal_12MHz_cpu_60MHz)
void delay_us(int tempo)
{
while(tempo--)
{
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_48MHz)
void delay_us(int tempo)
{
while(tempo--)
{
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_36MHz)
void delay_us(int tempo)
{
while(tempo--)
{
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_24MHz)
void delay_us(int tempo)
{
tempo = tempo/2;
while(tempo--){
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
}
}
#elif (cpuMHz == cristal_12MHz_cpu_12MHz)
void delay_us(int tempo)
{
tempo = tempo/2;
while(tempo--){
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
asm volatile ("NOP");
}
}
#endif
|
[
"[email protected]"
] | |
e3c79922641d08ed2b1b08d83c542441d4ac4086
|
eb8fde6e6405474ec76bdaf2c2fdb148f8a6c9ba
|
/drivers/pmc0/fsl_pmc0.h
|
6d5b2413c932a0c1a5afd7b6c677abeb9a2b6995
|
[] |
no_license
|
jsplyy/mcu_project_generator
|
50cd791a20e4e28c738125e8cbde50845645d5dd
|
e9b510c963a837a447ee83e933316f7a5248b780
|
refs/heads/master
| 2021-01-22T21:45:53.918445 | 2017-03-19T12:30:22 | 2017-03-19T12:30:22 | 85,473,423 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 26,326 |
h
|
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright (c) 2016, NXP Semiconductors, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _FSL_PMC0_H_
#define _FSL_PMC0_H_
#include "fsl_common.h"
/*! @addtogroup pmc0 */
/*! @{ */
/*! @file */
/*******************************************************************************
* Definitions
******************************************************************************/
/*! @name Driver version */
/*@{*/
/*! @brief PMC 0 driver version */
#define FSL_PMC0_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))
/*@}*/
/*!
* @brief MAX valid values of Core Regulator Voltage Level
*/
#define CORE_REGULATOR_VOLT_LEVEL_MAX 50U
/*!
* @brief High Voltage Detect Monitor Select
*/
typedef enum _pmc0_high_volt_detect_monitor_select
{
kPMC0_HighVoltDetectLowPowerMonitor = 0U, /*!< LP monitor is selected. */
kPMC0_HighVoltDetectHighPowerMonitor = 1U /*!< HP monitor is selected. */
} pmc0_high_volt_detect_monitor_select_t;
/*!
* @brief Low Voltage Detect Monitor Select
*/
typedef enum _pmc0_low_volt_detect_monitor_select
{
kPMC0_LowVoltDetectLowPowerMonitor = 0U, /*!< LP monitor is selected. */
kPMC0_LowVoltDetectHighPowerMonitor = 1U /*!< HP monitor is selected. */
} pmc0_low_volt_detect_monitor_select_t;
/*!
* @brief Core Regulator Select
*/
typedef enum _pmc0_core_regulator_select
{
kPMC0_CoreLowPowerRegulator = 0U, /*!< Core LP regulator is selected. */
kPMC0_CoreHighPowerRegulator = 1U /*!< Core HP regulator is selected. */
} pmc0_core_regulator_select_t;
/*!
* @brief Array Regulator Select
*/
typedef enum _pmc0_array_regulator_select
{
kPMC0_ArrayLowPowerRegulator = 0U, /*!< Array LP regulator is selected. */
kPMC0_ArrayHighPowerRegulator = 1U /*!< Array HP regulator is selected. */
} pmc0_array_regulator_select_t;
/*!
* @brief VLLS mode array Regulator Select
*/
typedef enum _pmc0_vlls_array_regulator_select
{
kPMC0_VllsArrayRegulatorOff = 0U, /*!< Array regulator is selected OFF. This is selectable only for VLLS mode. */
kPMC0_VllsArrayLowPowerRegulator = 2U, /*!< Array LP regulator is selected. */
kPMC0_VllsArrayHighPowerRegulator = 3U /*!< Array HP regulator is selected. */
} pmc0_vlls_array_regulator_select_t;
/*!
* @brief PMC 0 status flags
*/
enum _pmc0_status_flags
{
kPMC0_LowVoltDetectEventFlag =
PMC0_STATUS_LVD1P2F_MASK, /*!< 1.2V Low-Voltage Detector Flag, sets when low-voltage event was detected. */
kPMC0_LowVoltDetectValueFlag = PMC0_STATUS_LVD1P2V_MASK, /*!< 1.2V Low-Voltage Detector Value, sets when current
value of the 1.2V LVD monitor output is 1. */
kPMC0_HighVoltDetectEventFlag =
PMC0_STATUS_HVD1P2F_MASK, /*!< 1.2V High-Voltage Detector Flag, sets when high-voltage event was detected. */
kPMC0_HighVoltDetectValueFlag = PMC0_STATUS_HVD1P2V_MASK, /*!< 1.2V High-Voltage Detector Value, sets when current
value of the 1.2V HVD monitor output is 1. */
kPMC0_CoreRegulatorVoltLevelFlag =
PMC0_STATUS_COREVLF_MASK, /*!< Core Regulator Voltage Level Flag, sets when core regulator voltage level is
changing (not stable). */
kPMC0_SramFlag =
PMC0_STATUS_SRAMF_MASK /*!< SRAM Flag, sets when a change mode request is being processed in the SRAMs. */
};
/*!
* @brief PMC 0 HSRUN mode configuration.
*/
typedef struct _pmc0_hsrun_mode_config
{
uint32_t : 16; /*!< Reserved. */
uint32_t coreRegulatorVoltLevel : 6; /*!< Core Regulator Voltage Level. */
uint32_t : 2; /*!< Reserved. */
uint32_t enableForwardBias : 1; /*!< Enable forward bias. */
uint32_t : 7; /*!< Reserved. */
} pmc0_hsrun_mode_config_t;
/*!
* @brief PMC 0 RUN mode configuration.
*/
typedef struct _pmc0_run_mode_config
{
uint32_t : 16; /*!< Reserved. */
uint32_t coreRegulatorVoltLevel : 6; /*!< Core Regulator Voltage Level. */
uint32_t : 10; /*!< Reserved. */
} pmc0_run_mode_config_t;
/*!
* @brief PMC 0 VLPR mode configuration.
*/
typedef struct _pmc0_vlpr_mode_config
{
uint32_t arrayRegulatorSelect : 1; /*!< Array Regulator Select. @ref pmc0_array_regulator_select_t*/
uint32_t : 1; /*!< Reserved. */
uint32_t coreRegulatorSelect : 1; /*!< Core Regulator Select. @ref pmc0_core_regulator_select_t*/
uint32_t : 1; /*!< Reserved. */
uint32_t lvdMonitorSelect : 1; /*!< 1.2V LVD Monitor Select. @ref pmc0_low_volt_detect_monitor_select_t */
uint32_t hvdMonitorSelect : 1; /*!< 1.2V HVD Monitor Select. @ref pmc0_high_volt_detect_monitor_select_t */
uint32_t : 1; /*!< Reserved. */
uint32_t enableForceHpBandgap : 1; /*!< Enable force HP band-gap. */
uint32_t : 8; /*!< Reserved. */
uint32_t coreRegulatorVoltLevel : 6; /*!< Core Regulator Voltage Level. */
uint32_t : 6; /*!< Reserved. */
uint32_t enableReverseBackBias : 1; /*!< Enable reverse back bias. */
uint32_t : 3; /*!< Reserved. */
} pmc0_vlpr_mode_config_t;
/*!
* @brief PMC 0 STOP mode configuration.
*/
typedef struct _pmc0_stop_mode_config
{
uint32_t : 16; /*!< Reserved. */
uint32_t coreRegulatorVoltLevel; /*!< Core Regulator Voltage Level. */
uint32_t : 10; /*!< Reserved. */
} pmc0_stop_mode_config_t;
/*!
* @brief PMC 0 VLPS mode configuration.
*/
typedef struct _pmc0_vlps_mode_config
{
uint32_t arrayRegulatorSelect : 1; /*!< Array Regulator Select. @ref pmc0_array_regulator_select_t*/
uint32_t : 1; /*!< Reserved. */
uint32_t coreRegulatorSelect : 1; /*!< Core Regulator Select. @ref pmc0_core_regulator_select_t*/
uint32_t : 1; /*!< Reserved. */
uint32_t lvdMonitorSelect : 1; /*!< 1.2V LVD Monitor Select. @ref pmc0_low_volt_detect_monitor_select_t */
uint32_t hvdMonitorSelect : 1; /*!< 1.2V HVD Monitor Select. @ref pmc0_high_volt_detect_monitor_select_t */
uint32_t : 1; /*!< Reserved. */
uint32_t enableForceHpBandgap : 1; /*!< Enable force HP band-gap. */
uint32_t : 8; /*!< Reserved. */
uint32_t coreRegulatorVoltLevel : 6; /*!< Core Regulator Voltage Level. */
uint32_t : 6; /*!< Reserved. */
uint32_t enableReverseBackBias : 1; /*!< Enable reverse back bias. */
uint32_t : 3; /*!< Reserved. */
} pmc0_vlps_mode_config_t;
/*!
* @brief PMC 0 LLS mode configuration.
*/
typedef struct _pmc0_lls_mode_config
{
uint32_t arrayRegulatorSelect : 1; /*!< Array Regulator Select. @ref pmc0_array_regulator_select_t*/
uint32_t : 1; /*!< Reserved. */
uint32_t coreRegulatorSelect : 1; /*!< Core Regulator Select. @ref pmc0_core_regulator_select_t*/
uint32_t : 1; /*!< Reserved. */
uint32_t lvdMonitorSelect : 1; /*!< 1.2V LVD Monitor Select. @ref pmc0_low_volt_detect_monitor_select_t */
uint32_t hvdMonitorSelect : 1; /*!< 1.2V HVD Monitor Select. @ref pmc0_high_volt_detect_monitor_select_t */
uint32_t : 1; /*!< Reserved. */
uint32_t enableForceHpBandgap : 1; /*!< Enable force HP band-gap. */
uint32_t : 8; /*!< Reserved. */
uint32_t coreRegulatorVoltLevel : 6; /*!< Core Regulator Voltage Level. */
uint32_t : 6; /*!< Reserved. */
uint32_t enableReverseBackBias : 1; /*!< Enable reverse back bias. */
uint32_t : 3; /*!< Reserved. */
} pmc0_lls_mode_config_t;
/*!
* @brief PMC 0 VLLS mode configuration.
*/
typedef struct _pmc0_vlls_mode_config
{
uint32_t arrayRegulatorSelect : 2; /*!< Array Regulator Select. @ref pmc0_vlls_array_regulator_select_t */
uint32_t : 2; /*!< Reserved. */
uint32_t lvdMonitorSelect : 1; /*!< 1.2V LVD Monitor Select. @ref pmc0_low_volt_detect_monitor_select_t */
uint32_t hvdMonitorSelect : 1; /*!< 1.2V HVD Monitor Select. @ref pmc0_high_volt_detect_monitor_select_t */
uint32_t : 1; /*!< Reserved. */
uint32_t enableForceHpBandgap : 1; /*!< Enable force HP band-gap. */
uint32_t : 24; /*!< Reserved. */
} pmc0_vlls_mode_config_t;
/*******************************************************************************
* API
******************************************************************************/
#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus*/
/*! @name Power Management Controller Control APIs*/
/*@{*/
/*!
* @brief Configure the HSRUN power mode.
*
* This function configures the HSRUN power mode, including the core regulator
* voltage Level setting, enable forward bias or not.
*
* @param config Low-Voltage detect configuration structure.
*/
static inline void PMC0_ConfigureHsrunMode(const pmc0_hsrun_mode_config_t *config)
{
/*
* The valid values of Core Regulator Voltage Level are between 0 and 50.
* These values correspond to a valid range of 0.596V to 1.138V with resolution of 10.83mV.
* The reset value correspond to 0.9V.
*/
assert(config);
assert(config->coreRegulatorVoltLevel <= CORE_REGULATOR_VOLT_LEVEL_MAX);
/* Wait until COREVLF is cleared. */
while (PMC0->STATUS & PMC0_STATUS_COREVLF_MASK)
{
}
PMC0->HSRUN = (*((const uint32_t *)config)) & (PMC0_HSRUN_COREREGVL_MASK | PMC0_HSRUN_FBBEN_MASK);
/* Wait until COREVLF is cleared. */
while (PMC0->STATUS & PMC0_STATUS_COREVLF_MASK)
{
}
}
/*!
* @brief Configure the RUN power mode.
*
* This function configures the RUN power mode, including the core regulator
* voltage Level setting.
*
* @param config Low-Voltage detect configuration structure.
*/
static inline void PMC0_ConfigureRunMode(const pmc0_run_mode_config_t *config)
{
/*
* The valid values of Core Regulator Voltage Level are between 0 and 50.
* These values correspond to a valid range of 0.596V to 1.138V with resolution of 10.83mV.
* The reset value correspond to 0.9V.
*/
assert(config);
assert(config->coreRegulatorVoltLevel <= CORE_REGULATOR_VOLT_LEVEL_MAX);
/* Wait until COREVLF is cleared. */
while (PMC0->STATUS & PMC0_STATUS_COREVLF_MASK)
{
}
PMC0->RUN = (*((const uint32_t *)config)) & PMC0_RUN_COREREGVL_MASK;
/* Wait until COREVLF is cleared. */
while (PMC0->STATUS & PMC0_STATUS_COREVLF_MASK)
{
}
}
/*!
* @brief Configure the VLPR power mode.
*
* This function configures the VLPR power mode, including the core regulator
* voltage Level setting, enable reverse back bias or not, turn on force HP
* band-gap or not, select of HVD/LVD monitor and select of core/array regulator.
*
* @param config Low-Voltage detect configuration structure.
*/
static inline void PMC0_ConfigureVlprMode(const pmc0_vlpr_mode_config_t *config)
{
/*
* The valid values of Core Regulator Voltage Level are between 0 and 50.
* These values correspond to a valid range of 0.596V to 1.138V with resolution of 10.83mV.
* The reset value correspond to 0.704V.
*/
assert(config);
assert(config->coreRegulatorVoltLevel <= CORE_REGULATOR_VOLT_LEVEL_MAX);
PMC0->VLPR = (*((const uint32_t *)config)) &
(PMC0_VLPR_ARRAYREG_MASK | PMC0_VLPR_COREREG_MASK | PMC0_VLPR_MON1P2LVDHP_MASK |
PMC0_VLPR_MON1P2HVDHP_MASK | PMC0_VLPR_FBGHP_MASK | PMC0_VLPR_COREREGVL_MASK | PMC0_VLPR_RBBEN_MASK);
}
/*!
* @brief Configure the STOP power mode.
*
* This function configures the STOP power mode, including the core regulator
* voltage Level setting.
*
* @param config Low-Voltage detect configuration structure.
*/
static void PMC0_ConfigureStopMode(const pmc0_stop_mode_config_t *config)
{
/*
* The valid values of Core Regulator Voltage Level are between 0 and 50.
* These values correspond to a valid range of 0.596V to 1.138V with resolution of 10.83mV.
* The reset value correspond to 0.9V.
*/
assert(config);
assert(config->coreRegulatorVoltLevel <= CORE_REGULATOR_VOLT_LEVEL_MAX);
PMC0->STOP = (*((const uint32_t *)config)) & PMC0_STOP_COREREGVL_MASK;
}
/*!
* @brief Configure the VLPS power mode.
*
* This function configures the VLPS power mode, including the core regulator
* voltage Level setting, enable reverse back bias or not, turn on force HP
* band-gap or not, select of HVD/LVD monitor and select of core/array regulator.
*
* @param config Low-Voltage detect configuration structure.
*/
static inline void PMC0_ConfigureVlpsMode(const pmc0_vlps_mode_config_t *config)
{
/*
* The valid values of Core Regulator Voltage Level are between 0 and 50.
* These values correspond to a valid range of 0.596V to 1.138V with resolution of 10.83mV.
* The reset value correspond to 0.704V.
*/
assert(config);
assert(config->coreRegulatorVoltLevel <= CORE_REGULATOR_VOLT_LEVEL_MAX);
PMC0->VLPS = (*((const uint32_t *)config)) &
(PMC0_VLPS_ARRAYREG_MASK | PMC0_VLPS_COREREG_MASK | PMC0_VLPS_MON1P2LVDHP_MASK |
PMC0_VLPS_MON1P2HVDHP_MASK | PMC0_VLPS_FBGHP_MASK | PMC0_VLPS_COREREGVL_MASK | PMC0_VLPS_RBBEN_MASK);
}
/*!
* @brief Configure the LLS power mode.
*
* This function configures the LLS power mode, including the core regulator
* voltage Level setting, enable reverse back bias or not, turn on force HP
* band-gap or not, select of HVD/LVD monitor and select of core/array regulator.
*
* @param config Low-Voltage detect configuration structure.
*/
static inline void PMC0_ConfigureLlsMode(const pmc0_lls_mode_config_t *config)
{
/*
* The valid values of Core Regulator Voltage Level are between 0 and 50.
* These values correspond to a valid range of 0.596V to 1.138V with resolution of 10.83mV.
* The reset value correspond to 0.704V.
*/
assert(config);
assert(config->coreRegulatorVoltLevel <= CORE_REGULATOR_VOLT_LEVEL_MAX);
PMC0->LLS = (*((const uint32_t *)config)) &
(PMC0_LLS_ARRAYREG_MASK | PMC0_LLS_COREREG_MASK | PMC0_LLS_MON1P2LVDHP_MASK |
PMC0_LLS_MON1P2HVDHP_MASK | PMC0_LLS_FBGHP_MASK | PMC0_LLS_COREREGVL_MASK | PMC0_LLS_RBBEN_MASK);
}
/*!
* @brief Configure the VLLS power mode.
*
* This function configures the VLLS power mode, including turn on force HP
* band-gap or not, select of HVD/LVD monitor and select of core/array regulator.
*
* The select of array regulator is different from the other mode configurations.
* PMC 0 VLLS config has three array regulator select options where the others have only the latter two,
* see @ref pmc0_vlls_array_regulator_select_t.
* Three array regulator select options in PMC 0 VLLS config are shown below:
* - Regulator is off (diffrentiator)
* - LP Regulator is on
* - HP Regulator is on
*
* @param config Low-Voltage detect configuration structure.
*/
static inline void PMC0_ConfigureVllsMode(const pmc0_vlls_mode_config_t *config)
{
assert(config);
PMC0->VLLS = (*((const uint32_t *)config)) & (PMC0_VLLS_ARRAYREG_MASK | PMC0_VLLS_MON1P2LVDHP_MASK |
PMC0_VLLS_MON1P2HVDHP_MASK | PMC0_VLLS_FBGHP_MASK);
}
/*!
* @brief Gets PMC 0 status flags.
*
* This function gets all PMC 0 status flags. The flags are returned as the logical
* OR value of the enumerators @ref _pmc0_status_flags. To check for a specific status,
* compare the return value with enumerators in the @ref _pmc0_status_flags.
* For example, to check whether core regulator voltage level is changing:
* @code
* if (kPMC0_CoreRegulatorVoltLevelFlag & PMC0_GetStatusFlags(void))
* {
* ...
* }
* @endcode
*
* @return PMC 0 status flags which are ORed by the enumerators in the _pmc0_status_flags.
*/
static inline uint32_t PMC0_GetStatusFlags(void)
{
return PMC0->STATUS;
}
/*!
* @brief Enables the 1.2V Low-Voltage Detector interrupt.
*
* This function enables the 1.2V Low-Voltage Detector interrupt.
*
*/
static inline void PMC0_EnableLowVoltDetectInterrupt(void)
{
PMC0->CTRL |= PMC0_CTRL_LVD1P2IE_MASK;
}
/*!
* @brief Disables the 1.2V Low-Voltage Detector interrupt.
*
* This function disables the 1.2V Low-Voltage Detector interrupt.
*
*/
static inline void PMC0_DisableLowVoltDetectInterrupt(void)
{
PMC0->CTRL &= ~PMC0_CTRL_LVD1P2IE_MASK;
}
/*!
* @brief Clears the 1.2V Low-Voltage Detector flag.
*
* This function enables the 1.2V Low-Voltage Detector flag.
*
*/
static inline void PMC0_ClearLowVoltDetectFlag(void)
{
PMC0->CTRL |= PMC0_CTRL_LVD1P2ACK_MASK;
}
/*!
* @brief Enables the 1.2V High-Voltage Detector interrupt.
*
* This function enables the 1.2V High-Voltage Detector interrupt.
*
*/
static inline void PMC0_EnableHighVoltDetectInterrupt(void)
{
PMC0->CTRL |= PMC0_CTRL_HVD1P2IE_MASK;
}
/*!
* @brief Disables the 1.2V High-Voltage Detector interrupt.
*
* This function disables the 1.2V High-Voltage Detector interrupt.
*
*/
static inline void PMC0_DisableHighVoltDetectInterrupt(void)
{
PMC0->CTRL &= ~PMC0_CTRL_HVD1P2IE_MASK;
}
/*!
* @brief Clears the 1.2V High-Voltage Detector flag.
*
* This function enables the 1.2V High-Voltage Detector flag.
*
*/
static inline void PMC0_ClearHighVoltDetectFlag(void)
{
PMC0->CTRL |= PMC0_CTRL_HVD1P2ACK_MASK;
}
/*!
* @brief Enables the 1.2V Low-Voltage Detector reset.
*
* This function enables 1.2V Low-Voltage Detector reset.
*
* @param enable Switcher of 1.2V Low-Voltage Detector reset feature. "true" means to enable, "false" means not.
*/
static inline void PMC0_EnableLowVoltDetectReset(bool enable)
{
if (enable)
{
PMC0->CTRL |= PMC0_CTRL_LVD1P2RE_MASK;
}
else
{
PMC0->CTRL &= ~PMC0_CTRL_LVD1P2RE_MASK;
}
}
/*!
* @brief Enables the 1.2V High-Voltage Detector reset.
*
* This function enables 1.2V High-Voltage Detector reset.
*
* @param enable Switcher of 1.2V High-Voltage Detector reset feature. "true" means to enable, "false" means not.
*/
static inline void PMC0_EnableHighVoltDetectReset(bool enable)
{
if (enable)
{
PMC0->CTRL |= PMC0_CTRL_HVD1P2RE_MASK;
}
else
{
PMC0->CTRL &= ~PMC0_CTRL_HVD1P2RE_MASK;
}
}
/*!
* @brief Releases/clears the isolation in the PADS.
*
* This function releases/clears the isolation in the PADS.
*
* The isolation in the pads only will be asserted during LLS/VLLS. On LLS exit, the isolation will
* release automatically. ISOACK must be set after a VLLS to RUN mode transition has completed.
*
*/
static inline void PMC0_ClearPadsIsolation(void)
{
PMC0->CTRL |= PMC0_CTRL_ISOACK_MASK;
}
/*!
* @brief Enables the PMC 1 Switch RBB.
*
* This function enables 1.2V High-Voltage Detector reset.
*
* @param enable Switcher of PMC 1 Switch RBB feature. "true" means to enable, "false" means not.
*/
static inline void PMC0_EnablePmc1SwitchRbb(bool enable)
{
if (enable)
{
PMC0->CTRL |= PMC0_CTRL_SWRBBEN_MASK;
}
else
{
PMC0->CTRL &= ~PMC0_CTRL_SWRBBEN_MASK;
}
}
/*!
* @brief Powers on PMC 1.
*
* This function powers on PMC 1.
*
* When this bit field is asserted the PMC 1 is powered on. This bit would take action only once.
* This bit will be rearmed after a POR event only.
*
*/
static inline void PMC0_PowerOnPmc1(void)
{
PMC0->CTRL |= PMC0_CTRL_PMC1ON_MASK;
}
/*!
* @brief Enables to wait LDO OK signal.
*
* This function enables to wait LDO OK signal.
*
* @param enable Switcher of wait LDO OK signal feature. "true" means to enable, "false" means not.
*/
static inline void PMC0_EnableWaitLdoOkSignal(bool enable)
{
if (enable)
{
PMC0->CTRL &= ~PMC0_CTRL_LDOOKDIS_MASK;
}
else
{
PMC0->CTRL |= PMC0_CTRL_LDOOKDIS_MASK;
}
}
/*!
* @brief Enables PMC 1 LDO Regulator.
*
* This function enables PMC 1 LDO Regulator.
*
* @param enable Switcher of PMC 1 LDO Regulator. "true" means to enable, "false" means not.
*/
static inline void PMC0_EnablePmc1LdoRegulator(bool enable)
{
if (enable)
{
PMC0->CTRL |= PMC0_CTRL_LDOEN_MASK;
}
else
{
PMC0->CTRL &= ~PMC0_CTRL_LDOEN_MASK;
}
}
/*!
* @brief Configures PMC 0 SRAM bank power down.
*
* This function configures PMC 0 SRAM bank power down.
*
* The bit i controls the power mode of the PMC 0 SRAM bank i.
* PMC0_SRAM_PD[i] = 1'b0 - PMC 0 SRAM bank i is not affected.
* PMC0_SRAM_PD[i] = 1'b1 - PMC 0 SRAM bank i is in ASD or ARRAY_SHUTDOWN during all modes,
* except VLLS. During VLLS is in POWER_DOWN mode.
*
* Example
* @code
* // Enable band 0 and 1 in ASD or ARRAY_SHUTDOWN during all modes except VLLS
* PMC0_ConfigureSramBankPowerDown(0x3U);
* @endcode
*
* @param bankMask The bands to enable. Logical OR of all bits of band index to enbale.
*/
static inline void PMC0_ConfigureSramBankPowerDown(uint32_t bankMask)
{
/* Wait until SRAMF is cleared. */
while (PMC0->STATUS & PMC0_STATUS_SRAMF_MASK)
{
}
PMC0->SRAMCTRL_0 = PMC0_SRAMCTRL_0_SRAM_PD(bankMask);
/* Wait until SRAMF is cleared. */
while (PMC0->STATUS & PMC0_STATUS_SRAMF_MASK)
{
}
}
/*!
* @brief Configures PMC 0 SRAM bank power down in stop modes.
*
* This function configures PMC 0 SRAM bank power down in stop modes.
*
* The bit i controls the PMC 0 SRAM bank i.
* PMC0_SRAM_PDS[i] = 1'b0 - PMC 0 SRAM bank i is not affected.
* PMC0_SRAM_PDS[i] = 1'b1 - PMC 0 SRAM bank i is in ASD or ARRAY_SHUTDOWN mode during
* STOP, VLPS and LLS modes. During VLLS is in POWER_DOWN mode.
*
* Example
* @code
* // Enable band 0 and 1 in ASD or ARRAY_SHUTDOWN during STOP, VLPS and LLS modes
* PMC0_ConfigureSramBankPowerDownStopMode(0x3U);
* @endcode
*
* @param bankMask The bands to enable. Logical OR of all bits of band index to enbale.
*/
static inline void PMC0_ConfigureSramBankPowerDownStopMode(uint32_t bankMask)
{
PMC0->SRAMCTRL_1 = PMC0_SRAMCTRL_1_SRAM_PDS(bankMask);
}
/*!
* @brief Configures PMC 0 SRAM bank power down in Standby Mode.
*
* This function configures PMC 0 SRAM bank power down in Standby Mode.
*
* The bit i controls the PMC 0 SRAM bank i.
* PMC0_SRAM_STDY[i] = 1'b0 - PMC 0 SRAM bank i is not affected.
* PMC0_SRAM_STDY[i] = 1'b1 - PMC 0 SRAM bank i is in STANDBY mode during all modes (except VLLS and LLS).
*
* Example
* @code
* // Enable band 0 and 1 in STANDBY mode except VLLS and LLS
* PMC0_ConfigureSramBankPowerDownStandbyMode(0x3U);
* @endcode
*
* @param bankMask The bands to enable. Logical OR of all bits of band index to enbale.
*/
static inline void PMC0_ConfigureSramBankPowerDownStandbyMode(uint32_t bankMask)
{
PMC0->SRAMCTRL_2 = PMC0_SRAMCTRL_2_SRAM_STDY(bankMask);
}
/*@}*/
#if defined(__cplusplus)
}
#endif /* __cplusplus*/
/*! @}*/
#endif /* _FSL_PMC_H_*/
|
[
"[email protected]"
] | |
d509956d68d73f350eb718fd6cbfe55171856cc0
|
ee07b0939e44ae827c515769226aa1706b4ad3d7
|
/allocate.c
|
3d18e0ba8ad63e578dde798af5c1c9fc543c3ba8
|
[] |
no_license
|
deerishi/project_copy_from_hg
|
3abd11777241b48c9ba958e5b8b8f0a6f5a31b29
|
5251357a5e9a694a995e8f959f0237492e41f19c
|
refs/heads/master
| 2021-01-10T11:53:35.812794 | 2015-10-06T22:26:40 | 2015-10-06T22:26:40 | 43,782,453 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 13,687 |
c
|
/*
* Allocation functions
*
* Copyright (c) 2014, 2015 Gregor Richards
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _BSD_SOURCE /* for MAP_ANON */
#define _DARWIN_C_SOURCE /* for MAP_ANON on OS X */
/* for standards info */
#if defined(unix) || defined(__unix) || defined(__unix__) || \
(defined(__APPLE__) && defined(__MACH__))
#include <unistd.h>
#endif
#if defined(_WIN32)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#if _POSIX_VERSION
#include <sys/mman.h>
#endif
#include "ggggc/gc.h"
#include "ggggc-internals.h"
#ifdef __cplusplus
extern "C" {
#endif
/* figure out which allocator to use */
#if defined(GGGGC_USE_MALLOC)
#define GGGGC_ALLOCATOR_MALLOC 1
#include "allocate-malloc.c"
#elif _POSIX_ADVISORY_INFO >= 200112L
#define GGGGC_ALLOCATOR_POSIX_MEMALIGN 1
#include "allocate-malign.c"
#elif defined(MAP_ANON)
#define GGGGC_ALLOCATOR_MMAP 1
#include "allocate-mmap.c"
#elif defined(_WIN32)
#define GGGGC_ALLOCATOR_VIRTUALALLOC 1
#include "allocate-win-valloc.c"
#else
#warning GGGGC: No allocator available other than malloc!
#define GGGGC_ALLOCATOR_MALLOC 1
#include "allocate-malloc.c"
#endif
/* pools which are freely available */
static ggc_mutex_t freePoolsLock = GGC_MUTEX_INITIALIZER;
static struct GGGGC_Pool *freePoolsHead, *freePoolsTail;
/* allocate and initialize a pool */
static struct GGGGC_Pool *newPool(unsigned char gen, int mustSucceed)
{
struct GGGGC_Pool *ret;
#ifdef GGGGC_DEBUG_TINY_HEAP
static ggc_thread_local int allocationsLeft = GGGGC_GENERATIONS;
if (allocationsLeft-- <= 0) {
allocationsLeft = 0;
if (mustSucceed) {
fprintf(stderr, "GGGGC: exceeded tiny heap size\n");
abort();
}
return NULL;
}
#endif
ret = NULL;
/* try to reuse a pool */
if (freePoolsHead) {
ggc_mutex_lock_raw(&freePoolsLock);
if (freePoolsHead) {
ret = freePoolsHead;
freePoolsHead = freePoolsHead->next;
if (!freePoolsHead) freePoolsTail = NULL;
}
ggc_mutex_unlock(&freePoolsLock);
}
/* otherwise, allocate one */
if (!ret) ret = (struct GGGGC_Pool *) allocPool(mustSucceed);
if (!ret) return NULL;
/* set it up */
ret->next = NULL;
ret->gen = gen;
ret->free = ret->start;
ret->end = (ggc_size_t *) ((unsigned char *) ret + GGGGC_POOL_BYTES);
#if GGGGC_GENERATIONS > 1
/* clear the remembered set */
if (gen > 0)
memset(ret->remember, 0, GGGGC_CARDS_PER_POOL);
/* the first object in the first usable card */
ret->firstObject[GGGGC_CARD_OF(ret->start)] =
(((ggc_size_t) ret->start) & GGGGC_CARD_INNER_MASK) / sizeof(ggc_size_t);
#endif
return ret;
}
/* heuristically expand a generation if it has too many survivors */
void ggggc_expandGeneration(struct GGGGC_Pool *pool)
{
ggc_size_t space, survivors, poolCt;
if (!pool) return;
/* first figure out how much space was used */
space = 0;
survivors = 0;
poolCt = 0;
while (1) {
space += pool->end - pool->start;
survivors += pool->survivors;
pool->survivors = 0;
poolCt++;
if (!pool->next) break;
pool = pool->next;
}
/* now decide if it's too much */
if (survivors > space/2) {
/* allocate more */
ggc_size_t i;
for (i = 0; i < poolCt; i++) {
pool->next = newPool(pool->gen, 0);
pool = pool->next;
if (!pool) break;
}
}
}
/* free a generation (used when a thread exits) */
void ggggc_freeGeneration(struct GGGGC_Pool *pool)
{
if (!pool) return;
ggc_mutex_lock_raw(&freePoolsLock);
if (freePoolsHead) {
freePoolsTail->next = pool;
} else {
freePoolsHead = pool;
}
while (pool->next) pool = pool->next;
freePoolsTail = pool;
ggc_mutex_unlock(&freePoolsLock);
}
/* NOTE: there is code duplication between ggggc_mallocGen0 and
* ggggc_mallocGenN because I can't trust a compiler to inline and optimize for
* the 0 case */
/* allocate an object in generation 0 */
void *ggggc_mallocGen0(struct GGGGC_Descriptor *descriptor, /* the object to allocate */
int force /* allocate a new pool instead of collecting, if necessary */
) {
struct GGGGC_Pool *pool;
struct GGGGC_Header *ret;
retry:
/* get our allocation pool */
if (ggggc_pool0) {
pool = ggggc_pool0;
} else {
ggggc_gen0 = ggggc_pool0 = pool = newPool(0, 1);
}
/* do we have enough space? */
if (pool->end - pool->free >= descriptor->size) {
/* good, allocate here */
ret = (struct GGGGC_Header *) pool->free;
pool->free += descriptor->size;
/* set its descriptor (no need for write barrier, as this is generation 0) */
ret->descriptor__ptr = descriptor;
#ifdef GGGGC_DEBUG_MEMORY_CORRUPTION
ret->ggggc_memoryCorruptionCheck = GGGGC_MEMORY_CORRUPTION_VAL;
#endif
/* and clear the rest (necessary since this goes to the untrusted mutator) */
memset(ret + 1, 0, descriptor->size * sizeof(ggc_size_t) - sizeof(struct GGGGC_Header));
} else if (pool->next) {
ggggc_pool0 = pool = pool->next;
goto retry;
} else if (force) {
/* get a new pool */
pool->next = newPool(0, 1);
ggggc_pool0 = pool = pool->next;
goto retry;
} else {
/* need to collect, which means we need to actually be a GC-safe function */
GGC_PUSH_1(descriptor);
ggggc_collect0(0);
GGC_POP();
pool = ggggc_pool0;
goto retry;
}
return ret;
}
#if GGGGC_GENERATIONS > 1
/* allocate an object in the requested generation > 0 */
void *ggggc_mallocGen1(struct GGGGC_Descriptor *descriptor, /* descriptor for object */
unsigned char gen, /* generation to allocate in */
int force /* allocate a new pool instead of collecting, if necessary */
) {
struct GGGGC_Pool *pool;
struct GGGGC_Header *ret;
retry:
/* get our allocation pool */
if (ggggc_pools[gen]) {
pool = ggggc_pools[gen];
} else {
ggggc_gens[gen] = ggggc_pools[gen] = pool = newPool(gen, 1);
}
/* do we have enough space? */
if (pool->end - pool->free >= descriptor->size) {
ggc_size_t retCard, freeCard;
/* good, allocate here */
ret = (struct GGGGC_Header *) pool->free;
pool->free += descriptor->size;
retCard = GGGGC_CARD_OF(ret);
freeCard = GGGGC_CARD_OF(pool->free);
/* if we passed a card, mark the first object */
if (retCard != freeCard && pool->free < pool->end)
pool->firstObject[freeCard] =
((ggc_size_t) pool->free & GGGGC_CARD_INNER_MASK) / sizeof(ggc_size_t);
/* and clear the next descriptor so that it's clear there's no object
* there (yet) */
if (pool->free < pool->end) *pool->free = 0;
} else if (pool->next) {
ggggc_pools[gen] = pool = pool->next;
goto retry;
} else if (force) {
/* get a new pool */
pool->next = newPool(gen, 1);
ggggc_pools[gen] = pool = pool->next;
goto retry;
} else {
/* failed to allocate */
return NULL;
}
return ret;
}
#endif
/* allocate an object */
void *ggggc_malloc(struct GGGGC_Descriptor *descriptor)
{
return ggggc_mallocGen0(descriptor, 0);
}
struct GGGGC_Array {
struct GGGGC_Header header;
ggc_size_t length;
};
/* allocate a pointer array (size is in words) */
void *ggggc_mallocPointerArray(ggc_size_t sz)
{
struct GGGGC_Descriptor *descriptor = ggggc_allocateDescriptorPA(sz + 1 + sizeof(struct GGGGC_Header)/sizeof(ggc_size_t));
struct GGGGC_Array *ret = (struct GGGGC_Array *) ggggc_malloc(descriptor);
ret->length = sz;
return ret;
}
/* allocate a data array */
void *ggggc_mallocDataArray(ggc_size_t nmemb, ggc_size_t size)
{
ggc_size_t sz = ((nmemb*size)+sizeof(ggc_size_t)-1)/sizeof(ggc_size_t);
struct GGGGC_Descriptor *descriptor = ggggc_allocateDescriptorDA(sz + 1 + sizeof(struct GGGGC_Header)/sizeof(ggc_size_t));
struct GGGGC_Array *ret = (struct GGGGC_Array *) ggggc_malloc(descriptor);
ret->length = nmemb;
return ret;
}
/* allocate a descriptor-descriptor for a descriptor of the given size */
struct GGGGC_Descriptor *ggggc_allocateDescriptorDescriptor(ggc_size_t size)
{
struct GGGGC_Descriptor tmpDescriptor, *ret;
ggc_size_t ddSize;
/* need one description bit for every word in the object */
ddSize = GGGGC_WORD_SIZEOF(struct GGGGC_Descriptor) + GGGGC_DESCRIPTOR_WORDS_REQ(size);
/* check if we already have a descriptor */
if (ggggc_descriptorDescriptors[size])
return ggggc_descriptorDescriptors[size];
/* otherwise, need to allocate one. First lock the space */
ggc_mutex_lock_raw(&ggggc_descriptorDescriptorsLock);
if (ggggc_descriptorDescriptors[size]) {
ggc_mutex_unlock(&ggggc_descriptorDescriptorsLock);
return ggggc_descriptorDescriptors[size];
}
/* now make a temporary descriptor to describe the descriptor descriptor */
tmpDescriptor.header.descriptor__ptr = NULL;
tmpDescriptor.size = ddSize;
tmpDescriptor.pointers[0] = GGGGC_DESCRIPTOR_DESCRIPTION;
/* allocate the descriptor descriptor */
ret = (struct GGGGC_Descriptor *) ggggc_mallocGen0(&tmpDescriptor, 1);
/* make it correct */
ret->size = size;
ret->pointers[0] = GGGGC_DESCRIPTOR_DESCRIPTION;
/* put it in the list */
ggggc_descriptorDescriptors[size] = ret;
ggc_mutex_unlock(&ggggc_descriptorDescriptorsLock);
GGC_PUSH_1(ggggc_descriptorDescriptors[size]);
GGC_GLOBALIZE();
/* and give it a proper descriptor */
ret->header.descriptor__ptr = ggggc_allocateDescriptorDescriptor(ddSize);
return ret;
}
/* allocate a descriptor for an object of the given size in words with the
* given pointer layout */
struct GGGGC_Descriptor *ggggc_allocateDescriptor(ggc_size_t size, ggc_size_t pointers)
{
ggc_size_t pointersA[1];
pointersA[0] = pointers;
return ggggc_allocateDescriptorL(size, pointersA);
}
/* descriptor allocator when more than one word is required to describe the
* pointers */
struct GGGGC_Descriptor *ggggc_allocateDescriptorL(ggc_size_t size, const ggc_size_t *pointers)
{
struct GGGGC_Descriptor *dd, *ret;
ggc_size_t dPWords, dSize;
/* the size of the descriptor */
if (pointers)
dPWords = GGGGC_DESCRIPTOR_WORDS_REQ(size);
else
dPWords = 1;
dSize = GGGGC_WORD_SIZEOF(struct GGGGC_Descriptor) + dPWords;
/* get a descriptor-descriptor for the descriptor we're about to allocate */
dd = ggggc_allocateDescriptorDescriptor(dSize);
/* use that to allocate the descriptor */
ret = (struct GGGGC_Descriptor *) ggggc_mallocGen0(dd, 1);
ret->size = size;
/* and set it up */
if (pointers) {
memcpy(ret->pointers, pointers, sizeof(ggc_size_t) * dPWords);
ret->pointers[0] |= 1; /* first word is always the descriptor pointer */
} else {
ret->pointers[0] = 0;
}
return ret;
}
/* descriptor allocator for pointer arrays */
struct GGGGC_Descriptor *ggggc_allocateDescriptorPA(ggc_size_t size)
{
ggc_size_t *pointers;
ggc_size_t dPWords, i;
/* fill our pointer-words with 1s */
dPWords = GGGGC_DESCRIPTOR_WORDS_REQ(size);
pointers = (ggc_size_t *) alloca(sizeof(ggc_size_t) * dPWords);
for (i = 0; i < dPWords; i++) pointers[i] = (ggc_size_t) -1;
/* get rid of non-pointers */
pointers[0] &= ~(
#ifdef GGGGC_DEBUG_MEMORY_CORRUPTION
0x6
#else
0x4
#endif
);
/* and allocate */
return ggggc_allocateDescriptorL(size, pointers);
}
/* descriptor allocator for data arrays */
struct GGGGC_Descriptor *ggggc_allocateDescriptorDA(ggc_size_t size)
{
/* and allocate */
return ggggc_allocateDescriptorL(size, NULL);
}
/* allocate a descriptor from a descriptor slot */
struct GGGGC_Descriptor *ggggc_allocateDescriptorSlot(struct GGGGC_DescriptorSlot *slot)
{
if (slot->descriptor) return slot->descriptor;
ggc_mutex_lock_raw(&slot->lock);
if (slot->descriptor) {
ggc_mutex_unlock(&slot->lock);
return slot->descriptor;
}
slot->descriptor = ggggc_allocateDescriptor(slot->size, slot->pointers);
/* make the slot descriptor a root */
GGC_PUSH_1(slot->descriptor);
GGC_GLOBALIZE();
ggc_mutex_unlock(&slot->lock);
return slot->descriptor;
}
/* and a combined malloc/allocslot */
void *ggggc_mallocSlot(struct GGGGC_DescriptorSlot *slot)
{
return ggggc_malloc(ggggc_allocateDescriptorSlot(slot));
}
#ifdef __cplusplus
}
#endif
|
[
"[email protected]"
] | |
cd1ee511ff5540870e14ab60f3aaf86089f7f5a1
|
e5289e0780eee7014a2aa699f9f211590fbb770e
|
/filesystem/sysvbfs/bfs.h
|
f69f97eb6247d0dc7fcc123ad24838db7ea00a77
|
[
"BSD-2-Clause"
] |
permissive
|
uchiyama-yasushi/w
|
2abf502d8a84d896a5546dd04d081b2ad4ec7627
|
0323a5aa450bea7cebfedc72c7977086c4796f3b
|
refs/heads/master
| 2020-03-28T03:50:42.574025 | 2018-09-12T13:11:07 | 2018-09-12T13:11:07 | 147,675,353 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 6,270 |
h
|
/* $NetBSD: bfs.h,v 1.5 2008/04/28 20:24:02 martin Exp $ */
/*-
* Copyright (c) 2004, 2009 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by UCHIYAMA Yasushi.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _FS_SYSVBFS_BFS_H_
#define _FS_SYSVBFS_BFS_H_
#include <sys/block_io.h>
/*
* Boot File System
*
* +----------
* |bfs_super_block (512byte)
* | 1 sector
* |
* +----------
* |bfs_inode (64byte) * 8
* | . 1 sector
* |bfs_inode
* +---------- <--- bfs_super_block.header.data_start
* |DATA BLOCK
* | . Root (/) dirent. 1 sector
* |----------
* | .
* |
* +---------- <--- bfs_super_block.header.data_end
*/
/* File system global */
#define BFS_SUPERBLOCK_SIZE 1024 // superblock + ilist
#define BFS_DIRENT_SIZE 512 // root dirent size.
#define DEV_BSIZE 512
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
/* BFS specification */
#define BFS_SECTOR 0 /* no offset */
#define BFS_MAGIC 0x1badface
#define BFS_FILENAME_MAXLEN 14
#define BFS_ROOT_INODE 2
#define BFS_BSIZE 512
#define BFS_BSHIFT 9
typedef int32_t sysvbfs_uid_t;
typedef uint32_t sysvbfs_mode_t;
struct bfs_super_block_header
{
uint32_t magic;
uint32_t data_start_byte;
uint32_t data_end_byte;
} __attribute ((packed));
struct bfs_compaction
{
uint32_t from;
uint32_t to;
uint32_t from_backup;
uint32_t to_backup;
} __attribute ((packed));
struct bfs_fileattr
{
uint32_t type;
#define BFS_FILE_TYPE_DIR 2
#define BFS_FILE_TYPE_FILE 1
uint32_t mode;
int32_t uid;
int32_t gid;
uint32_t nlink;
int32_t atime;
int32_t mtime;
int32_t ctime;
int32_t padding[4];
} __attribute ((packed)); /* 48byte */
struct bfs_inode
{
uint16_t number; /* 0 */
int16_t padding;
uint32_t start_sector; /* 4 */
uint32_t end_sector; /* 8 */
uint32_t eof_offset_byte; /* 12 (offset from super block start) */
struct bfs_fileattr attr; /* 16 */
} __attribute ((packed)); /* 64byte */
struct bfs_super_block
{
struct bfs_super_block_header header;
struct bfs_compaction compaction;
char fsname[6];
char volume[6];
int32_t padding[118];
} __attribute ((packed));
struct bfs_dirent
{
uint16_t inode;
char name[BFS_FILENAME_MAXLEN];
} __attribute ((packed)); /* 16byte */
/* Software definition */
struct bfs
{
int32_t start_sector;
/* Super block */
struct bfs_super_block *super_block;
size_t super_block_size;
/* Data block */
uint32_t data_start, data_end;
/* Inode */
struct bfs_inode *inode;
uint32_t n_inode;
uint32_t max_inode;
/* root directory */
struct bfs_dirent *dirent;
size_t dirent_size;
uint32_t n_dirent;
uint32_t max_dirent;
struct bfs_inode *root_inode;
/* Sector I/O operation */
const struct block_io_ops *io;
bool debug;
};
struct bfs_init_arg
{
struct bfs *bfs;
const struct block_io_ops *io_ops;
daddr_t start_sector;
size_t superblock_size;
size_t dirent_size;
uint8_t *superblock;
uint8_t *dirent;
bool debug;
};
__BEGIN_DECLS
// Initialize all.
int bfs_init (struct bfs_init_arg *);
// Initialze utility functions.
int bfs_init_superblock (struct bfs *, uint32_t, size_t *);
int bfs_init_inode (struct bfs *, uint8_t *, size_t *);
int bfs_init_dirent (struct bfs *, uint8_t *);
// BFS access ops.
int bfs_file_read (const struct bfs *, const char *, void *, size_t, size_t *);
int bfs_file_write (struct bfs *, const char *, void *, size_t);
int bfs_file_create (struct bfs *, const char *, void *, size_t,
const struct bfs_fileattr *);
int bfs_file_delete (struct bfs *, const char *);
int bfs_file_rename (struct bfs *, const char *, const char *);
bool bfs_file_lookup (const struct bfs *, const char *, uint32_t *, uint32_t *,
size_t *);
size_t bfs_file_size (const struct bfs_inode *);
#ifdef BFS_DEBUG
bool bfs_dump (const struct bfs *);
#endif
/* filesystem ops */
struct vnode;
bool bfs_inode_lookup (const struct bfs *, ino_t, struct bfs_inode **);
bool bfs_dirent_lookup_by_name (const struct bfs *, const char *,
struct bfs_dirent **);
bool bfs_dirent_lookup_by_inode (const struct bfs *, uint32_t,
struct bfs_dirent **);
void bfs_inode_set_attr (const struct bfs *, struct bfs_inode *,
const struct bfs_fileattr *);
int bfs_inode_alloc (const struct bfs *, struct bfs_inode **, uint32_t *,
uint32_t *);
/* super block ops. */
bool bfs_superblock_valid (const struct bfs_super_block *);
bool bfs_writeback_dirent (const struct bfs *, struct bfs_dirent *, bool);
bool bfs_writeback_inode (const struct bfs *, struct bfs_inode *);
// Misc util.
struct disklabel;
bool sysvbfs_partition_find (struct disklabel *, uint32_t *);
__END_DECLS
#define ROUND_SECTOR(x) (((x) + 511) & ~511)
#define TRUNC_SECTOR(x) ((x) & ~511)
#if BYTE_ORDER == BIG_ENDIAN
#define BFSVAL16(x) bswap16(x)
#define BFSVAL32(x) bswap32(x)
#else
#define BFSVAL16(x) (x)
#define BFSVAL32(x) (x)
#endif
#endif /* _FS_SYSVBFS_BFS_H_ */
|
[
"[email protected]"
] | |
4027b23d58c96e0077b9d36c4620ebd2c81bd828
|
caf580ccc995f584ea91413da65d135490a92ef5
|
/Ch02/dayofyear/dayofyear.c
|
cc28057bd1ddcd8a0e6e2b3e007454938b3eebaf
|
[] |
no_license
|
traceimp/DoitDSAndAlgorithmC
|
573723dd75a4e3ed96ddd873d56755ace9ec0f07
|
80cd54313ce07e6875c4afa20bac18bf1462e389
|
refs/heads/master
| 2020-03-23T14:22:56.490360 | 2018-08-28T11:57:28 | 2018-08-28T11:57:28 | 141,672,475 | 0 | 0 | null | null | null | null |
UHC
|
C
| false | false | 1,010 |
c
|
// 날 짜: 08/22/2018, 16:02
// 작성자: Kim92
// 내 용: 한 해의 지난 날 수를 구합니다.
#include <stdio.h>
// 각 달의 날 수
int mdays[][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
// year이 윤년인가?
int isleap(int year)
{
return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
}
// y년 m월 d일의 그 해 지난 날 수를 구합니다.
int dayofyear(int y, int m, int d)
{
int i;
int days = d; // 날 수
for (i = 1; i < m; i++)
{
days += mdays[isleap(y)][i - 1];
}
return days;
}
int main(void)
{
int year, month, day; // 년, 월, 일
int retry; // 다시?
do {
printf("년: "); scanf("%d", &year);
printf("월: "); scanf("%d", &month);
printf("일: "); scanf("%d", &day);
printf("%d년의 %d일째입니다.\n", year, dayofyear(year, month, day));
printf("다시 할까요? (1 -> 예 / 0 -> 아니오) : ");
scanf("%d", &retry);
} while (retry == 1);
return 0;
}
|
[
"[email protected]"
] | |
230dec7e521bcf64a777ae7274a474141164ee8e
|
eb41e276803f31882f01edf70f77059755ea47ec
|
/examples/stampaIstogramma.c
|
9e519ae739ea02257da3f70467122fa231673560
|
[] |
no_license
|
kr0bi/Exercises-using-C
|
2d5ddef1e3f4ba90e646fca22d102b35a002350c
|
69800e6a20a14a9d86dc4dfc9a611c03af78f0f7
|
refs/heads/master
| 2020-04-30T04:11:51.659663 | 2019-06-06T21:11:54 | 2019-06-06T21:11:54 | 176,605,682 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 836 |
c
|
#include <stdio.h>
/*
Scrivere un programma C che stampi un istogramma
orizzontale (utilizzando il carattere ’-’) raffigurante le
lunghezze delle parole (delimitate da whitespace characters)
immesse sullo standard input (parola per parola).
*/
int main(){
int c = getchar();
int isPrecedentCharAWhitespace = 0;
printf("\n");
while (c!=EOF){
if (c!='\n' && c!='\t' && c!=' '){
isPrecedentCharAWhitespace = 0;
printf("-");
}
if (isPrecedentCharAWhitespace && (c=='\n' || c=='\t' || c==' ')){
isPrecedentCharAWhitespace = 1;
} else if (c=='\n' || c=='\t' || c==' '){
isPrecedentCharAWhitespace = 1;
printf("\n");
}
c = getchar();
}
printf("\n");
return 0;
}
|
[
"[email protected]"
] | |
1d83d5c40ce7ef5241fa594dfd026a15c8198440
|
150fea402de8b29fabdea9ba7e9be0d198530e8c
|
/src/python/face-expression.build/module.numpy.polynomial.chebyshev.c
|
747827fb5281258c116e659f04612e085fe3d89d
|
[] |
no_license
|
Coderwelsch/FHP-IO-Expression-Mirror
|
189cc667e2a4671c4e6bf0d7651665eb1a76367b
|
dbd0c59c64c8058e283fa7fe4fe2a611c22f511a
|
refs/heads/master
| 2021-06-15T21:39:32.011057 | 2017-04-22T15:45:14 | 2017-04-22T15:45:14 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,187,181 |
c
|
/* Generated code for Python source for module 'numpy.polynomial.chebyshev'
* created by Nuitka version 0.5.24.4
*
* This code is in part copyright 2016 Kay Hayen.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nuitka/prelude.h"
#include "__helpers.h"
/* The _module_numpy$polynomial$chebyshev is a Python object pointer of module type. */
/* Note: For full compatibility with CPython, every module variable access
* needs to go through it except for cases where the module cannot possibly
* have changed in the mean time.
*/
PyObject *module_numpy$polynomial$chebyshev;
PyDictObject *moduledict_numpy$polynomial$chebyshev;
/* The module constants used, if any. */
static PyObject *const_str_plain_chebgrid2d;
static PyObject *const_str_digest_d730471cda2cf58c4389af84924ff824;
extern PyObject *const_list_int_0_list;
extern PyObject *const_tuple_03b7673e655b056e4f0304ce1db40177_tuple;
extern PyObject *const_str_plain_polymulx;
static PyObject *const_str_digest_a2214ca64a473cc223862eac21e8326a;
static PyObject *const_str_plain__npts;
extern PyObject *const_str_plain_as_series;
extern PyObject *const_str_plain_eps;
extern PyObject *const_str_plain__der;
static PyObject *const_str_plain_poly2cheb;
static PyObject *const_str_digest_d148675d1a35f63aa9d40e5df12da1db;
extern PyObject *const_str_plain_sort;
extern PyObject *const_str_digest_3a21fa4bd62cdcaaa70f24e241b85885;
extern PyObject *const_str_plain_shape;
static PyObject *const_str_digest_b56739545be246c7ce3befc0dde1c782;
extern PyObject *const_str_plain__pow;
static PyObject *const_str_digest_39aebea2040c10c591461179e0679786;
extern PyObject *const_float_1_0;
extern PyObject *const_str_plain_warnings;
extern PyObject *const_str_digest_6a43499de4143b7f2feff247d35ef074;
extern PyObject *const_str_plain_rcond;
static PyObject *const_str_digest_50890faa0d99f59fdbd29605f5892123;
extern PyObject *const_str_plain_vx;
static PyObject *const_str_plain_chebval;
extern PyObject *const_tuple_dd080dd474cbe22b968b7ac16c53de9b_tuple;
extern PyObject *const_int_neg_2;
extern PyObject *const_int_neg_1;
extern PyObject *const_list_int_neg_1_int_pos_1_list;
extern PyObject *const_list_int_0_int_pos_1_list;
extern PyObject *const_str_plain_kind;
static PyObject *const_str_plain_cheb2poly;
static PyObject *const_str_plain_chebzero;
extern PyObject *const_str_plain_is_valid;
extern PyObject *const_str_plain_domain;
extern PyObject *const_dict_8c0923655000b74dc494a1a4f40853b5;
extern PyObject *const_str_plain_x;
extern PyObject *const_str_plain_y;
static PyObject *const_str_plain_chebvander2d;
extern PyObject *const_list_empty;
static PyObject *const_str_plain__zseries_int;
extern PyObject *const_str_digest_417a5d06d4d954b63a0b0e1634b358ab;
static PyObject *const_str_plain_chebval2d;
extern PyObject *const_tuple_int_pos_16_tuple;
static PyObject *const_str_plain_chebmulx;
extern PyObject *const_str_plain_lc2;
static PyObject *const_str_digest_53676ffad2343da30563707b2afad824;
extern PyObject *const_str_plain_dtyp;
extern PyObject *const_str_plain_complexfloating;
static PyObject *const_tuple_list_int_neg_1_int_0_int_pos_1_list_tuple;
extern PyObject *const_dict_d61f4d385fe121badbdc8e4bc7fe576f;
extern PyObject *const_float_0_5;
static PyObject *const_str_plain_chebroots;
extern PyObject *const_float_0_0;
extern PyObject *const_tuple_str_plain_x_str_plain_w_tuple;
extern PyObject *const_str_plain_sqrt;
extern PyObject *const_str_plain_ndarray;
extern PyObject *const_dict_1eef64507cf3de8ea0ea857c5e7e1090;
static PyObject *const_str_digest_596bee38b801954be96ae4654072f77d;
extern PyObject *const_str_plain_der;
extern PyObject *const_str_plain_rem;
extern PyObject *const_list_int_pos_1_int_pos_1_list;
extern PyObject *const_str_plain__int;
extern PyObject *const_str_plain_warn;
static PyObject *const_str_digest_30bcc94032272ad7abef138d872998f1;
static PyObject *const_tuple_str_plain_z1_str_plain_z2_tuple;
extern PyObject *const_str_plain_res;
extern PyObject *const_str_plain_top;
extern PyObject *const_str_plain_iterable;
extern PyObject *const_str_plain__fit;
extern PyObject *const_str_plain_prd;
extern PyObject *const_str_plain_vz;
extern PyObject *const_str_plain_vy;
extern PyObject *const_str_plain__val;
extern PyObject *const_str_plain_trim;
static PyObject *const_str_digest_6d2f46e61c57bd5c36eeaf6d7a7ba78d;
static PyObject *const_tuple_str_plain_npts_str_plain__npts_str_plain_x_tuple;
extern PyObject *const_str_plain_degz;
extern PyObject *const_str_plain_degy;
extern PyObject *const_str_plain_degx;
static PyObject *const_tuple_str_plain_zs_str_plain_n_str_plain_ns_str_plain_div_tuple;
extern PyObject *const_tuple_b3c114ff65e5229953139969fd8f9f4c_tuple;
extern PyObject *const_str_plain_full;
extern PyObject *const_str_digest_78d3d8feeb71a8226198d7883e3c64d2;
extern PyObject *const_str_plain_deg;
static PyObject *const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple;
static PyObject *const_str_digest_175ea8d36c7b12750a4d3a571521b63c;
static PyObject *const_tuple_b3903099226e11c8b4628017483cde94_tuple;
extern PyObject *const_str_plain_axis;
extern PyObject *const_str_plain_cos;
extern PyObject *const_dict_5c9928d3d4adf8d21e4940309b7f60ed;
extern PyObject *const_str_plain_power;
extern PyObject *const_tuple_str_plain_polyutils_tuple;
extern PyObject *const_str_digest_b303cff154cb34d4708df3886d4b732e;
extern PyObject *const_str_digest_7776c2b4c0f21c76e792d8c463042f37;
extern PyObject *const_str_plain_lhs;
static PyObject *const_tuple_float_0_5_tuple;
static PyObject *const_tuple_str_plain_c_str_plain_prd_str_plain_tmp_tuple;
static PyObject *const_str_digest_91745a01f8bad2e57e623bcd7f2cdc70;
extern PyObject *const_str_plain_imag;
extern PyObject *const_str_plain_roots;
static PyObject *const_str_digest_91d14919ee9c3d8b3b012ec729f95f08;
static PyObject *const_str_digest_26aa1c91b55abd324e1480ecb82e208f;
extern PyObject *const_str_plain_rhs;
static PyObject *const_str_digest_f805cf5744c74fd66612485eef5ef80d;
static PyObject *const_str_digest_b965dfae6681f1e9314fdb488afbc305;
extern PyObject *const_str_plain_dtype;
extern PyObject *const_str_digest_dbb9a16d39ca754da17294f7f64a4b4b;
static PyObject *const_str_plain_chebfit;
extern PyObject *const_tuple_list_empty_tuple;
static PyObject *const_str_plain_chebsub;
static PyObject *const_str_digest_dad44f5e37d2bfce94dc6c3cbddca88b;
extern PyObject *const_tuple_empty;
extern PyObject *const_str_plain_iaxis;
static PyObject *const_str_plain_chebdomain;
extern PyObject *const_str_plain_lstsq;
extern PyObject *const_str_plain_ndmin;
static PyObject *const_str_digest_5161459d1089c9b763879a3ac6a77ba6;
extern PyObject *const_str_plain_mat;
extern PyObject *const_str_plain_tensor;
extern PyObject *const_str_plain___file__;
static PyObject *const_str_plain_chebtrim;
extern PyObject *const_str_digest_8a21c7bcdaafddc42f6be8149ffdeee8;
static PyObject *const_str_plain__cseries_to_zseries;
extern PyObject *const_str_digest_38178dad4ac962606854d73542c6407a;
extern PyObject *const_str_plain___metaclass__;
extern PyObject *const_str_digest_38ddb95e1ec5856024db3736b3b90fc6;
extern PyObject *const_str_digest_644ceea54723b4814b2af8460d62b8a6;
static PyObject *const_str_plain__zseries_mul;
static PyObject *const_str_digest_aafdd805496b15facd6df5097e7f3fc2;
extern PyObject *const_tuple_list_int_pos_1_list_tuple;
static PyObject *const_str_digest_18f4263df6376995baf57d0496addda9;
extern PyObject *const_str_plain__div;
extern PyObject *const_str_plain_bot;
extern PyObject *const_str_digest_c58373a0fb3d7245efa1b5aed182e608;
extern PyObject *const_str_plain_dlen;
extern PyObject *const_str_plain_empty;
extern PyObject *const_str_plain_linspace;
static PyObject *const_str_plain_chebx;
extern PyObject *const_str_plain__add;
extern PyObject *const_str_plain_scl;
extern PyObject *const_str_plain_all;
extern PyObject *const_str_plain_x2;
extern PyObject *const_str_plain_msg;
static PyObject *const_tuple_str_plain_zs_str_plain_n_str_plain_c_tuple;
static PyObject *const_str_plain__zseries_der;
extern PyObject *const_str_plain_ns;
extern PyObject *const_str_plain_np;
static PyObject *const_str_plain_npts;
extern PyObject *const_str_plain_cc;
extern PyObject *const_tuple_slice_none_none_none_int_neg_1_tuple;
static PyObject *const_str_plain_chebfromroots;
extern PyObject *const_tuple_ellipsis_none_none_slice_none_none_none_tuple;
extern PyObject *const_str_digest_af327786ef70d70118fb639ec7c50f4e;
extern PyObject *const_str_plain_arange;
extern PyObject *const_tuple_int_pos_1_tuple;
extern PyObject *const_str_plain_polyadd;
static PyObject *const_str_plain_chebdiv;
static PyObject *const_str_plain_chebcompanion;
extern PyObject *const_str_plain_lbnd;
static PyObject *const_dict_eb881d67d10ffdd20d6bfa6779384963;
extern PyObject *const_str_plain_rollaxis;
extern PyObject *const_str_plain_division;
extern PyObject *const_str_plain_c0;
extern PyObject *const_str_plain_c1;
extern PyObject *const_str_plain_c2;
extern PyObject *const_str_plain_trimseq;
extern PyObject *const_str_plain_pow;
static PyObject *const_str_digest_233c85cc600a9b14c0b10a1fb4fbe6db;
extern PyObject *const_str_plain_square;
static PyObject *const_str_digest_6ed579e2d70c78162ed851cc41bd9677;
extern PyObject *const_str_plain___future__;
extern PyObject *const_tuple_str_plain_polyadd_str_plain_polysub_str_plain_polymulx_tuple;
extern PyObject *const_str_plain_type;
extern PyObject *const_tuple_str_plain_x_str_plain_y_str_plain_c_tuple;
extern PyObject *const_str_plain_window;
extern PyObject *const_str_plain_real;
static PyObject *const_str_plain_chebgauss;
extern PyObject *const_str_digest_bdb9c499ede16dacf39d6b78c1ed0d5e;
extern PyObject *const_str_plain_size;
static PyObject *const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple;
extern PyObject *const_str_plain_numpy;
extern PyObject *const_tuple_c4b91bcb0776c1f61b0508de5afe5070_tuple;
extern PyObject *const_str_plain_ABCPolyBase;
extern PyObject *const_str_plain_van;
extern PyObject *const_tuple_f5c8b080884def366537140f936da3d2_tuple;
static PyObject *const_str_digest_9e19ec0038c224689601539b44694013;
extern PyObject *const_str_plain_rank;
extern PyObject *const_str_plain_sum;
static PyObject *const_str_digest_11042050cbb26d8ee4e4860179f462c8;
static PyObject *const_str_plain_chebone;
static PyObject *const_list_int_neg_1_int_0_int_pos_1_list;
extern PyObject *const_str_plain_min;
extern PyObject *const_str_plain_dims;
extern PyObject *const_slice_none_none_none;
extern PyObject *const_str_plain_reshape;
extern PyObject *const_int_pos_16;
static PyObject *const_str_plain_chebint;
extern PyObject *const_str_plain_Chebyshev;
extern PyObject *const_str_digest_5075ddfb8c5b93b4cdb1b7871af68165;
static PyObject *const_str_plain__zseries_to_cseries;
extern PyObject *const_str_digest_13227f847c5a19dd9cedee16debb959e;
static PyObject *const_str_plain_chebder;
static PyObject *const_str_plain_cheb;
extern PyObject *const_int_pos_4;
extern PyObject *const_int_pos_2;
extern PyObject *const_int_pos_3;
extern PyObject *const_int_pos_1;
extern PyObject *const_tuple_str_plain_x_str_plain_y_str_plain_z_str_plain_c_tuple;
extern PyObject *const_str_plain__mul;
extern PyObject *const_slice_none_none_int_neg_1;
extern PyObject *const_tuple_true_tuple;
extern PyObject *const_str_plain_array;
extern PyObject *const_list_float_1_0_list;
extern PyObject *const_str_plain__line;
extern PyObject *const_str_plain_polysub;
static PyObject *const_str_plain_chebmul;
extern PyObject *const_str_plain_len1;
extern PyObject *const_str_plain_len2;
extern PyObject *const_str_digest_44e97c1c143647b689f32f77c9c8ec56;
static PyObject *const_str_digest_4890d1a5a66253073e4c13b5ea8b2a92;
extern PyObject *const_tuple_7580a28a8066d67c843612500d5e436f_tuple;
extern PyObject *const_str_plain_id;
extern PyObject *const_str_plain_iu;
extern PyObject *const_list_int_pos_1_int_pos_1_int_pos_1_list;
extern PyObject *const_str_plain_T;
extern PyObject *const_str_plain_nickname;
extern PyObject *const_str_plain_m;
extern PyObject *const_str_plain_n;
extern PyObject *const_str_plain_i;
extern PyObject *const_str_plain_j;
extern PyObject *const_str_plain_k;
extern PyObject *const_str_plain_d;
extern PyObject *const_str_plain_c;
static PyObject *const_str_digest_315673b80cf8d88f6afbcef09a8c782c;
static PyObject *const_str_digest_033499fb1225b6210c0e2529a5c2ae8b;
extern PyObject *const_str_digest_86bddf8ddd67e49da0bc28efd50b11b2;
extern PyObject *const_str_plain_z;
extern PyObject *const_str_plain_t;
extern PyObject *const_str_plain_v;
extern PyObject *const_str_plain_w;
extern PyObject *const_str_plain_p;
extern PyObject *const_str_plain_lmax;
extern PyObject *const_str_plain_r;
extern PyObject *const_str_plain_s;
extern PyObject *const_tuple_int_pos_1_int_pos_1_int_0_tuple;
static PyObject *const_str_digest_25f705d3dc7ace58ece9f82132f49144;
extern PyObject *const_str_plain_convolve;
extern PyObject *const_str_digest_88ea85868dacccabad48a8aef44c097b;
extern PyObject *const_str_plain_double;
extern PyObject *const_str_digest_3943f956186dfbaba7ee5555afa1df28;
extern PyObject *const_tuple_str_plain_ABCPolyBase_tuple;
static PyObject *const_str_digest_f173f8d1728a483a86186daf738d279f;
extern PyObject *const_str_plain__fromroots;
extern PyObject *const_str_plain_tmp;
extern PyObject *const_str_plain_char;
extern PyObject *const_str_plain__roots;
extern PyObject *const_str_plain_lc1;
extern PyObject *const_tuple_str_plain_pol_str_plain_deg_str_plain_res_str_plain_i_tuple;
extern PyObject *const_str_plain_zip;
extern PyObject *const_str_plain___all__;
extern PyObject *const_int_0;
extern PyObject *const_str_digest_2d1bfbe8c32cb9190bf6cbec9abdf62a;
static PyObject *const_str_digest_75ac8b038bcd52cf4c17a0464b571f53;
static PyObject *const_str_digest_ae3bc759ad059aac7c3c42e81a804e6f;
static PyObject *const_str_digest_1142c45194b6b19870360bec4f6bd354;
extern PyObject *const_str_plain_chebyshev;
extern PyObject *const_str_plain_pu;
extern PyObject *const_str_plain_polyutils;
extern PyObject *const_str_digest_6e06792ac9d1e948515e79b21ef14ea6;
extern PyObject *const_tuple_ellipsis_none_slice_none_none_none_tuple;
extern PyObject *const_str_plain_print_function;
extern PyObject *const_str_plain__polybase;
extern PyObject *const_str_plain_pi;
extern PyObject *const_str_plain_copy;
static PyObject *const_str_plain_chebpow;
static PyObject *const_str_digest_a604b5227a4c36bb1219d6662b9216aa;
extern PyObject *const_str_plain_RankWarning;
static PyObject *const_str_plain_chebvander3d;
static PyObject *const_str_digest_6f91fc103df5fd9495bdd958350cedce;
extern PyObject *const_dict_empty;
extern PyObject *const_str_plain_maxpower;
extern PyObject *const_str_plain_zeros;
extern PyObject *const_str_plain__sub;
extern PyObject *const_str_plain_trimcoef;
static PyObject *const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple;
static PyObject *const_str_digest_15fea8edff1a9308d6707bc05b875e29;
extern PyObject *const_str_plain_ones;
static PyObject *const_str_plain_chebgrid3d;
extern PyObject *const_str_plain_eigvals;
extern PyObject *const_str_plain_polynomial;
extern PyObject *const_str_plain_issubclass;
extern PyObject *const_str_plain_off;
static PyObject *const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple;
extern PyObject *const_tuple_str_plain_off_str_plain_scl_tuple;
extern PyObject *const_str_plain_asarray;
extern PyObject *const_str_plain_staticmethod;
extern PyObject *const_list_int_pos_1_list;
extern PyObject *const_str_digest_470eccc427becdbaa48f7e4c1af24ff5;
extern PyObject *const_tuple_ellipsis_none_slice_none_none_none_none_tuple;
extern PyObject *const_str_plain_div;
extern PyObject *const_str_plain_pol;
static PyObject *const_str_plain_chebadd;
static PyObject *const_list_11b4f9a0a02f93f57bd95b7e9809d4f8_list;
extern PyObject *const_dict_ee9b50b2ea01af7ea63a79da3e3468b3;
extern PyObject *const_tuple_bfb436fdc4db90150ff5cf278a4cde93_tuple;
extern PyObject *const_tuple_7299dfc49f86d518d4db7d9847feb902_tuple;
extern PyObject *const_float_2_0;
extern PyObject *const_str_plain_ideg;
extern PyObject *const_str_plain___module__;
extern PyObject *const_tuple_int_neg_1_tuple;
extern PyObject *const_str_plain_la;
static PyObject *const_str_plain_chebline;
extern PyObject *const_str_digest_b3b20c6499548f5f690faa8d63dd85e8;
static PyObject *const_str_plain_chebweight;
static PyObject *const_tuple_7040a335b69a15d833a4424ca8e92109_tuple;
static PyObject *const_tuple_str_plain_deg_str_plain_ideg_str_plain_x_str_plain_w_tuple;
extern PyObject *const_str_digest_58b9c2de86cf9b3c187794eb33218cee;
static PyObject *const_str_digest_dc24b8791e454240e255b3052d7e9d91;
extern PyObject *const_str_plain_list;
extern PyObject *const_str_plain_divmod;
static PyObject *const_str_plain_z1;
extern PyObject *const_str_plain_finfo;
static PyObject *const_str_plain_chebpts2;
extern PyObject *const_str_plain_astype;
extern PyObject *const_tuple_none_false_none_tuple;
static PyObject *const_str_plain_chebpts1;
extern PyObject *const_tuple_str_plain_c_str_plain_m_str_plain_r_tuple;
extern PyObject *const_str_digest_616f6ee3ef74479987454a15fb3cc986;
extern PyObject *const_str_plain_ret;
static PyObject *const_str_plain_chebval3d;
static PyObject *const_tuple_str_plain_c_str_plain_n_str_plain_zs_tuple;
extern PyObject *const_str_plain_order;
extern PyObject *const_tuple_ellipsis_none_none_tuple;
extern PyObject *const_str_digest_ea8c65b23281db7ee7660696e61ab360;
extern PyObject *const_str_plain_ndim;
extern PyObject *const_tuple_ellipsis_none_tuple;
static PyObject *const_str_digest_b54900484b539d63fd51e2cf640744a3;
extern PyObject *const_str_plain_endpoint;
extern PyObject *const_tuple_12007d4ec7f577025a49b2ac80678cc6_tuple;
static PyObject *const_str_digest_e275c56a2eeedb2c7ff03a6fdfb641d0;
static PyObject *const_str_plain_chebvander;
static PyObject *const_str_plain__zseries_div;
static PyObject *const_str_plain_zs;
static PyObject *const_str_digest_7dd010b0d62016b41f6292c1e18d7e72;
extern PyObject *const_str_plain_linalg;
extern PyObject *const_str_plain_absolute_import;
extern PyObject *const_str_plain_quo;
extern PyObject *const_str_plain___doc__;
static PyObject *const_str_digest_c05b7d669965ba8fa24061ba32c55612;
extern PyObject *const_str_plain_resids;
static PyObject *const_str_plain_z2;
extern PyObject *const_str_plain_tuple;
extern PyObject *const_str_empty;
extern PyObject *const_str_plain_cnt;
extern PyObject *const_tuple_3e11cb3b4ce200eeb96b7be63076d2de_tuple;
extern PyObject *const_tuple_str_plain_c1_str_plain_c2_str_plain_ret_tuple;
static PyObject *module_filename_obj;
static bool constants_created = false;
static void createModuleConstants( void )
{
const_str_plain_chebgrid2d = UNSTREAM_STRING( &constant_bin[ 1168299 ], 10, 1 );
const_str_digest_d730471cda2cf58c4389af84924ff824 = UNSTREAM_STRING( &constant_bin[ 1168309 ], 1678, 0 );
const_str_digest_a2214ca64a473cc223862eac21e8326a = UNSTREAM_STRING( &constant_bin[ 1169987 ], 769, 0 );
const_str_plain__npts = UNSTREAM_STRING( &constant_bin[ 1170756 ], 5, 1 );
const_str_plain_poly2cheb = UNSTREAM_STRING( &constant_bin[ 1170761 ], 9, 1 );
const_str_digest_d148675d1a35f63aa9d40e5df12da1db = UNSTREAM_STRING( &constant_bin[ 1170770 ], 499, 0 );
const_str_digest_b56739545be246c7ce3befc0dde1c782 = UNSTREAM_STRING( &constant_bin[ 1171269 ], 1377, 0 );
const_str_digest_39aebea2040c10c591461179e0679786 = UNSTREAM_STRING( &constant_bin[ 1172646 ], 589, 0 );
const_str_digest_50890faa0d99f59fdbd29605f5892123 = UNSTREAM_STRING( &constant_bin[ 1173235 ], 1821, 0 );
const_str_plain_chebval = UNSTREAM_STRING( &constant_bin[ 1169019 ], 7, 1 );
const_str_plain_cheb2poly = UNSTREAM_STRING( &constant_bin[ 1175056 ], 9, 1 );
const_str_plain_chebzero = UNSTREAM_STRING( &constant_bin[ 1175065 ], 8, 1 );
const_str_plain_chebvander2d = UNSTREAM_STRING( &constant_bin[ 1168742 ], 12, 1 );
const_str_plain__zseries_int = UNSTREAM_STRING( &constant_bin[ 1175073 ], 12, 1 );
const_str_plain_chebval2d = UNSTREAM_STRING( &constant_bin[ 1169019 ], 9, 1 );
const_str_plain_chebmulx = UNSTREAM_STRING( &constant_bin[ 1175085 ], 8, 1 );
const_str_digest_53676ffad2343da30563707b2afad824 = UNSTREAM_STRING( &constant_bin[ 1175093 ], 444, 0 );
const_tuple_list_int_neg_1_int_0_int_pos_1_list_tuple = PyTuple_New( 1 );
const_list_int_neg_1_int_0_int_pos_1_list = PyList_New( 3 );
PyList_SET_ITEM( const_list_int_neg_1_int_0_int_pos_1_list, 0, const_int_neg_1 ); Py_INCREF( const_int_neg_1 );
PyList_SET_ITEM( const_list_int_neg_1_int_0_int_pos_1_list, 1, const_int_0 ); Py_INCREF( const_int_0 );
PyList_SET_ITEM( const_list_int_neg_1_int_0_int_pos_1_list, 2, const_int_pos_1 ); Py_INCREF( const_int_pos_1 );
PyTuple_SET_ITEM( const_tuple_list_int_neg_1_int_0_int_pos_1_list_tuple, 0, const_list_int_neg_1_int_0_int_pos_1_list ); Py_INCREF( const_list_int_neg_1_int_0_int_pos_1_list );
const_str_plain_chebroots = UNSTREAM_STRING( &constant_bin[ 1175537 ], 9, 1 );
const_str_digest_596bee38b801954be96ae4654072f77d = UNSTREAM_STRING( &constant_bin[ 1175546 ], 453, 0 );
const_str_digest_30bcc94032272ad7abef138d872998f1 = UNSTREAM_STRING( &constant_bin[ 1175999 ], 1341, 0 );
const_tuple_str_plain_z1_str_plain_z2_tuple = PyTuple_New( 2 );
const_str_plain_z1 = UNSTREAM_STRING( &constant_bin[ 1175654 ], 2, 1 );
PyTuple_SET_ITEM( const_tuple_str_plain_z1_str_plain_z2_tuple, 0, const_str_plain_z1 ); Py_INCREF( const_str_plain_z1 );
const_str_plain_z2 = UNSTREAM_STRING( &constant_bin[ 529975 ], 2, 1 );
PyTuple_SET_ITEM( const_tuple_str_plain_z1_str_plain_z2_tuple, 1, const_str_plain_z2 ); Py_INCREF( const_str_plain_z2 );
const_str_digest_6d2f46e61c57bd5c36eeaf6d7a7ba78d = UNSTREAM_STRING( &constant_bin[ 1177340 ], 1196, 0 );
const_tuple_str_plain_npts_str_plain__npts_str_plain_x_tuple = PyTuple_New( 3 );
const_str_plain_npts = UNSTREAM_STRING( &constant_bin[ 1170757 ], 4, 1 );
PyTuple_SET_ITEM( const_tuple_str_plain_npts_str_plain__npts_str_plain_x_tuple, 0, const_str_plain_npts ); Py_INCREF( const_str_plain_npts );
PyTuple_SET_ITEM( const_tuple_str_plain_npts_str_plain__npts_str_plain_x_tuple, 1, const_str_plain__npts ); Py_INCREF( const_str_plain__npts );
PyTuple_SET_ITEM( const_tuple_str_plain_npts_str_plain__npts_str_plain_x_tuple, 2, const_str_plain_x ); Py_INCREF( const_str_plain_x );
const_tuple_str_plain_zs_str_plain_n_str_plain_ns_str_plain_div_tuple = PyTuple_New( 4 );
const_str_plain_zs = UNSTREAM_STRING( &constant_bin[ 651633 ], 2, 1 );
PyTuple_SET_ITEM( const_tuple_str_plain_zs_str_plain_n_str_plain_ns_str_plain_div_tuple, 0, const_str_plain_zs ); Py_INCREF( const_str_plain_zs );
PyTuple_SET_ITEM( const_tuple_str_plain_zs_str_plain_n_str_plain_ns_str_plain_div_tuple, 1, const_str_plain_n ); Py_INCREF( const_str_plain_n );
PyTuple_SET_ITEM( const_tuple_str_plain_zs_str_plain_n_str_plain_ns_str_plain_div_tuple, 2, const_str_plain_ns ); Py_INCREF( const_str_plain_ns );
PyTuple_SET_ITEM( const_tuple_str_plain_zs_str_plain_n_str_plain_ns_str_plain_div_tuple, 3, const_str_plain_div ); Py_INCREF( const_str_plain_div );
const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple = PyTuple_New( 8 );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 0, const_str_plain_c1 ); Py_INCREF( const_str_plain_c1 );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 1, const_str_plain_c2 ); Py_INCREF( const_str_plain_c2 );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 2, const_str_plain_lc1 ); Py_INCREF( const_str_plain_lc1 );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 3, const_str_plain_lc2 ); Py_INCREF( const_str_plain_lc2 );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 4, const_str_plain_z1 ); Py_INCREF( const_str_plain_z1 );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 5, const_str_plain_z2 ); Py_INCREF( const_str_plain_z2 );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 6, const_str_plain_quo ); Py_INCREF( const_str_plain_quo );
PyTuple_SET_ITEM( const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 7, const_str_plain_rem ); Py_INCREF( const_str_plain_rem );
const_str_digest_175ea8d36c7b12750a4d3a571521b63c = UNSTREAM_STRING( &constant_bin[ 1178536 ], 406, 0 );
const_tuple_b3903099226e11c8b4628017483cde94_tuple = PyTuple_New( 5 );
PyTuple_SET_ITEM( const_tuple_b3903099226e11c8b4628017483cde94_tuple, 0, const_str_plain_zs ); Py_INCREF( const_str_plain_zs );
PyTuple_SET_ITEM( const_tuple_b3903099226e11c8b4628017483cde94_tuple, 1, const_str_plain_n ); Py_INCREF( const_str_plain_n );
PyTuple_SET_ITEM( const_tuple_b3903099226e11c8b4628017483cde94_tuple, 2, const_str_plain_ns ); Py_INCREF( const_str_plain_ns );
PyTuple_SET_ITEM( const_tuple_b3903099226e11c8b4628017483cde94_tuple, 3, const_str_plain_d ); Py_INCREF( const_str_plain_d );
PyTuple_SET_ITEM( const_tuple_b3903099226e11c8b4628017483cde94_tuple, 4, const_str_plain_r ); Py_INCREF( const_str_plain_r );
const_tuple_float_0_5_tuple = PyTuple_New( 1 );
PyTuple_SET_ITEM( const_tuple_float_0_5_tuple, 0, const_float_0_5 ); Py_INCREF( const_float_0_5 );
const_tuple_str_plain_c_str_plain_prd_str_plain_tmp_tuple = PyTuple_New( 3 );
PyTuple_SET_ITEM( const_tuple_str_plain_c_str_plain_prd_str_plain_tmp_tuple, 0, const_str_plain_c ); Py_INCREF( const_str_plain_c );
PyTuple_SET_ITEM( const_tuple_str_plain_c_str_plain_prd_str_plain_tmp_tuple, 1, const_str_plain_prd ); Py_INCREF( const_str_plain_prd );
PyTuple_SET_ITEM( const_tuple_str_plain_c_str_plain_prd_str_plain_tmp_tuple, 2, const_str_plain_tmp ); Py_INCREF( const_str_plain_tmp );
const_str_digest_91745a01f8bad2e57e623bcd7f2cdc70 = UNSTREAM_STRING( &constant_bin[ 1178942 ], 3219, 0 );
const_str_digest_91d14919ee9c3d8b3b012ec729f95f08 = UNSTREAM_STRING( &constant_bin[ 1182161 ], 915, 0 );
const_str_digest_26aa1c91b55abd324e1480ecb82e208f = UNSTREAM_STRING( &constant_bin[ 1183076 ], 68, 0 );
const_str_digest_f805cf5744c74fd66612485eef5ef80d = UNSTREAM_STRING( &constant_bin[ 1183144 ], 409, 0 );
const_str_digest_b965dfae6681f1e9314fdb488afbc305 = UNSTREAM_STRING( &constant_bin[ 1183553 ], 1541, 0 );
const_str_plain_chebfit = UNSTREAM_STRING( &constant_bin[ 1180952 ], 7, 1 );
const_str_plain_chebsub = UNSTREAM_STRING( &constant_bin[ 1170698 ], 7, 1 );
const_str_digest_dad44f5e37d2bfce94dc6c3cbddca88b = UNSTREAM_STRING( &constant_bin[ 1177161 ], 26, 0 );
const_str_plain_chebdomain = UNSTREAM_STRING( &constant_bin[ 1179349 ], 10, 1 );
const_str_digest_5161459d1089c9b763879a3ac6a77ba6 = UNSTREAM_STRING( &constant_bin[ 1185094 ], 652, 0 );
const_str_plain_chebtrim = UNSTREAM_STRING( &constant_bin[ 1181120 ], 8, 1 );
const_str_plain__cseries_to_zseries = UNSTREAM_STRING( &constant_bin[ 1185746 ], 19, 1 );
const_str_plain__zseries_mul = UNSTREAM_STRING( &constant_bin[ 1185765 ], 12, 1 );
const_str_digest_aafdd805496b15facd6df5097e7f3fc2 = UNSTREAM_STRING( &constant_bin[ 1185777 ], 1311, 0 );
const_str_digest_18f4263df6376995baf57d0496addda9 = UNSTREAM_STRING( &constant_bin[ 1187088 ], 4881, 0 );
const_str_plain_chebx = UNSTREAM_STRING( &constant_bin[ 1179587 ], 5, 1 );
const_tuple_str_plain_zs_str_plain_n_str_plain_c_tuple = PyTuple_New( 3 );
PyTuple_SET_ITEM( const_tuple_str_plain_zs_str_plain_n_str_plain_c_tuple, 0, const_str_plain_zs ); Py_INCREF( const_str_plain_zs );
PyTuple_SET_ITEM( const_tuple_str_plain_zs_str_plain_n_str_plain_c_tuple, 1, const_str_plain_n ); Py_INCREF( const_str_plain_n );
PyTuple_SET_ITEM( const_tuple_str_plain_zs_str_plain_n_str_plain_c_tuple, 2, const_str_plain_c ); Py_INCREF( const_str_plain_c );
const_str_plain__zseries_der = UNSTREAM_STRING( &constant_bin[ 1191969 ], 12, 1 );
const_str_plain_chebfromroots = UNSTREAM_STRING( &constant_bin[ 1180450 ], 13, 1 );
const_str_plain_chebdiv = UNSTREAM_STRING( &constant_bin[ 1170716 ], 7, 1 );
const_str_plain_chebcompanion = UNSTREAM_STRING( &constant_bin[ 1180883 ], 13, 1 );
const_dict_eb881d67d10ffdd20d6bfa6779384963 = _PyDict_NewPresized( 1 );
PyDict_SetItem( const_dict_eb881d67d10ffdd20d6bfa6779384963, const_str_plain_endpoint, Py_False );
assert( PyDict_Size( const_dict_eb881d67d10ffdd20d6bfa6779384963 ) == 1 );
const_str_digest_233c85cc600a9b14c0b10a1fb4fbe6db = UNSTREAM_STRING( &constant_bin[ 1191981 ], 521, 0 );
const_str_digest_6ed579e2d70c78162ed851cc41bd9677 = UNSTREAM_STRING( &constant_bin[ 1192502 ], 660, 0 );
const_str_plain_chebgauss = UNSTREAM_STRING( &constant_bin[ 1180773 ], 9, 1 );
const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple = PyTuple_New( 12 );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 0, const_str_plain_z1 ); Py_INCREF( const_str_plain_z1 );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 1, const_str_plain_z2 ); Py_INCREF( const_str_plain_z2 );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 2, const_str_plain_len1 ); Py_INCREF( const_str_plain_len1 );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 3, const_str_plain_len2 ); Py_INCREF( const_str_plain_len2 );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 4, const_str_plain_dlen ); Py_INCREF( const_str_plain_dlen );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 5, const_str_plain_scl ); Py_INCREF( const_str_plain_scl );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 6, const_str_plain_quo ); Py_INCREF( const_str_plain_quo );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 7, const_str_plain_i ); Py_INCREF( const_str_plain_i );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 8, const_str_plain_j ); Py_INCREF( const_str_plain_j );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 9, const_str_plain_r ); Py_INCREF( const_str_plain_r );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 10, const_str_plain_tmp ); Py_INCREF( const_str_plain_tmp );
PyTuple_SET_ITEM( const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 11, const_str_plain_rem ); Py_INCREF( const_str_plain_rem );
const_str_digest_9e19ec0038c224689601539b44694013 = UNSTREAM_STRING( &constant_bin[ 1193162 ], 1768, 0 );
const_str_digest_11042050cbb26d8ee4e4860179f462c8 = UNSTREAM_STRING( &constant_bin[ 1194930 ], 1607, 0 );
const_str_plain_chebone = UNSTREAM_STRING( &constant_bin[ 1179498 ], 7, 1 );
const_str_plain_chebint = UNSTREAM_STRING( &constant_bin[ 1180374 ], 7, 1 );
const_str_plain__zseries_to_cseries = UNSTREAM_STRING( &constant_bin[ 1196537 ], 19, 1 );
const_str_plain_chebder = UNSTREAM_STRING( &constant_bin[ 1180325 ], 7, 1 );
const_str_plain_cheb = UNSTREAM_STRING( &constant_bin[ 1150084 ], 4, 1 );
const_str_plain_chebmul = UNSTREAM_STRING( &constant_bin[ 1170707 ], 7, 1 );
const_str_digest_4890d1a5a66253073e4c13b5ea8b2a92 = UNSTREAM_STRING( &constant_bin[ 1196556 ], 1698, 0 );
const_str_digest_315673b80cf8d88f6afbcef09a8c782c = UNSTREAM_STRING( &constant_bin[ 1198254 ], 754, 0 );
const_str_digest_033499fb1225b6210c0e2529a5c2ae8b = UNSTREAM_STRING( &constant_bin[ 1199008 ], 1204, 0 );
const_str_digest_25f705d3dc7ace58ece9f82132f49144 = UNSTREAM_STRING( &constant_bin[ 1200212 ], 1928, 0 );
const_str_digest_f173f8d1728a483a86186daf738d279f = UNSTREAM_STRING( &constant_bin[ 1202140 ], 503, 0 );
const_str_digest_75ac8b038bcd52cf4c17a0464b571f53 = UNSTREAM_STRING( &constant_bin[ 1202643 ], 1022, 0 );
const_str_digest_ae3bc759ad059aac7c3c42e81a804e6f = UNSTREAM_STRING( &constant_bin[ 1203665 ], 1075, 0 );
const_str_digest_1142c45194b6b19870360bec4f6bd354 = UNSTREAM_STRING( &constant_bin[ 1204740 ], 3242, 0 );
const_str_plain_chebpow = UNSTREAM_STRING( &constant_bin[ 1171887 ], 7, 1 );
const_str_digest_a604b5227a4c36bb1219d6662b9216aa = UNSTREAM_STRING( &constant_bin[ 1207982 ], 20, 0 );
const_str_plain_chebvander3d = UNSTREAM_STRING( &constant_bin[ 1169898 ], 12, 1 );
const_str_digest_6f91fc103df5fd9495bdd958350cedce = UNSTREAM_STRING( &constant_bin[ 1208002 ], 17, 0 );
const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple = PyTuple_New( 7 );
PyTuple_SET_ITEM( const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 0, const_str_plain_c ); Py_INCREF( const_str_plain_c );
PyTuple_SET_ITEM( const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 1, const_str_plain_pow ); Py_INCREF( const_str_plain_pow );
PyTuple_SET_ITEM( const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 2, const_str_plain_maxpower ); Py_INCREF( const_str_plain_maxpower );
PyTuple_SET_ITEM( const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 3, const_str_plain_power ); Py_INCREF( const_str_plain_power );
PyTuple_SET_ITEM( const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 4, const_str_plain_zs ); Py_INCREF( const_str_plain_zs );
PyTuple_SET_ITEM( const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 5, const_str_plain_prd ); Py_INCREF( const_str_plain_prd );
PyTuple_SET_ITEM( const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 6, const_str_plain_i ); Py_INCREF( const_str_plain_i );
const_str_digest_15fea8edff1a9308d6707bc05b875e29 = UNSTREAM_STRING( &constant_bin[ 1208019 ], 1871, 0 );
const_str_plain_chebgrid3d = UNSTREAM_STRING( &constant_bin[ 1180233 ], 10, 1 );
const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple = PyTuple_New( 8 );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 0, const_str_plain_x ); Py_INCREF( const_str_plain_x );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 1, const_str_plain_c ); Py_INCREF( const_str_plain_c );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 2, const_str_plain_tensor ); Py_INCREF( const_str_plain_tensor );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 3, const_str_plain_c0 ); Py_INCREF( const_str_plain_c0 );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 4, const_str_plain_c1 ); Py_INCREF( const_str_plain_c1 );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 5, const_str_plain_x2 ); Py_INCREF( const_str_plain_x2 );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 6, const_str_plain_i ); Py_INCREF( const_str_plain_i );
PyTuple_SET_ITEM( const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 7, const_str_plain_tmp ); Py_INCREF( const_str_plain_tmp );
const_str_plain_chebadd = UNSTREAM_STRING( &constant_bin[ 1170689 ], 7, 1 );
const_list_11b4f9a0a02f93f57bd95b7e9809d4f8_list = PyMarshal_ReadObjectFromString( (char *)&constant_bin[ 1209890 ], 456 );
const_str_plain_chebline = UNSTREAM_STRING( &constant_bin[ 1181187 ], 8, 1 );
const_str_plain_chebweight = UNSTREAM_STRING( &constant_bin[ 1180838 ], 10, 1 );
const_tuple_7040a335b69a15d833a4424ca8e92109_tuple = PyTuple_New( 6 );
PyTuple_SET_ITEM( const_tuple_7040a335b69a15d833a4424ca8e92109_tuple, 0, const_str_plain_c1 ); Py_INCREF( const_str_plain_c1 );
PyTuple_SET_ITEM( const_tuple_7040a335b69a15d833a4424ca8e92109_tuple, 1, const_str_plain_c2 ); Py_INCREF( const_str_plain_c2 );
PyTuple_SET_ITEM( const_tuple_7040a335b69a15d833a4424ca8e92109_tuple, 2, const_str_plain_z1 ); Py_INCREF( const_str_plain_z1 );
PyTuple_SET_ITEM( const_tuple_7040a335b69a15d833a4424ca8e92109_tuple, 3, const_str_plain_z2 ); Py_INCREF( const_str_plain_z2 );
PyTuple_SET_ITEM( const_tuple_7040a335b69a15d833a4424ca8e92109_tuple, 4, const_str_plain_prd ); Py_INCREF( const_str_plain_prd );
PyTuple_SET_ITEM( const_tuple_7040a335b69a15d833a4424ca8e92109_tuple, 5, const_str_plain_ret ); Py_INCREF( const_str_plain_ret );
const_tuple_str_plain_deg_str_plain_ideg_str_plain_x_str_plain_w_tuple = PyTuple_New( 4 );
PyTuple_SET_ITEM( const_tuple_str_plain_deg_str_plain_ideg_str_plain_x_str_plain_w_tuple, 0, const_str_plain_deg ); Py_INCREF( const_str_plain_deg );
PyTuple_SET_ITEM( const_tuple_str_plain_deg_str_plain_ideg_str_plain_x_str_plain_w_tuple, 1, const_str_plain_ideg ); Py_INCREF( const_str_plain_ideg );
PyTuple_SET_ITEM( const_tuple_str_plain_deg_str_plain_ideg_str_plain_x_str_plain_w_tuple, 2, const_str_plain_x ); Py_INCREF( const_str_plain_x );
PyTuple_SET_ITEM( const_tuple_str_plain_deg_str_plain_ideg_str_plain_x_str_plain_w_tuple, 3, const_str_plain_w ); Py_INCREF( const_str_plain_w );
const_str_digest_dc24b8791e454240e255b3052d7e9d91 = UNSTREAM_STRING( &constant_bin[ 1210346 ], 510, 0 );
const_str_plain_chebpts2 = UNSTREAM_STRING( &constant_bin[ 1175473 ], 8, 1 );
const_str_plain_chebpts1 = UNSTREAM_STRING( &constant_bin[ 1181015 ], 8, 1 );
const_str_plain_chebval3d = UNSTREAM_STRING( &constant_bin[ 1169923 ], 9, 1 );
const_tuple_str_plain_c_str_plain_n_str_plain_zs_tuple = PyTuple_New( 3 );
PyTuple_SET_ITEM( const_tuple_str_plain_c_str_plain_n_str_plain_zs_tuple, 0, const_str_plain_c ); Py_INCREF( const_str_plain_c );
PyTuple_SET_ITEM( const_tuple_str_plain_c_str_plain_n_str_plain_zs_tuple, 1, const_str_plain_n ); Py_INCREF( const_str_plain_n );
PyTuple_SET_ITEM( const_tuple_str_plain_c_str_plain_n_str_plain_zs_tuple, 2, const_str_plain_zs ); Py_INCREF( const_str_plain_zs );
const_str_digest_b54900484b539d63fd51e2cf640744a3 = UNSTREAM_STRING( &constant_bin[ 1210856 ], 17, 0 );
const_str_digest_e275c56a2eeedb2c7ff03a6fdfb641d0 = UNSTREAM_STRING( &constant_bin[ 1210873 ], 2412, 0 );
const_str_plain_chebvander = UNSTREAM_STRING( &constant_bin[ 1168742 ], 10, 1 );
const_str_plain__zseries_div = UNSTREAM_STRING( &constant_bin[ 1213285 ], 12, 1 );
const_str_digest_7dd010b0d62016b41f6292c1e18d7e72 = UNSTREAM_STRING( &constant_bin[ 1213297 ], 955, 0 );
const_str_digest_c05b7d669965ba8fa24061ba32c55612 = UNSTREAM_STRING( &constant_bin[ 1214252 ], 1110, 0 );
constants_created = true;
}
#ifndef __NUITKA_NO_ASSERT__
void checkModuleConstants_numpy$polynomial$chebyshev( void )
{
// The module may not have been used at all.
if (constants_created == false) return;
}
#endif
// The module code objects.
static PyCodeObject *codeobj_2dbf69ca74a52a8c39d01c93229e7390;
static PyCodeObject *codeobj_78d870ed2207e40304cb9938f7e8d36c;
static PyCodeObject *codeobj_74f56bacaea045ac7ed51ddff313927f;
static PyCodeObject *codeobj_cdb373cbd9d7f7a0b77418e495388b5d;
static PyCodeObject *codeobj_ea2bd15f094960ad95e165b65ec1757b;
static PyCodeObject *codeobj_b1e4db155389da72293d68fa9783c18a;
static PyCodeObject *codeobj_6d62e10287a50ca7be124e2da960baa0;
static PyCodeObject *codeobj_9faaac09f2ff8b3a69284badcaa6537f;
static PyCodeObject *codeobj_0c65ed6d15fbdd18c7d28564340c98aa;
static PyCodeObject *codeobj_b748062eaaf5bababb7639bbf5a9a89d;
static PyCodeObject *codeobj_14c198ee31bc49db1b48768c7f5fecfa;
static PyCodeObject *codeobj_4b2248855722ce0a771e7e3c01e97737;
static PyCodeObject *codeobj_6192c23cf938043a03b6b291141acecd;
static PyCodeObject *codeobj_362d59b19030f8ddae7e628f283551bc;
static PyCodeObject *codeobj_d451aebc789cda2cdc07f5b7a0077151;
static PyCodeObject *codeobj_7c8569bee2299d0f91164c60e0652559;
static PyCodeObject *codeobj_528155342008e407dab9d4317e672fcc;
static PyCodeObject *codeobj_c64bd8ada1cd1ed14dd441e7b136720c;
static PyCodeObject *codeobj_0bc0647005540ac24d91c223cd223201;
static PyCodeObject *codeobj_5b8c601cfec3d8eb92b4552f0bc37453;
static PyCodeObject *codeobj_3bb7695a13175ba50a73d402f1d1db82;
static PyCodeObject *codeobj_496154e52512bea566bbf13b71f174f5;
static PyCodeObject *codeobj_21cba8e29a9f5721941e3baaead8c7ac;
static PyCodeObject *codeobj_515d1ac2f0fd0e1d6d9a6d2ee92af025;
static PyCodeObject *codeobj_44580acb538b0b14f80bdf28eaa66d6a;
static PyCodeObject *codeobj_ec9b194068ae3a9d20e09b996d4581a4;
static PyCodeObject *codeobj_0748bfa3c3d7914246a3d01d0bbd12ff;
static PyCodeObject *codeobj_b6d606b188c155ee8279f00fe663ec4b;
static PyCodeObject *codeobj_7962b09788fcf5188ca5da0c5eba41ef;
static PyCodeObject *codeobj_646a43fada7fcea4eabeb7c5463160c6;
static PyCodeObject *codeobj_b18cf6202ddae6fff5513d44cb983db0;
static PyCodeObject *codeobj_c9989ee744c4754eacec604f1590d3ed;
static PyCodeObject *codeobj_d69d9d0178bd93314044488c8d975dfd;
static PyCodeObject *codeobj_4bdfde0901092e64b2ff2f557e21b27b;
static PyCodeObject *codeobj_74ea994fb502f67d1d0f5cdfcabb713d;
static void createModuleCodeObjects(void)
{
module_filename_obj = const_str_digest_26aa1c91b55abd324e1480ecb82e208f;
codeobj_2dbf69ca74a52a8c39d01c93229e7390 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_Chebyshev, 2041, const_tuple_empty, 0, CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_78d870ed2207e40304cb9938f7e8d36c = MAKE_CODEOBJ( module_filename_obj, const_str_plain__cseries_to_zseries, 113, const_tuple_str_plain_c_str_plain_n_str_plain_zs_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_74f56bacaea045ac7ed51ddff313927f = MAKE_CODEOBJ( module_filename_obj, const_str_plain__zseries_der, 257, const_tuple_b3903099226e11c8b4628017483cde94_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_cdb373cbd9d7f7a0b77418e495388b5d = MAKE_CODEOBJ( module_filename_obj, const_str_plain__zseries_div, 190, const_tuple_b10b864152e2895aca0699ce12cb6c88_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_ea2bd15f094960ad95e165b65ec1757b = MAKE_CODEOBJ( module_filename_obj, const_str_plain__zseries_int, 289, const_tuple_str_plain_zs_str_plain_n_str_plain_ns_str_plain_div_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_b1e4db155389da72293d68fa9783c18a = MAKE_CODEOBJ( module_filename_obj, const_str_plain__zseries_mul, 163, const_tuple_str_plain_z1_str_plain_z2_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_6d62e10287a50ca7be124e2da960baa0 = MAKE_CODEOBJ( module_filename_obj, const_str_plain__zseries_to_cseries, 138, const_tuple_str_plain_zs_str_plain_n_str_plain_c_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_9faaac09f2ff8b3a69284badcaa6537f = MAKE_CODEOBJ( module_filename_obj, const_str_plain_cheb2poly, 377, const_tuple_c4b91bcb0776c1f61b0508de5afe5070_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_0c65ed6d15fbdd18c7d28564340c98aa = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebadd, 558, const_tuple_str_plain_c1_str_plain_c2_str_plain_ret_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_b748062eaaf5bababb7639bbf5a9a89d = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebcompanion, 1793, const_tuple_03b7673e655b056e4f0304ce1db40177_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_14c198ee31bc49db1b48768c7f5fecfa = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebder, 868, const_tuple_bfb436fdc4db90150ff5cf278a4cde93_tuple, 4, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_4b2248855722ce0a771e7e3c01e97737 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebdiv, 750, const_tuple_01a9b9139a0f7027bf3af6ea8e36507e_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_6192c23cf938043a03b6b291141acecd = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebfit, 1597, const_tuple_f5c8b080884def366537140f936da3d2_tuple, 6, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_362d59b19030f8ddae7e628f283551bc = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebfromroots, 492, const_tuple_7299dfc49f86d518d4db7d9847feb902_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_d451aebc789cda2cdc07f5b7a0077151 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebgauss, 1894, const_tuple_str_plain_deg_str_plain_ideg_str_plain_x_str_plain_w_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_7c8569bee2299d0f91164c60e0652559 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebgrid2d, 1241, const_tuple_str_plain_x_str_plain_y_str_plain_c_tuple, 3, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_528155342008e407dab9d4317e672fcc = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebgrid3d, 1355, const_tuple_str_plain_x_str_plain_y_str_plain_z_str_plain_c_tuple, 4, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_c64bd8ada1cd1ed14dd441e7b136720c = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebint, 967, const_tuple_7580a28a8066d67c843612500d5e436f_tuple, 6, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_0bc0647005540ac24d91c223cd223201 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebline, 456, const_tuple_str_plain_off_str_plain_scl_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_5b8c601cfec3d8eb92b4552f0bc37453 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebmul, 701, const_tuple_7040a335b69a15d833a4424ca8e92109_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_3bb7695a13175ba50a73d402f1d1db82 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebmulx, 661, const_tuple_str_plain_c_str_plain_prd_str_plain_tmp_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_496154e52512bea566bbf13b71f174f5 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebpow, 816, const_tuple_1180f58d04d1338691e4d5b17ab4b750_tuple, 3, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_21cba8e29a9f5721941e3baaead8c7ac = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebpts1, 1967, const_tuple_str_plain_npts_str_plain__npts_str_plain_x_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_515d1ac2f0fd0e1d6d9a6d2ee92af025 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebpts2, 2004, const_tuple_str_plain_npts_str_plain__npts_str_plain_x_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_44580acb538b0b14f80bdf28eaa66d6a = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebroots, 1838, const_tuple_str_plain_c_str_plain_m_str_plain_r_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_ec9b194068ae3a9d20e09b996d4581a4 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebsub, 608, const_tuple_str_plain_c1_str_plain_c2_str_plain_ret_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_0748bfa3c3d7914246a3d01d0bbd12ff = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebval, 1098, const_tuple_3a70f53d6a8490b17c9a5c2efcb25027_tuple, 3, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_b6d606b188c155ee8279f00fe663ec4b = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebval2d, 1185, const_tuple_str_plain_x_str_plain_y_str_plain_c_tuple, 3, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_7962b09788fcf5188ca5da0c5eba41ef = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebval3d, 1296, const_tuple_str_plain_x_str_plain_y_str_plain_z_str_plain_c_tuple, 4, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_646a43fada7fcea4eabeb7c5463160c6 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebvander, 1414, const_tuple_12007d4ec7f577025a49b2ac80678cc6_tuple, 2, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_b18cf6202ddae6fff5513d44cb983db0 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebvander2d, 1469, const_tuple_dd080dd474cbe22b968b7ac16c53de9b_tuple, 3, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_c9989ee744c4754eacec604f1590d3ed = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebvander3d, 1532, const_tuple_3e11cb3b4ce200eeb96b7be63076d2de_tuple, 4, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_d69d9d0178bd93314044488c8d975dfd = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebweight, 1939, const_tuple_str_plain_x_str_plain_w_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_4bdfde0901092e64b2ff2f557e21b27b = MAKE_CODEOBJ( module_filename_obj, const_str_plain_chebyshev, 1, const_tuple_empty, 0, CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
codeobj_74ea994fb502f67d1d0f5cdfcabb713d = MAKE_CODEOBJ( module_filename_obj, const_str_plain_poly2cheb, 327, const_tuple_str_plain_pol_str_plain_deg_str_plain_res_str_plain_i_tuple, 1, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE | CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_PRINT_FUNCTION );
}
// The module function declarations.
NUITKA_LOCAL_MODULE PyObject *impl_numpy$polynomial$chebyshev$$$class_1_Chebyshev( PyObject **python_pars );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_10_chebfromroots( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_11_chebadd( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_12_chebsub( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_13_chebmulx( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_14_chebmul( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_15_chebdiv( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_16_chebpow( PyObject *defaults );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_17_chebder( PyObject *defaults );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_18_chebint( PyObject *defaults );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_19_chebval( PyObject *defaults );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_1__cseries_to_zseries( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_20_chebval2d( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_21_chebgrid2d( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_22_chebval3d( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_23_chebgrid3d( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_24_chebvander( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_25_chebvander2d( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_26_chebvander3d( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_27_chebfit( PyObject *defaults );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_28_chebcompanion( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_29_chebroots( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_2__zseries_to_cseries( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_30_chebgauss( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_31_chebweight( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_32_chebpts1( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_33_chebpts2( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_3__zseries_mul( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_4__zseries_div( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_5__zseries_der( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_6__zseries_int( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_7_poly2cheb( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_8_cheb2poly( );
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_9_chebline( );
// The module function definitions.
static PyObject *impl_numpy$polynomial$chebyshev$$$function_1__cseries_to_zseries( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *var_n = NULL;
PyObject *var_zs = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_called_name_1;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_sliceass_lower_1;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_value_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscript_name_1;
PyObject *tmp_tuple_element_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_78d870ed2207e40304cb9938f7e8d36c, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = par_c;
tmp_assign_source_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_size );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 132;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_1;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 133;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_zeros );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 133;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_left_name_2 = const_int_pos_2;
tmp_right_name_1 = var_n;
tmp_left_name_1 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
exception_lineno = 133;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_int_pos_1;
tmp_tuple_element_1 = BINARY_OPERATION_SUB( tmp_left_name_1, tmp_right_name_2 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_tuple_element_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
exception_lineno = 133;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_3 = par_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 133;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 133;
tmp_assign_source_2 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 133;
goto frame_exception_exit_1;
}
assert( var_zs == NULL );
var_zs = tmp_assign_source_2;
tmp_left_name_3 = par_c;
tmp_right_name_3 = const_int_pos_2;
tmp_sliceass_value_1 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_3, tmp_right_name_3 );
if ( tmp_sliceass_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 134;
goto frame_exception_exit_1;
}
tmp_sliceass_target_1 = var_zs;
tmp_left_name_4 = var_n;
tmp_right_name_4 = const_int_pos_1;
tmp_sliceass_lower_1 = BINARY_OPERATION_SUB( tmp_left_name_4, tmp_right_name_4 );
if ( tmp_sliceass_lower_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_sliceass_value_1 );
exception_lineno = 134;
goto frame_exception_exit_1;
}
tmp_result = SET_SLICE( tmp_sliceass_target_1, tmp_sliceass_lower_1, Py_None, tmp_sliceass_value_1 );
Py_DECREF( tmp_sliceass_lower_1 );
Py_DECREF( tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 134;
goto frame_exception_exit_1;
}
tmp_left_name_5 = var_zs;
tmp_subscribed_name_1 = var_zs;
tmp_subscript_name_1 = const_slice_none_none_int_neg_1;
tmp_right_name_5 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_right_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 135;
goto frame_exception_exit_1;
}
tmp_return_value = BINARY_OPERATION_ADD( tmp_left_name_5, tmp_right_name_5 );
Py_DECREF( tmp_right_name_5 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 135;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_zs )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_zs,
var_zs
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_1__cseries_to_zseries );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)var_n );
Py_DECREF( var_n );
var_n = NULL;
CHECK_OBJECT( (PyObject *)var_zs );
Py_DECREF( var_zs );
var_zs = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_zs );
var_zs = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_1__cseries_to_zseries );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_2__zseries_to_cseries( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_zs = python_pars[ 0 ];
PyObject *var_n = NULL;
PyObject *var_c = NULL;
PyObject *tmp_inplace_assign_slice_1__target = NULL;
PyObject *tmp_inplace_assign_slice_1__upper = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_called_name_1;
PyObject *tmp_frame_locals;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_slice_lower_1;
PyObject *tmp_slice_lower_2;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
PyObject *tmp_slice_upper_1;
PyObject *tmp_sliceass_lower_1;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_upper_1;
PyObject *tmp_sliceass_value_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_6d62e10287a50ca7be124e2da960baa0, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = par_zs;
tmp_left_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_size );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 157;
goto frame_exception_exit_1;
}
tmp_right_name_1 = const_int_pos_1;
tmp_left_name_1 = BINARY_OPERATION_ADD( tmp_left_name_2, tmp_right_name_1 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 157;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_int_pos_2;
tmp_assign_source_1 = BINARY_OPERATION( PyNumber_FloorDivide, tmp_left_name_1, tmp_right_name_2 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 157;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_1;
tmp_slice_source_1 = par_zs;
tmp_left_name_3 = var_n;
tmp_right_name_3 = const_int_pos_1;
tmp_slice_lower_1 = BINARY_OPERATION_SUB( tmp_left_name_3, tmp_right_name_3 );
if ( tmp_slice_lower_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 158;
goto frame_exception_exit_1;
}
tmp_source_name_2 = LOOKUP_SLICE( tmp_slice_source_1, tmp_slice_lower_1, Py_None );
Py_DECREF( tmp_slice_lower_1 );
if ( tmp_source_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 158;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_copy );
Py_DECREF( tmp_source_name_2 );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 158;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 158;
tmp_assign_source_2 = CALL_FUNCTION_NO_ARGS( tmp_called_name_1 );
Py_DECREF( tmp_called_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 158;
goto frame_exception_exit_1;
}
assert( var_c == NULL );
var_c = tmp_assign_source_2;
tmp_assign_source_3 = var_c;
assert( tmp_inplace_assign_slice_1__target == NULL );
Py_INCREF( tmp_assign_source_3 );
tmp_inplace_assign_slice_1__target = tmp_assign_source_3;
tmp_assign_source_4 = var_n;
assert( tmp_inplace_assign_slice_1__upper == NULL );
Py_INCREF( tmp_assign_source_4 );
tmp_inplace_assign_slice_1__upper = tmp_assign_source_4;
// Tried code:
tmp_slice_source_2 = tmp_inplace_assign_slice_1__target;
tmp_slice_lower_2 = const_int_pos_1;
tmp_slice_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_left_name_4 = LOOKUP_SLICE( tmp_slice_source_2, tmp_slice_lower_2, tmp_slice_upper_1 );
if ( tmp_left_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 159;
goto try_except_handler_2;
}
tmp_right_name_4 = const_int_pos_2;
tmp_sliceass_value_1 = BINARY_OPERATION( PyNumber_InPlaceMultiply, tmp_left_name_4, tmp_right_name_4 );
Py_DECREF( tmp_left_name_4 );
if ( tmp_sliceass_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 159;
goto try_except_handler_2;
}
tmp_sliceass_target_1 = tmp_inplace_assign_slice_1__target;
tmp_sliceass_lower_1 = const_int_pos_1;
tmp_sliceass_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_1, tmp_sliceass_lower_1, tmp_sliceass_upper_1, tmp_sliceass_value_1 );
Py_DECREF( tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 159;
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__upper );
Py_DECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_zs )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_zs,
par_zs
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
var_c
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__upper );
Py_DECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
tmp_return_value = var_c;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_2__zseries_to_cseries );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_zs );
Py_DECREF( par_zs );
par_zs = NULL;
CHECK_OBJECT( (PyObject *)var_n );
Py_DECREF( var_n );
var_n = NULL;
CHECK_OBJECT( (PyObject *)var_c );
Py_DECREF( var_c );
var_c = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_zs );
Py_DECREF( par_zs );
par_zs = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_c );
var_c = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_2__zseries_to_cseries );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_3__zseries_mul( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_z1 = python_pars[ 0 ];
PyObject *par_z2 = python_pars[ 1 ];
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_called_name_1;
PyObject *tmp_frame_locals;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_b1e4db155389da72293d68fa9783c18a, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 187;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_convolve );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 187;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_z1;
tmp_args_element_name_2 = par_z2;
frame_function->f_lineno = 187;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 187;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_z1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z1,
par_z1
);
assert( res == 0 );
}
if ( par_z2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z2,
par_z2
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_3__zseries_mul );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_z1 );
Py_DECREF( par_z1 );
par_z1 = NULL;
CHECK_OBJECT( (PyObject *)par_z2 );
Py_DECREF( par_z2 );
par_z2 = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_z1 );
Py_DECREF( par_z1 );
par_z1 = NULL;
CHECK_OBJECT( (PyObject *)par_z2 );
Py_DECREF( par_z2 );
par_z2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_3__zseries_mul );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_4__zseries_div( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_z1 = python_pars[ 0 ];
PyObject *par_z2 = python_pars[ 1 ];
PyObject *var_len1 = NULL;
PyObject *var_len2 = NULL;
PyObject *var_dlen = NULL;
PyObject *var_scl = NULL;
PyObject *var_quo = NULL;
PyObject *var_i = NULL;
PyObject *var_j = NULL;
PyObject *var_r = NULL;
PyObject *var_tmp = NULL;
PyObject *var_rem = NULL;
PyObject *tmp_inplace_assign_slice_1__target = NULL;
PyObject *tmp_inplace_assign_slice_1__lower = NULL;
PyObject *tmp_inplace_assign_slice_1__upper = NULL;
PyObject *tmp_inplace_assign_slice_2__target = NULL;
PyObject *tmp_inplace_assign_slice_2__lower = NULL;
PyObject *tmp_inplace_assign_slice_2__upper = NULL;
PyObject *tmp_inplace_assign_slice_3__target = NULL;
PyObject *tmp_inplace_assign_slice_3__lower = NULL;
PyObject *tmp_inplace_assign_slice_3__upper = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *tmp_args_name_1;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscribed_2;
PyObject *tmp_ass_subscribed_3;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subscript_2;
PyObject *tmp_ass_subscript_3;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_ass_subvalue_2;
PyObject *tmp_ass_subvalue_3;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_assign_source_22;
PyObject *tmp_assign_source_23;
PyObject *tmp_assign_source_24;
PyObject *tmp_assign_source_25;
PyObject *tmp_assign_source_26;
PyObject *tmp_assign_source_27;
PyObject *tmp_assign_source_28;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
int tmp_cmp_Eq_1;
int tmp_cmp_Lt_1;
int tmp_cmp_Lt_2;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_left_3;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compare_right_3;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_left_name_9;
PyObject *tmp_left_name_10;
PyObject *tmp_left_name_11;
PyObject *tmp_left_name_12;
PyObject *tmp_left_name_13;
PyObject *tmp_left_name_14;
PyObject *tmp_left_name_15;
PyObject *tmp_left_name_16;
PyObject *tmp_left_name_17;
PyObject *tmp_left_name_18;
PyObject *tmp_left_name_19;
PyObject *tmp_left_name_20;
PyObject *tmp_left_name_21;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_right_name_9;
PyObject *tmp_right_name_10;
PyObject *tmp_right_name_11;
PyObject *tmp_right_name_12;
PyObject *tmp_right_name_13;
PyObject *tmp_right_name_14;
PyObject *tmp_right_name_15;
PyObject *tmp_right_name_16;
PyObject *tmp_right_name_17;
PyObject *tmp_right_name_18;
PyObject *tmp_right_name_19;
PyObject *tmp_right_name_20;
PyObject *tmp_right_name_21;
Py_ssize_t tmp_slice_index_upper_1;
Py_ssize_t tmp_slice_index_upper_2;
PyObject *tmp_slice_lower_1;
PyObject *tmp_slice_lower_2;
PyObject *tmp_slice_lower_3;
PyObject *tmp_slice_lower_4;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
PyObject *tmp_slice_source_3;
PyObject *tmp_slice_source_4;
PyObject *tmp_slice_source_5;
PyObject *tmp_slice_source_6;
PyObject *tmp_slice_upper_1;
PyObject *tmp_slice_upper_2;
PyObject *tmp_slice_upper_3;
PyObject *tmp_slice_upper_4;
PyObject *tmp_sliceass_lower_1;
PyObject *tmp_sliceass_lower_2;
PyObject *tmp_sliceass_lower_3;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_target_2;
PyObject *tmp_sliceass_target_3;
PyObject *tmp_sliceass_upper_1;
PyObject *tmp_sliceass_upper_2;
PyObject *tmp_sliceass_upper_3;
PyObject *tmp_sliceass_value_1;
PyObject *tmp_sliceass_value_2;
PyObject *tmp_sliceass_value_3;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
Py_ssize_t tmp_sliceslicedel_index_lower_2;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscribed_name_4;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_subscript_name_4;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
PyObject *tmp_tuple_element_4;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_cdb373cbd9d7f7a0b77418e495388b5d, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = par_z1;
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_copy );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 223;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 223;
tmp_assign_source_1 = CALL_FUNCTION_NO_ARGS( tmp_called_name_1 );
Py_DECREF( tmp_called_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 223;
goto frame_exception_exit_1;
}
{
PyObject *old = par_z1;
assert( old != NULL );
par_z1 = tmp_assign_source_1;
Py_DECREF( old );
}
tmp_source_name_2 = par_z2;
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_copy );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 224;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 224;
tmp_assign_source_2 = CALL_FUNCTION_NO_ARGS( tmp_called_name_2 );
Py_DECREF( tmp_called_name_2 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 224;
goto frame_exception_exit_1;
}
{
PyObject *old = par_z2;
assert( old != NULL );
par_z2 = tmp_assign_source_2;
Py_DECREF( old );
}
tmp_len_arg_1 = par_z1;
tmp_assign_source_3 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 225;
goto frame_exception_exit_1;
}
assert( var_len1 == NULL );
var_len1 = tmp_assign_source_3;
tmp_len_arg_2 = par_z2;
tmp_assign_source_4 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 226;
goto frame_exception_exit_1;
}
assert( var_len2 == NULL );
var_len2 = tmp_assign_source_4;
tmp_compare_left_1 = var_len2;
tmp_compare_right_1 = const_int_pos_1;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 227;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_left_name_1 = par_z1;
tmp_right_name_1 = par_z2;
tmp_result = BINARY_OPERATION_INPLACE( PyNumber_InPlaceTrueDivide, &tmp_left_name_1, tmp_right_name_1 );
tmp_assign_source_5 = tmp_left_name_1;
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 228;
goto frame_exception_exit_1;
}
par_z1 = tmp_assign_source_5;
tmp_return_value = PyTuple_New( 2 );
tmp_tuple_element_1 = par_z1;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
tmp_sliceslicedel_index_lower_1 = 0;
tmp_slice_index_upper_1 = 1;
tmp_slice_source_1 = par_z1;
tmp_left_name_2 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 229;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_int_0;
tmp_tuple_element_1 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_tuple_element_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 229;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
goto frame_return_exit_1;
goto branch_end_1;
branch_no_1:;
tmp_compare_left_2 = var_len1;
tmp_compare_right_2 = var_len2;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 230;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_return_value = PyTuple_New( 2 );
tmp_sliceslicedel_index_lower_2 = 0;
tmp_slice_index_upper_2 = 1;
tmp_slice_source_2 = par_z1;
tmp_left_name_3 = LOOKUP_INDEX_SLICE( tmp_slice_source_2, tmp_sliceslicedel_index_lower_2, tmp_slice_index_upper_2 );
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 231;
goto frame_exception_exit_1;
}
tmp_right_name_3 = const_int_0;
tmp_tuple_element_2 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_3 );
Py_DECREF( tmp_left_name_3 );
if ( tmp_tuple_element_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 231;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_z1;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_2 );
goto frame_return_exit_1;
goto branch_end_2;
branch_no_2:;
tmp_left_name_4 = var_len1;
tmp_right_name_4 = var_len2;
tmp_assign_source_6 = BINARY_OPERATION_SUB( tmp_left_name_4, tmp_right_name_4 );
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 233;
goto frame_exception_exit_1;
}
assert( var_dlen == NULL );
var_dlen = tmp_assign_source_6;
tmp_subscribed_name_1 = par_z2;
tmp_subscript_name_1 = const_int_0;
tmp_assign_source_7 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 234;
goto frame_exception_exit_1;
}
assert( var_scl == NULL );
var_scl = tmp_assign_source_7;
tmp_left_name_5 = par_z2;
tmp_right_name_5 = var_scl;
tmp_result = BINARY_OPERATION_INPLACE( PyNumber_InPlaceTrueDivide, &tmp_left_name_5, tmp_right_name_5 );
tmp_assign_source_8 = tmp_left_name_5;
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 235;
goto frame_exception_exit_1;
}
par_z2 = tmp_assign_source_8;
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 236;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_empty );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 236;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_left_name_6 = var_dlen;
tmp_right_name_6 = const_int_pos_1;
tmp_tuple_element_3 = BINARY_OPERATION_ADD( tmp_left_name_6, tmp_right_name_6 );
if ( tmp_tuple_element_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_name_1 );
exception_lineno = 236;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_3 );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_4 = par_z1;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 236;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 236;
tmp_assign_source_9 = CALL_FUNCTION( tmp_called_name_3, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 236;
goto frame_exception_exit_1;
}
assert( var_quo == NULL );
var_quo = tmp_assign_source_9;
tmp_assign_source_10 = const_int_0;
assert( var_i == NULL );
Py_INCREF( tmp_assign_source_10 );
var_i = tmp_assign_source_10;
tmp_assign_source_11 = var_dlen;
assert( var_j == NULL );
Py_INCREF( tmp_assign_source_11 );
var_j = tmp_assign_source_11;
loop_start_1:;
tmp_compare_left_3 = var_i;
if ( tmp_compare_left_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 239;
goto frame_exception_exit_1;
}
tmp_compare_right_3 = var_j;
if ( tmp_compare_right_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "j" );
exception_tb = NULL;
exception_lineno = 239;
goto frame_exception_exit_1;
}
tmp_cmp_Lt_2 = RICH_COMPARE_BOOL_LT( tmp_compare_left_3, tmp_compare_right_3 );
if ( tmp_cmp_Lt_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 239;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_2 == 1 )
{
goto branch_no_3;
}
else
{
goto branch_yes_3;
}
branch_yes_3:;
goto loop_end_1;
branch_no_3:;
tmp_subscribed_name_2 = par_z1;
tmp_subscript_name_2 = var_i;
if ( tmp_subscript_name_2 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 240;
goto frame_exception_exit_1;
}
tmp_assign_source_12 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_assign_source_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 240;
goto frame_exception_exit_1;
}
{
PyObject *old = var_r;
var_r = tmp_assign_source_12;
Py_XDECREF( old );
}
tmp_subscribed_name_3 = par_z1;
tmp_subscript_name_3 = var_i;
if ( tmp_subscript_name_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 241;
goto frame_exception_exit_1;
}
tmp_ass_subvalue_1 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
if ( tmp_ass_subvalue_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 241;
goto frame_exception_exit_1;
}
tmp_ass_subscribed_1 = var_quo;
tmp_ass_subscript_1 = var_i;
if ( tmp_ass_subscript_1 == NULL )
{
Py_DECREF( tmp_ass_subvalue_1 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 241;
goto frame_exception_exit_1;
}
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subvalue_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 241;
goto frame_exception_exit_1;
}
tmp_ass_subvalue_2 = var_r;
tmp_ass_subscribed_2 = var_quo;
tmp_left_name_7 = var_dlen;
tmp_right_name_7 = var_i;
if ( tmp_right_name_7 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 242;
goto frame_exception_exit_1;
}
tmp_ass_subscript_2 = BINARY_OPERATION_SUB( tmp_left_name_7, tmp_right_name_7 );
if ( tmp_ass_subscript_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 242;
goto frame_exception_exit_1;
}
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_2, tmp_ass_subscript_2, tmp_ass_subvalue_2 );
Py_DECREF( tmp_ass_subscript_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 242;
goto frame_exception_exit_1;
}
tmp_left_name_8 = var_r;
tmp_right_name_8 = par_z2;
tmp_assign_source_13 = BINARY_OPERATION_MUL( tmp_left_name_8, tmp_right_name_8 );
if ( tmp_assign_source_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 243;
goto frame_exception_exit_1;
}
{
PyObject *old = var_tmp;
var_tmp = tmp_assign_source_13;
Py_XDECREF( old );
}
tmp_assign_source_14 = par_z1;
{
PyObject *old = tmp_inplace_assign_slice_1__target;
tmp_inplace_assign_slice_1__target = tmp_assign_source_14;
Py_INCREF( tmp_inplace_assign_slice_1__target );
Py_XDECREF( old );
}
// Tried code:
tmp_assign_source_15 = var_i;
if ( tmp_assign_source_15 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 244;
goto try_except_handler_2;
}
{
PyObject *old = tmp_inplace_assign_slice_1__lower;
tmp_inplace_assign_slice_1__lower = tmp_assign_source_15;
Py_INCREF( tmp_inplace_assign_slice_1__lower );
Py_XDECREF( old );
}
tmp_left_name_9 = var_i;
if ( tmp_left_name_9 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 244;
goto try_except_handler_2;
}
tmp_right_name_9 = var_len2;
tmp_assign_source_16 = BINARY_OPERATION_ADD( tmp_left_name_9, tmp_right_name_9 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 244;
goto try_except_handler_2;
}
{
PyObject *old = tmp_inplace_assign_slice_1__upper;
tmp_inplace_assign_slice_1__upper = tmp_assign_source_16;
Py_XDECREF( old );
}
tmp_slice_source_3 = tmp_inplace_assign_slice_1__target;
tmp_slice_lower_1 = tmp_inplace_assign_slice_1__lower;
tmp_slice_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_left_name_10 = LOOKUP_SLICE( tmp_slice_source_3, tmp_slice_lower_1, tmp_slice_upper_1 );
if ( tmp_left_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 244;
goto try_except_handler_2;
}
tmp_right_name_10 = var_tmp;
tmp_sliceass_value_1 = BINARY_OPERATION( PyNumber_InPlaceSubtract, tmp_left_name_10, tmp_right_name_10 );
Py_DECREF( tmp_left_name_10 );
if ( tmp_sliceass_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 244;
goto try_except_handler_2;
}
tmp_sliceass_target_1 = tmp_inplace_assign_slice_1__target;
tmp_sliceass_lower_1 = tmp_inplace_assign_slice_1__lower;
tmp_sliceass_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_1, tmp_sliceass_lower_1, tmp_sliceass_upper_1, tmp_sliceass_value_1 );
Py_DECREF( tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 244;
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_1__lower );
tmp_inplace_assign_slice_1__lower = NULL;
Py_XDECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__lower );
Py_DECREF( tmp_inplace_assign_slice_1__lower );
tmp_inplace_assign_slice_1__lower = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__upper );
Py_DECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
tmp_assign_source_17 = par_z1;
{
PyObject *old = tmp_inplace_assign_slice_2__target;
tmp_inplace_assign_slice_2__target = tmp_assign_source_17;
Py_INCREF( tmp_inplace_assign_slice_2__target );
Py_XDECREF( old );
}
// Tried code:
tmp_assign_source_18 = var_j;
if ( tmp_assign_source_18 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "j" );
exception_tb = NULL;
exception_lineno = 245;
goto try_except_handler_3;
}
{
PyObject *old = tmp_inplace_assign_slice_2__lower;
tmp_inplace_assign_slice_2__lower = tmp_assign_source_18;
Py_INCREF( tmp_inplace_assign_slice_2__lower );
Py_XDECREF( old );
}
tmp_left_name_11 = var_j;
if ( tmp_left_name_11 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "j" );
exception_tb = NULL;
exception_lineno = 245;
goto try_except_handler_3;
}
tmp_right_name_11 = var_len2;
tmp_assign_source_19 = BINARY_OPERATION_ADD( tmp_left_name_11, tmp_right_name_11 );
if ( tmp_assign_source_19 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 245;
goto try_except_handler_3;
}
{
PyObject *old = tmp_inplace_assign_slice_2__upper;
tmp_inplace_assign_slice_2__upper = tmp_assign_source_19;
Py_XDECREF( old );
}
tmp_slice_source_4 = tmp_inplace_assign_slice_2__target;
tmp_slice_lower_2 = tmp_inplace_assign_slice_2__lower;
tmp_slice_upper_2 = tmp_inplace_assign_slice_2__upper;
tmp_left_name_12 = LOOKUP_SLICE( tmp_slice_source_4, tmp_slice_lower_2, tmp_slice_upper_2 );
if ( tmp_left_name_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 245;
goto try_except_handler_3;
}
tmp_right_name_12 = var_tmp;
tmp_sliceass_value_2 = BINARY_OPERATION( PyNumber_InPlaceSubtract, tmp_left_name_12, tmp_right_name_12 );
Py_DECREF( tmp_left_name_12 );
if ( tmp_sliceass_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 245;
goto try_except_handler_3;
}
tmp_sliceass_target_2 = tmp_inplace_assign_slice_2__target;
tmp_sliceass_lower_2 = tmp_inplace_assign_slice_2__lower;
tmp_sliceass_upper_2 = tmp_inplace_assign_slice_2__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_2, tmp_sliceass_lower_2, tmp_sliceass_upper_2, tmp_sliceass_value_2 );
Py_DECREF( tmp_sliceass_value_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 245;
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_2__lower );
tmp_inplace_assign_slice_2__lower = NULL;
Py_XDECREF( tmp_inplace_assign_slice_2__upper );
tmp_inplace_assign_slice_2__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__lower );
Py_DECREF( tmp_inplace_assign_slice_2__lower );
tmp_inplace_assign_slice_2__lower = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__upper );
Py_DECREF( tmp_inplace_assign_slice_2__upper );
tmp_inplace_assign_slice_2__upper = NULL;
tmp_left_name_13 = var_i;
if ( tmp_left_name_13 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 246;
goto frame_exception_exit_1;
}
tmp_right_name_13 = const_int_pos_1;
tmp_result = BINARY_OPERATION_ADD_INPLACE( &tmp_left_name_13, tmp_right_name_13 );
tmp_assign_source_20 = tmp_left_name_13;
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 246;
goto frame_exception_exit_1;
}
var_i = tmp_assign_source_20;
tmp_left_name_14 = var_j;
if ( tmp_left_name_14 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "j" );
exception_tb = NULL;
exception_lineno = 247;
goto frame_exception_exit_1;
}
tmp_right_name_14 = const_int_pos_1;
tmp_result = BINARY_OPERATION_INPLACE( PyNumber_InPlaceSubtract, &tmp_left_name_14, tmp_right_name_14 );
tmp_assign_source_21 = tmp_left_name_14;
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 247;
goto frame_exception_exit_1;
}
var_j = tmp_assign_source_21;
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 239;
goto frame_exception_exit_1;
}
goto loop_start_1;
loop_end_1:;
tmp_subscribed_name_4 = par_z1;
tmp_subscript_name_4 = var_i;
if ( tmp_subscript_name_4 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 248;
goto frame_exception_exit_1;
}
tmp_assign_source_22 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_4, tmp_subscript_name_4 );
if ( tmp_assign_source_22 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 248;
goto frame_exception_exit_1;
}
{
PyObject *old = var_r;
var_r = tmp_assign_source_22;
Py_XDECREF( old );
}
tmp_ass_subvalue_3 = var_r;
tmp_ass_subscribed_3 = var_quo;
tmp_ass_subscript_3 = var_i;
if ( tmp_ass_subscript_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 249;
goto frame_exception_exit_1;
}
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_3, tmp_ass_subscript_3, tmp_ass_subvalue_3 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 249;
goto frame_exception_exit_1;
}
tmp_left_name_15 = var_r;
tmp_right_name_15 = par_z2;
tmp_assign_source_23 = BINARY_OPERATION_MUL( tmp_left_name_15, tmp_right_name_15 );
if ( tmp_assign_source_23 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 250;
goto frame_exception_exit_1;
}
{
PyObject *old = var_tmp;
var_tmp = tmp_assign_source_23;
Py_XDECREF( old );
}
tmp_assign_source_24 = par_z1;
assert( tmp_inplace_assign_slice_3__target == NULL );
Py_INCREF( tmp_assign_source_24 );
tmp_inplace_assign_slice_3__target = tmp_assign_source_24;
// Tried code:
tmp_assign_source_25 = var_i;
if ( tmp_assign_source_25 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 251;
goto try_except_handler_4;
}
assert( tmp_inplace_assign_slice_3__lower == NULL );
Py_INCREF( tmp_assign_source_25 );
tmp_inplace_assign_slice_3__lower = tmp_assign_source_25;
tmp_left_name_16 = var_i;
if ( tmp_left_name_16 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 251;
goto try_except_handler_4;
}
tmp_right_name_16 = var_len2;
tmp_assign_source_26 = BINARY_OPERATION_ADD( tmp_left_name_16, tmp_right_name_16 );
if ( tmp_assign_source_26 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 251;
goto try_except_handler_4;
}
assert( tmp_inplace_assign_slice_3__upper == NULL );
tmp_inplace_assign_slice_3__upper = tmp_assign_source_26;
tmp_slice_source_5 = tmp_inplace_assign_slice_3__target;
tmp_slice_lower_3 = tmp_inplace_assign_slice_3__lower;
tmp_slice_upper_3 = tmp_inplace_assign_slice_3__upper;
tmp_left_name_17 = LOOKUP_SLICE( tmp_slice_source_5, tmp_slice_lower_3, tmp_slice_upper_3 );
if ( tmp_left_name_17 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 251;
goto try_except_handler_4;
}
tmp_right_name_17 = var_tmp;
tmp_sliceass_value_3 = BINARY_OPERATION( PyNumber_InPlaceSubtract, tmp_left_name_17, tmp_right_name_17 );
Py_DECREF( tmp_left_name_17 );
if ( tmp_sliceass_value_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 251;
goto try_except_handler_4;
}
tmp_sliceass_target_3 = tmp_inplace_assign_slice_3__target;
tmp_sliceass_lower_3 = tmp_inplace_assign_slice_3__lower;
tmp_sliceass_upper_3 = tmp_inplace_assign_slice_3__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_3, tmp_sliceass_lower_3, tmp_sliceass_upper_3, tmp_sliceass_value_3 );
Py_DECREF( tmp_sliceass_value_3 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 251;
goto try_except_handler_4;
}
goto try_end_3;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_3__target );
Py_DECREF( tmp_inplace_assign_slice_3__target );
tmp_inplace_assign_slice_3__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_3__lower );
tmp_inplace_assign_slice_3__lower = NULL;
Py_XDECREF( tmp_inplace_assign_slice_3__upper );
tmp_inplace_assign_slice_3__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
try_end_3:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_3__target );
Py_DECREF( tmp_inplace_assign_slice_3__target );
tmp_inplace_assign_slice_3__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_3__lower );
Py_DECREF( tmp_inplace_assign_slice_3__lower );
tmp_inplace_assign_slice_3__lower = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_3__upper );
Py_DECREF( tmp_inplace_assign_slice_3__upper );
tmp_inplace_assign_slice_3__upper = NULL;
tmp_left_name_18 = var_quo;
tmp_right_name_18 = var_scl;
tmp_result = BINARY_OPERATION_INPLACE( PyNumber_InPlaceTrueDivide, &tmp_left_name_18, tmp_right_name_18 );
tmp_assign_source_27 = tmp_left_name_18;
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 252;
goto frame_exception_exit_1;
}
var_quo = tmp_assign_source_27;
tmp_slice_source_6 = par_z1;
tmp_left_name_19 = var_i;
if ( tmp_left_name_19 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 253;
goto frame_exception_exit_1;
}
tmp_right_name_19 = const_int_pos_1;
tmp_slice_lower_4 = BINARY_OPERATION_ADD( tmp_left_name_19, tmp_right_name_19 );
if ( tmp_slice_lower_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 253;
goto frame_exception_exit_1;
}
tmp_left_name_21 = var_i;
if ( tmp_left_name_21 == NULL )
{
Py_DECREF( tmp_slice_lower_4 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "i" );
exception_tb = NULL;
exception_lineno = 253;
goto frame_exception_exit_1;
}
tmp_right_name_20 = const_int_pos_1;
tmp_left_name_20 = BINARY_OPERATION_SUB( tmp_left_name_21, tmp_right_name_20 );
if ( tmp_left_name_20 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_slice_lower_4 );
exception_lineno = 253;
goto frame_exception_exit_1;
}
tmp_right_name_21 = var_len2;
tmp_slice_upper_4 = BINARY_OPERATION_ADD( tmp_left_name_20, tmp_right_name_21 );
Py_DECREF( tmp_left_name_20 );
if ( tmp_slice_upper_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_slice_lower_4 );
exception_lineno = 253;
goto frame_exception_exit_1;
}
tmp_source_name_5 = LOOKUP_SLICE( tmp_slice_source_6, tmp_slice_lower_4, tmp_slice_upper_4 );
Py_DECREF( tmp_slice_lower_4 );
Py_DECREF( tmp_slice_upper_4 );
if ( tmp_source_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 253;
goto frame_exception_exit_1;
}
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_copy );
Py_DECREF( tmp_source_name_5 );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 253;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 253;
tmp_assign_source_28 = CALL_FUNCTION_NO_ARGS( tmp_called_name_4 );
Py_DECREF( tmp_called_name_4 );
if ( tmp_assign_source_28 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 253;
goto frame_exception_exit_1;
}
assert( var_rem == NULL );
var_rem = tmp_assign_source_28;
tmp_return_value = PyTuple_New( 2 );
tmp_tuple_element_4 = var_quo;
Py_INCREF( tmp_tuple_element_4 );
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_4 );
tmp_tuple_element_4 = var_rem;
Py_INCREF( tmp_tuple_element_4 );
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_4 );
goto frame_return_exit_1;
branch_end_2:;
branch_end_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_z1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z1,
par_z1
);
assert( res == 0 );
}
if ( par_z2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z2,
par_z2
);
assert( res == 0 );
}
if ( var_len1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_len1,
var_len1
);
assert( res == 0 );
}
if ( var_len2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_len2,
var_len2
);
assert( res == 0 );
}
if ( var_dlen )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_dlen,
var_dlen
);
assert( res == 0 );
}
if ( var_scl )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_scl,
var_scl
);
assert( res == 0 );
}
if ( var_quo )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_quo,
var_quo
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
if ( var_j )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_j,
var_j
);
assert( res == 0 );
}
if ( var_r )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_r,
var_r
);
assert( res == 0 );
}
if ( var_tmp )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_tmp,
var_tmp
);
assert( res == 0 );
}
if ( var_rem )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_rem,
var_rem
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_4__zseries_div );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_z1 );
Py_DECREF( par_z1 );
par_z1 = NULL;
CHECK_OBJECT( (PyObject *)par_z2 );
Py_DECREF( par_z2 );
par_z2 = NULL;
CHECK_OBJECT( (PyObject *)var_len1 );
Py_DECREF( var_len1 );
var_len1 = NULL;
CHECK_OBJECT( (PyObject *)var_len2 );
Py_DECREF( var_len2 );
var_len2 = NULL;
Py_XDECREF( var_dlen );
var_dlen = NULL;
Py_XDECREF( var_scl );
var_scl = NULL;
Py_XDECREF( var_quo );
var_quo = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_j );
var_j = NULL;
Py_XDECREF( var_r );
var_r = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
Py_XDECREF( var_rem );
var_rem = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_z1 );
Py_DECREF( par_z1 );
par_z1 = NULL;
CHECK_OBJECT( (PyObject *)par_z2 );
Py_DECREF( par_z2 );
par_z2 = NULL;
Py_XDECREF( var_len1 );
var_len1 = NULL;
Py_XDECREF( var_len2 );
var_len2 = NULL;
Py_XDECREF( var_dlen );
var_dlen = NULL;
Py_XDECREF( var_scl );
var_scl = NULL;
Py_XDECREF( var_quo );
var_quo = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_j );
var_j = NULL;
Py_XDECREF( var_r );
var_r = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_4__zseries_div );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_5__zseries_der( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_zs = python_pars[ 0 ];
PyObject *var_n = NULL;
PyObject *var_ns = NULL;
PyObject *var_d = NULL;
PyObject *var_r = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_len_arg_1;
PyObject *tmp_operand_name_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_74f56bacaea045ac7ed51ddff313927f, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_len_arg_1 = par_zs;
tmp_left_name_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 282;
goto frame_exception_exit_1;
}
tmp_right_name_1 = const_int_pos_2;
tmp_assign_source_1 = BINARY_OPERATION( PyNumber_FloorDivide, tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 282;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_1;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 283;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 283;
goto frame_exception_exit_1;
}
tmp_args_name_1 = DEEP_COPY( const_tuple_list_int_neg_1_int_0_int_pos_1_list_tuple );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_2 = par_zs;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 283;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 283;
tmp_assign_source_2 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 283;
goto frame_exception_exit_1;
}
assert( var_ns == NULL );
var_ns = tmp_assign_source_2;
tmp_left_name_2 = par_zs;
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 284;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_arange );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 284;
goto frame_exception_exit_1;
}
tmp_operand_name_1 = var_n;
tmp_args_element_name_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
exception_lineno = 284;
goto frame_exception_exit_1;
}
tmp_left_name_4 = var_n;
tmp_right_name_3 = const_int_pos_1;
tmp_args_element_name_2 = BINARY_OPERATION_ADD( tmp_left_name_4, tmp_right_name_3 );
if ( tmp_args_element_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_1 );
exception_lineno = 284;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 284;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_left_name_3 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_1 );
Py_DECREF( tmp_args_element_name_2 );
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 284;
goto frame_exception_exit_1;
}
tmp_right_name_4 = const_int_pos_2;
tmp_right_name_2 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_4 );
Py_DECREF( tmp_left_name_3 );
if ( tmp_right_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 284;
goto frame_exception_exit_1;
}
tmp_result = BINARY_OPERATION_MUL_INPLACE( &tmp_left_name_2, tmp_right_name_2 );
tmp_assign_source_3 = tmp_left_name_2;
Py_DECREF( tmp_right_name_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 284;
goto frame_exception_exit_1;
}
par_zs = tmp_assign_source_3;
// Tried code:
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_div );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_div );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_div" );
exception_tb = NULL;
exception_lineno = 285;
goto try_except_handler_2;
}
tmp_args_element_name_3 = par_zs;
tmp_args_element_name_4 = var_ns;
frame_function->f_lineno = 285;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_3, call_args );
}
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 285;
goto try_except_handler_2;
}
tmp_assign_source_4 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 285;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_4;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_5 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_5 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 285;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_5;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_6 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_6 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 285;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_6;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_zs )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_zs,
par_zs
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_ns )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ns,
var_ns
);
assert( res == 0 );
}
if ( var_d )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_d,
var_d
);
assert( res == 0 );
}
if ( var_r )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_r,
var_r
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_assign_source_7 = tmp_tuple_unpack_1__element_1;
assert( var_d == NULL );
Py_INCREF( tmp_assign_source_7 );
var_d = tmp_assign_source_7;
tmp_assign_source_8 = tmp_tuple_unpack_1__element_2;
assert( var_r == NULL );
Py_INCREF( tmp_assign_source_8 );
var_r = tmp_assign_source_8;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_return_value = var_d;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_5__zseries_der );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_zs );
Py_DECREF( par_zs );
par_zs = NULL;
CHECK_OBJECT( (PyObject *)var_n );
Py_DECREF( var_n );
var_n = NULL;
CHECK_OBJECT( (PyObject *)var_ns );
Py_DECREF( var_ns );
var_ns = NULL;
CHECK_OBJECT( (PyObject *)var_d );
Py_DECREF( var_d );
var_d = NULL;
CHECK_OBJECT( (PyObject *)var_r );
Py_DECREF( var_r );
var_r = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_zs );
Py_DECREF( par_zs );
par_zs = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_ns );
var_ns = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_5__zseries_der );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_6__zseries_int( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_zs = python_pars[ 0 ];
PyObject *var_n = NULL;
PyObject *var_ns = NULL;
PyObject *var_div = NULL;
PyObject *tmp_inplace_assign_slice_1__target = NULL;
PyObject *tmp_inplace_assign_slice_1__upper = NULL;
PyObject *tmp_inplace_assign_slice_2__target = NULL;
PyObject *tmp_inplace_assign_slice_2__lower = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_name_1;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_len_arg_1;
PyObject *tmp_operand_name_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_slice_lower_1;
PyObject *tmp_slice_lower_2;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
PyObject *tmp_slice_source_3;
PyObject *tmp_slice_source_4;
PyObject *tmp_slice_upper_1;
PyObject *tmp_slice_upper_2;
PyObject *tmp_sliceass_lower_1;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_target_2;
PyObject *tmp_sliceass_upper_1;
PyObject *tmp_sliceass_value_1;
PyObject *tmp_sliceass_value_2;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_ea2bd15f094960ad95e165b65ec1757b, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_left_name_1 = const_int_pos_1;
tmp_len_arg_1 = par_zs;
tmp_left_name_2 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 313;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_int_pos_2;
tmp_right_name_1 = BINARY_OPERATION( PyNumber_FloorDivide, tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 313;
goto frame_exception_exit_1;
}
tmp_assign_source_1 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_right_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 313;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_1;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 314;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 314;
goto frame_exception_exit_1;
}
tmp_args_name_1 = DEEP_COPY( const_tuple_list_int_neg_1_int_0_int_pos_1_list_tuple );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_2 = par_zs;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 314;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 314;
tmp_assign_source_2 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 314;
goto frame_exception_exit_1;
}
assert( var_ns == NULL );
var_ns = tmp_assign_source_2;
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_mul );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_mul );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_mul" );
exception_tb = NULL;
exception_lineno = 315;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_zs;
tmp_args_element_name_2 = var_ns;
frame_function->f_lineno = 315;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_assign_source_3 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 315;
goto frame_exception_exit_1;
}
{
PyObject *old = par_zs;
assert( old != NULL );
par_zs = tmp_assign_source_3;
Py_DECREF( old );
}
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 316;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_arange );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 316;
goto frame_exception_exit_1;
}
tmp_operand_name_1 = var_n;
tmp_args_element_name_3 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
if ( tmp_args_element_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
exception_lineno = 316;
goto frame_exception_exit_1;
}
tmp_left_name_4 = var_n;
tmp_right_name_3 = const_int_pos_1;
tmp_args_element_name_4 = BINARY_OPERATION_ADD( tmp_left_name_4, tmp_right_name_3 );
if ( tmp_args_element_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_3 );
exception_lineno = 316;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 316;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_left_name_3 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_3 );
Py_DECREF( tmp_args_element_name_4 );
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 316;
goto frame_exception_exit_1;
}
tmp_right_name_4 = const_int_pos_2;
tmp_assign_source_4 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_4 );
Py_DECREF( tmp_left_name_3 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 316;
goto frame_exception_exit_1;
}
assert( var_div == NULL );
var_div = tmp_assign_source_4;
tmp_assign_source_5 = par_zs;
assert( tmp_inplace_assign_slice_1__target == NULL );
Py_INCREF( tmp_assign_source_5 );
tmp_inplace_assign_slice_1__target = tmp_assign_source_5;
tmp_assign_source_6 = var_n;
assert( tmp_inplace_assign_slice_1__upper == NULL );
Py_INCREF( tmp_assign_source_6 );
tmp_inplace_assign_slice_1__upper = tmp_assign_source_6;
// Tried code:
tmp_slice_source_1 = tmp_inplace_assign_slice_1__target;
tmp_slice_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_left_name_5 = LOOKUP_SLICE( tmp_slice_source_1, Py_None, tmp_slice_upper_1 );
if ( tmp_left_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 317;
goto try_except_handler_2;
}
tmp_slice_source_2 = var_div;
tmp_slice_upper_2 = var_n;
tmp_right_name_5 = LOOKUP_SLICE( tmp_slice_source_2, Py_None, tmp_slice_upper_2 );
if ( tmp_right_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_5 );
exception_lineno = 317;
goto try_except_handler_2;
}
tmp_sliceass_value_1 = BINARY_OPERATION( PyNumber_InPlaceTrueDivide, tmp_left_name_5, tmp_right_name_5 );
Py_DECREF( tmp_left_name_5 );
Py_DECREF( tmp_right_name_5 );
if ( tmp_sliceass_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 317;
goto try_except_handler_2;
}
tmp_sliceass_target_1 = tmp_inplace_assign_slice_1__target;
tmp_sliceass_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_1, Py_None, tmp_sliceass_upper_1, tmp_sliceass_value_1 );
Py_DECREF( tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 317;
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__upper );
Py_DECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__upper );
Py_DECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
tmp_assign_source_7 = par_zs;
assert( tmp_inplace_assign_slice_2__target == NULL );
Py_INCREF( tmp_assign_source_7 );
tmp_inplace_assign_slice_2__target = tmp_assign_source_7;
// Tried code:
tmp_left_name_6 = var_n;
tmp_right_name_6 = const_int_pos_1;
tmp_assign_source_8 = BINARY_OPERATION_ADD( tmp_left_name_6, tmp_right_name_6 );
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 318;
goto try_except_handler_3;
}
assert( tmp_inplace_assign_slice_2__lower == NULL );
tmp_inplace_assign_slice_2__lower = tmp_assign_source_8;
tmp_slice_source_3 = tmp_inplace_assign_slice_2__target;
tmp_slice_lower_1 = tmp_inplace_assign_slice_2__lower;
tmp_left_name_7 = LOOKUP_SLICE( tmp_slice_source_3, tmp_slice_lower_1, Py_None );
if ( tmp_left_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 318;
goto try_except_handler_3;
}
tmp_slice_source_4 = var_div;
tmp_left_name_8 = var_n;
tmp_right_name_8 = const_int_pos_1;
tmp_slice_lower_2 = BINARY_OPERATION_ADD( tmp_left_name_8, tmp_right_name_8 );
if ( tmp_slice_lower_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 318;
goto try_except_handler_3;
}
tmp_right_name_7 = LOOKUP_SLICE( tmp_slice_source_4, tmp_slice_lower_2, Py_None );
Py_DECREF( tmp_slice_lower_2 );
if ( tmp_right_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 318;
goto try_except_handler_3;
}
tmp_sliceass_value_2 = BINARY_OPERATION( PyNumber_InPlaceTrueDivide, tmp_left_name_7, tmp_right_name_7 );
Py_DECREF( tmp_left_name_7 );
Py_DECREF( tmp_right_name_7 );
if ( tmp_sliceass_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 318;
goto try_except_handler_3;
}
tmp_sliceass_target_2 = tmp_inplace_assign_slice_2__target;
tmp_sliceass_lower_1 = tmp_inplace_assign_slice_2__lower;
tmp_result = SET_SLICE( tmp_sliceass_target_2, tmp_sliceass_lower_1, Py_None, tmp_sliceass_value_2 );
Py_DECREF( tmp_sliceass_value_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 318;
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_2__lower );
tmp_inplace_assign_slice_2__lower = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__lower );
Py_DECREF( tmp_inplace_assign_slice_2__lower );
tmp_inplace_assign_slice_2__lower = NULL;
tmp_ass_subvalue_1 = const_int_0;
tmp_ass_subscribed_1 = par_zs;
tmp_ass_subscript_1 = var_n;
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 319;
goto frame_exception_exit_1;
}
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_zs )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_zs,
par_zs
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_ns )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ns,
var_ns
);
assert( res == 0 );
}
if ( var_div )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_div,
var_div
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = par_zs;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_6__zseries_int );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_zs );
Py_DECREF( par_zs );
par_zs = NULL;
CHECK_OBJECT( (PyObject *)var_n );
Py_DECREF( var_n );
var_n = NULL;
CHECK_OBJECT( (PyObject *)var_ns );
Py_DECREF( var_ns );
var_ns = NULL;
CHECK_OBJECT( (PyObject *)var_div );
Py_DECREF( var_div );
var_div = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_zs );
Py_DECREF( par_zs );
par_zs = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_ns );
var_ns = NULL;
Py_XDECREF( var_div );
var_div = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_6__zseries_int );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_7_poly2cheb( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_pol = python_pars[ 0 ];
PyObject *var_deg = NULL;
PyObject *var_res = NULL;
PyObject *var_i = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_for_loop_1__for_iterator = NULL;
PyObject *tmp_for_loop_1__iter_value = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_len_arg_1;
PyObject *tmp_list_element_1;
PyObject *tmp_next_source_1;
PyObject *tmp_range3_high_1;
PyObject *tmp_range3_low_1;
PyObject *tmp_range3_step_1;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_source_name_1;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscript_name_1;
PyObject *tmp_unpack_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_74ea994fb502f67d1d0f5cdfcabb713d, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 369;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 369;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 1 );
tmp_list_element_1 = par_pol;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
frame_function->f_lineno = 369;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 369;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 369;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 369;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 1)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_3 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_pol;
assert( old != NULL );
par_pol = tmp_assign_source_3;
Py_INCREF( par_pol );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
tmp_len_arg_1 = par_pol;
tmp_left_name_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 370;
goto frame_exception_exit_1;
}
tmp_right_name_1 = const_int_pos_1;
tmp_assign_source_4 = BINARY_OPERATION_SUB( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 370;
goto frame_exception_exit_1;
}
assert( var_deg == NULL );
var_deg = tmp_assign_source_4;
tmp_assign_source_5 = const_int_0;
assert( var_res == NULL );
Py_INCREF( tmp_assign_source_5 );
var_res = tmp_assign_source_5;
tmp_range3_low_1 = var_deg;
tmp_range3_high_1 = const_int_neg_1;
tmp_range3_step_1 = const_int_neg_1;
tmp_iter_arg_2 = BUILTIN_RANGE3( tmp_range3_low_1, tmp_range3_high_1, tmp_range3_step_1 );
if ( tmp_iter_arg_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 372;
goto frame_exception_exit_1;
}
tmp_assign_source_6 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 372;
goto frame_exception_exit_1;
}
assert( tmp_for_loop_1__for_iterator == NULL );
tmp_for_loop_1__for_iterator = tmp_assign_source_6;
// Tried code:
loop_start_1:;
tmp_next_source_1 = tmp_for_loop_1__for_iterator;
tmp_assign_source_7 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_7 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 372;
goto try_except_handler_3;
}
}
{
PyObject *old = tmp_for_loop_1__iter_value;
tmp_for_loop_1__iter_value = tmp_assign_source_7;
Py_XDECREF( old );
}
tmp_assign_source_8 = tmp_for_loop_1__iter_value;
{
PyObject *old = var_i;
var_i = tmp_assign_source_8;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebadd );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebadd );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebadd" );
exception_tb = NULL;
exception_lineno = 373;
goto try_except_handler_3;
}
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebmulx );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebmulx );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebmulx" );
exception_tb = NULL;
exception_lineno = 373;
goto try_except_handler_3;
}
tmp_args_element_name_3 = var_res;
if ( tmp_args_element_name_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "res" );
exception_tb = NULL;
exception_lineno = 373;
goto try_except_handler_3;
}
frame_function->f_lineno = 373;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_args_element_name_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
if ( tmp_args_element_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 373;
goto try_except_handler_3;
}
tmp_subscribed_name_1 = par_pol;
tmp_subscript_name_1 = var_i;
tmp_args_element_name_4 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_args_element_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_element_name_2 );
exception_lineno = 373;
goto try_except_handler_3;
}
frame_function->f_lineno = 373;
{
PyObject *call_args[] = { tmp_args_element_name_2, tmp_args_element_name_4 };
tmp_assign_source_9 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_args_element_name_2 );
Py_DECREF( tmp_args_element_name_4 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 373;
goto try_except_handler_3;
}
{
PyObject *old = var_res;
var_res = tmp_assign_source_9;
Py_XDECREF( old );
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 372;
goto try_except_handler_3;
}
goto loop_start_1;
loop_end_1:;
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
tmp_return_value = var_res;
if ( tmp_return_value == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "res" );
exception_tb = NULL;
exception_lineno = 374;
goto frame_exception_exit_1;
}
Py_INCREF( tmp_return_value );
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_pol )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_pol,
par_pol
);
assert( res == 0 );
}
if ( var_deg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_deg,
var_deg
);
assert( res == 0 );
}
if ( var_res )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_res,
var_res
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_7_poly2cheb );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_pol );
Py_DECREF( par_pol );
par_pol = NULL;
CHECK_OBJECT( (PyObject *)var_deg );
Py_DECREF( var_deg );
var_deg = NULL;
Py_XDECREF( var_res );
var_res = NULL;
Py_XDECREF( var_i );
var_i = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_pol );
Py_DECREF( par_pol );
par_pol = NULL;
Py_XDECREF( var_deg );
var_deg = NULL;
Py_XDECREF( var_res );
var_res = NULL;
Py_XDECREF( var_i );
var_i = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_7_poly2cheb );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_8_cheb2poly( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *var_polyadd = NULL;
PyObject *var_polysub = NULL;
PyObject *var_polymulx = NULL;
PyObject *var_n = NULL;
PyObject *var_c0 = NULL;
PyObject *var_c1 = NULL;
PyObject *var_i = NULL;
PyObject *var_tmp = NULL;
PyObject *tmp_import_from_1__module = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_for_loop_1__for_iterator = NULL;
PyObject *tmp_for_loop_1__iter_value = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_element_name_8;
PyObject *tmp_args_element_name_9;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
int tmp_cmp_Lt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_frame_locals;
PyObject *tmp_import_globals_1;
PyObject *tmp_import_locals_1;
PyObject *tmp_import_name_from_1;
PyObject *tmp_import_name_from_2;
PyObject *tmp_import_name_from_3;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_len_arg_1;
PyObject *tmp_list_element_1;
PyObject *tmp_next_source_1;
PyObject *tmp_range3_high_1;
PyObject *tmp_range3_low_1;
PyObject *tmp_range3_step_1;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_source_name_1;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_unpack_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_9faaac09f2ff8b3a69284badcaa6537f, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_import_globals_1 = ((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
tmp_import_locals_1 = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( var_polyadd )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_polyadd,
var_polyadd
);
assert( res == 0 );
}
if ( var_polysub )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_polysub,
var_polysub
);
assert( res == 0 );
}
if ( var_polymulx )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_polymulx,
var_polymulx
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_c0 )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_c0,
var_c0
);
assert( res == 0 );
}
if ( var_c1 )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_c1,
var_c1
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
if ( var_tmp )
{
int res = PyDict_SetItem(
tmp_import_locals_1,
const_str_plain_tmp,
var_tmp
);
assert( res == 0 );
}
frame_function->f_lineno = 421;
tmp_assign_source_1 = IMPORT_MODULE( const_str_plain_polynomial, tmp_import_globals_1, tmp_import_locals_1, const_tuple_str_plain_polyadd_str_plain_polysub_str_plain_polymulx_tuple, const_int_pos_1 );
Py_DECREF( tmp_import_locals_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 421;
goto frame_exception_exit_1;
}
assert( tmp_import_from_1__module == NULL );
tmp_import_from_1__module = tmp_assign_source_1;
// Tried code:
tmp_import_name_from_1 = tmp_import_from_1__module;
tmp_assign_source_2 = IMPORT_NAME( tmp_import_name_from_1, const_str_plain_polyadd );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 421;
goto try_except_handler_2;
}
assert( var_polyadd == NULL );
var_polyadd = tmp_assign_source_2;
tmp_import_name_from_2 = tmp_import_from_1__module;
tmp_assign_source_3 = IMPORT_NAME( tmp_import_name_from_2, const_str_plain_polysub );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 421;
goto try_except_handler_2;
}
assert( var_polysub == NULL );
var_polysub = tmp_assign_source_3;
tmp_import_name_from_3 = tmp_import_from_1__module;
tmp_assign_source_4 = IMPORT_NAME( tmp_import_name_from_3, const_str_plain_polymulx );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 421;
goto try_except_handler_2;
}
assert( var_polymulx == NULL );
var_polymulx = tmp_assign_source_4;
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_import_from_1__module );
Py_DECREF( tmp_import_from_1__module );
tmp_import_from_1__module = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
CHECK_OBJECT( (PyObject *)tmp_import_from_1__module );
Py_DECREF( tmp_import_from_1__module );
tmp_import_from_1__module = NULL;
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 423;
goto try_except_handler_3;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 423;
goto try_except_handler_3;
}
tmp_args_element_name_1 = PyList_New( 1 );
tmp_list_element_1 = par_c;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
frame_function->f_lineno = 423;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 423;
goto try_except_handler_3;
}
tmp_assign_source_5 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 423;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_5;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_6 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_6 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 423;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_6;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 1)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
tmp_assign_source_7 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_7;
Py_INCREF( par_c );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
tmp_len_arg_1 = par_c;
tmp_assign_source_8 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 424;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_8;
tmp_compare_left_1 = var_n;
tmp_compare_right_1 = const_int_pos_3;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 425;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto frame_return_exit_1;
goto branch_end_1;
branch_no_1:;
tmp_subscribed_name_1 = par_c;
tmp_subscript_name_1 = const_int_neg_2;
tmp_assign_source_9 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 428;
goto frame_exception_exit_1;
}
assert( var_c0 == NULL );
var_c0 = tmp_assign_source_9;
tmp_subscribed_name_2 = par_c;
tmp_subscript_name_2 = const_int_neg_1;
tmp_assign_source_10 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 429;
goto frame_exception_exit_1;
}
assert( var_c1 == NULL );
var_c1 = tmp_assign_source_10;
tmp_left_name_1 = var_n;
tmp_right_name_1 = const_int_pos_1;
tmp_range3_low_1 = BINARY_OPERATION_SUB( tmp_left_name_1, tmp_right_name_1 );
if ( tmp_range3_low_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 431;
goto frame_exception_exit_1;
}
tmp_range3_high_1 = const_int_pos_1;
tmp_range3_step_1 = const_int_neg_1;
tmp_iter_arg_2 = BUILTIN_RANGE3( tmp_range3_low_1, tmp_range3_high_1, tmp_range3_step_1 );
Py_DECREF( tmp_range3_low_1 );
if ( tmp_iter_arg_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 431;
goto frame_exception_exit_1;
}
tmp_assign_source_11 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
if ( tmp_assign_source_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 431;
goto frame_exception_exit_1;
}
assert( tmp_for_loop_1__for_iterator == NULL );
tmp_for_loop_1__for_iterator = tmp_assign_source_11;
// Tried code:
loop_start_1:;
tmp_next_source_1 = tmp_for_loop_1__for_iterator;
tmp_assign_source_12 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_12 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 431;
goto try_except_handler_4;
}
}
{
PyObject *old = tmp_for_loop_1__iter_value;
tmp_for_loop_1__iter_value = tmp_assign_source_12;
Py_XDECREF( old );
}
tmp_assign_source_13 = tmp_for_loop_1__iter_value;
{
PyObject *old = var_i;
var_i = tmp_assign_source_13;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_assign_source_14 = var_c0;
if ( tmp_assign_source_14 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c0" );
exception_tb = NULL;
exception_lineno = 432;
goto try_except_handler_4;
}
{
PyObject *old = var_tmp;
var_tmp = tmp_assign_source_14;
Py_INCREF( var_tmp );
Py_XDECREF( old );
}
tmp_called_name_2 = var_polysub;
tmp_subscribed_name_3 = par_c;
tmp_left_name_2 = var_i;
tmp_right_name_2 = const_int_pos_2;
tmp_subscript_name_3 = BINARY_OPERATION_SUB( tmp_left_name_2, tmp_right_name_2 );
if ( tmp_subscript_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 433;
goto try_except_handler_4;
}
tmp_args_element_name_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
Py_DECREF( tmp_subscript_name_3 );
if ( tmp_args_element_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 433;
goto try_except_handler_4;
}
tmp_args_element_name_3 = var_c1;
if ( tmp_args_element_name_3 == NULL )
{
Py_DECREF( tmp_args_element_name_2 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c1" );
exception_tb = NULL;
exception_lineno = 433;
goto try_except_handler_4;
}
frame_function->f_lineno = 433;
{
PyObject *call_args[] = { tmp_args_element_name_2, tmp_args_element_name_3 };
tmp_assign_source_15 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_args_element_name_2 );
if ( tmp_assign_source_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 433;
goto try_except_handler_4;
}
{
PyObject *old = var_c0;
var_c0 = tmp_assign_source_15;
Py_XDECREF( old );
}
tmp_called_name_3 = var_polyadd;
tmp_args_element_name_4 = var_tmp;
tmp_called_name_4 = var_polymulx;
tmp_args_element_name_6 = var_c1;
if ( tmp_args_element_name_6 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c1" );
exception_tb = NULL;
exception_lineno = 434;
goto try_except_handler_4;
}
frame_function->f_lineno = 434;
{
PyObject *call_args[] = { tmp_args_element_name_6 };
tmp_left_name_3 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_4, call_args );
}
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 434;
goto try_except_handler_4;
}
tmp_right_name_3 = const_int_pos_2;
tmp_args_element_name_5 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_3 );
Py_DECREF( tmp_left_name_3 );
if ( tmp_args_element_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 434;
goto try_except_handler_4;
}
frame_function->f_lineno = 434;
{
PyObject *call_args[] = { tmp_args_element_name_4, tmp_args_element_name_5 };
tmp_assign_source_16 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_args_element_name_5 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 434;
goto try_except_handler_4;
}
{
PyObject *old = var_c1;
var_c1 = tmp_assign_source_16;
Py_XDECREF( old );
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 431;
goto try_except_handler_4;
}
goto loop_start_1;
loop_end_1:;
goto try_end_3;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
try_end_3:;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
tmp_called_name_5 = var_polyadd;
tmp_args_element_name_7 = var_c0;
if ( tmp_args_element_name_7 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c0" );
exception_tb = NULL;
exception_lineno = 435;
goto frame_exception_exit_1;
}
tmp_called_name_6 = var_polymulx;
tmp_args_element_name_9 = var_c1;
if ( tmp_args_element_name_9 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c1" );
exception_tb = NULL;
exception_lineno = 435;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 435;
{
PyObject *call_args[] = { tmp_args_element_name_9 };
tmp_args_element_name_8 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_6, call_args );
}
if ( tmp_args_element_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 435;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 435;
{
PyObject *call_args[] = { tmp_args_element_name_7, tmp_args_element_name_8 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_5, call_args );
}
Py_DECREF( tmp_args_element_name_8 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 435;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
branch_end_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( var_polyadd )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_polyadd,
var_polyadd
);
assert( res == 0 );
}
if ( var_polysub )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_polysub,
var_polysub
);
assert( res == 0 );
}
if ( var_polymulx )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_polymulx,
var_polymulx
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_c0 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c0,
var_c0
);
assert( res == 0 );
}
if ( var_c1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c1,
var_c1
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
if ( var_tmp )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_tmp,
var_tmp
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_8_cheb2poly );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)var_polyadd );
Py_DECREF( var_polyadd );
var_polyadd = NULL;
CHECK_OBJECT( (PyObject *)var_polysub );
Py_DECREF( var_polysub );
var_polysub = NULL;
CHECK_OBJECT( (PyObject *)var_polymulx );
Py_DECREF( var_polymulx );
var_polymulx = NULL;
CHECK_OBJECT( (PyObject *)var_n );
Py_DECREF( var_n );
var_n = NULL;
Py_XDECREF( var_c0 );
var_c0 = NULL;
Py_XDECREF( var_c1 );
var_c1 = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_polyadd );
var_polyadd = NULL;
Py_XDECREF( var_polysub );
var_polysub = NULL;
Py_XDECREF( var_polymulx );
var_polymulx = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_c0 );
var_c0 = NULL;
Py_XDECREF( var_c1 );
var_c1 = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_8_cheb2poly );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_9_chebline( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_off = python_pars[ 0 ];
PyObject *par_scl = python_pars[ 1 ];
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
int tmp_cmp_NotEq_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_frame_locals;
PyObject *tmp_list_element_1;
PyObject *tmp_list_element_2;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_0bc0647005540ac24d91c223cd223201, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_compare_left_1 = par_scl;
tmp_compare_right_1 = const_int_0;
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 486;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 487;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 487;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = PyList_New( 2 );
tmp_list_element_1 = par_off;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
tmp_list_element_1 = par_scl;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 1, tmp_list_element_1 );
frame_function->f_lineno = 487;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 487;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
goto branch_end_1;
branch_no_1:;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 489;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_array );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 489;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = PyList_New( 1 );
tmp_list_element_2 = par_off;
Py_INCREF( tmp_list_element_2 );
PyList_SET_ITEM( tmp_args_element_name_2, 0, tmp_list_element_2 );
frame_function->f_lineno = 489;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_2 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 489;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
branch_end_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_off )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_off,
par_off
);
assert( res == 0 );
}
if ( par_scl )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_scl,
par_scl
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_9_chebline );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_off );
Py_DECREF( par_off );
par_off = NULL;
CHECK_OBJECT( (PyObject *)par_scl );
Py_DECREF( par_scl );
par_scl = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_off );
Py_DECREF( par_off );
par_off = NULL;
CHECK_OBJECT( (PyObject *)par_scl );
Py_DECREF( par_scl );
par_scl = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_9_chebline );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_10_chebfromroots( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_roots = python_pars[ 0 ];
PyObject *var_r = NULL;
PyObject *var_p = NULL;
PyObject *var_n = NULL;
PyObject *var_m = NULL;
PyObject *var_i = NULL;
PyObject *var_tmp = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_list_contraction_1__$0 = NULL;
PyObject *tmp_list_contraction_1__contraction_result = NULL;
PyObject *tmp_list_contraction_1__iter_value_0 = NULL;
PyObject *tmp_tuple_unpack_2__source_iter = NULL;
PyObject *tmp_tuple_unpack_2__element_1 = NULL;
PyObject *tmp_tuple_unpack_2__element_2 = NULL;
PyObject *tmp_list_contraction_2__$0 = NULL;
PyObject *tmp_list_contraction_2__contraction_result = NULL;
PyObject *tmp_list_contraction_2__iter_value_0 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *exception_keeper_type_5;
PyObject *exception_keeper_value_5;
PyTracebackObject *exception_keeper_tb_5;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5;
PyObject *tmp_append_list_1;
PyObject *tmp_append_list_2;
PyObject *tmp_append_value_1;
PyObject *tmp_append_value_2;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_element_name_8;
PyObject *tmp_args_name_1;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscript_1;
int tmp_ass_subscript_res_1;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
PyObject *tmp_called_name_7;
int tmp_cmp_Eq_1;
int tmp_cmp_Gt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
int tmp_cond_truth_1;
PyObject *tmp_cond_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iter_arg_3;
PyObject *tmp_iter_arg_4;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_iterator_name_2;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_list_element_1;
PyObject *tmp_next_source_1;
PyObject *tmp_next_source_2;
PyObject *tmp_operand_name_1;
PyObject *tmp_outline_return_value_1;
PyObject *tmp_outline_return_value_2;
PyObject *tmp_range_arg_1;
int tmp_res;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscribed_name_4;
PyObject *tmp_subscribed_name_5;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_subscript_name_4;
PyObject *tmp_subscript_name_5;
PyObject *tmp_tuple_element_1;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
PyObject *tmp_unpack_3;
NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
tmp_outline_return_value_1 = NULL;
tmp_outline_return_value_2 = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_362d59b19030f8ddae7e628f283551bc, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_len_arg_1 = par_roots;
tmp_compare_left_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 541;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_int_0;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 541;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 542;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_ones );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 542;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 542;
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, &PyTuple_GET_ITEM( const_tuple_int_pos_1_tuple, 0 ) );
Py_DECREF( tmp_called_name_1 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 542;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
goto branch_end_1;
branch_no_1:;
// Tried code:
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 544;
goto try_except_handler_2;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_as_series );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 544;
goto try_except_handler_2;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = PyList_New( 1 );
tmp_list_element_1 = par_roots;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_tuple_element_1, 0, tmp_list_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_ee9b50b2ea01af7ea63a79da3e3468b3 );
frame_function->f_lineno = 544;
tmp_iter_arg_1 = CALL_FUNCTION( tmp_called_name_2, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 544;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 544;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 544;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 1)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_3 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_roots;
assert( old != NULL );
par_roots = tmp_assign_source_3;
Py_INCREF( par_roots );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
tmp_source_name_3 = par_roots;
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_sort );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 545;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 545;
tmp_unused = CALL_FUNCTION_NO_ARGS( tmp_called_name_3 );
Py_DECREF( tmp_called_name_3 );
if ( tmp_unused == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 545;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_unused );
// Tried code:
tmp_iter_arg_2 = par_roots;
tmp_assign_source_5 = MAKE_ITERATOR( tmp_iter_arg_2 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 546;
goto try_except_handler_3;
}
assert( tmp_list_contraction_1__$0 == NULL );
tmp_list_contraction_1__$0 = tmp_assign_source_5;
tmp_assign_source_6 = PyList_New( 0 );
assert( tmp_list_contraction_1__contraction_result == NULL );
tmp_list_contraction_1__contraction_result = tmp_assign_source_6;
loop_start_1:;
tmp_next_source_1 = tmp_list_contraction_1__$0;
tmp_assign_source_7 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_7 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 546;
goto try_except_handler_3;
}
}
{
PyObject *old = tmp_list_contraction_1__iter_value_0;
tmp_list_contraction_1__iter_value_0 = tmp_assign_source_7;
Py_XDECREF( old );
}
tmp_assign_source_8 = tmp_list_contraction_1__iter_value_0;
{
PyObject *old = var_r;
var_r = tmp_assign_source_8;
Py_INCREF( var_r );
Py_XDECREF( old );
}
tmp_append_list_1 = tmp_list_contraction_1__contraction_result;
tmp_called_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebline );
if (unlikely( tmp_called_name_4 == NULL ))
{
tmp_called_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebline );
}
if ( tmp_called_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebline" );
exception_tb = NULL;
exception_lineno = 546;
goto try_except_handler_3;
}
tmp_operand_name_1 = var_r;
tmp_args_element_name_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 546;
goto try_except_handler_3;
}
tmp_args_element_name_2 = const_int_pos_1;
PyThreadState_GET()->frame->f_lineno = 546;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_append_value_1 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_4, call_args );
}
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_append_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 546;
goto try_except_handler_3;
}
assert( PyList_Check( tmp_append_list_1 ) );
tmp_res = PyList_Append( tmp_append_list_1, tmp_append_value_1 );
Py_DECREF( tmp_append_value_1 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 546;
goto try_except_handler_3;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 546;
goto try_except_handler_3;
}
goto loop_start_1;
loop_end_1:;
tmp_outline_return_value_1 = tmp_list_contraction_1__contraction_result;
Py_INCREF( tmp_outline_return_value_1 );
goto try_return_handler_3;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_10_chebfromroots );
return NULL;
// Return handler code:
try_return_handler_3:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__$0 );
Py_DECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__contraction_result );
Py_DECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
goto outline_result_1;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
Py_XDECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_10_chebfromroots );
return NULL;
outline_result_1:;
tmp_assign_source_4 = tmp_outline_return_value_1;
assert( var_p == NULL );
var_p = tmp_assign_source_4;
tmp_len_arg_2 = var_p;
tmp_assign_source_9 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 547;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_9;
loop_start_2:;
tmp_compare_left_2 = var_n;
if ( tmp_compare_left_2 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "n" );
exception_tb = NULL;
exception_lineno = 548;
goto frame_exception_exit_1;
}
tmp_compare_right_2 = const_int_pos_1;
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 548;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_no_2;
}
else
{
goto branch_yes_2;
}
branch_yes_2:;
goto loop_end_2;
branch_no_2:;
// Tried code:
tmp_called_name_5 = LOOKUP_BUILTIN( const_str_plain_divmod );
assert( tmp_called_name_5 != NULL );
tmp_args_element_name_3 = var_n;
if ( tmp_args_element_name_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "n" );
exception_tb = NULL;
exception_lineno = 549;
goto try_except_handler_4;
}
tmp_args_element_name_4 = const_int_pos_2;
frame_function->f_lineno = 549;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_iter_arg_3 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_5, call_args );
}
if ( tmp_iter_arg_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 549;
goto try_except_handler_4;
}
tmp_assign_source_10 = MAKE_ITERATOR( tmp_iter_arg_3 );
Py_DECREF( tmp_iter_arg_3 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 549;
goto try_except_handler_4;
}
{
PyObject *old = tmp_tuple_unpack_2__source_iter;
tmp_tuple_unpack_2__source_iter = tmp_assign_source_10;
Py_XDECREF( old );
}
tmp_unpack_2 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_11 = UNPACK_NEXT( tmp_unpack_2, 0 );
if ( tmp_assign_source_11 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 549;
goto try_except_handler_4;
}
{
PyObject *old = tmp_tuple_unpack_2__element_1;
tmp_tuple_unpack_2__element_1 = tmp_assign_source_11;
Py_XDECREF( old );
}
tmp_unpack_3 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_12 = UNPACK_NEXT( tmp_unpack_3, 1 );
if ( tmp_assign_source_12 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 549;
goto try_except_handler_4;
}
{
PyObject *old = tmp_tuple_unpack_2__element_2;
tmp_tuple_unpack_2__element_2 = tmp_assign_source_12;
Py_XDECREF( old );
}
tmp_iterator_name_2 = tmp_tuple_unpack_2__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_2 ); assert( HAS_ITERNEXT( tmp_iterator_name_2 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_2 )->tp_iternext)( tmp_iterator_name_2 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_4;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_4;
}
goto try_end_2;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
tmp_assign_source_13 = tmp_tuple_unpack_2__element_1;
{
PyObject *old = var_m;
var_m = tmp_assign_source_13;
Py_INCREF( var_m );
Py_XDECREF( old );
}
tmp_assign_source_14 = tmp_tuple_unpack_2__element_2;
{
PyObject *old = var_r;
var_r = tmp_assign_source_14;
Py_INCREF( var_r );
Py_XDECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__source_iter );
Py_DECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_1 );
Py_DECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_2 );
Py_DECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
// Tried code:
tmp_range_arg_1 = var_m;
tmp_iter_arg_4 = BUILTIN_RANGE( tmp_range_arg_1 );
if ( tmp_iter_arg_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 550;
goto try_except_handler_5;
}
tmp_assign_source_16 = MAKE_ITERATOR( tmp_iter_arg_4 );
Py_DECREF( tmp_iter_arg_4 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 550;
goto try_except_handler_5;
}
{
PyObject *old = tmp_list_contraction_2__$0;
tmp_list_contraction_2__$0 = tmp_assign_source_16;
Py_XDECREF( old );
}
tmp_assign_source_17 = PyList_New( 0 );
{
PyObject *old = tmp_list_contraction_2__contraction_result;
tmp_list_contraction_2__contraction_result = tmp_assign_source_17;
Py_XDECREF( old );
}
loop_start_3:;
tmp_next_source_2 = tmp_list_contraction_2__$0;
tmp_assign_source_18 = ITERATOR_NEXT( tmp_next_source_2 );
if ( tmp_assign_source_18 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_3;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 550;
goto try_except_handler_5;
}
}
{
PyObject *old = tmp_list_contraction_2__iter_value_0;
tmp_list_contraction_2__iter_value_0 = tmp_assign_source_18;
Py_XDECREF( old );
}
tmp_assign_source_19 = tmp_list_contraction_2__iter_value_0;
{
PyObject *old = var_i;
var_i = tmp_assign_source_19;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_append_list_2 = tmp_list_contraction_2__contraction_result;
tmp_called_name_6 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebmul );
if (unlikely( tmp_called_name_6 == NULL ))
{
tmp_called_name_6 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebmul );
}
if ( tmp_called_name_6 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebmul" );
exception_tb = NULL;
exception_lineno = 550;
goto try_except_handler_5;
}
tmp_subscribed_name_1 = var_p;
if ( tmp_subscribed_name_1 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "p" );
exception_tb = NULL;
exception_lineno = 550;
goto try_except_handler_5;
}
tmp_subscript_name_1 = var_i;
tmp_args_element_name_5 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_args_element_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 550;
goto try_except_handler_5;
}
tmp_subscribed_name_2 = var_p;
if ( tmp_subscribed_name_2 == NULL )
{
Py_DECREF( tmp_args_element_name_5 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "p" );
exception_tb = NULL;
exception_lineno = 550;
goto try_except_handler_5;
}
tmp_left_name_1 = var_i;
tmp_right_name_1 = var_m;
tmp_subscript_name_2 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
if ( tmp_subscript_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_element_name_5 );
exception_lineno = 550;
goto try_except_handler_5;
}
tmp_args_element_name_6 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
Py_DECREF( tmp_subscript_name_2 );
if ( tmp_args_element_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_element_name_5 );
exception_lineno = 550;
goto try_except_handler_5;
}
PyThreadState_GET()->frame->f_lineno = 550;
{
PyObject *call_args[] = { tmp_args_element_name_5, tmp_args_element_name_6 };
tmp_append_value_2 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_6, call_args );
}
Py_DECREF( tmp_args_element_name_5 );
Py_DECREF( tmp_args_element_name_6 );
if ( tmp_append_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 550;
goto try_except_handler_5;
}
assert( PyList_Check( tmp_append_list_2 ) );
tmp_res = PyList_Append( tmp_append_list_2, tmp_append_value_2 );
Py_DECREF( tmp_append_value_2 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 550;
goto try_except_handler_5;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 550;
goto try_except_handler_5;
}
goto loop_start_3;
loop_end_3:;
tmp_outline_return_value_2 = tmp_list_contraction_2__contraction_result;
Py_INCREF( tmp_outline_return_value_2 );
goto try_return_handler_5;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_10_chebfromroots );
return NULL;
// Return handler code:
try_return_handler_5:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_2__$0 );
Py_DECREF( tmp_list_contraction_2__$0 );
tmp_list_contraction_2__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_2__contraction_result );
Py_DECREF( tmp_list_contraction_2__contraction_result );
tmp_list_contraction_2__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_2__iter_value_0 );
tmp_list_contraction_2__iter_value_0 = NULL;
goto outline_result_2;
// Exception handler code:
try_except_handler_5:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction_2__$0 );
tmp_list_contraction_2__$0 = NULL;
Py_XDECREF( tmp_list_contraction_2__contraction_result );
tmp_list_contraction_2__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_2__iter_value_0 );
tmp_list_contraction_2__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_10_chebfromroots );
return NULL;
outline_result_2:;
tmp_assign_source_15 = tmp_outline_return_value_2;
{
PyObject *old = var_tmp;
var_tmp = tmp_assign_source_15;
Py_XDECREF( old );
}
tmp_cond_value_1 = var_r;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 551;
goto frame_exception_exit_1;
}
if ( tmp_cond_truth_1 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_called_name_7 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebmul );
if (unlikely( tmp_called_name_7 == NULL ))
{
tmp_called_name_7 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebmul );
}
if ( tmp_called_name_7 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebmul" );
exception_tb = NULL;
exception_lineno = 552;
goto frame_exception_exit_1;
}
tmp_subscribed_name_3 = var_tmp;
tmp_subscript_name_3 = const_int_0;
tmp_args_element_name_7 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
if ( tmp_args_element_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 552;
goto frame_exception_exit_1;
}
tmp_subscribed_name_4 = var_p;
if ( tmp_subscribed_name_4 == NULL )
{
Py_DECREF( tmp_args_element_name_7 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "p" );
exception_tb = NULL;
exception_lineno = 552;
goto frame_exception_exit_1;
}
tmp_subscript_name_4 = const_int_neg_1;
tmp_args_element_name_8 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_4, tmp_subscript_name_4 );
if ( tmp_args_element_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_element_name_7 );
exception_lineno = 552;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 552;
{
PyObject *call_args[] = { tmp_args_element_name_7, tmp_args_element_name_8 };
tmp_ass_subvalue_1 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_7, call_args );
}
Py_DECREF( tmp_args_element_name_7 );
Py_DECREF( tmp_args_element_name_8 );
if ( tmp_ass_subvalue_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 552;
goto frame_exception_exit_1;
}
tmp_ass_subscribed_1 = var_tmp;
tmp_ass_subscript_1 = const_int_0;
tmp_ass_subscript_res_1 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_1, tmp_ass_subscript_1, 0, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subvalue_1 );
if ( tmp_ass_subscript_res_1 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 552;
goto frame_exception_exit_1;
}
branch_no_3:;
tmp_assign_source_20 = var_tmp;
{
PyObject *old = var_p;
var_p = tmp_assign_source_20;
Py_INCREF( var_p );
Py_XDECREF( old );
}
tmp_assign_source_21 = var_m;
{
PyObject *old = var_n;
var_n = tmp_assign_source_21;
Py_INCREF( var_n );
Py_XDECREF( old );
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 548;
goto frame_exception_exit_1;
}
goto loop_start_2;
loop_end_2:;
tmp_subscribed_name_5 = var_p;
if ( tmp_subscribed_name_5 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "p" );
exception_tb = NULL;
exception_lineno = 555;
goto frame_exception_exit_1;
}
tmp_subscript_name_5 = const_int_0;
tmp_return_value = LOOKUP_SUBSCRIPT( tmp_subscribed_name_5, tmp_subscript_name_5 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 555;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
branch_end_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_roots )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_roots,
par_roots
);
assert( res == 0 );
}
if ( var_r )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_r,
var_r
);
assert( res == 0 );
}
if ( var_p )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_p,
var_p
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_m )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_m,
var_m
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
if ( var_tmp )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_tmp,
var_tmp
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_10_chebfromroots );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_roots );
Py_DECREF( par_roots );
par_roots = NULL;
Py_XDECREF( var_r );
var_r = NULL;
Py_XDECREF( var_p );
var_p = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_m );
var_m = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_5 = exception_type;
exception_keeper_value_5 = exception_value;
exception_keeper_tb_5 = exception_tb;
exception_keeper_lineno_5 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_roots );
Py_DECREF( par_roots );
par_roots = NULL;
Py_XDECREF( var_r );
var_r = NULL;
Py_XDECREF( var_p );
var_p = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_m );
var_m = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
// Re-raise.
exception_type = exception_keeper_type_5;
exception_value = exception_keeper_value_5;
exception_tb = exception_keeper_tb_5;
exception_lineno = exception_keeper_lineno_5;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_10_chebfromroots );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_11_chebadd( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c1 = python_pars[ 0 ];
PyObject *par_c2 = python_pars[ 1 ];
PyObject *var_ret = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_inplace_assign_slice_1__target = NULL;
PyObject *tmp_inplace_assign_slice_1__upper = NULL;
PyObject *tmp_inplace_assign_slice_2__target = NULL;
PyObject *tmp_inplace_assign_slice_2__upper = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
int tmp_cmp_Gt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_list_element_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
PyObject *tmp_slice_upper_1;
PyObject *tmp_slice_upper_2;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_target_2;
PyObject *tmp_sliceass_upper_1;
PyObject *tmp_sliceass_upper_2;
PyObject *tmp_sliceass_value_1;
PyObject *tmp_sliceass_value_2;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_0c65ed6d15fbdd18c7d28564340c98aa, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 598;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 598;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 2 );
tmp_list_element_1 = par_c1;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
tmp_list_element_1 = par_c2;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 1, tmp_list_element_1 );
frame_function->f_lineno = 598;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 598;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 598;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 598;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_3 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_3 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 598;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_3;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_4 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c1;
assert( old != NULL );
par_c1 = tmp_assign_source_4;
Py_INCREF( par_c1 );
Py_DECREF( old );
}
tmp_assign_source_5 = tmp_tuple_unpack_1__element_2;
{
PyObject *old = par_c2;
assert( old != NULL );
par_c2 = tmp_assign_source_5;
Py_INCREF( par_c2 );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_len_arg_1 = par_c1;
tmp_compare_left_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 599;
goto frame_exception_exit_1;
}
tmp_len_arg_2 = par_c2;
tmp_compare_right_1 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_compare_right_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 599;
goto frame_exception_exit_1;
}
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
Py_DECREF( tmp_compare_right_1 );
exception_lineno = 599;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
Py_DECREF( tmp_compare_right_1 );
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_assign_source_6 = par_c1;
assert( tmp_inplace_assign_slice_1__target == NULL );
Py_INCREF( tmp_assign_source_6 );
tmp_inplace_assign_slice_1__target = tmp_assign_source_6;
// Tried code:
tmp_source_name_2 = par_c2;
tmp_assign_source_7 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_size );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 600;
goto try_except_handler_3;
}
assert( tmp_inplace_assign_slice_1__upper == NULL );
tmp_inplace_assign_slice_1__upper = tmp_assign_source_7;
tmp_slice_source_1 = tmp_inplace_assign_slice_1__target;
tmp_slice_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_left_name_1 = LOOKUP_SLICE( tmp_slice_source_1, Py_None, tmp_slice_upper_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 600;
goto try_except_handler_3;
}
tmp_right_name_1 = par_c2;
tmp_sliceass_value_1 = BINARY_OPERATION( PyNumber_InPlaceAdd, tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_sliceass_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 600;
goto try_except_handler_3;
}
tmp_sliceass_target_1 = tmp_inplace_assign_slice_1__target;
tmp_sliceass_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_1, Py_None, tmp_sliceass_upper_1, tmp_sliceass_value_1 );
Py_DECREF( tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 600;
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__upper );
Py_DECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
tmp_assign_source_8 = par_c1;
assert( var_ret == NULL );
Py_INCREF( tmp_assign_source_8 );
var_ret = tmp_assign_source_8;
goto branch_end_1;
branch_no_1:;
tmp_assign_source_9 = par_c2;
assert( tmp_inplace_assign_slice_2__target == NULL );
Py_INCREF( tmp_assign_source_9 );
tmp_inplace_assign_slice_2__target = tmp_assign_source_9;
// Tried code:
tmp_source_name_3 = par_c1;
tmp_assign_source_10 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_size );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 603;
goto try_except_handler_4;
}
assert( tmp_inplace_assign_slice_2__upper == NULL );
tmp_inplace_assign_slice_2__upper = tmp_assign_source_10;
tmp_slice_source_2 = tmp_inplace_assign_slice_2__target;
tmp_slice_upper_2 = tmp_inplace_assign_slice_2__upper;
tmp_left_name_2 = LOOKUP_SLICE( tmp_slice_source_2, Py_None, tmp_slice_upper_2 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 603;
goto try_except_handler_4;
}
tmp_right_name_2 = par_c1;
tmp_sliceass_value_2 = BINARY_OPERATION( PyNumber_InPlaceAdd, tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_sliceass_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 603;
goto try_except_handler_4;
}
tmp_sliceass_target_2 = tmp_inplace_assign_slice_2__target;
tmp_sliceass_upper_2 = tmp_inplace_assign_slice_2__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_2, Py_None, tmp_sliceass_upper_2, tmp_sliceass_value_2 );
Py_DECREF( tmp_sliceass_value_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 603;
goto try_except_handler_4;
}
goto try_end_3;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_2__upper );
tmp_inplace_assign_slice_2__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
try_end_3:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__upper );
Py_DECREF( tmp_inplace_assign_slice_2__upper );
tmp_inplace_assign_slice_2__upper = NULL;
tmp_assign_source_11 = par_c2;
assert( var_ret == NULL );
Py_INCREF( tmp_assign_source_11 );
var_ret = tmp_assign_source_11;
branch_end_1:;
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 605;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_trimseq );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 605;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = var_ret;
frame_function->f_lineno = 605;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 605;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c1,
par_c1
);
assert( res == 0 );
}
if ( par_c2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c2,
par_c2
);
assert( res == 0 );
}
if ( var_ret )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ret,
var_ret
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_11_chebadd );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
CHECK_OBJECT( (PyObject *)par_c2 );
Py_DECREF( par_c2 );
par_c2 = NULL;
CHECK_OBJECT( (PyObject *)var_ret );
Py_DECREF( var_ret );
var_ret = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
CHECK_OBJECT( (PyObject *)par_c2 );
Py_DECREF( par_c2 );
par_c2 = NULL;
Py_XDECREF( var_ret );
var_ret = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_11_chebadd );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_12_chebsub( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c1 = python_pars[ 0 ];
PyObject *par_c2 = python_pars[ 1 ];
PyObject *var_ret = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_inplace_assign_slice_1__target = NULL;
PyObject *tmp_inplace_assign_slice_1__upper = NULL;
PyObject *tmp_inplace_assign_slice_2__target = NULL;
PyObject *tmp_inplace_assign_slice_2__upper = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
int tmp_cmp_Gt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_list_element_1;
PyObject *tmp_operand_name_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
PyObject *tmp_slice_upper_1;
PyObject *tmp_slice_upper_2;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_target_2;
PyObject *tmp_sliceass_upper_1;
PyObject *tmp_sliceass_upper_2;
PyObject *tmp_sliceass_value_1;
PyObject *tmp_sliceass_value_2;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_ec9b194068ae3a9d20e09b996d4581a4, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 650;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 650;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 2 );
tmp_list_element_1 = par_c1;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
tmp_list_element_1 = par_c2;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 1, tmp_list_element_1 );
frame_function->f_lineno = 650;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 650;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 650;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 650;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_3 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_3 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 650;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_3;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_4 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c1;
assert( old != NULL );
par_c1 = tmp_assign_source_4;
Py_INCREF( par_c1 );
Py_DECREF( old );
}
tmp_assign_source_5 = tmp_tuple_unpack_1__element_2;
{
PyObject *old = par_c2;
assert( old != NULL );
par_c2 = tmp_assign_source_5;
Py_INCREF( par_c2 );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_len_arg_1 = par_c1;
tmp_compare_left_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 651;
goto frame_exception_exit_1;
}
tmp_len_arg_2 = par_c2;
tmp_compare_right_1 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_compare_right_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 651;
goto frame_exception_exit_1;
}
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
Py_DECREF( tmp_compare_right_1 );
exception_lineno = 651;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
Py_DECREF( tmp_compare_right_1 );
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_assign_source_6 = par_c1;
assert( tmp_inplace_assign_slice_1__target == NULL );
Py_INCREF( tmp_assign_source_6 );
tmp_inplace_assign_slice_1__target = tmp_assign_source_6;
// Tried code:
tmp_source_name_2 = par_c2;
tmp_assign_source_7 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_size );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 652;
goto try_except_handler_3;
}
assert( tmp_inplace_assign_slice_1__upper == NULL );
tmp_inplace_assign_slice_1__upper = tmp_assign_source_7;
tmp_slice_source_1 = tmp_inplace_assign_slice_1__target;
tmp_slice_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_left_name_1 = LOOKUP_SLICE( tmp_slice_source_1, Py_None, tmp_slice_upper_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 652;
goto try_except_handler_3;
}
tmp_right_name_1 = par_c2;
tmp_sliceass_value_1 = BINARY_OPERATION( PyNumber_InPlaceSubtract, tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_sliceass_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 652;
goto try_except_handler_3;
}
tmp_sliceass_target_1 = tmp_inplace_assign_slice_1__target;
tmp_sliceass_upper_1 = tmp_inplace_assign_slice_1__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_1, Py_None, tmp_sliceass_upper_1, tmp_sliceass_value_1 );
Py_DECREF( tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 652;
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__upper );
Py_DECREF( tmp_inplace_assign_slice_1__upper );
tmp_inplace_assign_slice_1__upper = NULL;
tmp_assign_source_8 = par_c1;
assert( var_ret == NULL );
Py_INCREF( tmp_assign_source_8 );
var_ret = tmp_assign_source_8;
goto branch_end_1;
branch_no_1:;
tmp_operand_name_1 = par_c2;
tmp_assign_source_9 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 655;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c2;
assert( old != NULL );
par_c2 = tmp_assign_source_9;
Py_DECREF( old );
}
tmp_assign_source_10 = par_c2;
assert( tmp_inplace_assign_slice_2__target == NULL );
Py_INCREF( tmp_assign_source_10 );
tmp_inplace_assign_slice_2__target = tmp_assign_source_10;
// Tried code:
tmp_source_name_3 = par_c1;
tmp_assign_source_11 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_size );
if ( tmp_assign_source_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 656;
goto try_except_handler_4;
}
assert( tmp_inplace_assign_slice_2__upper == NULL );
tmp_inplace_assign_slice_2__upper = tmp_assign_source_11;
tmp_slice_source_2 = tmp_inplace_assign_slice_2__target;
tmp_slice_upper_2 = tmp_inplace_assign_slice_2__upper;
tmp_left_name_2 = LOOKUP_SLICE( tmp_slice_source_2, Py_None, tmp_slice_upper_2 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 656;
goto try_except_handler_4;
}
tmp_right_name_2 = par_c1;
tmp_sliceass_value_2 = BINARY_OPERATION( PyNumber_InPlaceAdd, tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_sliceass_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 656;
goto try_except_handler_4;
}
tmp_sliceass_target_2 = tmp_inplace_assign_slice_2__target;
tmp_sliceass_upper_2 = tmp_inplace_assign_slice_2__upper;
tmp_result = SET_SLICE( tmp_sliceass_target_2, Py_None, tmp_sliceass_upper_2, tmp_sliceass_value_2 );
Py_DECREF( tmp_sliceass_value_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 656;
goto try_except_handler_4;
}
goto try_end_3;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
Py_XDECREF( tmp_inplace_assign_slice_2__upper );
tmp_inplace_assign_slice_2__upper = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
try_end_3:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__target );
Py_DECREF( tmp_inplace_assign_slice_2__target );
tmp_inplace_assign_slice_2__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_2__upper );
Py_DECREF( tmp_inplace_assign_slice_2__upper );
tmp_inplace_assign_slice_2__upper = NULL;
tmp_assign_source_12 = par_c2;
assert( var_ret == NULL );
Py_INCREF( tmp_assign_source_12 );
var_ret = tmp_assign_source_12;
branch_end_1:;
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 658;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_trimseq );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 658;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = var_ret;
frame_function->f_lineno = 658;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 658;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c1,
par_c1
);
assert( res == 0 );
}
if ( par_c2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c2,
par_c2
);
assert( res == 0 );
}
if ( var_ret )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ret,
var_ret
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_12_chebsub );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
CHECK_OBJECT( (PyObject *)par_c2 );
Py_DECREF( par_c2 );
par_c2 = NULL;
CHECK_OBJECT( (PyObject *)var_ret );
Py_DECREF( var_ret );
var_ret = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
Py_XDECREF( par_c2 );
par_c2 = NULL;
Py_XDECREF( var_ret );
var_ret = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_12_chebsub );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_13_chebmulx( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *var_prd = NULL;
PyObject *var_tmp = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_inplace_assign_slice_1__target = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
int tmp_and_left_truth_1;
PyObject *tmp_and_left_value_1;
PyObject *tmp_and_right_value_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_name_1;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscribed_2;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subscript_2;
int tmp_ass_subscript_res_1;
int tmp_ass_subscript_res_2;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_ass_subvalue_2;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
int tmp_cmp_Gt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
int tmp_cond_truth_1;
PyObject *tmp_cond_value_1;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_len_arg_3;
PyObject *tmp_list_element_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
Py_ssize_t tmp_slice_index_upper_1;
Py_ssize_t tmp_slice_index_upper_2;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
Py_ssize_t tmp_sliceass_index_upper_1;
Py_ssize_t tmp_sliceass_index_upper_2;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_target_2;
PyObject *tmp_sliceass_value_1;
PyObject *tmp_sliceass_value_2;
Py_ssize_t tmp_sliceassslicedel_index_lower_1;
Py_ssize_t tmp_sliceassslicedel_index_lower_2;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
Py_ssize_t tmp_sliceslicedel_index_lower_2;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_tuple_element_1;
PyObject *tmp_unpack_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_3bb7695a13175ba50a73d402f1d1db82, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 686;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 686;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 1 );
tmp_list_element_1 = par_c;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
frame_function->f_lineno = 686;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 686;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 686;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 686;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 1)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_3 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_3;
Py_INCREF( par_c );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
tmp_len_arg_1 = par_c;
tmp_compexpr_left_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compexpr_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 688;
goto frame_exception_exit_1;
}
tmp_compexpr_right_1 = const_int_pos_1;
tmp_and_left_value_1 = RICH_COMPARE_EQ( tmp_compexpr_left_1, tmp_compexpr_right_1 );
Py_DECREF( tmp_compexpr_left_1 );
if ( tmp_and_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 688;
goto frame_exception_exit_1;
}
tmp_and_left_truth_1 = CHECK_IF_TRUE( tmp_and_left_value_1 );
if ( tmp_and_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_and_left_value_1 );
exception_lineno = 688;
goto frame_exception_exit_1;
}
if ( tmp_and_left_truth_1 == 1 )
{
goto and_right_1;
}
else
{
goto and_left_1;
}
and_right_1:;
Py_DECREF( tmp_and_left_value_1 );
tmp_subscribed_name_1 = par_c;
tmp_subscript_name_1 = const_int_0;
tmp_compexpr_left_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_compexpr_left_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 688;
goto frame_exception_exit_1;
}
tmp_compexpr_right_2 = const_int_0;
tmp_and_right_value_1 = RICH_COMPARE_EQ( tmp_compexpr_left_2, tmp_compexpr_right_2 );
Py_DECREF( tmp_compexpr_left_2 );
if ( tmp_and_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 688;
goto frame_exception_exit_1;
}
tmp_cond_value_1 = tmp_and_right_value_1;
goto and_end_1;
and_left_1:;
tmp_cond_value_1 = tmp_and_left_value_1;
and_end_1:;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_1 );
exception_lineno = 688;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto frame_return_exit_1;
branch_no_1:;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 691;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_empty );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 691;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_len_arg_2 = par_c;
tmp_left_name_1 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
exception_lineno = 691;
goto frame_exception_exit_1;
}
tmp_right_name_1 = const_int_pos_1;
tmp_tuple_element_1 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_tuple_element_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
exception_lineno = 691;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_3 = par_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 691;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 691;
tmp_assign_source_4 = CALL_FUNCTION( tmp_called_name_2, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 691;
goto frame_exception_exit_1;
}
assert( var_prd == NULL );
var_prd = tmp_assign_source_4;
tmp_subscribed_name_2 = par_c;
tmp_subscript_name_2 = const_int_0;
tmp_left_name_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 692;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_int_0;
tmp_ass_subvalue_1 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_ass_subvalue_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 692;
goto frame_exception_exit_1;
}
tmp_ass_subscribed_1 = var_prd;
tmp_ass_subscript_1 = const_int_0;
tmp_ass_subscript_res_1 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_1, tmp_ass_subscript_1, 0, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subvalue_1 );
if ( tmp_ass_subscript_res_1 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 692;
goto frame_exception_exit_1;
}
tmp_subscribed_name_3 = par_c;
tmp_subscript_name_3 = const_int_0;
tmp_ass_subvalue_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
if ( tmp_ass_subvalue_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 693;
goto frame_exception_exit_1;
}
tmp_ass_subscribed_2 = var_prd;
tmp_ass_subscript_2 = const_int_pos_1;
tmp_ass_subscript_res_2 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_2, tmp_ass_subscript_2, 1, tmp_ass_subvalue_2 );
Py_DECREF( tmp_ass_subvalue_2 );
if ( tmp_ass_subscript_res_2 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 693;
goto frame_exception_exit_1;
}
tmp_len_arg_3 = par_c;
tmp_compare_left_1 = BUILTIN_LEN( tmp_len_arg_3 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 694;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_int_pos_1;
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 694;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_sliceslicedel_index_lower_1 = 1;
tmp_slice_index_upper_1 = PY_SSIZE_T_MAX;
tmp_slice_source_1 = par_c;
tmp_left_name_3 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 695;
goto frame_exception_exit_1;
}
tmp_right_name_3 = const_int_pos_2;
tmp_assign_source_5 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_3, tmp_right_name_3 );
Py_DECREF( tmp_left_name_3 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 695;
goto frame_exception_exit_1;
}
assert( var_tmp == NULL );
var_tmp = tmp_assign_source_5;
tmp_sliceass_value_1 = var_tmp;
tmp_sliceass_target_1 = var_prd;
tmp_sliceassslicedel_index_lower_1 = 2;
tmp_sliceass_index_upper_1 = PY_SSIZE_T_MAX;
tmp_result = SET_INDEX_SLICE( tmp_sliceass_target_1, tmp_sliceassslicedel_index_lower_1, tmp_sliceass_index_upper_1, tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 696;
goto frame_exception_exit_1;
}
tmp_assign_source_6 = var_prd;
assert( tmp_inplace_assign_slice_1__target == NULL );
Py_INCREF( tmp_assign_source_6 );
tmp_inplace_assign_slice_1__target = tmp_assign_source_6;
// Tried code:
tmp_sliceslicedel_index_lower_2 = 0;
tmp_slice_index_upper_2 = -2;
tmp_slice_source_2 = tmp_inplace_assign_slice_1__target;
tmp_left_name_4 = LOOKUP_INDEX_SLICE( tmp_slice_source_2, tmp_sliceslicedel_index_lower_2, tmp_slice_index_upper_2 );
if ( tmp_left_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 697;
goto try_except_handler_3;
}
tmp_right_name_4 = var_tmp;
tmp_sliceass_value_2 = BINARY_OPERATION( PyNumber_InPlaceAdd, tmp_left_name_4, tmp_right_name_4 );
Py_DECREF( tmp_left_name_4 );
if ( tmp_sliceass_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 697;
goto try_except_handler_3;
}
tmp_sliceass_target_2 = tmp_inplace_assign_slice_1__target;
tmp_sliceassslicedel_index_lower_2 = 0;
tmp_sliceass_index_upper_2 = -2;
tmp_result = SET_INDEX_SLICE( tmp_sliceass_target_2, tmp_sliceassslicedel_index_lower_2, tmp_sliceass_index_upper_2, tmp_sliceass_value_2 );
Py_DECREF( tmp_sliceass_value_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 697;
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_slice_1__target );
Py_DECREF( tmp_inplace_assign_slice_1__target );
tmp_inplace_assign_slice_1__target = NULL;
branch_no_2:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( var_prd )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_prd,
var_prd
);
assert( res == 0 );
}
if ( var_tmp )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_tmp,
var_tmp
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = var_prd;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_13_chebmulx );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_prd );
var_prd = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_prd );
var_prd = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_13_chebmulx );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_14_chebmul( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c1 = python_pars[ 0 ];
PyObject *par_c2 = python_pars[ 1 ];
PyObject *var_z1 = NULL;
PyObject *var_z2 = NULL;
PyObject *var_prd = NULL;
PyObject *var_ret = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_list_element_1;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_5b8c601cfec3d8eb92b4552f0bc37453, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 742;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 742;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 2 );
tmp_list_element_1 = par_c1;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
tmp_list_element_1 = par_c2;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 1, tmp_list_element_1 );
frame_function->f_lineno = 742;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 742;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 742;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 742;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_3 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_3 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 742;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_3;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_4 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c1;
assert( old != NULL );
par_c1 = tmp_assign_source_4;
Py_INCREF( par_c1 );
Py_DECREF( old );
}
tmp_assign_source_5 = tmp_tuple_unpack_1__element_2;
{
PyObject *old = par_c2;
assert( old != NULL );
par_c2 = tmp_assign_source_5;
Py_INCREF( par_c2 );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_cseries_to_zseries" );
exception_tb = NULL;
exception_lineno = 743;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = par_c1;
frame_function->f_lineno = 743;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_assign_source_6 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 743;
goto frame_exception_exit_1;
}
assert( var_z1 == NULL );
var_z1 = tmp_assign_source_6;
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_cseries_to_zseries" );
exception_tb = NULL;
exception_lineno = 744;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_c2;
frame_function->f_lineno = 744;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_assign_source_7 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 744;
goto frame_exception_exit_1;
}
assert( var_z2 == NULL );
var_z2 = tmp_assign_source_7;
tmp_called_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_mul );
if (unlikely( tmp_called_name_4 == NULL ))
{
tmp_called_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_mul );
}
if ( tmp_called_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_mul" );
exception_tb = NULL;
exception_lineno = 745;
goto frame_exception_exit_1;
}
tmp_args_element_name_4 = var_z1;
tmp_args_element_name_5 = var_z2;
frame_function->f_lineno = 745;
{
PyObject *call_args[] = { tmp_args_element_name_4, tmp_args_element_name_5 };
tmp_assign_source_8 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_4, call_args );
}
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 745;
goto frame_exception_exit_1;
}
assert( var_prd == NULL );
var_prd = tmp_assign_source_8;
tmp_called_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
if (unlikely( tmp_called_name_5 == NULL ))
{
tmp_called_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
}
if ( tmp_called_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_to_cseries" );
exception_tb = NULL;
exception_lineno = 746;
goto frame_exception_exit_1;
}
tmp_args_element_name_6 = var_prd;
frame_function->f_lineno = 746;
{
PyObject *call_args[] = { tmp_args_element_name_6 };
tmp_assign_source_9 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, call_args );
}
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 746;
goto frame_exception_exit_1;
}
assert( var_ret == NULL );
var_ret = tmp_assign_source_9;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 747;
goto frame_exception_exit_1;
}
tmp_called_name_6 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_trimseq );
if ( tmp_called_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 747;
goto frame_exception_exit_1;
}
tmp_args_element_name_7 = var_ret;
frame_function->f_lineno = 747;
{
PyObject *call_args[] = { tmp_args_element_name_7 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_6, call_args );
}
Py_DECREF( tmp_called_name_6 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 747;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c1,
par_c1
);
assert( res == 0 );
}
if ( par_c2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c2,
par_c2
);
assert( res == 0 );
}
if ( var_z1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z1,
var_z1
);
assert( res == 0 );
}
if ( var_z2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z2,
var_z2
);
assert( res == 0 );
}
if ( var_prd )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_prd,
var_prd
);
assert( res == 0 );
}
if ( var_ret )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ret,
var_ret
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_14_chebmul );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
CHECK_OBJECT( (PyObject *)par_c2 );
Py_DECREF( par_c2 );
par_c2 = NULL;
CHECK_OBJECT( (PyObject *)var_z1 );
Py_DECREF( var_z1 );
var_z1 = NULL;
CHECK_OBJECT( (PyObject *)var_z2 );
Py_DECREF( var_z2 );
var_z2 = NULL;
CHECK_OBJECT( (PyObject *)var_prd );
Py_DECREF( var_prd );
var_prd = NULL;
CHECK_OBJECT( (PyObject *)var_ret );
Py_DECREF( var_ret );
var_ret = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
CHECK_OBJECT( (PyObject *)par_c2 );
Py_DECREF( par_c2 );
par_c2 = NULL;
Py_XDECREF( var_z1 );
var_z1 = NULL;
Py_XDECREF( var_z2 );
var_z2 = NULL;
Py_XDECREF( var_prd );
var_prd = NULL;
Py_XDECREF( var_ret );
var_ret = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_14_chebmul );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_15_chebdiv( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c1 = python_pars[ 0 ];
PyObject *par_c2 = python_pars[ 1 ];
PyObject *var_lc1 = NULL;
PyObject *var_lc2 = NULL;
PyObject *var_z1 = NULL;
PyObject *var_z2 = NULL;
PyObject *var_quo = NULL;
PyObject *var_rem = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_tuple_unpack_2__source_iter = NULL;
PyObject *tmp_tuple_unpack_2__element_1 = NULL;
PyObject *tmp_tuple_unpack_2__element_2 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_element_name_8;
PyObject *tmp_args_element_name_9;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
PyObject *tmp_called_name_7;
PyObject *tmp_called_name_8;
int tmp_cmp_Eq_1;
int tmp_cmp_Eq_2;
int tmp_cmp_Lt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_left_3;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compare_right_3;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_iterator_name_2;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_list_element_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
Py_ssize_t tmp_slice_index_upper_1;
Py_ssize_t tmp_slice_index_upper_2;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
Py_ssize_t tmp_sliceslicedel_index_lower_2;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
PyObject *tmp_unpack_3;
PyObject *tmp_unpack_4;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_4b2248855722ce0a771e7e3c01e97737, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 797;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 797;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 2 );
tmp_list_element_1 = par_c1;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
tmp_list_element_1 = par_c2;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 1, tmp_list_element_1 );
frame_function->f_lineno = 797;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 797;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 797;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 797;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_3 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_3 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 797;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_3;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_4 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c1;
assert( old != NULL );
par_c1 = tmp_assign_source_4;
Py_INCREF( par_c1 );
Py_DECREF( old );
}
tmp_assign_source_5 = tmp_tuple_unpack_1__element_2;
{
PyObject *old = par_c2;
assert( old != NULL );
par_c2 = tmp_assign_source_5;
Py_INCREF( par_c2 );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_subscribed_name_1 = par_c2;
tmp_subscript_name_1 = const_int_neg_1;
tmp_compare_left_1 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 798;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_int_0;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 798;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
frame_function->f_lineno = 799;
tmp_raise_type_1 = CALL_FUNCTION_NO_ARGS( PyExc_ZeroDivisionError );
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 799;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
tmp_len_arg_1 = par_c1;
tmp_assign_source_6 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 801;
goto frame_exception_exit_1;
}
assert( var_lc1 == NULL );
var_lc1 = tmp_assign_source_6;
tmp_len_arg_2 = par_c2;
tmp_assign_source_7 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 802;
goto frame_exception_exit_1;
}
assert( var_lc2 == NULL );
var_lc2 = tmp_assign_source_7;
tmp_compare_left_2 = var_lc1;
tmp_compare_right_2 = var_lc2;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 803;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_return_value = PyTuple_New( 2 );
tmp_sliceslicedel_index_lower_1 = 0;
tmp_slice_index_upper_1 = 1;
tmp_slice_source_1 = par_c1;
tmp_left_name_1 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 804;
goto frame_exception_exit_1;
}
tmp_right_name_1 = const_int_0;
tmp_tuple_element_1 = BINARY_OPERATION_MUL( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_tuple_element_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 804;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
tmp_tuple_element_1 = par_c1;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
goto frame_return_exit_1;
goto branch_end_2;
branch_no_2:;
tmp_compare_left_3 = var_lc2;
tmp_compare_right_3 = const_int_pos_1;
tmp_cmp_Eq_2 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_3, tmp_compare_right_3 );
if ( tmp_cmp_Eq_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 805;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Eq_2 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_return_value = PyTuple_New( 2 );
tmp_left_name_2 = par_c1;
tmp_subscribed_name_2 = par_c2;
tmp_subscript_name_2 = const_int_neg_1;
tmp_right_name_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_right_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 806;
goto frame_exception_exit_1;
}
tmp_tuple_element_2 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_right_name_2 );
if ( tmp_tuple_element_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 806;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_2 );
tmp_sliceslicedel_index_lower_2 = 0;
tmp_slice_index_upper_2 = 1;
tmp_slice_source_2 = par_c1;
tmp_left_name_3 = LOOKUP_INDEX_SLICE( tmp_slice_source_2, tmp_sliceslicedel_index_lower_2, tmp_slice_index_upper_2 );
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 806;
goto frame_exception_exit_1;
}
tmp_right_name_3 = const_int_0;
tmp_tuple_element_2 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_3 );
Py_DECREF( tmp_left_name_3 );
if ( tmp_tuple_element_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_return_value );
exception_lineno = 806;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_2 );
goto frame_return_exit_1;
goto branch_end_3;
branch_no_3:;
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_cseries_to_zseries" );
exception_tb = NULL;
exception_lineno = 808;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = par_c1;
frame_function->f_lineno = 808;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_assign_source_8 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 808;
goto frame_exception_exit_1;
}
assert( var_z1 == NULL );
var_z1 = tmp_assign_source_8;
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_cseries_to_zseries" );
exception_tb = NULL;
exception_lineno = 809;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_c2;
frame_function->f_lineno = 809;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_assign_source_9 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 809;
goto frame_exception_exit_1;
}
assert( var_z2 == NULL );
var_z2 = tmp_assign_source_9;
// Tried code:
tmp_called_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_div );
if (unlikely( tmp_called_name_4 == NULL ))
{
tmp_called_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_div );
}
if ( tmp_called_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_div" );
exception_tb = NULL;
exception_lineno = 810;
goto try_except_handler_3;
}
tmp_args_element_name_4 = var_z1;
tmp_args_element_name_5 = var_z2;
frame_function->f_lineno = 810;
{
PyObject *call_args[] = { tmp_args_element_name_4, tmp_args_element_name_5 };
tmp_iter_arg_2 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_4, call_args );
}
if ( tmp_iter_arg_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 810;
goto try_except_handler_3;
}
tmp_assign_source_10 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 810;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_2__source_iter == NULL );
tmp_tuple_unpack_2__source_iter = tmp_assign_source_10;
tmp_unpack_3 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_11 = UNPACK_NEXT( tmp_unpack_3, 0 );
if ( tmp_assign_source_11 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 810;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_2__element_1 == NULL );
tmp_tuple_unpack_2__element_1 = tmp_assign_source_11;
tmp_unpack_4 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_12 = UNPACK_NEXT( tmp_unpack_4, 1 );
if ( tmp_assign_source_12 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 810;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_2__element_2 == NULL );
tmp_tuple_unpack_2__element_2 = tmp_assign_source_12;
tmp_iterator_name_2 = tmp_tuple_unpack_2__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_2 ); assert( HAS_ITERNEXT( tmp_iterator_name_2 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_2 )->tp_iternext)( tmp_iterator_name_2 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
tmp_assign_source_13 = tmp_tuple_unpack_2__element_1;
assert( var_quo == NULL );
Py_INCREF( tmp_assign_source_13 );
var_quo = tmp_assign_source_13;
tmp_assign_source_14 = tmp_tuple_unpack_2__element_2;
assert( var_rem == NULL );
Py_INCREF( tmp_assign_source_14 );
var_rem = tmp_assign_source_14;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__source_iter );
Py_DECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_1 );
Py_DECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_2 );
Py_DECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 811;
goto frame_exception_exit_1;
}
tmp_called_name_5 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_trimseq );
if ( tmp_called_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 811;
goto frame_exception_exit_1;
}
tmp_called_name_6 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
if (unlikely( tmp_called_name_6 == NULL ))
{
tmp_called_name_6 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
}
if ( tmp_called_name_6 == NULL )
{
Py_DECREF( tmp_called_name_5 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_to_cseries" );
exception_tb = NULL;
exception_lineno = 811;
goto frame_exception_exit_1;
}
tmp_args_element_name_7 = var_quo;
frame_function->f_lineno = 811;
{
PyObject *call_args[] = { tmp_args_element_name_7 };
tmp_args_element_name_6 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_6, call_args );
}
if ( tmp_args_element_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_5 );
exception_lineno = 811;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 811;
{
PyObject *call_args[] = { tmp_args_element_name_6 };
tmp_assign_source_15 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, call_args );
}
Py_DECREF( tmp_called_name_5 );
Py_DECREF( tmp_args_element_name_6 );
if ( tmp_assign_source_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 811;
goto frame_exception_exit_1;
}
{
PyObject *old = var_quo;
assert( old != NULL );
var_quo = tmp_assign_source_15;
Py_DECREF( old );
}
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 812;
goto frame_exception_exit_1;
}
tmp_called_name_7 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_trimseq );
if ( tmp_called_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 812;
goto frame_exception_exit_1;
}
tmp_called_name_8 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
if (unlikely( tmp_called_name_8 == NULL ))
{
tmp_called_name_8 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
}
if ( tmp_called_name_8 == NULL )
{
Py_DECREF( tmp_called_name_7 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_to_cseries" );
exception_tb = NULL;
exception_lineno = 812;
goto frame_exception_exit_1;
}
tmp_args_element_name_9 = var_rem;
frame_function->f_lineno = 812;
{
PyObject *call_args[] = { tmp_args_element_name_9 };
tmp_args_element_name_8 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_8, call_args );
}
if ( tmp_args_element_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_7 );
exception_lineno = 812;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 812;
{
PyObject *call_args[] = { tmp_args_element_name_8 };
tmp_assign_source_16 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_7, call_args );
}
Py_DECREF( tmp_called_name_7 );
Py_DECREF( tmp_args_element_name_8 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 812;
goto frame_exception_exit_1;
}
{
PyObject *old = var_rem;
assert( old != NULL );
var_rem = tmp_assign_source_16;
Py_DECREF( old );
}
tmp_return_value = PyTuple_New( 2 );
tmp_tuple_element_3 = var_quo;
Py_INCREF( tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_3 );
tmp_tuple_element_3 = var_rem;
Py_INCREF( tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_3 );
goto frame_return_exit_1;
branch_end_3:;
branch_end_2:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c1,
par_c1
);
assert( res == 0 );
}
if ( par_c2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c2,
par_c2
);
assert( res == 0 );
}
if ( var_lc1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_lc1,
var_lc1
);
assert( res == 0 );
}
if ( var_lc2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_lc2,
var_lc2
);
assert( res == 0 );
}
if ( var_z1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z1,
var_z1
);
assert( res == 0 );
}
if ( var_z2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z2,
var_z2
);
assert( res == 0 );
}
if ( var_quo )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_quo,
var_quo
);
assert( res == 0 );
}
if ( var_rem )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_rem,
var_rem
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_15_chebdiv );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
CHECK_OBJECT( (PyObject *)par_c2 );
Py_DECREF( par_c2 );
par_c2 = NULL;
CHECK_OBJECT( (PyObject *)var_lc1 );
Py_DECREF( var_lc1 );
var_lc1 = NULL;
CHECK_OBJECT( (PyObject *)var_lc2 );
Py_DECREF( var_lc2 );
var_lc2 = NULL;
Py_XDECREF( var_z1 );
var_z1 = NULL;
Py_XDECREF( var_z2 );
var_z2 = NULL;
Py_XDECREF( var_quo );
var_quo = NULL;
Py_XDECREF( var_rem );
var_rem = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c1 );
Py_DECREF( par_c1 );
par_c1 = NULL;
CHECK_OBJECT( (PyObject *)par_c2 );
Py_DECREF( par_c2 );
par_c2 = NULL;
Py_XDECREF( var_lc1 );
var_lc1 = NULL;
Py_XDECREF( var_lc2 );
var_lc2 = NULL;
Py_XDECREF( var_z1 );
var_z1 = NULL;
Py_XDECREF( var_z2 );
var_z2 = NULL;
Py_XDECREF( var_quo );
var_quo = NULL;
Py_XDECREF( var_rem );
var_rem = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_15_chebdiv );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_16_chebpow( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *par_pow = python_pars[ 1 ];
PyObject *par_maxpower = python_pars[ 2 ];
PyObject *var_power = NULL;
PyObject *var_zs = NULL;
PyObject *var_prd = NULL;
PyObject *var_i = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_for_loop_1__for_iterator = NULL;
PyObject *tmp_for_loop_1__iter_value = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
int tmp_and_left_truth_1;
PyObject *tmp_and_left_value_1;
PyObject *tmp_and_right_value_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
int tmp_cmp_Eq_1;
int tmp_cmp_Eq_2;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_left_3;
PyObject *tmp_compexpr_left_4;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
PyObject *tmp_compexpr_right_3;
PyObject *tmp_compexpr_right_4;
int tmp_cond_truth_1;
int tmp_cond_truth_2;
PyObject *tmp_cond_value_1;
PyObject *tmp_cond_value_2;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_list_element_1;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_make_exception_arg_2;
PyObject *tmp_next_source_1;
int tmp_or_left_truth_1;
PyObject *tmp_or_left_value_1;
PyObject *tmp_or_right_value_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_raise_type_2;
PyObject *tmp_range2_high_1;
PyObject *tmp_range2_low_1;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_unpack_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_496154e52512bea566bbf13b71f174f5, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 848;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 848;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 1 );
tmp_list_element_1 = par_c;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
frame_function->f_lineno = 848;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 848;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 848;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 848;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 1)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_3 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_3;
Py_INCREF( par_c );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
tmp_int_arg_1 = par_pow;
tmp_assign_source_4 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 849;
goto frame_exception_exit_1;
}
assert( var_power == NULL );
var_power = tmp_assign_source_4;
tmp_compexpr_left_1 = var_power;
tmp_compexpr_right_1 = par_pow;
tmp_or_left_value_1 = RICH_COMPARE_NE( tmp_compexpr_left_1, tmp_compexpr_right_1 );
if ( tmp_or_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 850;
goto frame_exception_exit_1;
}
tmp_or_left_truth_1 = CHECK_IF_TRUE( tmp_or_left_value_1 );
if ( tmp_or_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_or_left_value_1 );
exception_lineno = 850;
goto frame_exception_exit_1;
}
if ( tmp_or_left_truth_1 == 1 )
{
goto or_left_1;
}
else
{
goto or_right_1;
}
or_right_1:;
Py_DECREF( tmp_or_left_value_1 );
tmp_compexpr_left_2 = var_power;
tmp_compexpr_right_2 = const_int_0;
tmp_or_right_value_1 = RICH_COMPARE_LT( tmp_compexpr_left_2, tmp_compexpr_right_2 );
if ( tmp_or_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 850;
goto frame_exception_exit_1;
}
tmp_cond_value_1 = tmp_or_right_value_1;
goto or_end_1;
or_left_1:;
tmp_cond_value_1 = tmp_or_left_value_1;
or_end_1:;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_1 );
exception_lineno = 850;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_5075ddfb8c5b93b4cdb1b7871af68165;
frame_function->f_lineno = 851;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 851;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
goto branch_end_1;
branch_no_1:;
tmp_compexpr_left_3 = par_maxpower;
tmp_compexpr_right_3 = Py_None;
tmp_and_left_value_1 = BOOL_FROM( tmp_compexpr_left_3 != tmp_compexpr_right_3 );
tmp_and_left_truth_1 = CHECK_IF_TRUE( tmp_and_left_value_1 );
assert( !(tmp_and_left_truth_1 == -1) );
if ( tmp_and_left_truth_1 == 1 )
{
goto and_right_1;
}
else
{
goto and_left_1;
}
and_right_1:;
tmp_compexpr_left_4 = var_power;
tmp_compexpr_right_4 = par_maxpower;
tmp_and_right_value_1 = RICH_COMPARE_GT( tmp_compexpr_left_4, tmp_compexpr_right_4 );
if ( tmp_and_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 852;
goto frame_exception_exit_1;
}
tmp_cond_value_2 = tmp_and_right_value_1;
goto and_end_1;
and_left_1:;
Py_INCREF( tmp_and_left_value_1 );
tmp_cond_value_2 = tmp_and_left_value_1;
and_end_1:;
tmp_cond_truth_2 = CHECK_IF_TRUE( tmp_cond_value_2 );
if ( tmp_cond_truth_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_2 );
exception_lineno = 852;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_2 );
if ( tmp_cond_truth_2 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_make_exception_arg_2 = const_str_digest_3a21fa4bd62cdcaaa70f24e241b85885;
frame_function->f_lineno = 853;
{
PyObject *call_args[] = { tmp_make_exception_arg_2 };
tmp_raise_type_2 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_2 != NULL );
exception_type = tmp_raise_type_2;
exception_lineno = 853;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
goto branch_end_2;
branch_no_2:;
tmp_compare_left_1 = var_power;
tmp_compare_right_1 = const_int_0;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 854;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 855;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_array );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 855;
goto frame_exception_exit_1;
}
tmp_args_name_1 = DEEP_COPY( const_tuple_list_int_pos_1_list_tuple );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_3 = par_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 855;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 855;
tmp_return_value = CALL_FUNCTION( tmp_called_name_2, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 855;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
goto branch_end_3;
branch_no_3:;
tmp_compare_left_2 = var_power;
tmp_compare_right_2 = const_int_pos_1;
tmp_cmp_Eq_2 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Eq_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 856;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Eq_2 == 1 )
{
goto branch_yes_4;
}
else
{
goto branch_no_4;
}
branch_yes_4:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto frame_return_exit_1;
goto branch_end_4;
branch_no_4:;
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_cseries_to_zseries" );
exception_tb = NULL;
exception_lineno = 861;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = par_c;
frame_function->f_lineno = 861;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_assign_source_5 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 861;
goto frame_exception_exit_1;
}
assert( var_zs == NULL );
var_zs = tmp_assign_source_5;
tmp_assign_source_6 = var_zs;
assert( var_prd == NULL );
Py_INCREF( tmp_assign_source_6 );
var_prd = tmp_assign_source_6;
tmp_range2_low_1 = const_int_pos_2;
tmp_left_name_1 = var_power;
tmp_right_name_1 = const_int_pos_1;
tmp_range2_high_1 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
if ( tmp_range2_high_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 863;
goto frame_exception_exit_1;
}
tmp_iter_arg_2 = BUILTIN_RANGE2( tmp_range2_low_1, tmp_range2_high_1 );
Py_DECREF( tmp_range2_high_1 );
if ( tmp_iter_arg_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 863;
goto frame_exception_exit_1;
}
tmp_assign_source_7 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 863;
goto frame_exception_exit_1;
}
assert( tmp_for_loop_1__for_iterator == NULL );
tmp_for_loop_1__for_iterator = tmp_assign_source_7;
// Tried code:
loop_start_1:;
tmp_next_source_1 = tmp_for_loop_1__for_iterator;
tmp_assign_source_8 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_8 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 863;
goto try_except_handler_3;
}
}
{
PyObject *old = tmp_for_loop_1__iter_value;
tmp_for_loop_1__iter_value = tmp_assign_source_8;
Py_XDECREF( old );
}
tmp_assign_source_9 = tmp_for_loop_1__iter_value;
{
PyObject *old = var_i;
var_i = tmp_assign_source_9;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 864;
goto try_except_handler_3;
}
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_convolve );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 864;
goto try_except_handler_3;
}
tmp_args_element_name_3 = var_prd;
if ( tmp_args_element_name_3 == NULL )
{
Py_DECREF( tmp_called_name_4 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "prd" );
exception_tb = NULL;
exception_lineno = 864;
goto try_except_handler_3;
}
tmp_args_element_name_4 = var_zs;
frame_function->f_lineno = 864;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_assign_source_10 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_4, call_args );
}
Py_DECREF( tmp_called_name_4 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 864;
goto try_except_handler_3;
}
{
PyObject *old = var_prd;
var_prd = tmp_assign_source_10;
Py_XDECREF( old );
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 863;
goto try_except_handler_3;
}
goto loop_start_1;
loop_end_1:;
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
tmp_called_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
if (unlikely( tmp_called_name_5 == NULL ))
{
tmp_called_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries );
}
if ( tmp_called_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "_zseries_to_cseries" );
exception_tb = NULL;
exception_lineno = 865;
goto frame_exception_exit_1;
}
tmp_args_element_name_5 = var_prd;
if ( tmp_args_element_name_5 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "prd" );
exception_tb = NULL;
exception_lineno = 865;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 865;
{
PyObject *call_args[] = { tmp_args_element_name_5 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, call_args );
}
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 865;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
branch_end_4:;
branch_end_3:;
branch_end_2:;
branch_end_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( par_pow )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_pow,
par_pow
);
assert( res == 0 );
}
if ( par_maxpower )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_maxpower,
par_maxpower
);
assert( res == 0 );
}
if ( var_power )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_power,
var_power
);
assert( res == 0 );
}
if ( var_zs )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_zs,
var_zs
);
assert( res == 0 );
}
if ( var_prd )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_prd,
var_prd
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_16_chebpow );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_pow );
Py_DECREF( par_pow );
par_pow = NULL;
CHECK_OBJECT( (PyObject *)par_maxpower );
Py_DECREF( par_maxpower );
par_maxpower = NULL;
CHECK_OBJECT( (PyObject *)var_power );
Py_DECREF( var_power );
var_power = NULL;
Py_XDECREF( var_zs );
var_zs = NULL;
Py_XDECREF( var_prd );
var_prd = NULL;
Py_XDECREF( var_i );
var_i = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_pow );
Py_DECREF( par_pow );
par_pow = NULL;
CHECK_OBJECT( (PyObject *)par_maxpower );
Py_DECREF( par_maxpower );
par_maxpower = NULL;
Py_XDECREF( var_power );
var_power = NULL;
Py_XDECREF( var_zs );
var_zs = NULL;
Py_XDECREF( var_prd );
var_prd = NULL;
Py_XDECREF( var_i );
var_i = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_16_chebpow );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_17_chebder( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *par_m = python_pars[ 1 ];
PyObject *par_scl = python_pars[ 2 ];
PyObject *par_axis = python_pars[ 3 ];
PyObject *var_t = NULL;
PyObject *var_cnt = NULL;
PyObject *var_iaxis = NULL;
PyObject *var_n = NULL;
PyObject *var_i = NULL;
PyObject *var_der = NULL;
PyObject *var_j = NULL;
PyObject *tmp_list_contraction_1__$0 = NULL;
PyObject *tmp_list_contraction_1__contraction_result = NULL;
PyObject *tmp_list_contraction_1__iter_value_0 = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_comparison_chain_1__operand_2 = NULL;
PyObject *tmp_comparison_chain_1__comparison_result = NULL;
PyObject *tmp_for_loop_1__for_iterator = NULL;
PyObject *tmp_for_loop_1__iter_value = NULL;
PyObject *tmp_for_loop_2__for_iterator = NULL;
PyObject *tmp_for_loop_2__iter_value = NULL;
PyObject *tmp_inplace_assign_subscr_1__target = NULL;
PyObject *tmp_inplace_assign_subscr_1__subscript = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *exception_keeper_type_5;
PyObject *exception_keeper_value_5;
PyTracebackObject *exception_keeper_tb_5;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5;
PyObject *exception_keeper_type_6;
PyObject *exception_keeper_value_6;
PyTracebackObject *exception_keeper_tb_6;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_6;
PyObject *exception_keeper_type_7;
PyObject *exception_keeper_value_7;
PyTracebackObject *exception_keeper_tb_7;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_7;
PyObject *tmp_append_list_1;
PyObject *tmp_append_value_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_name_1;
PyObject *tmp_args_name_2;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscribed_2;
PyObject *tmp_ass_subscribed_3;
PyObject *tmp_ass_subscribed_4;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subscript_2;
PyObject *tmp_ass_subscript_3;
PyObject *tmp_ass_subscript_4;
int tmp_ass_subscript_res_1;
int tmp_ass_subscript_res_2;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_ass_subvalue_2;
PyObject *tmp_ass_subvalue_3;
PyObject *tmp_ass_subvalue_4;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_assign_source_22;
PyObject *tmp_assign_source_23;
PyObject *tmp_assign_source_24;
PyObject *tmp_assign_source_25;
PyObject *tmp_assign_source_26;
PyObject *tmp_assign_source_27;
PyObject *tmp_assign_source_28;
PyObject *tmp_assign_source_29;
PyObject *tmp_assign_source_30;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
int tmp_cmp_Eq_1;
int tmp_cmp_Gt_1;
int tmp_cmp_GtE_1;
int tmp_cmp_In_1;
int tmp_cmp_Lt_1;
int tmp_cmp_Lt_2;
int tmp_cmp_NotEq_1;
int tmp_cmp_NotEq_2;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_left_3;
PyObject *tmp_compare_left_4;
PyObject *tmp_compare_left_5;
PyObject *tmp_compare_left_6;
PyObject *tmp_compare_left_7;
PyObject *tmp_compare_left_8;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compare_right_3;
PyObject *tmp_compare_right_4;
PyObject *tmp_compare_right_5;
PyObject *tmp_compare_right_6;
PyObject *tmp_compare_right_7;
PyObject *tmp_compare_right_8;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
int tmp_cond_truth_1;
int tmp_cond_truth_2;
PyObject *tmp_cond_value_1;
PyObject *tmp_cond_value_2;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iter_arg_3;
PyObject *tmp_iter_arg_4;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_kw_name_2;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_left_name_9;
PyObject *tmp_left_name_10;
PyObject *tmp_left_name_11;
PyObject *tmp_left_name_12;
PyObject *tmp_left_name_13;
PyObject *tmp_left_name_14;
PyObject *tmp_left_name_15;
PyObject *tmp_len_arg_1;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_make_exception_arg_2;
PyObject *tmp_make_exception_arg_3;
PyObject *tmp_make_exception_arg_4;
PyObject *tmp_next_source_1;
PyObject *tmp_next_source_2;
PyObject *tmp_next_source_3;
PyObject *tmp_operand_name_1;
PyObject *tmp_outline_return_value_1;
PyObject *tmp_outline_return_value_2;
PyObject *tmp_raise_type_1;
PyObject *tmp_raise_type_2;
PyObject *tmp_raise_type_3;
PyObject *tmp_raise_type_4;
PyObject *tmp_range3_high_1;
PyObject *tmp_range3_low_1;
PyObject *tmp_range3_step_1;
PyObject *tmp_range_arg_1;
int tmp_res;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_right_name_9;
PyObject *tmp_right_name_10;
PyObject *tmp_right_name_11;
PyObject *tmp_right_name_12;
PyObject *tmp_right_name_13;
PyObject *tmp_right_name_14;
PyObject *tmp_right_name_15;
Py_ssize_t tmp_slice_index_upper_1;
Py_ssize_t tmp_slice_index_upper_2;
PyObject *tmp_slice_source_1;
PyObject *tmp_slice_source_2;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
Py_ssize_t tmp_sliceslicedel_index_lower_2;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_source_name_6;
PyObject *tmp_source_name_7;
PyObject *tmp_source_name_8;
PyObject *tmp_source_name_9;
PyObject *tmp_source_name_10;
PyObject *tmp_source_name_11;
PyObject *tmp_source_name_12;
PyObject *tmp_source_name_13;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscribed_name_4;
PyObject *tmp_subscribed_name_5;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_subscript_name_4;
PyObject *tmp_subscript_name_5;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
PyObject *tmp_tuple_element_4;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
tmp_outline_return_value_1 = NULL;
tmp_outline_return_value_2 = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_14c198ee31bc49db1b48768c7f5fecfa, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 928;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 928;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = par_c;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_8c0923655000b74dc494a1a4f40853b5 );
frame_function->f_lineno = 928;
tmp_assign_source_1 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 928;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_1;
Py_DECREF( old );
}
tmp_source_name_3 = par_c;
tmp_source_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_source_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 929;
goto frame_exception_exit_1;
}
tmp_compare_left_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_char );
Py_DECREF( tmp_source_name_2 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 929;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_str_digest_6e06792ac9d1e948515e79b21ef14ea6;
tmp_cmp_In_1 = PySequence_Contains( tmp_compare_right_1, tmp_compare_left_1 );
assert( !(tmp_cmp_In_1 == -1) );
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_In_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_source_name_4 = par_c;
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_astype );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 930;
goto frame_exception_exit_1;
}
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_5 == NULL )
{
Py_DECREF( tmp_called_name_2 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 930;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_double );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
exception_lineno = 930;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 930;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 930;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_2;
Py_DECREF( old );
}
branch_no_1:;
// Tried code:
tmp_iter_arg_2 = PyTuple_New( 2 );
tmp_tuple_element_2 = par_m;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_iter_arg_2, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_axis;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_iter_arg_2, 1, tmp_tuple_element_2 );
tmp_assign_source_4 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
assert( tmp_assign_source_4 != NULL );
assert( tmp_list_contraction_1__$0 == NULL );
tmp_list_contraction_1__$0 = tmp_assign_source_4;
tmp_assign_source_5 = PyList_New( 0 );
assert( tmp_list_contraction_1__contraction_result == NULL );
tmp_list_contraction_1__contraction_result = tmp_assign_source_5;
// Tried code:
loop_start_1:;
tmp_next_source_1 = tmp_list_contraction_1__$0;
tmp_assign_source_6 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_6 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 931;
goto try_except_handler_3;
}
}
{
PyObject *old = tmp_list_contraction_1__iter_value_0;
tmp_list_contraction_1__iter_value_0 = tmp_assign_source_6;
Py_XDECREF( old );
}
tmp_assign_source_7 = tmp_list_contraction_1__iter_value_0;
{
PyObject *old = var_t;
var_t = tmp_assign_source_7;
Py_INCREF( var_t );
Py_XDECREF( old );
}
tmp_append_list_1 = tmp_list_contraction_1__contraction_result;
tmp_int_arg_1 = var_t;
tmp_append_value_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_append_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 931;
goto try_except_handler_3;
}
assert( PyList_Check( tmp_append_list_1 ) );
tmp_res = PyList_Append( tmp_append_list_1, tmp_append_value_1 );
Py_DECREF( tmp_append_value_1 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 931;
goto try_except_handler_3;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 931;
goto try_except_handler_3;
}
goto loop_start_1;
loop_end_1:;
tmp_outline_return_value_1 = tmp_list_contraction_1__contraction_result;
Py_INCREF( tmp_outline_return_value_1 );
goto try_return_handler_3;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_17_chebder );
return NULL;
// Return handler code:
try_return_handler_3:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__$0 );
Py_DECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__contraction_result );
Py_DECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
goto outline_result_1;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__$0 );
Py_DECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__contraction_result );
Py_DECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto try_except_handler_2;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_17_chebder );
return NULL;
outline_result_1:;
tmp_iter_arg_1 = tmp_outline_return_value_1;
tmp_assign_source_3 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 931;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_3;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_8 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_8 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 931;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_8;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_9 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_9 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 931;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_9;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_10 = tmp_tuple_unpack_1__element_1;
assert( var_cnt == NULL );
Py_INCREF( tmp_assign_source_10 );
var_cnt = tmp_assign_source_10;
tmp_assign_source_11 = tmp_tuple_unpack_1__element_2;
assert( var_iaxis == NULL );
Py_INCREF( tmp_assign_source_11 );
var_iaxis = tmp_assign_source_11;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_compare_left_2 = var_cnt;
tmp_compare_right_2 = par_m;
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 933;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_make_exception_arg_1 = const_str_digest_38178dad4ac962606854d73542c6407a;
frame_function->f_lineno = 934;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 934;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_2:;
tmp_compare_left_3 = var_cnt;
tmp_compare_right_3 = const_int_0;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_3, tmp_compare_right_3 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 935;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_make_exception_arg_2 = const_str_digest_dbb9a16d39ca754da17294f7f64a4b4b;
frame_function->f_lineno = 936;
{
PyObject *call_args[] = { tmp_make_exception_arg_2 };
tmp_raise_type_2 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_2 != NULL );
exception_type = tmp_raise_type_2;
exception_lineno = 936;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_3:;
tmp_compare_left_4 = var_iaxis;
tmp_compare_right_4 = par_axis;
tmp_cmp_NotEq_2 = RICH_COMPARE_BOOL_NE( tmp_compare_left_4, tmp_compare_right_4 );
if ( tmp_cmp_NotEq_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 937;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_2 == 1 )
{
goto branch_yes_4;
}
else
{
goto branch_no_4;
}
branch_yes_4:;
tmp_make_exception_arg_3 = const_str_digest_c58373a0fb3d7245efa1b5aed182e608;
frame_function->f_lineno = 938;
{
PyObject *call_args[] = { tmp_make_exception_arg_3 };
tmp_raise_type_3 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_3 != NULL );
exception_type = tmp_raise_type_3;
exception_lineno = 938;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_4:;
tmp_assign_source_12 = var_iaxis;
assert( tmp_comparison_chain_1__operand_2 == NULL );
Py_INCREF( tmp_assign_source_12 );
tmp_comparison_chain_1__operand_2 = tmp_assign_source_12;
// Tried code:
tmp_source_name_6 = par_c;
tmp_operand_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_6, const_str_plain_ndim );
if ( tmp_operand_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 939;
goto try_except_handler_4;
}
tmp_compexpr_left_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
Py_DECREF( tmp_operand_name_1 );
if ( tmp_compexpr_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 939;
goto try_except_handler_4;
}
tmp_compexpr_right_1 = tmp_comparison_chain_1__operand_2;
tmp_assign_source_13 = RICH_COMPARE_LE( tmp_compexpr_left_1, tmp_compexpr_right_1 );
Py_DECREF( tmp_compexpr_left_1 );
if ( tmp_assign_source_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 939;
goto try_except_handler_4;
}
assert( tmp_comparison_chain_1__comparison_result == NULL );
tmp_comparison_chain_1__comparison_result = tmp_assign_source_13;
tmp_cond_value_2 = tmp_comparison_chain_1__comparison_result;
tmp_cond_truth_2 = CHECK_IF_TRUE( tmp_cond_value_2 );
if ( tmp_cond_truth_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 939;
goto try_except_handler_4;
}
if ( tmp_cond_truth_2 == 1 )
{
goto branch_no_6;
}
else
{
goto branch_yes_6;
}
branch_yes_6:;
tmp_outline_return_value_2 = tmp_comparison_chain_1__comparison_result;
Py_INCREF( tmp_outline_return_value_2 );
goto try_return_handler_4;
branch_no_6:;
tmp_compexpr_left_2 = tmp_comparison_chain_1__operand_2;
tmp_source_name_7 = par_c;
tmp_compexpr_right_2 = LOOKUP_ATTRIBUTE( tmp_source_name_7, const_str_plain_ndim );
if ( tmp_compexpr_right_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 939;
goto try_except_handler_4;
}
tmp_outline_return_value_2 = RICH_COMPARE_LT( tmp_compexpr_left_2, tmp_compexpr_right_2 );
Py_DECREF( tmp_compexpr_right_2 );
if ( tmp_outline_return_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 939;
goto try_except_handler_4;
}
goto try_return_handler_4;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_17_chebder );
return NULL;
// Return handler code:
try_return_handler_4:;
CHECK_OBJECT( (PyObject *)tmp_comparison_chain_1__operand_2 );
Py_DECREF( tmp_comparison_chain_1__operand_2 );
tmp_comparison_chain_1__operand_2 = NULL;
CHECK_OBJECT( (PyObject *)tmp_comparison_chain_1__comparison_result );
Py_DECREF( tmp_comparison_chain_1__comparison_result );
tmp_comparison_chain_1__comparison_result = NULL;
goto outline_result_2;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_comparison_chain_1__operand_2 );
Py_DECREF( tmp_comparison_chain_1__operand_2 );
tmp_comparison_chain_1__operand_2 = NULL;
Py_XDECREF( tmp_comparison_chain_1__comparison_result );
tmp_comparison_chain_1__comparison_result = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_17_chebder );
return NULL;
outline_result_2:;
tmp_cond_value_1 = tmp_outline_return_value_2;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_1 );
exception_lineno = 939;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == 1 )
{
goto branch_no_5;
}
else
{
goto branch_yes_5;
}
branch_yes_5:;
tmp_make_exception_arg_4 = const_str_digest_644ceea54723b4814b2af8460d62b8a6;
frame_function->f_lineno = 940;
{
PyObject *call_args[] = { tmp_make_exception_arg_4 };
tmp_raise_type_4 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_4 != NULL );
exception_type = tmp_raise_type_4;
exception_lineno = 940;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_5:;
tmp_compare_left_5 = var_iaxis;
tmp_compare_right_5 = const_int_0;
tmp_cmp_Lt_2 = RICH_COMPARE_BOOL_LT( tmp_compare_left_5, tmp_compare_right_5 );
if ( tmp_cmp_Lt_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 941;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_2 == 1 )
{
goto branch_yes_7;
}
else
{
goto branch_no_7;
}
branch_yes_7:;
tmp_left_name_1 = var_iaxis;
tmp_source_name_8 = par_c;
tmp_right_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_8, const_str_plain_ndim );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 942;
goto frame_exception_exit_1;
}
tmp_result = BINARY_OPERATION_ADD_INPLACE( &tmp_left_name_1, tmp_right_name_1 );
tmp_assign_source_14 = tmp_left_name_1;
Py_DECREF( tmp_right_name_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 942;
goto frame_exception_exit_1;
}
var_iaxis = tmp_assign_source_14;
branch_no_7:;
tmp_compare_left_6 = var_cnt;
tmp_compare_right_6 = const_int_0;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_6, tmp_compare_right_6 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 944;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_8;
}
else
{
goto branch_no_8;
}
branch_yes_8:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto frame_return_exit_1;
branch_no_8:;
tmp_source_name_9 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_9 == NULL ))
{
tmp_source_name_9 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_9 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 947;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_9, const_str_plain_rollaxis );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 947;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = par_c;
tmp_args_element_name_3 = var_iaxis;
frame_function->f_lineno = 947;
{
PyObject *call_args[] = { tmp_args_element_name_2, tmp_args_element_name_3 };
tmp_assign_source_15 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
if ( tmp_assign_source_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 947;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_15;
Py_DECREF( old );
}
tmp_len_arg_1 = par_c;
tmp_assign_source_16 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 948;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_16;
tmp_compare_left_7 = var_cnt;
tmp_compare_right_7 = var_n;
tmp_cmp_GtE_1 = RICH_COMPARE_BOOL_GE( tmp_compare_left_7, tmp_compare_right_7 );
if ( tmp_cmp_GtE_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 949;
goto frame_exception_exit_1;
}
if ( tmp_cmp_GtE_1 == 1 )
{
goto branch_yes_9;
}
else
{
goto branch_no_9;
}
branch_yes_9:;
tmp_sliceslicedel_index_lower_1 = 0;
tmp_slice_index_upper_1 = 1;
tmp_slice_source_1 = par_c;
tmp_left_name_2 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 950;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_int_0;
tmp_assign_source_17 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_assign_source_17 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 950;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_17;
Py_DECREF( old );
}
goto branch_end_9;
branch_no_9:;
tmp_range_arg_1 = var_cnt;
tmp_iter_arg_3 = BUILTIN_RANGE( tmp_range_arg_1 );
if ( tmp_iter_arg_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 952;
goto frame_exception_exit_1;
}
tmp_assign_source_18 = MAKE_ITERATOR( tmp_iter_arg_3 );
Py_DECREF( tmp_iter_arg_3 );
if ( tmp_assign_source_18 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 952;
goto frame_exception_exit_1;
}
assert( tmp_for_loop_1__for_iterator == NULL );
tmp_for_loop_1__for_iterator = tmp_assign_source_18;
// Tried code:
loop_start_2:;
tmp_next_source_2 = tmp_for_loop_1__for_iterator;
tmp_assign_source_19 = ITERATOR_NEXT( tmp_next_source_2 );
if ( tmp_assign_source_19 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_2;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 952;
goto try_except_handler_5;
}
}
{
PyObject *old = tmp_for_loop_1__iter_value;
tmp_for_loop_1__iter_value = tmp_assign_source_19;
Py_XDECREF( old );
}
tmp_assign_source_20 = tmp_for_loop_1__iter_value;
{
PyObject *old = var_i;
var_i = tmp_assign_source_20;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_left_name_3 = var_n;
if ( tmp_left_name_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "n" );
exception_tb = NULL;
exception_lineno = 953;
goto try_except_handler_5;
}
tmp_right_name_3 = const_int_pos_1;
tmp_assign_source_21 = BINARY_OPERATION_SUB( tmp_left_name_3, tmp_right_name_3 );
if ( tmp_assign_source_21 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 953;
goto try_except_handler_5;
}
{
PyObject *old = var_n;
var_n = tmp_assign_source_21;
Py_XDECREF( old );
}
tmp_left_name_4 = par_c;
if ( tmp_left_name_4 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 954;
goto try_except_handler_5;
}
tmp_right_name_4 = par_scl;
tmp_result = BINARY_OPERATION_MUL_INPLACE( &tmp_left_name_4, tmp_right_name_4 );
tmp_assign_source_22 = tmp_left_name_4;
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 954;
goto try_except_handler_5;
}
par_c = tmp_assign_source_22;
tmp_source_name_10 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_10 == NULL ))
{
tmp_source_name_10 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_10 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 955;
goto try_except_handler_5;
}
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_10, const_str_plain_empty );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 955;
goto try_except_handler_5;
}
tmp_args_name_2 = PyTuple_New( 1 );
tmp_left_name_5 = PyTuple_New( 1 );
tmp_tuple_element_4 = var_n;
Py_INCREF( tmp_tuple_element_4 );
PyTuple_SET_ITEM( tmp_left_name_5, 0, tmp_tuple_element_4 );
tmp_sliceslicedel_index_lower_2 = 1;
tmp_slice_index_upper_2 = PY_SSIZE_T_MAX;
tmp_source_name_11 = par_c;
tmp_slice_source_2 = LOOKUP_ATTRIBUTE( tmp_source_name_11, const_str_plain_shape );
if ( tmp_slice_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_left_name_5 );
exception_lineno = 955;
goto try_except_handler_5;
}
tmp_right_name_5 = LOOKUP_INDEX_SLICE( tmp_slice_source_2, tmp_sliceslicedel_index_lower_2, tmp_slice_index_upper_2 );
Py_DECREF( tmp_slice_source_2 );
if ( tmp_right_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_left_name_5 );
exception_lineno = 955;
goto try_except_handler_5;
}
tmp_tuple_element_3 = BINARY_OPERATION_ADD( tmp_left_name_5, tmp_right_name_5 );
Py_DECREF( tmp_left_name_5 );
Py_DECREF( tmp_right_name_5 );
if ( tmp_tuple_element_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_args_name_2 );
exception_lineno = 955;
goto try_except_handler_5;
}
PyTuple_SET_ITEM( tmp_args_name_2, 0, tmp_tuple_element_3 );
tmp_kw_name_2 = _PyDict_NewPresized( 1 );
tmp_source_name_12 = par_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_12, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
exception_lineno = 955;
goto try_except_handler_5;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_2, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 955;
tmp_assign_source_23 = CALL_FUNCTION( tmp_called_name_4, tmp_args_name_2, tmp_kw_name_2 );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
if ( tmp_assign_source_23 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 955;
goto try_except_handler_5;
}
{
PyObject *old = var_der;
var_der = tmp_assign_source_23;
Py_XDECREF( old );
}
tmp_range3_low_1 = var_n;
tmp_range3_high_1 = const_int_pos_2;
tmp_range3_step_1 = const_int_neg_1;
tmp_iter_arg_4 = BUILTIN_RANGE3( tmp_range3_low_1, tmp_range3_high_1, tmp_range3_step_1 );
if ( tmp_iter_arg_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 956;
goto try_except_handler_5;
}
tmp_assign_source_24 = MAKE_ITERATOR( tmp_iter_arg_4 );
Py_DECREF( tmp_iter_arg_4 );
if ( tmp_assign_source_24 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 956;
goto try_except_handler_5;
}
{
PyObject *old = tmp_for_loop_2__for_iterator;
tmp_for_loop_2__for_iterator = tmp_assign_source_24;
Py_XDECREF( old );
}
// Tried code:
loop_start_3:;
tmp_next_source_3 = tmp_for_loop_2__for_iterator;
tmp_assign_source_25 = ITERATOR_NEXT( tmp_next_source_3 );
if ( tmp_assign_source_25 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_3;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 956;
goto try_except_handler_6;
}
}
{
PyObject *old = tmp_for_loop_2__iter_value;
tmp_for_loop_2__iter_value = tmp_assign_source_25;
Py_XDECREF( old );
}
tmp_assign_source_26 = tmp_for_loop_2__iter_value;
{
PyObject *old = var_j;
var_j = tmp_assign_source_26;
Py_INCREF( var_j );
Py_XDECREF( old );
}
tmp_left_name_7 = const_int_pos_2;
tmp_right_name_6 = var_j;
tmp_left_name_6 = BINARY_OPERATION_MUL( tmp_left_name_7, tmp_right_name_6 );
if ( tmp_left_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 957;
goto try_except_handler_6;
}
tmp_subscribed_name_1 = par_c;
tmp_subscript_name_1 = var_j;
tmp_right_name_7 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_right_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_6 );
exception_lineno = 957;
goto try_except_handler_6;
}
tmp_ass_subvalue_1 = BINARY_OPERATION_MUL( tmp_left_name_6, tmp_right_name_7 );
Py_DECREF( tmp_left_name_6 );
Py_DECREF( tmp_right_name_7 );
if ( tmp_ass_subvalue_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 957;
goto try_except_handler_6;
}
tmp_ass_subscribed_1 = var_der;
tmp_left_name_8 = var_j;
tmp_right_name_8 = const_int_pos_1;
tmp_ass_subscript_1 = BINARY_OPERATION_SUB( tmp_left_name_8, tmp_right_name_8 );
if ( tmp_ass_subscript_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_ass_subvalue_1 );
exception_lineno = 957;
goto try_except_handler_6;
}
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subscript_1 );
Py_DECREF( tmp_ass_subvalue_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 957;
goto try_except_handler_6;
}
tmp_assign_source_27 = par_c;
{
PyObject *old = tmp_inplace_assign_subscr_1__target;
tmp_inplace_assign_subscr_1__target = tmp_assign_source_27;
Py_INCREF( tmp_inplace_assign_subscr_1__target );
Py_XDECREF( old );
}
// Tried code:
tmp_left_name_9 = var_j;
tmp_right_name_9 = const_int_pos_2;
tmp_assign_source_28 = BINARY_OPERATION_SUB( tmp_left_name_9, tmp_right_name_9 );
if ( tmp_assign_source_28 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 958;
goto try_except_handler_7;
}
{
PyObject *old = tmp_inplace_assign_subscr_1__subscript;
tmp_inplace_assign_subscr_1__subscript = tmp_assign_source_28;
Py_XDECREF( old );
}
tmp_subscribed_name_2 = tmp_inplace_assign_subscr_1__target;
tmp_subscript_name_2 = tmp_inplace_assign_subscr_1__subscript;
tmp_left_name_10 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_left_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 958;
goto try_except_handler_7;
}
tmp_left_name_12 = var_j;
tmp_subscribed_name_3 = par_c;
tmp_subscript_name_3 = var_j;
tmp_right_name_11 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
if ( tmp_right_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_10 );
exception_lineno = 958;
goto try_except_handler_7;
}
tmp_left_name_11 = BINARY_OPERATION_MUL( tmp_left_name_12, tmp_right_name_11 );
Py_DECREF( tmp_right_name_11 );
if ( tmp_left_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_10 );
exception_lineno = 958;
goto try_except_handler_7;
}
tmp_left_name_13 = var_j;
tmp_right_name_13 = const_int_pos_2;
tmp_right_name_12 = BINARY_OPERATION_SUB( tmp_left_name_13, tmp_right_name_13 );
if ( tmp_right_name_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_10 );
Py_DECREF( tmp_left_name_11 );
exception_lineno = 958;
goto try_except_handler_7;
}
tmp_right_name_10 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_11, tmp_right_name_12 );
Py_DECREF( tmp_left_name_11 );
Py_DECREF( tmp_right_name_12 );
if ( tmp_right_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_10 );
exception_lineno = 958;
goto try_except_handler_7;
}
tmp_ass_subvalue_2 = BINARY_OPERATION( PyNumber_InPlaceAdd, tmp_left_name_10, tmp_right_name_10 );
Py_DECREF( tmp_left_name_10 );
Py_DECREF( tmp_right_name_10 );
if ( tmp_ass_subvalue_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 958;
goto try_except_handler_7;
}
tmp_ass_subscribed_2 = tmp_inplace_assign_subscr_1__target;
tmp_ass_subscript_2 = tmp_inplace_assign_subscr_1__subscript;
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_2, tmp_ass_subscript_2, tmp_ass_subvalue_2 );
Py_DECREF( tmp_ass_subvalue_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 958;
goto try_except_handler_7;
}
goto try_end_2;
// Exception handler code:
try_except_handler_7:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__target );
Py_DECREF( tmp_inplace_assign_subscr_1__target );
tmp_inplace_assign_subscr_1__target = NULL;
Py_XDECREF( tmp_inplace_assign_subscr_1__subscript );
tmp_inplace_assign_subscr_1__subscript = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto try_except_handler_6;
// End of try:
try_end_2:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__target );
Py_DECREF( tmp_inplace_assign_subscr_1__target );
tmp_inplace_assign_subscr_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__subscript );
Py_DECREF( tmp_inplace_assign_subscr_1__subscript );
tmp_inplace_assign_subscr_1__subscript = NULL;
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 956;
goto try_except_handler_6;
}
goto loop_start_3;
loop_end_3:;
goto try_end_3;
// Exception handler code:
try_except_handler_6:;
exception_keeper_type_5 = exception_type;
exception_keeper_value_5 = exception_value;
exception_keeper_tb_5 = exception_tb;
exception_keeper_lineno_5 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_2__iter_value );
tmp_for_loop_2__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_2__for_iterator );
Py_DECREF( tmp_for_loop_2__for_iterator );
tmp_for_loop_2__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_5;
exception_value = exception_keeper_value_5;
exception_tb = exception_keeper_tb_5;
exception_lineno = exception_keeper_lineno_5;
goto try_except_handler_5;
// End of try:
try_end_3:;
Py_XDECREF( tmp_for_loop_2__iter_value );
tmp_for_loop_2__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_2__for_iterator );
Py_DECREF( tmp_for_loop_2__for_iterator );
tmp_for_loop_2__for_iterator = NULL;
tmp_compare_left_8 = var_n;
tmp_compare_right_8 = const_int_pos_1;
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_8, tmp_compare_right_8 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 959;
goto try_except_handler_5;
}
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_yes_10;
}
else
{
goto branch_no_10;
}
branch_yes_10:;
tmp_left_name_14 = const_int_pos_4;
tmp_subscribed_name_4 = par_c;
tmp_subscript_name_4 = const_int_pos_2;
tmp_right_name_14 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_4, tmp_subscript_name_4 );
if ( tmp_right_name_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 960;
goto try_except_handler_5;
}
tmp_ass_subvalue_3 = BINARY_OPERATION_MUL( tmp_left_name_14, tmp_right_name_14 );
Py_DECREF( tmp_right_name_14 );
if ( tmp_ass_subvalue_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 960;
goto try_except_handler_5;
}
tmp_ass_subscribed_3 = var_der;
tmp_ass_subscript_3 = const_int_pos_1;
tmp_ass_subscript_res_1 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_3, tmp_ass_subscript_3, 1, tmp_ass_subvalue_3 );
Py_DECREF( tmp_ass_subvalue_3 );
if ( tmp_ass_subscript_res_1 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 960;
goto try_except_handler_5;
}
branch_no_10:;
tmp_subscribed_name_5 = par_c;
tmp_subscript_name_5 = const_int_pos_1;
tmp_ass_subvalue_4 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_5, tmp_subscript_name_5 );
if ( tmp_ass_subvalue_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 961;
goto try_except_handler_5;
}
tmp_ass_subscribed_4 = var_der;
tmp_ass_subscript_4 = const_int_0;
tmp_ass_subscript_res_2 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_4, tmp_ass_subscript_4, 0, tmp_ass_subvalue_4 );
Py_DECREF( tmp_ass_subvalue_4 );
if ( tmp_ass_subscript_res_2 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 961;
goto try_except_handler_5;
}
tmp_assign_source_29 = var_der;
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_29;
Py_INCREF( par_c );
Py_DECREF( old );
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 952;
goto try_except_handler_5;
}
goto loop_start_2;
loop_end_2:;
goto try_end_4;
// Exception handler code:
try_except_handler_5:;
exception_keeper_type_6 = exception_type;
exception_keeper_value_6 = exception_value;
exception_keeper_tb_6 = exception_tb;
exception_keeper_lineno_6 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_6;
exception_value = exception_keeper_value_6;
exception_tb = exception_keeper_tb_6;
exception_lineno = exception_keeper_lineno_6;
goto frame_exception_exit_1;
// End of try:
try_end_4:;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
branch_end_9:;
tmp_source_name_13 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_13 == NULL ))
{
tmp_source_name_13 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_13 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 963;
goto frame_exception_exit_1;
}
tmp_called_name_5 = LOOKUP_ATTRIBUTE( tmp_source_name_13, const_str_plain_rollaxis );
if ( tmp_called_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 963;
goto frame_exception_exit_1;
}
tmp_args_element_name_4 = par_c;
if ( tmp_args_element_name_4 == NULL )
{
Py_DECREF( tmp_called_name_5 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 963;
goto frame_exception_exit_1;
}
tmp_args_element_name_5 = const_int_0;
tmp_left_name_15 = var_iaxis;
tmp_right_name_15 = const_int_pos_1;
tmp_args_element_name_6 = BINARY_OPERATION_ADD( tmp_left_name_15, tmp_right_name_15 );
if ( tmp_args_element_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_5 );
exception_lineno = 963;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 963;
{
PyObject *call_args[] = { tmp_args_element_name_4, tmp_args_element_name_5, tmp_args_element_name_6 };
tmp_assign_source_30 = CALL_FUNCTION_WITH_ARGS3( tmp_called_name_5, call_args );
}
Py_DECREF( tmp_called_name_5 );
Py_DECREF( tmp_args_element_name_6 );
if ( tmp_assign_source_30 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 963;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
par_c = tmp_assign_source_30;
Py_XDECREF( old );
}
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( par_m )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_m,
par_m
);
assert( res == 0 );
}
if ( par_scl )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_scl,
par_scl
);
assert( res == 0 );
}
if ( par_axis )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_axis,
par_axis
);
assert( res == 0 );
}
if ( var_t )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_t,
var_t
);
assert( res == 0 );
}
if ( var_cnt )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_cnt,
var_cnt
);
assert( res == 0 );
}
if ( var_iaxis )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_iaxis,
var_iaxis
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
if ( var_der )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_der,
var_der
);
assert( res == 0 );
}
if ( var_j )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_j,
var_j
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_17_chebder );
return NULL;
// Return handler code:
try_return_handler_1:;
Py_XDECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_m );
Py_DECREF( par_m );
par_m = NULL;
CHECK_OBJECT( (PyObject *)par_scl );
Py_DECREF( par_scl );
par_scl = NULL;
CHECK_OBJECT( (PyObject *)par_axis );
Py_DECREF( par_axis );
par_axis = NULL;
Py_XDECREF( var_t );
var_t = NULL;
CHECK_OBJECT( (PyObject *)var_cnt );
Py_DECREF( var_cnt );
var_cnt = NULL;
CHECK_OBJECT( (PyObject *)var_iaxis );
Py_DECREF( var_iaxis );
var_iaxis = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_der );
var_der = NULL;
Py_XDECREF( var_j );
var_j = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_7 = exception_type;
exception_keeper_value_7 = exception_value;
exception_keeper_tb_7 = exception_tb;
exception_keeper_lineno_7 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_m );
Py_DECREF( par_m );
par_m = NULL;
CHECK_OBJECT( (PyObject *)par_scl );
Py_DECREF( par_scl );
par_scl = NULL;
CHECK_OBJECT( (PyObject *)par_axis );
Py_DECREF( par_axis );
par_axis = NULL;
Py_XDECREF( var_t );
var_t = NULL;
Py_XDECREF( var_cnt );
var_cnt = NULL;
Py_XDECREF( var_iaxis );
var_iaxis = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_der );
var_der = NULL;
Py_XDECREF( var_j );
var_j = NULL;
// Re-raise.
exception_type = exception_keeper_type_7;
exception_value = exception_keeper_value_7;
exception_tb = exception_keeper_tb_7;
exception_lineno = exception_keeper_lineno_7;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_17_chebder );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_18_chebint( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *par_m = python_pars[ 1 ];
PyObject *par_k = python_pars[ 2 ];
PyObject *par_lbnd = python_pars[ 3 ];
PyObject *par_scl = python_pars[ 4 ];
PyObject *par_axis = python_pars[ 5 ];
PyObject *var_t = NULL;
PyObject *var_cnt = NULL;
PyObject *var_iaxis = NULL;
PyObject *var_i = NULL;
PyObject *var_n = NULL;
PyObject *var_tmp = NULL;
PyObject *var_j = NULL;
PyObject *tmp_list_contraction_1__$0 = NULL;
PyObject *tmp_list_contraction_1__contraction_result = NULL;
PyObject *tmp_list_contraction_1__iter_value_0 = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_comparison_chain_1__operand_2 = NULL;
PyObject *tmp_comparison_chain_1__comparison_result = NULL;
PyObject *tmp_for_loop_1__for_iterator = NULL;
PyObject *tmp_for_loop_1__iter_value = NULL;
PyObject *tmp_inplace_assign_subscr_1__target = NULL;
PyObject *tmp_inplace_assign_subscr_1__subscript = NULL;
PyObject *tmp_for_loop_2__for_iterator = NULL;
PyObject *tmp_for_loop_2__iter_value = NULL;
PyObject *tmp_inplace_assign_subscr_2__target = NULL;
PyObject *tmp_inplace_assign_subscr_2__subscript = NULL;
PyObject *tmp_inplace_assign_subscr_3__target = NULL;
PyObject *tmp_inplace_assign_subscr_3__subscript = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *exception_keeper_type_5;
PyObject *exception_keeper_value_5;
PyTracebackObject *exception_keeper_tb_5;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5;
PyObject *exception_keeper_type_6;
PyObject *exception_keeper_value_6;
PyTracebackObject *exception_keeper_tb_6;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_6;
PyObject *exception_keeper_type_7;
PyObject *exception_keeper_value_7;
PyTracebackObject *exception_keeper_tb_7;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_7;
PyObject *exception_keeper_type_8;
PyObject *exception_keeper_value_8;
PyTracebackObject *exception_keeper_tb_8;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_8;
PyObject *exception_keeper_type_9;
PyObject *exception_keeper_value_9;
PyTracebackObject *exception_keeper_tb_9;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_9;
int tmp_and_left_truth_1;
PyObject *tmp_and_left_value_1;
PyObject *tmp_and_right_value_1;
PyObject *tmp_append_list_1;
PyObject *tmp_append_value_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_element_name_8;
PyObject *tmp_args_element_name_9;
PyObject *tmp_args_element_name_10;
PyObject *tmp_args_name_1;
PyObject *tmp_args_name_2;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscribed_2;
PyObject *tmp_ass_subscribed_3;
PyObject *tmp_ass_subscribed_4;
PyObject *tmp_ass_subscribed_5;
PyObject *tmp_ass_subscribed_6;
PyObject *tmp_ass_subscribed_7;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subscript_2;
PyObject *tmp_ass_subscript_3;
PyObject *tmp_ass_subscript_4;
PyObject *tmp_ass_subscript_5;
PyObject *tmp_ass_subscript_6;
PyObject *tmp_ass_subscript_7;
int tmp_ass_subscript_res_1;
int tmp_ass_subscript_res_2;
int tmp_ass_subscript_res_3;
int tmp_ass_subscript_res_4;
int tmp_ass_subscript_res_5;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_ass_subvalue_2;
PyObject *tmp_ass_subvalue_3;
PyObject *tmp_ass_subvalue_4;
PyObject *tmp_ass_subvalue_5;
PyObject *tmp_ass_subvalue_6;
PyObject *tmp_ass_subvalue_7;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_assign_source_22;
PyObject *tmp_assign_source_23;
PyObject *tmp_assign_source_24;
PyObject *tmp_assign_source_25;
PyObject *tmp_assign_source_26;
PyObject *tmp_assign_source_27;
PyObject *tmp_assign_source_28;
PyObject *tmp_assign_source_29;
PyObject *tmp_assign_source_30;
PyObject *tmp_assign_source_31;
PyObject *tmp_assign_source_32;
PyObject *tmp_assign_source_33;
PyObject *tmp_assign_source_34;
PyObject *tmp_assign_source_35;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
PyObject *tmp_called_name_7;
PyObject *tmp_called_name_8;
int tmp_cmp_Eq_1;
int tmp_cmp_Gt_1;
int tmp_cmp_Gt_2;
int tmp_cmp_In_1;
int tmp_cmp_Lt_1;
int tmp_cmp_Lt_2;
int tmp_cmp_NotEq_1;
int tmp_cmp_NotEq_2;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_left_3;
PyObject *tmp_compare_left_4;
PyObject *tmp_compare_left_5;
PyObject *tmp_compare_left_6;
PyObject *tmp_compare_left_7;
PyObject *tmp_compare_left_8;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compare_right_3;
PyObject *tmp_compare_right_4;
PyObject *tmp_compare_right_5;
PyObject *tmp_compare_right_6;
PyObject *tmp_compare_right_7;
PyObject *tmp_compare_right_8;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_left_3;
PyObject *tmp_compexpr_left_4;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
PyObject *tmp_compexpr_right_3;
PyObject *tmp_compexpr_right_4;
int tmp_cond_truth_1;
int tmp_cond_truth_2;
int tmp_cond_truth_3;
int tmp_cond_truth_4;
PyObject *tmp_cond_value_1;
PyObject *tmp_cond_value_2;
PyObject *tmp_cond_value_3;
PyObject *tmp_cond_value_4;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iter_arg_3;
PyObject *tmp_iter_arg_4;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_kw_name_2;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_left_name_9;
PyObject *tmp_left_name_10;
PyObject *tmp_left_name_11;
PyObject *tmp_left_name_12;
PyObject *tmp_left_name_13;
PyObject *tmp_left_name_14;
PyObject *tmp_left_name_15;
PyObject *tmp_left_name_16;
PyObject *tmp_left_name_17;
PyObject *tmp_left_name_18;
PyObject *tmp_left_name_19;
PyObject *tmp_left_name_20;
PyObject *tmp_left_name_21;
PyObject *tmp_left_name_22;
PyObject *tmp_left_name_23;
PyObject *tmp_left_name_24;
PyObject *tmp_left_name_25;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_len_arg_3;
PyObject *tmp_list_arg_1;
PyObject *tmp_list_element_1;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_make_exception_arg_2;
PyObject *tmp_make_exception_arg_3;
PyObject *tmp_make_exception_arg_4;
PyObject *tmp_make_exception_arg_5;
PyObject *tmp_next_source_1;
PyObject *tmp_next_source_2;
PyObject *tmp_next_source_3;
PyObject *tmp_operand_name_1;
PyObject *tmp_outline_return_value_1;
PyObject *tmp_outline_return_value_2;
PyObject *tmp_raise_type_1;
PyObject *tmp_raise_type_2;
PyObject *tmp_raise_type_3;
PyObject *tmp_raise_type_4;
PyObject *tmp_raise_type_5;
PyObject *tmp_range2_high_1;
PyObject *tmp_range2_low_1;
PyObject *tmp_range_arg_1;
int tmp_res;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_right_name_9;
PyObject *tmp_right_name_10;
PyObject *tmp_right_name_11;
PyObject *tmp_right_name_12;
PyObject *tmp_right_name_13;
PyObject *tmp_right_name_14;
PyObject *tmp_right_name_15;
PyObject *tmp_right_name_16;
PyObject *tmp_right_name_17;
PyObject *tmp_right_name_18;
PyObject *tmp_right_name_19;
PyObject *tmp_right_name_20;
PyObject *tmp_right_name_21;
PyObject *tmp_right_name_22;
PyObject *tmp_right_name_23;
PyObject *tmp_right_name_24;
PyObject *tmp_right_name_25;
Py_ssize_t tmp_slice_index_upper_1;
PyObject *tmp_slice_source_1;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_source_name_6;
PyObject *tmp_source_name_7;
PyObject *tmp_source_name_8;
PyObject *tmp_source_name_9;
PyObject *tmp_source_name_10;
PyObject *tmp_source_name_11;
PyObject *tmp_source_name_12;
PyObject *tmp_source_name_13;
PyObject *tmp_source_name_14;
PyObject *tmp_source_name_15;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscribed_name_4;
PyObject *tmp_subscribed_name_5;
PyObject *tmp_subscribed_name_6;
PyObject *tmp_subscribed_name_7;
PyObject *tmp_subscribed_name_8;
PyObject *tmp_subscribed_name_9;
PyObject *tmp_subscribed_name_10;
PyObject *tmp_subscribed_name_11;
PyObject *tmp_subscribed_name_12;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_subscript_name_4;
PyObject *tmp_subscript_name_5;
PyObject *tmp_subscript_name_6;
PyObject *tmp_subscript_name_7;
PyObject *tmp_subscript_name_8;
PyObject *tmp_subscript_name_9;
PyObject *tmp_subscript_name_10;
PyObject *tmp_subscript_name_11;
PyObject *tmp_subscript_name_12;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
PyObject *tmp_tuple_element_4;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
tmp_outline_return_value_1 = NULL;
tmp_outline_return_value_2 = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_c64bd8ada1cd1ed14dd441e7b136720c, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1052;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1052;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = par_c;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_8c0923655000b74dc494a1a4f40853b5 );
frame_function->f_lineno = 1052;
tmp_assign_source_1 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1052;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_1;
Py_DECREF( old );
}
tmp_source_name_3 = par_c;
tmp_source_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_source_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1053;
goto frame_exception_exit_1;
}
tmp_compare_left_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_char );
Py_DECREF( tmp_source_name_2 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1053;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_str_digest_6e06792ac9d1e948515e79b21ef14ea6;
tmp_cmp_In_1 = PySequence_Contains( tmp_compare_right_1, tmp_compare_left_1 );
assert( !(tmp_cmp_In_1 == -1) );
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_In_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_source_name_4 = par_c;
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_astype );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1054;
goto frame_exception_exit_1;
}
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_5 == NULL )
{
Py_DECREF( tmp_called_name_2 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1054;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_double );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
exception_lineno = 1054;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1054;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1054;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_2;
Py_DECREF( old );
}
branch_no_1:;
tmp_source_name_6 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_6 == NULL ))
{
tmp_source_name_6 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_6 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1055;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_6, const_str_plain_iterable );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1055;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = par_k;
frame_function->f_lineno = 1055;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_cond_value_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
if ( tmp_cond_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1055;
goto frame_exception_exit_1;
}
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_1 );
exception_lineno = 1055;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == 1 )
{
goto branch_no_2;
}
else
{
goto branch_yes_2;
}
branch_yes_2:;
tmp_assign_source_3 = PyList_New( 1 );
tmp_list_element_1 = par_k;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_assign_source_3, 0, tmp_list_element_1 );
{
PyObject *old = par_k;
assert( old != NULL );
par_k = tmp_assign_source_3;
Py_DECREF( old );
}
branch_no_2:;
// Tried code:
tmp_iter_arg_2 = PyTuple_New( 2 );
tmp_tuple_element_2 = par_m;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_iter_arg_2, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_axis;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_iter_arg_2, 1, tmp_tuple_element_2 );
tmp_assign_source_5 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
assert( tmp_assign_source_5 != NULL );
assert( tmp_list_contraction_1__$0 == NULL );
tmp_list_contraction_1__$0 = tmp_assign_source_5;
tmp_assign_source_6 = PyList_New( 0 );
assert( tmp_list_contraction_1__contraction_result == NULL );
tmp_list_contraction_1__contraction_result = tmp_assign_source_6;
// Tried code:
loop_start_1:;
tmp_next_source_1 = tmp_list_contraction_1__$0;
tmp_assign_source_7 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_7 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 1057;
goto try_except_handler_3;
}
}
{
PyObject *old = tmp_list_contraction_1__iter_value_0;
tmp_list_contraction_1__iter_value_0 = tmp_assign_source_7;
Py_XDECREF( old );
}
tmp_assign_source_8 = tmp_list_contraction_1__iter_value_0;
{
PyObject *old = var_t;
var_t = tmp_assign_source_8;
Py_INCREF( var_t );
Py_XDECREF( old );
}
tmp_append_list_1 = tmp_list_contraction_1__contraction_result;
tmp_int_arg_1 = var_t;
tmp_append_value_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_append_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1057;
goto try_except_handler_3;
}
assert( PyList_Check( tmp_append_list_1 ) );
tmp_res = PyList_Append( tmp_append_list_1, tmp_append_value_1 );
Py_DECREF( tmp_append_value_1 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1057;
goto try_except_handler_3;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1057;
goto try_except_handler_3;
}
goto loop_start_1;
loop_end_1:;
tmp_outline_return_value_1 = tmp_list_contraction_1__contraction_result;
Py_INCREF( tmp_outline_return_value_1 );
goto try_return_handler_3;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_18_chebint );
return NULL;
// Return handler code:
try_return_handler_3:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__$0 );
Py_DECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__contraction_result );
Py_DECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
goto outline_result_1;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__$0 );
Py_DECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__contraction_result );
Py_DECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto try_except_handler_2;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_18_chebint );
return NULL;
outline_result_1:;
tmp_iter_arg_1 = tmp_outline_return_value_1;
tmp_assign_source_4 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1057;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_4;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_9 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_9 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1057;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_9;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_10 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_10 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1057;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_10;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_11 = tmp_tuple_unpack_1__element_1;
assert( var_cnt == NULL );
Py_INCREF( tmp_assign_source_11 );
var_cnt = tmp_assign_source_11;
tmp_assign_source_12 = tmp_tuple_unpack_1__element_2;
assert( var_iaxis == NULL );
Py_INCREF( tmp_assign_source_12 );
var_iaxis = tmp_assign_source_12;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_compare_left_2 = var_cnt;
tmp_compare_right_2 = par_m;
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1059;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_make_exception_arg_1 = const_str_digest_2d1bfbe8c32cb9190bf6cbec9abdf62a;
frame_function->f_lineno = 1060;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1060;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_3:;
tmp_compare_left_3 = var_cnt;
tmp_compare_right_3 = const_int_0;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_3, tmp_compare_right_3 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1061;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_4;
}
else
{
goto branch_no_4;
}
branch_yes_4:;
tmp_make_exception_arg_2 = const_str_digest_b303cff154cb34d4708df3886d4b732e;
frame_function->f_lineno = 1062;
{
PyObject *call_args[] = { tmp_make_exception_arg_2 };
tmp_raise_type_2 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_2 != NULL );
exception_type = tmp_raise_type_2;
exception_lineno = 1062;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_4:;
tmp_len_arg_1 = par_k;
tmp_compare_left_4 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1063;
goto frame_exception_exit_1;
}
tmp_compare_right_4 = var_cnt;
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_4, tmp_compare_right_4 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_4 );
exception_lineno = 1063;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_4 );
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_yes_5;
}
else
{
goto branch_no_5;
}
branch_yes_5:;
tmp_make_exception_arg_3 = const_str_digest_616f6ee3ef74479987454a15fb3cc986;
frame_function->f_lineno = 1064;
{
PyObject *call_args[] = { tmp_make_exception_arg_3 };
tmp_raise_type_3 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_3 != NULL );
exception_type = tmp_raise_type_3;
exception_lineno = 1064;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_5:;
tmp_compare_left_5 = var_iaxis;
tmp_compare_right_5 = par_axis;
tmp_cmp_NotEq_2 = RICH_COMPARE_BOOL_NE( tmp_compare_left_5, tmp_compare_right_5 );
if ( tmp_cmp_NotEq_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1065;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_2 == 1 )
{
goto branch_yes_6;
}
else
{
goto branch_no_6;
}
branch_yes_6:;
tmp_make_exception_arg_4 = const_str_digest_c58373a0fb3d7245efa1b5aed182e608;
frame_function->f_lineno = 1066;
{
PyObject *call_args[] = { tmp_make_exception_arg_4 };
tmp_raise_type_4 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_4 != NULL );
exception_type = tmp_raise_type_4;
exception_lineno = 1066;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_6:;
tmp_assign_source_13 = var_iaxis;
assert( tmp_comparison_chain_1__operand_2 == NULL );
Py_INCREF( tmp_assign_source_13 );
tmp_comparison_chain_1__operand_2 = tmp_assign_source_13;
// Tried code:
tmp_source_name_7 = par_c;
tmp_operand_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_7, const_str_plain_ndim );
if ( tmp_operand_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1067;
goto try_except_handler_4;
}
tmp_compexpr_left_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
Py_DECREF( tmp_operand_name_1 );
if ( tmp_compexpr_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1067;
goto try_except_handler_4;
}
tmp_compexpr_right_1 = tmp_comparison_chain_1__operand_2;
tmp_assign_source_14 = RICH_COMPARE_LE( tmp_compexpr_left_1, tmp_compexpr_right_1 );
Py_DECREF( tmp_compexpr_left_1 );
if ( tmp_assign_source_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1067;
goto try_except_handler_4;
}
assert( tmp_comparison_chain_1__comparison_result == NULL );
tmp_comparison_chain_1__comparison_result = tmp_assign_source_14;
tmp_cond_value_3 = tmp_comparison_chain_1__comparison_result;
tmp_cond_truth_3 = CHECK_IF_TRUE( tmp_cond_value_3 );
if ( tmp_cond_truth_3 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1067;
goto try_except_handler_4;
}
if ( tmp_cond_truth_3 == 1 )
{
goto branch_no_8;
}
else
{
goto branch_yes_8;
}
branch_yes_8:;
tmp_outline_return_value_2 = tmp_comparison_chain_1__comparison_result;
Py_INCREF( tmp_outline_return_value_2 );
goto try_return_handler_4;
branch_no_8:;
tmp_compexpr_left_2 = tmp_comparison_chain_1__operand_2;
tmp_source_name_8 = par_c;
tmp_compexpr_right_2 = LOOKUP_ATTRIBUTE( tmp_source_name_8, const_str_plain_ndim );
if ( tmp_compexpr_right_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1067;
goto try_except_handler_4;
}
tmp_outline_return_value_2 = RICH_COMPARE_LT( tmp_compexpr_left_2, tmp_compexpr_right_2 );
Py_DECREF( tmp_compexpr_right_2 );
if ( tmp_outline_return_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1067;
goto try_except_handler_4;
}
goto try_return_handler_4;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_18_chebint );
return NULL;
// Return handler code:
try_return_handler_4:;
CHECK_OBJECT( (PyObject *)tmp_comparison_chain_1__operand_2 );
Py_DECREF( tmp_comparison_chain_1__operand_2 );
tmp_comparison_chain_1__operand_2 = NULL;
CHECK_OBJECT( (PyObject *)tmp_comparison_chain_1__comparison_result );
Py_DECREF( tmp_comparison_chain_1__comparison_result );
tmp_comparison_chain_1__comparison_result = NULL;
goto outline_result_2;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_comparison_chain_1__operand_2 );
Py_DECREF( tmp_comparison_chain_1__operand_2 );
tmp_comparison_chain_1__operand_2 = NULL;
Py_XDECREF( tmp_comparison_chain_1__comparison_result );
tmp_comparison_chain_1__comparison_result = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_18_chebint );
return NULL;
outline_result_2:;
tmp_cond_value_2 = tmp_outline_return_value_2;
tmp_cond_truth_2 = CHECK_IF_TRUE( tmp_cond_value_2 );
if ( tmp_cond_truth_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_2 );
exception_lineno = 1067;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_2 );
if ( tmp_cond_truth_2 == 1 )
{
goto branch_no_7;
}
else
{
goto branch_yes_7;
}
branch_yes_7:;
tmp_make_exception_arg_5 = const_str_digest_644ceea54723b4814b2af8460d62b8a6;
frame_function->f_lineno = 1068;
{
PyObject *call_args[] = { tmp_make_exception_arg_5 };
tmp_raise_type_5 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_5 != NULL );
exception_type = tmp_raise_type_5;
exception_lineno = 1068;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_7:;
tmp_compare_left_6 = var_iaxis;
tmp_compare_right_6 = const_int_0;
tmp_cmp_Lt_2 = RICH_COMPARE_BOOL_LT( tmp_compare_left_6, tmp_compare_right_6 );
if ( tmp_cmp_Lt_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1069;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_2 == 1 )
{
goto branch_yes_9;
}
else
{
goto branch_no_9;
}
branch_yes_9:;
tmp_left_name_1 = var_iaxis;
tmp_source_name_9 = par_c;
tmp_right_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_9, const_str_plain_ndim );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1070;
goto frame_exception_exit_1;
}
tmp_result = BINARY_OPERATION_ADD_INPLACE( &tmp_left_name_1, tmp_right_name_1 );
tmp_assign_source_15 = tmp_left_name_1;
Py_DECREF( tmp_right_name_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1070;
goto frame_exception_exit_1;
}
var_iaxis = tmp_assign_source_15;
branch_no_9:;
tmp_compare_left_7 = var_cnt;
tmp_compare_right_7 = const_int_0;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_7, tmp_compare_right_7 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1072;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_10;
}
else
{
goto branch_no_10;
}
branch_yes_10:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto frame_return_exit_1;
branch_no_10:;
tmp_source_name_10 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_10 == NULL ))
{
tmp_source_name_10 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_10 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1075;
goto frame_exception_exit_1;
}
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_10, const_str_plain_rollaxis );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1075;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_c;
tmp_args_element_name_4 = var_iaxis;
frame_function->f_lineno = 1075;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_assign_source_16 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_4, call_args );
}
Py_DECREF( tmp_called_name_4 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1075;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_16;
Py_DECREF( old );
}
tmp_list_arg_1 = par_k;
tmp_left_name_2 = PySequence_List( tmp_list_arg_1 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1076;
goto frame_exception_exit_1;
}
tmp_left_name_3 = LIST_COPY( const_list_int_0_list );
tmp_left_name_4 = var_cnt;
tmp_len_arg_2 = par_k;
tmp_right_name_4 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_right_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_left_name_3 );
exception_lineno = 1076;
goto frame_exception_exit_1;
}
tmp_right_name_3 = BINARY_OPERATION_SUB( tmp_left_name_4, tmp_right_name_4 );
Py_DECREF( tmp_right_name_4 );
if ( tmp_right_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_left_name_3 );
exception_lineno = 1076;
goto frame_exception_exit_1;
}
tmp_right_name_2 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_3 );
Py_DECREF( tmp_left_name_3 );
Py_DECREF( tmp_right_name_3 );
if ( tmp_right_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1076;
goto frame_exception_exit_1;
}
tmp_assign_source_17 = BINARY_OPERATION_ADD( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_right_name_2 );
if ( tmp_assign_source_17 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1076;
goto frame_exception_exit_1;
}
{
PyObject *old = par_k;
assert( old != NULL );
par_k = tmp_assign_source_17;
Py_DECREF( old );
}
tmp_range_arg_1 = var_cnt;
tmp_iter_arg_3 = BUILTIN_RANGE( tmp_range_arg_1 );
if ( tmp_iter_arg_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1077;
goto frame_exception_exit_1;
}
tmp_assign_source_18 = MAKE_ITERATOR( tmp_iter_arg_3 );
Py_DECREF( tmp_iter_arg_3 );
if ( tmp_assign_source_18 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1077;
goto frame_exception_exit_1;
}
assert( tmp_for_loop_1__for_iterator == NULL );
tmp_for_loop_1__for_iterator = tmp_assign_source_18;
// Tried code:
loop_start_2:;
tmp_next_source_2 = tmp_for_loop_1__for_iterator;
tmp_assign_source_19 = ITERATOR_NEXT( tmp_next_source_2 );
if ( tmp_assign_source_19 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_2;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 1077;
goto try_except_handler_5;
}
}
{
PyObject *old = tmp_for_loop_1__iter_value;
tmp_for_loop_1__iter_value = tmp_assign_source_19;
Py_XDECREF( old );
}
tmp_assign_source_20 = tmp_for_loop_1__iter_value;
{
PyObject *old = var_i;
var_i = tmp_assign_source_20;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_len_arg_3 = par_c;
if ( tmp_len_arg_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1078;
goto try_except_handler_5;
}
tmp_assign_source_21 = BUILTIN_LEN( tmp_len_arg_3 );
if ( tmp_assign_source_21 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1078;
goto try_except_handler_5;
}
{
PyObject *old = var_n;
var_n = tmp_assign_source_21;
Py_XDECREF( old );
}
tmp_left_name_5 = par_c;
if ( tmp_left_name_5 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1079;
goto try_except_handler_5;
}
tmp_right_name_5 = par_scl;
tmp_result = BINARY_OPERATION_MUL_INPLACE( &tmp_left_name_5, tmp_right_name_5 );
tmp_assign_source_22 = tmp_left_name_5;
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1079;
goto try_except_handler_5;
}
par_c = tmp_assign_source_22;
tmp_compexpr_left_3 = var_n;
tmp_compexpr_right_3 = const_int_pos_1;
tmp_and_left_value_1 = RICH_COMPARE_EQ( tmp_compexpr_left_3, tmp_compexpr_right_3 );
if ( tmp_and_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1080;
goto try_except_handler_5;
}
tmp_and_left_truth_1 = CHECK_IF_TRUE( tmp_and_left_value_1 );
if ( tmp_and_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_and_left_value_1 );
exception_lineno = 1080;
goto try_except_handler_5;
}
if ( tmp_and_left_truth_1 == 1 )
{
goto and_right_1;
}
else
{
goto and_left_1;
}
and_right_1:;
Py_DECREF( tmp_and_left_value_1 );
tmp_source_name_11 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_11 == NULL ))
{
tmp_source_name_11 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_11 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1080;
goto try_except_handler_5;
}
tmp_called_name_5 = LOOKUP_ATTRIBUTE( tmp_source_name_11, const_str_plain_all );
if ( tmp_called_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1080;
goto try_except_handler_5;
}
tmp_subscribed_name_1 = par_c;
tmp_subscript_name_1 = const_int_0;
tmp_compexpr_left_4 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_compexpr_left_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_5 );
exception_lineno = 1080;
goto try_except_handler_5;
}
tmp_compexpr_right_4 = const_int_0;
tmp_args_element_name_5 = RICH_COMPARE_EQ( tmp_compexpr_left_4, tmp_compexpr_right_4 );
Py_DECREF( tmp_compexpr_left_4 );
if ( tmp_args_element_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_5 );
exception_lineno = 1080;
goto try_except_handler_5;
}
frame_function->f_lineno = 1080;
{
PyObject *call_args[] = { tmp_args_element_name_5 };
tmp_and_right_value_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, call_args );
}
Py_DECREF( tmp_called_name_5 );
Py_DECREF( tmp_args_element_name_5 );
if ( tmp_and_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1080;
goto try_except_handler_5;
}
tmp_cond_value_4 = tmp_and_right_value_1;
goto and_end_1;
and_left_1:;
tmp_cond_value_4 = tmp_and_left_value_1;
and_end_1:;
tmp_cond_truth_4 = CHECK_IF_TRUE( tmp_cond_value_4 );
if ( tmp_cond_truth_4 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_4 );
exception_lineno = 1080;
goto try_except_handler_5;
}
Py_DECREF( tmp_cond_value_4 );
if ( tmp_cond_truth_4 == 1 )
{
goto branch_yes_11;
}
else
{
goto branch_no_11;
}
branch_yes_11:;
tmp_assign_source_23 = par_c;
{
PyObject *old = tmp_inplace_assign_subscr_1__target;
tmp_inplace_assign_subscr_1__target = tmp_assign_source_23;
Py_INCREF( tmp_inplace_assign_subscr_1__target );
Py_XDECREF( old );
}
tmp_assign_source_24 = const_int_0;
{
PyObject *old = tmp_inplace_assign_subscr_1__subscript;
tmp_inplace_assign_subscr_1__subscript = tmp_assign_source_24;
Py_INCREF( tmp_inplace_assign_subscr_1__subscript );
Py_XDECREF( old );
}
// Tried code:
tmp_subscribed_name_2 = tmp_inplace_assign_subscr_1__target;
tmp_subscript_name_2 = const_int_0;
tmp_left_name_6 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_left_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1081;
goto try_except_handler_6;
}
tmp_subscribed_name_3 = par_k;
tmp_subscript_name_3 = var_i;
tmp_right_name_6 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
if ( tmp_right_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_6 );
exception_lineno = 1081;
goto try_except_handler_6;
}
tmp_ass_subvalue_1 = BINARY_OPERATION( PyNumber_InPlaceAdd, tmp_left_name_6, tmp_right_name_6 );
Py_DECREF( tmp_left_name_6 );
Py_DECREF( tmp_right_name_6 );
if ( tmp_ass_subvalue_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1081;
goto try_except_handler_6;
}
tmp_ass_subscribed_1 = tmp_inplace_assign_subscr_1__target;
tmp_ass_subscript_1 = const_int_0;
tmp_ass_subscript_res_1 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_1, tmp_ass_subscript_1, 0, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subvalue_1 );
if ( tmp_ass_subscript_res_1 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1081;
goto try_except_handler_6;
}
goto try_end_2;
// Exception handler code:
try_except_handler_6:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__target );
Py_DECREF( tmp_inplace_assign_subscr_1__target );
tmp_inplace_assign_subscr_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__subscript );
Py_DECREF( tmp_inplace_assign_subscr_1__subscript );
tmp_inplace_assign_subscr_1__subscript = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto try_except_handler_5;
// End of try:
try_end_2:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__target );
Py_DECREF( tmp_inplace_assign_subscr_1__target );
tmp_inplace_assign_subscr_1__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__subscript );
Py_DECREF( tmp_inplace_assign_subscr_1__subscript );
tmp_inplace_assign_subscr_1__subscript = NULL;
goto branch_end_11;
branch_no_11:;
tmp_source_name_12 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_12 == NULL ))
{
tmp_source_name_12 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_12 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1083;
goto try_except_handler_5;
}
tmp_called_name_6 = LOOKUP_ATTRIBUTE( tmp_source_name_12, const_str_plain_empty );
if ( tmp_called_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1083;
goto try_except_handler_5;
}
tmp_args_name_2 = PyTuple_New( 1 );
tmp_left_name_7 = PyTuple_New( 1 );
tmp_left_name_8 = var_n;
tmp_right_name_7 = const_int_pos_1;
tmp_tuple_element_4 = BINARY_OPERATION_ADD( tmp_left_name_8, tmp_right_name_7 );
if ( tmp_tuple_element_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 1083;
goto try_except_handler_5;
}
PyTuple_SET_ITEM( tmp_left_name_7, 0, tmp_tuple_element_4 );
tmp_sliceslicedel_index_lower_1 = 1;
tmp_slice_index_upper_1 = PY_SSIZE_T_MAX;
tmp_source_name_13 = par_c;
tmp_slice_source_1 = LOOKUP_ATTRIBUTE( tmp_source_name_13, const_str_plain_shape );
if ( tmp_slice_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 1083;
goto try_except_handler_5;
}
tmp_right_name_8 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
Py_DECREF( tmp_slice_source_1 );
if ( tmp_right_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 1083;
goto try_except_handler_5;
}
tmp_tuple_element_3 = BINARY_OPERATION_ADD( tmp_left_name_7, tmp_right_name_8 );
Py_DECREF( tmp_left_name_7 );
Py_DECREF( tmp_right_name_8 );
if ( tmp_tuple_element_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
Py_DECREF( tmp_args_name_2 );
exception_lineno = 1083;
goto try_except_handler_5;
}
PyTuple_SET_ITEM( tmp_args_name_2, 0, tmp_tuple_element_3 );
tmp_kw_name_2 = _PyDict_NewPresized( 1 );
tmp_source_name_14 = par_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_14, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
exception_lineno = 1083;
goto try_except_handler_5;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_2, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 1083;
tmp_assign_source_25 = CALL_FUNCTION( tmp_called_name_6, tmp_args_name_2, tmp_kw_name_2 );
Py_DECREF( tmp_called_name_6 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
if ( tmp_assign_source_25 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1083;
goto try_except_handler_5;
}
{
PyObject *old = var_tmp;
var_tmp = tmp_assign_source_25;
Py_XDECREF( old );
}
tmp_subscribed_name_4 = par_c;
tmp_subscript_name_4 = const_int_0;
tmp_left_name_9 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_4, tmp_subscript_name_4 );
if ( tmp_left_name_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1084;
goto try_except_handler_5;
}
tmp_right_name_9 = const_int_0;
tmp_ass_subvalue_2 = BINARY_OPERATION_MUL( tmp_left_name_9, tmp_right_name_9 );
Py_DECREF( tmp_left_name_9 );
if ( tmp_ass_subvalue_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1084;
goto try_except_handler_5;
}
tmp_ass_subscribed_2 = var_tmp;
tmp_ass_subscript_2 = const_int_0;
tmp_ass_subscript_res_2 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_2, tmp_ass_subscript_2, 0, tmp_ass_subvalue_2 );
Py_DECREF( tmp_ass_subvalue_2 );
if ( tmp_ass_subscript_res_2 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1084;
goto try_except_handler_5;
}
tmp_subscribed_name_5 = par_c;
tmp_subscript_name_5 = const_int_0;
tmp_ass_subvalue_3 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_5, tmp_subscript_name_5 );
if ( tmp_ass_subvalue_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1085;
goto try_except_handler_5;
}
tmp_ass_subscribed_3 = var_tmp;
tmp_ass_subscript_3 = const_int_pos_1;
tmp_ass_subscript_res_3 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_3, tmp_ass_subscript_3, 1, tmp_ass_subvalue_3 );
Py_DECREF( tmp_ass_subvalue_3 );
if ( tmp_ass_subscript_res_3 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1085;
goto try_except_handler_5;
}
tmp_compare_left_8 = var_n;
tmp_compare_right_8 = const_int_pos_1;
tmp_cmp_Gt_2 = RICH_COMPARE_BOOL_GT( tmp_compare_left_8, tmp_compare_right_8 );
if ( tmp_cmp_Gt_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1086;
goto try_except_handler_5;
}
if ( tmp_cmp_Gt_2 == 1 )
{
goto branch_yes_12;
}
else
{
goto branch_no_12;
}
branch_yes_12:;
tmp_subscribed_name_6 = par_c;
tmp_subscript_name_6 = const_int_pos_1;
tmp_left_name_10 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_6, tmp_subscript_name_6 );
if ( tmp_left_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1087;
goto try_except_handler_5;
}
tmp_right_name_10 = const_int_pos_4;
tmp_ass_subvalue_4 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_10, tmp_right_name_10 );
Py_DECREF( tmp_left_name_10 );
if ( tmp_ass_subvalue_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1087;
goto try_except_handler_5;
}
tmp_ass_subscribed_4 = var_tmp;
tmp_ass_subscript_4 = const_int_pos_2;
tmp_ass_subscript_res_4 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_4, tmp_ass_subscript_4, 2, tmp_ass_subvalue_4 );
Py_DECREF( tmp_ass_subvalue_4 );
if ( tmp_ass_subscript_res_4 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1087;
goto try_except_handler_5;
}
branch_no_12:;
tmp_range2_low_1 = const_int_pos_2;
tmp_range2_high_1 = var_n;
tmp_iter_arg_4 = BUILTIN_RANGE2( tmp_range2_low_1, tmp_range2_high_1 );
if ( tmp_iter_arg_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1088;
goto try_except_handler_5;
}
tmp_assign_source_26 = MAKE_ITERATOR( tmp_iter_arg_4 );
Py_DECREF( tmp_iter_arg_4 );
if ( tmp_assign_source_26 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1088;
goto try_except_handler_5;
}
{
PyObject *old = tmp_for_loop_2__for_iterator;
tmp_for_loop_2__for_iterator = tmp_assign_source_26;
Py_XDECREF( old );
}
// Tried code:
loop_start_3:;
tmp_next_source_3 = tmp_for_loop_2__for_iterator;
tmp_assign_source_27 = ITERATOR_NEXT( tmp_next_source_3 );
if ( tmp_assign_source_27 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_3;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 1088;
goto try_except_handler_7;
}
}
{
PyObject *old = tmp_for_loop_2__iter_value;
tmp_for_loop_2__iter_value = tmp_assign_source_27;
Py_XDECREF( old );
}
tmp_assign_source_28 = tmp_for_loop_2__iter_value;
{
PyObject *old = var_j;
var_j = tmp_assign_source_28;
Py_INCREF( var_j );
Py_XDECREF( old );
}
tmp_subscribed_name_7 = par_c;
tmp_subscript_name_7 = var_j;
tmp_left_name_11 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_7, tmp_subscript_name_7 );
if ( tmp_left_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1089;
goto try_except_handler_7;
}
tmp_left_name_13 = const_int_pos_2;
tmp_right_name_12 = var_j;
tmp_left_name_12 = BINARY_OPERATION_MUL( tmp_left_name_13, tmp_right_name_12 );
if ( tmp_left_name_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_11 );
exception_lineno = 1089;
goto try_except_handler_7;
}
tmp_right_name_13 = const_int_pos_1;
tmp_right_name_11 = BINARY_OPERATION_ADD( tmp_left_name_12, tmp_right_name_13 );
Py_DECREF( tmp_left_name_12 );
if ( tmp_right_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_11 );
exception_lineno = 1089;
goto try_except_handler_7;
}
tmp_assign_source_29 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_11, tmp_right_name_11 );
Py_DECREF( tmp_left_name_11 );
Py_DECREF( tmp_right_name_11 );
if ( tmp_assign_source_29 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1089;
goto try_except_handler_7;
}
{
PyObject *old = var_t;
var_t = tmp_assign_source_29;
Py_XDECREF( old );
}
tmp_subscribed_name_8 = par_c;
tmp_subscript_name_8 = var_j;
tmp_left_name_14 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_8, tmp_subscript_name_8 );
if ( tmp_left_name_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1090;
goto try_except_handler_7;
}
tmp_left_name_15 = const_int_pos_2;
tmp_left_name_16 = var_j;
tmp_right_name_16 = const_int_pos_1;
tmp_right_name_15 = BINARY_OPERATION_ADD( tmp_left_name_16, tmp_right_name_16 );
if ( tmp_right_name_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_14 );
exception_lineno = 1090;
goto try_except_handler_7;
}
tmp_right_name_14 = BINARY_OPERATION_MUL( tmp_left_name_15, tmp_right_name_15 );
Py_DECREF( tmp_right_name_15 );
if ( tmp_right_name_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_14 );
exception_lineno = 1090;
goto try_except_handler_7;
}
tmp_ass_subvalue_5 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_14, tmp_right_name_14 );
Py_DECREF( tmp_left_name_14 );
Py_DECREF( tmp_right_name_14 );
if ( tmp_ass_subvalue_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1090;
goto try_except_handler_7;
}
tmp_ass_subscribed_5 = var_tmp;
tmp_left_name_17 = var_j;
tmp_right_name_17 = const_int_pos_1;
tmp_ass_subscript_5 = BINARY_OPERATION_ADD( tmp_left_name_17, tmp_right_name_17 );
if ( tmp_ass_subscript_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_ass_subvalue_5 );
exception_lineno = 1090;
goto try_except_handler_7;
}
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_5, tmp_ass_subscript_5, tmp_ass_subvalue_5 );
Py_DECREF( tmp_ass_subscript_5 );
Py_DECREF( tmp_ass_subvalue_5 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1090;
goto try_except_handler_7;
}
tmp_assign_source_30 = var_tmp;
{
PyObject *old = tmp_inplace_assign_subscr_2__target;
tmp_inplace_assign_subscr_2__target = tmp_assign_source_30;
Py_INCREF( tmp_inplace_assign_subscr_2__target );
Py_XDECREF( old );
}
// Tried code:
tmp_left_name_18 = var_j;
tmp_right_name_18 = const_int_pos_1;
tmp_assign_source_31 = BINARY_OPERATION_SUB( tmp_left_name_18, tmp_right_name_18 );
if ( tmp_assign_source_31 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1091;
goto try_except_handler_8;
}
{
PyObject *old = tmp_inplace_assign_subscr_2__subscript;
tmp_inplace_assign_subscr_2__subscript = tmp_assign_source_31;
Py_XDECREF( old );
}
tmp_subscribed_name_9 = tmp_inplace_assign_subscr_2__target;
tmp_subscript_name_9 = tmp_inplace_assign_subscr_2__subscript;
tmp_left_name_19 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_9, tmp_subscript_name_9 );
if ( tmp_left_name_19 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1091;
goto try_except_handler_8;
}
tmp_subscribed_name_10 = par_c;
tmp_subscript_name_10 = var_j;
tmp_left_name_20 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_10, tmp_subscript_name_10 );
if ( tmp_left_name_20 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_19 );
exception_lineno = 1091;
goto try_except_handler_8;
}
tmp_left_name_21 = const_int_pos_2;
tmp_left_name_22 = var_j;
tmp_right_name_22 = const_int_pos_1;
tmp_right_name_21 = BINARY_OPERATION_SUB( tmp_left_name_22, tmp_right_name_22 );
if ( tmp_right_name_21 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_19 );
Py_DECREF( tmp_left_name_20 );
exception_lineno = 1091;
goto try_except_handler_8;
}
tmp_right_name_20 = BINARY_OPERATION_MUL( tmp_left_name_21, tmp_right_name_21 );
Py_DECREF( tmp_right_name_21 );
if ( tmp_right_name_20 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_19 );
Py_DECREF( tmp_left_name_20 );
exception_lineno = 1091;
goto try_except_handler_8;
}
tmp_right_name_19 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_20, tmp_right_name_20 );
Py_DECREF( tmp_left_name_20 );
Py_DECREF( tmp_right_name_20 );
if ( tmp_right_name_19 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_19 );
exception_lineno = 1091;
goto try_except_handler_8;
}
tmp_ass_subvalue_6 = BINARY_OPERATION( PyNumber_InPlaceSubtract, tmp_left_name_19, tmp_right_name_19 );
Py_DECREF( tmp_left_name_19 );
Py_DECREF( tmp_right_name_19 );
if ( tmp_ass_subvalue_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1091;
goto try_except_handler_8;
}
tmp_ass_subscribed_6 = tmp_inplace_assign_subscr_2__target;
tmp_ass_subscript_6 = tmp_inplace_assign_subscr_2__subscript;
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_6, tmp_ass_subscript_6, tmp_ass_subvalue_6 );
Py_DECREF( tmp_ass_subvalue_6 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1091;
goto try_except_handler_8;
}
goto try_end_3;
// Exception handler code:
try_except_handler_8:;
exception_keeper_type_5 = exception_type;
exception_keeper_value_5 = exception_value;
exception_keeper_tb_5 = exception_tb;
exception_keeper_lineno_5 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_2__target );
Py_DECREF( tmp_inplace_assign_subscr_2__target );
tmp_inplace_assign_subscr_2__target = NULL;
Py_XDECREF( tmp_inplace_assign_subscr_2__subscript );
tmp_inplace_assign_subscr_2__subscript = NULL;
// Re-raise.
exception_type = exception_keeper_type_5;
exception_value = exception_keeper_value_5;
exception_tb = exception_keeper_tb_5;
exception_lineno = exception_keeper_lineno_5;
goto try_except_handler_7;
// End of try:
try_end_3:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_2__target );
Py_DECREF( tmp_inplace_assign_subscr_2__target );
tmp_inplace_assign_subscr_2__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_2__subscript );
Py_DECREF( tmp_inplace_assign_subscr_2__subscript );
tmp_inplace_assign_subscr_2__subscript = NULL;
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1088;
goto try_except_handler_7;
}
goto loop_start_3;
loop_end_3:;
goto try_end_4;
// Exception handler code:
try_except_handler_7:;
exception_keeper_type_6 = exception_type;
exception_keeper_value_6 = exception_value;
exception_keeper_tb_6 = exception_tb;
exception_keeper_lineno_6 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_2__iter_value );
tmp_for_loop_2__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_2__for_iterator );
Py_DECREF( tmp_for_loop_2__for_iterator );
tmp_for_loop_2__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_6;
exception_value = exception_keeper_value_6;
exception_tb = exception_keeper_tb_6;
exception_lineno = exception_keeper_lineno_6;
goto try_except_handler_5;
// End of try:
try_end_4:;
Py_XDECREF( tmp_for_loop_2__iter_value );
tmp_for_loop_2__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_2__for_iterator );
Py_DECREF( tmp_for_loop_2__for_iterator );
tmp_for_loop_2__for_iterator = NULL;
tmp_assign_source_32 = var_tmp;
{
PyObject *old = tmp_inplace_assign_subscr_3__target;
tmp_inplace_assign_subscr_3__target = tmp_assign_source_32;
Py_INCREF( tmp_inplace_assign_subscr_3__target );
Py_XDECREF( old );
}
tmp_assign_source_33 = const_int_0;
{
PyObject *old = tmp_inplace_assign_subscr_3__subscript;
tmp_inplace_assign_subscr_3__subscript = tmp_assign_source_33;
Py_INCREF( tmp_inplace_assign_subscr_3__subscript );
Py_XDECREF( old );
}
// Tried code:
tmp_subscribed_name_11 = tmp_inplace_assign_subscr_3__target;
tmp_subscript_name_11 = const_int_0;
tmp_left_name_23 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_11, tmp_subscript_name_11 );
if ( tmp_left_name_23 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1092;
goto try_except_handler_9;
}
tmp_subscribed_name_12 = par_k;
tmp_subscript_name_12 = var_i;
tmp_left_name_24 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_12, tmp_subscript_name_12 );
if ( tmp_left_name_24 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_23 );
exception_lineno = 1092;
goto try_except_handler_9;
}
tmp_called_name_7 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_7 == NULL ))
{
tmp_called_name_7 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_7 == NULL )
{
Py_DECREF( tmp_left_name_23 );
Py_DECREF( tmp_left_name_24 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1092;
goto try_except_handler_9;
}
tmp_args_element_name_6 = par_lbnd;
tmp_args_element_name_7 = var_tmp;
frame_function->f_lineno = 1092;
{
PyObject *call_args[] = { tmp_args_element_name_6, tmp_args_element_name_7 };
tmp_right_name_24 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_7, call_args );
}
if ( tmp_right_name_24 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_23 );
Py_DECREF( tmp_left_name_24 );
exception_lineno = 1092;
goto try_except_handler_9;
}
tmp_right_name_23 = BINARY_OPERATION_SUB( tmp_left_name_24, tmp_right_name_24 );
Py_DECREF( tmp_left_name_24 );
Py_DECREF( tmp_right_name_24 );
if ( tmp_right_name_23 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_23 );
exception_lineno = 1092;
goto try_except_handler_9;
}
tmp_ass_subvalue_7 = BINARY_OPERATION( PyNumber_InPlaceAdd, tmp_left_name_23, tmp_right_name_23 );
Py_DECREF( tmp_left_name_23 );
Py_DECREF( tmp_right_name_23 );
if ( tmp_ass_subvalue_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1092;
goto try_except_handler_9;
}
tmp_ass_subscribed_7 = tmp_inplace_assign_subscr_3__target;
tmp_ass_subscript_7 = const_int_0;
tmp_ass_subscript_res_5 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_7, tmp_ass_subscript_7, 0, tmp_ass_subvalue_7 );
Py_DECREF( tmp_ass_subvalue_7 );
if ( tmp_ass_subscript_res_5 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1092;
goto try_except_handler_9;
}
goto try_end_5;
// Exception handler code:
try_except_handler_9:;
exception_keeper_type_7 = exception_type;
exception_keeper_value_7 = exception_value;
exception_keeper_tb_7 = exception_tb;
exception_keeper_lineno_7 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_3__target );
Py_DECREF( tmp_inplace_assign_subscr_3__target );
tmp_inplace_assign_subscr_3__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_3__subscript );
Py_DECREF( tmp_inplace_assign_subscr_3__subscript );
tmp_inplace_assign_subscr_3__subscript = NULL;
// Re-raise.
exception_type = exception_keeper_type_7;
exception_value = exception_keeper_value_7;
exception_tb = exception_keeper_tb_7;
exception_lineno = exception_keeper_lineno_7;
goto try_except_handler_5;
// End of try:
try_end_5:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_3__target );
Py_DECREF( tmp_inplace_assign_subscr_3__target );
tmp_inplace_assign_subscr_3__target = NULL;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_3__subscript );
Py_DECREF( tmp_inplace_assign_subscr_3__subscript );
tmp_inplace_assign_subscr_3__subscript = NULL;
tmp_assign_source_34 = var_tmp;
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_34;
Py_INCREF( par_c );
Py_DECREF( old );
}
branch_end_11:;
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1077;
goto try_except_handler_5;
}
goto loop_start_2;
loop_end_2:;
goto try_end_6;
// Exception handler code:
try_except_handler_5:;
exception_keeper_type_8 = exception_type;
exception_keeper_value_8 = exception_value;
exception_keeper_tb_8 = exception_tb;
exception_keeper_lineno_8 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_8;
exception_value = exception_keeper_value_8;
exception_tb = exception_keeper_tb_8;
exception_lineno = exception_keeper_lineno_8;
goto frame_exception_exit_1;
// End of try:
try_end_6:;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
tmp_source_name_15 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_15 == NULL ))
{
tmp_source_name_15 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_15 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1094;
goto frame_exception_exit_1;
}
tmp_called_name_8 = LOOKUP_ATTRIBUTE( tmp_source_name_15, const_str_plain_rollaxis );
if ( tmp_called_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1094;
goto frame_exception_exit_1;
}
tmp_args_element_name_8 = par_c;
if ( tmp_args_element_name_8 == NULL )
{
Py_DECREF( tmp_called_name_8 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1094;
goto frame_exception_exit_1;
}
tmp_args_element_name_9 = const_int_0;
tmp_left_name_25 = var_iaxis;
tmp_right_name_25 = const_int_pos_1;
tmp_args_element_name_10 = BINARY_OPERATION_ADD( tmp_left_name_25, tmp_right_name_25 );
if ( tmp_args_element_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_8 );
exception_lineno = 1094;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1094;
{
PyObject *call_args[] = { tmp_args_element_name_8, tmp_args_element_name_9, tmp_args_element_name_10 };
tmp_assign_source_35 = CALL_FUNCTION_WITH_ARGS3( tmp_called_name_8, call_args );
}
Py_DECREF( tmp_called_name_8 );
Py_DECREF( tmp_args_element_name_10 );
if ( tmp_assign_source_35 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1094;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
par_c = tmp_assign_source_35;
Py_XDECREF( old );
}
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( par_m )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_m,
par_m
);
assert( res == 0 );
}
if ( par_k )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_k,
par_k
);
assert( res == 0 );
}
if ( par_lbnd )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_lbnd,
par_lbnd
);
assert( res == 0 );
}
if ( par_scl )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_scl,
par_scl
);
assert( res == 0 );
}
if ( par_axis )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_axis,
par_axis
);
assert( res == 0 );
}
if ( var_t )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_t,
var_t
);
assert( res == 0 );
}
if ( var_cnt )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_cnt,
var_cnt
);
assert( res == 0 );
}
if ( var_iaxis )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_iaxis,
var_iaxis
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_tmp )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_tmp,
var_tmp
);
assert( res == 0 );
}
if ( var_j )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_j,
var_j
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_18_chebint );
return NULL;
// Return handler code:
try_return_handler_1:;
Py_XDECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_m );
Py_DECREF( par_m );
par_m = NULL;
Py_XDECREF( par_k );
par_k = NULL;
CHECK_OBJECT( (PyObject *)par_lbnd );
Py_DECREF( par_lbnd );
par_lbnd = NULL;
CHECK_OBJECT( (PyObject *)par_scl );
Py_DECREF( par_scl );
par_scl = NULL;
CHECK_OBJECT( (PyObject *)par_axis );
Py_DECREF( par_axis );
par_axis = NULL;
Py_XDECREF( var_t );
var_t = NULL;
CHECK_OBJECT( (PyObject *)var_cnt );
Py_DECREF( var_cnt );
var_cnt = NULL;
CHECK_OBJECT( (PyObject *)var_iaxis );
Py_DECREF( var_iaxis );
var_iaxis = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
Py_XDECREF( var_j );
var_j = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_9 = exception_type;
exception_keeper_value_9 = exception_value;
exception_keeper_tb_9 = exception_tb;
exception_keeper_lineno_9 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_m );
Py_DECREF( par_m );
par_m = NULL;
Py_XDECREF( par_k );
par_k = NULL;
CHECK_OBJECT( (PyObject *)par_lbnd );
Py_DECREF( par_lbnd );
par_lbnd = NULL;
CHECK_OBJECT( (PyObject *)par_scl );
Py_DECREF( par_scl );
par_scl = NULL;
CHECK_OBJECT( (PyObject *)par_axis );
Py_DECREF( par_axis );
par_axis = NULL;
Py_XDECREF( var_t );
var_t = NULL;
Py_XDECREF( var_cnt );
var_cnt = NULL;
Py_XDECREF( var_iaxis );
var_iaxis = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
Py_XDECREF( var_j );
var_j = NULL;
// Re-raise.
exception_type = exception_keeper_type_9;
exception_value = exception_keeper_value_9;
exception_tb = exception_keeper_tb_9;
exception_lineno = exception_keeper_lineno_9;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_18_chebint );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_19_chebval( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_c = python_pars[ 1 ];
PyObject *par_tensor = python_pars[ 2 ];
PyObject *var_c0 = NULL;
PyObject *var_c1 = NULL;
PyObject *var_x2 = NULL;
PyObject *var_i = NULL;
PyObject *var_tmp = NULL;
PyObject *tmp_for_loop_1__for_iterator = NULL;
PyObject *tmp_for_loop_1__iter_value = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
int tmp_and_left_truth_1;
PyObject *tmp_and_left_value_1;
PyObject *tmp_and_right_value_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
int tmp_cmp_Eq_1;
int tmp_cmp_Eq_2;
int tmp_cmp_In_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_left_3;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compare_right_3;
int tmp_cond_truth_1;
PyObject *tmp_cond_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_isinstance_cls_1;
PyObject *tmp_isinstance_cls_2;
PyObject *tmp_isinstance_inst_1;
PyObject *tmp_isinstance_inst_2;
PyObject *tmp_iter_arg_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_left_name_9;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_len_arg_3;
PyObject *tmp_next_source_1;
PyObject *tmp_operand_name_1;
PyObject *tmp_range2_high_1;
PyObject *tmp_range2_low_1;
int tmp_res;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_right_name_9;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_source_name_6;
PyObject *tmp_source_name_7;
PyObject *tmp_source_name_8;
PyObject *tmp_source_name_9;
PyObject *tmp_source_name_10;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscribed_name_4;
PyObject *tmp_subscribed_name_5;
PyObject *tmp_subscribed_name_6;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_subscript_name_4;
PyObject *tmp_subscript_name_5;
PyObject *tmp_subscript_name_6;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_0748bfa3c3d7914246a3d01d0bbd12ff, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1160;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1160;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = par_c;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_8c0923655000b74dc494a1a4f40853b5 );
frame_function->f_lineno = 1160;
tmp_assign_source_1 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1160;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_1;
Py_DECREF( old );
}
tmp_source_name_3 = par_c;
tmp_source_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_source_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1161;
goto frame_exception_exit_1;
}
tmp_compare_left_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_char );
Py_DECREF( tmp_source_name_2 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1161;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_str_digest_6e06792ac9d1e948515e79b21ef14ea6;
tmp_cmp_In_1 = PySequence_Contains( tmp_compare_right_1, tmp_compare_left_1 );
assert( !(tmp_cmp_In_1 == -1) );
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_In_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_source_name_4 = par_c;
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_astype );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1162;
goto frame_exception_exit_1;
}
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_5 == NULL )
{
Py_DECREF( tmp_called_name_2 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1162;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_double );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
exception_lineno = 1162;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1162;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1162;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_2;
Py_DECREF( old );
}
branch_no_1:;
tmp_isinstance_inst_1 = par_x;
tmp_isinstance_cls_1 = PyTuple_New( 2 );
tmp_tuple_element_2 = LOOKUP_BUILTIN( const_str_plain_tuple );
assert( tmp_tuple_element_2 != NULL );
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_isinstance_cls_1, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = LOOKUP_BUILTIN( const_str_plain_list );
assert( tmp_tuple_element_2 != NULL );
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_isinstance_cls_1, 1, tmp_tuple_element_2 );
tmp_res = Nuitka_IsInstance( tmp_isinstance_inst_1, tmp_isinstance_cls_1 );
Py_DECREF( tmp_isinstance_cls_1 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1163;
goto frame_exception_exit_1;
}
if ( tmp_res == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_source_name_6 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_6 == NULL ))
{
tmp_source_name_6 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_6 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1164;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_6, const_str_plain_asarray );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1164;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = par_x;
frame_function->f_lineno = 1164;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_assign_source_3 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1164;
goto frame_exception_exit_1;
}
{
PyObject *old = par_x;
assert( old != NULL );
par_x = tmp_assign_source_3;
Py_DECREF( old );
}
branch_no_2:;
tmp_isinstance_inst_2 = par_x;
tmp_source_name_7 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_7 == NULL ))
{
tmp_source_name_7 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_7 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1165;
goto frame_exception_exit_1;
}
tmp_isinstance_cls_2 = LOOKUP_ATTRIBUTE( tmp_source_name_7, const_str_plain_ndarray );
if ( tmp_isinstance_cls_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1165;
goto frame_exception_exit_1;
}
tmp_and_left_value_1 = BUILTIN_ISINSTANCE( tmp_isinstance_inst_2, tmp_isinstance_cls_2 );
Py_DECREF( tmp_isinstance_cls_2 );
if ( tmp_and_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1165;
goto frame_exception_exit_1;
}
tmp_and_left_truth_1 = CHECK_IF_TRUE( tmp_and_left_value_1 );
if ( tmp_and_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1165;
goto frame_exception_exit_1;
}
if ( tmp_and_left_truth_1 == 1 )
{
goto and_right_1;
}
else
{
goto and_left_1;
}
and_right_1:;
tmp_and_right_value_1 = par_tensor;
tmp_cond_value_1 = tmp_and_right_value_1;
goto and_end_1;
and_left_1:;
tmp_cond_value_1 = tmp_and_left_value_1;
and_end_1:;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1165;
goto frame_exception_exit_1;
}
if ( tmp_cond_truth_1 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_source_name_8 = par_c;
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_8, const_str_plain_reshape );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1166;
goto frame_exception_exit_1;
}
tmp_source_name_9 = par_c;
tmp_left_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_9, const_str_plain_shape );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
exception_lineno = 1166;
goto frame_exception_exit_1;
}
tmp_left_name_2 = const_tuple_int_pos_1_tuple;
tmp_source_name_10 = par_x;
tmp_right_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_10, const_str_plain_ndim );
if ( tmp_right_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_left_name_1 );
exception_lineno = 1166;
goto frame_exception_exit_1;
}
tmp_right_name_1 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_right_name_2 );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_left_name_1 );
exception_lineno = 1166;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
Py_DECREF( tmp_right_name_1 );
if ( tmp_args_element_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
exception_lineno = 1166;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1166;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_assign_source_4 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_4, call_args );
}
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_args_element_name_3 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1166;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_4;
Py_DECREF( old );
}
branch_no_3:;
tmp_len_arg_1 = par_c;
if ( tmp_len_arg_1 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1168;
goto frame_exception_exit_1;
}
tmp_compare_left_2 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1168;
goto frame_exception_exit_1;
}
tmp_compare_right_2 = const_int_pos_1;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_2 );
exception_lineno = 1168;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_2 );
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_4;
}
else
{
goto branch_no_4;
}
branch_yes_4:;
tmp_subscribed_name_1 = par_c;
if ( tmp_subscribed_name_1 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1169;
goto frame_exception_exit_1;
}
tmp_subscript_name_1 = const_int_0;
tmp_assign_source_5 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1169;
goto frame_exception_exit_1;
}
assert( var_c0 == NULL );
var_c0 = tmp_assign_source_5;
tmp_assign_source_6 = const_int_0;
assert( var_c1 == NULL );
Py_INCREF( tmp_assign_source_6 );
var_c1 = tmp_assign_source_6;
goto branch_end_4;
branch_no_4:;
tmp_len_arg_2 = par_c;
if ( tmp_len_arg_2 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1171;
goto frame_exception_exit_1;
}
tmp_compare_left_3 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_compare_left_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1171;
goto frame_exception_exit_1;
}
tmp_compare_right_3 = const_int_pos_2;
tmp_cmp_Eq_2 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_3, tmp_compare_right_3 );
if ( tmp_cmp_Eq_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_3 );
exception_lineno = 1171;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_3 );
if ( tmp_cmp_Eq_2 == 1 )
{
goto branch_yes_5;
}
else
{
goto branch_no_5;
}
branch_yes_5:;
tmp_subscribed_name_2 = par_c;
if ( tmp_subscribed_name_2 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1172;
goto frame_exception_exit_1;
}
tmp_subscript_name_2 = const_int_0;
tmp_assign_source_7 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1172;
goto frame_exception_exit_1;
}
assert( var_c0 == NULL );
var_c0 = tmp_assign_source_7;
tmp_subscribed_name_3 = par_c;
if ( tmp_subscribed_name_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1173;
goto frame_exception_exit_1;
}
tmp_subscript_name_3 = const_int_pos_1;
tmp_assign_source_8 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1173;
goto frame_exception_exit_1;
}
assert( var_c1 == NULL );
var_c1 = tmp_assign_source_8;
goto branch_end_5;
branch_no_5:;
tmp_left_name_3 = const_int_pos_2;
tmp_right_name_3 = par_x;
tmp_assign_source_9 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_3 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1175;
goto frame_exception_exit_1;
}
assert( var_x2 == NULL );
var_x2 = tmp_assign_source_9;
tmp_subscribed_name_4 = par_c;
if ( tmp_subscribed_name_4 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1176;
goto frame_exception_exit_1;
}
tmp_subscript_name_4 = const_int_neg_2;
tmp_assign_source_10 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_4, tmp_subscript_name_4 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1176;
goto frame_exception_exit_1;
}
assert( var_c0 == NULL );
var_c0 = tmp_assign_source_10;
tmp_subscribed_name_5 = par_c;
if ( tmp_subscribed_name_5 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1177;
goto frame_exception_exit_1;
}
tmp_subscript_name_5 = const_int_neg_1;
tmp_assign_source_11 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_5, tmp_subscript_name_5 );
if ( tmp_assign_source_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1177;
goto frame_exception_exit_1;
}
assert( var_c1 == NULL );
var_c1 = tmp_assign_source_11;
tmp_range2_low_1 = const_int_pos_3;
tmp_len_arg_3 = par_c;
if ( tmp_len_arg_3 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1178;
goto frame_exception_exit_1;
}
tmp_left_name_4 = BUILTIN_LEN( tmp_len_arg_3 );
if ( tmp_left_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1178;
goto frame_exception_exit_1;
}
tmp_right_name_4 = const_int_pos_1;
tmp_range2_high_1 = BINARY_OPERATION_ADD( tmp_left_name_4, tmp_right_name_4 );
Py_DECREF( tmp_left_name_4 );
if ( tmp_range2_high_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1178;
goto frame_exception_exit_1;
}
tmp_iter_arg_1 = BUILTIN_RANGE2( tmp_range2_low_1, tmp_range2_high_1 );
Py_DECREF( tmp_range2_high_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1178;
goto frame_exception_exit_1;
}
tmp_assign_source_12 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1178;
goto frame_exception_exit_1;
}
assert( tmp_for_loop_1__for_iterator == NULL );
tmp_for_loop_1__for_iterator = tmp_assign_source_12;
// Tried code:
loop_start_1:;
tmp_next_source_1 = tmp_for_loop_1__for_iterator;
tmp_assign_source_13 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_13 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 1178;
goto try_except_handler_2;
}
}
{
PyObject *old = tmp_for_loop_1__iter_value;
tmp_for_loop_1__iter_value = tmp_assign_source_13;
Py_XDECREF( old );
}
tmp_assign_source_14 = tmp_for_loop_1__iter_value;
{
PyObject *old = var_i;
var_i = tmp_assign_source_14;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_assign_source_15 = var_c0;
if ( tmp_assign_source_15 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c0" );
exception_tb = NULL;
exception_lineno = 1179;
goto try_except_handler_2;
}
{
PyObject *old = var_tmp;
var_tmp = tmp_assign_source_15;
Py_INCREF( var_tmp );
Py_XDECREF( old );
}
tmp_subscribed_name_6 = par_c;
if ( tmp_subscribed_name_6 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c" );
exception_tb = NULL;
exception_lineno = 1180;
goto try_except_handler_2;
}
tmp_operand_name_1 = var_i;
tmp_subscript_name_6 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
if ( tmp_subscript_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1180;
goto try_except_handler_2;
}
tmp_left_name_5 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_6, tmp_subscript_name_6 );
Py_DECREF( tmp_subscript_name_6 );
if ( tmp_left_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1180;
goto try_except_handler_2;
}
tmp_right_name_5 = var_c1;
if ( tmp_right_name_5 == NULL )
{
Py_DECREF( tmp_left_name_5 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c1" );
exception_tb = NULL;
exception_lineno = 1180;
goto try_except_handler_2;
}
tmp_assign_source_16 = BINARY_OPERATION_SUB( tmp_left_name_5, tmp_right_name_5 );
Py_DECREF( tmp_left_name_5 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1180;
goto try_except_handler_2;
}
{
PyObject *old = var_c0;
var_c0 = tmp_assign_source_16;
Py_XDECREF( old );
}
tmp_left_name_6 = var_tmp;
tmp_left_name_7 = var_c1;
if ( tmp_left_name_7 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c1" );
exception_tb = NULL;
exception_lineno = 1181;
goto try_except_handler_2;
}
tmp_right_name_7 = var_x2;
tmp_right_name_6 = BINARY_OPERATION_MUL( tmp_left_name_7, tmp_right_name_7 );
if ( tmp_right_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1181;
goto try_except_handler_2;
}
tmp_assign_source_17 = BINARY_OPERATION_ADD( tmp_left_name_6, tmp_right_name_6 );
Py_DECREF( tmp_right_name_6 );
if ( tmp_assign_source_17 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1181;
goto try_except_handler_2;
}
{
PyObject *old = var_c1;
var_c1 = tmp_assign_source_17;
Py_XDECREF( old );
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1178;
goto try_except_handler_2;
}
goto loop_start_1;
loop_end_1:;
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
branch_end_5:;
branch_end_4:;
tmp_left_name_8 = var_c0;
if ( tmp_left_name_8 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c0" );
exception_tb = NULL;
exception_lineno = 1182;
goto frame_exception_exit_1;
}
tmp_left_name_9 = var_c1;
if ( tmp_left_name_9 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "local variable '%s' referenced before assignment", "c1" );
exception_tb = NULL;
exception_lineno = 1182;
goto frame_exception_exit_1;
}
tmp_right_name_9 = par_x;
tmp_right_name_8 = BINARY_OPERATION_MUL( tmp_left_name_9, tmp_right_name_9 );
if ( tmp_right_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1182;
goto frame_exception_exit_1;
}
tmp_return_value = BINARY_OPERATION_ADD( tmp_left_name_8, tmp_right_name_8 );
Py_DECREF( tmp_right_name_8 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1182;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( par_tensor )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_tensor,
par_tensor
);
assert( res == 0 );
}
if ( var_c0 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c0,
var_c0
);
assert( res == 0 );
}
if ( var_c1 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c1,
var_c1
);
assert( res == 0 );
}
if ( var_x2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x2,
var_x2
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
if ( var_tmp )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_tmp,
var_tmp
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_19_chebval );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
Py_XDECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_tensor );
Py_DECREF( par_tensor );
par_tensor = NULL;
Py_XDECREF( var_c0 );
var_c0 = NULL;
Py_XDECREF( var_c1 );
var_c1 = NULL;
Py_XDECREF( var_x2 );
var_x2 = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( par_x );
par_x = NULL;
Py_XDECREF( par_c );
par_c = NULL;
CHECK_OBJECT( (PyObject *)par_tensor );
Py_DECREF( par_tensor );
par_tensor = NULL;
Py_XDECREF( var_c0 );
var_c0 = NULL;
Py_XDECREF( var_c1 );
var_c1 = NULL;
Py_XDECREF( var_x2 );
var_x2 = NULL;
Py_XDECREF( var_i );
var_i = NULL;
Py_XDECREF( var_tmp );
var_tmp = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_19_chebval );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_20_chebval2d( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_y = python_pars[ 1 ];
PyObject *par_c = python_pars[ 2 ];
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_name_1;
PyObject *tmp_args_name_2;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_kw_name_2;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_b6d606b188c155ee8279f00fe663ec4b, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1232;
goto try_except_handler_3;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1232;
goto try_except_handler_3;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = PyTuple_New( 2 );
tmp_tuple_element_2 = par_x;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_y;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 1, tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_5c9928d3d4adf8d21e4940309b7f60ed );
frame_function->f_lineno = 1232;
tmp_iter_arg_1 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1232;
goto try_except_handler_3;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1232;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1232;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_3 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_3 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1232;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_3;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
goto try_end_1;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto try_except_handler_2;
// End of try:
try_end_1:;
goto try_end_2;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
// Preserve existing published exception.
PRESERVE_FRAME_EXCEPTION( frame_function );
if ( exception_keeper_tb_2 == NULL )
{
exception_keeper_tb_2 = MAKE_TRACEBACK( frame_function, exception_keeper_lineno_2 );
}
else if ( exception_keeper_lineno_2 != -1 )
{
exception_keeper_tb_2 = ADD_TRACEBACK( exception_keeper_tb_2, frame_function, exception_keeper_lineno_2 );
}
NORMALIZE_EXCEPTION( &exception_keeper_type_2, &exception_keeper_value_2, &exception_keeper_tb_2 );
PUBLISH_EXCEPTION( &exception_keeper_type_2, &exception_keeper_value_2, &exception_keeper_tb_2 );
tmp_make_exception_arg_1 = const_str_digest_88ea85868dacccabad48a8aef44c097b;
frame_function->f_lineno = 1234;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1234;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
// End of try:
try_end_2:;
tmp_assign_source_4 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_x;
assert( old != NULL );
par_x = tmp_assign_source_4;
Py_INCREF( par_x );
Py_DECREF( old );
}
tmp_assign_source_5 = tmp_tuple_unpack_1__element_2;
{
PyObject *old = par_y;
assert( old != NULL );
par_y = tmp_assign_source_5;
Py_INCREF( par_y );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1236;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_x;
tmp_args_element_name_2 = par_c;
frame_function->f_lineno = 1236;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_assign_source_6 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1236;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_6;
Py_DECREF( old );
}
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1237;
goto frame_exception_exit_1;
}
tmp_args_name_2 = PyTuple_New( 2 );
tmp_tuple_element_3 = par_y;
Py_INCREF( tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_args_name_2, 0, tmp_tuple_element_3 );
tmp_tuple_element_3 = par_c;
Py_INCREF( tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_args_name_2, 1, tmp_tuple_element_3 );
tmp_kw_name_2 = PyDict_Copy( const_dict_d61f4d385fe121badbdc8e4bc7fe576f );
frame_function->f_lineno = 1237;
tmp_assign_source_7 = CALL_FUNCTION( tmp_called_name_3, tmp_args_name_2, tmp_kw_name_2 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1237;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_7;
Py_DECREF( old );
}
#if 1
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 1
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_y )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_y,
par_y
);
assert( res == 0 );
}
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_20_chebval2d );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_20_chebval2d );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_21_chebgrid2d( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_y = python_pars[ 1 ];
PyObject *par_c = python_pars[ 2 ];
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_frame_locals;
PyObject *tmp_return_value;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_7c8569bee2299d0f91164c60e0652559, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_called_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_1 == NULL ))
{
tmp_called_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1291;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_x;
tmp_args_element_name_2 = par_c;
frame_function->f_lineno = 1291;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_assign_source_1 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_1, call_args );
}
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1291;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_1;
Py_DECREF( old );
}
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1292;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_y;
tmp_args_element_name_4 = par_c;
frame_function->f_lineno = 1292;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1292;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_2;
Py_DECREF( old );
}
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_y )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_y,
par_y
);
assert( res == 0 );
}
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_21_chebgrid2d );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_21_chebgrid2d );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_22_chebval3d( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_y = python_pars[ 1 ];
PyObject *par_z = python_pars[ 2 ];
PyObject *par_c = python_pars[ 3 ];
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_tuple_unpack_1__element_3 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_name_1;
PyObject *tmp_args_name_2;
PyObject *tmp_args_name_3;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_kw_name_2;
PyObject *tmp_kw_name_3;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
PyObject *tmp_tuple_element_4;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
PyObject *tmp_unpack_3;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_7962b09788fcf5188ca5da0c5eba41ef, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1345;
goto try_except_handler_3;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1345;
goto try_except_handler_3;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = PyTuple_New( 3 );
tmp_tuple_element_2 = par_x;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_y;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 1, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_z;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 2, tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_5c9928d3d4adf8d21e4940309b7f60ed );
frame_function->f_lineno = 1345;
tmp_iter_arg_1 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1345;
goto try_except_handler_3;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1345;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1345;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_3 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_3 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1345;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_3;
tmp_unpack_3 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_4 = UNPACK_NEXT( tmp_unpack_3, 2 );
if ( tmp_assign_source_4 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1345;
goto try_except_handler_3;
}
assert( tmp_tuple_unpack_1__element_3 == NULL );
tmp_tuple_unpack_1__element_3 = tmp_assign_source_4;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 3)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_3;
}
goto try_end_1;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_3 );
tmp_tuple_unpack_1__element_3 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto try_except_handler_2;
// End of try:
try_end_1:;
goto try_end_2;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
// Preserve existing published exception.
PRESERVE_FRAME_EXCEPTION( frame_function );
if ( exception_keeper_tb_2 == NULL )
{
exception_keeper_tb_2 = MAKE_TRACEBACK( frame_function, exception_keeper_lineno_2 );
}
else if ( exception_keeper_lineno_2 != -1 )
{
exception_keeper_tb_2 = ADD_TRACEBACK( exception_keeper_tb_2, frame_function, exception_keeper_lineno_2 );
}
NORMALIZE_EXCEPTION( &exception_keeper_type_2, &exception_keeper_value_2, &exception_keeper_tb_2 );
PUBLISH_EXCEPTION( &exception_keeper_type_2, &exception_keeper_value_2, &exception_keeper_tb_2 );
tmp_make_exception_arg_1 = const_str_digest_13227f847c5a19dd9cedee16debb959e;
frame_function->f_lineno = 1347;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1347;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
// End of try:
try_end_2:;
tmp_assign_source_5 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_x;
assert( old != NULL );
par_x = tmp_assign_source_5;
Py_INCREF( par_x );
Py_DECREF( old );
}
tmp_assign_source_6 = tmp_tuple_unpack_1__element_2;
{
PyObject *old = par_y;
assert( old != NULL );
par_y = tmp_assign_source_6;
Py_INCREF( par_y );
Py_DECREF( old );
}
tmp_assign_source_7 = tmp_tuple_unpack_1__element_3;
{
PyObject *old = par_z;
assert( old != NULL );
par_z = tmp_assign_source_7;
Py_INCREF( par_z );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_3 );
Py_DECREF( tmp_tuple_unpack_1__element_3 );
tmp_tuple_unpack_1__element_3 = NULL;
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1349;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_x;
tmp_args_element_name_2 = par_c;
frame_function->f_lineno = 1349;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_assign_source_8 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1349;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_8;
Py_DECREF( old );
}
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1350;
goto frame_exception_exit_1;
}
tmp_args_name_2 = PyTuple_New( 2 );
tmp_tuple_element_3 = par_y;
Py_INCREF( tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_args_name_2, 0, tmp_tuple_element_3 );
tmp_tuple_element_3 = par_c;
Py_INCREF( tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_args_name_2, 1, tmp_tuple_element_3 );
tmp_kw_name_2 = PyDict_Copy( const_dict_d61f4d385fe121badbdc8e4bc7fe576f );
frame_function->f_lineno = 1350;
tmp_assign_source_9 = CALL_FUNCTION( tmp_called_name_3, tmp_args_name_2, tmp_kw_name_2 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1350;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_9;
Py_DECREF( old );
}
tmp_called_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_4 == NULL ))
{
tmp_called_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1351;
goto frame_exception_exit_1;
}
tmp_args_name_3 = PyTuple_New( 2 );
tmp_tuple_element_4 = par_z;
Py_INCREF( tmp_tuple_element_4 );
PyTuple_SET_ITEM( tmp_args_name_3, 0, tmp_tuple_element_4 );
tmp_tuple_element_4 = par_c;
Py_INCREF( tmp_tuple_element_4 );
PyTuple_SET_ITEM( tmp_args_name_3, 1, tmp_tuple_element_4 );
tmp_kw_name_3 = PyDict_Copy( const_dict_d61f4d385fe121badbdc8e4bc7fe576f );
frame_function->f_lineno = 1351;
tmp_assign_source_10 = CALL_FUNCTION( tmp_called_name_4, tmp_args_name_3, tmp_kw_name_3 );
Py_DECREF( tmp_args_name_3 );
Py_DECREF( tmp_kw_name_3 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1351;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_10;
Py_DECREF( old );
}
#if 1
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 1
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_y )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_y,
par_y
);
assert( res == 0 );
}
if ( par_z )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z,
par_z
);
assert( res == 0 );
}
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_22_chebval3d );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_z );
Py_DECREF( par_z );
par_z = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_z );
Py_DECREF( par_z );
par_z = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_22_chebval3d );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_23_chebgrid3d( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_y = python_pars[ 1 ];
PyObject *par_z = python_pars[ 2 ];
PyObject *par_c = python_pars[ 3 ];
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_frame_locals;
PyObject *tmp_return_value;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_528155342008e407dab9d4317e672fcc, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_called_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_1 == NULL ))
{
tmp_called_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1408;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_x;
tmp_args_element_name_2 = par_c;
frame_function->f_lineno = 1408;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_assign_source_1 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_1, call_args );
}
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1408;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_1;
Py_DECREF( old );
}
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1409;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_y;
tmp_args_element_name_4 = par_c;
frame_function->f_lineno = 1409;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1409;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_2;
Py_DECREF( old );
}
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 1410;
goto frame_exception_exit_1;
}
tmp_args_element_name_5 = par_z;
tmp_args_element_name_6 = par_c;
frame_function->f_lineno = 1410;
{
PyObject *call_args[] = { tmp_args_element_name_5, tmp_args_element_name_6 };
tmp_assign_source_3 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_3, call_args );
}
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1410;
goto frame_exception_exit_1;
}
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_3;
Py_DECREF( old );
}
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_y )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_y,
par_y
);
assert( res == 0 );
}
if ( par_z )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z,
par_z
);
assert( res == 0 );
}
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = par_c;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_23_chebgrid3d );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_z );
Py_DECREF( par_z );
par_z = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_z );
Py_DECREF( par_z );
par_z = NULL;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_23_chebgrid3d );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_24_chebvander( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_deg = python_pars[ 1 ];
PyObject *var_ideg = NULL;
PyObject *var_dims = NULL;
PyObject *var_dtyp = NULL;
PyObject *var_v = NULL;
PyObject *var_x2 = NULL;
PyObject *var_i = NULL;
PyObject *tmp_for_loop_1__for_iterator = NULL;
PyObject *tmp_for_loop_1__iter_value = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_name_1;
PyObject *tmp_args_name_2;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscribed_2;
PyObject *tmp_ass_subscribed_3;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subscript_2;
PyObject *tmp_ass_subscript_3;
int tmp_ass_subscript_res_1;
int tmp_ass_subscript_res_2;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_ass_subvalue_2;
PyObject *tmp_ass_subvalue_3;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
int tmp_cmp_Gt_1;
int tmp_cmp_Lt_1;
int tmp_cmp_NotEq_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_left_3;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compare_right_3;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_iter_arg_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_kw_name_2;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_left_name_9;
PyObject *tmp_left_name_10;
PyObject *tmp_left_name_11;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_make_exception_arg_2;
PyObject *tmp_next_source_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_raise_type_2;
PyObject *tmp_range2_high_1;
PyObject *tmp_range2_low_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_right_name_9;
PyObject *tmp_right_name_10;
PyObject *tmp_right_name_11;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_source_name_6;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_646a43fada7fcea4eabeb7c5463160c6, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_int_arg_1 = par_deg;
tmp_assign_source_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1449;
goto frame_exception_exit_1;
}
assert( var_ideg == NULL );
var_ideg = tmp_assign_source_1;
tmp_compare_left_1 = var_ideg;
tmp_compare_right_1 = par_deg;
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1450;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_bdb9c499ede16dacf39d6b78c1ed0d5e;
frame_function->f_lineno = 1451;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1451;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
tmp_compare_left_2 = var_ideg;
tmp_compare_right_2 = const_int_0;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1452;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_make_exception_arg_2 = const_str_digest_ea8c65b23281db7ee7660696e61ab360;
frame_function->f_lineno = 1453;
{
PyObject *call_args[] = { tmp_make_exception_arg_2 };
tmp_raise_type_2 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_2 != NULL );
exception_type = tmp_raise_type_2;
exception_lineno = 1453;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_2:;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1455;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1455;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = par_x;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_1eef64507cf3de8ea0ea857c5e7e1090 );
frame_function->f_lineno = 1455;
tmp_left_name_1 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1455;
goto frame_exception_exit_1;
}
tmp_right_name_1 = const_float_0_0;
tmp_assign_source_2 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1455;
goto frame_exception_exit_1;
}
{
PyObject *old = par_x;
assert( old != NULL );
par_x = tmp_assign_source_2;
Py_DECREF( old );
}
tmp_left_name_2 = PyTuple_New( 1 );
tmp_left_name_3 = var_ideg;
tmp_right_name_2 = const_int_pos_1;
tmp_tuple_element_2 = BINARY_OPERATION_ADD( tmp_left_name_3, tmp_right_name_2 );
if ( tmp_tuple_element_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1456;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_left_name_2, 0, tmp_tuple_element_2 );
tmp_source_name_2 = par_x;
tmp_right_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_shape );
if ( tmp_right_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1456;
goto frame_exception_exit_1;
}
tmp_assign_source_3 = BINARY_OPERATION_ADD( tmp_left_name_2, tmp_right_name_3 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_right_name_3 );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1456;
goto frame_exception_exit_1;
}
assert( var_dims == NULL );
var_dims = tmp_assign_source_3;
tmp_source_name_3 = par_x;
tmp_assign_source_4 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1457;
goto frame_exception_exit_1;
}
assert( var_dtyp == NULL );
var_dtyp = tmp_assign_source_4;
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1458;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_empty );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1458;
goto frame_exception_exit_1;
}
tmp_args_name_2 = PyTuple_New( 1 );
tmp_tuple_element_3 = var_dims;
Py_INCREF( tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_args_name_2, 0, tmp_tuple_element_3 );
tmp_kw_name_2 = _PyDict_NewPresized( 1 );
tmp_dict_value_1 = var_dtyp;
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_2, tmp_dict_key_1, tmp_dict_value_1 );
frame_function->f_lineno = 1458;
tmp_assign_source_5 = CALL_FUNCTION( tmp_called_name_2, tmp_args_name_2, tmp_kw_name_2 );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1458;
goto frame_exception_exit_1;
}
assert( var_v == NULL );
var_v = tmp_assign_source_5;
tmp_left_name_5 = par_x;
tmp_right_name_4 = const_int_0;
tmp_left_name_4 = BINARY_OPERATION_MUL( tmp_left_name_5, tmp_right_name_4 );
if ( tmp_left_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1460;
goto frame_exception_exit_1;
}
tmp_right_name_5 = const_int_pos_1;
tmp_ass_subvalue_1 = BINARY_OPERATION_ADD( tmp_left_name_4, tmp_right_name_5 );
Py_DECREF( tmp_left_name_4 );
if ( tmp_ass_subvalue_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1460;
goto frame_exception_exit_1;
}
tmp_ass_subscribed_1 = var_v;
tmp_ass_subscript_1 = const_int_0;
tmp_ass_subscript_res_1 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_1, tmp_ass_subscript_1, 0, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subvalue_1 );
if ( tmp_ass_subscript_res_1 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1460;
goto frame_exception_exit_1;
}
tmp_compare_left_3 = var_ideg;
tmp_compare_right_3 = const_int_0;
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_3, tmp_compare_right_3 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1461;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_left_name_6 = const_int_pos_2;
tmp_right_name_6 = par_x;
tmp_assign_source_6 = BINARY_OPERATION_MUL( tmp_left_name_6, tmp_right_name_6 );
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1462;
goto frame_exception_exit_1;
}
assert( var_x2 == NULL );
var_x2 = tmp_assign_source_6;
tmp_ass_subvalue_2 = par_x;
tmp_ass_subscribed_2 = var_v;
tmp_ass_subscript_2 = const_int_pos_1;
tmp_ass_subscript_res_2 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_2, tmp_ass_subscript_2, 1, tmp_ass_subvalue_2 );
if ( tmp_ass_subscript_res_2 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1463;
goto frame_exception_exit_1;
}
tmp_range2_low_1 = const_int_pos_2;
tmp_left_name_7 = var_ideg;
tmp_right_name_7 = const_int_pos_1;
tmp_range2_high_1 = BINARY_OPERATION_ADD( tmp_left_name_7, tmp_right_name_7 );
if ( tmp_range2_high_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1464;
goto frame_exception_exit_1;
}
tmp_iter_arg_1 = BUILTIN_RANGE2( tmp_range2_low_1, tmp_range2_high_1 );
Py_DECREF( tmp_range2_high_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1464;
goto frame_exception_exit_1;
}
tmp_assign_source_7 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1464;
goto frame_exception_exit_1;
}
assert( tmp_for_loop_1__for_iterator == NULL );
tmp_for_loop_1__for_iterator = tmp_assign_source_7;
// Tried code:
loop_start_1:;
tmp_next_source_1 = tmp_for_loop_1__for_iterator;
tmp_assign_source_8 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_8 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
frame_function->f_lineno = 1464;
goto try_except_handler_2;
}
}
{
PyObject *old = tmp_for_loop_1__iter_value;
tmp_for_loop_1__iter_value = tmp_assign_source_8;
Py_XDECREF( old );
}
tmp_assign_source_9 = tmp_for_loop_1__iter_value;
{
PyObject *old = var_i;
var_i = tmp_assign_source_9;
Py_INCREF( var_i );
Py_XDECREF( old );
}
tmp_subscribed_name_1 = var_v;
tmp_left_name_10 = var_i;
tmp_right_name_8 = const_int_pos_1;
tmp_subscript_name_1 = BINARY_OPERATION_SUB( tmp_left_name_10, tmp_right_name_8 );
if ( tmp_subscript_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1465;
goto try_except_handler_2;
}
tmp_left_name_9 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
Py_DECREF( tmp_subscript_name_1 );
if ( tmp_left_name_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1465;
goto try_except_handler_2;
}
tmp_right_name_9 = var_x2;
tmp_left_name_8 = BINARY_OPERATION_MUL( tmp_left_name_9, tmp_right_name_9 );
Py_DECREF( tmp_left_name_9 );
if ( tmp_left_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1465;
goto try_except_handler_2;
}
tmp_subscribed_name_2 = var_v;
tmp_left_name_11 = var_i;
tmp_right_name_11 = const_int_pos_2;
tmp_subscript_name_2 = BINARY_OPERATION_SUB( tmp_left_name_11, tmp_right_name_11 );
if ( tmp_subscript_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1465;
goto try_except_handler_2;
}
tmp_right_name_10 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
Py_DECREF( tmp_subscript_name_2 );
if ( tmp_right_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1465;
goto try_except_handler_2;
}
tmp_ass_subvalue_3 = BINARY_OPERATION_SUB( tmp_left_name_8, tmp_right_name_10 );
Py_DECREF( tmp_left_name_8 );
Py_DECREF( tmp_right_name_10 );
if ( tmp_ass_subvalue_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1465;
goto try_except_handler_2;
}
tmp_ass_subscribed_3 = var_v;
tmp_ass_subscript_3 = var_i;
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_3, tmp_ass_subscript_3, tmp_ass_subvalue_3 );
Py_DECREF( tmp_ass_subvalue_3 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1465;
goto try_except_handler_2;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1464;
goto try_except_handler_2;
}
goto loop_start_1;
loop_end_1:;
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
Py_XDECREF( tmp_for_loop_1__iter_value );
tmp_for_loop_1__iter_value = NULL;
CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
Py_DECREF( tmp_for_loop_1__for_iterator );
tmp_for_loop_1__for_iterator = NULL;
branch_no_3:;
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1466;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_rollaxis );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1466;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = var_v;
tmp_args_element_name_2 = const_int_0;
tmp_source_name_6 = var_v;
tmp_args_element_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_6, const_str_plain_ndim );
if ( tmp_args_element_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
exception_lineno = 1466;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1466;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2, tmp_args_element_name_3 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS3( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_3 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1466;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_deg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_deg,
par_deg
);
assert( res == 0 );
}
if ( var_ideg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ideg,
var_ideg
);
assert( res == 0 );
}
if ( var_dims )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_dims,
var_dims
);
assert( res == 0 );
}
if ( var_dtyp )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_dtyp,
var_dtyp
);
assert( res == 0 );
}
if ( var_v )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_v,
var_v
);
assert( res == 0 );
}
if ( var_x2 )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x2,
var_x2
);
assert( res == 0 );
}
if ( var_i )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_i,
var_i
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_24_chebvander );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
CHECK_OBJECT( (PyObject *)var_ideg );
Py_DECREF( var_ideg );
var_ideg = NULL;
CHECK_OBJECT( (PyObject *)var_dims );
Py_DECREF( var_dims );
var_dims = NULL;
CHECK_OBJECT( (PyObject *)var_dtyp );
Py_DECREF( var_dtyp );
var_dtyp = NULL;
CHECK_OBJECT( (PyObject *)var_v );
Py_DECREF( var_v );
var_v = NULL;
Py_XDECREF( var_x2 );
var_x2 = NULL;
Py_XDECREF( var_i );
var_i = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
Py_XDECREF( var_ideg );
var_ideg = NULL;
Py_XDECREF( var_dims );
var_dims = NULL;
Py_XDECREF( var_dtyp );
var_dtyp = NULL;
Py_XDECREF( var_v );
var_v = NULL;
Py_XDECREF( var_x2 );
var_x2 = NULL;
Py_XDECREF( var_i );
var_i = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_24_chebvander );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_25_chebvander2d( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_y = python_pars[ 1 ];
PyObject *par_deg = python_pars[ 2 ];
PyObject *var_d = NULL;
PyObject *var_ideg = NULL;
PyObject *var_id = NULL;
PyObject *var_is_valid = NULL;
PyObject *var_degx = NULL;
PyObject *var_degy = NULL;
PyObject *var_vx = NULL;
PyObject *var_vy = NULL;
PyObject *var_v = NULL;
PyObject *tmp_list_contraction_1__$0 = NULL;
PyObject *tmp_list_contraction_1__contraction_result = NULL;
PyObject *tmp_list_contraction_1__iter_value_0 = NULL;
PyObject *tmp_list_contraction_2__$0 = NULL;
PyObject *tmp_list_contraction_2__contraction_result = NULL;
PyObject *tmp_list_contraction_2__iter_value_0 = NULL;
PyObject *tmp_list_contraction$tuple_unpack_1__source_iter = NULL;
PyObject *tmp_list_contraction$tuple_unpack_1__element_1 = NULL;
PyObject *tmp_list_contraction$tuple_unpack_1__element_2 = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_tuple_unpack_2__source_iter = NULL;
PyObject *tmp_tuple_unpack_2__element_1 = NULL;
PyObject *tmp_tuple_unpack_2__element_2 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *exception_keeper_type_5;
PyObject *exception_keeper_value_5;
PyTracebackObject *exception_keeper_tb_5;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5;
PyObject *exception_keeper_type_6;
PyObject *exception_keeper_value_6;
PyTracebackObject *exception_keeper_tb_6;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_6;
int tmp_and_left_truth_1;
PyObject *tmp_and_left_value_1;
PyObject *tmp_and_right_value_1;
PyObject *tmp_append_list_1;
PyObject *tmp_append_list_2;
PyObject *tmp_append_value_1;
PyObject *tmp_append_value_2;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_assign_source_22;
PyObject *tmp_assign_source_23;
PyObject *tmp_assign_source_24;
PyObject *tmp_assign_source_25;
PyObject *tmp_assign_source_26;
PyObject *tmp_assign_source_27;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
int tmp_cmp_NotEq_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iter_arg_3;
PyObject *tmp_iter_arg_4;
PyObject *tmp_iter_arg_5;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_iterator_name_2;
PyObject *tmp_iterator_name_3;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_next_source_1;
PyObject *tmp_next_source_2;
PyObject *tmp_outline_return_value_1;
PyObject *tmp_outline_return_value_2;
PyObject *tmp_raise_type_1;
int tmp_res;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
Py_ssize_t tmp_slice_index_upper_1;
PyObject *tmp_slice_source_1;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
PyObject *tmp_unpack_3;
PyObject *tmp_unpack_4;
PyObject *tmp_unpack_5;
PyObject *tmp_unpack_6;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
tmp_outline_return_value_1 = NULL;
tmp_outline_return_value_2 = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_b18cf6202ddae6fff5513d44cb983db0, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_iter_arg_1 = par_deg;
tmp_assign_source_2 = MAKE_ITERATOR( tmp_iter_arg_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1519;
goto try_except_handler_2;
}
assert( tmp_list_contraction_1__$0 == NULL );
tmp_list_contraction_1__$0 = tmp_assign_source_2;
tmp_assign_source_3 = PyList_New( 0 );
assert( tmp_list_contraction_1__contraction_result == NULL );
tmp_list_contraction_1__contraction_result = tmp_assign_source_3;
loop_start_1:;
tmp_next_source_1 = tmp_list_contraction_1__$0;
tmp_assign_source_4 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_4 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 1519;
goto try_except_handler_2;
}
}
{
PyObject *old = tmp_list_contraction_1__iter_value_0;
tmp_list_contraction_1__iter_value_0 = tmp_assign_source_4;
Py_XDECREF( old );
}
tmp_assign_source_5 = tmp_list_contraction_1__iter_value_0;
{
PyObject *old = var_d;
var_d = tmp_assign_source_5;
Py_INCREF( var_d );
Py_XDECREF( old );
}
tmp_append_list_1 = tmp_list_contraction_1__contraction_result;
tmp_int_arg_1 = var_d;
tmp_append_value_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_append_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1519;
goto try_except_handler_2;
}
assert( PyList_Check( tmp_append_list_1 ) );
tmp_res = PyList_Append( tmp_append_list_1, tmp_append_value_1 );
Py_DECREF( tmp_append_value_1 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1519;
goto try_except_handler_2;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1519;
goto try_except_handler_2;
}
goto loop_start_1;
loop_end_1:;
tmp_outline_return_value_1 = tmp_list_contraction_1__contraction_result;
Py_INCREF( tmp_outline_return_value_1 );
goto try_return_handler_2;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_25_chebvander2d );
return NULL;
// Return handler code:
try_return_handler_2:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__$0 );
Py_DECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__contraction_result );
Py_DECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
goto outline_result_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
Py_XDECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_25_chebvander2d );
return NULL;
outline_result_1:;
tmp_assign_source_1 = tmp_outline_return_value_1;
assert( var_ideg == NULL );
var_ideg = tmp_assign_source_1;
// Tried code:
tmp_called_name_1 = LOOKUP_BUILTIN( const_str_plain_zip );
assert( tmp_called_name_1 != NULL );
tmp_args_element_name_1 = var_ideg;
tmp_args_element_name_2 = par_deg;
PyThreadState_GET()->frame->f_lineno = 1520;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_iter_arg_2 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_1, call_args );
}
if ( tmp_iter_arg_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1520;
goto try_except_handler_3;
}
tmp_assign_source_7 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1520;
goto try_except_handler_3;
}
assert( tmp_list_contraction_2__$0 == NULL );
tmp_list_contraction_2__$0 = tmp_assign_source_7;
tmp_assign_source_8 = PyList_New( 0 );
assert( tmp_list_contraction_2__contraction_result == NULL );
tmp_list_contraction_2__contraction_result = tmp_assign_source_8;
loop_start_2:;
tmp_next_source_2 = tmp_list_contraction_2__$0;
tmp_assign_source_9 = ITERATOR_NEXT( tmp_next_source_2 );
if ( tmp_assign_source_9 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_2;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 1520;
goto try_except_handler_3;
}
}
{
PyObject *old = tmp_list_contraction_2__iter_value_0;
tmp_list_contraction_2__iter_value_0 = tmp_assign_source_9;
Py_XDECREF( old );
}
// Tried code:
tmp_iter_arg_3 = tmp_list_contraction_2__iter_value_0;
tmp_assign_source_10 = MAKE_ITERATOR( tmp_iter_arg_3 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1520;
goto try_except_handler_4;
}
{
PyObject *old = tmp_list_contraction$tuple_unpack_1__source_iter;
tmp_list_contraction$tuple_unpack_1__source_iter = tmp_assign_source_10;
Py_XDECREF( old );
}
tmp_unpack_1 = tmp_list_contraction$tuple_unpack_1__source_iter;
tmp_assign_source_11 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_11 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1520;
goto try_except_handler_4;
}
{
PyObject *old = tmp_list_contraction$tuple_unpack_1__element_1;
tmp_list_contraction$tuple_unpack_1__element_1 = tmp_assign_source_11;
Py_XDECREF( old );
}
tmp_unpack_2 = tmp_list_contraction$tuple_unpack_1__source_iter;
tmp_assign_source_12 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_12 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1520;
goto try_except_handler_4;
}
{
PyObject *old = tmp_list_contraction$tuple_unpack_1__element_2;
tmp_list_contraction$tuple_unpack_1__element_2 = tmp_assign_source_12;
Py_XDECREF( old );
}
tmp_iterator_name_1 = tmp_list_contraction$tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_4;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_4;
}
goto try_end_1;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction$tuple_unpack_1__source_iter );
tmp_list_contraction$tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_list_contraction$tuple_unpack_1__element_1 );
tmp_list_contraction$tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_list_contraction$tuple_unpack_1__element_2 );
tmp_list_contraction$tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto try_except_handler_3;
// End of try:
try_end_1:;
tmp_assign_source_13 = tmp_list_contraction$tuple_unpack_1__element_1;
{
PyObject *old = var_id;
var_id = tmp_assign_source_13;
Py_INCREF( var_id );
Py_XDECREF( old );
}
tmp_assign_source_14 = tmp_list_contraction$tuple_unpack_1__element_2;
{
PyObject *old = var_d;
var_d = tmp_assign_source_14;
Py_INCREF( var_d );
Py_XDECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_list_contraction$tuple_unpack_1__source_iter );
Py_DECREF( tmp_list_contraction$tuple_unpack_1__source_iter );
tmp_list_contraction$tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction$tuple_unpack_1__element_1 );
Py_DECREF( tmp_list_contraction$tuple_unpack_1__element_1 );
tmp_list_contraction$tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction$tuple_unpack_1__element_2 );
Py_DECREF( tmp_list_contraction$tuple_unpack_1__element_2 );
tmp_list_contraction$tuple_unpack_1__element_2 = NULL;
tmp_append_list_2 = tmp_list_contraction_2__contraction_result;
tmp_compexpr_left_1 = var_id;
tmp_compexpr_right_1 = var_d;
tmp_and_left_value_1 = RICH_COMPARE_EQ( tmp_compexpr_left_1, tmp_compexpr_right_1 );
if ( tmp_and_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1520;
goto try_except_handler_3;
}
tmp_and_left_truth_1 = CHECK_IF_TRUE( tmp_and_left_value_1 );
if ( tmp_and_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_and_left_value_1 );
exception_lineno = 1520;
goto try_except_handler_3;
}
if ( tmp_and_left_truth_1 == 1 )
{
goto and_right_1;
}
else
{
goto and_left_1;
}
and_right_1:;
Py_DECREF( tmp_and_left_value_1 );
tmp_compexpr_left_2 = var_id;
tmp_compexpr_right_2 = const_int_0;
tmp_and_right_value_1 = RICH_COMPARE_GE( tmp_compexpr_left_2, tmp_compexpr_right_2 );
if ( tmp_and_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1520;
goto try_except_handler_3;
}
tmp_append_value_2 = tmp_and_right_value_1;
goto and_end_1;
and_left_1:;
tmp_append_value_2 = tmp_and_left_value_1;
and_end_1:;
assert( PyList_Check( tmp_append_list_2 ) );
tmp_res = PyList_Append( tmp_append_list_2, tmp_append_value_2 );
Py_DECREF( tmp_append_value_2 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1520;
goto try_except_handler_3;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1520;
goto try_except_handler_3;
}
goto loop_start_2;
loop_end_2:;
tmp_outline_return_value_2 = tmp_list_contraction_2__contraction_result;
Py_INCREF( tmp_outline_return_value_2 );
goto try_return_handler_3;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_25_chebvander2d );
return NULL;
// Return handler code:
try_return_handler_3:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_2__$0 );
Py_DECREF( tmp_list_contraction_2__$0 );
tmp_list_contraction_2__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_2__contraction_result );
Py_DECREF( tmp_list_contraction_2__contraction_result );
tmp_list_contraction_2__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_2__iter_value_0 );
tmp_list_contraction_2__iter_value_0 = NULL;
goto outline_result_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction_2__$0 );
tmp_list_contraction_2__$0 = NULL;
Py_XDECREF( tmp_list_contraction_2__contraction_result );
tmp_list_contraction_2__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_2__iter_value_0 );
tmp_list_contraction_2__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_25_chebvander2d );
return NULL;
outline_result_2:;
tmp_assign_source_6 = tmp_outline_return_value_2;
assert( var_is_valid == NULL );
var_is_valid = tmp_assign_source_6;
tmp_compare_left_1 = var_is_valid;
tmp_compare_right_1 = LIST_COPY( const_list_int_pos_1_int_pos_1_list );
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_right_1 );
exception_lineno = 1521;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_6a43499de4143b7f2feff247d35ef074;
frame_function->f_lineno = 1522;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1522;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
// Tried code:
tmp_iter_arg_4 = var_ideg;
tmp_assign_source_15 = MAKE_ITERATOR( tmp_iter_arg_4 );
if ( tmp_assign_source_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1523;
goto try_except_handler_5;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_15;
tmp_unpack_3 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_16 = UNPACK_NEXT( tmp_unpack_3, 0 );
if ( tmp_assign_source_16 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1523;
goto try_except_handler_5;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_16;
tmp_unpack_4 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_17 = UNPACK_NEXT( tmp_unpack_4, 1 );
if ( tmp_assign_source_17 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1523;
goto try_except_handler_5;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_17;
tmp_iterator_name_2 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_2 ); assert( HAS_ITERNEXT( tmp_iterator_name_2 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_2 )->tp_iternext)( tmp_iterator_name_2 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_5;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_5;
}
goto try_end_2;
// Exception handler code:
try_except_handler_5:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
tmp_assign_source_18 = tmp_tuple_unpack_1__element_1;
assert( var_degx == NULL );
Py_INCREF( tmp_assign_source_18 );
var_degx = tmp_assign_source_18;
tmp_assign_source_19 = tmp_tuple_unpack_1__element_2;
assert( var_degy == NULL );
Py_INCREF( tmp_assign_source_19 );
var_degy = tmp_assign_source_19;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1524;
goto try_except_handler_6;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1524;
goto try_except_handler_6;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = PyTuple_New( 2 );
tmp_tuple_element_2 = par_x;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_y;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 1, tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_5c9928d3d4adf8d21e4940309b7f60ed );
frame_function->f_lineno = 1524;
tmp_left_name_1 = CALL_FUNCTION( tmp_called_name_2, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1524;
goto try_except_handler_6;
}
tmp_right_name_1 = const_float_0_0;
tmp_iter_arg_5 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_iter_arg_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1524;
goto try_except_handler_6;
}
tmp_assign_source_20 = MAKE_ITERATOR( tmp_iter_arg_5 );
Py_DECREF( tmp_iter_arg_5 );
if ( tmp_assign_source_20 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1524;
goto try_except_handler_6;
}
assert( tmp_tuple_unpack_2__source_iter == NULL );
tmp_tuple_unpack_2__source_iter = tmp_assign_source_20;
tmp_unpack_5 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_21 = UNPACK_NEXT( tmp_unpack_5, 0 );
if ( tmp_assign_source_21 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1524;
goto try_except_handler_6;
}
assert( tmp_tuple_unpack_2__element_1 == NULL );
tmp_tuple_unpack_2__element_1 = tmp_assign_source_21;
tmp_unpack_6 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_22 = UNPACK_NEXT( tmp_unpack_6, 1 );
if ( tmp_assign_source_22 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1524;
goto try_except_handler_6;
}
assert( tmp_tuple_unpack_2__element_2 == NULL );
tmp_tuple_unpack_2__element_2 = tmp_assign_source_22;
tmp_iterator_name_3 = tmp_tuple_unpack_2__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_3 ); assert( HAS_ITERNEXT( tmp_iterator_name_3 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_3 )->tp_iternext)( tmp_iterator_name_3 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_6;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_6;
}
goto try_end_3;
// Exception handler code:
try_except_handler_6:;
exception_keeper_type_5 = exception_type;
exception_keeper_value_5 = exception_value;
exception_keeper_tb_5 = exception_tb;
exception_keeper_lineno_5 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_5;
exception_value = exception_keeper_value_5;
exception_tb = exception_keeper_tb_5;
exception_lineno = exception_keeper_lineno_5;
goto frame_exception_exit_1;
// End of try:
try_end_3:;
tmp_assign_source_23 = tmp_tuple_unpack_2__element_1;
{
PyObject *old = par_x;
assert( old != NULL );
par_x = tmp_assign_source_23;
Py_INCREF( par_x );
Py_DECREF( old );
}
tmp_assign_source_24 = tmp_tuple_unpack_2__element_2;
{
PyObject *old = par_y;
assert( old != NULL );
par_y = tmp_assign_source_24;
Py_INCREF( par_y );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__source_iter );
Py_DECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_1 );
Py_DECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_2 );
Py_DECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebvander );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebvander" );
exception_tb = NULL;
exception_lineno = 1526;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_x;
tmp_args_element_name_4 = var_degx;
frame_function->f_lineno = 1526;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_assign_source_25 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_3, call_args );
}
if ( tmp_assign_source_25 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1526;
goto frame_exception_exit_1;
}
assert( var_vx == NULL );
var_vx = tmp_assign_source_25;
tmp_called_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander );
if (unlikely( tmp_called_name_4 == NULL ))
{
tmp_called_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebvander );
}
if ( tmp_called_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebvander" );
exception_tb = NULL;
exception_lineno = 1527;
goto frame_exception_exit_1;
}
tmp_args_element_name_5 = par_y;
tmp_args_element_name_6 = var_degy;
frame_function->f_lineno = 1527;
{
PyObject *call_args[] = { tmp_args_element_name_5, tmp_args_element_name_6 };
tmp_assign_source_26 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_4, call_args );
}
if ( tmp_assign_source_26 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1527;
goto frame_exception_exit_1;
}
assert( var_vy == NULL );
var_vy = tmp_assign_source_26;
tmp_subscribed_name_1 = var_vx;
tmp_subscript_name_1 = const_tuple_ellipsis_none_tuple;
tmp_left_name_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1528;
goto frame_exception_exit_1;
}
tmp_subscribed_name_2 = var_vy;
tmp_subscript_name_2 = const_tuple_ellipsis_none_slice_none_none_none_tuple;
tmp_right_name_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_right_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1528;
goto frame_exception_exit_1;
}
tmp_assign_source_27 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_right_name_2 );
if ( tmp_assign_source_27 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1528;
goto frame_exception_exit_1;
}
assert( var_v == NULL );
var_v = tmp_assign_source_27;
tmp_source_name_2 = var_v;
tmp_called_name_5 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_reshape );
if ( tmp_called_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1529;
goto frame_exception_exit_1;
}
tmp_sliceslicedel_index_lower_1 = 0;
tmp_slice_index_upper_1 = -2;
tmp_source_name_3 = var_v;
tmp_slice_source_1 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_shape );
if ( tmp_slice_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_5 );
exception_lineno = 1529;
goto frame_exception_exit_1;
}
tmp_left_name_3 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
Py_DECREF( tmp_slice_source_1 );
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_5 );
exception_lineno = 1529;
goto frame_exception_exit_1;
}
tmp_right_name_3 = const_tuple_int_neg_1_tuple;
tmp_args_element_name_7 = BINARY_OPERATION_ADD( tmp_left_name_3, tmp_right_name_3 );
Py_DECREF( tmp_left_name_3 );
if ( tmp_args_element_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_5 );
exception_lineno = 1529;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1529;
{
PyObject *call_args[] = { tmp_args_element_name_7 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, call_args );
}
Py_DECREF( tmp_called_name_5 );
Py_DECREF( tmp_args_element_name_7 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1529;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_y )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_y,
par_y
);
assert( res == 0 );
}
if ( par_deg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_deg,
par_deg
);
assert( res == 0 );
}
if ( var_d )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_d,
var_d
);
assert( res == 0 );
}
if ( var_ideg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ideg,
var_ideg
);
assert( res == 0 );
}
if ( var_id )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_id,
var_id
);
assert( res == 0 );
}
if ( var_is_valid )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_is_valid,
var_is_valid
);
assert( res == 0 );
}
if ( var_degx )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_degx,
var_degx
);
assert( res == 0 );
}
if ( var_degy )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_degy,
var_degy
);
assert( res == 0 );
}
if ( var_vx )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_vx,
var_vx
);
assert( res == 0 );
}
if ( var_vy )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_vy,
var_vy
);
assert( res == 0 );
}
if ( var_v )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_v,
var_v
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_25_chebvander2d );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
Py_XDECREF( var_d );
var_d = NULL;
CHECK_OBJECT( (PyObject *)var_ideg );
Py_DECREF( var_ideg );
var_ideg = NULL;
Py_XDECREF( var_id );
var_id = NULL;
CHECK_OBJECT( (PyObject *)var_is_valid );
Py_DECREF( var_is_valid );
var_is_valid = NULL;
CHECK_OBJECT( (PyObject *)var_degx );
Py_DECREF( var_degx );
var_degx = NULL;
CHECK_OBJECT( (PyObject *)var_degy );
Py_DECREF( var_degy );
var_degy = NULL;
CHECK_OBJECT( (PyObject *)var_vx );
Py_DECREF( var_vx );
var_vx = NULL;
CHECK_OBJECT( (PyObject *)var_vy );
Py_DECREF( var_vy );
var_vy = NULL;
CHECK_OBJECT( (PyObject *)var_v );
Py_DECREF( var_v );
var_v = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_6 = exception_type;
exception_keeper_value_6 = exception_value;
exception_keeper_tb_6 = exception_tb;
exception_keeper_lineno_6 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
Py_XDECREF( var_d );
var_d = NULL;
Py_XDECREF( var_ideg );
var_ideg = NULL;
Py_XDECREF( var_id );
var_id = NULL;
Py_XDECREF( var_is_valid );
var_is_valid = NULL;
Py_XDECREF( var_degx );
var_degx = NULL;
Py_XDECREF( var_degy );
var_degy = NULL;
Py_XDECREF( var_vx );
var_vx = NULL;
Py_XDECREF( var_vy );
var_vy = NULL;
Py_XDECREF( var_v );
var_v = NULL;
// Re-raise.
exception_type = exception_keeper_type_6;
exception_value = exception_keeper_value_6;
exception_tb = exception_keeper_tb_6;
exception_lineno = exception_keeper_lineno_6;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_25_chebvander2d );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_26_chebvander3d( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_y = python_pars[ 1 ];
PyObject *par_z = python_pars[ 2 ];
PyObject *par_deg = python_pars[ 3 ];
PyObject *var_d = NULL;
PyObject *var_ideg = NULL;
PyObject *var_id = NULL;
PyObject *var_is_valid = NULL;
PyObject *var_degx = NULL;
PyObject *var_degy = NULL;
PyObject *var_degz = NULL;
PyObject *var_vx = NULL;
PyObject *var_vy = NULL;
PyObject *var_vz = NULL;
PyObject *var_v = NULL;
PyObject *tmp_list_contraction_1__$0 = NULL;
PyObject *tmp_list_contraction_1__contraction_result = NULL;
PyObject *tmp_list_contraction_1__iter_value_0 = NULL;
PyObject *tmp_list_contraction_2__$0 = NULL;
PyObject *tmp_list_contraction_2__contraction_result = NULL;
PyObject *tmp_list_contraction_2__iter_value_0 = NULL;
PyObject *tmp_list_contraction$tuple_unpack_1__source_iter = NULL;
PyObject *tmp_list_contraction$tuple_unpack_1__element_1 = NULL;
PyObject *tmp_list_contraction$tuple_unpack_1__element_2 = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_tuple_unpack_1__element_3 = NULL;
PyObject *tmp_tuple_unpack_2__source_iter = NULL;
PyObject *tmp_tuple_unpack_2__element_1 = NULL;
PyObject *tmp_tuple_unpack_2__element_2 = NULL;
PyObject *tmp_tuple_unpack_2__element_3 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *exception_keeper_type_4;
PyObject *exception_keeper_value_4;
PyTracebackObject *exception_keeper_tb_4;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4;
PyObject *exception_keeper_type_5;
PyObject *exception_keeper_value_5;
PyTracebackObject *exception_keeper_tb_5;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5;
PyObject *exception_keeper_type_6;
PyObject *exception_keeper_value_6;
PyTracebackObject *exception_keeper_tb_6;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_6;
int tmp_and_left_truth_1;
PyObject *tmp_and_left_value_1;
PyObject *tmp_and_right_value_1;
PyObject *tmp_append_list_1;
PyObject *tmp_append_list_2;
PyObject *tmp_append_value_1;
PyObject *tmp_append_value_2;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_element_name_8;
PyObject *tmp_args_element_name_9;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_assign_source_22;
PyObject *tmp_assign_source_23;
PyObject *tmp_assign_source_24;
PyObject *tmp_assign_source_25;
PyObject *tmp_assign_source_26;
PyObject *tmp_assign_source_27;
PyObject *tmp_assign_source_28;
PyObject *tmp_assign_source_29;
PyObject *tmp_assign_source_30;
PyObject *tmp_assign_source_31;
PyObject *tmp_assign_source_32;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
int tmp_cmp_NotEq_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iter_arg_2;
PyObject *tmp_iter_arg_3;
PyObject *tmp_iter_arg_4;
PyObject *tmp_iter_arg_5;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_iterator_name_2;
PyObject *tmp_iterator_name_3;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_next_source_1;
PyObject *tmp_next_source_2;
PyObject *tmp_outline_return_value_1;
PyObject *tmp_outline_return_value_2;
PyObject *tmp_raise_type_1;
int tmp_res;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
Py_ssize_t tmp_slice_index_upper_1;
PyObject *tmp_slice_source_1;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
PyObject *tmp_unpack_3;
PyObject *tmp_unpack_4;
PyObject *tmp_unpack_5;
PyObject *tmp_unpack_6;
PyObject *tmp_unpack_7;
PyObject *tmp_unpack_8;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
tmp_outline_return_value_1 = NULL;
tmp_outline_return_value_2 = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_c9989ee744c4754eacec604f1590d3ed, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_iter_arg_1 = par_deg;
tmp_assign_source_2 = MAKE_ITERATOR( tmp_iter_arg_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1583;
goto try_except_handler_2;
}
assert( tmp_list_contraction_1__$0 == NULL );
tmp_list_contraction_1__$0 = tmp_assign_source_2;
tmp_assign_source_3 = PyList_New( 0 );
assert( tmp_list_contraction_1__contraction_result == NULL );
tmp_list_contraction_1__contraction_result = tmp_assign_source_3;
loop_start_1:;
tmp_next_source_1 = tmp_list_contraction_1__$0;
tmp_assign_source_4 = ITERATOR_NEXT( tmp_next_source_1 );
if ( tmp_assign_source_4 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_1;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 1583;
goto try_except_handler_2;
}
}
{
PyObject *old = tmp_list_contraction_1__iter_value_0;
tmp_list_contraction_1__iter_value_0 = tmp_assign_source_4;
Py_XDECREF( old );
}
tmp_assign_source_5 = tmp_list_contraction_1__iter_value_0;
{
PyObject *old = var_d;
var_d = tmp_assign_source_5;
Py_INCREF( var_d );
Py_XDECREF( old );
}
tmp_append_list_1 = tmp_list_contraction_1__contraction_result;
tmp_int_arg_1 = var_d;
tmp_append_value_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_append_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1583;
goto try_except_handler_2;
}
assert( PyList_Check( tmp_append_list_1 ) );
tmp_res = PyList_Append( tmp_append_list_1, tmp_append_value_1 );
Py_DECREF( tmp_append_value_1 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1583;
goto try_except_handler_2;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1583;
goto try_except_handler_2;
}
goto loop_start_1;
loop_end_1:;
tmp_outline_return_value_1 = tmp_list_contraction_1__contraction_result;
Py_INCREF( tmp_outline_return_value_1 );
goto try_return_handler_2;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_26_chebvander3d );
return NULL;
// Return handler code:
try_return_handler_2:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__$0 );
Py_DECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_1__contraction_result );
Py_DECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
goto outline_result_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction_1__$0 );
tmp_list_contraction_1__$0 = NULL;
Py_XDECREF( tmp_list_contraction_1__contraction_result );
tmp_list_contraction_1__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_1__iter_value_0 );
tmp_list_contraction_1__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_26_chebvander3d );
return NULL;
outline_result_1:;
tmp_assign_source_1 = tmp_outline_return_value_1;
assert( var_ideg == NULL );
var_ideg = tmp_assign_source_1;
// Tried code:
tmp_called_name_1 = LOOKUP_BUILTIN( const_str_plain_zip );
assert( tmp_called_name_1 != NULL );
tmp_args_element_name_1 = var_ideg;
tmp_args_element_name_2 = par_deg;
PyThreadState_GET()->frame->f_lineno = 1584;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
tmp_iter_arg_2 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_1, call_args );
}
if ( tmp_iter_arg_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1584;
goto try_except_handler_3;
}
tmp_assign_source_7 = MAKE_ITERATOR( tmp_iter_arg_2 );
Py_DECREF( tmp_iter_arg_2 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1584;
goto try_except_handler_3;
}
assert( tmp_list_contraction_2__$0 == NULL );
tmp_list_contraction_2__$0 = tmp_assign_source_7;
tmp_assign_source_8 = PyList_New( 0 );
assert( tmp_list_contraction_2__contraction_result == NULL );
tmp_list_contraction_2__contraction_result = tmp_assign_source_8;
loop_start_2:;
tmp_next_source_2 = tmp_list_contraction_2__$0;
tmp_assign_source_9 = ITERATOR_NEXT( tmp_next_source_2 );
if ( tmp_assign_source_9 == NULL )
{
if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
{
goto loop_end_2;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
PyThreadState_GET()->frame->f_lineno = 1584;
goto try_except_handler_3;
}
}
{
PyObject *old = tmp_list_contraction_2__iter_value_0;
tmp_list_contraction_2__iter_value_0 = tmp_assign_source_9;
Py_XDECREF( old );
}
// Tried code:
tmp_iter_arg_3 = tmp_list_contraction_2__iter_value_0;
tmp_assign_source_10 = MAKE_ITERATOR( tmp_iter_arg_3 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1584;
goto try_except_handler_4;
}
{
PyObject *old = tmp_list_contraction$tuple_unpack_1__source_iter;
tmp_list_contraction$tuple_unpack_1__source_iter = tmp_assign_source_10;
Py_XDECREF( old );
}
tmp_unpack_1 = tmp_list_contraction$tuple_unpack_1__source_iter;
tmp_assign_source_11 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_11 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1584;
goto try_except_handler_4;
}
{
PyObject *old = tmp_list_contraction$tuple_unpack_1__element_1;
tmp_list_contraction$tuple_unpack_1__element_1 = tmp_assign_source_11;
Py_XDECREF( old );
}
tmp_unpack_2 = tmp_list_contraction$tuple_unpack_1__source_iter;
tmp_assign_source_12 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_12 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1584;
goto try_except_handler_4;
}
{
PyObject *old = tmp_list_contraction$tuple_unpack_1__element_2;
tmp_list_contraction$tuple_unpack_1__element_2 = tmp_assign_source_12;
Py_XDECREF( old );
}
tmp_iterator_name_1 = tmp_list_contraction$tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_4;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 2)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_4;
}
goto try_end_1;
// Exception handler code:
try_except_handler_4:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction$tuple_unpack_1__source_iter );
tmp_list_contraction$tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_list_contraction$tuple_unpack_1__element_1 );
tmp_list_contraction$tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_list_contraction$tuple_unpack_1__element_2 );
tmp_list_contraction$tuple_unpack_1__element_2 = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto try_except_handler_3;
// End of try:
try_end_1:;
tmp_assign_source_13 = tmp_list_contraction$tuple_unpack_1__element_1;
{
PyObject *old = var_id;
var_id = tmp_assign_source_13;
Py_INCREF( var_id );
Py_XDECREF( old );
}
tmp_assign_source_14 = tmp_list_contraction$tuple_unpack_1__element_2;
{
PyObject *old = var_d;
var_d = tmp_assign_source_14;
Py_INCREF( var_d );
Py_XDECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_list_contraction$tuple_unpack_1__source_iter );
Py_DECREF( tmp_list_contraction$tuple_unpack_1__source_iter );
tmp_list_contraction$tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction$tuple_unpack_1__element_1 );
Py_DECREF( tmp_list_contraction$tuple_unpack_1__element_1 );
tmp_list_contraction$tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction$tuple_unpack_1__element_2 );
Py_DECREF( tmp_list_contraction$tuple_unpack_1__element_2 );
tmp_list_contraction$tuple_unpack_1__element_2 = NULL;
tmp_append_list_2 = tmp_list_contraction_2__contraction_result;
tmp_compexpr_left_1 = var_id;
tmp_compexpr_right_1 = var_d;
tmp_and_left_value_1 = RICH_COMPARE_EQ( tmp_compexpr_left_1, tmp_compexpr_right_1 );
if ( tmp_and_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1584;
goto try_except_handler_3;
}
tmp_and_left_truth_1 = CHECK_IF_TRUE( tmp_and_left_value_1 );
if ( tmp_and_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_and_left_value_1 );
exception_lineno = 1584;
goto try_except_handler_3;
}
if ( tmp_and_left_truth_1 == 1 )
{
goto and_right_1;
}
else
{
goto and_left_1;
}
and_right_1:;
Py_DECREF( tmp_and_left_value_1 );
tmp_compexpr_left_2 = var_id;
tmp_compexpr_right_2 = const_int_0;
tmp_and_right_value_1 = RICH_COMPARE_GE( tmp_compexpr_left_2, tmp_compexpr_right_2 );
if ( tmp_and_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1584;
goto try_except_handler_3;
}
tmp_append_value_2 = tmp_and_right_value_1;
goto and_end_1;
and_left_1:;
tmp_append_value_2 = tmp_and_left_value_1;
and_end_1:;
assert( PyList_Check( tmp_append_list_2 ) );
tmp_res = PyList_Append( tmp_append_list_2, tmp_append_value_2 );
Py_DECREF( tmp_append_value_2 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1584;
goto try_except_handler_3;
}
if ( CONSIDER_THREADING() == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1584;
goto try_except_handler_3;
}
goto loop_start_2;
loop_end_2:;
tmp_outline_return_value_2 = tmp_list_contraction_2__contraction_result;
Py_INCREF( tmp_outline_return_value_2 );
goto try_return_handler_3;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_26_chebvander3d );
return NULL;
// Return handler code:
try_return_handler_3:;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_2__$0 );
Py_DECREF( tmp_list_contraction_2__$0 );
tmp_list_contraction_2__$0 = NULL;
CHECK_OBJECT( (PyObject *)tmp_list_contraction_2__contraction_result );
Py_DECREF( tmp_list_contraction_2__contraction_result );
tmp_list_contraction_2__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_2__iter_value_0 );
tmp_list_contraction_2__iter_value_0 = NULL;
goto outline_result_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_list_contraction_2__$0 );
tmp_list_contraction_2__$0 = NULL;
Py_XDECREF( tmp_list_contraction_2__contraction_result );
tmp_list_contraction_2__contraction_result = NULL;
Py_XDECREF( tmp_list_contraction_2__iter_value_0 );
tmp_list_contraction_2__iter_value_0 = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto frame_exception_exit_1;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_26_chebvander3d );
return NULL;
outline_result_2:;
tmp_assign_source_6 = tmp_outline_return_value_2;
assert( var_is_valid == NULL );
var_is_valid = tmp_assign_source_6;
tmp_compare_left_1 = var_is_valid;
tmp_compare_right_1 = LIST_COPY( const_list_int_pos_1_int_pos_1_int_pos_1_list );
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_right_1 );
exception_lineno = 1585;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_6a43499de4143b7f2feff247d35ef074;
frame_function->f_lineno = 1586;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1586;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
// Tried code:
tmp_iter_arg_4 = var_ideg;
tmp_assign_source_15 = MAKE_ITERATOR( tmp_iter_arg_4 );
if ( tmp_assign_source_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1587;
goto try_except_handler_5;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_15;
tmp_unpack_3 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_16 = UNPACK_NEXT( tmp_unpack_3, 0 );
if ( tmp_assign_source_16 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1587;
goto try_except_handler_5;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_16;
tmp_unpack_4 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_17 = UNPACK_NEXT( tmp_unpack_4, 1 );
if ( tmp_assign_source_17 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1587;
goto try_except_handler_5;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_17;
tmp_unpack_5 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_18 = UNPACK_NEXT( tmp_unpack_5, 2 );
if ( tmp_assign_source_18 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1587;
goto try_except_handler_5;
}
assert( tmp_tuple_unpack_1__element_3 == NULL );
tmp_tuple_unpack_1__element_3 = tmp_assign_source_18;
tmp_iterator_name_2 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_2 ); assert( HAS_ITERNEXT( tmp_iterator_name_2 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_2 )->tp_iternext)( tmp_iterator_name_2 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_5;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 3)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_5;
}
goto try_end_2;
// Exception handler code:
try_except_handler_5:;
exception_keeper_type_4 = exception_type;
exception_keeper_value_4 = exception_value;
exception_keeper_tb_4 = exception_tb;
exception_keeper_lineno_4 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_3 );
tmp_tuple_unpack_1__element_3 = NULL;
// Re-raise.
exception_type = exception_keeper_type_4;
exception_value = exception_keeper_value_4;
exception_tb = exception_keeper_tb_4;
exception_lineno = exception_keeper_lineno_4;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
tmp_assign_source_19 = tmp_tuple_unpack_1__element_1;
assert( var_degx == NULL );
Py_INCREF( tmp_assign_source_19 );
var_degx = tmp_assign_source_19;
tmp_assign_source_20 = tmp_tuple_unpack_1__element_2;
assert( var_degy == NULL );
Py_INCREF( tmp_assign_source_20 );
var_degy = tmp_assign_source_20;
tmp_assign_source_21 = tmp_tuple_unpack_1__element_3;
assert( var_degz == NULL );
Py_INCREF( tmp_assign_source_21 );
var_degz = tmp_assign_source_21;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_3 );
Py_DECREF( tmp_tuple_unpack_1__element_3 );
tmp_tuple_unpack_1__element_3 = NULL;
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1588;
goto try_except_handler_6;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1588;
goto try_except_handler_6;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = PyTuple_New( 3 );
tmp_tuple_element_2 = par_x;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_y;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 1, tmp_tuple_element_2 );
tmp_tuple_element_2 = par_z;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 2, tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_5c9928d3d4adf8d21e4940309b7f60ed );
frame_function->f_lineno = 1588;
tmp_left_name_1 = CALL_FUNCTION( tmp_called_name_2, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1588;
goto try_except_handler_6;
}
tmp_right_name_1 = const_float_0_0;
tmp_iter_arg_5 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_iter_arg_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1588;
goto try_except_handler_6;
}
tmp_assign_source_22 = MAKE_ITERATOR( tmp_iter_arg_5 );
Py_DECREF( tmp_iter_arg_5 );
if ( tmp_assign_source_22 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1588;
goto try_except_handler_6;
}
assert( tmp_tuple_unpack_2__source_iter == NULL );
tmp_tuple_unpack_2__source_iter = tmp_assign_source_22;
tmp_unpack_6 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_23 = UNPACK_NEXT( tmp_unpack_6, 0 );
if ( tmp_assign_source_23 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1588;
goto try_except_handler_6;
}
assert( tmp_tuple_unpack_2__element_1 == NULL );
tmp_tuple_unpack_2__element_1 = tmp_assign_source_23;
tmp_unpack_7 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_24 = UNPACK_NEXT( tmp_unpack_7, 1 );
if ( tmp_assign_source_24 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1588;
goto try_except_handler_6;
}
assert( tmp_tuple_unpack_2__element_2 == NULL );
tmp_tuple_unpack_2__element_2 = tmp_assign_source_24;
tmp_unpack_8 = tmp_tuple_unpack_2__source_iter;
tmp_assign_source_25 = UNPACK_NEXT( tmp_unpack_8, 2 );
if ( tmp_assign_source_25 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1588;
goto try_except_handler_6;
}
assert( tmp_tuple_unpack_2__element_3 == NULL );
tmp_tuple_unpack_2__element_3 = tmp_assign_source_25;
tmp_iterator_name_3 = tmp_tuple_unpack_2__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_3 ); assert( HAS_ITERNEXT( tmp_iterator_name_3 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_3 )->tp_iternext)( tmp_iterator_name_3 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_6;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 3)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_6;
}
goto try_end_3;
// Exception handler code:
try_except_handler_6:;
exception_keeper_type_5 = exception_type;
exception_keeper_value_5 = exception_value;
exception_keeper_tb_5 = exception_tb;
exception_keeper_lineno_5 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
Py_XDECREF( tmp_tuple_unpack_2__element_3 );
tmp_tuple_unpack_2__element_3 = NULL;
// Re-raise.
exception_type = exception_keeper_type_5;
exception_value = exception_keeper_value_5;
exception_tb = exception_keeper_tb_5;
exception_lineno = exception_keeper_lineno_5;
goto frame_exception_exit_1;
// End of try:
try_end_3:;
tmp_assign_source_26 = tmp_tuple_unpack_2__element_1;
{
PyObject *old = par_x;
assert( old != NULL );
par_x = tmp_assign_source_26;
Py_INCREF( par_x );
Py_DECREF( old );
}
tmp_assign_source_27 = tmp_tuple_unpack_2__element_2;
{
PyObject *old = par_y;
assert( old != NULL );
par_y = tmp_assign_source_27;
Py_INCREF( par_y );
Py_DECREF( old );
}
tmp_assign_source_28 = tmp_tuple_unpack_2__element_3;
{
PyObject *old = par_z;
assert( old != NULL );
par_z = tmp_assign_source_28;
Py_INCREF( par_z );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__source_iter );
Py_DECREF( tmp_tuple_unpack_2__source_iter );
tmp_tuple_unpack_2__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_1 );
Py_DECREF( tmp_tuple_unpack_2__element_1 );
tmp_tuple_unpack_2__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_2 );
Py_DECREF( tmp_tuple_unpack_2__element_2 );
tmp_tuple_unpack_2__element_2 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_2__element_3 );
Py_DECREF( tmp_tuple_unpack_2__element_3 );
tmp_tuple_unpack_2__element_3 = NULL;
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebvander );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebvander" );
exception_tb = NULL;
exception_lineno = 1590;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_x;
tmp_args_element_name_4 = var_degx;
frame_function->f_lineno = 1590;
{
PyObject *call_args[] = { tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_assign_source_29 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_3, call_args );
}
if ( tmp_assign_source_29 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1590;
goto frame_exception_exit_1;
}
assert( var_vx == NULL );
var_vx = tmp_assign_source_29;
tmp_called_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander );
if (unlikely( tmp_called_name_4 == NULL ))
{
tmp_called_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebvander );
}
if ( tmp_called_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebvander" );
exception_tb = NULL;
exception_lineno = 1591;
goto frame_exception_exit_1;
}
tmp_args_element_name_5 = par_y;
tmp_args_element_name_6 = var_degy;
frame_function->f_lineno = 1591;
{
PyObject *call_args[] = { tmp_args_element_name_5, tmp_args_element_name_6 };
tmp_assign_source_30 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_4, call_args );
}
if ( tmp_assign_source_30 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1591;
goto frame_exception_exit_1;
}
assert( var_vy == NULL );
var_vy = tmp_assign_source_30;
tmp_called_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander );
if (unlikely( tmp_called_name_5 == NULL ))
{
tmp_called_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebvander );
}
if ( tmp_called_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebvander" );
exception_tb = NULL;
exception_lineno = 1592;
goto frame_exception_exit_1;
}
tmp_args_element_name_7 = par_z;
tmp_args_element_name_8 = var_degz;
frame_function->f_lineno = 1592;
{
PyObject *call_args[] = { tmp_args_element_name_7, tmp_args_element_name_8 };
tmp_assign_source_31 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_5, call_args );
}
if ( tmp_assign_source_31 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1592;
goto frame_exception_exit_1;
}
assert( var_vz == NULL );
var_vz = tmp_assign_source_31;
tmp_subscribed_name_1 = var_vx;
tmp_subscript_name_1 = const_tuple_ellipsis_none_none_tuple;
tmp_left_name_3 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_left_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1593;
goto frame_exception_exit_1;
}
tmp_subscribed_name_2 = var_vy;
tmp_subscript_name_2 = const_tuple_ellipsis_none_slice_none_none_none_none_tuple;
tmp_right_name_2 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_right_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_3 );
exception_lineno = 1593;
goto frame_exception_exit_1;
}
tmp_left_name_2 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_2 );
Py_DECREF( tmp_left_name_3 );
Py_DECREF( tmp_right_name_2 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1593;
goto frame_exception_exit_1;
}
tmp_subscribed_name_3 = var_vz;
tmp_subscript_name_3 = const_tuple_ellipsis_none_none_slice_none_none_none_tuple;
tmp_right_name_3 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
if ( tmp_right_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1593;
goto frame_exception_exit_1;
}
tmp_assign_source_32 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_3 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_right_name_3 );
if ( tmp_assign_source_32 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1593;
goto frame_exception_exit_1;
}
assert( var_v == NULL );
var_v = tmp_assign_source_32;
tmp_source_name_2 = var_v;
tmp_called_name_6 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_reshape );
if ( tmp_called_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1594;
goto frame_exception_exit_1;
}
tmp_sliceslicedel_index_lower_1 = 0;
tmp_slice_index_upper_1 = -3;
tmp_source_name_3 = var_v;
tmp_slice_source_1 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_shape );
if ( tmp_slice_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
exception_lineno = 1594;
goto frame_exception_exit_1;
}
tmp_left_name_4 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
Py_DECREF( tmp_slice_source_1 );
if ( tmp_left_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
exception_lineno = 1594;
goto frame_exception_exit_1;
}
tmp_right_name_4 = const_tuple_int_neg_1_tuple;
tmp_args_element_name_9 = BINARY_OPERATION_ADD( tmp_left_name_4, tmp_right_name_4 );
Py_DECREF( tmp_left_name_4 );
if ( tmp_args_element_name_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_6 );
exception_lineno = 1594;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1594;
{
PyObject *call_args[] = { tmp_args_element_name_9 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_6, call_args );
}
Py_DECREF( tmp_called_name_6 );
Py_DECREF( tmp_args_element_name_9 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1594;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_y )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_y,
par_y
);
assert( res == 0 );
}
if ( par_z )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_z,
par_z
);
assert( res == 0 );
}
if ( par_deg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_deg,
par_deg
);
assert( res == 0 );
}
if ( var_d )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_d,
var_d
);
assert( res == 0 );
}
if ( var_ideg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ideg,
var_ideg
);
assert( res == 0 );
}
if ( var_id )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_id,
var_id
);
assert( res == 0 );
}
if ( var_is_valid )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_is_valid,
var_is_valid
);
assert( res == 0 );
}
if ( var_degx )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_degx,
var_degx
);
assert( res == 0 );
}
if ( var_degy )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_degy,
var_degy
);
assert( res == 0 );
}
if ( var_degz )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_degz,
var_degz
);
assert( res == 0 );
}
if ( var_vx )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_vx,
var_vx
);
assert( res == 0 );
}
if ( var_vy )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_vy,
var_vy
);
assert( res == 0 );
}
if ( var_vz )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_vz,
var_vz
);
assert( res == 0 );
}
if ( var_v )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_v,
var_v
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_26_chebvander3d );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_z );
Py_DECREF( par_z );
par_z = NULL;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
Py_XDECREF( var_d );
var_d = NULL;
CHECK_OBJECT( (PyObject *)var_ideg );
Py_DECREF( var_ideg );
var_ideg = NULL;
Py_XDECREF( var_id );
var_id = NULL;
CHECK_OBJECT( (PyObject *)var_is_valid );
Py_DECREF( var_is_valid );
var_is_valid = NULL;
CHECK_OBJECT( (PyObject *)var_degx );
Py_DECREF( var_degx );
var_degx = NULL;
CHECK_OBJECT( (PyObject *)var_degy );
Py_DECREF( var_degy );
var_degy = NULL;
CHECK_OBJECT( (PyObject *)var_degz );
Py_DECREF( var_degz );
var_degz = NULL;
CHECK_OBJECT( (PyObject *)var_vx );
Py_DECREF( var_vx );
var_vx = NULL;
CHECK_OBJECT( (PyObject *)var_vy );
Py_DECREF( var_vy );
var_vy = NULL;
CHECK_OBJECT( (PyObject *)var_vz );
Py_DECREF( var_vz );
var_vz = NULL;
CHECK_OBJECT( (PyObject *)var_v );
Py_DECREF( var_v );
var_v = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_6 = exception_type;
exception_keeper_value_6 = exception_value;
exception_keeper_tb_6 = exception_tb;
exception_keeper_lineno_6 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_z );
Py_DECREF( par_z );
par_z = NULL;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
Py_XDECREF( var_d );
var_d = NULL;
Py_XDECREF( var_ideg );
var_ideg = NULL;
Py_XDECREF( var_id );
var_id = NULL;
Py_XDECREF( var_is_valid );
var_is_valid = NULL;
Py_XDECREF( var_degx );
var_degx = NULL;
Py_XDECREF( var_degy );
var_degy = NULL;
Py_XDECREF( var_degz );
var_degz = NULL;
Py_XDECREF( var_vx );
var_vx = NULL;
Py_XDECREF( var_vy );
var_vy = NULL;
Py_XDECREF( var_vz );
var_vz = NULL;
Py_XDECREF( var_v );
var_v = NULL;
// Re-raise.
exception_type = exception_keeper_type_6;
exception_value = exception_keeper_value_6;
exception_tb = exception_keeper_tb_6;
exception_lineno = exception_keeper_lineno_6;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_26_chebvander3d );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_27_chebfit( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *par_y = python_pars[ 1 ];
PyObject *par_deg = python_pars[ 2 ];
PyObject *par_rcond = python_pars[ 3 ];
PyObject *par_full = python_pars[ 4 ];
PyObject *par_w = python_pars[ 5 ];
PyObject *var_lmax = NULL;
PyObject *var_order = NULL;
PyObject *var_van = NULL;
PyObject *var_lhs = NULL;
PyObject *var_rhs = NULL;
PyObject *var_scl = NULL;
PyObject *var_c = NULL;
PyObject *var_resids = NULL;
PyObject *var_rank = NULL;
PyObject *var_s = NULL;
PyObject *var_cc = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_tuple_unpack_1__element_2 = NULL;
PyObject *tmp_tuple_unpack_1__element_3 = NULL;
PyObject *tmp_tuple_unpack_1__element_4 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
int tmp_and_left_truth_1;
PyObject *tmp_and_left_value_1;
PyObject *tmp_and_right_value_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_element_name_8;
PyObject *tmp_args_element_name_9;
PyObject *tmp_args_element_name_10;
PyObject *tmp_args_element_name_11;
PyObject *tmp_args_element_name_12;
PyObject *tmp_args_element_name_13;
PyObject *tmp_args_element_name_14;
PyObject *tmp_args_element_name_15;
PyObject *tmp_args_element_name_16;
PyObject *tmp_args_element_name_17;
PyObject *tmp_args_element_name_18;
PyObject *tmp_args_element_name_19;
PyObject *tmp_args_element_name_20;
PyObject *tmp_args_element_name_21;
PyObject *tmp_args_element_name_22;
PyObject *tmp_args_name_1;
PyObject *tmp_args_name_2;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscribed_2;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subscript_2;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_ass_subvalue_2;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_assign_source_22;
PyObject *tmp_assign_source_23;
PyObject *tmp_assign_source_24;
PyObject *tmp_assign_source_25;
PyObject *tmp_assign_source_26;
PyObject *tmp_assign_source_27;
PyObject *tmp_assign_source_28;
PyObject *tmp_assign_source_29;
PyObject *tmp_assign_source_30;
PyObject *tmp_assign_source_31;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
PyObject *tmp_called_name_7;
PyObject *tmp_called_name_8;
PyObject *tmp_called_name_9;
PyObject *tmp_called_name_10;
PyObject *tmp_called_name_11;
PyObject *tmp_called_name_12;
PyObject *tmp_called_name_13;
PyObject *tmp_called_name_14;
PyObject *tmp_called_name_15;
PyObject *tmp_called_name_16;
PyObject *tmp_called_name_17;
PyObject *tmp_called_name_18;
PyObject *tmp_called_name_19;
PyObject *tmp_called_name_20;
PyObject *tmp_called_name_21;
int tmp_cmp_Eq_1;
int tmp_cmp_Eq_2;
int tmp_cmp_Eq_3;
int tmp_cmp_Gt_1;
int tmp_cmp_Lt_1;
int tmp_cmp_NotEq_1;
int tmp_cmp_NotEq_2;
int tmp_cmp_NotEq_3;
int tmp_cmp_NotEq_4;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_left_3;
PyObject *tmp_compare_left_4;
PyObject *tmp_compare_left_5;
PyObject *tmp_compare_left_6;
PyObject *tmp_compare_left_7;
PyObject *tmp_compare_left_8;
PyObject *tmp_compare_left_9;
PyObject *tmp_compare_left_10;
PyObject *tmp_compare_left_11;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_compare_right_3;
PyObject *tmp_compare_right_4;
PyObject *tmp_compare_right_5;
PyObject *tmp_compare_right_6;
PyObject *tmp_compare_right_7;
PyObject *tmp_compare_right_8;
PyObject *tmp_compare_right_9;
PyObject *tmp_compare_right_10;
PyObject *tmp_compare_right_11;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_left_3;
PyObject *tmp_compexpr_left_4;
PyObject *tmp_compexpr_left_5;
PyObject *tmp_compexpr_left_6;
PyObject *tmp_compexpr_left_7;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
PyObject *tmp_compexpr_right_3;
PyObject *tmp_compexpr_right_4;
PyObject *tmp_compexpr_right_5;
PyObject *tmp_compexpr_right_6;
PyObject *tmp_compexpr_right_7;
int tmp_cond_truth_1;
int tmp_cond_truth_2;
int tmp_cond_truth_3;
int tmp_cond_truth_4;
int tmp_cond_truth_5;
PyObject *tmp_cond_value_1;
PyObject *tmp_cond_value_2;
PyObject *tmp_cond_value_3;
PyObject *tmp_cond_value_4;
PyObject *tmp_cond_value_5;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_key_2;
PyObject *tmp_dict_value_1;
PyObject *tmp_dict_value_2;
PyObject *tmp_frame_locals;
bool tmp_is_1;
bool tmp_isnot_1;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_kw_name_2;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_left_name_9;
PyObject *tmp_left_name_10;
PyObject *tmp_left_name_11;
PyObject *tmp_left_name_12;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_len_arg_3;
PyObject *tmp_len_arg_4;
PyObject *tmp_len_arg_5;
PyObject *tmp_len_arg_6;
PyObject *tmp_list_element_1;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_make_exception_arg_2;
PyObject *tmp_make_exception_arg_3;
PyObject *tmp_make_exception_arg_4;
PyObject *tmp_make_exception_arg_5;
PyObject *tmp_make_exception_arg_6;
PyObject *tmp_make_exception_arg_7;
PyObject *tmp_make_exception_arg_8;
PyObject *tmp_operand_name_1;
int tmp_or_left_truth_1;
int tmp_or_left_truth_2;
int tmp_or_left_truth_3;
PyObject *tmp_or_left_value_1;
PyObject *tmp_or_left_value_2;
PyObject *tmp_or_left_value_3;
PyObject *tmp_or_right_value_1;
PyObject *tmp_or_right_value_2;
PyObject *tmp_or_right_value_3;
PyObject *tmp_raise_type_1;
PyObject *tmp_raise_type_2;
PyObject *tmp_raise_type_3;
PyObject *tmp_raise_type_4;
PyObject *tmp_raise_type_5;
PyObject *tmp_raise_type_6;
PyObject *tmp_raise_type_7;
PyObject *tmp_raise_type_8;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_right_name_9;
PyObject *tmp_right_name_10;
PyObject *tmp_right_name_11;
PyObject *tmp_right_name_12;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_source_name_6;
PyObject *tmp_source_name_7;
PyObject *tmp_source_name_8;
PyObject *tmp_source_name_9;
PyObject *tmp_source_name_10;
PyObject *tmp_source_name_11;
PyObject *tmp_source_name_12;
PyObject *tmp_source_name_13;
PyObject *tmp_source_name_14;
PyObject *tmp_source_name_15;
PyObject *tmp_source_name_16;
PyObject *tmp_source_name_17;
PyObject *tmp_source_name_18;
PyObject *tmp_source_name_19;
PyObject *tmp_source_name_20;
PyObject *tmp_source_name_21;
PyObject *tmp_source_name_22;
PyObject *tmp_source_name_23;
PyObject *tmp_source_name_24;
PyObject *tmp_source_name_25;
PyObject *tmp_source_name_26;
PyObject *tmp_source_name_27;
PyObject *tmp_source_name_28;
PyObject *tmp_source_name_29;
PyObject *tmp_source_name_30;
PyObject *tmp_source_name_31;
PyObject *tmp_source_name_32;
PyObject *tmp_source_name_33;
PyObject *tmp_source_name_34;
PyObject *tmp_source_name_35;
PyObject *tmp_source_name_36;
PyObject *tmp_source_name_37;
PyObject *tmp_source_name_38;
PyObject *tmp_source_name_39;
PyObject *tmp_source_name_40;
PyObject *tmp_source_name_41;
PyObject *tmp_source_name_42;
PyObject *tmp_source_name_43;
PyObject *tmp_source_name_44;
PyObject *tmp_source_name_45;
PyObject *tmp_source_name_46;
PyObject *tmp_source_name_47;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_tuple_element_3;
PyObject *tmp_tuple_element_4;
PyObject *tmp_tuple_element_5;
PyObject *tmp_unpack_1;
PyObject *tmp_unpack_2;
PyObject *tmp_unpack_3;
PyObject *tmp_unpack_4;
NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_6192c23cf938043a03b6b291141acecd, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1716;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_asarray );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1716;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_x;
frame_function->f_lineno = 1716;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_left_name_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1716;
goto frame_exception_exit_1;
}
tmp_right_name_1 = const_float_0_0;
tmp_assign_source_1 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1716;
goto frame_exception_exit_1;
}
{
PyObject *old = par_x;
assert( old != NULL );
par_x = tmp_assign_source_1;
Py_DECREF( old );
}
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1717;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_asarray );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1717;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = par_y;
frame_function->f_lineno = 1717;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_left_name_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1717;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_float_0_0;
tmp_assign_source_2 = BINARY_OPERATION_ADD( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1717;
goto frame_exception_exit_1;
}
{
PyObject *old = par_y;
assert( old != NULL );
par_y = tmp_assign_source_2;
Py_DECREF( old );
}
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1718;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_asarray );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1718;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_deg;
frame_function->f_lineno = 1718;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_assign_source_3 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1718;
goto frame_exception_exit_1;
}
{
PyObject *old = par_deg;
assert( old != NULL );
par_deg = tmp_assign_source_3;
Py_DECREF( old );
}
tmp_source_name_4 = par_deg;
tmp_compexpr_left_1 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_ndim );
if ( tmp_compexpr_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
tmp_compexpr_right_1 = const_int_pos_1;
tmp_or_left_value_1 = RICH_COMPARE_GT( tmp_compexpr_left_1, tmp_compexpr_right_1 );
Py_DECREF( tmp_compexpr_left_1 );
if ( tmp_or_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
tmp_or_left_truth_1 = CHECK_IF_TRUE( tmp_or_left_value_1 );
if ( tmp_or_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_or_left_value_1 );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
if ( tmp_or_left_truth_1 == 1 )
{
goto or_left_1;
}
else
{
goto or_right_1;
}
or_right_1:;
Py_DECREF( tmp_or_left_value_1 );
tmp_source_name_6 = par_deg;
tmp_source_name_5 = LOOKUP_ATTRIBUTE( tmp_source_name_6, const_str_plain_dtype );
if ( tmp_source_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
tmp_compexpr_left_2 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_kind );
Py_DECREF( tmp_source_name_5 );
if ( tmp_compexpr_left_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
tmp_compexpr_right_2 = const_str_plain_iu;
tmp_or_left_value_2 = SEQUENCE_CONTAINS_NOT( tmp_compexpr_left_2, tmp_compexpr_right_2 );
Py_DECREF( tmp_compexpr_left_2 );
if ( tmp_or_left_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
tmp_or_left_truth_2 = CHECK_IF_TRUE( tmp_or_left_value_2 );
assert( !(tmp_or_left_truth_2 == -1) );
if ( tmp_or_left_truth_2 == 1 )
{
goto or_left_2;
}
else
{
goto or_right_2;
}
or_right_2:;
tmp_source_name_7 = par_deg;
tmp_compexpr_left_3 = LOOKUP_ATTRIBUTE( tmp_source_name_7, const_str_plain_size );
if ( tmp_compexpr_left_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
tmp_compexpr_right_3 = const_int_0;
tmp_or_right_value_2 = RICH_COMPARE_EQ( tmp_compexpr_left_3, tmp_compexpr_right_3 );
Py_DECREF( tmp_compexpr_left_3 );
if ( tmp_or_right_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
tmp_or_right_value_1 = tmp_or_right_value_2;
goto or_end_2;
or_left_2:;
Py_INCREF( tmp_or_left_value_2 );
tmp_or_right_value_1 = tmp_or_left_value_2;
or_end_2:;
tmp_cond_value_1 = tmp_or_right_value_1;
goto or_end_1;
or_left_1:;
tmp_cond_value_1 = tmp_or_left_value_1;
or_end_1:;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_1 );
exception_lineno = 1721;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_86bddf8ddd67e49da0bc28efd50b11b2;
frame_function->f_lineno = 1722;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1722;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
tmp_source_name_8 = par_deg;
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_8, const_str_plain_min );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1723;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1723;
tmp_compare_left_1 = CALL_FUNCTION_NO_ARGS( tmp_called_name_4 );
Py_DECREF( tmp_called_name_4 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1723;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_int_0;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 1723;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_make_exception_arg_2 = const_str_digest_58b9c2de86cf9b3c187794eb33218cee;
frame_function->f_lineno = 1724;
{
PyObject *call_args[] = { tmp_make_exception_arg_2 };
tmp_raise_type_2 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_2 != NULL );
exception_type = tmp_raise_type_2;
exception_lineno = 1724;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_2:;
tmp_source_name_9 = par_x;
tmp_compare_left_2 = LOOKUP_ATTRIBUTE( tmp_source_name_9, const_str_plain_ndim );
if ( tmp_compare_left_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1725;
goto frame_exception_exit_1;
}
tmp_compare_right_2 = const_int_pos_1;
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_2 );
exception_lineno = 1725;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_2 );
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_3;
}
else
{
goto branch_no_3;
}
branch_yes_3:;
tmp_make_exception_arg_3 = const_str_digest_7776c2b4c0f21c76e792d8c463042f37;
frame_function->f_lineno = 1726;
{
PyObject *call_args[] = { tmp_make_exception_arg_3 };
tmp_raise_type_3 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
}
assert( tmp_raise_type_3 != NULL );
exception_type = tmp_raise_type_3;
exception_lineno = 1726;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_3:;
tmp_source_name_10 = par_x;
tmp_compare_left_3 = LOOKUP_ATTRIBUTE( tmp_source_name_10, const_str_plain_size );
if ( tmp_compare_left_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1727;
goto frame_exception_exit_1;
}
tmp_compare_right_3 = const_int_0;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_3, tmp_compare_right_3 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_3 );
exception_lineno = 1727;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_3 );
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_4;
}
else
{
goto branch_no_4;
}
branch_yes_4:;
tmp_make_exception_arg_4 = const_str_digest_470eccc427becdbaa48f7e4c1af24ff5;
frame_function->f_lineno = 1728;
{
PyObject *call_args[] = { tmp_make_exception_arg_4 };
tmp_raise_type_4 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
}
assert( tmp_raise_type_4 != NULL );
exception_type = tmp_raise_type_4;
exception_lineno = 1728;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_4:;
tmp_source_name_11 = par_y;
tmp_compexpr_left_4 = LOOKUP_ATTRIBUTE( tmp_source_name_11, const_str_plain_ndim );
if ( tmp_compexpr_left_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1729;
goto frame_exception_exit_1;
}
tmp_compexpr_right_4 = const_int_pos_1;
tmp_or_left_value_3 = RICH_COMPARE_LT( tmp_compexpr_left_4, tmp_compexpr_right_4 );
Py_DECREF( tmp_compexpr_left_4 );
if ( tmp_or_left_value_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1729;
goto frame_exception_exit_1;
}
tmp_or_left_truth_3 = CHECK_IF_TRUE( tmp_or_left_value_3 );
if ( tmp_or_left_truth_3 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_or_left_value_3 );
exception_lineno = 1729;
goto frame_exception_exit_1;
}
if ( tmp_or_left_truth_3 == 1 )
{
goto or_left_3;
}
else
{
goto or_right_3;
}
or_right_3:;
Py_DECREF( tmp_or_left_value_3 );
tmp_source_name_12 = par_y;
tmp_compexpr_left_5 = LOOKUP_ATTRIBUTE( tmp_source_name_12, const_str_plain_ndim );
if ( tmp_compexpr_left_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1729;
goto frame_exception_exit_1;
}
tmp_compexpr_right_5 = const_int_pos_2;
tmp_or_right_value_3 = RICH_COMPARE_GT( tmp_compexpr_left_5, tmp_compexpr_right_5 );
Py_DECREF( tmp_compexpr_left_5 );
if ( tmp_or_right_value_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1729;
goto frame_exception_exit_1;
}
tmp_cond_value_2 = tmp_or_right_value_3;
goto or_end_3;
or_left_3:;
tmp_cond_value_2 = tmp_or_left_value_3;
or_end_3:;
tmp_cond_truth_2 = CHECK_IF_TRUE( tmp_cond_value_2 );
if ( tmp_cond_truth_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_2 );
exception_lineno = 1729;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_2 );
if ( tmp_cond_truth_2 == 1 )
{
goto branch_yes_5;
}
else
{
goto branch_no_5;
}
branch_yes_5:;
tmp_make_exception_arg_5 = const_str_digest_3943f956186dfbaba7ee5555afa1df28;
frame_function->f_lineno = 1730;
{
PyObject *call_args[] = { tmp_make_exception_arg_5 };
tmp_raise_type_5 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
}
assert( tmp_raise_type_5 != NULL );
exception_type = tmp_raise_type_5;
exception_lineno = 1730;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_5:;
tmp_len_arg_1 = par_x;
tmp_compare_left_4 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1731;
goto frame_exception_exit_1;
}
tmp_len_arg_2 = par_y;
tmp_compare_right_4 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_compare_right_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_4 );
exception_lineno = 1731;
goto frame_exception_exit_1;
}
tmp_cmp_NotEq_2 = RICH_COMPARE_BOOL_NE( tmp_compare_left_4, tmp_compare_right_4 );
if ( tmp_cmp_NotEq_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_4 );
Py_DECREF( tmp_compare_right_4 );
exception_lineno = 1731;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_4 );
Py_DECREF( tmp_compare_right_4 );
if ( tmp_cmp_NotEq_2 == 1 )
{
goto branch_yes_6;
}
else
{
goto branch_no_6;
}
branch_yes_6:;
tmp_make_exception_arg_6 = const_str_digest_44e97c1c143647b689f32f77c9c8ec56;
frame_function->f_lineno = 1732;
{
PyObject *call_args[] = { tmp_make_exception_arg_6 };
tmp_raise_type_6 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
}
assert( tmp_raise_type_6 != NULL );
exception_type = tmp_raise_type_6;
exception_lineno = 1732;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_6:;
tmp_source_name_13 = par_deg;
tmp_compare_left_5 = LOOKUP_ATTRIBUTE( tmp_source_name_13, const_str_plain_ndim );
if ( tmp_compare_left_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1734;
goto frame_exception_exit_1;
}
tmp_compare_right_5 = const_int_0;
tmp_cmp_Eq_2 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_5, tmp_compare_right_5 );
if ( tmp_cmp_Eq_2 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_5 );
exception_lineno = 1734;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_5 );
if ( tmp_cmp_Eq_2 == 1 )
{
goto branch_yes_7;
}
else
{
goto branch_no_7;
}
branch_yes_7:;
tmp_assign_source_4 = par_deg;
assert( var_lmax == NULL );
Py_INCREF( tmp_assign_source_4 );
var_lmax = tmp_assign_source_4;
tmp_left_name_3 = var_lmax;
tmp_right_name_3 = const_int_pos_1;
tmp_assign_source_5 = BINARY_OPERATION_ADD( tmp_left_name_3, tmp_right_name_3 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1736;
goto frame_exception_exit_1;
}
assert( var_order == NULL );
var_order = tmp_assign_source_5;
tmp_called_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander );
if (unlikely( tmp_called_name_5 == NULL ))
{
tmp_called_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebvander );
}
if ( tmp_called_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebvander" );
exception_tb = NULL;
exception_lineno = 1737;
goto frame_exception_exit_1;
}
tmp_args_element_name_4 = par_x;
tmp_args_element_name_5 = var_lmax;
frame_function->f_lineno = 1737;
{
PyObject *call_args[] = { tmp_args_element_name_4, tmp_args_element_name_5 };
tmp_assign_source_6 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_5, call_args );
}
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1737;
goto frame_exception_exit_1;
}
assert( var_van == NULL );
var_van = tmp_assign_source_6;
goto branch_end_7;
branch_no_7:;
tmp_source_name_14 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_14 == NULL ))
{
tmp_source_name_14 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_14 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1739;
goto frame_exception_exit_1;
}
tmp_called_name_6 = LOOKUP_ATTRIBUTE( tmp_source_name_14, const_str_plain_sort );
if ( tmp_called_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1739;
goto frame_exception_exit_1;
}
tmp_args_element_name_6 = par_deg;
frame_function->f_lineno = 1739;
{
PyObject *call_args[] = { tmp_args_element_name_6 };
tmp_assign_source_7 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_6, call_args );
}
Py_DECREF( tmp_called_name_6 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1739;
goto frame_exception_exit_1;
}
{
PyObject *old = par_deg;
assert( old != NULL );
par_deg = tmp_assign_source_7;
Py_DECREF( old );
}
tmp_subscribed_name_1 = par_deg;
tmp_subscript_name_1 = const_int_neg_1;
tmp_assign_source_8 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1740;
goto frame_exception_exit_1;
}
assert( var_lmax == NULL );
var_lmax = tmp_assign_source_8;
tmp_len_arg_3 = par_deg;
tmp_assign_source_9 = BUILTIN_LEN( tmp_len_arg_3 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1741;
goto frame_exception_exit_1;
}
assert( var_order == NULL );
var_order = tmp_assign_source_9;
tmp_called_name_7 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander );
if (unlikely( tmp_called_name_7 == NULL ))
{
tmp_called_name_7 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebvander );
}
if ( tmp_called_name_7 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebvander" );
exception_tb = NULL;
exception_lineno = 1742;
goto frame_exception_exit_1;
}
tmp_args_element_name_7 = par_x;
tmp_args_element_name_8 = var_lmax;
frame_function->f_lineno = 1742;
{
PyObject *call_args[] = { tmp_args_element_name_7, tmp_args_element_name_8 };
tmp_subscribed_name_2 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_7, call_args );
}
if ( tmp_subscribed_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1742;
goto frame_exception_exit_1;
}
tmp_subscript_name_2 = PyTuple_New( 2 );
tmp_tuple_element_1 = const_slice_none_none_none;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_subscript_name_2, 0, tmp_tuple_element_1 );
tmp_tuple_element_1 = par_deg;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_subscript_name_2, 1, tmp_tuple_element_1 );
tmp_assign_source_10 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
Py_DECREF( tmp_subscribed_name_2 );
Py_DECREF( tmp_subscript_name_2 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1742;
goto frame_exception_exit_1;
}
assert( var_van == NULL );
var_van = tmp_assign_source_10;
branch_end_7:;
tmp_source_name_15 = var_van;
tmp_assign_source_11 = LOOKUP_ATTRIBUTE( tmp_source_name_15, const_str_plain_T );
if ( tmp_assign_source_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1745;
goto frame_exception_exit_1;
}
assert( var_lhs == NULL );
var_lhs = tmp_assign_source_11;
tmp_source_name_16 = par_y;
tmp_assign_source_12 = LOOKUP_ATTRIBUTE( tmp_source_name_16, const_str_plain_T );
if ( tmp_assign_source_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1746;
goto frame_exception_exit_1;
}
assert( var_rhs == NULL );
var_rhs = tmp_assign_source_12;
tmp_compare_left_6 = par_w;
tmp_compare_right_6 = Py_None;
tmp_isnot_1 = ( tmp_compare_left_6 != tmp_compare_right_6 );
if ( tmp_isnot_1 )
{
goto branch_yes_8;
}
else
{
goto branch_no_8;
}
branch_yes_8:;
tmp_source_name_17 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_17 == NULL ))
{
tmp_source_name_17 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_17 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1748;
goto frame_exception_exit_1;
}
tmp_called_name_8 = LOOKUP_ATTRIBUTE( tmp_source_name_17, const_str_plain_asarray );
if ( tmp_called_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1748;
goto frame_exception_exit_1;
}
tmp_args_element_name_9 = par_w;
frame_function->f_lineno = 1748;
{
PyObject *call_args[] = { tmp_args_element_name_9 };
tmp_left_name_4 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_8, call_args );
}
Py_DECREF( tmp_called_name_8 );
if ( tmp_left_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1748;
goto frame_exception_exit_1;
}
tmp_right_name_4 = const_float_0_0;
tmp_assign_source_13 = BINARY_OPERATION_ADD( tmp_left_name_4, tmp_right_name_4 );
Py_DECREF( tmp_left_name_4 );
if ( tmp_assign_source_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1748;
goto frame_exception_exit_1;
}
{
PyObject *old = par_w;
assert( old != NULL );
par_w = tmp_assign_source_13;
Py_DECREF( old );
}
tmp_source_name_18 = par_w;
tmp_compare_left_7 = LOOKUP_ATTRIBUTE( tmp_source_name_18, const_str_plain_ndim );
if ( tmp_compare_left_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1749;
goto frame_exception_exit_1;
}
tmp_compare_right_7 = const_int_pos_1;
tmp_cmp_NotEq_3 = RICH_COMPARE_BOOL_NE( tmp_compare_left_7, tmp_compare_right_7 );
if ( tmp_cmp_NotEq_3 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_7 );
exception_lineno = 1749;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_7 );
if ( tmp_cmp_NotEq_3 == 1 )
{
goto branch_yes_9;
}
else
{
goto branch_no_9;
}
branch_yes_9:;
tmp_make_exception_arg_7 = const_str_digest_38ddb95e1ec5856024db3736b3b90fc6;
frame_function->f_lineno = 1750;
{
PyObject *call_args[] = { tmp_make_exception_arg_7 };
tmp_raise_type_7 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
}
assert( tmp_raise_type_7 != NULL );
exception_type = tmp_raise_type_7;
exception_lineno = 1750;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_9:;
tmp_len_arg_4 = par_x;
tmp_compare_left_8 = BUILTIN_LEN( tmp_len_arg_4 );
if ( tmp_compare_left_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1751;
goto frame_exception_exit_1;
}
tmp_len_arg_5 = par_w;
tmp_compare_right_8 = BUILTIN_LEN( tmp_len_arg_5 );
if ( tmp_compare_right_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_8 );
exception_lineno = 1751;
goto frame_exception_exit_1;
}
tmp_cmp_NotEq_4 = RICH_COMPARE_BOOL_NE( tmp_compare_left_8, tmp_compare_right_8 );
if ( tmp_cmp_NotEq_4 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_8 );
Py_DECREF( tmp_compare_right_8 );
exception_lineno = 1751;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_8 );
Py_DECREF( tmp_compare_right_8 );
if ( tmp_cmp_NotEq_4 == 1 )
{
goto branch_yes_10;
}
else
{
goto branch_no_10;
}
branch_yes_10:;
tmp_make_exception_arg_8 = const_str_digest_b3b20c6499548f5f690faa8d63dd85e8;
frame_function->f_lineno = 1752;
{
PyObject *call_args[] = { tmp_make_exception_arg_8 };
tmp_raise_type_8 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
}
assert( tmp_raise_type_8 != NULL );
exception_type = tmp_raise_type_8;
exception_lineno = 1752;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_10:;
tmp_left_name_5 = var_lhs;
tmp_right_name_5 = par_w;
tmp_assign_source_14 = BINARY_OPERATION_MUL( tmp_left_name_5, tmp_right_name_5 );
if ( tmp_assign_source_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1755;
goto frame_exception_exit_1;
}
{
PyObject *old = var_lhs;
assert( old != NULL );
var_lhs = tmp_assign_source_14;
Py_DECREF( old );
}
tmp_left_name_6 = var_rhs;
tmp_right_name_6 = par_w;
tmp_assign_source_15 = BINARY_OPERATION_MUL( tmp_left_name_6, tmp_right_name_6 );
if ( tmp_assign_source_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1756;
goto frame_exception_exit_1;
}
{
PyObject *old = var_rhs;
assert( old != NULL );
var_rhs = tmp_assign_source_15;
Py_DECREF( old );
}
branch_no_8:;
tmp_compare_left_9 = par_rcond;
tmp_compare_right_9 = Py_None;
tmp_is_1 = ( tmp_compare_left_9 == tmp_compare_right_9 );
if ( tmp_is_1 )
{
goto branch_yes_11;
}
else
{
goto branch_no_11;
}
branch_yes_11:;
tmp_len_arg_6 = par_x;
tmp_left_name_7 = BUILTIN_LEN( tmp_len_arg_6 );
if ( tmp_left_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1760;
goto frame_exception_exit_1;
}
tmp_source_name_20 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_20 == NULL ))
{
tmp_source_name_20 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_20 == NULL )
{
Py_DECREF( tmp_left_name_7 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1760;
goto frame_exception_exit_1;
}
tmp_called_name_9 = LOOKUP_ATTRIBUTE( tmp_source_name_20, const_str_plain_finfo );
if ( tmp_called_name_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 1760;
goto frame_exception_exit_1;
}
tmp_source_name_21 = par_x;
tmp_args_element_name_10 = LOOKUP_ATTRIBUTE( tmp_source_name_21, const_str_plain_dtype );
if ( tmp_args_element_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_7 );
Py_DECREF( tmp_called_name_9 );
exception_lineno = 1760;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1760;
{
PyObject *call_args[] = { tmp_args_element_name_10 };
tmp_source_name_19 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_9, call_args );
}
Py_DECREF( tmp_called_name_9 );
Py_DECREF( tmp_args_element_name_10 );
if ( tmp_source_name_19 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 1760;
goto frame_exception_exit_1;
}
tmp_right_name_7 = LOOKUP_ATTRIBUTE( tmp_source_name_19, const_str_plain_eps );
Py_DECREF( tmp_source_name_19 );
if ( tmp_right_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_7 );
exception_lineno = 1760;
goto frame_exception_exit_1;
}
tmp_assign_source_16 = BINARY_OPERATION_MUL( tmp_left_name_7, tmp_right_name_7 );
Py_DECREF( tmp_left_name_7 );
Py_DECREF( tmp_right_name_7 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1760;
goto frame_exception_exit_1;
}
{
PyObject *old = par_rcond;
assert( old != NULL );
par_rcond = tmp_assign_source_16;
Py_DECREF( old );
}
branch_no_11:;
tmp_called_name_10 = LOOKUP_BUILTIN( const_str_plain_issubclass );
assert( tmp_called_name_10 != NULL );
tmp_source_name_23 = var_lhs;
tmp_source_name_22 = LOOKUP_ATTRIBUTE( tmp_source_name_23, const_str_plain_dtype );
if ( tmp_source_name_22 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1763;
goto frame_exception_exit_1;
}
tmp_args_element_name_11 = LOOKUP_ATTRIBUTE( tmp_source_name_22, const_str_plain_type );
Py_DECREF( tmp_source_name_22 );
if ( tmp_args_element_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1763;
goto frame_exception_exit_1;
}
tmp_source_name_24 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_24 == NULL ))
{
tmp_source_name_24 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_24 == NULL )
{
Py_DECREF( tmp_args_element_name_11 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1763;
goto frame_exception_exit_1;
}
tmp_args_element_name_12 = LOOKUP_ATTRIBUTE( tmp_source_name_24, const_str_plain_complexfloating );
if ( tmp_args_element_name_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_element_name_11 );
exception_lineno = 1763;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1763;
{
PyObject *call_args[] = { tmp_args_element_name_11, tmp_args_element_name_12 };
tmp_cond_value_3 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_10, call_args );
}
Py_DECREF( tmp_args_element_name_11 );
Py_DECREF( tmp_args_element_name_12 );
if ( tmp_cond_value_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1763;
goto frame_exception_exit_1;
}
tmp_cond_truth_3 = CHECK_IF_TRUE( tmp_cond_value_3 );
if ( tmp_cond_truth_3 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_3 );
exception_lineno = 1763;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_3 );
if ( tmp_cond_truth_3 == 1 )
{
goto branch_yes_12;
}
else
{
goto branch_no_12;
}
branch_yes_12:;
tmp_source_name_25 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_25 == NULL ))
{
tmp_source_name_25 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_25 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_called_name_11 = LOOKUP_ATTRIBUTE( tmp_source_name_25, const_str_plain_sqrt );
if ( tmp_called_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_source_name_27 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_27 == NULL ))
{
tmp_source_name_27 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_27 == NULL )
{
Py_DECREF( tmp_called_name_11 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_called_name_13 = LOOKUP_ATTRIBUTE( tmp_source_name_27, const_str_plain_square );
if ( tmp_called_name_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_source_name_28 = var_lhs;
tmp_args_element_name_14 = LOOKUP_ATTRIBUTE( tmp_source_name_28, const_str_plain_real );
if ( tmp_args_element_name_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
Py_DECREF( tmp_called_name_13 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1764;
{
PyObject *call_args[] = { tmp_args_element_name_14 };
tmp_left_name_8 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_13, call_args );
}
Py_DECREF( tmp_called_name_13 );
Py_DECREF( tmp_args_element_name_14 );
if ( tmp_left_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_source_name_29 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_29 == NULL ))
{
tmp_source_name_29 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_29 == NULL )
{
Py_DECREF( tmp_called_name_11 );
Py_DECREF( tmp_left_name_8 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_called_name_14 = LOOKUP_ATTRIBUTE( tmp_source_name_29, const_str_plain_square );
if ( tmp_called_name_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_source_name_30 = var_lhs;
tmp_args_element_name_15 = LOOKUP_ATTRIBUTE( tmp_source_name_30, const_str_plain_imag );
if ( tmp_args_element_name_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
Py_DECREF( tmp_left_name_8 );
Py_DECREF( tmp_called_name_14 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1764;
{
PyObject *call_args[] = { tmp_args_element_name_15 };
tmp_right_name_8 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_14, call_args );
}
Py_DECREF( tmp_called_name_14 );
Py_DECREF( tmp_args_element_name_15 );
if ( tmp_right_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_source_name_26 = BINARY_OPERATION_ADD( tmp_left_name_8, tmp_right_name_8 );
Py_DECREF( tmp_left_name_8 );
Py_DECREF( tmp_right_name_8 );
if ( tmp_source_name_26 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
tmp_called_name_12 = LOOKUP_ATTRIBUTE( tmp_source_name_26, const_str_plain_sum );
Py_DECREF( tmp_source_name_26 );
if ( tmp_called_name_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1764;
tmp_args_element_name_13 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_12, &PyTuple_GET_ITEM( const_tuple_int_pos_1_tuple, 0 ) );
Py_DECREF( tmp_called_name_12 );
if ( tmp_args_element_name_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_11 );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1764;
{
PyObject *call_args[] = { tmp_args_element_name_13 };
tmp_assign_source_17 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_11, call_args );
}
Py_DECREF( tmp_called_name_11 );
Py_DECREF( tmp_args_element_name_13 );
if ( tmp_assign_source_17 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1764;
goto frame_exception_exit_1;
}
assert( var_scl == NULL );
var_scl = tmp_assign_source_17;
goto branch_end_12;
branch_no_12:;
tmp_source_name_31 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_31 == NULL ))
{
tmp_source_name_31 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_31 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1766;
goto frame_exception_exit_1;
}
tmp_called_name_15 = LOOKUP_ATTRIBUTE( tmp_source_name_31, const_str_plain_sqrt );
if ( tmp_called_name_15 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1766;
goto frame_exception_exit_1;
}
tmp_source_name_33 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_33 == NULL ))
{
tmp_source_name_33 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_33 == NULL )
{
Py_DECREF( tmp_called_name_15 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1766;
goto frame_exception_exit_1;
}
tmp_called_name_17 = LOOKUP_ATTRIBUTE( tmp_source_name_33, const_str_plain_square );
if ( tmp_called_name_17 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_15 );
exception_lineno = 1766;
goto frame_exception_exit_1;
}
tmp_args_element_name_17 = var_lhs;
frame_function->f_lineno = 1766;
{
PyObject *call_args[] = { tmp_args_element_name_17 };
tmp_source_name_32 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_17, call_args );
}
Py_DECREF( tmp_called_name_17 );
if ( tmp_source_name_32 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_15 );
exception_lineno = 1766;
goto frame_exception_exit_1;
}
tmp_called_name_16 = LOOKUP_ATTRIBUTE( tmp_source_name_32, const_str_plain_sum );
Py_DECREF( tmp_source_name_32 );
if ( tmp_called_name_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_15 );
exception_lineno = 1766;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1766;
tmp_args_element_name_16 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_16, &PyTuple_GET_ITEM( const_tuple_int_pos_1_tuple, 0 ) );
Py_DECREF( tmp_called_name_16 );
if ( tmp_args_element_name_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_15 );
exception_lineno = 1766;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1766;
{
PyObject *call_args[] = { tmp_args_element_name_16 };
tmp_assign_source_18 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_15, call_args );
}
Py_DECREF( tmp_called_name_15 );
Py_DECREF( tmp_args_element_name_16 );
if ( tmp_assign_source_18 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1766;
goto frame_exception_exit_1;
}
assert( var_scl == NULL );
var_scl = tmp_assign_source_18;
branch_end_12:;
tmp_ass_subvalue_1 = const_int_pos_1;
tmp_ass_subscribed_1 = var_scl;
tmp_compexpr_left_6 = var_scl;
tmp_compexpr_right_6 = const_int_0;
tmp_ass_subscript_1 = RICH_COMPARE_EQ( tmp_compexpr_left_6, tmp_compexpr_right_6 );
if ( tmp_ass_subscript_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1767;
goto frame_exception_exit_1;
}
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subscript_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1767;
goto frame_exception_exit_1;
}
// Tried code:
tmp_source_name_34 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_la );
if (unlikely( tmp_source_name_34 == NULL ))
{
tmp_source_name_34 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_la );
}
if ( tmp_source_name_34 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "la" );
exception_tb = NULL;
exception_lineno = 1770;
goto try_except_handler_2;
}
tmp_called_name_18 = LOOKUP_ATTRIBUTE( tmp_source_name_34, const_str_plain_lstsq );
if ( tmp_called_name_18 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1770;
goto try_except_handler_2;
}
tmp_source_name_35 = var_lhs;
tmp_left_name_9 = LOOKUP_ATTRIBUTE( tmp_source_name_35, const_str_plain_T );
if ( tmp_left_name_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_18 );
exception_lineno = 1770;
goto try_except_handler_2;
}
tmp_right_name_9 = var_scl;
tmp_args_element_name_18 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_9, tmp_right_name_9 );
Py_DECREF( tmp_left_name_9 );
if ( tmp_args_element_name_18 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_18 );
exception_lineno = 1770;
goto try_except_handler_2;
}
tmp_source_name_36 = var_rhs;
tmp_args_element_name_19 = LOOKUP_ATTRIBUTE( tmp_source_name_36, const_str_plain_T );
if ( tmp_args_element_name_19 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_18 );
Py_DECREF( tmp_args_element_name_18 );
exception_lineno = 1770;
goto try_except_handler_2;
}
tmp_args_element_name_20 = par_rcond;
frame_function->f_lineno = 1770;
{
PyObject *call_args[] = { tmp_args_element_name_18, tmp_args_element_name_19, tmp_args_element_name_20 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS3( tmp_called_name_18, call_args );
}
Py_DECREF( tmp_called_name_18 );
Py_DECREF( tmp_args_element_name_18 );
Py_DECREF( tmp_args_element_name_19 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1770;
goto try_except_handler_2;
}
tmp_assign_source_19 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_19 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1770;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_19;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_20 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_20 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1770;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_20;
tmp_unpack_2 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_21 = UNPACK_NEXT( tmp_unpack_2, 1 );
if ( tmp_assign_source_21 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1770;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_2 == NULL );
tmp_tuple_unpack_1__element_2 = tmp_assign_source_21;
tmp_unpack_3 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_22 = UNPACK_NEXT( tmp_unpack_3, 2 );
if ( tmp_assign_source_22 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1770;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_3 == NULL );
tmp_tuple_unpack_1__element_3 = tmp_assign_source_22;
tmp_unpack_4 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_23 = UNPACK_NEXT( tmp_unpack_4, 3 );
if ( tmp_assign_source_23 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1770;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_4 == NULL );
tmp_tuple_unpack_1__element_4 = tmp_assign_source_23;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 4)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_3 );
tmp_tuple_unpack_1__element_3 = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_4 );
tmp_tuple_unpack_1__element_4 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_24 = tmp_tuple_unpack_1__element_1;
assert( var_c == NULL );
Py_INCREF( tmp_assign_source_24 );
var_c = tmp_assign_source_24;
tmp_assign_source_25 = tmp_tuple_unpack_1__element_2;
assert( var_resids == NULL );
Py_INCREF( tmp_assign_source_25 );
var_resids = tmp_assign_source_25;
tmp_assign_source_26 = tmp_tuple_unpack_1__element_3;
assert( var_rank == NULL );
Py_INCREF( tmp_assign_source_26 );
var_rank = tmp_assign_source_26;
tmp_assign_source_27 = tmp_tuple_unpack_1__element_4;
assert( var_s == NULL );
Py_INCREF( tmp_assign_source_27 );
var_s = tmp_assign_source_27;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_2 );
Py_DECREF( tmp_tuple_unpack_1__element_2 );
tmp_tuple_unpack_1__element_2 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_3 );
Py_DECREF( tmp_tuple_unpack_1__element_3 );
tmp_tuple_unpack_1__element_3 = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_4 );
Py_DECREF( tmp_tuple_unpack_1__element_4 );
tmp_tuple_unpack_1__element_4 = NULL;
tmp_source_name_38 = var_c;
tmp_left_name_10 = LOOKUP_ATTRIBUTE( tmp_source_name_38, const_str_plain_T );
if ( tmp_left_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1771;
goto frame_exception_exit_1;
}
tmp_right_name_10 = var_scl;
tmp_source_name_37 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_10, tmp_right_name_10 );
Py_DECREF( tmp_left_name_10 );
if ( tmp_source_name_37 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1771;
goto frame_exception_exit_1;
}
tmp_assign_source_28 = LOOKUP_ATTRIBUTE( tmp_source_name_37, const_str_plain_T );
Py_DECREF( tmp_source_name_37 );
if ( tmp_assign_source_28 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1771;
goto frame_exception_exit_1;
}
{
PyObject *old = var_c;
assert( old != NULL );
var_c = tmp_assign_source_28;
Py_DECREF( old );
}
tmp_source_name_39 = par_deg;
tmp_compare_left_10 = LOOKUP_ATTRIBUTE( tmp_source_name_39, const_str_plain_ndim );
if ( tmp_compare_left_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1774;
goto frame_exception_exit_1;
}
tmp_compare_right_10 = const_int_0;
tmp_cmp_Gt_1 = RICH_COMPARE_BOOL_GT( tmp_compare_left_10, tmp_compare_right_10 );
if ( tmp_cmp_Gt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_10 );
exception_lineno = 1774;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_10 );
if ( tmp_cmp_Gt_1 == 1 )
{
goto branch_yes_13;
}
else
{
goto branch_no_13;
}
branch_yes_13:;
tmp_source_name_40 = var_c;
tmp_compare_left_11 = LOOKUP_ATTRIBUTE( tmp_source_name_40, const_str_plain_ndim );
if ( tmp_compare_left_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1775;
goto frame_exception_exit_1;
}
tmp_compare_right_11 = const_int_pos_2;
tmp_cmp_Eq_3 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_11, tmp_compare_right_11 );
if ( tmp_cmp_Eq_3 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_11 );
exception_lineno = 1775;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_11 );
if ( tmp_cmp_Eq_3 == 1 )
{
goto branch_yes_14;
}
else
{
goto branch_no_14;
}
branch_yes_14:;
tmp_source_name_41 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_41 == NULL ))
{
tmp_source_name_41 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_41 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1776;
goto frame_exception_exit_1;
}
tmp_called_name_19 = LOOKUP_ATTRIBUTE( tmp_source_name_41, const_str_plain_zeros );
if ( tmp_called_name_19 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1776;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_2 = PyTuple_New( 2 );
tmp_left_name_11 = var_lmax;
tmp_right_name_11 = const_int_pos_1;
tmp_tuple_element_3 = BINARY_OPERATION_ADD( tmp_left_name_11, tmp_right_name_11 );
if ( tmp_tuple_element_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_19 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_tuple_element_2 );
exception_lineno = 1776;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_tuple_element_2, 0, tmp_tuple_element_3 );
tmp_source_name_42 = var_c;
tmp_subscribed_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_42, const_str_plain_shape );
if ( tmp_subscribed_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_19 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_tuple_element_2 );
exception_lineno = 1776;
goto frame_exception_exit_1;
}
tmp_subscript_name_3 = const_int_pos_1;
tmp_tuple_element_3 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
Py_DECREF( tmp_subscribed_name_3 );
if ( tmp_tuple_element_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_19 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_tuple_element_2 );
exception_lineno = 1776;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_tuple_element_2, 1, tmp_tuple_element_3 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_2 );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_43 = var_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_43, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_19 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 1776;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 1776;
tmp_assign_source_29 = CALL_FUNCTION( tmp_called_name_19, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_19 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_29 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1776;
goto frame_exception_exit_1;
}
assert( var_cc == NULL );
var_cc = tmp_assign_source_29;
goto branch_end_14;
branch_no_14:;
tmp_source_name_44 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_44 == NULL ))
{
tmp_source_name_44 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_44 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1778;
goto frame_exception_exit_1;
}
tmp_called_name_20 = LOOKUP_ATTRIBUTE( tmp_source_name_44, const_str_plain_zeros );
if ( tmp_called_name_20 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1778;
goto frame_exception_exit_1;
}
tmp_args_name_2 = PyTuple_New( 1 );
tmp_left_name_12 = var_lmax;
tmp_right_name_12 = const_int_pos_1;
tmp_tuple_element_4 = BINARY_OPERATION_ADD( tmp_left_name_12, tmp_right_name_12 );
if ( tmp_tuple_element_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_20 );
Py_DECREF( tmp_args_name_2 );
exception_lineno = 1778;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_args_name_2, 0, tmp_tuple_element_4 );
tmp_kw_name_2 = _PyDict_NewPresized( 1 );
tmp_source_name_45 = var_c;
tmp_dict_value_2 = LOOKUP_ATTRIBUTE( tmp_source_name_45, const_str_plain_dtype );
if ( tmp_dict_value_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_20 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
exception_lineno = 1778;
goto frame_exception_exit_1;
}
tmp_dict_key_2 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_2, tmp_dict_key_2, tmp_dict_value_2 );
Py_DECREF( tmp_dict_value_2 );
frame_function->f_lineno = 1778;
tmp_assign_source_30 = CALL_FUNCTION( tmp_called_name_20, tmp_args_name_2, tmp_kw_name_2 );
Py_DECREF( tmp_called_name_20 );
Py_DECREF( tmp_args_name_2 );
Py_DECREF( tmp_kw_name_2 );
if ( tmp_assign_source_30 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1778;
goto frame_exception_exit_1;
}
assert( var_cc == NULL );
var_cc = tmp_assign_source_30;
branch_end_14:;
tmp_ass_subvalue_2 = var_c;
tmp_ass_subscribed_2 = var_cc;
tmp_ass_subscript_2 = par_deg;
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_2, tmp_ass_subscript_2, tmp_ass_subvalue_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1779;
goto frame_exception_exit_1;
}
tmp_assign_source_31 = var_cc;
{
PyObject *old = var_c;
assert( old != NULL );
var_c = tmp_assign_source_31;
Py_INCREF( var_c );
Py_DECREF( old );
}
branch_no_13:;
tmp_compexpr_left_7 = var_rank;
tmp_compexpr_right_7 = var_order;
tmp_and_left_value_1 = RICH_COMPARE_NE( tmp_compexpr_left_7, tmp_compexpr_right_7 );
if ( tmp_and_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1783;
goto frame_exception_exit_1;
}
tmp_and_left_truth_1 = CHECK_IF_TRUE( tmp_and_left_value_1 );
if ( tmp_and_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_and_left_value_1 );
exception_lineno = 1783;
goto frame_exception_exit_1;
}
if ( tmp_and_left_truth_1 == 1 )
{
goto and_right_1;
}
else
{
goto and_left_1;
}
and_right_1:;
Py_DECREF( tmp_and_left_value_1 );
tmp_operand_name_1 = par_full;
tmp_and_right_value_1 = UNARY_OPERATION( UNARY_NOT, tmp_operand_name_1 );
if ( tmp_and_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1783;
goto frame_exception_exit_1;
}
Py_INCREF( tmp_and_right_value_1 );
tmp_cond_value_4 = tmp_and_right_value_1;
goto and_end_1;
and_left_1:;
tmp_cond_value_4 = tmp_and_left_value_1;
and_end_1:;
tmp_cond_truth_4 = CHECK_IF_TRUE( tmp_cond_value_4 );
if ( tmp_cond_truth_4 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_4 );
exception_lineno = 1783;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_4 );
if ( tmp_cond_truth_4 == 1 )
{
goto branch_yes_15;
}
else
{
goto branch_no_15;
}
branch_yes_15:;
tmp_source_name_46 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_warnings );
if (unlikely( tmp_source_name_46 == NULL ))
{
tmp_source_name_46 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_warnings );
}
if ( tmp_source_name_46 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "warnings" );
exception_tb = NULL;
exception_lineno = 1785;
goto frame_exception_exit_1;
}
tmp_called_name_21 = LOOKUP_ATTRIBUTE( tmp_source_name_46, const_str_plain_warn );
if ( tmp_called_name_21 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1785;
goto frame_exception_exit_1;
}
tmp_args_element_name_21 = const_str_digest_417a5d06d4d954b63a0b0e1634b358ab;
tmp_source_name_47 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_47 == NULL ))
{
tmp_source_name_47 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_47 == NULL )
{
Py_DECREF( tmp_called_name_21 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 1785;
goto frame_exception_exit_1;
}
tmp_args_element_name_22 = LOOKUP_ATTRIBUTE( tmp_source_name_47, const_str_plain_RankWarning );
if ( tmp_args_element_name_22 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_21 );
exception_lineno = 1785;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1785;
{
PyObject *call_args[] = { tmp_args_element_name_21, tmp_args_element_name_22 };
tmp_unused = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_21, call_args );
}
Py_DECREF( tmp_called_name_21 );
Py_DECREF( tmp_args_element_name_22 );
if ( tmp_unused == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1785;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_unused );
branch_no_15:;
tmp_cond_value_5 = par_full;
tmp_cond_truth_5 = CHECK_IF_TRUE( tmp_cond_value_5 );
if ( tmp_cond_truth_5 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1787;
goto frame_exception_exit_1;
}
if ( tmp_cond_truth_5 == 1 )
{
goto branch_yes_16;
}
else
{
goto branch_no_16;
}
branch_yes_16:;
tmp_return_value = PyTuple_New( 2 );
tmp_tuple_element_5 = var_c;
Py_INCREF( tmp_tuple_element_5 );
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_5 );
tmp_tuple_element_5 = PyList_New( 4 );
tmp_list_element_1 = var_resids;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_tuple_element_5, 0, tmp_list_element_1 );
tmp_list_element_1 = var_rank;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_tuple_element_5, 1, tmp_list_element_1 );
tmp_list_element_1 = var_s;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_tuple_element_5, 2, tmp_list_element_1 );
tmp_list_element_1 = par_rcond;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_tuple_element_5, 3, tmp_list_element_1 );
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_5 );
goto frame_return_exit_1;
goto branch_end_16;
branch_no_16:;
tmp_return_value = var_c;
Py_INCREF( tmp_return_value );
goto frame_return_exit_1;
branch_end_16:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( par_y )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_y,
par_y
);
assert( res == 0 );
}
if ( par_deg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_deg,
par_deg
);
assert( res == 0 );
}
if ( par_rcond )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_rcond,
par_rcond
);
assert( res == 0 );
}
if ( par_full )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_full,
par_full
);
assert( res == 0 );
}
if ( par_w )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_w,
par_w
);
assert( res == 0 );
}
if ( var_lmax )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_lmax,
var_lmax
);
assert( res == 0 );
}
if ( var_order )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_order,
var_order
);
assert( res == 0 );
}
if ( var_van )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_van,
var_van
);
assert( res == 0 );
}
if ( var_lhs )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_lhs,
var_lhs
);
assert( res == 0 );
}
if ( var_rhs )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_rhs,
var_rhs
);
assert( res == 0 );
}
if ( var_scl )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_scl,
var_scl
);
assert( res == 0 );
}
if ( var_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
var_c
);
assert( res == 0 );
}
if ( var_resids )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_resids,
var_resids
);
assert( res == 0 );
}
if ( var_rank )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_rank,
var_rank
);
assert( res == 0 );
}
if ( var_s )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_s,
var_s
);
assert( res == 0 );
}
if ( var_cc )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_cc,
var_cc
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_27_chebfit );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
CHECK_OBJECT( (PyObject *)par_rcond );
Py_DECREF( par_rcond );
par_rcond = NULL;
CHECK_OBJECT( (PyObject *)par_full );
Py_DECREF( par_full );
par_full = NULL;
CHECK_OBJECT( (PyObject *)par_w );
Py_DECREF( par_w );
par_w = NULL;
CHECK_OBJECT( (PyObject *)var_lmax );
Py_DECREF( var_lmax );
var_lmax = NULL;
CHECK_OBJECT( (PyObject *)var_order );
Py_DECREF( var_order );
var_order = NULL;
CHECK_OBJECT( (PyObject *)var_van );
Py_DECREF( var_van );
var_van = NULL;
CHECK_OBJECT( (PyObject *)var_lhs );
Py_DECREF( var_lhs );
var_lhs = NULL;
CHECK_OBJECT( (PyObject *)var_rhs );
Py_DECREF( var_rhs );
var_rhs = NULL;
CHECK_OBJECT( (PyObject *)var_scl );
Py_DECREF( var_scl );
var_scl = NULL;
CHECK_OBJECT( (PyObject *)var_c );
Py_DECREF( var_c );
var_c = NULL;
CHECK_OBJECT( (PyObject *)var_resids );
Py_DECREF( var_resids );
var_resids = NULL;
CHECK_OBJECT( (PyObject *)var_rank );
Py_DECREF( var_rank );
var_rank = NULL;
CHECK_OBJECT( (PyObject *)var_s );
Py_DECREF( var_s );
var_s = NULL;
Py_XDECREF( var_cc );
var_cc = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)par_y );
Py_DECREF( par_y );
par_y = NULL;
Py_XDECREF( par_deg );
par_deg = NULL;
Py_XDECREF( par_rcond );
par_rcond = NULL;
CHECK_OBJECT( (PyObject *)par_full );
Py_DECREF( par_full );
par_full = NULL;
Py_XDECREF( par_w );
par_w = NULL;
Py_XDECREF( var_lmax );
var_lmax = NULL;
Py_XDECREF( var_order );
var_order = NULL;
Py_XDECREF( var_van );
var_van = NULL;
Py_XDECREF( var_lhs );
var_lhs = NULL;
Py_XDECREF( var_rhs );
var_rhs = NULL;
Py_XDECREF( var_scl );
var_scl = NULL;
Py_XDECREF( var_c );
var_c = NULL;
Py_XDECREF( var_resids );
var_resids = NULL;
Py_XDECREF( var_rank );
var_rank = NULL;
Py_XDECREF( var_s );
var_s = NULL;
Py_XDECREF( var_cc );
var_cc = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_27_chebfit );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_28_chebcompanion( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *var_n = NULL;
PyObject *var_mat = NULL;
PyObject *var_scl = NULL;
PyObject *var_top = NULL;
PyObject *var_bot = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *tmp_inplace_assign_subscr_1__target = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *exception_keeper_type_3;
PyObject *exception_keeper_value_3;
PyTracebackObject *exception_keeper_tb_3;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_name_1;
PyObject *tmp_ass_subscribed_1;
PyObject *tmp_ass_subscribed_2;
PyObject *tmp_ass_subscribed_3;
PyObject *tmp_ass_subscript_1;
PyObject *tmp_ass_subscript_2;
PyObject *tmp_ass_subscript_3;
int tmp_ass_subscript_res_1;
PyObject *tmp_ass_subvalue_1;
PyObject *tmp_ass_subvalue_2;
PyObject *tmp_ass_subvalue_3;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
PyObject *tmp_called_name_7;
PyObject *tmp_called_name_8;
int tmp_cmp_Eq_1;
int tmp_cmp_Lt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_left_name_7;
PyObject *tmp_left_name_8;
PyObject *tmp_left_name_9;
PyObject *tmp_left_name_10;
PyObject *tmp_left_name_11;
PyObject *tmp_left_name_12;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_len_arg_3;
PyObject *tmp_list_element_1;
PyObject *tmp_list_element_2;
PyObject *tmp_list_element_3;
PyObject *tmp_list_element_4;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_operand_name_1;
PyObject *tmp_raise_type_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_right_name_7;
PyObject *tmp_right_name_8;
PyObject *tmp_right_name_9;
PyObject *tmp_right_name_10;
PyObject *tmp_right_name_11;
PyObject *tmp_right_name_12;
Py_ssize_t tmp_slice_index_upper_1;
PyObject *tmp_slice_source_1;
Py_ssize_t tmp_sliceass_index_upper_1;
PyObject *tmp_sliceass_target_1;
PyObject *tmp_sliceass_value_1;
Py_ssize_t tmp_sliceassslicedel_index_lower_1;
Py_ssize_t tmp_sliceslicedel_index_lower_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_source_name_6;
PyObject *tmp_source_name_7;
PyObject *tmp_source_name_8;
PyObject *tmp_source_name_9;
PyObject *tmp_start_name_1;
PyObject *tmp_start_name_2;
PyObject *tmp_step_name_1;
PyObject *tmp_step_name_2;
PyObject *tmp_stop_name_1;
PyObject *tmp_stop_name_2;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscribed_name_3;
PyObject *tmp_subscribed_name_4;
PyObject *tmp_subscribed_name_5;
PyObject *tmp_subscribed_name_6;
PyObject *tmp_subscribed_name_7;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_subscript_name_3;
PyObject *tmp_subscript_name_4;
PyObject *tmp_subscript_name_5;
PyObject *tmp_subscript_name_6;
PyObject *tmp_subscript_name_7;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_unpack_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_b748062eaaf5bababb7639bbf5a9a89d, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 1820;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1820;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 1 );
tmp_list_element_1 = par_c;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
frame_function->f_lineno = 1820;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1820;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1820;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1820;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 1)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_3 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_3;
Py_INCREF( par_c );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
tmp_len_arg_1 = par_c;
tmp_compare_left_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1821;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_int_pos_2;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 1821;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_af327786ef70d70118fb639ec7c50f4e;
frame_function->f_lineno = 1822;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1822;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
tmp_len_arg_2 = par_c;
tmp_compare_left_2 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_compare_left_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1823;
goto frame_exception_exit_1;
}
tmp_compare_right_2 = const_int_pos_2;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_2 );
exception_lineno = 1823;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_2 );
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1824;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_array );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1824;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = PyList_New( 1 );
tmp_list_element_2 = PyList_New( 1 );
tmp_subscribed_name_1 = par_c;
tmp_subscript_name_1 = const_int_0;
tmp_operand_name_1 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_operand_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_2 );
Py_DECREF( tmp_list_element_2 );
exception_lineno = 1824;
goto frame_exception_exit_1;
}
tmp_left_name_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
Py_DECREF( tmp_operand_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_2 );
Py_DECREF( tmp_list_element_2 );
exception_lineno = 1824;
goto frame_exception_exit_1;
}
tmp_subscribed_name_2 = par_c;
tmp_subscript_name_2 = const_int_pos_1;
tmp_right_name_1 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_2 );
Py_DECREF( tmp_list_element_2 );
Py_DECREF( tmp_left_name_1 );
exception_lineno = 1824;
goto frame_exception_exit_1;
}
tmp_list_element_3 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
Py_DECREF( tmp_right_name_1 );
if ( tmp_list_element_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_2 );
Py_DECREF( tmp_list_element_2 );
exception_lineno = 1824;
goto frame_exception_exit_1;
}
PyList_SET_ITEM( tmp_list_element_2, 0, tmp_list_element_3 );
PyList_SET_ITEM( tmp_args_element_name_2, 0, tmp_list_element_2 );
frame_function->f_lineno = 1824;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_2 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1824;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
branch_no_2:;
tmp_len_arg_3 = par_c;
tmp_left_name_2 = BUILTIN_LEN( tmp_len_arg_3 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1826;
goto frame_exception_exit_1;
}
tmp_right_name_2 = const_int_pos_1;
tmp_assign_source_4 = BINARY_OPERATION_SUB( tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1826;
goto frame_exception_exit_1;
}
assert( var_n == NULL );
var_n = tmp_assign_source_4;
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1827;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_zeros );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1827;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 1 );
tmp_tuple_element_1 = PyTuple_New( 2 );
tmp_tuple_element_2 = var_n;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = var_n;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_tuple_element_1, 1, tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_4 = par_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 1827;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 1827;
tmp_assign_source_5 = CALL_FUNCTION( tmp_called_name_3, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1827;
goto frame_exception_exit_1;
}
assert( var_mat == NULL );
var_mat = tmp_assign_source_5;
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1828;
goto frame_exception_exit_1;
}
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_array );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1828;
goto frame_exception_exit_1;
}
tmp_left_name_3 = LIST_COPY( const_list_float_1_0_list );
tmp_left_name_4 = PyList_New( 1 );
tmp_source_name_6 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_6 == NULL ))
{
tmp_source_name_6 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_6 == NULL )
{
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_left_name_3 );
Py_DECREF( tmp_left_name_4 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1828;
goto frame_exception_exit_1;
}
tmp_called_name_5 = LOOKUP_ATTRIBUTE( tmp_source_name_6, const_str_plain_sqrt );
if ( tmp_called_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_left_name_3 );
Py_DECREF( tmp_left_name_4 );
exception_lineno = 1828;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1828;
tmp_list_element_4 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, &PyTuple_GET_ITEM( const_tuple_float_0_5_tuple, 0 ) );
Py_DECREF( tmp_called_name_5 );
if ( tmp_list_element_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_left_name_3 );
Py_DECREF( tmp_left_name_4 );
exception_lineno = 1828;
goto frame_exception_exit_1;
}
PyList_SET_ITEM( tmp_left_name_4, 0, tmp_list_element_4 );
tmp_left_name_5 = var_n;
tmp_right_name_5 = const_int_pos_1;
tmp_right_name_4 = BINARY_OPERATION_SUB( tmp_left_name_5, tmp_right_name_5 );
if ( tmp_right_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_left_name_3 );
Py_DECREF( tmp_left_name_4 );
exception_lineno = 1828;
goto frame_exception_exit_1;
}
tmp_right_name_3 = BINARY_OPERATION_MUL( tmp_left_name_4, tmp_right_name_4 );
Py_DECREF( tmp_left_name_4 );
Py_DECREF( tmp_right_name_4 );
if ( tmp_right_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_left_name_3 );
exception_lineno = 1828;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = BINARY_OPERATION_ADD( tmp_left_name_3, tmp_right_name_3 );
Py_DECREF( tmp_left_name_3 );
Py_DECREF( tmp_right_name_3 );
if ( tmp_args_element_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_4 );
exception_lineno = 1828;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1828;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_assign_source_6 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_4, call_args );
}
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_args_element_name_3 );
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1828;
goto frame_exception_exit_1;
}
assert( var_scl == NULL );
var_scl = tmp_assign_source_6;
tmp_source_name_7 = var_mat;
tmp_called_name_6 = LOOKUP_ATTRIBUTE( tmp_source_name_7, const_str_plain_reshape );
if ( tmp_called_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1829;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1829;
tmp_subscribed_name_3 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_6, &PyTuple_GET_ITEM( const_tuple_int_neg_1_tuple, 0 ) );
Py_DECREF( tmp_called_name_6 );
if ( tmp_subscribed_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1829;
goto frame_exception_exit_1;
}
tmp_start_name_1 = const_int_pos_1;
tmp_stop_name_1 = Py_None;
tmp_left_name_6 = var_n;
tmp_right_name_6 = const_int_pos_1;
tmp_step_name_1 = BINARY_OPERATION_ADD( tmp_left_name_6, tmp_right_name_6 );
if ( tmp_step_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_subscribed_name_3 );
exception_lineno = 1829;
goto frame_exception_exit_1;
}
tmp_subscript_name_3 = MAKE_SLICEOBJ3( tmp_start_name_1, tmp_stop_name_1, tmp_step_name_1 );
Py_DECREF( tmp_step_name_1 );
assert( tmp_subscript_name_3 != NULL );
tmp_assign_source_7 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_3, tmp_subscript_name_3 );
Py_DECREF( tmp_subscribed_name_3 );
Py_DECREF( tmp_subscript_name_3 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1829;
goto frame_exception_exit_1;
}
assert( var_top == NULL );
var_top = tmp_assign_source_7;
tmp_source_name_8 = var_mat;
tmp_called_name_7 = LOOKUP_ATTRIBUTE( tmp_source_name_8, const_str_plain_reshape );
if ( tmp_called_name_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1830;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1830;
tmp_subscribed_name_4 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_7, &PyTuple_GET_ITEM( const_tuple_int_neg_1_tuple, 0 ) );
Py_DECREF( tmp_called_name_7 );
if ( tmp_subscribed_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1830;
goto frame_exception_exit_1;
}
tmp_start_name_2 = var_n;
tmp_stop_name_2 = Py_None;
tmp_left_name_7 = var_n;
tmp_right_name_7 = const_int_pos_1;
tmp_step_name_2 = BINARY_OPERATION_ADD( tmp_left_name_7, tmp_right_name_7 );
if ( tmp_step_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_subscribed_name_4 );
exception_lineno = 1830;
goto frame_exception_exit_1;
}
tmp_subscript_name_4 = MAKE_SLICEOBJ3( tmp_start_name_2, tmp_stop_name_2, tmp_step_name_2 );
Py_DECREF( tmp_step_name_2 );
assert( tmp_subscript_name_4 != NULL );
tmp_assign_source_8 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_4, tmp_subscript_name_4 );
Py_DECREF( tmp_subscribed_name_4 );
Py_DECREF( tmp_subscript_name_4 );
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1830;
goto frame_exception_exit_1;
}
assert( var_bot == NULL );
var_bot = tmp_assign_source_8;
tmp_source_name_9 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_9 == NULL ))
{
tmp_source_name_9 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_9 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1831;
goto frame_exception_exit_1;
}
tmp_called_name_8 = LOOKUP_ATTRIBUTE( tmp_source_name_9, const_str_plain_sqrt );
if ( tmp_called_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1831;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1831;
tmp_ass_subvalue_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_8, &PyTuple_GET_ITEM( const_tuple_float_0_5_tuple, 0 ) );
Py_DECREF( tmp_called_name_8 );
if ( tmp_ass_subvalue_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1831;
goto frame_exception_exit_1;
}
tmp_ass_subscribed_1 = var_top;
tmp_ass_subscript_1 = const_int_0;
tmp_ass_subscript_res_1 = SET_SUBSCRIPT_CONST( tmp_ass_subscribed_1, tmp_ass_subscript_1, 0, tmp_ass_subvalue_1 );
Py_DECREF( tmp_ass_subvalue_1 );
if ( tmp_ass_subscript_res_1 == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1831;
goto frame_exception_exit_1;
}
tmp_sliceass_value_1 = const_float_0_5;
tmp_sliceass_target_1 = var_top;
tmp_sliceassslicedel_index_lower_1 = 1;
tmp_sliceass_index_upper_1 = PY_SSIZE_T_MAX;
tmp_result = SET_INDEX_SLICE( tmp_sliceass_target_1, tmp_sliceassslicedel_index_lower_1, tmp_sliceass_index_upper_1, tmp_sliceass_value_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1832;
goto frame_exception_exit_1;
}
tmp_ass_subvalue_2 = var_top;
tmp_ass_subscribed_2 = var_bot;
tmp_ass_subscript_2 = Py_Ellipsis;
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_2, tmp_ass_subscript_2, tmp_ass_subvalue_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1833;
goto frame_exception_exit_1;
}
tmp_assign_source_9 = var_mat;
assert( tmp_inplace_assign_subscr_1__target == NULL );
Py_INCREF( tmp_assign_source_9 );
tmp_inplace_assign_subscr_1__target = tmp_assign_source_9;
// Tried code:
tmp_subscribed_name_5 = tmp_inplace_assign_subscr_1__target;
tmp_subscript_name_5 = const_tuple_slice_none_none_none_int_neg_1_tuple;
tmp_left_name_8 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_5, tmp_subscript_name_5 );
if ( tmp_left_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_sliceslicedel_index_lower_1 = 0;
tmp_slice_index_upper_1 = -1;
tmp_slice_source_1 = par_c;
tmp_left_name_11 = LOOKUP_INDEX_SLICE( tmp_slice_source_1, tmp_sliceslicedel_index_lower_1, tmp_slice_index_upper_1 );
if ( tmp_left_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_subscribed_name_6 = par_c;
tmp_subscript_name_6 = const_int_neg_1;
tmp_right_name_9 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_6, tmp_subscript_name_6 );
if ( tmp_right_name_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
Py_DECREF( tmp_left_name_11 );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_left_name_10 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_11, tmp_right_name_9 );
Py_DECREF( tmp_left_name_11 );
Py_DECREF( tmp_right_name_9 );
if ( tmp_left_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_left_name_12 = var_scl;
tmp_subscribed_name_7 = var_scl;
tmp_subscript_name_7 = const_int_neg_1;
tmp_right_name_11 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_7, tmp_subscript_name_7 );
if ( tmp_right_name_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
Py_DECREF( tmp_left_name_10 );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_right_name_10 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_12, tmp_right_name_11 );
Py_DECREF( tmp_right_name_11 );
if ( tmp_right_name_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
Py_DECREF( tmp_left_name_10 );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_left_name_9 = BINARY_OPERATION_MUL( tmp_left_name_10, tmp_right_name_10 );
Py_DECREF( tmp_left_name_10 );
Py_DECREF( tmp_right_name_10 );
if ( tmp_left_name_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_right_name_12 = const_float_0_5;
tmp_right_name_8 = BINARY_OPERATION_MUL( tmp_left_name_9, tmp_right_name_12 );
Py_DECREF( tmp_left_name_9 );
if ( tmp_right_name_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_8 );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_ass_subvalue_3 = BINARY_OPERATION( PyNumber_InPlaceSubtract, tmp_left_name_8, tmp_right_name_8 );
Py_DECREF( tmp_left_name_8 );
Py_DECREF( tmp_right_name_8 );
if ( tmp_ass_subvalue_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1834;
goto try_except_handler_3;
}
tmp_ass_subscribed_3 = tmp_inplace_assign_subscr_1__target;
tmp_ass_subscript_3 = const_tuple_slice_none_none_none_int_neg_1_tuple;
tmp_result = SET_SUBSCRIPT( tmp_ass_subscribed_3, tmp_ass_subscript_3, tmp_ass_subvalue_3 );
Py_DECREF( tmp_ass_subvalue_3 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1834;
goto try_except_handler_3;
}
goto try_end_2;
// Exception handler code:
try_except_handler_3:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__target );
Py_DECREF( tmp_inplace_assign_subscr_1__target );
tmp_inplace_assign_subscr_1__target = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto frame_exception_exit_1;
// End of try:
try_end_2:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( var_n )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_n,
var_n
);
assert( res == 0 );
}
if ( var_mat )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_mat,
var_mat
);
assert( res == 0 );
}
if ( var_scl )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_scl,
var_scl
);
assert( res == 0 );
}
if ( var_top )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_top,
var_top
);
assert( res == 0 );
}
if ( var_bot )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_bot,
var_bot
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
CHECK_OBJECT( (PyObject *)tmp_inplace_assign_subscr_1__target );
Py_DECREF( tmp_inplace_assign_subscr_1__target );
tmp_inplace_assign_subscr_1__target = NULL;
tmp_return_value = var_mat;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_28_chebcompanion );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_mat );
var_mat = NULL;
Py_XDECREF( var_scl );
var_scl = NULL;
Py_XDECREF( var_top );
var_top = NULL;
Py_XDECREF( var_bot );
var_bot = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_3 = exception_type;
exception_keeper_value_3 = exception_value;
exception_keeper_tb_3 = exception_tb;
exception_keeper_lineno_3 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_n );
var_n = NULL;
Py_XDECREF( var_mat );
var_mat = NULL;
Py_XDECREF( var_scl );
var_scl = NULL;
Py_XDECREF( var_top );
var_top = NULL;
Py_XDECREF( var_bot );
var_bot = NULL;
// Re-raise.
exception_type = exception_keeper_type_3;
exception_value = exception_keeper_value_3;
exception_tb = exception_keeper_tb_3;
exception_lineno = exception_keeper_lineno_3;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_28_chebcompanion );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_29_chebroots( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_c = python_pars[ 0 ];
PyObject *var_m = NULL;
PyObject *var_r = NULL;
PyObject *tmp_tuple_unpack_1__source_iter = NULL;
PyObject *tmp_tuple_unpack_1__element_1 = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *exception_keeper_type_2;
PyObject *exception_keeper_value_2;
PyTracebackObject *exception_keeper_tb_2;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
int tmp_cmp_Eq_1;
int tmp_cmp_Lt_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_dict_key_1;
PyObject *tmp_dict_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_iter_arg_1;
PyObject *tmp_iterator_attempt;
PyObject *tmp_iterator_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_len_arg_1;
PyObject *tmp_len_arg_2;
PyObject *tmp_list_element_1;
PyObject *tmp_list_element_2;
PyObject *tmp_operand_name_1;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_source_name_6;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscribed_name_2;
PyObject *tmp_subscript_name_1;
PyObject *tmp_subscript_name_2;
PyObject *tmp_unpack_1;
NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_44580acb538b0b14f80bdf28eaa66d6a, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
// Tried code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 1882;
goto try_except_handler_2;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_as_series );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1882;
goto try_except_handler_2;
}
tmp_args_element_name_1 = PyList_New( 1 );
tmp_list_element_1 = par_c;
Py_INCREF( tmp_list_element_1 );
PyList_SET_ITEM( tmp_args_element_name_1, 0, tmp_list_element_1 );
frame_function->f_lineno = 1882;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_iter_arg_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_iter_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1882;
goto try_except_handler_2;
}
tmp_assign_source_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
Py_DECREF( tmp_iter_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1882;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__source_iter == NULL );
tmp_tuple_unpack_1__source_iter = tmp_assign_source_1;
tmp_unpack_1 = tmp_tuple_unpack_1__source_iter;
tmp_assign_source_2 = UNPACK_NEXT( tmp_unpack_1, 0 );
if ( tmp_assign_source_2 == NULL )
{
if ( !ERROR_OCCURRED() )
{
exception_type = PyExc_StopIteration;
Py_INCREF( exception_type );
exception_value = NULL;
exception_tb = NULL;
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
}
exception_lineno = 1882;
goto try_except_handler_2;
}
assert( tmp_tuple_unpack_1__element_1 == NULL );
tmp_tuple_unpack_1__element_1 = tmp_assign_source_2;
tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter;
// Check if iterator has left-over elements.
CHECK_OBJECT( tmp_iterator_name_1 ); assert( HAS_ITERNEXT( tmp_iterator_name_1 ) );
tmp_iterator_attempt = (*Py_TYPE( tmp_iterator_name_1 )->tp_iternext)( tmp_iterator_name_1 );
if (likely( tmp_iterator_attempt == NULL ))
{
PyObject *error = GET_ERROR_OCCURRED();
if ( error != NULL )
{
if ( EXCEPTION_MATCH_BOOL_SINGLE( error, PyExc_StopIteration ))
{
CLEAR_ERROR_OCCURRED();
}
else
{
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
}
}
else
{
Py_DECREF( tmp_iterator_attempt );
// TODO: Could avoid PyErr_Format.
#if PYTHON_VERSION < 300
PyErr_Format( PyExc_ValueError, "too many values to unpack" );
#else
PyErr_Format( PyExc_ValueError, "too many values to unpack (expected 1)" );
#endif
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_2;
}
goto try_end_1;
// Exception handler code:
try_except_handler_2:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
Py_XDECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
tmp_assign_source_3 = tmp_tuple_unpack_1__element_1;
{
PyObject *old = par_c;
assert( old != NULL );
par_c = tmp_assign_source_3;
Py_INCREF( par_c );
Py_DECREF( old );
}
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__source_iter );
Py_DECREF( tmp_tuple_unpack_1__source_iter );
tmp_tuple_unpack_1__source_iter = NULL;
CHECK_OBJECT( (PyObject *)tmp_tuple_unpack_1__element_1 );
Py_DECREF( tmp_tuple_unpack_1__element_1 );
tmp_tuple_unpack_1__element_1 = NULL;
tmp_len_arg_1 = par_c;
tmp_compare_left_1 = BUILTIN_LEN( tmp_len_arg_1 );
if ( tmp_compare_left_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1883;
goto frame_exception_exit_1;
}
tmp_compare_right_1 = const_int_pos_2;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_1 );
exception_lineno = 1883;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_1 );
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1884;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_array );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1884;
goto frame_exception_exit_1;
}
tmp_args_name_1 = DEEP_COPY( const_tuple_list_empty_tuple );
tmp_kw_name_1 = _PyDict_NewPresized( 1 );
tmp_source_name_3 = par_c;
tmp_dict_value_1 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_dtype );
if ( tmp_dict_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
exception_lineno = 1884;
goto frame_exception_exit_1;
}
tmp_dict_key_1 = const_str_plain_dtype;
PyDict_SetItem( tmp_kw_name_1, tmp_dict_key_1, tmp_dict_value_1 );
Py_DECREF( tmp_dict_value_1 );
frame_function->f_lineno = 1884;
tmp_return_value = CALL_FUNCTION( tmp_called_name_2, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1884;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
branch_no_1:;
tmp_len_arg_2 = par_c;
tmp_compare_left_2 = BUILTIN_LEN( tmp_len_arg_2 );
if ( tmp_compare_left_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1885;
goto frame_exception_exit_1;
}
tmp_compare_right_2 = const_int_pos_2;
tmp_cmp_Eq_1 = RICH_COMPARE_BOOL_EQ( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Eq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_compare_left_2 );
exception_lineno = 1885;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_compare_left_2 );
if ( tmp_cmp_Eq_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1886;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_array );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1886;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = PyList_New( 1 );
tmp_subscribed_name_1 = par_c;
tmp_subscript_name_1 = const_int_0;
tmp_operand_name_1 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_operand_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_2 );
exception_lineno = 1886;
goto frame_exception_exit_1;
}
tmp_left_name_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
Py_DECREF( tmp_operand_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_2 );
exception_lineno = 1886;
goto frame_exception_exit_1;
}
tmp_subscribed_name_2 = par_c;
tmp_subscript_name_2 = const_int_pos_1;
tmp_right_name_1 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_2, tmp_subscript_name_2 );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_2 );
Py_DECREF( tmp_left_name_1 );
exception_lineno = 1886;
goto frame_exception_exit_1;
}
tmp_list_element_2 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
Py_DECREF( tmp_right_name_1 );
if ( tmp_list_element_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_2 );
exception_lineno = 1886;
goto frame_exception_exit_1;
}
PyList_SET_ITEM( tmp_args_element_name_2, 0, tmp_list_element_2 );
frame_function->f_lineno = 1886;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_args_element_name_2 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1886;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
branch_no_2:;
tmp_called_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebcompanion );
if (unlikely( tmp_called_name_4 == NULL ))
{
tmp_called_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebcompanion );
}
if ( tmp_called_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "chebcompanion" );
exception_tb = NULL;
exception_lineno = 1888;
goto frame_exception_exit_1;
}
tmp_args_element_name_3 = par_c;
frame_function->f_lineno = 1888;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_assign_source_4 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_4, call_args );
}
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1888;
goto frame_exception_exit_1;
}
assert( var_m == NULL );
var_m = tmp_assign_source_4;
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_la );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_la );
}
if ( tmp_source_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "la" );
exception_tb = NULL;
exception_lineno = 1889;
goto frame_exception_exit_1;
}
tmp_called_name_5 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_eigvals );
if ( tmp_called_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1889;
goto frame_exception_exit_1;
}
tmp_args_element_name_4 = var_m;
frame_function->f_lineno = 1889;
{
PyObject *call_args[] = { tmp_args_element_name_4 };
tmp_assign_source_5 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, call_args );
}
Py_DECREF( tmp_called_name_5 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1889;
goto frame_exception_exit_1;
}
assert( var_r == NULL );
var_r = tmp_assign_source_5;
tmp_source_name_6 = var_r;
tmp_called_name_6 = LOOKUP_ATTRIBUTE( tmp_source_name_6, const_str_plain_sort );
if ( tmp_called_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1890;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1890;
tmp_unused = CALL_FUNCTION_NO_ARGS( tmp_called_name_6 );
Py_DECREF( tmp_called_name_6 );
if ( tmp_unused == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1890;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_unused );
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_c )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_c,
par_c
);
assert( res == 0 );
}
if ( var_m )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_m,
var_m
);
assert( res == 0 );
}
if ( var_r )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_r,
var_r
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = var_r;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_29_chebroots );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_m );
var_m = NULL;
Py_XDECREF( var_r );
var_r = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_2 = exception_type;
exception_keeper_value_2 = exception_value;
exception_keeper_tb_2 = exception_tb;
exception_keeper_lineno_2 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_c );
Py_DECREF( par_c );
par_c = NULL;
Py_XDECREF( var_m );
var_m = NULL;
Py_XDECREF( var_r );
var_r = NULL;
// Re-raise.
exception_type = exception_keeper_type_2;
exception_value = exception_keeper_value_2;
exception_tb = exception_keeper_tb_2;
exception_lineno = exception_keeper_lineno_2;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_29_chebroots );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_30_chebgauss( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_deg = python_pars[ 0 ];
PyObject *var_ideg = NULL;
PyObject *var_x = NULL;
PyObject *var_w = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_compexpr_left_1;
PyObject *tmp_compexpr_left_2;
PyObject *tmp_compexpr_right_1;
PyObject *tmp_compexpr_right_2;
int tmp_cond_truth_1;
PyObject *tmp_cond_value_1;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_left_name_5;
PyObject *tmp_left_name_6;
PyObject *tmp_make_exception_arg_1;
int tmp_or_left_truth_1;
PyObject *tmp_or_left_value_1;
PyObject *tmp_or_right_value_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_right_name_5;
PyObject *tmp_right_name_6;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_tuple_element_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_d451aebc789cda2cdc07f5b7a0077151, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_int_arg_1 = par_deg;
tmp_assign_source_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1929;
goto frame_exception_exit_1;
}
assert( var_ideg == NULL );
var_ideg = tmp_assign_source_1;
tmp_compexpr_left_1 = var_ideg;
tmp_compexpr_right_1 = par_deg;
tmp_or_left_value_1 = RICH_COMPARE_NE( tmp_compexpr_left_1, tmp_compexpr_right_1 );
if ( tmp_or_left_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1930;
goto frame_exception_exit_1;
}
tmp_or_left_truth_1 = CHECK_IF_TRUE( tmp_or_left_value_1 );
if ( tmp_or_left_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_or_left_value_1 );
exception_lineno = 1930;
goto frame_exception_exit_1;
}
if ( tmp_or_left_truth_1 == 1 )
{
goto or_left_1;
}
else
{
goto or_right_1;
}
or_right_1:;
Py_DECREF( tmp_or_left_value_1 );
tmp_compexpr_left_2 = var_ideg;
tmp_compexpr_right_2 = const_int_pos_1;
tmp_or_right_value_1 = RICH_COMPARE_LT( tmp_compexpr_left_2, tmp_compexpr_right_2 );
if ( tmp_or_right_value_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1930;
goto frame_exception_exit_1;
}
tmp_cond_value_1 = tmp_or_right_value_1;
goto or_end_1;
or_left_1:;
tmp_cond_value_1 = tmp_or_left_value_1;
or_end_1:;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_cond_value_1 );
exception_lineno = 1930;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_78d3d8feeb71a8226198d7883e3c64d2;
frame_function->f_lineno = 1931;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1931;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_cos );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
Py_DECREF( tmp_called_name_1 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_left_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_pi );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_left_name_2 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_arange );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = const_int_pos_1;
tmp_left_name_3 = const_int_pos_2;
tmp_right_name_2 = var_ideg;
tmp_args_element_name_3 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_2 );
if ( tmp_args_element_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_called_name_2 );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_args_element_name_4 = const_int_pos_2;
frame_function->f_lineno = 1933;
{
PyObject *call_args[] = { tmp_args_element_name_2, tmp_args_element_name_3, tmp_args_element_name_4 };
tmp_right_name_1 = CALL_FUNCTION_WITH_ARGS3( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_3 );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_left_name_1 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_1 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_right_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_left_name_4 = const_float_2_0;
tmp_right_name_4 = var_ideg;
tmp_right_name_3 = BINARY_OPERATION_MUL( tmp_left_name_4, tmp_right_name_4 );
if ( tmp_right_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_left_name_1 );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_1, tmp_right_name_3 );
Py_DECREF( tmp_left_name_1 );
Py_DECREF( tmp_right_name_3 );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1933;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1933;
goto frame_exception_exit_1;
}
assert( var_x == NULL );
var_x = tmp_assign_source_2;
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1934;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_ones );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1934;
goto frame_exception_exit_1;
}
tmp_args_element_name_5 = var_ideg;
frame_function->f_lineno = 1934;
{
PyObject *call_args[] = { tmp_args_element_name_5 };
tmp_left_name_5 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
if ( tmp_left_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1934;
goto frame_exception_exit_1;
}
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_5 == NULL )
{
Py_DECREF( tmp_left_name_5 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1934;
goto frame_exception_exit_1;
}
tmp_left_name_6 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_pi );
if ( tmp_left_name_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_5 );
exception_lineno = 1934;
goto frame_exception_exit_1;
}
tmp_right_name_6 = var_ideg;
tmp_right_name_5 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_6, tmp_right_name_6 );
Py_DECREF( tmp_left_name_6 );
if ( tmp_right_name_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_5 );
exception_lineno = 1934;
goto frame_exception_exit_1;
}
tmp_assign_source_3 = BINARY_OPERATION_MUL( tmp_left_name_5, tmp_right_name_5 );
Py_DECREF( tmp_left_name_5 );
Py_DECREF( tmp_right_name_5 );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1934;
goto frame_exception_exit_1;
}
assert( var_w == NULL );
var_w = tmp_assign_source_3;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_deg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_deg,
par_deg
);
assert( res == 0 );
}
if ( var_ideg )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_ideg,
var_ideg
);
assert( res == 0 );
}
if ( var_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
var_x
);
assert( res == 0 );
}
if ( var_w )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_w,
var_w
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = PyTuple_New( 2 );
tmp_tuple_element_1 = var_x;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
tmp_tuple_element_1 = var_w;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_30_chebgauss );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
CHECK_OBJECT( (PyObject *)var_ideg );
Py_DECREF( var_ideg );
var_ideg = NULL;
CHECK_OBJECT( (PyObject *)var_x );
Py_DECREF( var_x );
var_x = NULL;
CHECK_OBJECT( (PyObject *)var_w );
Py_DECREF( var_w );
var_w = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_deg );
Py_DECREF( par_deg );
par_deg = NULL;
Py_XDECREF( var_ideg );
var_ideg = NULL;
Py_XDECREF( var_x );
var_x = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_30_chebgauss );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_31_chebweight( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_x = python_pars[ 0 ];
PyObject *var_w = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_assign_source_1;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_frame_locals;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_left_name_4;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_right_name_4;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_d69d9d0178bd93314044488c8d975dfd, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_left_name_1 = const_float_1_0;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1963;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_sqrt );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
tmp_left_name_3 = const_float_1_0;
tmp_right_name_2 = par_x;
tmp_args_element_name_1 = BINARY_OPERATION_ADD( tmp_left_name_3, tmp_right_name_2 );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1963;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_left_name_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
Py_DECREF( tmp_left_name_2 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 1963;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_sqrt );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
tmp_left_name_4 = const_float_1_0;
tmp_right_name_4 = par_x;
tmp_args_element_name_2 = BINARY_OPERATION_SUB( tmp_left_name_4, tmp_right_name_4 );
if ( tmp_args_element_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_called_name_2 );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 1963;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_right_name_3 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_args_element_name_2 );
if ( tmp_right_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
tmp_right_name_1 = BINARY_OPERATION_MUL( tmp_left_name_2, tmp_right_name_3 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_right_name_3 );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
tmp_assign_source_1 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_right_name_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1963;
goto frame_exception_exit_1;
}
assert( var_w == NULL );
var_w = tmp_assign_source_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
par_x
);
assert( res == 0 );
}
if ( var_w )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_w,
var_w
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = var_w;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_31_chebweight );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
CHECK_OBJECT( (PyObject *)var_w );
Py_DECREF( var_w );
var_w = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_x );
Py_DECREF( par_x );
par_x = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_31_chebweight );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_32_chebpts1( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_npts = python_pars[ 0 ];
PyObject *var__npts = NULL;
PyObject *var_x = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
int tmp_cmp_Lt_1;
int tmp_cmp_NotEq_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_left_name_1;
PyObject *tmp_left_name_2;
PyObject *tmp_left_name_3;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_make_exception_arg_2;
PyObject *tmp_operand_name_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_raise_type_2;
PyObject *tmp_return_value;
PyObject *tmp_right_name_1;
PyObject *tmp_right_name_2;
PyObject *tmp_right_name_3;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_tuple_element_1;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_21cba8e29a9f5721941e3baaead8c7ac, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_int_arg_1 = par_npts;
tmp_assign_source_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1994;
goto frame_exception_exit_1;
}
assert( var__npts == NULL );
var__npts = tmp_assign_source_1;
tmp_compare_left_1 = var__npts;
tmp_compare_right_1 = par_npts;
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1995;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_a604b5227a4c36bb1219d6662b9216aa;
frame_function->f_lineno = 1996;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 1996;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
tmp_compare_left_2 = var__npts;
tmp_compare_right_2 = const_int_pos_1;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 1997;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_make_exception_arg_2 = const_str_digest_b54900484b539d63fd51e2cf640744a3;
frame_function->f_lineno = 1998;
{
PyObject *call_args[] = { tmp_make_exception_arg_2 };
tmp_raise_type_2 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_2 != NULL );
exception_type = tmp_raise_type_2;
exception_lineno = 1998;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_2:;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_linspace );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_args_name_1 = PyTuple_New( 3 );
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_operand_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_pi );
if ( tmp_operand_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_tuple_element_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
Py_DECREF( tmp_operand_name_1 );
if ( tmp_tuple_element_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_tuple_element_1 = const_int_0;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 1, tmp_tuple_element_1 );
tmp_tuple_element_1 = var__npts;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 2, tmp_tuple_element_1 );
tmp_kw_name_1 = PyDict_Copy( const_dict_eb881d67d10ffdd20d6bfa6779384963 );
frame_function->f_lineno = 2000;
tmp_left_name_1 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
Py_DECREF( tmp_kw_name_1 );
if ( tmp_left_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
Py_DECREF( tmp_left_name_1 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_left_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_pi );
if ( tmp_left_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_1 );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_left_name_3 = const_int_pos_2;
tmp_right_name_3 = var__npts;
tmp_right_name_2 = BINARY_OPERATION_MUL( tmp_left_name_3, tmp_right_name_3 );
if ( tmp_right_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_1 );
Py_DECREF( tmp_left_name_2 );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_right_name_1 = BINARY_OPERATION( PyNumber_TrueDivide, tmp_left_name_2, tmp_right_name_2 );
Py_DECREF( tmp_left_name_2 );
Py_DECREF( tmp_right_name_2 );
if ( tmp_right_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_left_name_1 );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
tmp_assign_source_2 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 );
Py_DECREF( tmp_left_name_1 );
Py_DECREF( tmp_right_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2000;
goto frame_exception_exit_1;
}
assert( var_x == NULL );
var_x = tmp_assign_source_2;
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2001;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_cos );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2001;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = var_x;
frame_function->f_lineno = 2001;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2001;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_npts )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_npts,
par_npts
);
assert( res == 0 );
}
if ( var__npts )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__npts,
var__npts
);
assert( res == 0 );
}
if ( var_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
var_x
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_32_chebpts1 );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_npts );
Py_DECREF( par_npts );
par_npts = NULL;
CHECK_OBJECT( (PyObject *)var__npts );
Py_DECREF( var__npts );
var__npts = NULL;
CHECK_OBJECT( (PyObject *)var_x );
Py_DECREF( var_x );
var_x = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_npts );
Py_DECREF( par_npts );
par_npts = NULL;
Py_XDECREF( var__npts );
var__npts = NULL;
Py_XDECREF( var_x );
var_x = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_32_chebpts1 );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_numpy$polynomial$chebyshev$$$function_33_chebpts2( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_npts = python_pars[ 0 ];
PyObject *var__npts = NULL;
PyObject *var_x = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
int tmp_cmp_Lt_1;
int tmp_cmp_NotEq_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
PyObject *tmp_frame_locals;
PyObject *tmp_int_arg_1;
PyObject *tmp_make_exception_arg_1;
PyObject *tmp_make_exception_arg_2;
PyObject *tmp_operand_name_1;
PyObject *tmp_raise_type_1;
PyObject *tmp_raise_type_2;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_515d1ac2f0fd0e1d6d9a6d2ee92af025, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_int_arg_1 = par_npts;
tmp_assign_source_1 = PyNumber_Int( tmp_int_arg_1 );
if ( tmp_assign_source_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2027;
goto frame_exception_exit_1;
}
assert( var__npts == NULL );
var__npts = tmp_assign_source_1;
tmp_compare_left_1 = var__npts;
tmp_compare_right_1 = par_npts;
tmp_cmp_NotEq_1 = RICH_COMPARE_BOOL_NE( tmp_compare_left_1, tmp_compare_right_1 );
if ( tmp_cmp_NotEq_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2028;
goto frame_exception_exit_1;
}
if ( tmp_cmp_NotEq_1 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_make_exception_arg_1 = const_str_digest_a604b5227a4c36bb1219d6662b9216aa;
frame_function->f_lineno = 2029;
{
PyObject *call_args[] = { tmp_make_exception_arg_1 };
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_1 != NULL );
exception_type = tmp_raise_type_1;
exception_lineno = 2029;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_1:;
tmp_compare_left_2 = var__npts;
tmp_compare_right_2 = const_int_pos_2;
tmp_cmp_Lt_1 = RICH_COMPARE_BOOL_LT( tmp_compare_left_2, tmp_compare_right_2 );
if ( tmp_cmp_Lt_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2030;
goto frame_exception_exit_1;
}
if ( tmp_cmp_Lt_1 == 1 )
{
goto branch_yes_2;
}
else
{
goto branch_no_2;
}
branch_yes_2:;
tmp_make_exception_arg_2 = const_str_digest_6f91fc103df5fd9495bdd958350cedce;
frame_function->f_lineno = 2031;
{
PyObject *call_args[] = { tmp_make_exception_arg_2 };
tmp_raise_type_2 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
}
assert( tmp_raise_type_2 != NULL );
exception_type = tmp_raise_type_2;
exception_lineno = 2031;
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
goto frame_exception_exit_1;
branch_no_2:;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2033;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_linspace );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2033;
goto frame_exception_exit_1;
}
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
Py_DECREF( tmp_called_name_1 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2033;
goto frame_exception_exit_1;
}
tmp_operand_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_pi );
if ( tmp_operand_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
exception_lineno = 2033;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = UNARY_OPERATION( PyNumber_Negative, tmp_operand_name_1 );
Py_DECREF( tmp_operand_name_1 );
if ( tmp_args_element_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_called_name_1 );
exception_lineno = 2033;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = const_int_0;
tmp_args_element_name_3 = var__npts;
frame_function->f_lineno = 2033;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2, tmp_args_element_name_3 };
tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS3( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_element_name_1 );
if ( tmp_assign_source_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2033;
goto frame_exception_exit_1;
}
assert( var_x == NULL );
var_x = tmp_assign_source_2;
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "global name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2034;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_cos );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2034;
goto frame_exception_exit_1;
}
tmp_args_element_name_4 = var_x;
frame_function->f_lineno = 2034;
{
PyObject *call_args[] = { tmp_args_element_name_4 };
tmp_return_value = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
if ( tmp_return_value == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2034;
goto frame_exception_exit_1;
}
goto frame_return_exit_1;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_return_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto try_return_handler_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_npts )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_npts,
par_npts
);
assert( res == 0 );
}
if ( var__npts )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__npts,
var__npts
);
assert( res == 0 );
}
if ( var_x )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_x,
var_x
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_33_chebpts2 );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_npts );
Py_DECREF( par_npts );
par_npts = NULL;
CHECK_OBJECT( (PyObject *)var__npts );
Py_DECREF( var__npts );
var__npts = NULL;
CHECK_OBJECT( (PyObject *)var_x );
Py_DECREF( var_x );
var_x = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)par_npts );
Py_DECREF( par_npts );
par_npts = NULL;
Py_XDECREF( var__npts );
var__npts = NULL;
Py_XDECREF( var_x );
var_x = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$function_33_chebpts2 );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
NUITKA_LOCAL_MODULE PyObject *impl_numpy$polynomial$chebyshev$$$class_1_Chebyshev( PyObject **python_pars )
{
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
assert(!had_error); // Do not enter inlined functions with error set.
#endif
// Local variable declarations.
PyObject *var___module__ = NULL;
PyObject *var___doc__ = NULL;
PyObject *var__add = NULL;
PyObject *var__sub = NULL;
PyObject *var__mul = NULL;
PyObject *var__div = NULL;
PyObject *var__pow = NULL;
PyObject *var__val = NULL;
PyObject *var__int = NULL;
PyObject *var__der = NULL;
PyObject *var__fit = NULL;
PyObject *var__line = NULL;
PyObject *var__roots = NULL;
PyObject *var__fromroots = NULL;
PyObject *var_nickname = NULL;
PyObject *var_domain = NULL;
PyObject *var_window = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_args_element_name_4;
PyObject *tmp_args_element_name_5;
PyObject *tmp_args_element_name_6;
PyObject *tmp_args_element_name_7;
PyObject *tmp_args_element_name_8;
PyObject *tmp_args_element_name_9;
PyObject *tmp_args_element_name_10;
PyObject *tmp_args_element_name_11;
PyObject *tmp_args_element_name_12;
PyObject *tmp_args_element_name_13;
PyObject *tmp_args_element_name_14;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
PyObject *tmp_called_name_6;
PyObject *tmp_called_name_7;
PyObject *tmp_called_name_8;
PyObject *tmp_called_name_9;
PyObject *tmp_called_name_10;
PyObject *tmp_called_name_11;
PyObject *tmp_called_name_12;
PyObject *tmp_called_name_13;
PyObject *tmp_called_name_14;
PyObject *tmp_frame_locals;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
tmp_assign_source_1 = const_str_digest_dad44f5e37d2bfce94dc6c3cbddca88b;
assert( var___module__ == NULL );
Py_INCREF( tmp_assign_source_1 );
var___module__ = tmp_assign_source_1;
tmp_assign_source_2 = const_str_digest_315673b80cf8d88f6afbcef09a8c782c;
assert( var___doc__ == NULL );
Py_INCREF( tmp_assign_source_2 );
var___doc__ = tmp_assign_source_2;
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_2dbf69ca74a52a8c39d01c93229e7390, module_numpy$polynomial$chebyshev );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_called_name_1 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_1 != NULL );
tmp_args_element_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebadd );
if (unlikely( tmp_args_element_name_1 == NULL ))
{
tmp_args_element_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebadd );
}
if ( tmp_args_element_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebadd" );
exception_tb = NULL;
exception_lineno = 2064;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2064;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_assign_source_3 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2064;
goto frame_exception_exit_1;
}
assert( var__add == NULL );
var__add = tmp_assign_source_3;
tmp_called_name_2 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_2 != NULL );
tmp_args_element_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebsub );
if (unlikely( tmp_args_element_name_2 == NULL ))
{
tmp_args_element_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebsub );
}
if ( tmp_args_element_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebsub" );
exception_tb = NULL;
exception_lineno = 2065;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2065;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_assign_source_4 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
if ( tmp_assign_source_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2065;
goto frame_exception_exit_1;
}
assert( var__sub == NULL );
var__sub = tmp_assign_source_4;
tmp_called_name_3 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_3 != NULL );
tmp_args_element_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebmul );
if (unlikely( tmp_args_element_name_3 == NULL ))
{
tmp_args_element_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebmul );
}
if ( tmp_args_element_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebmul" );
exception_tb = NULL;
exception_lineno = 2066;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2066;
{
PyObject *call_args[] = { tmp_args_element_name_3 };
tmp_assign_source_5 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2066;
goto frame_exception_exit_1;
}
assert( var__mul == NULL );
var__mul = tmp_assign_source_5;
tmp_called_name_4 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_4 != NULL );
tmp_args_element_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebdiv );
if (unlikely( tmp_args_element_name_4 == NULL ))
{
tmp_args_element_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebdiv );
}
if ( tmp_args_element_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebdiv" );
exception_tb = NULL;
exception_lineno = 2067;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2067;
{
PyObject *call_args[] = { tmp_args_element_name_4 };
tmp_assign_source_6 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_4, call_args );
}
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2067;
goto frame_exception_exit_1;
}
assert( var__div == NULL );
var__div = tmp_assign_source_6;
tmp_called_name_5 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_5 != NULL );
tmp_args_element_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebpow );
if (unlikely( tmp_args_element_name_5 == NULL ))
{
tmp_args_element_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebpow );
}
if ( tmp_args_element_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebpow" );
exception_tb = NULL;
exception_lineno = 2068;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2068;
{
PyObject *call_args[] = { tmp_args_element_name_5 };
tmp_assign_source_7 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_5, call_args );
}
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2068;
goto frame_exception_exit_1;
}
assert( var__pow == NULL );
var__pow = tmp_assign_source_7;
tmp_called_name_6 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_6 != NULL );
tmp_args_element_name_6 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval );
if (unlikely( tmp_args_element_name_6 == NULL ))
{
tmp_args_element_name_6 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebval );
}
if ( tmp_args_element_name_6 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebval" );
exception_tb = NULL;
exception_lineno = 2069;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2069;
{
PyObject *call_args[] = { tmp_args_element_name_6 };
tmp_assign_source_8 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_6, call_args );
}
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2069;
goto frame_exception_exit_1;
}
assert( var__val == NULL );
var__val = tmp_assign_source_8;
tmp_called_name_7 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_7 != NULL );
tmp_args_element_name_7 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebint );
if (unlikely( tmp_args_element_name_7 == NULL ))
{
tmp_args_element_name_7 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebint );
}
if ( tmp_args_element_name_7 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebint" );
exception_tb = NULL;
exception_lineno = 2070;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2070;
{
PyObject *call_args[] = { tmp_args_element_name_7 };
tmp_assign_source_9 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_7, call_args );
}
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2070;
goto frame_exception_exit_1;
}
assert( var__int == NULL );
var__int = tmp_assign_source_9;
tmp_called_name_8 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_8 != NULL );
tmp_args_element_name_8 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebder );
if (unlikely( tmp_args_element_name_8 == NULL ))
{
tmp_args_element_name_8 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebder );
}
if ( tmp_args_element_name_8 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebder" );
exception_tb = NULL;
exception_lineno = 2071;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2071;
{
PyObject *call_args[] = { tmp_args_element_name_8 };
tmp_assign_source_10 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_8, call_args );
}
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2071;
goto frame_exception_exit_1;
}
assert( var__der == NULL );
var__der = tmp_assign_source_10;
tmp_called_name_9 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_9 != NULL );
tmp_args_element_name_9 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebfit );
if (unlikely( tmp_args_element_name_9 == NULL ))
{
tmp_args_element_name_9 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebfit );
}
if ( tmp_args_element_name_9 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebfit" );
exception_tb = NULL;
exception_lineno = 2072;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2072;
{
PyObject *call_args[] = { tmp_args_element_name_9 };
tmp_assign_source_11 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_9, call_args );
}
if ( tmp_assign_source_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2072;
goto frame_exception_exit_1;
}
assert( var__fit == NULL );
var__fit = tmp_assign_source_11;
tmp_called_name_10 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_10 != NULL );
tmp_args_element_name_10 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebline );
if (unlikely( tmp_args_element_name_10 == NULL ))
{
tmp_args_element_name_10 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebline );
}
if ( tmp_args_element_name_10 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebline" );
exception_tb = NULL;
exception_lineno = 2073;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2073;
{
PyObject *call_args[] = { tmp_args_element_name_10 };
tmp_assign_source_12 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_10, call_args );
}
if ( tmp_assign_source_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2073;
goto frame_exception_exit_1;
}
assert( var__line == NULL );
var__line = tmp_assign_source_12;
tmp_called_name_11 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_11 != NULL );
tmp_args_element_name_11 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebroots );
if (unlikely( tmp_args_element_name_11 == NULL ))
{
tmp_args_element_name_11 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebroots );
}
if ( tmp_args_element_name_11 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebroots" );
exception_tb = NULL;
exception_lineno = 2074;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2074;
{
PyObject *call_args[] = { tmp_args_element_name_11 };
tmp_assign_source_13 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_11, call_args );
}
if ( tmp_assign_source_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2074;
goto frame_exception_exit_1;
}
assert( var__roots == NULL );
var__roots = tmp_assign_source_13;
tmp_called_name_12 = LOOKUP_BUILTIN( const_str_plain_staticmethod );
assert( tmp_called_name_12 != NULL );
tmp_args_element_name_12 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebfromroots );
if (unlikely( tmp_args_element_name_12 == NULL ))
{
tmp_args_element_name_12 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebfromroots );
}
if ( tmp_args_element_name_12 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebfromroots" );
exception_tb = NULL;
exception_lineno = 2075;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2075;
{
PyObject *call_args[] = { tmp_args_element_name_12 };
tmp_assign_source_14 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_12, call_args );
}
if ( tmp_assign_source_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2075;
goto frame_exception_exit_1;
}
assert( var__fromroots == NULL );
var__fromroots = tmp_assign_source_14;
tmp_assign_source_15 = const_str_plain_cheb;
assert( var_nickname == NULL );
Py_INCREF( tmp_assign_source_15 );
var_nickname = tmp_assign_source_15;
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2079;
goto frame_exception_exit_1;
}
tmp_called_name_13 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_array );
if ( tmp_called_name_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2079;
goto frame_exception_exit_1;
}
tmp_args_element_name_13 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebdomain );
if (unlikely( tmp_args_element_name_13 == NULL ))
{
tmp_args_element_name_13 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebdomain );
}
if ( tmp_args_element_name_13 == NULL )
{
Py_DECREF( tmp_called_name_13 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebdomain" );
exception_tb = NULL;
exception_lineno = 2079;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2079;
{
PyObject *call_args[] = { tmp_args_element_name_13 };
tmp_assign_source_16 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_13, call_args );
}
Py_DECREF( tmp_called_name_13 );
if ( tmp_assign_source_16 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2079;
goto frame_exception_exit_1;
}
assert( var_domain == NULL );
var_domain = tmp_assign_source_16;
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 2080;
goto frame_exception_exit_1;
}
tmp_called_name_14 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_array );
if ( tmp_called_name_14 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2080;
goto frame_exception_exit_1;
}
tmp_args_element_name_14 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebdomain );
if (unlikely( tmp_args_element_name_14 == NULL ))
{
tmp_args_element_name_14 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_chebdomain );
}
if ( tmp_args_element_name_14 == NULL )
{
Py_DECREF( tmp_called_name_14 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "chebdomain" );
exception_tb = NULL;
exception_lineno = 2080;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 2080;
{
PyObject *call_args[] = { tmp_args_element_name_14 };
tmp_assign_source_17 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_14, call_args );
}
Py_DECREF( tmp_called_name_14 );
if ( tmp_assign_source_17 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2080;
goto frame_exception_exit_1;
}
assert( var_window == NULL );
var_window = tmp_assign_source_17;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( var___module__ )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain___module__,
var___module__
);
assert( res == 0 );
}
if ( var___doc__ )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain___doc__,
var___doc__
);
assert( res == 0 );
}
if ( var__add )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__add,
var__add
);
assert( res == 0 );
}
if ( var__sub )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__sub,
var__sub
);
assert( res == 0 );
}
if ( var__mul )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__mul,
var__mul
);
assert( res == 0 );
}
if ( var__div )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__div,
var__div
);
assert( res == 0 );
}
if ( var__pow )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__pow,
var__pow
);
assert( res == 0 );
}
if ( var__val )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__val,
var__val
);
assert( res == 0 );
}
if ( var__int )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__int,
var__int
);
assert( res == 0 );
}
if ( var__der )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__der,
var__der
);
assert( res == 0 );
}
if ( var__fit )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__fit,
var__fit
);
assert( res == 0 );
}
if ( var__line )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__line,
var__line
);
assert( res == 0 );
}
if ( var__roots )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__roots,
var__roots
);
assert( res == 0 );
}
if ( var__fromroots )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain__fromroots,
var__fromroots
);
assert( res == 0 );
}
if ( var_nickname )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_nickname,
var_nickname
);
assert( res == 0 );
}
if ( var_domain )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_domain,
var_domain
);
assert( res == 0 );
}
if ( var_window )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_window,
var_window
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = PyDict_New();
if ( var___module__ )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain___module__,
var___module__
);
assert( res == 0 );
}
if ( var___doc__ )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain___doc__,
var___doc__
);
assert( res == 0 );
}
if ( var__add )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__add,
var__add
);
assert( res == 0 );
}
if ( var__sub )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__sub,
var__sub
);
assert( res == 0 );
}
if ( var__mul )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__mul,
var__mul
);
assert( res == 0 );
}
if ( var__div )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__div,
var__div
);
assert( res == 0 );
}
if ( var__pow )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__pow,
var__pow
);
assert( res == 0 );
}
if ( var__val )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__val,
var__val
);
assert( res == 0 );
}
if ( var__int )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__int,
var__int
);
assert( res == 0 );
}
if ( var__der )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__der,
var__der
);
assert( res == 0 );
}
if ( var__fit )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__fit,
var__fit
);
assert( res == 0 );
}
if ( var__line )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__line,
var__line
);
assert( res == 0 );
}
if ( var__roots )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__roots,
var__roots
);
assert( res == 0 );
}
if ( var__fromroots )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain__fromroots,
var__fromroots
);
assert( res == 0 );
}
if ( var_nickname )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain_nickname,
var_nickname
);
assert( res == 0 );
}
if ( var_domain )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain_domain,
var_domain
);
assert( res == 0 );
}
if ( var_window )
{
int res = PyDict_SetItem(
tmp_return_value,
const_str_plain_window,
var_window
);
assert( res == 0 );
}
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$class_1_Chebyshev );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)var___module__ );
Py_DECREF( var___module__ );
var___module__ = NULL;
CHECK_OBJECT( (PyObject *)var___doc__ );
Py_DECREF( var___doc__ );
var___doc__ = NULL;
CHECK_OBJECT( (PyObject *)var__add );
Py_DECREF( var__add );
var__add = NULL;
CHECK_OBJECT( (PyObject *)var__sub );
Py_DECREF( var__sub );
var__sub = NULL;
CHECK_OBJECT( (PyObject *)var__mul );
Py_DECREF( var__mul );
var__mul = NULL;
CHECK_OBJECT( (PyObject *)var__div );
Py_DECREF( var__div );
var__div = NULL;
CHECK_OBJECT( (PyObject *)var__pow );
Py_DECREF( var__pow );
var__pow = NULL;
CHECK_OBJECT( (PyObject *)var__val );
Py_DECREF( var__val );
var__val = NULL;
CHECK_OBJECT( (PyObject *)var__int );
Py_DECREF( var__int );
var__int = NULL;
CHECK_OBJECT( (PyObject *)var__der );
Py_DECREF( var__der );
var__der = NULL;
CHECK_OBJECT( (PyObject *)var__fit );
Py_DECREF( var__fit );
var__fit = NULL;
CHECK_OBJECT( (PyObject *)var__line );
Py_DECREF( var__line );
var__line = NULL;
CHECK_OBJECT( (PyObject *)var__roots );
Py_DECREF( var__roots );
var__roots = NULL;
CHECK_OBJECT( (PyObject *)var__fromroots );
Py_DECREF( var__fromroots );
var__fromroots = NULL;
CHECK_OBJECT( (PyObject *)var_nickname );
Py_DECREF( var_nickname );
var_nickname = NULL;
CHECK_OBJECT( (PyObject *)var_domain );
Py_DECREF( var_domain );
var_domain = NULL;
CHECK_OBJECT( (PyObject *)var_window );
Py_DECREF( var_window );
var_window = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
CHECK_OBJECT( (PyObject *)var___module__ );
Py_DECREF( var___module__ );
var___module__ = NULL;
CHECK_OBJECT( (PyObject *)var___doc__ );
Py_DECREF( var___doc__ );
var___doc__ = NULL;
Py_XDECREF( var__add );
var__add = NULL;
Py_XDECREF( var__sub );
var__sub = NULL;
Py_XDECREF( var__mul );
var__mul = NULL;
Py_XDECREF( var__div );
var__div = NULL;
Py_XDECREF( var__pow );
var__pow = NULL;
Py_XDECREF( var__val );
var__val = NULL;
Py_XDECREF( var__int );
var__int = NULL;
Py_XDECREF( var__der );
var__der = NULL;
Py_XDECREF( var__fit );
var__fit = NULL;
Py_XDECREF( var__line );
var__line = NULL;
Py_XDECREF( var__roots );
var__roots = NULL;
Py_XDECREF( var__fromroots );
var__fromroots = NULL;
Py_XDECREF( var_nickname );
var_nickname = NULL;
Py_XDECREF( var_domain );
var_domain = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( numpy$polynomial$chebyshev$$$class_1_Chebyshev );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_10_chebfromroots( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_10_chebfromroots,
const_str_plain_chebfromroots,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_362d59b19030f8ddae7e628f283551bc,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_b965dfae6681f1e9314fdb488afbc305,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_11_chebadd( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_11_chebadd,
const_str_plain_chebadd,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_0c65ed6d15fbdd18c7d28564340c98aa,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_75ac8b038bcd52cf4c17a0464b571f53,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_12_chebsub( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_12_chebsub,
const_str_plain_chebsub,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_ec9b194068ae3a9d20e09b996d4581a4,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_c05b7d669965ba8fa24061ba32c55612,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_13_chebmulx( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_13_chebmulx,
const_str_plain_chebmulx,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_3bb7695a13175ba50a73d402f1d1db82,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_f805cf5744c74fd66612485eef5ef80d,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_14_chebmul( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_14_chebmul,
const_str_plain_chebmul,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_5b8c601cfec3d8eb92b4552f0bc37453,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_6d2f46e61c57bd5c36eeaf6d7a7ba78d,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_15_chebdiv( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_15_chebdiv,
const_str_plain_chebdiv,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_4b2248855722ce0a771e7e3c01e97737,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_b56739545be246c7ce3befc0dde1c782,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_16_chebpow( PyObject *defaults )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_16_chebpow,
const_str_plain_chebpow,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_496154e52512bea566bbf13b71f174f5,
defaults,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_a2214ca64a473cc223862eac21e8326a,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_17_chebder( PyObject *defaults )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_17_chebder,
const_str_plain_chebder,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_14c198ee31bc49db1b48768c7f5fecfa,
defaults,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_25f705d3dc7ace58ece9f82132f49144,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_18_chebint( PyObject *defaults )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_18_chebint,
const_str_plain_chebint,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_c64bd8ada1cd1ed14dd441e7b136720c,
defaults,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_1142c45194b6b19870360bec4f6bd354,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_19_chebval( PyObject *defaults )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_19_chebval,
const_str_plain_chebval,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_0748bfa3c3d7914246a3d01d0bbd12ff,
defaults,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_e275c56a2eeedb2c7ff03a6fdfb641d0,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_1__cseries_to_zseries( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_1__cseries_to_zseries,
const_str_plain__cseries_to_zseries,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_78d870ed2207e40304cb9938f7e8d36c,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_d148675d1a35f63aa9d40e5df12da1db,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_20_chebval2d( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_20_chebval2d,
const_str_plain_chebval2d,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_b6d606b188c155ee8279f00fe663ec4b,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_11042050cbb26d8ee4e4860179f462c8,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_21_chebgrid2d( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_21_chebgrid2d,
const_str_plain_chebgrid2d,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_7c8569bee2299d0f91164c60e0652559,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_9e19ec0038c224689601539b44694013,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_22_chebval3d( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_22_chebval3d,
const_str_plain_chebval3d,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_7962b09788fcf5188ca5da0c5eba41ef,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_4890d1a5a66253073e4c13b5ea8b2a92,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_23_chebgrid3d( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_23_chebgrid3d,
const_str_plain_chebgrid3d,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_528155342008e407dab9d4317e672fcc,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_15fea8edff1a9308d6707bc05b875e29,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_24_chebvander( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_24_chebvander,
const_str_plain_chebvander,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_646a43fada7fcea4eabeb7c5463160c6,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_aafdd805496b15facd6df5097e7f3fc2,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_25_chebvander2d( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_25_chebvander2d,
const_str_plain_chebvander2d,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_b18cf6202ddae6fff5513d44cb983db0,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_d730471cda2cf58c4389af84924ff824,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_26_chebvander3d( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_26_chebvander3d,
const_str_plain_chebvander3d,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_c9989ee744c4754eacec604f1590d3ed,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_50890faa0d99f59fdbd29605f5892123,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_27_chebfit( PyObject *defaults )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_27_chebfit,
const_str_plain_chebfit,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_6192c23cf938043a03b6b291141acecd,
defaults,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_18f4263df6376995baf57d0496addda9,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_28_chebcompanion( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_28_chebcompanion,
const_str_plain_chebcompanion,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_b748062eaaf5bababb7639bbf5a9a89d,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_6ed579e2d70c78162ed851cc41bd9677,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_29_chebroots( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_29_chebroots,
const_str_plain_chebroots,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_44580acb538b0b14f80bdf28eaa66d6a,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_30bcc94032272ad7abef138d872998f1,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_2__zseries_to_cseries( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_2__zseries_to_cseries,
const_str_plain__zseries_to_cseries,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_6d62e10287a50ca7be124e2da960baa0,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_f173f8d1728a483a86186daf738d279f,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_30_chebgauss( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_30_chebgauss,
const_str_plain_chebgauss,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_d451aebc789cda2cdc07f5b7a0077151,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_91d14919ee9c3d8b3b012ec729f95f08,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_31_chebweight( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_31_chebweight,
const_str_plain_chebweight,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_d69d9d0178bd93314044488c8d975dfd,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_dc24b8791e454240e255b3052d7e9d91,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_32_chebpts1( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_32_chebpts1,
const_str_plain_chebpts1,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_21cba8e29a9f5721941e3baaead8c7ac,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_53676ffad2343da30563707b2afad824,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_33_chebpts2( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_33_chebpts2,
const_str_plain_chebpts2,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_515d1ac2f0fd0e1d6d9a6d2ee92af025,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_175ea8d36c7b12750a4d3a571521b63c,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_3__zseries_mul( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_3__zseries_mul,
const_str_plain__zseries_mul,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_b1e4db155389da72293d68fa9783c18a,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_596bee38b801954be96ae4654072f77d,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_4__zseries_div( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_4__zseries_div,
const_str_plain__zseries_div,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_cdb373cbd9d7f7a0b77418e495388b5d,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_7dd010b0d62016b41f6292c1e18d7e72,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_5__zseries_der( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_5__zseries_der,
const_str_plain__zseries_der,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_74f56bacaea045ac7ed51ddff313927f,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_5161459d1089c9b763879a3ac6a77ba6,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_6__zseries_int( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_6__zseries_int,
const_str_plain__zseries_int,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_ea2bd15f094960ad95e165b65ec1757b,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_39aebea2040c10c591461179e0679786,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_7_poly2cheb( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_7_poly2cheb,
const_str_plain_poly2cheb,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_74ea994fb502f67d1d0f5cdfcabb713d,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_ae3bc759ad059aac7c3c42e81a804e6f,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_8_cheb2poly( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_8_cheb2poly,
const_str_plain_cheb2poly,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_9faaac09f2ff8b3a69284badcaa6537f,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_033499fb1225b6210c0e2529a5c2ae8b,
0
);
return (PyObject *)result;
}
static PyObject *MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_9_chebline( )
{
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
impl_numpy$polynomial$chebyshev$$$function_9_chebline,
const_str_plain_chebline,
#if PYTHON_VERSION >= 330
NULL,
#endif
codeobj_0bc0647005540ac24d91c223cd223201,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_numpy$polynomial$chebyshev,
const_str_digest_233c85cc600a9b14c0b10a1fb4fbe6db,
0
);
return (PyObject *)result;
}
#if PYTHON_VERSION >= 300
static struct PyModuleDef mdef_numpy$polynomial$chebyshev =
{
PyModuleDef_HEAD_INIT,
"numpy.polynomial.chebyshev", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
NULL, /* m_methods */
NULL, /* m_reload */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
#endif
#if PYTHON_VERSION >= 300
extern PyObject *metapath_based_loader;
#endif
extern void _initCompiledCellType();
extern void _initCompiledGeneratorType();
extern void _initCompiledFunctionType();
extern void _initCompiledMethodType();
extern void _initCompiledFrameType();
#if PYTHON_VERSION >= 350
extern void _initCompiledCoroutineType();
extern void _initCompiledCoroutineWrapperType();
#endif
// The exported interface to CPython. On import of the module, this function
// gets called. It has to have an exact function name, in cases it's a shared
// library export. This is hidden behind the MOD_INIT_DECL.
MOD_INIT_DECL( numpy$polynomial$chebyshev )
{
#if defined(_NUITKA_EXE) || PYTHON_VERSION >= 300
static bool _init_done = false;
// Modules might be imported repeatedly, which is to be ignored.
if ( _init_done )
{
return MOD_RETURN_VALUE( module_numpy$polynomial$chebyshev );
}
else
{
_init_done = true;
}
#endif
#ifdef _NUITKA_MODULE
// In case of a stand alone extension module, need to call initialization
// the init here because that's the first and only time we are going to get
// called here.
// Initialize the constant values used.
_initBuiltinModule();
createGlobalConstants();
/* Initialize the compiled types of Nuitka. */
_initCompiledCellType();
_initCompiledGeneratorType();
_initCompiledFunctionType();
_initCompiledMethodType();
_initCompiledFrameType();
#if PYTHON_VERSION >= 350
_initCompiledCoroutineType();
_initCompiledCoroutineWrapperType();
#endif
#if PYTHON_VERSION < 300
_initSlotCompare();
#endif
#if PYTHON_VERSION >= 270
_initSlotIternext();
#endif
patchBuiltinModule();
patchTypeComparison();
// Enable meta path based loader if not already done.
setupMetaPathBasedLoader();
#if PYTHON_VERSION >= 300
patchInspectModule();
#endif
#endif
/* The constants only used by this module are created now. */
#ifdef _NUITKA_TRACE
puts("numpy.polynomial.chebyshev: Calling createModuleConstants().");
#endif
createModuleConstants();
/* The code objects used by this module are created now. */
#ifdef _NUITKA_TRACE
puts("numpy.polynomial.chebyshev: Calling createModuleCodeObjects().");
#endif
createModuleCodeObjects();
// puts( "in initnumpy$polynomial$chebyshev" );
// Create the module object first. There are no methods initially, all are
// added dynamically in actual code only. Also no "__doc__" is initially
// set at this time, as it could not contain NUL characters this way, they
// are instead set in early module code. No "self" for modules, we have no
// use for it.
#if PYTHON_VERSION < 300
module_numpy$polynomial$chebyshev = Py_InitModule4(
"numpy.polynomial.chebyshev", // Module Name
NULL, // No methods initially, all are added
// dynamically in actual module code only.
NULL, // No __doc__ is initially set, as it could
// not contain NUL this way, added early in
// actual code.
NULL, // No self for modules, we don't use it.
PYTHON_API_VERSION
);
#else
module_numpy$polynomial$chebyshev = PyModule_Create( &mdef_numpy$polynomial$chebyshev );
#endif
moduledict_numpy$polynomial$chebyshev = (PyDictObject *)((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
CHECK_OBJECT( module_numpy$polynomial$chebyshev );
// Seems to work for Python2.7 out of the box, but for Python3, the module
// doesn't automatically enter "sys.modules", so do it manually.
#if PYTHON_VERSION >= 300
{
int r = PyObject_SetItem( PySys_GetObject( (char *)"modules" ), const_str_digest_dad44f5e37d2bfce94dc6c3cbddca88b, module_numpy$polynomial$chebyshev );
assert( r != -1 );
}
#endif
// For deep importing of a module we need to have "__builtins__", so we set
// it ourselves in the same way than CPython does. Note: This must be done
// before the frame object is allocated, or else it may fail.
PyObject *module_dict = PyModule_GetDict( module_numpy$polynomial$chebyshev );
if ( PyDict_GetItem( module_dict, const_str_plain___builtins__ ) == NULL )
{
PyObject *value = (PyObject *)builtin_module;
// Check if main module, not a dict then.
#if !defined(_NUITKA_EXE) || !0
value = PyModule_GetDict( value );
#endif
#ifndef __NUITKA_NO_ASSERT__
int res =
#endif
PyDict_SetItem( module_dict, const_str_plain___builtins__, value );
assert( res == 0 );
}
#if PYTHON_VERSION >= 330
PyDict_SetItem( module_dict, const_str_plain___loader__, metapath_based_loader );
#endif
// Temp variables if any
PyObject *tmp_import_from_1__module = NULL;
PyObject *tmp_class_creation_1__bases = NULL;
PyObject *tmp_class_creation_1__class_dict = NULL;
PyObject *tmp_class_creation_1__metaclass = NULL;
PyObject *tmp_class_creation_1__class = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_args_element_name_3;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_assign_source_14;
PyObject *tmp_assign_source_15;
PyObject *tmp_assign_source_16;
PyObject *tmp_assign_source_17;
PyObject *tmp_assign_source_18;
PyObject *tmp_assign_source_19;
PyObject *tmp_assign_source_20;
PyObject *tmp_assign_source_21;
PyObject *tmp_assign_source_22;
PyObject *tmp_assign_source_23;
PyObject *tmp_assign_source_24;
PyObject *tmp_assign_source_25;
PyObject *tmp_assign_source_26;
PyObject *tmp_assign_source_27;
PyObject *tmp_assign_source_28;
PyObject *tmp_assign_source_29;
PyObject *tmp_assign_source_30;
PyObject *tmp_assign_source_31;
PyObject *tmp_assign_source_32;
PyObject *tmp_assign_source_33;
PyObject *tmp_assign_source_34;
PyObject *tmp_assign_source_35;
PyObject *tmp_assign_source_36;
PyObject *tmp_assign_source_37;
PyObject *tmp_assign_source_38;
PyObject *tmp_assign_source_39;
PyObject *tmp_assign_source_40;
PyObject *tmp_assign_source_41;
PyObject *tmp_assign_source_42;
PyObject *tmp_assign_source_43;
PyObject *tmp_assign_source_44;
PyObject *tmp_assign_source_45;
PyObject *tmp_assign_source_46;
PyObject *tmp_assign_source_47;
PyObject *tmp_assign_source_48;
PyObject *tmp_assign_source_49;
PyObject *tmp_assign_source_50;
PyObject *tmp_assign_source_51;
PyObject *tmp_assign_source_52;
PyObject *tmp_assign_source_53;
PyObject *tmp_assign_source_54;
PyObject *tmp_assign_source_55;
PyObject *tmp_bases_name_1;
PyObject *tmp_call_arg_element_1;
PyObject *tmp_call_arg_element_2;
PyObject *tmp_call_arg_element_3;
PyObject *tmp_call_arg_element_4;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_called_name_5;
int tmp_cmp_In_1;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_right_1;
PyObject *tmp_defaults_1;
PyObject *tmp_defaults_2;
PyObject *tmp_defaults_3;
PyObject *tmp_defaults_4;
PyObject *tmp_defaults_5;
PyObject *tmp_dict_name_1;
PyObject *tmp_import_globals_1;
PyObject *tmp_import_globals_2;
PyObject *tmp_import_globals_3;
PyObject *tmp_import_globals_4;
PyObject *tmp_import_globals_5;
PyObject *tmp_import_globals_6;
PyObject *tmp_import_name_from_1;
PyObject *tmp_import_name_from_2;
PyObject *tmp_import_name_from_3;
PyObject *tmp_key_name_1;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
PyObject *tmp_source_name_3;
PyObject *tmp_source_name_4;
PyObject *tmp_source_name_5;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyFrameObject *frame_module;
// Module code.
tmp_assign_source_1 = const_str_digest_91745a01f8bad2e57e623bcd7f2cdc70;
UPDATE_STRING_DICT0( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain___doc__, tmp_assign_source_1 );
tmp_assign_source_2 = const_str_digest_26aa1c91b55abd324e1480ecb82e208f;
UPDATE_STRING_DICT0( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain___file__, tmp_assign_source_2 );
// Frame without reuse.
frame_module = MAKE_MODULE_FRAME( codeobj_4bdfde0901092e64b2ff2f557e21b27b, module_numpy$polynomial$chebyshev );
// Push the new frame as the currently active one, and we should be exclusively
// owning it.
pushFrameStack( frame_module );
assert( Py_REFCNT( frame_module ) == 1 );
#if PYTHON_VERSION >= 340
frame_module->f_executing += 1;
#endif
// Framed code:
tmp_import_globals_1 = ((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
frame_module->f_lineno = 88;
tmp_assign_source_3 = IMPORT_MODULE( const_str_plain___future__, tmp_import_globals_1, tmp_import_globals_1, const_tuple_b3c114ff65e5229953139969fd8f9f4c_tuple, const_int_0 );
if ( tmp_assign_source_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 88;
goto frame_exception_exit_1;
}
assert( tmp_import_from_1__module == NULL );
tmp_import_from_1__module = tmp_assign_source_3;
tmp_assign_source_4 = PyObject_GetAttrString(PyImport_ImportModule("__future__"), "division");
assert( tmp_assign_source_4 != NULL );
UPDATE_STRING_DICT0( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_division, tmp_assign_source_4 );
tmp_assign_source_5 = PyObject_GetAttrString(PyImport_ImportModule("__future__"), "absolute_import");
assert( tmp_assign_source_5 != NULL );
UPDATE_STRING_DICT0( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_absolute_import, tmp_assign_source_5 );
tmp_assign_source_6 = PyObject_GetAttrString(PyImport_ImportModule("__future__"), "print_function");
assert( tmp_assign_source_6 != NULL );
UPDATE_STRING_DICT0( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_print_function, tmp_assign_source_6 );
CHECK_OBJECT( (PyObject *)tmp_import_from_1__module );
Py_DECREF( tmp_import_from_1__module );
tmp_import_from_1__module = NULL;
tmp_import_globals_2 = ((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
frame_module->f_lineno = 90;
tmp_assign_source_7 = IMPORT_MODULE( const_str_plain_warnings, tmp_import_globals_2, tmp_import_globals_2, Py_None, const_int_0 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 90;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_warnings, tmp_assign_source_7 );
tmp_import_globals_3 = ((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
frame_module->f_lineno = 91;
tmp_assign_source_8 = IMPORT_MODULE( const_str_plain_numpy, tmp_import_globals_3, tmp_import_globals_3, Py_None, const_int_0 );
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 91;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np, tmp_assign_source_8 );
tmp_import_globals_4 = ((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
frame_module->f_lineno = 92;
tmp_import_name_from_1 = IMPORT_MODULE( const_str_digest_8a21c7bcdaafddc42f6be8149ffdeee8, tmp_import_globals_4, tmp_import_globals_4, Py_None, const_int_0 );
if ( tmp_import_name_from_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 92;
goto frame_exception_exit_1;
}
tmp_assign_source_9 = IMPORT_NAME( tmp_import_name_from_1, const_str_plain_linalg );
Py_DECREF( tmp_import_name_from_1 );
if ( tmp_assign_source_9 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 92;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_la, tmp_assign_source_9 );
tmp_import_globals_5 = ((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
frame_module->f_lineno = 94;
tmp_import_name_from_2 = IMPORT_MODULE( const_str_empty, tmp_import_globals_5, tmp_import_globals_5, const_tuple_str_plain_polyutils_tuple, const_int_pos_1 );
if ( tmp_import_name_from_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 94;
goto frame_exception_exit_1;
}
tmp_assign_source_10 = IMPORT_NAME( tmp_import_name_from_2, const_str_plain_polyutils );
Py_DECREF( tmp_import_name_from_2 );
if ( tmp_assign_source_10 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 94;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu, tmp_assign_source_10 );
tmp_import_globals_6 = ((PyModuleObject *)module_numpy$polynomial$chebyshev)->md_dict;
frame_module->f_lineno = 95;
tmp_import_name_from_3 = IMPORT_MODULE( const_str_plain__polybase, tmp_import_globals_6, tmp_import_globals_6, const_tuple_str_plain_ABCPolyBase_tuple, const_int_pos_1 );
if ( tmp_import_name_from_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 95;
goto frame_exception_exit_1;
}
tmp_assign_source_11 = IMPORT_NAME( tmp_import_name_from_3, const_str_plain_ABCPolyBase );
Py_DECREF( tmp_import_name_from_3 );
if ( tmp_assign_source_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 95;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_ABCPolyBase, tmp_assign_source_11 );
tmp_assign_source_12 = LIST_COPY( const_list_11b4f9a0a02f93f57bd95b7e9809d4f8_list );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain___all__, tmp_assign_source_12 );
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_pu );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_pu );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "pu" );
exception_tb = NULL;
exception_lineno = 106;
goto frame_exception_exit_1;
}
tmp_assign_source_13 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_trimcoef );
if ( tmp_assign_source_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 106;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebtrim, tmp_assign_source_13 );
tmp_assign_source_14 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_1__cseries_to_zseries( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__cseries_to_zseries, tmp_assign_source_14 );
tmp_assign_source_15 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_2__zseries_to_cseries( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_to_cseries, tmp_assign_source_15 );
tmp_assign_source_16 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_3__zseries_mul( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_mul, tmp_assign_source_16 );
tmp_assign_source_17 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_4__zseries_div( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_div, tmp_assign_source_17 );
tmp_assign_source_18 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_5__zseries_der( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_der, tmp_assign_source_18 );
tmp_assign_source_19 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_6__zseries_int( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain__zseries_int, tmp_assign_source_19 );
tmp_assign_source_20 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_7_poly2cheb( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_poly2cheb, tmp_assign_source_20 );
tmp_assign_source_21 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_8_cheb2poly( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_cheb2poly, tmp_assign_source_21 );
tmp_source_name_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_2 == NULL ))
{
tmp_source_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 444;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_array );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 444;
goto frame_exception_exit_1;
}
tmp_call_arg_element_1 = LIST_COPY( const_list_int_neg_1_int_pos_1_list );
frame_module->f_lineno = 444;
{
PyObject *call_args[] = { tmp_call_arg_element_1 };
tmp_assign_source_22 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_call_arg_element_1 );
if ( tmp_assign_source_22 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 444;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebdomain, tmp_assign_source_22 );
tmp_source_name_3 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_3 == NULL ))
{
tmp_source_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 447;
goto frame_exception_exit_1;
}
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_array );
if ( tmp_called_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 447;
goto frame_exception_exit_1;
}
tmp_call_arg_element_2 = LIST_COPY( const_list_int_0_list );
frame_module->f_lineno = 447;
{
PyObject *call_args[] = { tmp_call_arg_element_2 };
tmp_assign_source_23 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
Py_DECREF( tmp_called_name_2 );
Py_DECREF( tmp_call_arg_element_2 );
if ( tmp_assign_source_23 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 447;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebzero, tmp_assign_source_23 );
tmp_source_name_4 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_4 == NULL ))
{
tmp_source_name_4 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_4 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 450;
goto frame_exception_exit_1;
}
tmp_called_name_3 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_array );
if ( tmp_called_name_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 450;
goto frame_exception_exit_1;
}
tmp_call_arg_element_3 = LIST_COPY( const_list_int_pos_1_list );
frame_module->f_lineno = 450;
{
PyObject *call_args[] = { tmp_call_arg_element_3 };
tmp_assign_source_24 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_3, call_args );
}
Py_DECREF( tmp_called_name_3 );
Py_DECREF( tmp_call_arg_element_3 );
if ( tmp_assign_source_24 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 450;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebone, tmp_assign_source_24 );
tmp_source_name_5 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_np );
if (unlikely( tmp_source_name_5 == NULL ))
{
tmp_source_name_5 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_np );
}
if ( tmp_source_name_5 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "np" );
exception_tb = NULL;
exception_lineno = 453;
goto frame_exception_exit_1;
}
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_5, const_str_plain_array );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 453;
goto frame_exception_exit_1;
}
tmp_call_arg_element_4 = LIST_COPY( const_list_int_0_int_pos_1_list );
frame_module->f_lineno = 453;
{
PyObject *call_args[] = { tmp_call_arg_element_4 };
tmp_assign_source_25 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_4, call_args );
}
Py_DECREF( tmp_called_name_4 );
Py_DECREF( tmp_call_arg_element_4 );
if ( tmp_assign_source_25 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 453;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebx, tmp_assign_source_25 );
tmp_assign_source_26 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_9_chebline( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebline, tmp_assign_source_26 );
tmp_assign_source_27 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_10_chebfromroots( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebfromroots, tmp_assign_source_27 );
tmp_assign_source_28 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_11_chebadd( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebadd, tmp_assign_source_28 );
tmp_assign_source_29 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_12_chebsub( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebsub, tmp_assign_source_29 );
tmp_assign_source_30 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_13_chebmulx( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebmulx, tmp_assign_source_30 );
tmp_assign_source_31 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_14_chebmul( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebmul, tmp_assign_source_31 );
tmp_assign_source_32 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_15_chebdiv( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebdiv, tmp_assign_source_32 );
tmp_defaults_1 = const_tuple_int_pos_16_tuple;
tmp_assign_source_33 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_16_chebpow( INCREASE_REFCOUNT( tmp_defaults_1 ) );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebpow, tmp_assign_source_33 );
tmp_defaults_2 = const_tuple_int_pos_1_int_pos_1_int_0_tuple;
tmp_assign_source_34 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_17_chebder( INCREASE_REFCOUNT( tmp_defaults_2 ) );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebder, tmp_assign_source_34 );
tmp_defaults_3 = PyTuple_New( 5 );
tmp_tuple_element_1 = const_int_pos_1;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_defaults_3, 0, tmp_tuple_element_1 );
tmp_tuple_element_1 = PyList_New( 0 );
PyTuple_SET_ITEM( tmp_defaults_3, 1, tmp_tuple_element_1 );
tmp_tuple_element_1 = const_int_0;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_defaults_3, 2, tmp_tuple_element_1 );
tmp_tuple_element_1 = const_int_pos_1;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_defaults_3, 3, tmp_tuple_element_1 );
tmp_tuple_element_1 = const_int_0;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_defaults_3, 4, tmp_tuple_element_1 );
tmp_assign_source_35 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_18_chebint( tmp_defaults_3 );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebint, tmp_assign_source_35 );
tmp_defaults_4 = const_tuple_true_tuple;
tmp_assign_source_36 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_19_chebval( INCREASE_REFCOUNT( tmp_defaults_4 ) );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval, tmp_assign_source_36 );
tmp_assign_source_37 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_20_chebval2d( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval2d, tmp_assign_source_37 );
tmp_assign_source_38 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_21_chebgrid2d( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebgrid2d, tmp_assign_source_38 );
tmp_assign_source_39 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_22_chebval3d( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebval3d, tmp_assign_source_39 );
tmp_assign_source_40 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_23_chebgrid3d( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebgrid3d, tmp_assign_source_40 );
tmp_assign_source_41 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_24_chebvander( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander, tmp_assign_source_41 );
tmp_assign_source_42 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_25_chebvander2d( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander2d, tmp_assign_source_42 );
tmp_assign_source_43 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_26_chebvander3d( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebvander3d, tmp_assign_source_43 );
tmp_defaults_5 = const_tuple_none_false_none_tuple;
tmp_assign_source_44 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_27_chebfit( INCREASE_REFCOUNT( tmp_defaults_5 ) );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebfit, tmp_assign_source_44 );
tmp_assign_source_45 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_28_chebcompanion( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebcompanion, tmp_assign_source_45 );
tmp_assign_source_46 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_29_chebroots( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebroots, tmp_assign_source_46 );
tmp_assign_source_47 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_30_chebgauss( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebgauss, tmp_assign_source_47 );
tmp_assign_source_48 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_31_chebweight( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebweight, tmp_assign_source_48 );
tmp_assign_source_49 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_32_chebpts1( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebpts1, tmp_assign_source_49 );
tmp_assign_source_50 = MAKE_FUNCTION_numpy$polynomial$chebyshev$$$function_33_chebpts2( );
UPDATE_STRING_DICT1( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_chebpts2, tmp_assign_source_50 );
// Tried code:
tmp_assign_source_51 = PyTuple_New( 1 );
tmp_tuple_element_2 = GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_ABCPolyBase );
if (unlikely( tmp_tuple_element_2 == NULL ))
{
tmp_tuple_element_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_ABCPolyBase );
}
if ( tmp_tuple_element_2 == NULL )
{
Py_DECREF( tmp_assign_source_51 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyString_FromFormat( "name '%s' is not defined", "ABCPolyBase" );
exception_tb = NULL;
exception_lineno = 2041;
goto try_except_handler_1;
}
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_assign_source_51, 0, tmp_tuple_element_2 );
assert( tmp_class_creation_1__bases == NULL );
tmp_class_creation_1__bases = tmp_assign_source_51;
tmp_assign_source_52 = impl_numpy$polynomial$chebyshev$$$class_1_Chebyshev( NULL );
if ( tmp_assign_source_52 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2041;
goto try_except_handler_1;
}
assert( tmp_class_creation_1__class_dict == NULL );
tmp_class_creation_1__class_dict = tmp_assign_source_52;
tmp_compare_left_1 = const_str_plain___metaclass__;
tmp_compare_right_1 = tmp_class_creation_1__class_dict;
tmp_cmp_In_1 = PySequence_Contains( tmp_compare_right_1, tmp_compare_left_1 );
assert( !(tmp_cmp_In_1 == -1) );
if ( tmp_cmp_In_1 == 1 )
{
goto condexpr_true_1;
}
else
{
goto condexpr_false_1;
}
condexpr_true_1:;
tmp_dict_name_1 = tmp_class_creation_1__class_dict;
tmp_key_name_1 = const_str_plain___metaclass__;
tmp_assign_source_53 = DICT_GET_ITEM( tmp_dict_name_1, tmp_key_name_1 );
if ( tmp_assign_source_53 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2041;
goto try_except_handler_1;
}
goto condexpr_end_1;
condexpr_false_1:;
tmp_bases_name_1 = tmp_class_creation_1__bases;
tmp_assign_source_53 = SELECT_METACLASS( tmp_bases_name_1, GET_STRING_DICT_VALUE( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain___metaclass__ ) );
condexpr_end_1:;
assert( tmp_class_creation_1__metaclass == NULL );
tmp_class_creation_1__metaclass = tmp_assign_source_53;
tmp_called_name_5 = tmp_class_creation_1__metaclass;
tmp_args_element_name_1 = const_str_plain_Chebyshev;
tmp_args_element_name_2 = tmp_class_creation_1__bases;
tmp_args_element_name_3 = tmp_class_creation_1__class_dict;
frame_module->f_lineno = 2041;
{
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2, tmp_args_element_name_3 };
tmp_assign_source_54 = CALL_FUNCTION_WITH_ARGS3( tmp_called_name_5, call_args );
}
if ( tmp_assign_source_54 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 2041;
goto try_except_handler_1;
}
assert( tmp_class_creation_1__class == NULL );
tmp_class_creation_1__class = tmp_assign_source_54;
goto try_end_1;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_class_creation_1__bases );
tmp_class_creation_1__bases = NULL;
Py_XDECREF( tmp_class_creation_1__class_dict );
tmp_class_creation_1__class_dict = NULL;
Py_XDECREF( tmp_class_creation_1__metaclass );
tmp_class_creation_1__metaclass = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
// Restore frame exception if necessary.
#if 0
RESTORE_FRAME_EXCEPTION( frame_module );
#endif
popFrameStack();
assertFrameObject( frame_module );
Py_DECREF( frame_module );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_module );
#endif
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_module, exception_lineno );
}
else if ( exception_tb->tb_frame != frame_module )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_module, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
}
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_module->f_executing -= 1;
#endif
Py_DECREF( frame_module );
// Return the error.
goto module_exception_exit;
frame_no_exception_1:;
tmp_assign_source_55 = tmp_class_creation_1__class;
UPDATE_STRING_DICT0( moduledict_numpy$polynomial$chebyshev, (Nuitka_StringObject *)const_str_plain_Chebyshev, tmp_assign_source_55 );
CHECK_OBJECT( (PyObject *)tmp_class_creation_1__class );
Py_DECREF( tmp_class_creation_1__class );
tmp_class_creation_1__class = NULL;
CHECK_OBJECT( (PyObject *)tmp_class_creation_1__bases );
Py_DECREF( tmp_class_creation_1__bases );
tmp_class_creation_1__bases = NULL;
CHECK_OBJECT( (PyObject *)tmp_class_creation_1__class_dict );
Py_DECREF( tmp_class_creation_1__class_dict );
tmp_class_creation_1__class_dict = NULL;
CHECK_OBJECT( (PyObject *)tmp_class_creation_1__metaclass );
Py_DECREF( tmp_class_creation_1__metaclass );
tmp_class_creation_1__metaclass = NULL;
return MOD_RETURN_VALUE( module_numpy$polynomial$chebyshev );
module_exception_exit:
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return MOD_RETURN_VALUE( NULL );
}
|
[
"[email protected]"
] | |
e08843e82cd7101cb9bcafa576fc0a07e01037b5
|
185569156deda92d94de5711867c9fe7821520f4
|
/src/core/param/common_list.h
|
a1101f3220c618182e976443a8773f7558ebb529
|
[
"GPL-3.0-only"
] |
permissive
|
ChangChiaChengcccc/ncrl-flight-control
|
445d88fe8f5d9624c970ba2e79a1967184f538ca
|
95494bfdba567b9d2eee7766c3f08f6534cf37c4
|
refs/heads/master
| 2023-02-26T07:21:59.519292 | 2022-08-31T08:33:34 | 2022-08-31T08:33:34 | 327,806,290 | 0 | 0 |
BSD-2-Clause
| 2021-01-08T05:20:45 | 2021-01-08T05:20:45 | null |
UTF-8
|
C
| false | false | 4,217 |
h
|
#ifndef __COMMON_LIST_H__
#define __COMMON_LIST_H__
enum {
/*********************************************
* ncrl flight controller defined parameters *
*********************************************/
IMU_FINISH_CALIB = 0,
ROLL_ANG_OFFSET,
PITCH_ANG_OFFSET,
/*****************************
* px4 compatible parameters *
*****************************/
/* airframe */
VEHICLE_TYPE,
/* sensor calibration */
CAL_ACC0_EN,
CAL_ACC0_ID,
CAL_ACC0_XOFF,
CAL_ACC0_XSCALE,
CAL_ACC0_YOFF,
CAL_ACC0_YSCALE,
CAL_ACC0_ZOFF,
CAL_ACC0_ZSCALE,
CAL_ACC1_EN,
CAL_ACC1_ID,
CAL_ACC1_XOFF,
CAL_ACC1_XSCALE,
CAL_ACC1_YOFF,
CAL_ACC1_YSCALE,
CAL_ACC1_ZOFF,
CAL_ACC1_ZSCALE,
CAL_ACC_PRIME,
CAL_BARO_PRIME,
CAL_GYRO0_EN,
CAL_GYRO0_ID,
CAL_GYRO0_XOFF,
CAL_GYRO0_XSCALE,
CAL_GYRO0_YOFF,
CAL_GYRO0_YSCALE,
CAL_GYRO0_ZOFF,
CAL_GYRO0_ZSCALE,
CAL_GYRO1_EN,
CAL_GYRO1_ID,
CAL_GYRO1_XOFF,
CAL_GYRO1_XSCALE,
CAL_GYRO1_YOFF,
CAL_GYRO1_YSCALE,
CAL_GYRO1_ZOFF,
CAL_GYRO1_ZSCALE,
CAL_MAG0_EN,
CAL_MAG0_ID,
CAL_MAG0_ROT,
CAL_MAG0_XOFF,
CAL_MAG0_XSCALE,
CAL_MAG0_YOFF,
CAL_MAG0_YSCALE,
CAL_MAG0_ZOFF,
CAL_MAG0_ZSCALE,
CAL_MAG1_ID,
CAL_MAG1_ROT,
CAL_MAG2_ID,
CAL_MAG2_ROT,
CAL_MAG3_ID,
CAL_MAG3_ROT,
CAL_MAG_PRIME,
SENS_DPRES_OFF,
/* sensors */
SENS_BOARD_X_OFF,
SENS_BOARD_Y_OFF,
SENS_BOARD_Z_OFF,
SENS_BOARD_ROT,
/* radio calibration */
RC1_DZ,
RC1_MAX,
RC1_MIN,
RC1_REV,
RC1_TRIM,
RC2_DZ,
RC2_MAX,
RC2_MIN,
RC2_REV,
RC2_TRIM,
RC3_DZ,
RC3_MAX,
RC3_MIN,
RC3_REV,
RC3_TRIM,
RC4_DZ,
RC4_MAX,
RC4_MIN,
RC4_REV,
RC4_TRIM,
RC5_DZ,
RC5_MAX,
RC5_MIN,
RC5_REV,
RC5_TRIM,
RC6_DZ,
RC6_MAX,
RC6_MIN,
RC6_REV,
RC6_TRIM,
RC7_DZ,
RC7_MAX,
RC7_MIN,
RC7_REV,
RC7_TRIM,
RC8_DZ,
RC8_MAX,
RC8_MIN,
RC8_REV,
RC8_TRIM,
RC9_DZ,
RC9_MAX,
RC9_MIN,
RC9_REV,
RC9_TRIM,
RC10_DZ,
RC10_MAX,
RC10_MIN,
RC10_REV,
RC10_TRIM,
RC11_DZ,
RC11_MAX,
RC11_MIN,
RC11_REV,
RC11_TRIM,
RC12_DZ,
RC12_MAX,
RC12_MIN,
RC12_REV,
RC12_TRIM,
RC13_REV,
RC13_TRIM,
RC14_DZ,
RC14_MAX,
RC14_MIN,
RC14_REV,
RC14_TRIM,
RC15_DZ,
RC15_MAX,
RC15_MIN,
RC15_REV,
RC15_TRIM,
RC16_DZ,
RC16_MAX,
RC16_MIN,
RC16_REV,
RC16_TRIM,
RC17_DZ,
RC17_MAX,
RC17_MIN,
RC17_REV,
RC17_TRIM,
RC18_DZ,
RC18_MAX,
RC18_MIN,
RC18_REV,
RC18_TRIM,
RC_CHAN_CNT,
RC_FAILS_THR,
RC_FLT_CUTOFF,
RC_FLT_SMP_RATE,
RC_MAP_AUX1,
RC_MAP_AUX2,
RC_MAP_AUX3,
RC_MAP_AUX4,
RC_MAP_AUX5,
RC_MAP_FAILSAFE,
RC_MAP_PARAM1,
RC_MAP_PARAM2,
RC_MAP_PARAM3,
RC_MAP_PITCH,
RC_MAP_ROLL,
RC_MAP_THROTTLE,
RC_MAP_YAW,
RC_RSSI_PWM_CHAN,
RC_RSSI_PWM_MAX,
RC_RSSI_PWM_MIN,
TRIM_PITCH,
TRIM_ROLL,
TRIM_YAW,
/* radio switches */
RC_ACRO_TH,
RC_ARMSWITCH_TH,
RC_ASSIST_TH,
RC_AUTO_TH,
RC_GEAR_TH,
RC_KILLSWITCH_TH,
RC_LOITER_TH,
RC_MAN_TH,
RC_MAP_ACRO_SW,
RC_MAP_ARM_SW,
RC_MAP_FLAPS,
RC_MAP_FLTMODE,
RC_MAP_GEAR_SW,
RC_MAP_KILL_SW,
RC_MAP_LOITER_SW,
RC_MAP_MAN_SW,
RC_MAP_MODE_SW,
RC_MAP_OFFB_SW,
RC_MAP_POSCTL_SW,
RC_MAP_RATT_SW,
RC_MAP_RETURN_SW,
RC_MAP_STAB_SW,
RC_MAP_TRANS_SW,
RC_OFFB_TH,
RC_POSCTL_TH,
RC_RATT_TH,
RC_RETURN_TH,
RC_STAB_TH,
RC_TRANS_TH,
/* system */
SYS_AUTOSTART,
SYS_AUTOCONFIG,
/* commander */
COM_ARM_IMU_ACC,
COM_ARM_IMU_GYR,
COM_ARM_MAG,
COM_ARM_MIS_REQ,
COM_ARM_SWISBTN,
COM_STM_WO_GPS,
COM_DISARM_LAND,
COM_DL_LOSS_T,
COM_DL_REG_T,
COM_EF_C2T,
COM_EF_THROT,
COM_EF_TIME1,
COM_FLTMODE1,
COM_FLTMODE2,
COM_FLTMODE3,
COM_FLTMODE4,
COM_FLTMODE5,
COM_FLTMODE6,
COM_HLDL_LOSS_T,
COM_HLDL_REG_T,
COM_HOME_H_T,
COM_HOME_V_T,
COM_LOW_BAT_ACT,
COM_OF_LOSS_T,
COM_POS_FS_DELAY,
COM_POS_FS_EPH,
COM_POS_FS_EPV,
COM_POS_FS_GAIN,
COM_POS_FS_PROB,
COM_RC_ARM_HYST,
COM_RC_IN_MODE,
COM_RC_LOSS_T,
COM_RC_OVERIDE,
COM_RC_STICK_OV,
COM_VEL_FS_EVH,
/* MAVLink */
MAV_SYS_ID,
/* Battery */
BAT_A_PER_V,
BAT_CAPACITY,
BAT_CNT_V_CURR,
BAT_CNT_V_VOLT,
BAT_CRIT_THR,
BAT_LOW_THR,
BAT_N_CELLS,
BAT_R_INTERNAL,
BAT_SOURCE,
BAT_V_CHARGED,
BAT_V_DIV,
BAT_V_EMPTY,
BAT_V_LOAD_DROP,
BAT_V_OFFS_CURR,
/* return to land */
RTL_LAND_DELAY,
RTL_DESCEND_ALT,
RTL_RETURN_ALT,
NAV_DLL_ACT,
NAV_RCL_ACT,
/*----------------------*/
COMMON_PARAM_CNT
} COMMON_PARAM_ID;
void init_common_params(void);
#endif
|
[
"[email protected]"
] | |
e617bcdfd894f187e9c2288f421ffb6a579e8b3b
|
193847f25b25719db0cb8c289b3acffcc3a67ff5
|
/Mita_Playground/imadder/isim/imgadder_test_isim_beh.exe.sim/work/a_1483785689_3212880686.c
|
4ca94f15e4dff564fc4fc6391a70e8738f67b274
|
[] |
no_license
|
dragutinv/Robotics-Project
|
7d625615a8a96f60ef6e9d6406d1653e2b0272a8
|
3e2ed8f8aecd8c266d89a09add90644c8cd2b67d
|
refs/heads/master
| 2021-03-19T15:21:39.571072 | 2015-12-07T13:41:04 | 2015-12-07T13:41:04 | 42,600,576 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 3,545 |
c
|
/**********************************************************************/
/* ____ ____ */
/* / /\/ / */
/* /___/ \ / */
/* \ \ \/ */
/* \ \ Copyright (c) 2003-2009 Xilinx, Inc. */
/* / / All Right Reserved. */
/* /---/ /\ */
/* \ \ / \ */
/* \___\/\___\ */
/***********************************************************************/
/* This file is designed for use with ISim build 0x7708f090 */
#define XSI_HIDE_SYMBOL_SPEC true
#include "xsi.h"
#include <memory.h>
#ifdef __GNUC__
#include <stdlib.h>
#else
#include <malloc.h>
#define alloca _alloca
#endif
static const char *ng0 = "C:/Users/Mita/Documents/VIBOT/Robotic Project/Mita_Playground/imadder.vhd";
extern char *IEEE_P_3620187407;
char *ieee_p_3620187407_sub_767668596_3965413181(char *, char *, char *, char *, char *, char *);
static void work_a_1483785689_3212880686_p_0(char *t0)
{
char t17[16];
unsigned char t1;
char *t2;
unsigned char t3;
char *t4;
char *t5;
unsigned char t6;
unsigned char t7;
char *t8;
unsigned char t9;
unsigned char t10;
char *t11;
char *t12;
char *t13;
char *t14;
char *t15;
char *t16;
unsigned int t18;
unsigned int t19;
char *t20;
LAB0: xsi_set_current_line(14, ng0);
t2 = (t0 + 1152U);
t3 = xsi_signal_has_event(t2);
if (t3 == 1)
goto LAB5;
LAB6: t1 = (unsigned char)0;
LAB7: if (t1 != 0)
goto LAB2;
LAB4:
LAB3: t2 = (t0 + 3152);
*((int *)t2) = 1;
LAB1: return;
LAB2: xsi_set_current_line(15, ng0);
t4 = (t0 + 1032U);
t8 = *((char **)t4);
t9 = *((unsigned char *)t8);
t10 = (t9 == (unsigned char)2);
if (t10 != 0)
goto LAB8;
LAB10: xsi_set_current_line(18, ng0);
t2 = (t0 + 1352U);
t4 = *((char **)t2);
t2 = (t0 + 5144U);
t5 = (t0 + 1512U);
t8 = *((char **)t5);
t5 = (t0 + 5160U);
t11 = ieee_p_3620187407_sub_767668596_3965413181(IEEE_P_3620187407, t17, t4, t2, t8, t5);
t12 = (t17 + 12U);
t18 = *((unsigned int *)t12);
t19 = (1U * t18);
t1 = (8U != t19);
if (t1 == 1)
goto LAB11;
LAB12: t13 = (t0 + 3232);
t14 = (t13 + 56U);
t15 = *((char **)t14);
t16 = (t15 + 56U);
t20 = *((char **)t16);
memcpy(t20, t11, 8U);
xsi_driver_first_trans_fast_port(t13);
LAB9: goto LAB3;
LAB5: t4 = (t0 + 1192U);
t5 = *((char **)t4);
t6 = *((unsigned char *)t5);
t7 = (t6 == (unsigned char)2);
t1 = t7;
goto LAB7;
LAB8: xsi_set_current_line(16, ng0);
t4 = (t0 + 5218);
t12 = (t0 + 3232);
t13 = (t12 + 56U);
t14 = *((char **)t13);
t15 = (t14 + 56U);
t16 = *((char **)t15);
memcpy(t16, t4, 8U);
xsi_driver_first_trans_fast_port(t12);
goto LAB9;
LAB11: xsi_size_not_matching(8U, t19, 0);
goto LAB12;
}
extern void work_a_1483785689_3212880686_init()
{
static char *pe[] = {(void *)work_a_1483785689_3212880686_p_0};
xsi_register_didat("work_a_1483785689_3212880686", "isim/imgadder_test_isim_beh.exe.sim/work/a_1483785689_3212880686.didat");
xsi_register_executes(pe);
}
|
[
"[email protected]"
] | |
15b707aca2058e0d96acfa8b7d630ca4bd925816
|
fd2c2a430e4622c5419458d493cf21d074e1120d
|
/Pods/Target Support Files/Pods/Pods-environment.h
|
70b81e0166ec86d849c873da68d31fa390156011
|
[
"MIT"
] |
permissive
|
carabina/BFPaperView
|
54ed68722bbea674994cfac059224ce563cf4348
|
58e0999137252c3cce04df8d7067b30bef63cd04
|
refs/heads/master
| 2021-01-17T11:14:57.238127 | 2015-02-03T00:45:44 | 2015-02-03T00:45:44 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 475 |
h
|
// To check if a library is compiled with CocoaPods you
// can use the `COCOAPODS` macro definition which is
// defined in the xcconfigs so it is available in
// headers also when they are imported in the client
// project.
// UIColor+BFPaperColors
#define COCOAPODS_POD_AVAILABLE_UIColor_BFPaperColors
#define COCOAPODS_VERSION_MAJOR_UIColor_BFPaperColors 1
#define COCOAPODS_VERSION_MINOR_UIColor_BFPaperColors 2
#define COCOAPODS_VERSION_PATCH_UIColor_BFPaperColors 5
|
[
"[email protected]"
] | |
d85ccd6fd0b398beeb6a3ef510d82cc00794d20e
|
bb108c3ea7d235e6fee0575181b5988e6b6a64ef
|
/mame/src/emu/sound/aicalfo.c
|
664eded91ad48832f5643ecf2beb4ca564e32cf8
|
[
"MIT"
] |
permissive
|
clobber/MAME-OS-X
|
3c5e6058b2814754176f3c6dcf1b2963ca804fc3
|
ca11d0e946636bda042b6db55c82113e5722fc08
|
refs/heads/master
| 2021-01-20T05:31:15.086981 | 2013-04-17T18:42:40 | 2013-04-17T18:42:40 | 3,805,274 | 15 | 8 | null | 2013-04-17T18:42:41 | 2012-03-23T04:23:01 |
C
|
UTF-8
|
C
| false | false | 3,409 |
c
|
/*
AICA LFO handling
Part of the AICA emulator package.
(not compiled directly, #included from aica.c)
By ElSemi, kingshriek, Deunan Knute, and R. Belmont
*/
#define LFO_SHIFT 8
struct _LFO
{
unsigned short phase;
UINT32 phase_step;
int *table;
int *scale;
};
#define LFIX(v) ((unsigned int) ((float) (1<<LFO_SHIFT)*(v)))
//Convert DB to multiply amplitude
#define DB(v) LFIX(pow(10.0,v/20.0))
//Convert cents to step increment
#define CENTS(v) LFIX(pow(2.0,v/1200.0))
static int PLFO_TRI[256],PLFO_SQR[256],PLFO_SAW[256],PLFO_NOI[256];
static int ALFO_TRI[256],ALFO_SQR[256],ALFO_SAW[256],ALFO_NOI[256];
static const float LFOFreq[32]={0.17f,0.19f,0.23f,0.27f,0.34f,0.39f,0.45f,0.55f,0.68f,0.78f,0.92f,1.10f,1.39f,1.60f,1.87f,2.27f,
2.87f,3.31f,3.92f,4.79f,6.15f,7.18f,8.60f,10.8f,14.4f,17.2f,21.5f,28.7f,43.1f,57.4f,86.1f,172.3f};
static const float ASCALE[8]={0.0f,0.4f,0.8f,1.5f,3.0f,6.0f,12.0f,24.0f};
static const float PSCALE[8]={0.0f,7.0f,13.5f,27.0f,55.0f,112.0f,230.0f,494.0f};
static int PSCALES[8][256];
static int ASCALES[8][256];
static void AICALFO_Init(running_machine &machine)
{
int i,s;
for(i=0;i<256;++i)
{
int a,p;
// float TL;
//Saw
a=255-i;
if(i<128)
p=i;
else
p=i-256;
ALFO_SAW[i]=a;
PLFO_SAW[i]=p;
//Square
if(i<128)
{
a=255;
p=127;
}
else
{
a=0;
p=-128;
}
ALFO_SQR[i]=a;
PLFO_SQR[i]=p;
//Tri
if(i<128)
a=255-(i*2);
else
a=(i*2)-256;
if(i<64)
p=i*2;
else if(i<128)
p=255-i*2;
else if(i<192)
p=256-i*2;
else
p=i*2-511;
ALFO_TRI[i]=a;
PLFO_TRI[i]=p;
//noise
//a=lfo_noise[i];
a=machine.rand()&0xff;
p=128-a;
ALFO_NOI[i]=a;
PLFO_NOI[i]=p;
}
for(s=0;s<8;++s)
{
float limit=PSCALE[s];
for(i=-128;i<128;++i)
{
PSCALES[s][i+128]=CENTS(((limit*(float) i)/128.0));
}
limit=-ASCALE[s];
for(i=0;i<256;++i)
{
ASCALES[s][i]=DB(((limit*(float) i)/256.0));
}
}
}
INLINE signed int AICAPLFO_Step(struct _LFO *LFO)
{
int p;
LFO->phase+=LFO->phase_step;
#if LFO_SHIFT!=8
LFO->phase&=(1<<(LFO_SHIFT+8))-1;
#endif
p=LFO->table[LFO->phase>>LFO_SHIFT];
p=LFO->scale[p+128];
return p<<(SHIFT-LFO_SHIFT);
}
INLINE signed int AICAALFO_Step(struct _LFO *LFO)
{
int p;
LFO->phase+=LFO->phase_step;
#if LFO_SHIFT!=8
LFO->phase&=(1<<(LFO_SHIFT+8))-1;
#endif
p=LFO->table[LFO->phase>>LFO_SHIFT];
p=LFO->scale[p];
return p<<(SHIFT-LFO_SHIFT);
}
static void AICALFO_ComputeStep(struct _LFO *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO)
{
float step=(float) LFOFreq[LFOF]*256.0/(float)44100.0;
LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step);
if(ALFO)
{
switch(LFOWS)
{
case 0: LFO->table=ALFO_SAW; break;
case 1: LFO->table=ALFO_SQR; break;
case 2: LFO->table=ALFO_TRI; break;
case 3: LFO->table=ALFO_NOI; break;
default: printf("Unknown ALFO %d\n", LFOWS);
}
LFO->scale=ASCALES[LFOS];
}
else
{
switch(LFOWS)
{
case 0: LFO->table=PLFO_SAW; break;
case 1: LFO->table=PLFO_SQR; break;
case 2: LFO->table=PLFO_TRI; break;
case 3: LFO->table=PLFO_NOI; break;
default: printf("Unknown PLFO %d\n", LFOWS);
}
LFO->scale=PSCALES[LFOS];
}
}
|
[
"[email protected]"
] | |
750c567cea746f37dc5eb6473cab85ca5e033356
|
6432ffa0649947cdb0c2045a3a7b2b2bee27e8c2
|
/d/changan/northroad2.c
|
289c8e0e9153d7bc7234fba3120c21833c64f9ec
|
[] |
no_license
|
MudRen/xkx100
|
f2e314a542e459502e28f311cd9f20ee7f7c6f43
|
dfca57e056460d7c0532a6e19a5e4add94a5588d
|
refs/heads/main
| 2022-03-05T00:08:01.398338 | 2022-01-25T09:00:27 | 2022-01-25T09:00:27 | 313,971,845 | 6 | 3 | null | null | null | null |
UTF-8
|
C
| false | false | 624 |
c
|
// /d/changan/northroad2.c
inherit ROOM;
void create ()
{
set ("short", "北大街");
set ("long", @LONG
你正走在长安北大街上。西边是一家钱庄,可以听到叮叮当当的金
银声音。东边个兵营,长安守军驻扎在内,不时传来操练之声。
LONG);
set("exits", ([ //sizeof() == 4
"west" : __DIR__"qianzhuang",
"east" : __DIR__"bingying",
"north" : __DIR__"northroad1",
"south" : __DIR__"center",
]));
set("outdoors", "changan");
set("no_clean_up", 0);
set("coor/x", -5040);
set("coor/y", 1010);
set("coor/z", 0);
setup();
replace_program(ROOM);
}
|
[
"[email protected]"
] | |
47dda066c5b21f10e5312f1802c52569e4debcce
|
39a71ea97e43cf4b369dc01f4b9498761c2eec8a
|
/project2/xv6-public/vm.c
|
8e4b67c414c9733e1197856e082970398515e4b8
|
[
"MIT"
] |
permissive
|
ClearSky-S/HYU-2020-Operating-System
|
deac575cd196a87aa44f88f55493fd0823948032
|
e625af61e9c117feba37b9d8b28fcca4360511fd
|
refs/heads/master
| 2023-04-19T05:40:23.872158 | 2020-11-27T17:21:11 | 2020-11-27T17:21:11 | null | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 13,878 |
c
|
#include "param.h"
#include "types.h"
#include "defs.h"
#include "x86.h"
#include "memlayout.h"
#include "mmu.h"
#include "proc.h"
#include "elf.h"
extern char data[]; // defined by kernel.ld
pde_t *kpgdir; // for use in scheduler()
// Set up CPU's kernel segment descriptors.
// Run once on entry on each CPU.
void
seginit(void)
{
struct cpu *c;
// Map "logical" addresses to virtual addresses using identity map.
// Cannot share a CODE descriptor for both kernel and user
// because it would have to have DPL_USR, but the CPU forbids
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpuid()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
lgdt(c->gdt, sizeof(c->gdt));
}
// Return the address of the PTE in page table pgdir
// that corresponds to virtual address va. If alloc!=0,
// create any required page table pages.
static pte_t *
walkpgdir(pde_t *pgdir, const void *va, int alloc)
{
pde_t *pde;
pte_t *pgtab;
// pgdir 은 setupkvm 에서 만들어놔서 있다는 가정하에
pde = &pgdir[PDX(va)];
// directory index로 접근을 해서 pde 즉, page table page를 가져옴
// page table page 없을 수도 있으니깐 있는지 확인하고 (x) 없어졌을 수도 있거든 지워져서
// 그래서 pagle table page 가 valid (present) 한지 PTE_P랑 bitwise해서 확인함.
// & 연산 이니깐 그냥 entry 있는지 확인한거. 그게 그거.
if(*pde & PTE_P){
// dir entry가 있는 상황.
// PTE_ADDR로 뒤에 12bit clear ( PTE_P PTE_U 등등 flag )
// P2V는 KERN, 0x80000000을 더해주는 부분.
// 커널은 contiguous하게 가져다가 박아놨으니??
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
} else {
// directory 에 entry가 없는 상황임.
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
return 0;
// Make sure all those PTE_P bits are zero.
memset(pgtab, 0, PGSIZE);
// The permissions here are overly generous, but they can
// be further restricted by the permissions in the page table
// entries, if necessary.
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
}
return &pgtab[PTX(va)];
}
// Create PTEs for virtual addresses starting at va that refer to
// physical addresses starting at pa. va and size might not
// be page-aligned.
static int
mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm)
{
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
// PG ROUND DOWN 은 그냥 0-15 bit clear 하는 거야.
// pa 를 받고 들어왔다는걸 알아두자.
// pa 가 4K의 배수면 좋겠는데 그렇지 않게 들어왔다면, 부득이하게
// 하나 더 넉넉잡아 할당을 해주는거야. pg fault 나면 안되니까.
// 하나 더 넉넉잡아서 해주는 부분은 mappage 를 부르는 건 setup kvm 이고, kmap[] 을 보고하는데
// 아직 kmap이 어떻게 값이 들어가는지, 들어가있는지는 모르겠긴해
/*
static struct kmap {
void *virt;
uint phys_start;
uint phys_end;
int perm;
kmap[] = {
순서가 있으니까
virtual P_start P_end permission 느낌이겠네.
{ (void*)KERNBASE, 0, EXTMEM, PTE_W}, // I/O space
{ (void*)KERNLINK, V2P(KERNLINK), V2P(data), 0}, // kern text+rodata
{ (void*)data, V2P(data), PHYSTOP, PTE_W}, // kern data+memory
{ (void*)DEVSPACE, DEVSPACE, 0, PTE_W}, // more devices
};
*/
/*
Um... 머 페이지가 사이즈가 10이라고 하고
virtual 6인애를 physical 15에다가 size 123만큼 mapping 하라고 하면,
virtual [round(6):round(6+123-1)] round가 1의자리 버림이라 생각해
[0:120] 되겠네
walk 하고나서 a == last 인걸 보니까
[0:10] [10:20] .... [120:130] 전부다 볼듯
넉넉하게 보네. last 에 size - 1 을 더해주고, round하는게 그 처리부분인가보다.
*/
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
// 위에서 walkpgdir을 alloc = 1로 호출하잖아.
// 그럼 없어가지고 만들어졌으면, memset해서 준 상태인데 PTE_P on 이라는 건
// walkpgdir 을 다 뒤져봤는데, alloc = 1로 부르는건 mappage 밖에 없어.
// page deallocation 시에 entry가 지워질수도 있고 그러긴한데, 지울때, PTE_P는
// 지워줘야지. NULL로 만든다거나 실제로 지울 필요는 없는데
// PTE_P만 지워도 되는데, PTE_P는 지워야지.
// 아무튼 remapping 이니깐 처리가 잘못되었다는걸 여기서 확인해줌.
if(*pte & PTE_P)
panic("remap");
// entry의 주소를 가져왔고, 이제 mapping 하는 실질적인 부분임.
*pte = pa | perm | PTE_P;
if(a == last)
break;
// PG대로 SIZE 충족할때까지 virtual 상에서는 contiguous 하게 mapping.
a += PGSIZE;
pa += PGSIZE;
}
// on success
return 0;
}
// There is one page table per process, plus one that's used when
// a CPU is not running any process (kpgdir). The kernel uses the
// current process's page table during system calls and interrupts;
// page protection bits prevent user code from using the kernel's
// mappings.
//
// setupkvm() and exec() set up every page table like this:
//
// 0..KERNBASE: user memory (text+data+stack+heap), mapped to
// phys memory allocated by the kernel
// KERNBASE..KERNBASE+EXTMEM: mapped to 0..EXTMEM (for I/O space)
// KERNBASE+EXTMEM..data: mapped to EXTMEM..V2P(data)
// for the kernel's instructions and r/o data
// data..KERNBASE+PHYSTOP: mapped to V2P(data)..PHYSTOP,
// rw data + free physical memory
// 0xfe000000..0: mapped direct (devices such as ioapic)
//
// The kernel allocates physical memory for its heap and for user memory
// between V2P(end) and the end of physical memory (PHYSTOP)
// (directly addressable from end..P2V(PHYSTOP)).
// This table defines the kernel's mappings, which are present in
// every process's page table.
static struct kmap {
void *virt;
uint phys_start;
uint phys_end;
int perm;
} kmap[] = {
{ (void*)KERNBASE, 0, EXTMEM, PTE_W}, // I/O space
{ (void*)KERNLINK, V2P(KERNLINK), V2P(data), 0}, // kern text+rodata
{ (void*)data, V2P(data), PHYSTOP, PTE_W}, // kern data+memory
{ (void*)DEVSPACE, DEVSPACE, 0, PTE_W}, // more devices
};
// Set up kernel part of a page table.
pde_t*
setupkvm(void)
{
pde_t *pgdir;
struct kmap *k;
// DIRECTORY created
if((pgdir = (pde_t*)kalloc()) == 0)
return 0;
memset(pgdir, 0, PGSIZE);
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
// NELEM 은 kmap이 struct 배열이거든?
// struct 몇개인지 보는거야. 그냥.
// p table 보듯이 주소로 보네. 0 base 마지막 element는 계산시에 overflow 등등 안나는게 신기하긴한데
// OS 내부니까 오류를 잡든 자기들 마음이지.
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
// virtual을 physical start 에다 mapping 할거야.
// size를 딱히 안주고 physical end 를 줬음. 안에서 계산할거(그냥 인자로 저렇게 넣어줬으니)
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
(uint)k->phys_start, k->perm) < 0) {
cprintf("[error] mappage, setupkvm(). page \'Directory\' cannot be set\n");
freevm(pgdir);
return 0;
}
return pgdir;
}
// Allocate one page table for the machine for the kernel address
// space for scheduler processes.
void
kvmalloc(void)
{
kpgdir = setupkvm();
switchkvm();
}
// Switch h/w page table register to the kernel-only page table,
// for when no process is running.
void
switchkvm(void)
{
lcr3(V2P(kpgdir)); // switch to the kernel page table
}
// Switch TSS and h/w page table to correspond to process p.
void
switchuvm(struct proc *p)
{
if(p == 0)
panic("switchuvm: no process");
if(p->kstack == 0)
panic("switchuvm: no kstack");
if(p->pgdir == 0)
panic("switchuvm: no pgdir");
pushcli();
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
sizeof(mycpu()->ts)-1, 0);
mycpu()->gdt[SEG_TSS].s = 0;
mycpu()->ts.ss0 = SEG_KDATA << 3;
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
// setting IOPL=0 in eflags *and* iomb beyond the tss segment limit
// forbids I/O instructions (e.g., inb and outb) from user space
mycpu()->ts.iomb = (ushort) 0xFFFF;
ltr(SEG_TSS << 3);
lcr3(V2P(p->pgdir)); // switch to process's address space
popcli();
}
// Load the initcode into address 0 of pgdir.
// sz must be less than a page.
void
inituvm(pde_t *pgdir, char *init, uint sz)
{
char *mem;
if(sz >= PGSIZE)
panic("inituvm: more than a page");
mem = kalloc();
memset(mem, 0, PGSIZE);
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
memmove(mem, init, sz);
}
// Load a program segment into pgdir. addr must be page-aligned
// and the pages from addr to addr+sz must already be mapped.
int
loaduvm(pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz)
{
uint i, pa, n;
pte_t *pte;
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
panic("loaduvm: address should exist");
pa = PTE_ADDR(*pte);
if(sz - i < PGSIZE)
n = sz - i;
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
return -1;
}
return 0;
}
// Allocate page tables and physical memory to grow process from oldsz to
// newsz, which need not be page aligned. Returns new size or 0 on error.
int
allocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
char *mem;
uint a;
if(newsz >= KERNBASE)
return 0;
if(newsz < oldsz)
return oldsz;
// overwhelming at most 4096 but not lack
// because it is called from the first time!
// looks like given memory is smaller but those space is
// already!! given before!
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
// cprintf("a in uvm[%x]\n",a);
mem = kalloc();
if(mem == 0){
cprintf("allocuvm out of memory\n");
deallocuvm(pgdir, newsz, oldsz);
return 0;
}
memset(mem, 0, PGSIZE);
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
cprintf("allocuvm out of memory (2)\n");
deallocuvm(pgdir, newsz, oldsz);
kfree(mem);
return 0;
}
}
return newsz;
}
// Deallocate user pages to bring the process size from oldsz to
// newsz. oldsz and newsz need not be page-aligned, nor does newsz
// need to be less than oldsz. oldsz can be larger than the actual
// process size. Returns the new process size.
int
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
pte = walkpgdir(pgdir, (char*)a, 0);
if(!pte)
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
else if((*pte & PTE_P) != 0){
pa = PTE_ADDR(*pte);
if(pa == 0)
panic("kfree");
char *v = P2V(pa);
kfree(v);
*pte = 0;
}
}
return newsz;
}
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
uint i;
if(pgdir == 0)
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
if(pgdir[i] & PTE_P){
char * v = P2V(PTE_ADDR(pgdir[i]));
kfree(v);
}
}
kfree((char*)pgdir);
}
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
if(pte == 0)
panic("clearpteu");
*pte &= ~PTE_U;
}
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
panic("copyuvm: pte should exist");
if(!(*pte & PTE_P))
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
flags = PTE_FLAGS(*pte);
// kalloc get one free page.
if((mem = kalloc()) == 0)
goto bad;
// memmove (dest,src,size)
memmove(mem, (char*)P2V(pa), PGSIZE);
// add to mapping table
// mappages(kernel_page, page_number(user_size can be big), size, real_address, flag)
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) {
kfree(mem);
goto bad;
}
}
return d;
bad:
freevm(d);
return 0;
}
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
if((*pte & PTE_P) == 0)
return 0;
if((*pte & PTE_U) == 0)
return 0;
return (char*)P2V(PTE_ADDR(*pte));
}
// Copy len bytes from p to user address va in page table pgdir.
// Most useful when pgdir is not the current page table.
// uva2ka ensures this only works for PTE_U pages.
int
copyout(pde_t *pgdir, uint va, void *p, uint len)
{
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
va0 = (uint)PGROUNDDOWN(va);
pa0 = uva2ka(pgdir, (char*)va0);
if(pa0 == 0)
return -1;
n = PGSIZE - (va - va0);
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
}
//PAGEBREAK!
// Blank page.
//PAGEBREAK!
// Blank page.
//PAGEBREAK!
// Blank page.
|
[
"[email protected]"
] | |
81e1e2f024c6d951fcec87c3304e81c3523b05a5
|
7244aae24f6a5f7376501ffb4ca743c65dddb074
|
/replay/scripts/FADC_decode/CodaDecoder.C
|
ee3a0cdf2c1c1b3eccf32b9cfd0e858d29dcf1a1
|
[] |
no_license
|
tgdragon/HallA-Online-Tritium
|
59f61eb6ae299d8c816e436dbdf0ef18901a7447
|
c01f776e56cc895d976c028e90ef2c660f1abbaa
|
refs/heads/master
| 2020-03-23T06:09:52.193630 | 2018-10-15T15:14:38 | 2018-10-15T15:14:38 | 141,192,611 | 0 | 2 | null | 2018-07-16T20:46:27 | 2018-07-16T20:46:27 | null |
UTF-8
|
C
| false | false | 19,833 |
c
|
////////////////////////////////////////////////////////////////////
//
// CodaDecoder
//
// Object Oriented version of decoder
// Sept, 2014 R. Michaels
//
/////////////////////////////////////////////////////////////////////
#include "CodaDecoder.h"
#include "THaCrateMap.h"
#include "THaBenchmark.h"
#include "TError.h"
#include <iostream>
using namespace std;
namespace Decoder {
// static const Int_t MAX_EVTYPES = 200;
// static const Int_t MAX_PHYS_EVTYPES = 14;
//_____________________________________________________________________________
CodaDecoder::CodaDecoder()
{
irn = new Int_t[MAXROC];
fbfound = new Int_t[MAXROC*MAXSLOT];
memset(irn, 0, MAXROC*sizeof(Int_t));
memset(fbfound, 0, MAXROC*MAXSLOT*sizeof(Int_t));
fDebugFile = 0;
fDebug=0;
fNeedInit=true;
first_decode=kFALSE;
fMultiBlockMode=kFALSE;
fBlockIsDone=kFALSE;
}
//_____________________________________________________________________________
CodaDecoder::~CodaDecoder()
{
delete [] irn;
delete [] fbfound;
}
//_____________________________________________________________________________
Int_t CodaDecoder::GetPrescaleFactor(Int_t trigger_type) const
{
// To get the prescale factors for trigger number "trigger_type"
// (valid types are 1,2,3...)
// if (fgPsFact) return fgPsFact->GetPrescaleFactor(trigger_type);
return 0;
}
//_____________________________________________________________________________
Int_t CodaDecoder::Init() {
Int_t ret = HED_OK;
ret = init_cmap();
if (fMap) fMap->print();
if (ret != HED_OK) return ret;
ret = init_slotdata(fMap);
first_decode = kFALSE;
fNeedInit = kFALSE;
return ret;
}
//_____________________________________________________________________________
Int_t CodaDecoder::LoadEvent(const UInt_t* evbuffer)
{
// Main engine for decoding, called by public LoadEvent() methods
static Int_t fdfirst=1;
static Int_t chkfbstat=1;
if (fDebugFile) *fDebugFile << "CodaDecode:: Loading event ... "<<endl;
if (fDebugFile) *fDebugFile << "evbuffer ptr "<<evbuffer<<endl;
assert( evbuffer );
assert( fMap || fNeedInit );
Int_t ret = HED_OK;
buffer = evbuffer;
if(fDebugFile) {
*fDebugFile << "CodaDecode:: dumping "<<endl;
dump(evbuffer);
}
if (first_decode || fNeedInit) {
ret = init_cmap();
if (fDebugFile) {
*fDebugFile << "\n CodaDecode:: Print of Crate Map"<<endl;
fMap->print(fDebugFile);
} else {
fMap->print();
}
if( ret != HED_OK ) return ret;
ret = init_slotdata(fMap);
if( ret != HED_OK ) return ret;
FindUsedSlots();
first_decode=kFALSE;
}
if( fDoBench ) fBench->Begin("clearEvent");
for( Int_t i=0; i<fNSlotClear; i++ ) crateslot[fSlotClear[i]]->clearEvent();
if( fDoBench ) fBench->Stop("clearEvent");
event_length = evbuffer[0]+1; // in longwords (4 bytes)
event_type = evbuffer[1]>>16;
if(event_type < 0) return HED_ERR;
event_num = 0;
//cout << "Event type "<<event_type<<endl;
if (event_type == PRESTART_EVTYPE) {
// Usually prestart is the first 'event'. Call SetRunTime() to
// re-initialize the crate map since we now know the run time.
// This won't happen for split files (no prestart). For such files,
// the user should call SetRunTime() explicitly.
SetRunTime(static_cast<ULong64_t>(evbuffer[2]));
run_num = evbuffer[3];
run_type = evbuffer[4];
evt_time = fRunTime;
}
if (event_type <= MAX_PHYS_EVTYPE) {
event_num = evbuffer[4];
recent_event = event_num;
FindRocs(evbuffer);
if ((fdfirst==1) & (fDebugFile!=0)) {
fdfirst=0;
CompareRocs();
}
// Decode each ROC
// This is not part of the loop above because it may exit prematurely due
// to errors, which would leave the rocdat[] array incomplete.
for( Int_t i=0; i<nroc; i++ ) {
Int_t iroc = irn[i];
const RocDat_t* proc = rocdat+iroc;
Int_t ipt = proc->pos + 1;
Int_t iptmax = proc->pos + proc->len;
if (fMap->isFastBus(iroc)) { // checking that slots found = expected
if (GetEvNum() > 200 && chkfbstat < 3) chkfbstat=2;
if (chkfbstat == 1) ChkFbSlot(iroc, evbuffer, ipt, iptmax);
if (chkfbstat == 2) {
ChkFbSlots();
chkfbstat = 3;
}
}
Int_t status;
// If at least one module is in a bank, must split the banks for this roc
if (fMap->isBankStructure(iroc)) {
if (fDebugFile) *fDebugFile << "\nCodaDecode::Calling bank_decode "<<i<<" "<<iroc<<" "<<ipt<<" "<<iptmax<<endl;
//cout << "\nCodaDecode::Calling bank_decode "<<i<<" "<<iroc<<" "<<ipt<<" "<<iptmax<<endl;
/*status =*/ bank_decode(iroc,evbuffer,ipt,iptmax);
//cout << "done with bank_decode"<<endl;
}
if (fDebugFile) *fDebugFile << "\nCodaDecode::Calling roc_decode "<<i<<" "<<evbuffer<<" "<<iroc<<" "<<ipt<<" "<<iptmax<<endl;
status = roc_decode(iroc,evbuffer, ipt, iptmax);
// do something with status
if (status == -1) break;
}
}
return ret;
}
//_____________________________________________________________________________
Int_t CodaDecoder::LoadFromMultiBlock()
{
// LoadFromMultiBlock : This assumes the data are in multiblock mode.
// For modules that are in multiblock mode, the next event is loaded.
// For other modules not in multiblock mode (e.g. scalers) or other data (e.g. flags)
// the data remain "stale" until the next block of events.
if (!fMultiBlockMode) return HED_ERR;
fBlockIsDone = kFALSE;
for( Int_t i=0; i<fNSlotClear; i++ ) {
if (crateslot[fSlotClear[i]]->GetModule()->IsMultiBlockMode()) crateslot[fSlotClear[i]]->clearEvent();
}
for( Int_t i=0; i<nroc; i++ ) {
Int_t roc = irn[i];
Int_t minslot = fMap->getMinSlot(roc);
Int_t maxslot = fMap->getMaxSlot(roc);
for (Int_t slot = minslot; slot <= maxslot; slot++) {
if (fMap->slotUsed(roc,slot) && crateslot[idx(roc,slot)]->GetModule()->IsMultiBlockMode()) {
crateslot[idx(roc,slot)]->LoadNextEvBuffer();
if (crateslot[idx(roc,slot)]->BlockIsDone()) fBlockIsDone = kTRUE;
}
}
}
return HED_OK;
}
//_____________________________________________________________________________
Int_t CodaDecoder::roc_decode( Int_t roc, const UInt_t* evbuffer,
Int_t ipt, Int_t istop )
{
// Decode a Readout controller
assert( evbuffer && fMap );
if( fDoBench ) fBench->Begin("roc_decode");
Int_t slot;
Int_t Nslot = fMap->getNslot(roc);
Int_t minslot = fMap->getMinSlot(roc);
Int_t maxslot = fMap->getMaxSlot(roc);
Int_t retval = HED_OK;
Int_t nwords;
synchmiss = false;
synchextra = false;
buffmode = false;
const UInt_t* p = evbuffer+ipt; // Points to ROC ID word (1 before data)
const UInt_t* pstop =evbuffer+istop; // Points to last word of data
fBlockIsDone = kFALSE;
Int_t firstslot, incrslot;
Int_t n_slots_checked, n_slots_done;
Bool_t slotdone;
Int_t status = SD_ERR;
n_slots_done = 0;
if (istop >= event_length) {
cerr << "ERROR:: roc_decode: stop point exceeds event length (?!)"<<endl;
goto err;
}
if (fMap->isFastBus(roc)) { // higher slot # appears first in multiblock mode
firstslot=maxslot; // the decoding order improves efficiency
incrslot = -1;
} else {
firstslot=minslot;
incrslot = 1;
}
if (fDebugFile) {
*fDebugFile << "CodaDecode:: roc_decode:: roc# "<<dec<<roc<<" nslot "<<Nslot<<endl;
*fDebugFile << "CodaDecode:: roc_decode:: firstslot "<<dec<<firstslot<<" incrslot "<<incrslot<<endl;
}
if (Nslot <= 0) goto err;
fMap->setSlotDone(); // clears the "done" bits
while ( p++ < pstop && n_slots_done < Nslot ) {
if (fDebugFile) {
*fDebugFile << "CodaDecode::roc_decode:: evbuff "<<(p-evbuffer)<<" "<<hex<<*p<<dec<<endl;
*fDebugFile << "CodaDecode::roc_decode:: n_slots_done "<<n_slots_done<<" "<<firstslot<<endl;
}
LoadIfFlagData(p);
n_slots_checked = 0;
slot = firstslot;
slotdone = kFALSE;
// bank structure is decoded with bank_decode
if (fMap->getBank(roc,slot) >= 0) {
n_slots_done++;
slotdone=kTRUE;
}
while(!slotdone && n_slots_checked < Nslot-n_slots_done && slot >= 0 && slot < MAXSLOT) {
if (!fMap->slotUsed(roc,slot) || fMap->slotDone(slot)) {
slot = slot + incrslot;
continue;
}
++n_slots_checked;
if (fDebugFile) {
*fDebugFile<< "roc_decode:: slot logic "<<roc<<" "<<slot<<" "<<firstslot<<" "<<n_slots_checked<<" "<<Nslot-n_slots_done<<endl;
}
nwords = crateslot[idx(roc,slot)]->LoadIfSlot(p, pstop);
if (nwords > 0) {
p = p + nwords - 1;
fMap->setSlotDone(slot);
n_slots_done++;
if(fDebugFile) *fDebugFile << "CodaDecode:: slot "<<slot<<" is DONE "<<nwords<<endl;
slotdone = kTRUE;
}
if (crateslot[idx(roc,slot)]->IsMultiBlockMode()) fMultiBlockMode = kTRUE;
if (crateslot[idx(roc,slot)]->BlockIsDone()) fBlockIsDone = kTRUE;
if (fDebugFile) {
*fDebugFile<< "CodaDecode:: roc_decode:: after LoadIfSlot "<<p << " "<<pstop<<" "<<" "<<hex<<*p<<" "<<dec<<nwords<<endl;
}
slot = slot + incrslot;
}
} //end while(p++<pstop)
goto exit;
err:
retval = (status == SD_ERR) ? HED_ERR : HED_WARN;
exit:
if( fDoBench ) fBench->Stop("roc_decode");
return retval;
}
//_____________________________________________________________________________
Int_t CodaDecoder::bank_decode( Int_t roc, const UInt_t* evbuffer,
Int_t ipt, Int_t istop )
{
// Split a roc into banks, if using bank structure
// Then loop over slots and decode it from a bank if the slot
// belongs to a bank.
assert( evbuffer && fMap );
if( fDoBench ) fBench->Begin("bank_decode");
Int_t retval = HED_OK;
if (!fMap->isBankStructure(roc)) return retval;
fBlockIsDone = kFALSE;
Int_t pos,len,bank,head;
memset(bankdat,0,MAXBANK*sizeof(BankDat_t));
if (fDebugFile) *fDebugFile << "CodaDecode:: bank_decode ... "<<roc<<" "<<ipt<<" "<<istop<<endl;
pos = ipt+1; // ipt points to ROC ID word
while (pos < istop) {
len = evbuffer[pos];
head = evbuffer[pos+1];
bank = (head>>16)&0xffff;
if (fDebugFile) *fDebugFile << "bank 0x"<<hex<<bank<<" head 0x"<<head<<" len 0x"<<len<<dec<<endl;
if (bank >= 0 && bank < MAXBANK) {
bankdat[bank].pos=pos+2;
bankdat[bank].len=len-1;
}
pos += len+1;
}
Int_t minslot = fMap->getMinSlot(roc);
Int_t maxslot = fMap->getMaxSlot(roc);
for (Int_t slot = minslot; slot <= maxslot; slot++) {
if (!fMap->slotUsed(roc,slot)) continue;
bank=fMap->getBank(roc,slot);
if (bank < 0 || bank >= Decoder::MAXBANK) {
cerr << "CodaDecoder::ERROR: bank number out of range "<<endl;
return 0;
}
pos = bankdat[bank].pos;
len = bankdat[bank].len;
if (fDebugFile) *fDebugFile << "CodaDecode:: loading bank "<<roc<<" "<<slot<<" "<<bank<<" "<<pos<<" "<<len<<endl;
crateslot[idx(roc,slot)]->LoadBank(evbuffer,pos,len);
if (crateslot[idx(roc,slot)]->IsMultiBlockMode()) fMultiBlockMode = kTRUE;
if (crateslot[idx(roc,slot)]->BlockIsDone()) fBlockIsDone = kTRUE;
}
if( fDoBench ) fBench->Stop("bank_decode");
return retval;
}
//_____________________________________________________________________________
Int_t CodaDecoder::LoadIfFlagData(const UInt_t* evbuffer)
{
// Need to generalize this ... too Hall A specific
//
// Looks for buffer mode and synch problems. The latter are recoverable
// but extremely rare, so I haven't bothered to write recovery a code yet,
// but at least this warns you.
assert( evbuffer );
UInt_t word = *evbuffer;
UInt_t upword = word & 0xffff0000;
if (fDebugFile) *fDebugFile << "CodaDecode:: TestBit on : Flag data ? "<<hex<<word<<dec<<endl;
if( word == 0xdc0000ff) synchmiss = true;
if( upword == 0xdcfe0000) {
synchextra = true;
Int_t slot = (word&0xf800)>>11;
Int_t nhit = (word&0x7ff);
if(fDebug>0) {
cout << "THaEvData: WARNING: Fastbus slot ";
cout << slot << " has extra hits "<<nhit<<endl;
}
}
if( upword == 0xfabc0000) {
datascan = *(evbuffer+3);
if(fDebug>0 && (synchmiss || synchextra)) {
cout << "THaEvData: WARNING: Synch problems !"<<endl;
cout << "Data scan word 0x"<<hex<<datascan<<dec<<endl;
}
}
if( upword == 0xfabb0000) buffmode = false;
if((word&0xffffff00) == 0xfafbbf00) {
buffmode = true;
synchflag = word&0xff;
}
return HED_OK;
}
Int_t CodaDecoder::FindRocs(const UInt_t *evbuffer) {
assert( evbuffer && fMap );
#ifdef FIXME
if( fDoBench ) fBench->Begin("physics_decode");
#endif
Int_t status = HED_OK;
if( (evbuffer[1]&0xffff) != 0x10cc ) std::cout<<"Warning, header error"<<std::endl;
if( event_type > MAX_PHYS_EVTYPE ) std::cout<<"Warning, Event type makes no sense"<<std::endl;
memset(rocdat,0,MAXROC*sizeof(RocDat_t));
// Set pos to start of first ROC data bank
Int_t pos = evbuffer[2]+3; // should be 7
nroc = 0;
while( pos+1 < event_length && nroc < MAXROC ) {
Int_t len = evbuffer[pos];
Int_t iroc = (evbuffer[pos+1]&0xff0000)>>16;
if( iroc>=MAXROC ) {
#ifdef FIXME
if(fDebug>0) {
cout << "ERROR in EvtTypeHandler::FindRocs "<<endl;
cout << " illegal ROC number " <<dec<<iroc<<endl;
}
if( fDoBench ) fBench->Stop("physics_decode");
#endif
return HED_ERR;
}
// Save position and length of each found ROC data block
// Save position and length of each found ROC data block
rocdat[iroc].pos = pos;
rocdat[iroc].len = len;
irn[nroc++] = iroc;
pos += len+1;
}
if (fDebugFile) {
*fDebugFile << "CodaDecode:: num rocs "<<dec<<nroc<<endl;
for (Int_t i=0; i < nroc; i++) {
Int_t iroc=irn[i];
*fDebugFile << " CodaDecode:: roc num "<<iroc<<" pos "<<rocdat[iroc].pos<<" len "<<rocdat[iroc].len<<endl;
}
}
return status;
}
// To initialize the THaSlotData member on first call to decoder
int CodaDecoder::init_slotdata(const THaCrateMap* map)
{
// Update lists of used/clearable slots in case crate map changed
if(!map) return HED_ERR;
for (Int_t iroc = 0; iroc<MAXROC; iroc++) {
if ( !map->crateUsed(iroc) ) continue;
for (Int_t islot=0; islot < MAXSLOT; islot++) {
if ( !map->slotUsed(iroc,islot) ) continue;
makeidx(iroc,islot);
}
}
if (fDebugFile) *fDebugFile << "CodaDecode:: fNSlotUsed "<<fNSlotUsed<<endl;
for( int i=0; i<fNSlotUsed; i++ ) {
THaSlotData* crslot = crateslot[fSlotUsed[i]];
int crate = crslot->getCrate();
int slot = crslot->getSlot();
crslot->loadModule(map);
if (fDebugFile) *fDebugFile << "CodaDecode:: crate, slot "<<crate<<" "<<slot<<" Dev type = "<<crslot->devType()<<endl;
if( !map->crateUsed(crate) || !map->slotUsed(crate,slot) ||
!map->slotClear(crate,slot)) {
for( int k=0; k<fNSlotClear; k++ ) {
if( crslot == crateslot[fSlotClear[k]] ) {
for( int j=k+1; j<fNSlotClear; j++ )
fSlotClear[j-1] = fSlotClear[j];
fNSlotClear--;
break;
}
}
}
if( !map->crateUsed(crate) || !map->slotUsed(crate,slot)) {
for( int j=i+1; j<fNSlotUsed; j++ )
fSlotUsed[j-1] = fSlotUsed[j];
fNSlotUsed--;
}
}
return HED_OK;
}
//_____________________________________________________________________________
void CodaDecoder::dump(const UInt_t* evbuffer) const
{
if( !evbuffer ) return;
if ( !fDebugFile ) return;
Int_t len = evbuffer[0]+1;
Int_t type = evbuffer[1]>>16;
Int_t num = evbuffer[4];
*fDebugFile << "\n\n Raw Data Dump " << hex << endl;
*fDebugFile << "\n Event number " << dec << num;
*fDebugFile << " length " << len << " type " << type << endl;
Int_t ipt = 0;
for (Int_t j=0; j<(len/5); j++) {
*fDebugFile << dec << "\n evbuffer[" << ipt << "] = ";
for (Int_t k=j; k<j+5; k++) {
*fDebugFile << hex << evbuffer[ipt++] << " ";
}
}
if (ipt < len) {
*fDebugFile << dec << "\n evbuffer[" << ipt << "] = ";
for (Int_t k=ipt; k<len; k++) {
*fDebugFile << hex << evbuffer[ipt++] << " ";
}
*fDebugFile << endl;
}
*fDebugFile<<dec<<endl;
}
//_____________________________________________________________________________
void CodaDecoder::CompareRocs( )
{
if (!fMap || !fDebugFile) return;
*fDebugFile<< "Comparing cratemap rocs with found rocs"<<endl;
for (Int_t i=0; i<nroc; i++) {
Int_t iroc = irn[i];
if (!fMap->crateUsed(iroc)) {
*fDebugFile << "ERROR CompareRocs:: roc "<<iroc<<" in data but not in map"<<endl;
}
}
for (Int_t iroc1 = 0; iroc1<MAXROC; iroc1++) {
if ( !fMap->crateUsed(iroc1) ) continue;
Int_t ifound=0;
for( Int_t i=0; i<nroc; i++ ) {
Int_t iroc2 = irn[i];
if (iroc1 == iroc2) {
ifound=1;
break;
}
}
if (!ifound) *fDebugFile << "ERROR: CompareRocs: roc "<<iroc1<<" in cratemap but not found data"<<endl;
}
}
//_____________________________________________________________________________
void CodaDecoder::ChkFbSlot( Int_t roc, const UInt_t* evbuffer,
Int_t ipt, Int_t istop )
{
const UInt_t* p = evbuffer+ipt; // Points to ROC ID word (1 before data)
const UInt_t* pstop =evbuffer+istop; // Points to last word of data in roc
while (p++ < pstop) {
Int_t slot = (UInt_t(*p))>>27; // A "self-reported" slot.
Int_t index = MAXSLOT*roc + slot;
if ((slot > 0) && (index >=0 && index < MAXROC*MAXSLOT)) fbfound[index]=1;
}
}
//_____________________________________________________________________________
void CodaDecoder::ChkFbSlots()
{
// This checks the fastbus slots to see if slots are appearing in both the
// data and the cratemap. If they appear in one but not the other, a warning
// is issued, which usually means the cratemap is wrong.
Int_t slotstat[MAXROC*MAXSLOT];
for (Int_t iroc=0; iroc<MAXROC; iroc++) {
if ( !fMap->isFastBus(iroc) ) continue;
for (Int_t islot=0; islot<MAXSLOT; islot++) {
Int_t index = MAXSLOT*iroc + islot;
slotstat[index]=0;
if (fbfound[index] && fMap->slotUsed(iroc, islot)) {
if (fDebugFile) *fDebugFile << "FB slot in cratemap and in data. (good!). roc = "<<iroc<<" slot = "<<islot<<endl;
slotstat[index]=1;
}
if ( !fbfound[index] && fMap->slotUsed(iroc, islot)) {
if (fDebugFile) *fDebugFile << "FB slot NOT in data, but in cratemap (bad!). roc = "<<iroc<<" slot = "<<islot<<endl;
slotstat[index]=2;
}
if ( fbfound[index] && !fMap->slotUsed(iroc, islot)) {
if (fDebugFile) *fDebugFile << "FB slot in data, but NOT in cratemap (bad!). roc = "<<iroc<<" slot = "<<islot<<endl;
slotstat[index]=3;
}
}
}
for (Int_t iroc=0; iroc<MAXROC; iroc++) {
if ( !fMap->isFastBus(iroc) ) continue;
for (Int_t islot=0; islot<MAXSLOT; islot++) {
Int_t index = MAXSLOT*iroc + islot;
if (slotstat[index]==2) cout << "Decoder:: WARNING: Fastbus module in (roc,slot) = ("<<iroc<<","<<islot<<") found in cratemap but NOT in data !"<<endl;
}
}
for (Int_t iroc=0; iroc<MAXROC; iroc++) {
if ( !fMap->isFastBus(iroc) ) continue;
for (Int_t islot=0; islot<MAXSLOT; islot++) {
Int_t index = MAXSLOT*iroc + islot;
if (slotstat[index]==3) cout << "Decoder:: WARNING: Fastbus module in (roc,slot) = ("<<iroc<<","<<islot<<") found in data but NOT in cratemap !"<<endl;
}
}
}
//_____________________________________________________________________________
void CodaDecoder::SetRunTime( ULong64_t tloc )
{
// Set run time and re-initialize crate map (and possibly other
// database parameters for the new time.
if( fRunTime == tloc )
return;
fRunTime = tloc;
fNeedInit = true; // force re-init
}
}
//_____________________________________________________________________________
ClassImp(Decoder::CodaDecoder)
|
[
"[email protected]"
] | |
c81e297f99ac3ac2957797960dcc35bca88cd2d5
|
7780840808aaaa44897c26c2b999e21ade8fe73d
|
/challenges/binary/PU_casella/chall.c
|
67234168e2e682b9c88020f17b98fb48d568e56d
|
[] |
no_license
|
born2scan/dantectf-21
|
3f998794b2510409432cc2d58d862f3ff28440c0
|
93744a37805c805490cc299f6e5358f1c632f518
|
refs/heads/master
| 2023-05-27T23:18:26.903813 | 2021-06-23T13:02:01 | 2021-06-23T16:09:49 | 379,599,823 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 1,710 |
c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void get_flag(char flag[57]) {
char s1[] = "VQ[DQcR\x7f}Melyxl}Lav{Hw~cw`jwLgmq}\x7f|Fs\x7f{\x7fOsyMtG{xruczx\x7fxe";
char s2[] = "31415926535897932384626433832795028841971693993751058209";
for (int i = 0; i < 56; i++) {
flag[i] = (char)(s1[i] ^ s2[i] ^ 33);
}
flag[56] = 0;
}
int main() {
char guess[333];
printf("Aspettando al piede della montagna del purgatorio, non potete far a meno di ripensare alla parola segreta per l'accesso al sentiero che conduce alla vetta.\nCi siete quasi, continuate a camminare in fila, dietro agli altri, mentre vi concentrate profondamente per non dimenticare.\n\nE' finalmente il vostro turno, siete confidenti, alzate lo sguardo, ma sfortunatamente posizionate male il piede su una roccia sporgente il giusto per farvi ritrovare a terra confusi.\nMentre cercare di raccapezzarvi su quanto successo, realizzate di esservi dimenticati l'importante parola che stavate cercando di non scordare.\nSiete certi iniziasse con DANTE...qualcos'altro, ma fate fatica a ricordare il resto...\n\nPoiche' e' il vostro turno, dovrete pur dire qualcosa ed il tempo non e' dalla vostra parte.\n\n...Qual'era? Forse: ");
fgets(guess, 57, stdin);
char flag[57];
get_flag(flag);
if (strncmp(guess, flag, 56) == 0) {
printf("\nChe sollievo, nel mezzo degli infiniti pensieri riuscite a ricordare la parola segreta che v'era smarrita. Vi e' consentito l'accesso al sentiero...\n" );
} else {
printf("\nMh, non siete del tutto convinti, che sia meglio concentrarsi su altro?\n Qualcosa vi fa pensare che sia meglio non sbagliare...\n");
}
return 0;
}
|
[
"[email protected]"
] | |
713d3662be81fdda737fa297349a7d0f8ec40fe9
|
cfff53bed3091b4a1ce4e4d5506ae395ef08e2b2
|
/CM7/Hardware/Screen/image/BatteryImages.h
|
69291dbe73c865bf40f8386e417beb558470a423
|
[] |
no_license
|
nadavguy/SelfDriving
|
79fa9993bc92ccb2999a2fe8cc937af5762b1ee4
|
6857adac6b3749270b34890e81d9b60de60359c6
|
refs/heads/main
| 2023-08-31T22:54:45.281259 | 2021-10-24T17:43:16 | 2021-10-24T17:43:16 | 371,081,188 | 0 | 0 | null | null | null | null |
UTF-8
|
C
| false | false | 882 |
h
|
/*
* BatteryImages.h
*
* Created on: Apr 6, 2021
* Author: gilad
*/
#ifndef SCREEN_IMAGE_BATTERYIMAGES_H_
#define SCREEN_IMAGE_BATTERYIMAGES_H_
extern const unsigned char gImage_RC_Battery_Charging[];
extern const unsigned char gImage_RC_Battery_Full[];
extern const unsigned char gImage_RC_Battery_Medium[];
extern const unsigned char gImage_RC_Battery_Low[];
extern const unsigned char gImage_Battery_Empty[];
extern const unsigned char gImage_RC_Battery_Alert[];
extern const unsigned char gImage_SafeAir_Battery_Charging[];
extern const unsigned char gImage_SafeAir_Battery_Full[];
extern const unsigned char gImage_SafeAir_Battery_Medium[];
extern const unsigned char gImage_SafeAir_Battery_Low[];
extern const unsigned char gImage_SafeAir_Battery_Alert[];
extern const unsigned char gImage_SafeAir_External_Power[];
#endif /* SCREEN_IMAGE_BATTERYIMAGES_H_ */
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.