content
stringlengths 10
4.9M
|
---|
If you didn't care so much, you wouldn't have to defend your ideas, try to talk around them, or walk off interview sets like O'Donnell did on Piers Morgan last night. Honestly. Just live and let live.
Listen up, Christine O'Donnell, Mr. and Mrs. Michele Bachmann, and every other like-minded member of the GOP: When it comes to the topic of sex, take a chill pill. Relax. Why do you care what other people do in the privacy of their bedrooms?
I'm a Republican. A libertarian-leaning Republican, but a Republican nonetheless. I even worked for two GOP members of the California Senate as well as a sitting Republican U.S. senator, so I have some street-cred when it comes to conservative causes.
Still, I can't get past my own party's stance on same-sex marriage. (No pun intended, Senator Craig.) I get apoplectic when I hear the likes of Michele Bachmann saying she would support a federal amendment defining marriage as between one man and one woman.
As a lawyer, I would hope she would have more reverence for the Constitution and the Bill of Rights -- which were expressly written to limit the powers of government, not the people. Amending the Constitution to limit the rights of gays to enter into a marriage contract makes a mockery of this country's most sacred document.
Congresswoman Bachmann proclaims herself to be an outsider, a maverick, a huge supporter of the Tea Party, yet her position on the matter seems to go against all the Tea Party stands for: freedom, liberty, limited government, a return this country's constitutional roots.
It saddens me that Republicans think it's okay to trample on civil liberties if it's for the right reasons: gay marriage, FISA, The Patriot Act. But, there should be no room in the party for limiting liberty and freedom.
Part of being an American is being free to believe what you want, acknowledging that right in others, and being treated equally under the law. Opposition to gay marriage flies in the face of that.
Furthermore, the federal government should not be in the business of defining marriage - it's a state issue and if a state wishes to legalize it, so be it. It's hypocritical for Republicans to espouse states' rights while at the same time supporting a federal ban on gay marriage.
Personally, while I find the mainstream Republican views on gay marriage abominable, it's not a make or break issue for me. Regardless of what I hear spewing from the candidates' mouths, the issue will resolve itself before the courts. I believe same-sex couples will one day have the right to marry in every state, and soon.
Support for gay marriage is growing. A recent survey by the Pew Research Center found 45 percent of adults favored allowing gays and lesbians to marry -- up from 42 percent last year.
If the GOP wants to cast a wider net and live up to its ideals, it would embrace a more libertarian attitude on the matter.
After all, most Republicans would tell you the man they admire most is Ronald Reagan. But, in a 1975 interview with Reason magazine, Reagan said, "I believe the very heart and soul of conservatism is libertarianism." He continues, "The basis of conservatism is a desire for less government interference or less centralized authority or more individual freedom and this is a pretty general description also of what libertarianism is." He says government exists "for the defense of the rights of the individual."
That means gays, too. |
<reponame>microsoft/powerbi-report-viewer
//import { IAppAuthContext } from '@msx/platform-types';
import { trackPromise } from 'react-promise-tracker';
export async function httpGet(token: string, url: string, onSuccessCallback: any, onErrorCallback: any) {
try {
let response = await trackPromise(fetch(url, {
method: 'get',
headers: {
'Content-Type': 'application/json',
'X-Content-Type-Options': 'nosniff',
'Authorization': "Bearer " + token,
},
}));
var data = await response.json();
if (onSuccessCallback != null) {
onSuccessCallback(data);
}
}
catch (error) {
if (onErrorCallback != null) {
console.log('error');
onErrorCallback(error);
}
}
}
|
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main ()
{
string s,sub;
while (cin>>s>>sub)
{
ll i,ans=0,j,k;
k=0;
for(i=0;i<s.size();i++)
{
if(s[i]==sub[0])
{
k=i;
for(j=0;j<sub.size();j++)
{
if(s[i]==sub[j])
{
i++;
}
else
break;
}
if(j==sub.size())
{
ans++;
i--;
}
else
i=k;
}
}
cout<<ans<<endl;
}
}
|
Cholinergic Drugs for Alzheimer's Disease Enhance in Vitro Dopamine Release
Alzheimer's disease is a neurodegenerative disorder associated with a decline in cognitive abilities. Patients also frequently have noncognitive symptoms, such as anxiety, depression, apathy, and psychosis, that impair daily living. The most commonly prescribed treatments for Alzheimer's disease are acetylcholinesterase inhibitors, such as donepezil (Aricept; Eisai Inc., Teaneck, NJ) and galantamine (Reminyl; Janssen Pharmaceutica Products, Titusville, NJ). Enhanced cholinergic functions caused by these compounds are believed to underlie improvements in learning, memory, and attention. The noncognitive aspects of dementia, however, are usually linked to serotonin and dopamine rather than acetylcholine because those neurotransmitter systems most directly influence mood, emotional balance, and psychosis. Fast-scan cyclic voltammetry applied to mouse striatal brain slices was used to measure the real-time release of dopamine arising from spontaneous activity or from single electrical stimulations. At concentrations that include their prescribed dosage ranges, donepezil (1–1000 nM) and galantamine (50–1000 nM) increase action potential-dependent dopamine release. Consistent with previous literature, the data support slightly different modes of action for donepezil and galantamine. The ability of these commonly prescribed drugs to alter catecholamine release may underlie their influence over noncognitive symptoms of dementia. Furthermore, these results suggest that acting via nicotinic receptors, these drugs may serve presently untapped therapeutic roles by altering dopamine release in other disorders involving dopaminergic systems. |
/**
* Make hash from internal state.
*
* @return Long hash value.
*/
private long makeHash() {
h1 ^= len;
h2 ^= len;
h1 += h2;
h2 += h1;
h1 = fmix64(h1);
h2 = fmix64(h2);
h1 += h2;
h2 += h1;
return h1;
} |
I’ve made some changes to my fat bike this summer and fall I’m pretty jazzed about it. The planed changes were simple enough of moving to a one by drivetrain with Shimano XTR bits and adding Shimano XTR brakes for good measure too.
While adding the Shimano XTR brakes and rotors my old Carver carbon fork didn’t want to behave with the new setup so I had to change the fork from that to the MRP carbon fatbike fork (previously named White Brothers). More thoughts on the fork are coming but for now let me say that when compared to the Carver fork I had the MRP is stiffer, heavier, more expensive, and less attractive, but I’m happy with it. I just can’t believe they put the sticker under the clear coat…
I love how clean the bottom bracket area is with the one by! The gearing seems perfect for me with a 28 tooth chainring and a normal 11-36 cassette.
While I was reinstalling a brake rotor with the non extended bolts I had a bone head moment and over torqued the bolts. Expensive lesson learned and with a set of Hope Fatsno hubs things could return back to normal.
The bike is a lot of fun and I can’t wait to smile a lot in the cold this winter riding it.
Enjoy what you read? Subscribe to be notified of future posts via email by either clicking the Follow button at the bottom or the Subscribe section on the right! |
/***********************************************************************/
/* This function loads each POFF file specified on the command line,
* merges the input POFF data, and generates intermediate structures
* to be used in the final link.
*/
static void loadInputFiles(poffHandle_t outHandle)
{
poffHandle_t inHandle;
FILE *instream;
char fileName[FNAME_SIZE+1];
uint32_t pcOffset = 0;
uint32_t fnOffset = 0;
uint32_t symOffset = 0;
uint32_t roOffset = 0;
uint32_t pcEnd = 0;
uint32_t fnEnd = 0;
uint32_t symEnd = 0;
uint16_t errCode;
bool progFound = false;
int i;
for (i = 0; i < nPoffFiles; i++)
{
inHandle = poffCreateHandle();
if (inHandle == NULL) fatal(eNOMEMORY);
(void)extension(inFileName[i], "o", fileName, 0);
instream = fopen(fileName, "rb");
if (instream == NULL)
{
fprintf(stderr, "ERROR: Could not open %s: %s\n",
fileName, strerror(errno));
exit(1);
}
errCode = poffReadFile(inHandle, instream);
if (errCode != eNOERROR)
{
fprintf(stderr, "ERROR: Could not read %s (%d)\n",
fileName, errCode);
exit(1);
}
checkFileHeader(inHandle, outHandle, pcOffset, &progFound);
roOffset = mergeRoData(inHandle, outHandle);
pcEnd = mergeProgramData(inHandle, outHandle, pcOffset, roOffset);
fnEnd = mergeFileNames(inHandle, outHandle);
(void)mergeLineNumbers(inHandle, outHandle, pcOffset, fnOffset);
symEnd = mergeSymbols(inHandle, pcOffset, symOffset);
mergeRelocations(inHandle, pcOffset, symOffset);
insn_ResetOpCodeRead(inHandle);
poffDestroyHandle(inHandle);
fclose(instream);
pcOffset = pcEnd;
fnOffset = fnEnd;
symOffset = symEnd;
}
if (!progFound)
{
fprintf(stderr, "ERROR: No program file found in input files\n");
exit(1);
}
} |
<gh_stars>10-100
//Recursive code
class Solution
{
public:
//Function to find the length of longest common subsequence in two strings.
//<NAME>
//<NAME>
//<NAME>
//<NAME>, <NAME>, <NAME>, <NAME>
int lcs(int x, int y, string s1, string s2)
{
// your code here
if(x == 0 || y == 0)
return 0;
if(s1[x-1] == s2[y-1])
return lcs(x-1, y-1, s1, s2) + 1;
else
{
int a = lcs(x-1, y, s1, s2);
int b = lcs(x, y-1, s1, s2);
return max(a, b);
}
}
};
//DP (tabulation)
class Solution {
public:
//<NAME>
//<NAME>
//<NAME>
//<NAME>, <NAME>, <NAME>, <NAME>
int longestCommonSubsequence(string text1, string text2) {
int m = text1.size();
int n = text2.size();
int dp[m+1][n+1];
for(int i = 0; i <= m; i++)
dp[i][0] = 0;
for(int i = 0; i <= n; i++)
dp[0][i] = 0;
for(int i = 1; i <= m; i++)
{
for(int j = 1; j <= n; j++)
{
if(text1[i-1] == text2[j-1])
dp[i][j] = dp[i-1][j-1] + 1;
else
{
int a = dp[i-1][j];
int b = dp[i][j-1];
dp[i][j] = max(a, b);
}
}
}
return dp[m][n];
}
};
|
<reponame>i-novation/ng-rapidforms<gh_stars>1-10
import {Directive} from '@angular/core';
@Directive({
selector: '[nrfGlobalErrorOutput]'
})
export class GlobalErrorOutputDirective {
}
|
/**
Simulation framework for event driven simulation.
*/
class Simulation
{
public:
void schedule_event(Event* new_event);
void run();
private:
priority_queue<Event*, vector<Event*>, EventComparison> event_queue;
} |
#pragma once
#include <fiblib/fiblib_api.h>
namespace fiblib
{
/**
* @brief
* Calculator of fibonacci numbers
*/
class FIBLIB_API Fibonacci
{
public:
/**
* @brief
* Constructor
*/
Fibonacci();
/**
* @brief
* Destructor
*/
virtual ~Fibonacci();
/**
* @brief
* Calculate fibonacci number
*
* @param[in] i
* Index
*
* @return
* Value of the i'th fibonacci number
*/
unsigned int operator()(unsigned int i);
};
} // namespace fiblib
|
GOOD training and state-of-the-art equipment saved the lives of two Dubbo men who walked away from a light plane crash near Gilgandra. Pilot John Nixon and passenger Tom Warren were standing next to the wreckage of a Cirrus SR22-G3 single-engine, four-seater aircraft when rescue responders arrived on the scene at Leeches Creek Road, 10km south of Gilgandra, about 2.30pm on Wednesday. "Everyone was pretty amazed,'' Mr Nixon told the Daily Liberal yesterday. "I think they were expecting to find serious injuries.'' The Cirrus aircraft - owned by a friend of Mr Nixon - is fitted with a rocket-propelled emergency parachute system capable of lowering the entire aircraft and its occupants to the ground. The Australian Transport Safety Bureau yesterday reported the accident was the first successful emergency parachute deployment by a Cirrus aircraft in Australia. Mr Nixon, a 41-year-old businessman, had not anticipated any problems as he made preparations to fly from Queensland to Dubbo. He briefed his 28-year-old passenger about the emergency features of the aircraft in accordance with normal procedures. "Everything was fine and we were enjoying the day,'' Mr Nixon said. As he looked down at the Gilgandra district from about 5000 feet, the aircraft suddenly lost oil pressure and the engine seized. "I set the plane to glide into Gilgandra airport but quickly realised we weren't going to make it,'' Mr Nixon said. "Tom and I were both looking for dirt airstrips on properties but we couldn't find any. "I informed air traffic control about the emergency situation, turned the plane away from traffic on the Newell Highway and headed into a big open paddock. continued page 2 "I own a plane exactly the same as the one I was flying and knew all about the ballistic parachute safety system. "Not many people in the world have set off an aircraft emergency parachute but I had attended a training course at Wagga about 18 months ago and knew exactly what to do.'' Mr Nixon said he and Mr Warren didn't have time to feel frightened or panic. "We were on the ground less than a minute after the oil gauge indicated the problem,'' he said. "Adrenalin kicked in and I automatically did what was needed.'' Mr Nixon knew there was a risk the aircraft could drift and waited until 2000 feet before deploying the parachute. "I needed to make quick decisions,'' he said. "The chute went off like a missile out the back of the aircraft and made a hell of a noise. We came to an almighty stop and the plane went into a nose down attitude as the parachute inflated. "About six seconds later the line cutters (small explosive devices) at the back of plane went off, levelling the aircraft. "The ground was approaching pretty quickly but I was calm and Tom was calm. He was a good passenger and did everything he was supposed to do. "The plane hit the ground on its wheels. The undercarriage collapsed to take the impact of the crash, just as it is supposed to do. "The aircraft seats are especially designed to take the force of a crash so the occupants don't break their backs. "The seats and the emergency airbag system gave us good protection. Everything worked like a charm.'' When the plane was on the ground both men jumped out through the passenger door and moved away from the aircraft in case it caught fire. "We stood back for a couple of minutes to make sure we were both OK before assessing the scene,'' Mr Nixon said. "I went back into the aircraft to get my mobile phone and contacted air traffic control. They were pleased to hear we were OK.'' Asked if he felt lucky, Mr Nixon's response was matter-of-fact: "The Cirrus is a bloody good aircraft and everything went to plan. An emergency happened and I dealt with it.'' A pilot since 2005, Mr Nixon has clocked up 1950 flying hours. "I have had good training and won't be worried about getting in my plane and going for a fly.'' Yesterday Mr Nixon and Mr Warren travelled back to the accident scene to check the aircraft. Mr Nixon has a black eye and a bruise on his chin, caused when his knee flew up during the impact. Mr Warren has no injuries. The Australian Transport Safety Bureau is conducting an investigation. [email protected]
https://nnimgt-a.akamaihd.net/transform/v1/resize/frm/storypad-gQFChmftLwURjFztaywNzt/58828404-6aa9-4230-86c4-b96740f6387a.JPG/w1200_h678_fcrop.jpg |
/// Construct a new workspace from an input stream representing a Calyx
/// program.
pub fn construct(
file: &Option<PathBuf>,
lib_path: &Path,
) -> CalyxResult<Self> {
Self::construct_with_all_deps(file, lib_path, false)
} |
package com.github.vvorks.builder.client.common.ui;
public interface EventHandler {
int onKeyDown(UiNode target, int keyCode, int charCode, int mods, int time);
int onKeyPress(UiNode target, int keyCode, int charCode, int mods, int time);
int onKeyUp(UiNode target, int keyCode, int charCode, int mods, int time);
int onInput(UiNode target, String data, String content, int mods, int time);
int onMouseMove(UiNode target, int x, int y, int mods, int time);
int onMouseDown(UiNode target, int x, int y, int mods, int time);
int onMouseUp(UiNode target, int x, int y, int mods, int time);
int onMouseClick(UiNode target, int x, int y, int mods, int time);
int onMouseWheel(UiNode target, int x, int y, int dx, int dy, int mods, int time);
void onResize(int screenWidth, int screenHeight);
int onImageLoaded(String url);
int onDataSourceUpdated(DataSource ds);
void onResourceChanged();
}
|
/// Take a HTML string and encapsulate with the correct tags. Will also add the stylesheet.
pub fn encapsulate_bare_html(
content: String,
config: &Configuration,
title: String,
) -> Result<String> {
let mut data = Map::new();
data.insert(
"stylesheet".to_string(),
Json::Array(
config
.stylesheet()
.iter()
.map(|x| Json::String(x.to_owned()))
.collect(),
),
);
data.insert(
"title".to_string(),
Json::String(config.title() + " - " + &title),
);
data.insert("md_content".to_string(), Json::String(content));
build_template(&data, include_str!("../templates/basic.hbs"))
} |
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//used in non-critical section
bool ComIsTxBufFull()
{
bool f;
SysDI();
f= (((tbin+1)& (TX_BUF_SIZE-1))==tbout);
SysEI();
return f;
} |
// GetGitAuthor returns the author name and email
func GetGitAuthor() (string, string, error) {
name, err := runCmd("git", []string{"config", "--get", "user.name"})
if err != nil {
return "", "", errors.Wrap(err, string(name))
}
email, err := runCmd("git", []string{"config", "--get", "user.email"})
if err != nil {
return "", "", err
}
return strings.TrimSpace(string(name)), strings.TrimSpace(string(email)), nil
} |
/**
* TODO: Add class description
*/
public class deleteAllVisibleCookies extends AbstractWebDriverModule
{
/**
* {@inheritDoc}
*/
@Override
protected void doCommands(final String...parameters) throws Exception
{
final Open_ExamplePage _open_ExamplePage = new Open_ExamplePage();
_open_ExamplePage.execute();
//
// ~~~ createCookies ~~~
//
startAction("createCookies");
createCookie("testsuite-xlt_1=xlt-testsuite_1");
createCookie("testsuite-xlt_2=xlt-testsuite_2");
createCookie("testsuite-xlt_3=xlt-testsuite_3");
//
// ~~~ checkPresence ~~~
//
startAction("checkPresence");
final AssertCookie _assertCookie = new AssertCookie();
_assertCookie.execute("testsuite-xlt_1", "xlt-testsuite_1");
final AssertCookie _assertCookie0 = new AssertCookie();
_assertCookie0.execute("testsuite-xlt_2", "xlt-testsuite_2");
final AssertCookie _assertCookie1 = new AssertCookie();
_assertCookie1.execute("testsuite-xlt_3", "xlt-testsuite_3");
//
// ~~~ deleteAll ~~~
//
startAction("deleteAll");
deleteAllVisibleCookies();
//
// ~~~ checkAbsence ~~~
//
startAction("checkAbsence");
final AssertCookie _assertCookie2 = new AssertCookie();
_assertCookie2.execute("testsuite-xlt_1", "");
final AssertCookie _assertCookie3 = new AssertCookie();
_assertCookie3.execute("testsuite-xlt_2", "");
final AssertCookie _assertCookie4 = new AssertCookie();
_assertCookie4.execute("testsuite-xlt_3", "");
}
} |
/**
* A {@link CorsRequestContext} that delegates what it can to a provided {@link RequestContext}.
*
* @author Michael Irwin
*/
public class DelegatingCorsRequestContext implements CorsRequestContext {
private final RequestContext requestContext;
public DelegatingCorsRequestContext(RequestContext requestContext) {
this.requestContext = requestContext;
}
@Override
public String getOriginHeader() {
return requestContext.getOriginHeader();
}
@Override
public String getRequestMethod() {
return requestContext.getRequestMethod();
}
@Override
public boolean isPreFlightRequest() {
return getRequestMethod().toUpperCase().equals("OPTIONS");
}
@Override
public String getRequestedMethod() {
return requestContext.getRequestedMethod();
}
@Override
public List<String> getRequestedHeadersAsList() {
if (getRequestedHeaders() == null || getRequestedHeaders().equals(""))
return Collections.emptyList();
return Stream.of(getRequestedHeaders().split(","))
.map(String::trim)
.collect(Collectors.toList());
}
@Override
public String getRequestedHeaders() {
return requestContext.getRequestedHeaders();
}
public RequestContext getRequestContext() {
return requestContext;
}
} |
/**
* show the selected parameter's graph
* @param position the position of all the elements in the selected sequence
* @param parameterValues parameter's value of all the elements
* @param keypath the key path of parameter which is selected
*/
public void showPlot( final List<Double> position, final List<Double> parameterValues,
final String keyPath, final String legend ){
double[] position1= new double[position.size()];
double[] twissParameterValues1= new double[parameterValues.size()];
for( int index=0; index < position.size(); index++ ){
position1[index]=position.get( index );
twissParameterValues1[index]=parameterValues.get( index );
}
BasicGraphData parameterPlotData= new BasicGraphData();
configureGraph( parameterPlotData, keyPath, legend );
parameterPlotData.updateValues( position1, twissParameterValues1 );
PARAMETERS_PLOT.addGraphData( parameterPlotData );
} |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime, timedelta
from odoo.addons.digest.tests.common import TestDigestCommon
from odoo.tools import mute_logger
class TestCrmDigest(TestDigestCommon):
@classmethod
@mute_logger('odoo.models.unlink')
def setUpClass(cls):
super().setUpClass()
cls.env['crm.lead'].search([]).unlink()
cls.env['crm.lead'].create([{
'name': 'Lead 1',
'company_id': cls.company_1.id,
'probability': 100,
'type': 'opportunity',
'date_closed': datetime.now(),
}, {
'name': 'Lead 2',
'company_id': cls.company_1.id,
'probability': 90,
'type': 'opportunity',
'date_closed': datetime.now(),
}, {
'name': 'Lead 3',
'company_id': False,
'probability': 100,
'type': 'opportunity',
'date_closed': datetime.now(),
}, {
'name': 'Lead 4',
'company_id': cls.company_1.id,
'probability': 100,
'type': 'opportunity',
'date_closed': datetime.now() - timedelta(days=700),
}])
def test_kpi_crm_lead_created_value(self):
self.assertEqual(self.digest_1.kpi_crm_lead_created_value, 3)
self.assertEqual(self.digest_2.kpi_crm_lead_created_value, 0,
msg='This digest is in a different company')
self.assertEqual(self.digest_3.kpi_crm_lead_created_value, 3,
msg='This digest has no company, should take the current one')
self.digest_3.invalidate_recordset()
self.assertEqual(
self.digest_3.with_company(self.company_2).kpi_crm_lead_created_value,
0,
)
|
/**
* Create a reusable {@link JsonFormatter} bound to a {@link DisconnectedOutputStream}.
*
* @return {@link JsonFormatter} writing JSON content in the output stream
*/
private JsonFormatter createJsonFormatter() {
try {
DisconnectedOutputStream outputStream = new DisconnectedOutputStream();
JsonGenerator generator = createGenerator(outputStream);
return new JsonFormatter(outputStream, generator);
} catch (IOException e) {
throw new IllegalStateException("Unable to initialize Jackson JSON layer", e);
}
} |
<reponame>random-geek/MapEditr<filename>src/commands/set_param2.rs
use super::{Command, ArgResult};
use crate::unwrap_or;
use crate::spatial::{Vec3, Area, InverseBlockIterator};
use crate::instance::{ArgType, InstArgs, InstBundle};
use crate::map_block::MapBlock;
use crate::utils::{query_keys, to_bytes, to_slice, fmt_big_num};
fn set_param2_partial(block: &mut MapBlock, area: Area, invert: bool,
node_id: Option<u16>, val: u8) -> u64
{
let nd = block.node_data.get_mut();
let mut count = 0;
if invert {
if let Some(id) = node_id {
for idx in InverseBlockIterator::new(area) {
if nd.nodes[idx] == id {
nd.param2[idx] = val;
count += 1;
}
}
} else {
for idx in InverseBlockIterator::new(area) {
nd.param2[idx] = val;
}
count += 4096 - area.volume();
}
} else {
let no_node = node_id.is_none();
let id = node_id.unwrap_or(0);
for z in area.min.z ..= area.max.z {
let z_start = z * 256;
for y in area.min.y ..= area.max.y {
let zy_start = z_start + y * 16;
for x in area.min.x ..= area.max.x {
let i = (zy_start + x) as usize;
if no_node || nd.nodes[i] == id {
nd.param2[i] = val;
count += 1;
}
}
}
}
}
count
}
fn set_param2(inst: &mut InstBundle) {
let param2_val = inst.args.param2.unwrap();
let node = inst.args.node.as_ref().map(to_bytes);
let keys = query_keys(&mut inst.db, &mut inst.status,
to_slice(&node), inst.args.area, inst.args.invert, true);
inst.status.begin_editing();
let mut count: u64 = 0;
for key in keys {
inst.status.inc_done();
let pos = Vec3::from_block_key(key);
let data = inst.db.get_block(key).unwrap();
let mut block = unwrap_or!(MapBlock::deserialize(&data),
{ inst.status.inc_failed(); continue; });
let node_id = node.as_ref().and_then(|n| block.nimap.get_id(n));
if inst.args.node.is_some() && node_id.is_none() {
// Node not found in this mapblock.
continue;
}
let nd = block.node_data.get_mut();
if let Some(area) = inst.args.area
.filter(|a| a.contains_block(pos) != a.touches_block(pos))
{ // Modify part of block
let block_part = area.rel_block_overlap(pos).unwrap();
count += set_param2_partial(&mut block,
block_part, inst.args.invert, node_id, param2_val);
} else { // Modify whole block
if let Some(nid) = node_id {
for i in 0 .. nd.param2.len() {
if nd.nodes[i] == nid {
nd.param2[i] = param2_val;
count += 1;
}
}
} else {
nd.param2.fill(param2_val);
count += nd.param2.len() as u64;
}
}
inst.db.set_block(key, &block.serialize()).unwrap();
}
inst.status.end_editing();
inst.status.log_info(format!("Set param2 of {} nodes.",
fmt_big_num(count)));
}
fn verify_args(args: &InstArgs) -> ArgResult {
if args.area.is_none() && args.node.is_none() {
return ArgResult::error("An area and/or node is required.");
}
ArgResult::Ok
}
pub fn get_command() -> Command {
Command {
func: set_param2,
verify_args: Some(verify_args),
args: vec![
(ArgType::Node(false), "Name of node to modify"),
(ArgType::Area(false), "Area in which to set param2 values"),
(ArgType::Invert, "Set param2 values *outside* the given area."),
(ArgType::Param2, "New param2 value, between 0 and 255"),
],
help: "Set param2 values of certain nodes."
}
}
|
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
// import Test from '../views/Test'
import Home from '../views/Home'
const routes: Array<RouteRecordRaw> = [
// {
// path: '/',
// name: 'Test',
// component: Test,
// },
{
path: '/',
name: 'Home',
component: Home,
},
{
path: '/element',
name: 'Element',
component: () => import('../views/Element.vue'),
},
{
path: '/tabs',
name: 'Tabs',
component: () => import('../views/Tabs'),
},
{
path: '/designer',
name: 'Designer',
component: () => import('../views/Designer'),
},
{
path: '/yaml',
name: 'Yaml',
component: () => import('../views/Yaml'),
},
]
const router = createRouter({
history: createWebHistory(),
routes,
})
export default router
|
<reponame>chelladurai89/next-share<filename>src/components/buttons/RedditShareButton.ts
import transformObjectToParams from '../../utils';
import createShareButton from '../../hocs/createShareButton';
function redditLink(url: string, { title }: { title?: string }) {
return (
'https://www.reddit.com/submit' +
transformObjectToParams({
url,
title,
})
);
}
const RedditShareButton = createShareButton<{ title?: string }>(
'reddit',
redditLink,
(props) => ({
title: props.title,
}),
{
windowWidth: 660,
windowHeight: 460,
windowPosition: 'windowCenter',
},
);
export default RedditShareButton;
|
from django.conf.urls import patterns, url
from .views import SubmitFAQ, SubmitFAQThanks,QuestionDetail, QuestionList
urlpatterns = patterns('',
url(r'^$', QuestionList.as_view(), name='faq_question_list'),
url(r'^(?P<slug>[\w-]+)$', QuestionDetail.as_view(), name='faq_question_detail'),
# TODO: anonymous users can submit questions, that need approval from the editors
# url(r'^submit$', SubmitFAQ.as_view(), 'faq_submit'),
# url(r'^submit/thanks$', SubmitFAQThanks.as_view(), 'faq_submit_thanks'),
) |
<gh_stars>1-10
import { IDetailsColumnStyleProps, IDetailsColumnStyles } from './DetailsColumn.types';
export declare const getStyles: (props: IDetailsColumnStyleProps) => IDetailsColumnStyles;
|
/**
* Displays a message indicating that there are not enough resources to build
* a structure and what the missing resources are.
*/
void resourceShortageMessage(ResourcePool& _rp, StructureID sid)
{
const ResourcePool& cost = StructureCatalogue::costToBuild(sid);
ResourcePool missing;
if (_rp.commonMetals() < cost.commonMetals()) { missing.commonMetals(cost.commonMetals() - _rp.commonMetals()); }
if (_rp.commonMinerals() < cost.commonMinerals()) { missing.commonMinerals(cost.commonMinerals() - _rp.commonMinerals()); }
if (_rp.rareMetals() < cost.rareMetals()) { missing.rareMetals(cost.rareMetals() - _rp.rareMetals()); }
if (_rp.rareMinerals() < cost.rareMinerals()) { missing.rareMinerals(cost.rareMinerals() - _rp.rareMinerals()); }
std::string message = constants::ALERT_STRUCTURE_INSUFFICIENT_RESORUCES;
if (missing.commonMetals() != 0) { message += std::to_string(missing.commonMetals()) + " Common Metals" + "\n"; }
if (missing.commonMinerals() != 0) { message += std::to_string(missing.commonMinerals()) + " Common Minerals" + "\n"; }
if (missing.rareMetals() != 0) { message += std::to_string(missing.rareMetals()) + " Rare Metals" + "\n"; }
if (missing.rareMinerals() != 0) { message += std::to_string(missing.rareMinerals()) + " Rare Minerals"; }
doAlertMessage(constants::ALERT_INVALID_STRUCTURE_ACTION, message);
} |
The following farms and ranches have certified that they meet Eatwild's criteria for producing grassfed meat, eggs and dairy products. Contact them directly for additional information or to buy their products:
8 O'clock Ranch loves to eat, and eat well! How about you? You are here looking for humanely raised, antibiotic/pesticide/herbicide-free food and we would love to become 'your ranch.'
Grass fed and finished, Dry-Aged Beef and Lamb
and Pastured, GMO-Free Berkshire Pork
Pastured, GMO-Free Duck and Turkey
and Pastured, Soy and GMO-Free Chicken
From our ranch to your door – year round.
To fit your needs, you can order individual frozen cuts of meat/poultry from our easy to use website, join the CSA and get monthly boxes, or fill your freezer with a side of beef, pork or lamb cut to your specifications!
You are encouraged to visit the home ranch, either in person or follow us on Instagram, Facebook and YouTube. Our ranch works with three nearby families that also raise beef and lamb (Washburn family), pigs (Hill family), and poultry (Martin family). None of us is certified by any agency—our goal is to be 'You-certified.'
8 O'clock Ranch, John and Kassandra Barton, 293 Old Canton Road, De Kalb Junction, NY 13630. (315) 347-4352.
E-mail: [email protected]. Website: www.8oclockranch.com.
Amazing Creation Ranch offers totally grass fed beef, pastured meat chickens, and pastured turkeys.
It is our priority to be good stewards of the land and animals God has entrusted to us. We focus on keeping our animals on fresh, nutrient-rich pasture as much as weather and seasons allow. All our animals are rotated/moved to fresh pasture daily to insure the best feed and clean environment possible. Beef cows are never fed grain and only quality hay during winter months or dry seasons. Poultry get an organic grain ration that is free of GMO's and chemicals.
Our Beeves are processed in late October right after the prime growing season by a local USDA certified organic processor. We sell beef by the whole, half, or mixed quarter.
Chickens are raised from May to October and are processed on our farm. Turkeys are harvested just before Thanksgiving at the end of their prime growing season. It is always good to order early in the season so we have a better chance of having enough to fill your order at harvest time.
We make it a priority to know our customers and for our customers to know us as we are not certified organic we go above and beyond organic standards to produce safe, sustainable, and nutrient-rich food that is abundant in flavor. We like to be customer-inspected so we encourage our patrons to visit us and see exactly what we are doing and ask any questions.
You can purchase items here at the farm or we do deliver to certain drop points in PA. You can find current details of our operation like prices and ordering information on our website.
Amazing Creation Ranch, Jason & April Wright, 429 Ward Hill Road, Canton PA 17724. (570) 673-8306.
E-mail: [email protected]. Website: www.amazingcreator.com.
Arcadian Pastures is a small family farm located in Schoharie County, NY. We specialize in raising heritage breeds of pork, beef, lamb and chicken. On our grass-fed farm you will find very happy, content animals such as Gloucestershire Old Spot and Tamworth pigs as well as Belted Galloway cattle, Katahdin sheep, and a wide variety of chickens.
We adhere to sustainable farming methods and all of our animals are raised in their most natural environments. They are never caged and are never exposed to antibiotics, hormones, GMOs, or other pesticides. They are happy, care-free and well cared for, and this is all evident in the superb quality of the meat they produce.
Our beef is 100% grass-fed. Our pork, lamb and chicken are all pastured and supplemented with certified organic grains purchased from a local NY farmer. All meats are raised, custom processed (in our on-farm butcher shop), and distributed by us here at the farm. We welcome orders of whole, halves or by specific cuts.
All products are available at our on-farm shop, at NYC Greenmarkets, or we are happy to ship directly to you. Shipping services are available nationwide.
Try our wholesome, nutritionally-dense meats. They are so succulent and delicious you'll never buy from a grocery store again!
Arcadian Pastures, Debra and Laurent Danthine, 591 Saddlemire Hill Road, Sloansville NY 12160. (518) 868-5132.
E-mail: [email protected]. Website: www.arcadianpastures.com.
ARE FARM is a family and community based farm located 30 minutes north of Syracuse, in the town of Pulaski. NY. We are now taking orders, selling shares, and scheduling tours for:
Grass Fed Beef : We sell by the 1/4, 1/2, or whole cow; hamburger-only orders are also available
: We sell by the 1/4, 1/2, or whole cow; hamburger-only orders are also available Pastured Poultry (Chickens/Turkeys): Whole
(Chickens/Turkeys): Whole Egg Mobile Eggs : By the dozen
: By the dozen Pastured Pork : By the 1/2 or whole pig
: By the 1/2 or whole pig Community Garden Veggies (CSA Style): We sell shares in our weekly garden harvest
Farm Tours: Free to customers who place orders anytime; available to the public, workload permitting by appointment. We are only 4.5 hours from NYC with lodging available
Horse Retirement Home/Horse Boarding: Ask about our $99 dollar move in special
Order at anytime, however we custom raise/grow for our customers and have a limited supply. Early orders (January and February) can be guaranteed.
To our Boston family, friends, and customers we make a once a year visit. Place your order and we will deliver every fall to my families location located inside the city of Boston .
Thanks to our family, friends, and customers, for keeping ARE FARM in the family since 1959!
ARE FARM, Jeremy Vrooman, 1871 Co Rt 28, Pulaski NY 13142. (315) 383-4641.
E-mail: [email protected].
Autumn's Harvest Farm is a family friendly farm located in the heart of the Finger Lakes in upstate New York. We currently raise Black Angus Beef cattle, heritage turkeys, heritage egg laying chickens, broiler chickens and heritage pigs.
Our animals are raised on pasture and are rotated daily during the spring, summer and fall. At Autumn's Harvest Farm our goal is to provide our animals with the best quality of life and our customers with the highest quality meats, poultry and eggs. Our products are delivered locally or shipped by mail, however we encourage visitors to come visit the farm and see the great quality of life the animals enjoy. Our beef, pork and poultry are raised all naturally and are processed at USDA inspected facilities.
We currently sell our beef in whole sections, half sections and ground beef by the pound. We sell our pork in whole sections, half sections and sausage by the pound. We sell our broiler chickens in whole and half sections. All of our meats are processed seasonally, eggs are available year round and we have a small amount of frozen products available year round.
Autumn's Harvest Farm, Timothy J. Haws, 5374 McDuffie Town Road, Romulus NY 14541. (607) 869-3879.
E-mail: [email protected]. Website: www.autumnsharvestfarm.com.
Beartown Farms supplies healthy grass fed lamb and beef.
We are situated in the ‘lake effect’ zone east of Lake Ontario - an outstanding location for a grass farm. Forty inches of rain, cool summers, and water holding soils enable us to grow excellent forages without chemical fertilizers or herbicides. With more than 650 acres of meadows and pastures, the sun provides all the energy required to sustain our farm operations.
In order to efficiently manage the land for our animals, we practice rotational grazing and harvest all of our winter feed as hay and grass silage. The farm is home to more than 500 Dorp-Croix hair sheep and 125 Angus cattle. Our lamb is for people who don’t normally like lamb, as there is no wool lanolin taste to the meat, and Angus beef is among the best.
Sustainable agriculture and healthy grass-fed lamb and beef – it doesn’t get better than that. Try some for yourself. Our farm grown lamb and beef are USDA inspected, custom cut and vacuum packaged. Cows are sold by the whole, half and split quarters and lamb by the whole.
You can contact us to order or arrange a delivery directly to specific locations within the northern New York region. Pick-up at the farm is always welcome. Shipping is also available nationwide.
Beartown Farms, 35813 Beartown Road, Antwerp NY 13608. (315) 287-9188.
E-mail: [email protected]. Website: www.beartownfarm.com.
Ben Wever Farm is a diversified family farm raising grass fed beef, pastured pork, chickens and turkeys, and eggs.
This farm has been a sustainable, diversified farm for 180 years. Today we are a grass and pasture based system that offers locally (all animals spend their lives on the farm) produced beef, pork, eggs, chicken, and turkey retail at our farmstand and from a select number of stores in the local Essex County, New York area.
We produce food seasonally, safely, and using organic practices that avoid hormones, pesticides, herbicides, routine antibiotics, and grains for ruminant animals.
We aim to feed our Adirondack neighborhood, not the whole nation.
Ben Wever Farm, Shaun and Linda Gilliland, 444 Mountain View Drive, Willsboro NY 12996. (518) 963-7447.
E-mail: [email protected]. Website: http://benweverfarm.blogspot.com.
Bennington Beefalo is a family business located in the green hills of Wyoming County in western New York State.
Beefalo, like their relatives the American Bison, thrive on the grasses and various legumes found in our pastures. We try to provide as much green grass, fresh air and sunshine as possible to our animals by employing rotational grazing to provide them with a fresh salad bar eating experience. This menu of grasses helps to provide our meat with more flavor and nutrition than found in conventional grain fed, feedlot beef from the supermarkets. Our animals are raised without implants, antibiotics, hormones and in most cases, no grain feeding. Various studies have shown that Beefalo is higher in protein, and lower in fat, cholesterol and calories than other meats and poultry. It is tender and tasty and cooks in less time than regular beef, with less shrinkage due to its lower fat content.
Our meats are processed in a USDA federally inspected packing house. They are dry aged in a cooler for two weeks to promote tenderness and a good eating experience. They are then cut and wrapped to your specifications and frozen, ready for your freezer and eating enjoyment. Available by the side, split half, or 50-pound mini pack.
If you have any questions or want information regarding current prices and available pick up dates, please phone us. We also offer a variety of handcrafted soaps made from Beefalo tallow and other fine oils.
Bennington Beefalo, Bob and Kathy Ott, 1990 Stedman Road, Attica NY 14011 (585) 591-2685.
E-mail: [email protected]
Berry Hill Farm is a multigenerational family farm. The Schrock family has a long history of farming small farms and we have been involved in grass-fed production for nearly a decade. Currently we offer 100% grass-fed beef, pastured chickens and turkeys, pastured hogs and eggs from free-range layers.
Our beef is available in the summer and fall as freezer beef, whole, half, or split half. The chickens are available fresh periodically through the summer and fall, frozen as long as our supply lasts. We raise and dress the turkeys for Thanksgiving. Pork is available in the spring and early summer by the whole, half, or split half. We usually have eggs year around.
We sell on farm by appointment. We also attend the farmers market at Clinton, New York Thursday afternoons, June through October.
Our crops (including pasture) are grown organically, however we are not certified organic. Purchased feeds are GMO-free and/or organic.
If you are within our local region and care about good food, give us a call—that's what we're here for!
Berry Hill Farm, Harold Schrock, 2388 Green Vedder Road, Deansboro NY 13328. (315) 723-1681.
Bettinger Bluff Farm is located in Montgomery, NY, about 70 miles north of New York City. Our Beef is 100% All Natural Grass Fed.
Did you know?
1. Grass fed beef is lower in calories and lower in fat
2. Grass fed beef is higher in omega-3 fatty acids
3. Grass fed beef is higher in vitamin E
4. Grass fed beef takes less cooking time
5. Grass fed beef has NO added hormones and antibiotics are Never used.
We pride ourselves on our herd's health—in 12 years we have never had the need for the vet to visit the farm.
Our herd moves from pasture to pasture for fresh grass and in the winter the herd is supplemented with all natural baled hay.
You may purchase by the whole, 1/2 or 1/4 cow, we also have specific cuts available at the farm.
Bettinger Bluff Farm, Debbie VonRonn, 1656 NY-17K, Montgomery NY 12549. (845) 629-7332.
E-mail: [email protected]. Website: https://hudsonvalleygrassfedbeef.com.
Bird’s Hollow Beef farm is nestled among the Finger Lakes in western New York State within the township of Gorham. Our family farm of 140 acres is centrally located between Canandaigua, Seneca and Keuka Lakes. The farm is owned and operated by David & Candice Eldredge who are now pursuing a long time desire of naturally farming their land and raising natural 100% grassfed and pasture grazed beef.
At Bird’s Hollow, we believe in treating our animals humanely with a kind and caring attitude. It is our belief and mission that our cows will be raised naturally on pasture, just the way nature intended! Our beef is 100% natural with no hormones, no implants, no antibiotics, no grain, no animal by-products, no confinement, and fed non-GMO grass without pesticides or herbicides. All of our cattle are born and raised on our own pastures. We are proud to say we are Animal Welfare Approved.
We are presently taking orders for "Sides of Beef" which will be available in the summer of 2015.
Bird's Hollow Beef, Candice and David Eldredge, 5150 W. Swamp Road, Stanley NY 14561. (585) 880-8809.
E-mail: [email protected]. Website: www.birdshollowbeef.org.
Black Willow Pond Farm is an all-natural, pasture-based diversified livestock-producing farm. We use alternative, environmentally friendly, and sustainable food production models that allow us to feed our own family, as well as those in the local community who allow us to grow their food right next to ours.
We care about what goes into our food and how our animals are treated and raised. We believe that every animal should be raised in the most natural setting possible. We utilize "organic" (and beyond) methods but are not certified organic. The only "insecticides" on our pastures are our laying hens and broiler chickens. Our only fertilizer is from our natural compost and from the back end of the cow, sheep, lamb, chicken, turkey, rabbit, or pig that is standing on the pasture when nature calls.
We are a seasonal farm offering eggs from hens that are "modified" free-range (they are protected from predators with a net fence and an eggmobile that moves around on pasture), pastured poultry broilers (White Cornish Cross and Heritage Red Cornish), pastured turkeys (Big Breasted White and Heritage Bourbon Reds), pastured rabbit (New Zealand and Californian), Katahdin lambs, and Heritage Hereford pigs. Our products are available directly on the farm, at the Sharon Springs Farmers Market, and at Mildred's Meadows. Our chicken is available on the menu at The American Hotel in Sharon Springs.
We do not ship. We would rather you take the time to visit the farm or find a local farmer who follows sustainable production methods. We have started a meat CSA for customer convenience; if you would like more information on hosting a "stop," please contact us to make arrangements.
Black Willow Pond farm, Joshua and Carrie Enyart, 223 Hill Road, Cobleskill NY 12043. (518) 823-4040.
E-mail: [email protected]. Website: www.blackwillowpondfarm.com.
Blue Fire Farm & MileStone Apiary offers grassfed beef, breeding stock, and raw honey. We use biodynamic principles. We see our farm as a living ecosystem, from the soil microbiology up.
Our family raises heritage cattle breeds that excel on native pastures, mainly Belted Galloway. Our cattle live and graze in family groups, migrating around our farm throughout the growing season. During the winter they are fed native hay free choice. We also offer them kelp and salt with added selenium and vitamin E free choice, year round.
Our honeybees are allowed to build comb naturally, as they would in the wild. We use two types of box style hives: Warre with observation windows and the conventional boxes. We feel strongly about the conservation of honeybees and that they are the backbone of agriculture. We even remove wayward honeybee colonies from buildings. Honeybees unfortunately are being plagued at this time with many devastating pests. We use an integrated pest management system to help the bees cope with these killers. Our honey is available by mail and is sold locally at several stores.
Beef is available on a preorder basis, by the quarter, half and whole; cut to your specifications at a local USDA inspected slaughter house. Honey is packaged in several different size and style containers.
For more information, prices and questions, please feel free to call, write or email us. We look forward to hearing from you!
Blue Fire Farm & MileStone Apiary, Jenny and Phil Stroh, 9777 Findlay Road, Farmersville Station NY 14060. (585) 689-0754.
E-mail: [email protected]. Website: www.heritagemilknhoney.com.
Bo Cara Farms is home to a small herd of beautiful Belted Galloways who graze on fresh pastures, certified organic by NOFA-NY, Certified Organic LLC. In winter, they eat baled forage harvested from our pastures, and continue to enjoy 24 hour, free-choice access to the outdoors. Our herd is grass-fed and finished, and pesticide, steroid, and antibiotic free.
Belties are a small, slow-growing breed, so raising them requires patience and a willingness to work with nature. They don’t “pack on the pounds,” like many grain-fed cattle, but they do thrive on a variety of native grasses, making them the ideal grass-fed and finished beef cow. At Bo Cara Farms, we strive for quality, not quantity, and we raise only as many cattle as our pastures can naturally sustain. We are a small family farm, practicing holistic management, working with nature—not against it.
We sell wholes, halves and quarters (split halves), directly from the farm to you. We welcome inquiries, and visitors, but please call in advance if you would like to see our cows or take a tour of the farm. We are located in Cincinnatus, New York, about 30 miles north of Binghamton, and 45 miles south of Syracuse.
Visit our website for more information, including price-list, and photos.
Bo Cara Farms, Patrick & Sharon Wiater, 4681 Fox Road, Cincinnatus, NY 13040. (607) 863-3965
Email: [email protected]. Website: www.bocarafarms.com.
Braun Farm, circa 1966, is a small family farm nestled amongst windmills in the high hills of Fenner, near Cazenovia, NY. Our focus is raising high quality Katahdin lambs for wholesale and freezer markets.
The Katahdin breed is known for its mild flavor and tender meat. We eat what we grow, and enjoy the wholesomeness and flavor of food in its purest possible form. Practicing intensive rotational grazing since 1994, using organic methods of management, currently not certified. No pesticide or commercial fertilizers used on pasture or hay fields. No grains fed to ewes or lambs, organic protocol for medications, no hormones or antibiotics.
Lambs are available from June to December, fed only mothers' milk and the best quality grass hay and pasture we can provide. Animal comfort and humane treatment is a daily part of our business. Please contact us directly for whole or half freezer orders.
Our product is also available at Grey Rock Farm CSA.
Braun Farm, Betsy Braun, 5652 Nelson Road, Canastota NY 13032. (315) 655-2837.
E-mail: [email protected] Website: http://braunfarm.com.
Bubs Beef is a small, back to basics, family farm located in Cherry Valley, New York, 50 miles west of Albany and about 12 miles northeast of Cooperstown. Our farm has been in the family since 1938. In 1988 we began raising Hereford and Belted galloway cattle.
The farm consists of 150 acres. We bale all of our hay, thus ensuring all of our feed is chemical- and pesticide-free. Since 1992, we have been a closed herd, consisting of approximately twenty cows. Our cows are on pasture 24 hours a day, with access to shelter at all times. Our breeding stock remain on the farm to live out their lives, even when they are no longer able to reproduce. All of our cows are 100% natural grass fed. We use no antibiotics, vaccines, or growth hormones.
Our farm and cows are available for inspection by appointment. Please e-mail or call for availability and pricing. Our beef is sold by the whole or half.
Bubs Beef, Robert Muratore, 340 Barringer Road, Cherry Valley NY 13320. (607) 264-8247.
E-mail: [email protected].
Burke's Garden Meats from the Virginia Highlands, a family farm practicing sustainable agriculture. 100% Grass Fed and finished, NO GMO Beef—better for the animal, better for the land and better for you.
The purest of mountain air, over 800 acres of lush, organic grazing land atop Virginia’s highest valley, Burke’s Garden is ideally positioned to offer the finest of meats, anywhere. Just as our setting is unique, so are our methods. We employ mob grazing, the most environmentally friendly way to raise livestock, feeding our livestock fresh grass more often, regenerating landscapes for a sustainable future. The result is healthy soil, livestock and meats—and a healthier choice for meat lovers.
Our beef is sold direct to the consumer, wholesale to butcher shops and fine restaurants.
Visit our web site or email [email protected] or call Elmer Lapp (farmer) (717) 598-3979 or Diane Lemonides (sales) (610) 399-1003.
Burke's Garden Meats, Elmer Lapp or Diane Lemonides, 7458 Burke’s Garden Road, Tazewell, VA 24651. Farm: (717) 598-3979; Sales: (610) 399-1003.
E-mail: [email protected]. Website: http://burkesgardenmeats.com/.
Burl Creek Farm is a sustainable family farm located conveniently midway between Rochester and Syracuse. All our pasture and crops are grown using sustainable, organic methods although we do not currently have organic certification. Some of our grain is purchased off the farm and is not organic but we hope to soon raise all our own grain on the farm. Much of the work on the farm is accomplished using draft horse power.
We raise 100% grass fed beef, pastured chickens, turkeys and lamb. We also have a flock of free-range laying hens to provide us with eggs year round.
We have fresh chicken available 2-3 times throughout the summer and early fall. It is also available frozen while our supply lasts. Turkeys are available fresh in time for Thanksgiving. Our beef is currently available in limited quantities as freezer beef in whole, half or split half quantities. Lamb is available in the spring.
We primarily sell on farm, by appointment. We're just a short ride from Rochester and Syracuse. Pay us a visit and come for a horse drawn wagon ride around the farm!
Burl Creek Farm, Mark and Rachel Burley, 2528 Lake Corners Rose Valley Road, Clyde NY 14433. (315) 923-4730.
E-mail: [email protected].
Cairncrest Farm: Our NY farm delivers to your neighborhood. 100% grass fed beef and lamb, pastured pork and poultry.
Cairncrest Farm is a small family farm run by brothers Edmund and Garth Brown and their wives Normandy Alden and Alanna Rose. Together we have a vision of a vibrant food system strengthened with our commitment to land stewardship, humane treatment of animals and healthy, delicious food. Read more about our farming practices on our website.
We deliver to communities in NY (including Long Island), NJ and PA. Please visit our website for available cuts and to find the delivery schedule of a location near you.
Cairncrest Farm, Edmund Brown / Garth Brown, 156 Talbot Road, West Winfield, NY 13491, (267) 625-0812 (Edmund) or (267) 625-0542 (Garth).
E-mail: [email protected]. Website: http://cairncrestfarm.com.
Chaseholm Farm is a grass fed dairy farm nestled in a 350-acre patch work of pastures, crop land, woods and waterways. It is my family’s farm and my brother Rory and I are the third generation to make our lives here, tied together with the land, the cows and their milk. I took over the dairy four years ago with my partner Jordan. We produce milk with a motley crew of Holsteins and Jerseys for my brother who makes artisanal cheeses as Chaseholm Farm Creamery.
We became raw milk certified in September 2013 and built a cozy farm store next to the dairy so that we can share our milk, cheeses and other local delicacies with you!
We practice intensive and adaptive rotational grazing with our 100% grass-fed dairy herd. We also raise pigs (pork) on pasture and grass-fed beef. All of which you can find in our farmstore.
Chaseholm Farm, Sarah Chase, 115 Chase Road, Pine Plains, NY 12567. (518) 339 2071 – texting is a great way to contact us!
E-mail: [email protected]. Website: www.chaseholmfarm.com.
Are you struggling to get healthy food for your family? Want to change your diet and eat clean, healthy, grass-fed food? You are at the right place.
Clearview Valley Farm sells 100% raw A-2 cows milk from jersey cows; 15 different kinds of cheese, butter, yogurt, kefir, heavy cream, and sour cream; raw goats and sheep's milk; Soy-free pastured eggs (brown and blue-green); 100% grass-fed beef and veal; pork, lamb, turkey, rabbit, and chicken; sausage, steaks, bone broths, ground meats, and jerky. All the products are free of chemicals, soy, antibiotics and hormones.
They also make weekly deliveries to New Jersey, New York, and New York City.
Clearview Valley Farm is a private membership association. Contact them today and become a member. They would love to serve you. Visit the website or feel free to contact the farmer directly at (717) 786-0877 or email [email protected].
Clearview Valley Farm, Gideon Lapp, 309 Clearview Drive, Quarryville, PA 17566. (717) 786-0877.
E-mail: [email protected]. Website: https://clearviewvalleyfarm.com.
Cobblestone Valley is a diversified organic farm certified by NOFA-NY, located in the heart of New York State right off Interstate 81, Exit 13. We are 20 minutes south of Syracuse and 10 minutes north of Cortland in the small town of Preble.
The backbone of the farm is dairy, with all other enterprises connected to and synergistic with milk production. In addition to the dairy, we produce certified organic pastured poultry, which includes both broilers and turkey, and certified organic pick-your-own strawberries. We also produce grass-fed beef, pastured pork, and compost. We sell our milk to Organic Valley—a national, farmer-owned, farmer-operated co-op based in LaFarge, Wisconsin, which sells products in the region that they were produced. If local organic food is important to you, then please support Organic Valley!
The farm is in the fourth generation of the Knapp family and we are doing our utmost to preserve, conserve, and rebuild the wonderful soil resources in our valley. In organic farming we use nature as our teacher and we believe that all health begins with the soil so our soils are our most precious resource. Healthy soils grow healthy plants, which produce healthy animals and, in turn, healthy people.
We’d like to take a moment to thank you for your interest in locally grown foods. We sincerely hope that your interest will lead to your support of a local and thereby much more sustainable food infrastructure. Very often, the first step is the most difficult one to take. Once you’ve taken that first step towards purchasing locally, it all becomes much easier! If there is a product you are interested in that we don’t carry, we can often direct you to a local vendor that does.
We encourage you to check our website for complete information. We do not ship any of our products.
Cobblestone Valley Farm, Paul and Maureen Knapp, 2023 Preble Road, Preble NY 13141. (607) 591-9607.
E-mail: [email protected]. Website: www.cobblestonevalley.com/.
Cowberry Crossing Farm is a Certified Organic (by Stellar) and Certified Biodynamic (by Demeter) small family farm located in Claverack, New York. The Harrisons are committed to local, humane, sustainable farming. They have a large and varied vegetable garden. Animals found on the farm include chickens, ducks, turkeys, rabbits, sheep, pigs, cows, horses, and bees. All are fed exclusively on organic feed and spend their days roaming freely on the farm.
Our beef is grass fed and grass FINISHED. A closed herd combined with sound, natural farming practices keeps our beef happy and healthy—no need for wormers, hormones, or antibiotics.
In sync with our own standards, our butcher is Certified Organic (by NOFA) and Certified Humane (by Animal Welfare Approved) and located within a half hour drive from the farm, greatly reducing the stress of long-distance travel on our animals.
Other farm products include vegetables, herbs, sunflowers, eggs, chicken, lamb, pork, and raw wool fleeces. All products can be obtained from the farm or from our farm stands located at our farmers markets in Pleasantville or Hastings-on-Hudson, NY.
Summer Outdoor Markets:
Pleasantville, NY Train Station: 8:30–1, Saturdays, Memorial Day–Christmas;
Hastings-on-Hudson, NY Library Parking Lot: 8:30–1:30, 1-2x/month Saturdays, June – Thanksgiving
Winter Indoor Markets:
Pleasantville Middle School: 9–1, Saturdays, January – May;
Hastings-on-Hudson Community Center: 9–1, 2nd and/or 4th Saturdays, December – May
Cowberry Crossing Farm, Richard & Cecile Harrison, 55 Wenzels Lane, Hudson NY 12534. (518) 828-2682.
E-mail: [email protected]. Website: www.cowberrycrossingfarm.com.
Cranberry Creek Farm raises 100% grass-fed A2A2 dairy cows to provide raw milk, cream top yogurt and artisan cheeses. We also produce pastured/forest-raised pork, pasture-raised broilers, and free-range eggs. Dairy and vegetable CSA shares are available.
We are located near northern NJ and southern NY, two hours from NYC and PHL.
Cranberry Creek Farm, Jeffrey Henry, 112 Henry Crossing Road, Cresco PA 18326. (609) 923-0308.
E-mail: [email protected].
Creekside Meadows Farm is a diversified, nurturing, land healing, grass based family farm in Central New York, in the town of Cazenovia, Madison County. We are certified Homegrown by Heroes by the Farmer Veteran Coalition as a veteran-owned and operated farm.
We produce 100% start to finish Grass Fed Beef, Silvo Pastured Pork, Pasture Raised Chicken and Turkey, sustainably raised vegetables and herbs and handmade Farmstead Soaps. We've been grazing since 1998.
We are committed to protecting our local ecosystem and producing healthy, safe, delicious food for our customers. We raise our animals on pasture because we want them to have fresh air and green grass the way nature intended. We strive to create a healthy environment, increase nutrients and organic matter in the soil.
All our animals are raised on pasture and managed holistically. Our beef is raised entirely on grass (or our hay in the winter months) with no grain or corn ever. Our pigs and poultry are supplemented with locally sourced grains that we grind fresh on the farm. Our meats are hormone- and antibiotic-free. Our vegetables are raised organically but are not certified organic. We make our own compost to fertilize our fields and market gardens.
We are trained in and practice Holistic Management, have been featured in Acres USA, Cornell Small Farms Program, Country Folks and in area newspapers and TV.
Our products are available year round through our Whole Farm CSA, at our roadside farmstand and at the Cazenovia Farmers' Market.
Please check our website for additional information on what is available and where to find us, as these change seasonally. Also find us on Facebook @Creekside Meadows Farm, on Instagram @CreeksideMeadows and Twitter @GrazingFarm.
Creekside Meadows Farm, Tricia and Matt Park, 2242 Reservoir Road, New Woodstock NY (Town of Cazenovia) 13122. (315) 662-7988; cell phone: (315) 720-2141.
E-mail: [email protected]. Website: www.CreeksideMeadowsFarm.com.
Dutch Barn Farm – Treat yourself to delicious lamb from Dutch Barn Farm in Montgomery County in the Mohawk River Valley. These fat tail lambs were born in April and May and grown on our family farm. We use rotational pasture rearing to ensure their welfare and protect the environment. This lamb is up to 10,000 miles fresher than imported meat!
• Pasture raised (100% grass-fed)
• Fresh
• No added hormones
• No antibiotics
• Delicious
Lambs can be purchased as whole or half lamb. A whole lamb is 45-60 pounds of meat, a half is 22-30 pounds. Your lamb will be cut, frozen, packaged, and marked. A whole lamb will need about 2 cubic feet of freezer space. We have standard cut packages or we can help you to arrange custom cuts if you prefer. Order yours today.
Reservations accepted any time
Delivery: Fall
Payment (Balance due on delivery).
Sold Fresh (pick up only) or frozen (limited delivery area and times).
Dutch Barn Farm, Marc Kratzschmar and Judy St Leger, 1311 Stone Arabia Road, Fort Plain NY 13339. (518) 993-4983.
E-mail: [email protected]. Website: www.dutchbarnfarm.com.
At Eco-Valley Farm, we are proud to offer our USDA-Certified Organic Grass-fed Black Angus Beef, sold by the whole, half or quarter.
Because we feel that growing great tasting beef is dependent not only on their superior forage and grass-fed finishing but also in their stress-free grazing and handling, it was essential for us to also become certified in Cornell's Beef Quality Assurance program and by Animal Welfare Approved practices. Our cattle are rotationally grazed on our Certified Organic Pastures, supplemented in the winter with Certified Organic dry hay bales and wrapped baleage. These practices together make life better for the cattle, for us, and for our customers.
We welcome visits our farm to see where and how the animals are grown. More and more, people want to see where their food comes from, and we feel the same way!
Visit us at 3944 Wing Hollow Road, Allegany, NY 14706. Calling or emailing ahead is helpful. You can also find us on our website and on Facebook.
Eco Valley Farm, Jeanne and James Finch, 3944 Wing Hollow Road, Allegany NY 14706. (716) 372-3023.
E-mail: [email protected]. Website: www.ecovalleyfarm.com.
Engelbert Farms is a certified organic dairy farm, also producing certified organic beef, veal and pork.
All of our dairy, veal and beef animals are raised outdoors on lush pastures and the hogs are raised outdoors with plenty of space, fresh air and sunshine. Animals are fed 100% certified organic feed, which is grown with care on our farm. Absolutely no animal by-products are ever fed. The beef animals are 100% grassfed, while the dairy animals receive small amounts of grain (up to 10# per day) while producing millk. Veal calves are raised on 100% organic milk and all the pasture they care to consume. Hogs are fed organic milk, corn, grass and leftovers from our certified organic gardens.
Engelbert Farms will be a "century farm" at its current location in 2011. Our sons represent the fifth generation of Engelberts to farm at this location. We are proud of the way we farm. Our land and animals are healthy and our farming system is sustainable.
Individual cuts of meat are available directly from the farm year-round by appointment. Meat is also available by the whole or half but must be preordered.
We are certified organic by Vermont Organic Farmers. Some of our products are also available at 911 Earth in Athens PA.
Engelbert Farms, Kevin and Lisa Engelbert and family, 182 Sunnyside Road, Nichols NY 13812. (607) 699-3775.
E-mail: [email protected]. Website: www.engelbertfarms.com/index.html
Fallow Hollow Deer Farm specializes in pasture-raised venison, available fresh or frozen year-round. Pastured rabbits and poultry (chicken, turkey, duck and pheasant) are sold as well. In addition, the farm works cooperatively with other farms to market beef, baby beef, veal, pork, lamb and goat.
We gladly take phone and fax orders and can ship within the continental US. Order forms can be found on our web site, with internet ordering coming soon.
Fallow Hollow Deer Farm, Martha Goodsell, 125 Williams Road, Candor NY 13743. Phone and fax: (607) 659-4635.
Flying Pigs Farm offers pork chops, tenderloin, roasts, bacon, ham and Sun-Dried Tomato and Chardonnay Sausage. Our pork is much more moist and flavorful than supermarket meat. It's different because we raise heritage breeds of pigs the old-fashioned way.
The pigs are raised outdoors in the fresh air and sunshine, with plenty of room to roam on our fields and in our woods. Because they have so much space and because we move them often, the land stays clean and the pigs stay healthy. The pigs snack on grass, weeds, and roots that grow on our land, and they also eat dried, ground grains.
Our pigs are "Large Blacks," Glouestershire Old Spots," and "Tamworths," old-fashioned breeds in danger of extinction. It may seem odd to use these breeds for pork because they are so rare, but they will not survive unless a market for these animals can be created. Breeders can then afford to expand their herds and expand the population.
We ship across the country. Look for us in the spring and fall at the Grand Army Plaza and Tribeca Greenmarkets in New York City. Visitors are welcome to pitch in at our fledgling farm on the Battenkill—but please call first!
Flying Pigs Farm L.L.C., Jennifer Small & Michael Yezzi, 246 Sutherland Road, Shushan NY 12873-1805. (518) 854-3844.
E-mail: [email protected]. Website: www.flyingpigsfarm.com.
Four Winds Farm is a 24-acre, diversified family farm in Southern Ulster County. Most of the farm is certified organic (NOFA-NY) hay land and pasture, which is used to raise pastured chicken, turkey, beef, lamb and pork. The pigs are "Glostershire Old Spots," an endangered Heritage Breed. Three acres of the farm are reserved for a Certified Organic market garden specializing in heirloom vegetables. The garden supplies a 50-member CSA (Community Supported Agriculture buying club)
Broilers are available monthly from May to October and pastured turkey are available in time for Thanksgiving. Grassfed lamb, beef, and pork are available in the fall. You can purchase eggs from Four Winds pastured chickens from April through November.
Four Winds Farm, Polly and Jay Armour, 158 Marabac Road, Gardiner NY 12525. (845) 255-3088.
E-mail: [email protected]. Website: http://users.bestweb.net/~fourwind/
Fox Hill Farm is 315 scenic, rolling acres in Ancramdale, New York just 2 hours north of NY City, in the foothills of the Berkshires of MA, CT and near the Taconic Parkway. We raise grassfed & grassfinished beef in an environmentally sustainable manner with rotational grazing of heritage breeds of British White, Murray Grey, Red Devon and crosses. They are very tame and raised organically but not yet certified.
The farm is protected from development by a conservation easement and has been in the Lampman family since 1882. The heritage breeds were chosen because of their ability to do well on grass and produce a healthy and tender, tasty product high in Omega 3 essential fatty acids.
Quarters, halves, or whole beef custom cuts are prepared to customer specifications. We also sell and ship individual packages of steaks, roasts, burger and now terrific hot dogs (PaPa Dogs) that are all-beef, no-nitrate, with a natural casing.
All processing is done at small, local USDA inspected facilities. However, if an animal is purchased on the hoof in advance, then the most humane ‘end’ can be arranged for at the farm. Shipping is available.
Visitors are welcome.
Fox Hill Farm, Larry and Erna Lampman, 887 E Ancram Road, Ancramdale NY 12503. (518) 810-3274.
E-mail: [email protected]. Website: www.foxhillfarmgrassfedbeef.com/
Freeman Homestead is a family-owned and operated farm in western NY, producing high quality, delicious and nutritious meats and eggs since 1997. They practice seasonal farming where the production year matches the natural rhythm of the seasons. They use management-intensive grazing and holistic practices to create a biological farming system that is beneficial for the animals, environment, consumers and community.
On the fields, absolutely no pesticides, herbicides or artificial fertilizers are used. Instead, their own organic compost made on the farm from the winter bedding, and natural minerals are applied to the land. During the grazing season, the animals are outside, giving them an abundance of fresh air, sunlight, and organically fertilized pastures. During the winter they are housed in buildings for protection and bedded with organic matter used for fertilizing the fields.
No antibiotics, medications, or fast-growth hormones are used on the animals sold from their farm. The focus of the farm is on the overall well-being of the animals, the positive impact on the environment and community, and the nutritional quality and taste of the product offered to the customers.
Products offered include: 100% forage/grass fed and finished lamb and beef; and eggs from pastured hens. Because the digestive system of the poultry is different from the ruminating sheep and cows, the chickens receive high quality grain from a local mill in addition to grass and forage.
Eggs are available seasonally; meat is available year around. Saturday deliveries are made periodically to the Buffalo area.
Lamb halves and beef quarters can be cut to your specifications by preordering. Several varieties of meat cuts are currently available at the farm.
Call or email for more information on a current price list of available products.
Freeman Homestead, Keith and Rae Ellen Freeman, 8226 Kelly Hill Road, Stockton NY 14784. Phone Monday – Saturday, Hm (716) 672-8022; Call or text (716) 224-2411.
E-mail: [email protected].
Gaia’s Breath Farm, located in Central NY, is 265 acres of pure organic, pasture based, seasonal bliss situated between the Catskill and Adirondack mountain ranges. We are committed to growing and raising the absolute highest quality, gourmet food available.
Mixing new tech with old foundational methodologies, we hope to represent what a small farm can be at its optimum. We are re-creating food that will not only nourish and enliven your physical body, but will awaken one’s taste buds to the marvelous flavors, colors and textures of old world kitchens. We take on the responsibility to produce food under the strictest set of standards. Whether it be an heirloom tomato or a freshly made order of sweet fennel sausage, you will receive the absolute best in flavor and quality available, anywhere. Please, try us out. We are confident enough to expect you will be back, in due time.
This year we will have pastured broiler chickens, pastured turkeys, pheasants, pastured pork and market garden vegetables. Look for us also at the Cooperstown Farmers Market.
Gaia's Breath Farm, Mark Santoro, 219 Forrest Road, Jordanville NY 13361. (914) 490-6850.
E-mail: [email protected]. Website: www.gaiasbreathfarm.com
Gansvoort Farm raises 100% grassfed lamb in the Hudson Valley.
I rotationally graze my flock on diverse, nutritious pastures to protect water quality, biodiversity and store soil carbon. My sheep are Icelandic crosses—hardy, healthy, and excellent graziers, with meat known to be mild and delicious. I use organic practices (no antibiotics, no hormones, organically managed pastures) but am not USDA certified organic. I follow animal welfare guidelines to maintain a happy, healthy flock.
I have lamb for sale every fall by the whole or half. Orders can be placed by phone or e-mail beginning in late summer. All lamb is cut to order and I will help you decide how you want it done if you are not familiar with the options. I usually sell out by early October, so order early. My butcher says it is some of the nicest lamb he has ever seen. And my customers all agree the flavor is unbelievably good - this lamb is nothing like super market lamb.
Please visit my website to learn more about my farm and my management practices!
Gansvoort Farm, Jennifer Phillips, 1827 Route 9, Germantown NY 12526. (518) 537-4668.
E-mail: [email protected]. www.gansvoortfarm.com
George Highlanders is located in the rolling hills of western New York and keeps a herd of Scottish Highlanders for the sheer pleasure of it. We do baby them, and prospective customers are welcome to come and see the herd anytime—and the windmill in their pasture.
Organically raised in a rotational grazing herd as a hobby, they are on fresh grass daily from May to November, and receive no grain, hormones or antibiotics. We are not "certified" organic, but that is the way we operate.
We sell Grass Fed Freezer Beef as custom slaughter by whole or halves. If a half is too much, find a partner or group to split it with. A typical half from a 30-month-old animal will have a hanging weight from 225 to 300 pounds. We do custom slaughter only in the fall to take full advantage of fattening the animals on the lush fall grasses.
Highlanders are an exceptional beef animal, but they grow a little slower than the popular commercial breeds. We think this slower growth results in superior flavor. It is our conviction that we can produce a high quality, healthy product at a lower cost than grain fed animals, and we are pricing the hanging weights accordingly. Please email for current prices.
Cattle are taken to a USDA inspected slaughterhouse where they are custom processed to your request, wrapped and frozen. To be legal, you must pick up your frozen packages at the slaughterhouse, with Saturday mornings being a convenient time.
We have received many requests for Grass Fed ground beef and are trying to satisfy those requests. This year, we will slaughter at least one steer for 100% ground. This will not need to be seasonal in the future. It will be a premium product with the steaks, roasts and all the prime cuts included in the grind. To sell ground beef legally from a custom slaughter, we need to sell a fractional portion (maybe 1/8th) of the animal, but would price it, fully processed, picked up frozen at the slaughterhouse, for $4/pound packaged weight; discounts are available for larger quantities.
Grass fed ground beef makes an exceptional hamburger, with no waste, and seems to be more in demand than any prime cut. One-eighth of an animal will yield about 40 pounds of top quality ground beef. If you are interested in the ground beef, please send an email, as emails are the preferred way to contact us. Pictures of the herd available on request
George Highlanders, Tony George, 7780 Cadwell Road, Bliss NY 14024. (585) 322-8888.
E-mail: [email protected].
Golden Hill Farms goes to grass finished beef.
Golden Hill Farms is in northwest Pennsylvania, about 40 miles south of Erie, 80 miles north of Pittsburgh, and about 2 hours from both Cleveland and Buffalo. We are 4 miles east of I-79 off exit 141.
For over 25 years we at have been producing and selling top quality show cattle, with the remaining calves being sold to feedlots for grain finishing. Since we are a grass and hay farm, this year we decided to keep 30 of our top feeders to finish on grass.
During much of this time we have also operated a meat processing plant. The animals in this program will be slaughtered under federal inspection and we will be processing the meat ourselves, in our facility on our farm. Additionally, the only meat we will be processing will be our grass fed beef.
This year the grass finished cattle will have an average dressed weight of 600–700 pounds. They will be sold by the half (300–350 pounds) or in bundles.
We have designed seven different bundles that we hope will meet everyone's needs. The contents and price of each can be seen on our website.
Large Family Bundle (60 lbs.)
Steak Lovers Bundle (15 lbs.)
Economy Bundle (20 lbs.)
Ground Beef Bundle (25 lbs.)
Family Bundle (30 lbs.)
Roast Lovers Bundle (15 lbs.)
Sampler Bundle (15 lbs.)
We would also like to send a special invitation to come and visit us at anytime. Please call ahead to be sure we can devote some time to you—we love visitors.
Golden Hill Farms, Bob and Saundra Rose, 20405 Lauderbaugh Road, Cochranton, PA 16314. (814) 425-7063 or (814) 720-5864.
E-mail: [email protected]. Website: www.goldenhillfarms.com.
Good Grass Farm is located in the beautiful rolling hills of Chautauqua County, NY. We purchased our house and land on Open Meadows Road in 1999. It was a bit dilapidated, to say the least, but we could see the potential and sense the warmth of this once vibrant dairy farm as we walked through the empty rooms of the old house and hiked the over grown pastures.
We started slow, growing good produce and raising chickens and turkeys for our family and friends that desired the same high quality, all natural products we wanted for ourselves. As we progress, we continue to embrace the basic philosophy that simple is best.
We currently produce pasture raised broiler chickens, brown eggs, and heritage and broad breasted turkeys. Broiler chickens are available June through September. Turkeys are available for Thanksgiving and Christmas. Eggs are available year round. Blueberries and produce are available starting mid July. This summer we are expanding to include grass fed beef.
All of our products are grown without the use of antibiotics, hormones, pesticides, herbicides, or chemical fertilizers.
Good Grass farm, Karen Kearney, Jeff Creager, Michael Kearney, 2943 Open Meadows Road, Ashville, NY 14710. (716) 782-4937 or (716) 782-3322.
E-mail: [email protected]. Website: www.goodgrassfarm.com
Grazin’ Acres Farm is a small, family farm dedicated to raising healthy, happy animals in a sustainable manner. We strive to ensure a stress-free life for our animals. We raise grass-fed, grass-finished beef and lamb, pastured pork and non-GMO, pastured chicken and eggs.
We are proud to offer high quality meat to local markets. All our animals enjoy pasture life the way nature intended. We do not feed antibiotics, hormones or animal by-products. Grass and sunshine add the most flavor to our meats.
We currently sell our meats by the cut at the Glens Falls Farmers’ Market Saturday mornings. Our products are also available in some local stores and co-ops. Pork can be purchased by the half or whole (available year round).
Our meat is also available through our monthly CSA with pick-up at the Glens Falls Farmers’ Market. We also have different ‘freezer packs’ available. A ‘freezer pack’ is a larger order of predetermined cuts.
Like us on Facebook: www.facebook.com/GrazinAcresFarm. You can see our ad on http://www.localharvest.org
Grazin' Acres Farm, Nathan and Meghan Mattison, 49 Wolfe Lane, Salem, NY 12865, (518) 879-8108.
E-mail: [email protected]
Great Northern Farm raises beef, pork, lamb, veal, broilers, turkeys (heritage and broad breasted white), and eggs from pastured hens. No hormones or antibiotics are used and the pastures are free of chemical fertilizers and herbicides. Beef and lamb are completely grass fed. Other livestock are supplemented with organic grain.
Retail cuts and bulk meat are available year-round at the farm (by appointment), at the Regional Market in Syracuse (Saturday), or ordered through the website. Meat is shipped nation-wide.
Great Northern Farm, Wendy and Rich Taber, 1716 Fisk Road, Eaton, NY 13334. (315) 750-0795.
E-mail: [email protected] Website: www.meadowraisedmeats.com
Green Heron Growers has been a certified organic farm since 2007 for Shiitake mushrooms, veggies and herbs. In 2009 we added chicken for meat production and 100% grass fed Devon beef. We are a small operation which we run ourselves with the help of a volunteer on occasion. NOFA-LLC certifies our farm organic.
We raise our meat birds in moveable chicken tractors, which get moved twice a day to provide them with fresh grass and bugs along with certified organic grains.
Our Devon beef are raised on certified organic pastures, but are not considered organic because we purchase them as yearlings. With the purchase of our breeding herd in 2012, we hope to be able to offer certified organic beef soon. We harvest our beef animals from July to December and offer quarter, half and whole animals along with 50 pound mixed boxes plus we have a continual supply of beef cuts available in our Farm Store through out the year.
Most of our sales are done at Farmers markets in Buffalo and Fredonia and from our Farm Store; we offer a self service option if we are not at home. We currently offer beef and chicken on a year round basis and Shiitake mushrooms, veggies and selected greens starting in June of each year.
Our Shiitake mushrooms are log grown and are cultivated in our hemlock grove. We have over 2000 logs in production. It's quite a science project, which causes our supply to fluctuate according to the weather and our soaking schedule.
Please refer to our web site for current availability and pricing. We would love to be your supplier of clean, local, flavorful and nourishing healthy food for your dining pleasure.
Green Heron Growers, Steve and Julie Rockcastle, 2361 Wait Corner Road, Panama NY 14767. (716) 720-3695.
E-mail: [email protected]. Website: www.greenherongrowers.com.
Happy Hooves Organic Farm raises 100% grass fed, grass finished Beef, pasture raised soy-free Pork, truly free-range and soy-free Chickens, Turkeys, Ducks and Eggs. ALL of our animals are raised on pasture for optimal health for the animals.
We are Certified Organic by Global Organic Alliance (GOA) for our Beef, Pork, Chicken, Turkey, Ducks, and Eggs. We NEVER use any hormones, antibiotics, pesticides, chemicals or anything not allowed in Certified Organic production of any of our meats, and we don't feed any soy.
Our calves stay with mothers getting their milk naturally until their Mama puts a stop to that. Our cows are never confined and never see a feedlot. We take pride in knowing they are happy—as evidenced by the way they "play" in the fields. Unhappy animals, or animals that don't have their comfort needs met do not "play." Happy cows make better beef !
Poultry is hatched here or comes from a hatchery as day-old chicks. Once old enough to move outside they stay out on pasture until old enough for harvesting, spending their days in the sunshine nipping at grass and bugs. Hens, of course, stay here year round with outdoor access on all but the nastiest of winter days. In the spring, summer and fall they are out all day roaming around the property.
Our pigs are born here, bred and born by natural methods out on the pasture. They have portable "huts" for shade and wind protection. Sows will build a "nest" to give birth to their piglets in. Piglets are raised by their mothers until the sow decides it's time to wean them, usually at around 10 weeks of age. Sows continue to stay with the piglets until they are at least 4 months old and then seem happy to retire to a separate sow pasture where it's much quieter away from the piglets. Each sow has only one litter per year.
Our meat is sold directly to consumers. Beef and Pork is processed at a USDA inspected butcher and sold by cuts, quarters and sides. Chickens and Turkeys are sold whole and cut up and Eggs by the dozen.
Check our website for up-to-date listing of availability or give us a call.
Happy Hooves Organic Farm, Ted and Della Jastrzab, 13054 Ira Station Road, Martville NY 13111. (315) 487-4336.
E-mail: [email protected] Website: www.betterbeef4u.com.
Heather Ridge Farm is a working farm with a farm store and café! We’re located in the Catskill Mountains, in upstate New York. The Heather Ridge Farm Store and outdoor/indoor Bees Knees Café are open Saturday and Sunday for lunch and brunch all year, as well as Thursdays and Fridays in the summer.
We offer retail cuts of pork, beef, lamb, goat, chicken, duck, guinea, geese, and turkey at our farm store, all grown here on the farm. Our lamb and goat meats are certified Animal Welfare Approved Grassfed, and the heritage breed pastured pork and our eggs from pastured poultry are also Animal Welfare Approved. Join our Meat and Poultry CSA, for monthly pick up here or to be shipped within a one-day UPS region.
We make our own artisan sausages, patés, corned beef, smoked bacon, mustards, root beer syrup, and many other specialty products. Retail cuts are offered fresh in season and frozen the rest of the year from our farm store, and offered in expertly prepared dishes at our café. Sides of meat also available by reservation.
All our animals and poultry are lovingly raised in small groups on pasture in the fresh air with mountain spring water. All are guarded by diligent llamas. The cattle, goats and lambs are entirely grass fed, and the pigs, chickens and turkeys have all the fresh grass they want as well as being supplemented with a natural grain mix we have custom-made to order. Our animals receive no antibiotics, no hormones, no animal by-products in their feed and there are no chemical fertilizers used on the pastures. We use organic methods, but are not certified organic.
We schedule farm tours to share our farming methods, and for you to enjoy seeing our animals and scenic mountain farm.
Please check our website for scheduled farm tours, weekly menus, new products, schedule changes, to order online, and where else to buy our products. We welcome your visit.
Heather Ridge Farm, Carol Clement, 989 Broome Center Road, Preston Hollow NY 12469. (518) 239-6234.
E-mail: [email protected]. Website: www.heather-ridge-farm.com.
Herondale Farm is a mixed livestock farm. We raise 100% Grass Fed Beef and Lamb, and Pasture Raised Chicken and Pork. We pursue sustainable farming practices through holistic management. By managing land resources in partnership with grazing animals, we strive to increase land productivity, optimize water resources, preserve food sources, create sustainable livelihoods and remove carbon dioxide from our atmosphere
The Heritage beef breeds of British White and Murray Grey were selected for their century old physiologies which allow them to thrive on our grass fed program.
The Berkshire Cross pigs and Cornish Rock chickens enjoy a varied diet combining grass, alfalfa, clover and bugs from the pasture, in combination with an organic feed mix. This produces a high quality tasty meat high in omega 3s.
Pork, chicken and beef are readily available. There is fresh chicken every weekend until late October. Our products can be ordered direct from our website and shipped via UPS, or pick-up at the farm, with a farm-stand open between Memorial and Labor Day on Tuesday thru Saturday, 10–5 –2.
The Farm Stand also offers fresh produce grown on site by Sol Flower Farm, and other local goods.
Herondale Farm, Jerry Peele, 90 Wiltsie Bridge Road, Ancramdale NY 12503. (518) 329-3769.
E-mail: [email protected]. Website: www.herondalefarm.com
Heydenrych Farms raise 100% grass fed beef and lamb and farm-raised chicken seasonally. We also produce beef tallow soap from our own grass fed beef suet. Our farm is located in Canajoharie, New York, 50 miles west of Albany and about 21 miles northeast of Cooperstown.
We established Heydenrych Farms in 2004 as a pasture-based operation where animals are treated ethically and humanely. Our animals are born and raised on 125 acres of pasture and are never given grain feed, growth hormones, or unnecessary antibiotics. Our philosophy is that if you provide for your animals and allow them to express their instinctual behaviors in their natural environment, then the animals will provide for you and the earth in return. We received Animal Welfare Approval and American Grassfed Certification for our Beef in 2009.
We make our products available to as wide a consumer base as possible. If you live in NY, NJ, CT, RI, NH, ME, VT, MA or PA, you can order our products online and it will be delivered directly to your home. We also established a central pick-up location in Albany, NY, which is a popular destination among more local residents. We encourage our customers to pick-up at our farm to see where their food comes from!
Visit our website for products, availability and pricing.
Heydenrych Farms, Andre and Magda Heydenrych, 1811 State Highway 163, Canajoharie NY 13317. (518) 673-5507.
E-mail: [email protected] Website: www.grassfedbeefny.com Facebook: www.facebook.com/pages/Heydenrych-Farms/230435367011827
High Lonesome Farm raises 100% grassfed, purebred Angus beef on pastures certified organic by NOFA-NY Certified Organic, LLC (USDA). We're proud to also be licensed by the American Grassfed Association.
We happily embrace the responsibility to assure that the creatures in our care thrive in their natural environment, on their natural diet, free to fully express their "cowness" in a slow, quiet, peaceable kingdom.We practice Management Intensive Grazing (rotational grazing) which serves our critters a continuous salad bar of fresh, clean and nutritious forages throughout our six to eight month grazing season. In winter they feast on nutritious, wholesome stored forages harvested right here on the farm.
We sell from the farm directly to you, offering wholes, halves and quarters (split halves). While we take reservations year round (deposit required), availability varies with nature and the calving season.
Please email us for current information, or call Monday through Saturday, 9 AM to 4 PM for the latest news. Sunday is "family day," so no calls please.
High Lonesome Farm, Fred Griffen, 2273 Stafford Road, Cincinnatus NY 13040. (607) 863-4303.
E-mail: [email protected].
Hickory Field Farm is a small family-run farm located in Orange County, NY. We are dedicated to raising our animals in a natural, low stress environment to ensure they have the best quality of life possible.
Our beef cows have access to pasture 365 days a year within our rotational grazing model, and are a combination of Miniature Herefords and Lowline Angus. These smaller cattle require less pasture, are less damaging to the land, have shorter muscle fibers (which results in more tender beef), and produce steaks that are much closer to recommended serving sizes.
We also have pastured poultry; we use a heritage breed called "Freedom Rangers" that excel on pasture and have an excellent flavor. Their diet is supplemented with an organic feed composed entirely of locally produced ingredients. Our laying hens free range around the farm daily, and produce absolutely delicious eggs.
All products are currently only available for on farm pick up or delivery. Please contact us for availability or to reserve a product.
Hickory Field Farm, Neel and Suzanne Smith, 72 Post Road, Slate Hill NY 10973. (845) 606-2071.
E-mail: [email protected]. Website: www.hickoryfieldfarm.blogspot.com.
Honeyhill Farm is a small farm in Livonia, NY, near Conesus Lake, 30 minutes south of Rochester, off I-390.
Our Black Angus cattle are 100% grassfed, consuming nothing but organic pasture grasses and water. Their pastures consist of mixed perennial species, the ideal environment for cattle, and they move toward fresh grass daily as ruminants do naturally, providing the perfect stress-free environment. We have never had a sick animal. In winter, when pastures are expended, the cattle move to winter pasture where they find suitable cover in the woods and are supplemented with hay (dried grass) only.
Our beef is dry-aged two weeks, expertly cut, vacuum sealed by our USDA processor and frozen. It will keep perfectly for well beyond a year.
Honeyhill beef is available in two quantities: Eighth or Half. A Whole is two halves and each may be cut differently, offering many options. An Eighth aka Variety Pack contains 1/8 of a steer cut in a manner that is popular.
Tours are scheduled May–October. You will discover a clean and beautiful farm with a gazebo by the pond overlooking the pastures to sit and talk. Children enjoy our large yard and playhouse. Cap off the day with a free hayride amongst the cattle. Bring family and friends – No dogs please!
This is your opportunity to inspect us to your complete satisfaction! There is nothing hidden. You will have unlimited access everywhere and may ask any question and expect an honest response.
We Pledge: 100% grassfed diet on organic rotational pastures, no chemicals or medications, ethical and humane treatment, stress free environment with no confinement.
Our personal commitment to sustainability and the environment: Our pastures were added to the Federal Grassland Reserve where they will be protected Forever!
Honeyhill Farm, Fred Forsburg, 6241 Price Road, Livonia NY 14487 (585) 346-3829.
Website: www.HoneyhillOrganicFarm.com.
Horton Hill Farm is a small family farm that offers chicken, turkey, pork and eggs from heritage breed livestock and raw honey. We have chosen heritage breeds for their flavorful meat and ability to perform well in our pasture based system. The animals at Horton Hill Farm include Gloucestershire Old Spot and Large Black pigs, Narragansett turkeys, Ancona ducks and Silver Gray Dorking chickens. We also raise purebred Landrace pigs, Cornish cross chickens, and broad breast white turkeys.
We raise all of our animals outside on grass. We use locally mixed foods made especially for us. Our animals are grown without antibiotics, hormones, chemicals or other things that should not be in your food.
Our pasture raised meats, eggs and honey may be purchased at our farm. We are open daily, but please call ahead. We are located 3 1/2 miles from the stop sign in Jefferson off of State Route 10 South. Look for our chicken signs pointing the way.
Horton Hill Farm, Bill and Carol Parker, 127 Horton Road, Jefferson, NY 12093. (607) 652-9450.
E-mail: [email protected]. Website: www.hortonhillfarm.com.
Hunter Crossing Farm offers certified organic, pasture raised Beef, Pork, Chicken and Turkey. Certified Organic vegetables are also available in summer and fall. Our farm doesn't use any growth hormones, antibiotics or animal by-products. The bacons and hams are smoked without nitrates.
The animals are raised the old fashion way! They live outside enjoying the sunshine while eating lush green grass. Winter time they have access to the barn with deep bedded areas of our own certified organic hay. Pigs and poultry are fed Certified Organic grains while grazing.
The beef cattle are grass-fed Black Angus. The pigs are crossed between Glostershire Spot (heritage breed), Berkshire, Duroc and Yorkshire. This unique cross was carefully designed for a excellent eating experience. The chickens are Cornish X and turkeys are red burbons (a heritage breed) or Broad Breasted White.
Certified Organic Pork is available all year. We sell wholesale to stores (Wilton Village Market in Wilton, CT. and It's All Good in Cherry Valley, NY) and restaurants. Retail sales to our customers at the farm or Farmer's Market (Little Falls Farmer's Market in Little Falls, NY on Sat. 8 to 12 pm). We also ship Beef and Pork through out the US. Chicken is available in summer and fall. Turkeys are available for Thanksgiving and can be shipped in NY only.
Hunter Crossing Farm, Debbie Christensen, 592 Burrell Road, Little Falls NY 13365. (315) 823-2663.
E-mail: [email protected].
Ingallside Meadows is a family run farm intent on raising healthy food for a growing family. We like to know where and how our food was raised, and are offering this opportunity to others who may be concerned about the diverse effects of factory farming on our food supply and environment.
Located 25 miles east of Syracuse, 7 miles north of Cazanovia, we offer pastured broilers, fresh-air pork, 100% grassfed beef, and fresh eggs from pastured hens. All our livestock is rotationally grazed to optimize the health of the animals and to insure quality forage for the health benefit of the consumer. Drug-free, no chemical fertilizers or pesticides, no antibiotics or growth hormones.
We sell pork and beef by the whole or half, available in fall, and we have monthly processing dates June through October for our broilers. Stock up on our daily supply of eggs. Buying by the whole or half is definitely cheaper than by the cut; consider investing is a chest freezer and have a stash of heart-healthy meat at your fingertips! We have customer inspection. Stop in or call anytime Monday – Saturday.
Ingallside Meadows Farm, Daniel Kline and Joanna Kline, 3111 Ingalls Corner Road, Canastota NY 13032. (315) 655-3804.
Kezialain Farm, located about 60 miles from Manhattan, has been in our family since 1775. Our beef is certified organic and certified 100% grass-fed. We feel this is important for the health of the soil, the cattle, the earth, and the people who eat our meat.
Our family has deep roots here and we want to protect the land that has fed our family for over 200 years. Our cattle are raised on their mothers’ milk, our organic pasture and hay, and minerals like kelp and salt. They thrive on the native grasses and plants and keep the soil fertile with no need for fossil-fuel based fertilizers. The farm is sustainable – our herd is small and carefully rotated so that their carbon/methane footprint is good for the environment.
We sell in bulk directly from our farm in 20-pound packs, eighths, quarters or sides. Sides are cut to your specifications. If you order a quarter, eighth, or a pack, we try to include as many of your favorite cuts as possible and we won’t give you any cut you don’t want. We are happy to any questions you have about buying in bulk.
We use a small, humane, organic USDA slaughterhouse. The meat is dry aged for 10–14 days to enhance flavor and tenderness, then cut, labeled and vacuum packed and immediately frozen as individual cuts and 1-pound packages.
We sell directly from the farm – we don’t ship. Most of our meat is available from late summer through February. Customers usually order in advance to be sure we have meat when they want it. We don’t have a store, so please contact us in advance to find out what is available and to set a time to come.
Visit our website for more information and a video of the farm.
Kezialain Farm, Deborah Lain, 28 Keziah Lane, Westtown NY 10998 . (845) 726-3633.
E-mail: [email protected]. Website: http://kezialain.com.
Kiernan Farm, located about 90 miles north of New York City, offers all cuts of beef. You may purchase any amount, from one pound to a hundred pounds. We take orders by phone or e-mail and they can be picked up at our farm.
We use no steroids or antibiotics in our daily program. Our beef, predominantly Angus-Hereford crosses, are finished only on green pastures of mixed grasses on the picturesque Gardiner beef belt of the Shawangunk Valley in southern Ulster County, New York.
Our products are also available at the New Paltz Farmers Market in New Paltz, NY.
Kiernan Farm, Marty Kiernan, 1308 Bruynswick Road, Gardiner NY 12525. (845) 255-5995.
E-mail: [email protected]. Website: www.kiernanfarm.com/
Kinderhook Farm consists of several hundred acres of pastures and hay meadows located in the Hudson Valley of New York. We raise beef cattle and sheep on a 100% grass and legume diet that includes no grain, antibiotics, growth hormone, or animal by-products.
Our grass fed pasture system is better for the animal and our environment, resulting in nutritionally superior beef and lamb.
Our cattle and sheep are born in the pastures of our farm, and graze the forages growing in our fields. We harvest the excess hay during the summer months and feed it during the winter. All animal wastes are returned to the land and become nutrients for the next grass cycle.
The Kinderhook Farm Store offers individually packaged cuts of pasture-raised, grass-finished beef and lamb, along with farm fresh pasture eggs and one of the best views in the Hudson Valley. We also raise Freedom Ranger meat chickens which are available on a seasonal basis. We’re open every day although we may be out doing chores around the farm when you arrive. Please call us on our cell phones and we’ll meet you at the store. Feel free to call ahead if you would like to arrange a time for us to meet you at the store when you arrive: Georgia (518) 929-3075 or Lee (518) 929-3076.
Kinderhook Farm, Lee and Georgia Ranney, 1958 County Route 21, Ghent NY (mailing address: 1958 County Route 21, Valatie NY 12184). (518) 929-3076.
E-mail: [email protected]. Website: www.kinderhookfarm.com.
Kingbird Farm produces a diverse array of certified organically raised meats, produce, and value-added items. Our products include: certified organic pork, chicken, turkey, eggs, culinary herbs, and produce (includes onions, garlic, shallots, potatoes, and other vegetables). We also raise grass-fed Highland X Angus beef. Our field work is done with the use of our
We are certified organic by NOFA-NY Certified Organic LLC (a USDA accredited certifier) for our produce, pastures, piglets, chickens, ducks, geese, turkeys, and eggs.
Our products are available at our self serve store on the farm and Ithaca Farmers Market (every Saturday from April to December). Meat and eggs are always available self serve on the farm. Our eggs are also available at GreenStar Cooperative Market in Ithaca, NY.
KingBird Farm, Karma & Michael Glos, 9398 West Creek Road, Berkshire NY 13736. (607) 657-2860.
E-mail: [email protected] Website: www.kingbirdfarm.com
Larson Farm and Creamery is a 100% grass-fed farm in Wells, VT, very near the NY border. We have a herd of 25 Jersey cows that are rotationally grazed for the pasture season, and kept in a bedded pack for the winter where they are fed only grass and clover hay or baleage. We will be certified organic the fall of 2016. We have been managing organically for many years. Our passion is to remineralize the soils, to provide the healthiest soil, then the healthiest grass/clover, then the healthiest cows, then the healthiest food.
We currently sell raw milk in returnable glass jars at the farm store, which is open all daylight hours. We also deliver milk to farmers' markets in Dorset, and Rutland. We are a VT State-inspected Tier 2 raw milk dairy, which includes milk testing for bacteria and somatic cell count twice/month. Our counts always reflect very high quality milk. We are currently building a creamery, where we will be adding products like butter, yogurt, skyr, gelato, and mozzarella. We expect to be operational early summer of 2016.
Larson Farm also has a 100% grass-fed Devon herd, and we sell beef by the cut at the farm store and farmers' markets, and by the quarter by arrangement.
Larson Farm and Creamery, Cynthia Larson, 661 South Street, Wells, VT 05774. (802) 645-1957.
E-mail: [email protected]. Website: www.larsonfarmvt.com.
Locustbrae is a family owned and operated grass farm selling, since 1978, the highest quality pasture-raised beef. Our goal is to bring healthy, flavorful beef to our customers in the Northeast while maintaining a self-sufficient, ecologically sensible operation committed to perfection.
The Scottish Highland breed has proven to be exceptionally well suited to transform our lush Western New York grasses into beef the way nature intended. We feel that by being stewards of these cattle while allowing them to be the natural stewards of their grassland has made Locustbrae an efficient, sustainable provider of high quality beef and breeding stock.
Highlands are smaller, slower-developing cattle than most commercial breeds and are listed as “Recovering” by the American Livestock Breeds Conservancy. Long, heavy hair and a thick skin give them the ability to weather harsh winters without developing excess body fat. The result is a lightly marbled, low fat, low cholesterol beef. Locustbrae Highlands spend their lives on lush pasture foraging on clover, orchard grass, trefoil and other native grasses. They also prefer a higher portion of “browse” (brush and weeds) than most breeds, minimizing the need for pasture mowing.
Healthy food is good for the body and good for the land. Grass fed cattle effectively transfer natural forages into nutritious beef without the need for environmentally costly antibiotics, pesticides, or chemically grown feeds.
Cattle are finished on pasture grasses and harvested seasonally, in harmony with the nutrition that Mother Nature provides.
All Locustbrae beef is cut and packed at a locally owned and operated, USDA certified facility providing custom dry-aging, and vacuum packaging.
Locustbrae Farm Scottish Highland beef can be purchased in quantities large or small and shipping can be arranged within a 100 mile radius of Alfred, NY. We are located just 15 miles from the New York/Pennsylvania border.
Locustbrae Farm, Fion and Kimberly MacCrea, 6404 Sherman Road, Alfred Station NY 14803. (607) 661-7515.
E-mail: [email protected]. Website: www.locustbrae.com.
Long Days Farm is a small chicken, egg, and vegetable farm located in South Cambridge, NY, in the southern tip of Washington County. Our pasture-raised chickens spend most of their lives outdoors where they have plenty of room to forage in our field. We feed them locally grown and mixed grain that is free from antibiotics and hormones.
We raise two varieties. For our broilers, which average between four and five pounds, we have chosen Kosher Kings. These highly active birds are outstanding foragers. Their meat is therefore darker and more flavorful than that of standard birds. Our popular Cornish Cross roasters may reach 9 pounds. Many of our customers serve them for Thanksgiving.
Our birds are available at the end of September and the end of October. They must be reserved in advance, so write or call.
Long Days Farm, Debby Jaffe and Edwin Schiele, 42 Durfee Road, Buskirk NY 12028. (518) 677-8128.
E-mail: [email protected]. Website: www.longdaysfarm.com.
Longmeadow Farm produces grass fed beef in the Mohawk Valley Region of New York State. Over the years we have cultivated a private/direct market consisting of long term repeat customers. We generally deliver sides of beef in the fall of each year, which are aged 18-21 days and custom cut to customer requirements and specifications.
Cattle are grass fed and finished without the use of grain. The beef cattle are born and raised on the farm, rotationally grazed on 100+ acres of improved grass pasture during the growing season and fed stored grass based forages during the winter. We raise Hereford cattle without the use of antibiotics, growth hormones and chemical based dewormers. Cattle are free to roam over 10 acres of permanent pasture and woods during the winter months and are never confined to pens, except during the weaning process.
The farming operation, consisting of 250 acres,and has been farmed organically (but not certified) since 1982. The farming operation does not use chemical/petro-based fertilizers, pesticides/herbicides or GMO based seed. Our farming philosophy includes: protecting the environment, humane treatment of animals, sustainable agriculture, and providing a superior local product and a rewarding eating experience year after year for our customers.
You may call or e-mail us to schedule a farm farm tour or just to stop by for a chat.
Longmeadow Farm, Martin and Kathleen Smith, 133 Argersinger Drive, Fonda NY 12068. (518) 853-1215.
E-mail: [email protected].
Lowland Farm raises grass-fed, grass-finished beef and pastured pork on verdant farmland in the Hudson Valley, 50 miles NW of New York City, in Warwick, NY and Vernon, NJ.
Our cows are mixed breeds, including Angus, Hereford, and Devon. They spend their entire lives out of doors, eating grass exclusively, without antibiotics or growth-promoting hormones. We began raising beef seven years ago and are beginning to see the results of our high density rotational grazing in improved soil, organic matter and fertility – and in excellent beef. We added pasture-raised hogs in 2012, rearing heritage breeds on sectioned woodland habitat. Hogs live on the fruits of their foraging and on feed free of antibiotics and hormones.
We sell varied cuts of grass-fed beef and pastured pork, processed at USDA-approved facilities and sold frozen in vacuum-packed packages: steaks, roasts, short-ribs, sandwich steak, ground beef, ham, sausages, spare ribs and other cuts. Customers may buy portions of cows or pigs as well. Orders of 20 pounds or more, picked up at the farm, receive a 20% discount. We sell our meat locally; people may pick up from the farm, ordering in advance (if they wish) online at lowlandfarm.eatfromfarms.com. Selected cuts are available for delivery through Schuller’s Dairy Deliveries, Warwick, NY. (www.schullersdairy.com)
More information about our grazing practices and farm is available on our website.
Lowland Farm, Jason Friedman, 68 Prices Switch Road, Warwick NY 10990. (845) 481-3459.
E-mail: [email protected]. Website: www.lowlandfarm.com.
Welcome to Mack Brook Farm: Kevin Jablonski and Karen Christensen, Owners.
We raise grassfed Angus beef on 300 acres in the foothills of the Adirondacks. Our cattle are born and raised on the farm. They eat only our pasture grasses during the growing season and then hay from only our fields in winter. The cattle are unconfined on over 60 acres of pasture year-round.
100% Traceability
No Antibiotics
No Hormones
No Genetically Modified Feed or Fillers
We produce a premium product with superior quality and taste and are dedicated to providing you with the healthiest and most delicious beef anywhere.
Rotationally grazed
Stress-free environment
Humane treatment from birth through processing
Dry aged
We sell individual cuts of meat, frozen, in cryovac packaging directly from the farm. We also sell sides of beef at an affordable discount.
Mack Brook Farm, Karen Christensen, 312 McEachron Hill Road, Argyle NY 12809. (518) 638-6187.
E-mail: [email protected]. Website: www.mackbrookfarm.com.
Maple Hill Farm is a Certified Naturally Grown farm that produces and sells maple syrup and maple products in their country store and on their website, as well as other local, organic foods and their own eggs. Other products available are hay, vegetables, lumber from their sawmill, horse jumps, wood chips and firewood (delivered locally). they also produce biodiesel.
Sustainability has always been a key component on the farm, from the organic manure used on the crops to the organic chicken feed and natural grazing techniques for the animals. And obviously, maple syrup is a natural crop with nothing added to the sap in the boiling process.
Maple Hill farm is family-owned and operated, with Caroline Foote, Victor Putnam, and their two sons at the helm. They love what they do and it shows. Victor, a fifth generation maple producer, built the farm from scratch and relocated the family maple business there in 1982.
The maple products can be purchased online through their website, by phone, e-mail, or in person at their country store. Gift sets with a wide variety of options are available and those can be shipped anywhere.
They look forward to meeting your sweet needs!
Maple Hill Farm Enterprises, LLC., Caroline Foote, 107 C. Crapser Road, Cobleskill NY 12043. (518) 234-4858 or (800) 543-5379.
E-mail: [email protected]. Website: www.maplehillfarms.biz.
Mascho Homestead Farms is a small, family owned and operated farm that specialize in pasture raised beef and pork. Our 170-acre farm is located in Angelica, New York.
Our 100% grass-fed and grass-finished Black Angus-Cross cattle are born, raised and finished on our open grass pastures of our farm. Our herd of 29 cows have all been born and raised on our farm. We buy a registered Black Angus Bull about every three years to cover our herd.
We currently buy in Hampshire/Yorkshire/Duroc cross piglets from local farmers that are about 6 weeks old and raise them on our farm. We have just purchased a Registered Berkshire Boar and will breed him this fall to the gilts to have our own piglets. Our pigs are pasture-raised in the summer, but do have shelter in the winter to protect them from the elements.
We raise our animals to provide you with quality meat products that will give you not only a great eating experience, but peace of mind knowing that your food has been grown locally, with great care, as well as:
* Humanely Raised
* Natural and Sustainable Methods
* Pasture-Based
* Never Fed Hormones, Steroids or Antibiotics
* Pastures/Hay never have Pesticides or Fertilizer Applied
We sell the freezer beef by the 1/4, 1/2 or whole animal and freezer pork by the 1/2 or whole. Custom Cut orders are cut to your specifications. The custom cut butcher we use is a small, local, family-owned USDA inspected facility.
We also have a limited supply of USDA stamped, individual packaged, freezer beef and pork available at the farm.
Delivery of orders can be accommodated within a reasonable distance of our farm.
We will also have our roadside stand open in the summer selling products from our garden: peppers, lettuce, sweet corn, potatoes, zucchini, tomatoes, pumpkins, and much more.
Please contact us for information on ordering and pricing. Thank-you for your interest in our farm!
Mascho Homestead Farms, James and Danelle Mascho, 6219 Feathers Creek Road, Belmont NY 14813. (585) 610-6924.
E-mail: [email protected]. Website: www.facebook.com/maschohomesteadfarms.
Melody Springs Farm specializes in raising grass-fed Hereford and Hereford-Angus cross beef cows in a natural stress-free environment. Our cows do not receive any kind of antibiotic or hormone treatment and are fed and finished on pastures which are completely chemical-free. Our pastures are meticulously maintained, and we employ rotational grazing to provide optimal nutrition for our herd.
Melody Springs Farm is located in beautiful Schoharie County just outside the village of Sharon Springs, New York. It is comprised of 125 acres of hay fields, pastures and woods on an escarpment overlooking the Mohawk Valley. We have painstakingly brought this former dairy farm back from a fate that has befallen so many like it—reverting to scrub land or becoming yet another development. We view this as our contribution towards Central New York’s agricultural heritage and the resurgence of the old-fashioned family farm.
We offer whole, half, and split-side beef.
We also offer brown eggs and chickens (broilers) for meat. All of our chickens are free-ranging.
Feel free to visit us by appointment.
Melody Springs Farm, JoAnne and Constantin, 195 Buel Road, Sharon Springs NY 13459. (518) 284-2731.
E-mail: [email protected].
Midsummer Farm has been practicing and developing artisanal and sustainableagriculture since 2002. We are a very small farm, specializing inheritage poultry and game birds. Beautiful assortments of eggs in all shades of brown and green are sold by the dozen and half dozen—please visit our website or sign up for our newsletter for updates as to how to buy our eggs and for egg availability.
Our hens are respected as living, feeling beings and thus enjoy spending the entire day ranging in over 3 acres of organically maintained pasture, woods, wild meadow, and riparian areas. The flock is made up of heritage breeds of chickens, and we also offer chicks and/or breeding stock of Ameraucana, Cuckoo Sport Marans, Speckled Sussex, and Salmon Faverolle chickens. Other upcoming projects involve quail and snails, so please sign up for our mailing list for up-to-date info and events. Our poultry, and the land they range on, is Certified Animal Welfare Approved, Certified Organic, Certified Naturally Grown, and Biodynamic.
Customers are more than welcome to stop by and visit the farm; but we are not open to public, so you must email ahead and make an appointment. We also offer a variety of workshops on sustainable agriculture—our Backyard Organic Chicken Workshop is given 5 times a year, and we also host farm-participation events.
Midsummer Farm, Mark and Barbara Laino, 156 East Ridge Road, Warwick NY 10990. (845) 986-9699.
E-mail: [email protected]. Website: www.midsummerfarm.com.
Miller’s Biodiversity Farm is a private food club, a community of people ordering real, high-quality, nutrient-dense food together. We have had a thriving farm-to-consumer business for over seven years and fill thousands of orders every year. To become a member, you must pay a $40 lifetime membership fee and sign our membership contract. We produce raw A2/A2 grass-fed cow’s milk, meat, and bespoke dairy products.
RAW: Our real milk comes from pastured cows, contains all the fat, and has not been processed in any way. It is raw and non-homogenized.
A2/A2: Our milk, cream, yogurt , and fresh cheese is 100% A2/A2. Our A2/A2 milk contains only the fully digestible A2 type of β-casein protein rather than the more prevalent A1 protein. Our butter and hard cheese are A1/A2. We are in process of converting to a 100% A2/A2 herd by the end of 2017.
, and fresh is 100% A2/A2. Our A2/A2 milk contains only the fully digestible A2 type of β-casein protein rather than the more prevalent A1 protein. Our butter and hard cheese are A1/A2. We are in process of converting to a 100% A2/A2 herd by the end of 2017. GRASS-FED: Our cows eat fresh grass and hay enriched with organic nutrients in the pasture and in the barn. Our goal is to raise the healthiest cows possible.
BESPOKE: We offer made-to-order fresh dairy products produced on our own farm from our own milk. These include yogurt, kefir, smoothies, cottage cheese, and cream cheese.
LOCAL: In addition to the dairy products from our farm, the buying club also offers a variety of products sourced from fellow local organic farms with similar farming practices.
ORGANICALLY-GROWN: Miller’s Biodiversity Farm has not been touched by chemicals in over fifteen years, and the neighboring farms we work with practice in a similar manner to us. All our products are all-natural, chemical-free, and GMO-free. We take pride in providing you and your family with nutrient-dense, real food.
Shipping Options:
Home Delivery: To most areas of CT, DC, DE, MA, MD, ME, NH, NJ, NY, PA, and VA.
Group Pickup Sites: Free shipping for groups in NJ and NY. Reduced shipping for groups in MA.
Miller's Biodiversity Farm, Aaron Miller, 71 South Orange Street, South Orange, NJ 07079. (717) 786-7895.
E-mail: [email protected]. Website: www.amishbiofarm.com.
Moon Dancing Farm is a 150-acre family farm, located just 14 miles west of Cooperstown, near Edmeston in the heart of central NYS. We raise pasture-raised beef, pork, turkey, chicken and guinea hens. ALL ANIMALS have access to pasture and are treated HUMANELY and with respect ALWAYS.
We have been farming humanely and free of chemicals for over 30 years. It is what we believe in and always have. We pride ourselves on offering affordable meats. All our livestock have access to 100% chemical-free lush pasture.
Pick up by appointment or shipped to your front door!
Affordable 100% grass fed beef by the whole/half or quarter / smaller amounts (15–20 pounds) delivered right to your door.
We also raise pastured pork (whole) smaller (15–20 pounds) shipped and pastured poultry.
Pastured turkey available Thanksgiving and 1/4's and 1/2's for several months thereafter and we ship.
Check out our monthly mix – an affordable variety of 1–3 meats shipped to your front door monthly. Free shipping on monthly mix.
No artificial anything, no antibiotics, no hormones, no feedlots, no cruelty. Please visit our site or email.
Moon Dancing Farm, Brian and Lindy Ferguson, 5164 RT 51 / PO Box 125, West Burlington NY 13482. Note: all pick ups by appointment only! (607) 267-6382.
E-mail: [email protected]. Website: www.moondancingfarm.com
Morehead Cattle Company, located in Jamesville, New York, raises Angus and Hereford cattle for beef. We are a Grass Fed Farm Certified by the American Grass-fed Association and Certified Naturally Grown.
We have sustainable and organic practices. We raise the bees that pollinate the clover our cattle eat. We use solar in our fields, fertilize laterally, clean water practices and rain water storage.
We use organic and sustainable practices. Our pasture seed is organic, our forage supplements are organic, our minerals are organic, our hay is never sprayed.
Our beef is served at the Eleven Waters Restaurant in the Syracuse, NY Marriott, and at Kilpatricks Public House Pub in Ithaca, NY.
Interested in purchase? Call Ralph at (704) 999-8718 for competitive pricing to deliver locally. We do not ship.
Morehead Cattle Company, Ralph Nappi, 4275 Gates Road, Jamesville NY 13078. (704) 999-8718.
E-mail: [email protected]. Website: See Morehead Cattle Company on Facebook.
Movable Beast Farm strives to:
Produce food that is natural, safe, nourishing and delicious
Respect and honor the creatures that we work with
Heal and enrich the land
We are located less then two hours from New York City in beautiful Ulster County. Our cows move between several properties, receiving fresh pasture on a daily basis. Although we are not organically certified, the animals’ diet is supplemented only with kelp, organic certified minerals, and natural salts. In winter they eat baleage and hay. They receive no grains, antibiotics, hormones nor are any pesticides or herbicides used with the animals or on the pastures.
We currently sell grass fed and finished beef by the side and split side, making deliveries throughout the Hudson Valley and New York City. We occasionally sell retail cuts from the farm and welcome visitors; however, if you are planning on coming by, please call or e-mail in advance to find out where the animals will be grazing.
Movable Beast Farm, Charles and Francesca Noble, 45 Boodle Hole Road, Accord NY 12404. (845) 626-2790.
E-mail: [email protected]. Website: http://movablebeastfarm.wordpress.com
Natural Borders Farm specializes in raising grass-fed beef on a rotational grazing system. Our cattle spend the grazing season moving daily to fresh paddocks of native grasses. We also graze horses, poultry and sheep with our cattle to encourage an increased variety of native grass species and to provide natural predator protection. We strive to provide a natural, healthy, non-stressful and enjoyable environment for all our livestock.
We also utilize pigs for compost production in our barn. These pigs spend at least 12 hours daily in the cattle barn rummaging through the bedding material while the cows are outside. Pigs are also fed corn meal, garden excesses and apples from our farm. We have a limited amount of pork available in both the fall and spring seasons. In the near future, we hope to offer pasture poultry and grass-fed lamb.
Our cattle are processed in a federally inspected processing plant. Beef may be purchased in quarters, halves or whole. Although not certified organic, no chemicals, hormones or routine drugs are used on our farm.
We also have our own hives of honeybees for increased pollination and production of pure honey that is available at most times.
Come visit at anytime.
Natural Borders Farm, Elva Svendsen or Kris Maxwell, 2003 State Highway 220, McDonough NY 13801. (607) 647-9227 or (607) 647-5043.
E-mail: [email protected].
Nectar Hills Farm is located on the beautiful rolling hills of Otsego County, 3 hours and 1/2 from NYC, 1 hour away from Albany, and close driving distance from Oneonta, Cobleskill and Cooperstown. The Betty and Wilbur Davis state Park is only a mile away from the farm, where you can rent rustic cabins, fish, swim, hike, bicycle ridding, etc.
We have 239 acres of divine beauty, pastures, hay fields, an old charming apple orchard, springs all over, a swampy area that we keep wild, and a creek that runs most of the year. To complement this picture, there is an old farm house, part of which is stone and a menagerie of animals that enhance the landscape. Our land is certified organic, and certified naturally grown; our goal is to become certified biodynamic by Demeter.
We believe farmers are the doctors of the future. They will grow food which will nourish people, creating minds capable of higher thought and reason and bodies full of energy.
We produce grass fed lamb and beef and pasture raised pork and eggs, also vegetables, herbs, apples and honey when in season.
The food revolution: Healing veggies, meat as medicine, fresh buttery eggs, sunlight, grass, spring water, pasture raised.
We care for the soil and the animals that nourish us, and we intend to preserve this gift for future generations.
Nectar Hills Farm, Dave Dutton and Sonia Sola, 393 Peeters Road, Schenevus, NY 12155. (607) 638-5758.
Website: www.nectarhillsfarm.com
New York Beef Company, LLC. At the New York Beef Company we had two goals: to raise beef that would yield the finest, most succulent cuts available and at the same time be one of the healthiest foods one can eat.
Many would consider these goals an impossible paradox. But our 100% grass-fed, all-natural beef is completely free of antibiotics, hormone implants and by-products. The life of each animal is totally controlled from birth to harvest on a small group of upstate New York farms that must past stringent guidelines to meet our quality criteria. The end result is the finest, healthiest, safest beef you can buy. It takes a lot to pass our requirements because we know it takes a lot to pass yours.
New York Beef, LLC, 41 Stringham Road, Arlington NY 12603. (845) 559-3171.
E-mail: [email protected]. Website: www.newyorkbeef.com.
Northland Sheep Dairy is a 100% grass-fed farm producing artisanal raw milk cheeses, lamb and mutton, as well as 100% wool products and tanned sheepskins. Our animals are rotationally grazed during the growing season, and fed hay produced on-farm during the winter. We produce our own hay using draft horse and mule power. We do not use chemical wormers or insecticides on the animals. We use a certified organic, USDA-inspected butcher.
We sell our cheeses, meats and wool products at the Ithaca Farmers Market every Saturday, April through December, in Ithaca, New York.
Northland Sheep Dairy. Maryrose Livingston and Donn Hewes, 3501 Hoxie Gorge Freetown Road, Marathon NY 13803. (607) 849-4442.
E-mail: [email protected]. Website: www.northlandsheepdairy.com/index.html
The Ortensi Farm is certified organic with NOFA-NY LLC and has been since 2006.
Currently we sell certified organic grass fed beef, certified organic pastured whole turkeys and chickens. We take orders each spring to raise pastured pork and lamb, raise them through the growing season and have them processed in the late fall. They are sold as 1/2 or whole. We also take orders for 1/ |
def score(self, measurements):
if len(self.rules) == 0:
raise ValueError("No rules to apply")
score = self.rules[0].score(measurements)
for rule in self.rules[1:]:
partial_score = rule.score(measurements)
if partial_score.shape[0] > score.shape[0]:
temp = score
score = partial_score
partial_score = temp
score_len = partial_score.shape[0]
score[:score_len, :] += partial_score[:score_len, :]
if score.shape[0] > partial_score.shape[0]:
score[score_len:, :] = numpy.NAN
return score |
<reponame>lineuman/biliob-spider
# coding=utf-8
import scrapy
from scrapy.http import Request
from biliob_spider.items import VideoOnline
import time
import json
import logging
from pymongo import MongoClient
import datetime
from scrapy_redis.spiders import RedisSpider
from biliob_tracer.task import SpiderTask
from db import db
class OnlineSpider(RedisSpider):
name = "online"
allowed_domains = ["bilibili.com"]
start_urls = ['https://www.bilibili.com/video/online.html']
custom_settings = {
'ITEM_PIPELINES': {
'biliob_spider.pipelines.OnlinePipeline': 300
}
}
def __init__(self):
self.task = SpiderTask('同时在线人数爬虫', collection=db['tracer'])
def parse(self, response):
try:
self.task.crawl_count += 1
video_list = response.xpath('//*[@id="app"]/div[2]/div[2]/div')
# 为了爬取分区、粉丝数等数据,需要进入每一个视频的详情页面进行抓取
title_list = video_list.xpath('./a/p/text()').extract()
watch_list = video_list.xpath('./p/b/text()').extract()
author_list = video_list.xpath('./div[1]/a/text()').extract()
href_list = video_list.xpath('./a/@href').extract()
for i in range(len(title_list)):
item = VideoOnline()
item['title'] = title_list[i]
item['author'] = author_list[i]
item['data'] = {
'datetime': datetime.datetime.utcnow() + datetime.timedelta(hours=8),
'number': watch_list[i]
}
item['aid'] = href_list[i][9:-1]
# 为了爬取分区等数据,需要进入每一个视频的详情页面进行抓取
yield Request(
"https://www.bilibili.com" + href_list[i],
meta={'item': item},
callback=self.detailParse)
except Exception as error:
# 出现错误时打印错误日志
self.task.crawl_failed += 1
logging.error("视频爬虫在解析时发生错误")
logging.error(response.url)
logging.error(error)
def detailParse(self, response):
try:
item = response.meta['item']
c = response.xpath("//span[@class='crumb'][2]/a/text()").extract()
if c != []:
item['channel'] = response.xpath(
"//span[@class='crumb'][2]/a/text()").extract()[0]
else:
item['channel'] = '番剧'
c = response.xpath("//span[@class='crumb'][3]/a/text()").extract()
if c != []:
item['subChannel'] = response.xpath(
"//span[@class='crumb'][3]/a/text()").extract()[0]
else:
item['subChannel'] = '番剧'
yield item
except Exception as error:
# 出现错误时打印错误日志
logging.error("视频爬虫在解析细节时发生错误")
logging.error(response.url)
logging.error(error)
|
<reponame>whunmr/msgrpc
#ifndef MSGRPC_SI_BASE_H
#define MSGRPC_SI_BASE_H
#include <msgrpc/core/cell/cell.h>
#include <msgrpc/core/service_discovery/default_service_resolver.h>
#include <msgrpc/util/type_traits.h>
namespace msgrpc {
template<typename SERVICE_RESOLVER, typename SI_FUNCTION, typename REQ>
auto run_si(SI_FUNCTION& si_func, const REQ &req) -> function_result_type<SI_FUNCTION> {
typedef typename std::remove_pointer<function_result_type<SI_FUNCTION>>::type RSP;
msgrpc::RpcContext *ctxt = new msgrpc::RpcContext();
ctxt->service_resolver_ = &SERVICE_RESOLVER::instance();
auto* result_cell = si_func(req, *ctxt);
assert(result_cell != nullptr && "should not return nullptr cell from SI");
result_cell->set_binded_context(*ctxt);
ctxt->release_list_.remove(result_cell);
return result_cell;
}
template<typename SI_FUNCTION, typename REQ>
auto run_si(SI_FUNCTION& si_func, const REQ &req) -> function_result_type<SI_FUNCTION> {
return run_si<DefaultServiceResolver>(si_func, req);
}
}
#endif //MSGRPC_SI_BASE_H
|
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMMON_EVENT_TRACER_H_
#define COMMON_EVENT_TRACER_H_
extern "C" {
typedef const unsigned char* (*GetCategoryEnabledFlagFunc)(const char* name);
typedef void (*AddTraceEventFunc)(char phase, const unsigned char* categoryGroupEnabled, const char* name,
unsigned long long id, int numArgs, const char** argNames,
const unsigned char* argTypes, const unsigned long long* argValues,
unsigned char flags);
// extern "C" so that it has a reasonable name for GetProcAddress.
void __stdcall SetTraceFunctionPointers(GetCategoryEnabledFlagFunc get_category_enabled_flag,
AddTraceEventFunc add_trace_event_func);
}
namespace gl
{
const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name);
void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id,
int numArgs, const char** argNames, const unsigned char* argTypes,
const unsigned long long* argValues, unsigned char flags);
}
#endif // COMMON_EVENT_TRACER_H_
|
''''''
'''
@Author: <NAME> (<EMAIL>)
@Date: 2020-03-01
@Copyright: Copyright (C) <NAME> 2020. All rights reserved. Please refer to the license file.
@LastEditTime: 2020-05-27
@LastEditors: <NAME>
@Description: This file contains functions related to GRIC computation
'''
import numpy as np
def compute_fundamental_residual(F, kp1, kp2):
"""
Compute fundamental matrix residual
Args:
F (array, [3x3]): Fundamental matrix (from view-1 to view-2)
kp1 (array, [Nx2]): keypoint 1
kp2 (array, [Nx2]): keypoint 2
Returns:
res (array, [N]): residual
"""
# get homogeneous keypoints (3xN array)
m0 = np.ones((3, kp1.shape[0]))
m0[:2] = np.transpose(kp1, (1,0))
m1 = np.ones((3, kp2.shape[0]))
m1[:2] = np.transpose(kp2, (1,0))
Fm0 = F @ m0 #3xN
Ftm1 = F.T @ m1 #3xN
m1Fm0 = (np.transpose(Fm0, (1,0)) @ m1).diagonal()
res = m1Fm0**2 / (np.sum(Fm0[:2]**2, axis=0) + np.sum(Ftm1[:2]**2, axis=0))
return res
def compute_homography_residual(H_in, kp1, kp2):
"""
Compute homography matrix residual
Args:
H (array, [3x3]): homography matrix (Transformation from view-1 to view-2)
kp1 (array, [Nx2]): keypoint 1
kp2 (array, [Nx2]): keypoint 2
Returns:
res (array, [N]): residual
"""
n = kp1.shape[0]
H = H_in.flatten()
# get homogeneous keypoints (3xN array)
m0 = np.ones((3, kp1.shape[0]))
m0[:2] = np.transpose(kp1, (1,0))
m1 = np.ones((3, kp2.shape[0]))
m1[:2] = np.transpose(kp2, (1,0))
G0 = np.zeros((3, n))
G1 = np.zeros((3, n))
G0[0]= H[0] - m1[0] * H[6]
G0[1]= H[1] - m1[0] * H[7]
G0[2]=-m0[0] * H[6] - m0[1] * H[7] - H[8]
G1[0]= H[3] - m1[1] * H[6]
G1[1]= H[4] - m1[1] * H[7]
G1[2]=-m0[0] * H[6] - m0[1] * H[7] - H[8]
magG0=np.sqrt(G0[0]*G0[0] + G0[1]*G0[1] + G0[2]*G0[2])
magG1=np.sqrt(G1[0]*G1[0] + G1[1]*G1[1] + G1[2]*G1[2])
magG0G1=G0[0]*G1[0] + G0[1]*G1[1]
alpha=np.arccos(magG0G1 /(magG0*magG1))
alg = np.zeros((2, n))
alg[0]= m0[0]*H[0] + m0[1]*H[1] + H[2] - \
m1[0]*(m0[0]*H[6] + m0[1]*H[7] + H[8])
alg[1]= m0[0]*H[3] + m0[1]*H[4] + H[5] - \
m1[1]*(m0[0]*H[6] + m0[1]*H[7] + H[8])
D1=alg[0]/magG0
D2=alg[1]/magG1
res = (D1*D1 + D2*D2 - 2.0*D1*D2*np.cos(alpha))/np.sin(alpha)
return res
def calc_GRIC(res, sigma, n, model):
"""Calculate GRIC
Args:
res (array, [N]): residual
sigma (float): assumed variance of the error
n (int): number of residuals
model (str): model type
- FMat
- EMat
- HMat
"""
R = 4
sigmasq1 = 1./ sigma**2
K = {
"FMat": 7,
"EMat": 5,
"HMat": 8,
}[model]
D = {
"FMat": 3,
"EMat": 3,
"HMat": 2,
}[model]
lam3RD=2.0 * (R-D)
sum_ = 0
for i in range(n):
tmp=res[i] * sigmasq1
if tmp<=lam3RD:
sum_ += tmp
else:
sum_ += lam3RD
sum_ += n * D * np.log(R) + K * np.log(R*n)
return sum_
|
<filename>boost/boost/uuid/name_generator.hpp<gh_stars>10-100
// Boost name_generator.hpp header file ----------------------------------------------//
// Copyright 2010 <NAME>.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UUID_NAME_GENERATOR_HPP
#define BOOST_UUID_NAME_GENERATOR_HPP
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/sha1.hpp>
#include <boost/assert.hpp>
#include <string>
#include <cstring> // for strlen, wcslen
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std {
using ::strlen;
using ::wcslen;
} //namespace std
#endif //BOOST_NO_STDC_NAMESPACE
namespace boost {
namespace uuids {
// generate a name-based uuid
// TODO: add in common namesspace uuids
class name_generator {
public:
typedef uuid result_type;
explicit name_generator(uuid const& namespace_uuid)
: namespace_uuid(namespace_uuid)
{}
uuid operator()(const char* name) {
reset();
process_characters(name, std::strlen(name));
return sha_to_uuid();
}
uuid operator()(const wchar_t* name) {
reset();
process_characters(name, std::wcslen(name));
return sha_to_uuid();
}
template <typename ch, typename char_traits, typename alloc>
uuid operator()(std::basic_string<ch, char_traits, alloc> const& name) {
reset();
process_characters(name.c_str(), name.length());
return sha_to_uuid();
}
uuid operator()(void const* buffer, std::size_t byte_count) {
reset();
sha.process_bytes(buffer, byte_count);
return sha_to_uuid();
};
private:
// we convert all characters to uint32_t so that each
// character is 4 bytes reguardless of sizeof(char) or
// sizeof(wchar_t). We want the name string on any
// platform / compiler to generate the same uuid
// except for char
template <typename char_type>
void process_characters(char_type const*const characters, size_t count) {
BOOST_ASSERT(sizeof(uint32_t) >= sizeof(char_type));
for (size_t i=0; i<count; i++) {
uint32_t c = characters[i];
sha.process_byte( (c >> 0) & 0xFF );
sha.process_byte( (c >> 8) & 0xFF );
sha.process_byte( (c >> 16) & 0xFF );
sha.process_byte( (c >> 24) & 0xFF );
}
}
void process_characters(char const*const characters, size_t count) {
sha.process_bytes(characters, count);
}
void reset()
{
sha.reset();
sha.process_bytes(namespace_uuid.begin(), namespace_uuid.size());
}
uuid sha_to_uuid()
{
unsigned int digest[5];
sha.get_digest(digest);
uuid u;
for (int i=0; i<4; ++i) {
*(u.begin() + i*4+0) = ((digest[i] >> 24) & 0xFF);
*(u.begin() + i*4+1) = ((digest[i] >> 16) & 0xFF);
*(u.begin() + i*4+2) = ((digest[i] >> 8) & 0xFF);
*(u.begin() + i*4+3) = ((digest[i] >> 0) & 0xFF);
}
// set variant
// must be 0b10xxxxxx
*(u.begin()+8) &= 0xBF;
*(u.begin()+8) |= 0x80;
// set version
// must be 0b0101xxxx
*(u.begin()+6) &= 0x5F; //0b01011111
*(u.begin()+6) |= 0x50; //0b01010000
return u;
}
private:
uuid namespace_uuid;
detail::sha1 sha;
};
}} // namespace boost::uuids
#endif // BOOST_UUID_NAME_GENERATOR_HPP
|
use std::convert::TryFrom;
use crate::{ffi, script, CodePoint, Buffer, Tag, Script, Font};
use crate::buffer::BufferClusterLevel;
use crate::map::Map;
use crate::unicode::GeneralCategory;
#[derive(Clone, Copy, PartialEq)]
enum Consonant {
NC = 0,
AC,
RC,
DC,
NotConsonant,
}
fn get_consonant_type(u: CodePoint) -> Consonant {
match u {
0x0E1B | 0x0E1D | 0x0E1F => Consonant::AC,
0x0E0D | 0x0E10 => Consonant::RC,
0x0E0E | 0x0E0F => Consonant::DC,
0x0E01..=0x0E2E => Consonant::NC,
_ => Consonant::NotConsonant,
}
}
#[derive(Clone, Copy, PartialEq)]
enum Mark {
AV,
BV,
T,
NotMark,
}
fn get_mark_type(u: CodePoint) -> Mark {
match u {
0x0E31 | 0x0E34..=0x0E37 | 0x0E47 | 0x0E4D..=0x0E4E => Mark::AV,
0x0E38..=0x0E3A => Mark::BV,
0x0E48..=0x0E4C => Mark::T,
_ => Mark::NotMark,
}
}
#[derive(Clone, Copy, PartialEq)]
enum Action {
NOP,
/// Shift combining-mark down.
SD,
/// Shift combining-mark left.
SL,
/// Shift combining-mark down-left.
SDL,
/// Remove descender from base.
RD,
}
#[derive(Clone, Copy)]
struct PuaMapping {
u: CodePoint,
win_pua: CodePoint,
mac_pua: CodePoint,
}
impl PuaMapping {
const fn new(u: CodePoint, win_pua: CodePoint, mac_pua: CodePoint) -> Self {
PuaMapping { u, win_pua, mac_pua }
}
}
const SD_MAPPINGS: &[PuaMapping] = &[
PuaMapping::new(0x0E48, 0xF70A, 0xF88B), // MAI EK
PuaMapping::new(0x0E49, 0xF70B, 0xF88E), // MAI THO
PuaMapping::new(0x0E4A, 0xF70C, 0xF891), // MAI TRI
PuaMapping::new(0x0E4B, 0xF70D, 0xF894), // MAI CHATTAWA
PuaMapping::new(0x0E4C, 0xF70E, 0xF897), // THANTHAKHAT
PuaMapping::new(0x0E38, 0xF718, 0xF89B), // SARA U
PuaMapping::new(0x0E39, 0xF719, 0xF89C), // SARA UU
PuaMapping::new(0x0E3A, 0xF71A, 0xF89D), // PHINTHU
PuaMapping::new(0x0000, 0x0000, 0x0000)
];
const SDL_MAPPINGS: &[PuaMapping] = &[
PuaMapping::new(0x0E48, 0xF705, 0xF88C), // MAI EK
PuaMapping::new(0x0E49, 0xF706, 0xF88F), // MAI THO
PuaMapping::new(0x0E4A, 0xF707, 0xF892), // MAI TRI
PuaMapping::new(0x0E4B, 0xF708, 0xF895), // MAI CHATTAWA
PuaMapping::new(0x0E4C, 0xF709, 0xF898), // THANTHAKHAT
PuaMapping::new(0x0000, 0x0000, 0x0000)
];
const SL_MAPPINGS: &[PuaMapping] = &[
PuaMapping::new(0x0E48, 0xF713, 0xF88A), // MAI EK
PuaMapping::new(0x0E49, 0xF714, 0xF88D), // MAI THO
PuaMapping::new(0x0E4A, 0xF715, 0xF890), // MAI TRI
PuaMapping::new(0x0E4B, 0xF716, 0xF893), // MAI CHATTAWA
PuaMapping::new(0x0E4C, 0xF717, 0xF896), // THANTHAKHAT
PuaMapping::new(0x0E31, 0xF710, 0xF884), // MAI HAN-AKAT
PuaMapping::new(0x0E34, 0xF701, 0xF885), // SARA I
PuaMapping::new(0x0E35, 0xF702, 0xF886), // SARA II
PuaMapping::new(0x0E36, 0xF703, 0xF887), // SARA UE
PuaMapping::new(0x0E37, 0xF704, 0xF888), // SARA UEE
PuaMapping::new(0x0E47, 0xF712, 0xF889), // MAITAIKHU
PuaMapping::new(0x0E4D, 0xF711, 0xF899), // NIKHAHIT
PuaMapping::new(0x0000, 0x0000, 0x0000)
];
const RD_MAPPINGS: &[PuaMapping] = &[
PuaMapping::new(0x0E0D, 0xF70F, 0xF89A), // YO YING
PuaMapping::new(0x0E10, 0xF700, 0xF89E), // THO THAN
PuaMapping::new(0x0000, 0x0000, 0x0000)
];
fn pua_shape(u: CodePoint, action: Action, font: &ttf_parser::Font) -> CodePoint {
let mappings = match action {
Action::NOP => return u,
Action::SD => SD_MAPPINGS,
Action::SL => SL_MAPPINGS,
Action::SDL => SDL_MAPPINGS,
Action::RD => RD_MAPPINGS,
};
for m in mappings {
if m.u == u {
if font.glyph_index(char::try_from(m.win_pua).unwrap()).is_some() {
return m.win_pua;
}
if font.glyph_index(char::try_from(m.mac_pua).unwrap()).is_some() {
return m.mac_pua;
}
break;
}
}
u
}
#[derive(Clone, Copy)]
enum AboveState {
// Cluster above looks like:
T0, // ⣤
T1, // ⣼
T2, // ⣾
T3, // ⣿
}
const ABOVE_START_STATE: &[AboveState] = &[
AboveState::T0, // NC
AboveState::T1, // AC
AboveState::T0, // RC
AboveState::T0, // DC
AboveState::T3, // NotConsonant
];
#[derive(Clone, Copy)]
struct AboveStateMachineEdge {
action: Action,
next_state: AboveState,
}
impl AboveStateMachineEdge {
const fn new(action: Action, next_state: AboveState) -> Self {
AboveStateMachineEdge { action, next_state }
}
}
type ASME = AboveStateMachineEdge;
const ABOVE_STATE_MACHINE: &[[ASME; 3]] = &[
// AV BV T
/* T0 */ [ASME::new(Action::NOP, AboveState::T3), ASME::new(Action::NOP, AboveState::T0), ASME::new(Action::SD, AboveState::T3)],
/* T1 */ [ASME::new(Action::SL, AboveState::T2), ASME::new(Action::NOP, AboveState::T1), ASME::new(Action::SDL, AboveState::T2)],
/* T2 */ [ASME::new(Action::NOP, AboveState::T3), ASME::new(Action::NOP, AboveState::T2), ASME::new(Action::SL, AboveState::T3)],
/* T3 */ [ASME::new(Action::NOP, AboveState::T3), ASME::new(Action::NOP, AboveState::T3), ASME::new(Action::NOP, AboveState::T3)],
];
#[derive(Clone, Copy)]
enum BelowState {
/// No descender.
B0,
/// Removable descender.
B1,
/// Strict descender.
B2,
}
const BELOW_START_STATE: &[BelowState] = &[
BelowState::B0, // NC
BelowState::B0, // AC
BelowState::B1, // RC
BelowState::B2, // DC
BelowState::B2, // NotConsonant
];
#[derive(Clone, Copy)]
struct BelowStateMachineEdge {
action: Action,
next_state: BelowState,
}
impl BelowStateMachineEdge {
const fn new(action: Action, next_state: BelowState) -> Self {
BelowStateMachineEdge { action, next_state }
}
}
type BSME = BelowStateMachineEdge;
const BELOW_STATE_MACHINE: &[[BSME; 3]] = &[
// AV BV T
/* B0 */ [BSME::new(Action::NOP, BelowState::B0), BSME::new(Action::NOP, BelowState::B2), BSME::new(Action::NOP, BelowState::B0)],
/* B1 */ [BSME::new(Action::NOP, BelowState::B1), BSME::new(Action::RD, BelowState::B2), BSME::new(Action::NOP, BelowState::B1)],
/* B2 */ [BSME::new(Action::NOP, BelowState::B2), BSME::new(Action::SD, BelowState::B2), BSME::new(Action::NOP, BelowState::B2)],
];
fn do_pua_shaping(font: &ttf_parser::Font, buffer: &mut Buffer) {
let mut above_state = ABOVE_START_STATE[Consonant::NotConsonant as usize];
let mut below_state = BELOW_START_STATE[Consonant::NotConsonant as usize];
let mut base = 0;
for i in 0..buffer.len() {
let mt = get_mark_type(buffer.info[i].codepoint);
if mt == Mark::NotMark {
let ct = get_consonant_type(buffer.info[i].codepoint);
above_state = ABOVE_START_STATE[ct as usize];
below_state = BELOW_START_STATE[ct as usize];
base = i;
continue;
}
let above_edge = ABOVE_STATE_MACHINE[above_state as usize][mt as usize];
let below_edge = BELOW_STATE_MACHINE[below_state as usize][mt as usize];
above_state = above_edge.next_state;
below_state = below_edge.next_state;
// At least one of the above/below actions is NOP.
let action = if above_edge.action != Action::NOP {
above_edge.action
} else {
below_edge.action
};
buffer.unsafe_to_break(base, i);
if action == Action::RD {
buffer.info[base].codepoint = pua_shape(buffer.info[base].codepoint, action, font);
} else {
buffer.info[i].codepoint = pua_shape(buffer.info[i].codepoint, action, font);
}
}
}
// TODO: more tests
fn preprocess_text(
map: &Map,
script: Script,
font: &ttf_parser::Font,
buffer: &mut Buffer,
) {
// This function implements the shaping logic documented here:
//
// https://linux.thai.net/~thep/th-otf/shaping.html
//
// The first shaping rule listed there is needed even if the font has Thai
// OpenType tables. The rest do fallback positioning based on PUA codepoints.
// We implement that only if there exist no Thai GSUB in the font.
// The following is NOT specified in the MS OT Thai spec, however, it seems
// to be what Uniscribe and other engines implement. According to Eric Muller:
//
// When you have a SARA AM, decompose it in NIKHAHIT + SARA AA, *and* move the
// NIKHAHIT backwards over any tone mark (0E48-0E4B).
//
// <0E14, 0E4B, 0E33> -> <0E14, 0E4D, 0E4B, 0E32>
//
// This reordering is legit only when the NIKHAHIT comes from a SARA AM, not
// when it's there to start with. The string <0E14, 0E4B, 0E4D> is probably
// not what a user wanted, but the rendering is nevertheless nikhahit above
// chattawa.
//
// Same for Lao.
//
// Note:
//
// Uniscribe also does some below-marks reordering. Namely, it positions U+0E3A
// after U+0E38 and U+0E39. We do that by modifying the ccc for U+0E3A.
// See unicode->modified_combining_class (). Lao does NOT have a U+0E3A
// equivalent.
// Here are the characters of significance:
//
// Thai Lao
// SARA AM: U+0E33 U+0EB3
// SARA AA: U+0E32 U+0EB2
// Nikhahit: U+0E4D U+0ECD
//
// Testing shows that Uniscribe reorder the following marks:
// Thai: <0E31,0E34..0E37,0E47..0E4E>
// Lao: <0EB1,0EB4..0EB7,0EC7..0ECE>
//
// Note how the Lao versions are the same as Thai + 0x80.
// We only get one script at a time, so a script-agnostic implementation
// is adequate here.
#[inline] fn is_sara_am(u: CodePoint) -> bool { (u & !0x0080) == 0x0E33 }
#[inline] fn nikhahit_from_sara_am(u: CodePoint) -> CodePoint { u - 0x0E33 + 0x0E4D }
#[inline] fn sara_aa_from_sara_am(u: CodePoint) -> CodePoint { u - 1 }
#[inline] fn is_tone_mark(u: CodePoint) -> bool {
let u = u & !0x0080;
matches!(u, 0x0E34..=0x0E37 | 0x0E47..=0x0E4E | 0x0E31..=0x0E31)
}
buffer.clear_output();
buffer.idx = 0;
while buffer.idx < buffer.len() {
let u = buffer.cur(0).codepoint;
if !is_sara_am(u) {
buffer.next_glyph();
continue;
}
// Is SARA AM. Decompose and reorder.
if let Some(nikhahit) = buffer.output_glyph(nikhahit_from_sara_am(u)) {
nikhahit.set_continuation();
}
buffer.replace_glyph(sara_aa_from_sara_am(u));
// Make Nikhahit be recognized as a ccc=0 mark when zeroing widths.
let end = buffer.out_len();
buffer.out_info_mut()[end - 2].set_general_category(GeneralCategory::NonspacingMark);
// Ok, let's see...
let mut start = end - 2;
while start > 0 && is_tone_mark(buffer.out_info()[start - 1].codepoint) {
start -= 1;
}
if start + 2 < end {
// Move Nikhahit (end-2) to the beginning
buffer.merge_out_clusters(start, end);
let t = buffer.out_info()[end - 2];
for i in 0..(end - start - 2) {
buffer.out_info_mut()[i + start + 1] = buffer.out_info()[i + start];
}
buffer.out_info_mut()[start] = t;
} else {
// Since we decomposed, and NIKHAHIT is combining, merge clusters with the
// previous cluster.
if start != 0 && buffer.cluster_level == BufferClusterLevel::MonotoneGraphemes {
buffer.merge_out_clusters(start - 1, end);
}
}
}
buffer.swap_buffers();
// If font has Thai GSUB, we are done.
if script == script::THAI && !map.found_script[0] {
do_pua_shaping(font, buffer);
}
}
#[no_mangle]
pub extern "C" fn rb_complex_thai_preprocess_text(
plan: *const ffi::hb_shape_plan_t,
buffer: *mut ffi::rb_buffer_t,
font: *mut ffi::hb_font_t
) {
unsafe {
let map = Map::from_ptr(ffi::hb_shape_plan_map(plan));
let script = Script(Tag(ffi::hb_shape_plan_script(plan)));
let font = Font::from_ptr(font);
let buffer = Buffer::from_ptr_mut(buffer);
preprocess_text(map, script, font.ttf_parser(), buffer);
}
}
#[no_mangle]
pub extern "C" fn rb_create_thai_shaper() -> *const ffi::hb_ot_complex_shaper_t {
let shaper = Box::new(ffi::hb_ot_complex_shaper_t {
collect_features: None,
override_features: None,
data_create: None,
data_destroy: None,
preprocess_text: Some(rb_complex_thai_preprocess_text),
postprocess_glyphs: None,
normalization_preference: ffi::HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
decompose: None,
compose: None,
setup_masks: None,
gpos_tag: 0,
reorder_marks: None,
zero_width_marks: ffi::HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
fallback_position: false,
});
Box::into_raw(shaper)
}
|
# import sys
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')
testCases = int(input())
x, y, z = [], [], []
for _ in range(testCases):
xyz = list(map(int, input().split(" ")))
x.append(xyz[0])
y.append(xyz[1])
z.append(xyz[2])
if sum(x) == 0 and sum(y) == 0 and sum(z) == 0 :
print('YES')
else:
print('NO')
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define FIO ios_base::sync_with_stdio(false), cin.tie(NULL);
#define N
int n,k;
int main(){
FIO;
cin >> n >> k;
vector<int> ans(32,0);
int bits = __builtin_popcount(n);
for(int i = 0 ; i < 31 ; i++){
if((n>>i)&1) ans[i] = 1;
}
int pos = 31;
while(bits < k && pos > 0){
while(bits < k && ans[pos] > 0){
ans[pos]--;
ans[pos-1] += 2;
bits++;
}
pos--;
}
if(bits==k){
cout << "YES" << endl;
for(int i = 0 ; i < 32 ; i++){
for(int j = 0 ; j < ans[i] ; j++){
cout << (1<<i) << " ";
}
}
cout << endl;
}else{
cout << "NO" << endl;
}
return 0;
}
|
/* --------------------------------------------------------------------------
Search the parameters array for a given option and return the value
provided by the parse-option callback.
- Parameters -------------------------------------------------------------
INT argc : startup parameters count.
PSZ* argv : startup parameters array.
INT chOpt : character used for the option to be checked.
PFN_PARSE_OPT pFunc : callback procedure used to parse the option.
- Return value -----------------------------------------------------------
BOOL : TRUE/FALSE (success/error).
-------------------------------------------------------------------------- */
static
BOOL parmFwdSearch(INT argc, PSZ* argv, INT chOpt, PFN_PARSE_OPT pFunc) {
for (--argc; argc > 1; --argc)
{
if ( ((argv[argc][0] == '-') || (argv[argc][0] == '/'))
&& ((argv[argc][1] & ~0x20) == chOpt)
)
return pFunc(argv[argc]);
}
return TRUE;
} |
Three men have been arrested after allegedly stealing $300,000 worth of avocados from their employer.
Police arrested Joseph Valenzuela, 38, Carlos Chavez, 28 and Rahim Leblanc, 30, on suspicion of 'grand theft avocado.'
They are accused of stealing the fruit from their employer, Mission Produce, in Ventura County, California, and reselling them for a profit.
Police arrested Joseph Valenzuela, 38, Carlos Chavez, 28 and Rahim Leblanc, 30, (pictured left to right) on suspicion of 'grand theft avocado'
The three men were accused of stealing $300,000 worth of avocados from their employer
In total, the company believes more than $300,000 worth of the fruit were stolen.
'Everybody loves avocados. We take these kinds of thefts seriously,' Ventura County Sgt told the Los Angeles times.
Police have been watching the trio of suspects since May, when Mission Produce's president, Steve Barnard, became suspicious of the thefts.
He was tipped off by customers and surveillance video, according to the Times.
Authorities have not yet determined exactly how many pounds of avocados were stolen, and believe the men resold the fatty fruits to 'unknowing customers'.
Mission Produce (pictured) is one of the largest avocado distributors in the world. Prices for the fatty fruit have skyrocketed in recent months after diminished crops in California and Mexico did not meet the increased worldwide demand
Police believe the illegal sales were going on for several months, and think the customers thought they were paying Mission Produce for the food.
Barnard told the Times sells a box of avocados for $50, and suspects men were selling them for $20 or $30 a box, far below market price.
Mission Produce is one of the largest avocado distributors in the world. Prices for the fatty fruit have skyrocketed in recent months after diminished crops in California and Mexico did not meet the increased worldwide demand. |
package graphs
import (
"bufio"
"errors"
"io"
"strconv"
"strings"
)
// Graph represents an undirected graph.
type Graph struct {
nodes map[uint64]*Node
}
// New returns a Graph instance, populated according to the input string.
// Each input line represents an edge where U and V are Nodes of the graph:
// `U [V]`
// As an example, the following lines represent the graph found at https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/6n-graf.svg/220px-6n-graf.svg.png . Notice the newline at the last line.
// ```
// 1 2
// 1 5
// 2 3
// 2 5
// 3 4
// 4 5
// 4 6
//
// ```
func New(input string) (*Graph, error) {
nodes, err := readNodes(strings.NewReader(input))
if err != nil {
return nil, err
}
return &Graph{nodes: nodes}, nil
}
func readNodes(r io.Reader) (map[uint64]*Node, error) {
scanner := bufio.NewScanner(r)
scanner.Split(bufio.ScanLines)
nodes := make(map[uint64]*Node)
var current *Node
for scanner.Scan() {
ids := strings.Fields(scanner.Text())
id, err := strconv.ParseUint(ids[0], 10, 64)
if err != nil {
return nil, errors.New("non-digit id on node")
}
current = NewNode(id)
nodes[uint64(id)] = current
if len(ids) == 2 {
e, err := strconv.ParseUint(ids[1], 10, 64)
if err != nil {
return nil, errors.New("non-digit id on node")
}
edge := NewNode(e)
current.AddEdge(edge.Id)
nodes[e] = edge
}
}
return nodes, nil
}
// Visit a Node identified by its id. It returns the list of Nodes connected to it and returns an error if the Node does not exist.
func (g *Graph) Visit(id uint64) ([]uint64, error) {
n := g.nodes[id]
if n == nil {
return nil, errors.New("node does not exist")
}
ret := []uint64{}
ret = append(ret, n.Edges...)
return ret, nil
}
// Node returns a Node identified by its id. Returns `nil` if the Node does not exist.
func (g *Graph) Node(id uint64) *Node {
return g.nodes[id]
}
// Len returns the number of Nodes in the Graph.
func (g *Graph) Len() int { return len(g.nodes) }
|
/**
* Ensure can specify {@link OfficeGovernance} for a {@link OfficeSubSection}.
*/
public void testLinkOfficeGovernanceForOfficeSubSection() {
this.replayMockObjects();
OfficeSection section = this.addSection(this.node, "SECTION", null);
OfficeSubSection subSection = section.getOfficeSubSection("SUB_SECTION");
OfficeGovernance governance = this.addGovernance(this.node, "GOVERNANCE", null);
subSection.addGovernance(governance);
OfficeGovernance another = this.addGovernance(this.node, "ANOTHER", null);
subSection.addGovernance(another);
this.verifyMockObjects();
} |
// onMessage is called when the Slack API emits a MessageEvent.
func (s *ClassicAdapter) onMessage(event *slack.MessageEvent, info *adapter.Info) *adapter.ProviderEvent {
switch event.Msg.SubType {
case "":
if event.Channel[0] == 'D' {
return s.onDirectMessage(event, info)
}
return s.onChannelMessage(event, info)
case "message_changed":
return nil
case "message_deleted":
return nil
case "bot_message":
return nil
default:
log.WithField("subtype", event.Msg.SubType).
Warn("Received message subtype")
return nil
}
} |
Inhibition of IL-1 Signaling by Antisense Oligonucleotide-mediated Exon Skipping of IL-1 Receptor Accessory Protein (IL-1RAcP)
The cytokine interleukin 1(IL-1) initiates a wide range of proinflammatory cascades and its inhibition has been shown to decrease inflammation in a variety of diseases. IL-1 receptor accessory protein (IL-1RAcP) is an indispensible part of the IL-1R complex that stabilizes IL-1/IL-1R interaction and plays an important role in the signal transduction of the receptor complex. The soluble form of IL-1RAcP (sIL-1RAcP) contains only the extracellular domain and serves as a natural inhibitor of IL-1 signaling. Therefore, increasing sIL-1RAcP levels might be an attractive therapeutic strategy to inhibit IL-1–driven inflammation. To achieve this we designed specific antisense oligonucleotides (AON), to redirect pre-mRNA IL-1RAcP splicing by skipping of the transmembrane domain encoding exon 9. This would give rise to a novel Δ9IL-1RAcP mRNA encoding a soluble, secreted form of IL-1RAcP, which might have similar activity as natural sIL-1RAcP. AON treatment resulted in exon 9 skipping both in vitro and in vivo. A single dose injection of 10 mg AON/kg body weight induced 90% skipping in mouse liver during at least 5 days. The truncated mRNA encoded for a secreted, soluble Δ9IL-1RAcP protein. IL-1RAcP skipping resulted in a substantial inhibition of IL-1 signaling in vitro. These results indicate that skipping of the transmembrane encoding exon 9 of IL-1RAcP using specific AONs might be a promising therapeutic strategy in a variety of chronic inflammatory diseases.
Introduction
Interleukin 1 (IL-1) plays a central role in the generation of inflammatory responses. After binding of IL-1 to the cell surface receptor IL-1RI, IL-1 receptor accessory protein (IL1-RAcP) facilitates stabilization of the ligand-receptor complex. Furthermore, IL-1RAcP is a crucial co-receptor in this complex that enables recruitment and binding of intracellular proteins such as MyD88 and a series of IL-1R-associated kinases, which finally lead to nuclear factor-κB activation. IL-1 is a very effective cytokine and minute amounts are sufficient to induce a cellular response. Activation of IL-1RI is counterbalanced by a large variety of inhibiting molecules and mechanisms. First, there is the other member of the IL-1 receptor family, IL-1RII which also associates with IL-1RAcP upon binding of IL-1. However, this receptor lacks the intracellular domain present in IL-1RI, and therefore is considered as decoy receptor. 1,2 Both transmembrane and soluble forms of IL-1RII have been found. 3 In addition, IL-1R antagonist (IL-1Ra) is a natural inhibitor of IL-1 signaling which competes with IL-1 for binding to IL-1RI. IL-1Ra binds poorly to IL-1RII and very high amounts of IL-IRa are needed to occupy all IL-1RI. 4 Moreover, the soluble form of IL-1RI binds strongly to IL-1Ra than with IL-1, diminishing the inhibiting effect of IL-1Ra. 5 A soluble isoform of IL-1RAcP (sIL-1RAcP) is involved in a third mechanism of inhibition of IL-1 signaling. sIL-1RAcP, which lacks the transmembrane and intracellular domain present in IL-1RAcP 6,7 and therefore unable to facilitate signal transduction, is mainly produced by the liver as an acute phase protein and circulates systemically. 8 It interacts with the cell surface IL-1RI, IL-1RII, and possibly with soluble IL-1RII in the extracellular space, forming a high affinity IL-1 scavenger. 9 In this way, sIL-1RAcP provides at least three mechanisms to entrap secreted IL-1. 2,10,11 It has been shown that sIL-1RAcP selectively reduces IL-1 activity on cells such as B lymphocytes and chondrocytes, which express more surface type II decoy receptors. 2 Low levels of type II receptors on T lymphocytes prevent suppression of the IL-1 responses of these cells in vivo and in vitro by sIL-1RAcP. Since IL-1Ra preferentially binds to the type I receptor, which is present on all nucleated cells, it inhibits IL-1 responses of both B and T lymphocytes. Therefore, increasing sIL-1RAcP levels might be the preferred approach over administration of IL-Ra for long-term treatment of a disease in which IL-1-mediated activation of B cells plays an important role, without affected T lymphocyte function.
Its specific inhibitory role makes sIL-1RAcP an attractive therapeutic target. It has been shown that increased production of sIL-1RAcP encoded by an adenoviral vector ameliorates collagen-induced arthritis in mice. 12 Alternatively, a novel form of sIL-1RAcP might be produced by modulating IL-1RAcP splicing using antisense oligonucleotide (AON)mediated exon skipping. AONs are chemically modified, short nucleic acid sequences, which can modulate pre-mRNA splicing when they bind to the specific regions of the target transcript. 13 Some of the chemical modifications protect AONs from endo and exonucleases and some others increase bioavailability by preventing renal clearance (reviewed in ref. 14). The effectiveness of AON-mediated exon skipping has been successfully confirmed on wide range of target genes in various in vitro and in vivo studies, among which restoring the reading frame in Duchenne muscular dystrophy patients to get partially functional dystrophin, changing levels of alternatively splice products of Bcl-x to change the balance from antito pro-apoptotic Bcl-x and producing a novel splice variant in tumor necrosis factor receptor-II to switch its transmembrane form to a novel soluble form by deleting the transmembrane domain-encoding exon (reviewed in ref. 15).
In this study, we employed AONs to mediate skipping of exon 9 to induce the production of a novel form of sIL-1RAcP. We designed AONs consisting of 2′-O-methyl phosphorothioate RNA (2′-O-MePS) or a mix of locked nucleic acid (LNA) and 2′-O-MePS, targeting transmembrane encoding exon 9 IL-1RAcP pre-mRNA. Both in vitro and in vivo treatment of IL-1RAcP-expressing cells with these AONs resulted in a decrease of full-length (FL) IL-1RAcP mRNA up to 90%, which was replaced by a novel shorter transcript lacking exon 9. In the absence of exon 9 the IL-1RAcP mRNA encoded a soluble IL-1RAcP, Δ9IL-1RAcP (Figure 1). Effective skipping of exon 9 resulted in a strong decrease of cellular IL-1 responses of mouse and human cell lines.
Results
AONs targeting IL-1RAcP exon 9 induce highly effective exon skipping in vitro Series of different 2′-O-MePS AONs targeting mouse and human IL-1RAcP exon 9 and the flanking introns were designed (Table 1) based on previously described guidelines. 16 We evaluated the efficacy of 2′-O-MePS AONs in mouse NIH-3T3 and human HEPG2 cells (Figure 2b,f). The transfection efficiency was tested using 5′-fluorescein (FAM)-labeled control AON. Generally, 70-80% of the cells showed specific nuclear uptake of AON at a concentration of 500 nmol/l (data not shown). Therefore the first series of in vitro tests were performed with an AON concentration of 500 nmol/l. After 24 hours total RNA was isolated and reverse transcription-PCR (RT-PCR) was performed by using primers specific for exons 8 and 10. Almost all AONs specific for mouse IL-1RAcP induced shorter transcript fragments with the size corresponding to the specific skipping of target exon 9 (ENSMUSE00000644552) (Figure 2b). For human IL-1RAcP, only one AON (PS372) was distinctively effective in inducing the skipping of exon 9 (ENSE00002509358) (Figure 2f). Sequence analysis of the shorter PCR products both for mouse and human confirmed the exclusion of exon 9. In addition, a more extensive PCR analysis was performed by using primers specific for exons 5 and 11 showing that the AONs used are specific to exon 9 and do not affect other parts of the IL-1RAcP transcript confirming the prediction from the blast sequence analysis (Supplementary Figure S1). Each AON was tested at least three times to select the ones that give reproducible results. The most potent mouse IL-1RAcP AONs, PS300 and PS327, were selected for further analyses. PS357 although seems very efficient in skipping, does not give reproducible results so was not selected for further analysis. Different concentrations of AONs PS300 and PS327 were transfected into NIH-3T3 cells and quantitative PCR (qPCR) analysis was performed with the primers targeting exon 9. The maximum skipping efficiency we achieved was 50% with 100 nmol/l of PS300 and 200 nmol/l of PS327 (data not shown). To increase the skipping efficiency of these AONs, their sequences were extended to 25-mer which increases melting temperatures (Tm's). (PS300E and PS327E). However, extensive analysis at different concentrations revealed that the extension did not significantly affect the skipping efficiency (Figure 2d). Therefore, in an alternative approach to enhance efficiency of PS300, we designed a chimeric 2′-O-Me/LNA-PS which contains five LNA nucleotides (PS300L). The ability of this AON to induce skipping was tested in different concentrations (20-500 nmol/l) by qPCR using the primers targeting exon 9, which shows the amount of FL non-skipped IL-1RAcP (Figure 2d). The best skipping was observed with PS300L at a concentration of 50 nmol/l and the analysis of skipping efficiency using qPCR revealed that almost 85-90% skipping could be achieved with this AON (Figure 2d). For PS300L, no direct correlation between the AON concentration and skipping efficiency was observed. This is not surprising because at higher concentrations, especially LNA AONs can hybridize very tightly to other LNA residues so less AON would be available to bind to target RNA for skipping. Moreover, AONs can also become toxic to the cell at higher concentrations. To increase the skipping efficiency of human IL-1RAcP exon 9 also a chimeric 2′-O-Me/LNA-PS version of PS372 was generated (PS372L) and tested in different concentrations. However, this resulted in a more modest increase in skipping efficiency of 5-10% (data not shown).
IL-1RAcP mRNA without exon 9 is translated into secreted sIL-1RAcP
Although IL-1RAcP mRNA could be detected by RT-PCR analysis, it could not be detected on protein level with western blot. Albeit, it cannot be excluded that there is little correlation between IL-1RAcP mRNA and protein levels in the cells used the most likely explanation for this negative result is the much lower sensitivity of the western blot analysis compared with PCR analysis. To prove that removal of exon 9 resulted in a functional mRNA encoding a novel sIL-1RAcP, we transfected HEK293T cells with expression vector pcDNA 3.1B containing FL or truncated (Δ9) IL-1RAcP cDNA to overexpress these proteins. After 48 hours of transfection, cell lysates and culture media were collected for sodium dodecyl sulfate-polyacrylamide gel electrophoresis and western blot. The complete IL-1RAcP protein could be detected from lysates of HEK293T cells transfected with FL IL-1RAcP cDNA but not in the culture medium of these cells (Figure 3). In contrast, a slightly smaller protein could be detected not only in the lysate of cells transfected with Δ9IL-1RAcP cDNA but also in the culture medium of these cells showing that IL1-RAcP without the exon 9-encoded transmembrane region was secreted.
Treatment with IL-1RAcP-specific AON decreased the expression of IL-1 responsive genes in vitro
The direct biological effect of AON-mediated exon skipping of IL-1RAcP was determined by measuring mRNA expression levels of the IL-1-responsive genes IL-6 or intercellular adhesion molecule-1 (ICAM-1) in the mouse cell line NIH-3T3 and the human cell line HEPG2, respectively using qPCR. The adhesion molecule ICAM-1 and the cytokine IL-6 are normally expressed at low levels in resting cells but their expression increases upon response to IL-1. Effective exon skipping induced by 300L in NIH-3T3 cells (Figure 4a, lower panel) resulted in reduced IL-1β-dependent upregulation of IL-6 compared with non-transfected NIH-3T3 cells, whereas no difference in IL-6 mRNA expression was seen between transfected and non-transfected cells after tumor necrosis factor-α stimulation (Figure 4a). Comparable results were found with AON PS372L-mediated skipping of exon 9 of human IL1-RAcP in HEPG2 cells (Figure 4b). Upon treatment with IL-1 cells transfected with the AON PS372L showed a decreased mRNA expression of the IL-1-responsive ICAM-1 expression compared with untransfected cells.
PS300L effectively induced IL-1RAcP exon 9 skipping in mouse liver
To determine whether the effective skipping observed in vitro could be confirmed in vivo, exon skipping was analyzed in liver from mice injected intravenously with the most effective AONs. Administration (intravenously in tail vein, 100 mg/kg of mouse, for 4 consecutive days) of PS300 resulted in skipping efficiency <50% in liver, as determined 1 day after the last AON injection, with no detectable skipping in spleen and kidney (data not shown). Moreover, no skipped product was detected in either saline or control AON-treated mice.
Since the efficacy of in vivo skipping needs to be increased to expect a biological effect, the AONs were complexed with Invivofectamine, lipid-based nanoparticles that allows highly efficient delivery of synthetic oligonucleotides used in RNA
interference to the mouse liver i.e., hepatocytes, the cell type within the liver IL-1RAcP is mainly expressed. Mice were injected intravenously in the tail vein on day 0, once, with the maximum dose of 10 mg/kg of AON PS300. On day 1 mice were killed and livers were harvested for RNA isolation. By RT-PCR, presence of skipped product could be detected in two out of three mice administered with Invivofectamine-PS300 (Supplementary Figure S2), confirmed by sequence analysis (Supplementary Figure S2). The skipped band was not detected in the liver samples of mice injected with noncomplexed PS300 (n = 3) which confirms that without Invivofectamine a single dose of 10 mg/kg is too low to induce detectable skipping. No skipped product was detected in the liver samples of mice injected with control non-target-specific oligonucleotide Invivofectamine (n = 2) which eliminates the effect of Invivofectamine in formation of the shorter product. Based on these findings, PS300 and PS300L, both complexed to Invivofectamine, were injected 10 mg/kg intravenously (n = 4/group) on day 0 in tail vein. On day 2, partial hepatectomy was performed to isolate RNA from the liver. RT-PCR analysis showed that both PS300 and PS300L were able to induce the production of skipped product (Figure 5) with PS300L skipping efficiency was 90%. The skipping persisted for at least 5 days as demonstrated by the analysis of liver RNA from mice killed 5 days after the administration of the AONs. In both timepoints, the skipping efficiency of PS300L was larger than that of PS300. Slight variations of skipping efficiencies were observed between individual mice in the same group.
Discussion
Strategies to manipulate splicing can be used to correct aberrant splicing caused by mutations, to inhibit protein expression by generating out-of-frame transcripts and to alter the function of a protein by skipping or including exons. 17 Here, we show a convincing example of the third concept by skipping the transmembrane domain encoding exon 9 of IL1-RAcP, resulting in not only the decrease of the expression of membrane bound IL-1RAcP mRNA but also increase in Δ9IL-1RAcP mRNA which is supposed to express a novel soluble inhibiting protein. The inhibiting effect was demonstrated by the decrease in expression of the IL-1-responsive cytokine IL-6 and chemokine ICAM-1.
sIL-1RAcP downregulates IL-1 signaling in two different mechanisms; by competing with membrane bound IL-1RAcP for association with IL-1RI and by forming high affinity IL-1 scavenger with sIL-1RII in the extracellular space. 7,9 In our in vitro experiments, the inhibitory effect on IL-1 signaling was only determined for the first mechanism, decrease of membrane bound IL-1RAcP, because the second mechanism, the formation of the soluble scavenger, requires soluble IL-1RII that we think is not present in the culture media. Therefore, on the basis of the in vitro results, we most likely underestimate the inhibiting effect of Δ9IL-1RAcP in vivo, where sIL-1RII is present to form the scavenger for an additional systemic inhibitory effect.
Most of the AONs targeting mouse IL-1RAcP exon 9 induced quite efficient skipping. Each AON was tested at least three times in different experiments to select the ones that gave best skipping efficiency reproducibly. Although some AONs cover overlapping regions (e.g., PS327 and PS361, PS356 and PS300, PS325 and PS355) on the target pre-mRNA, there might be slight differences in terms of targeting different splice enhancer sites, which makes them more or less effective. The length of the AON also affects the binding properties; increasing the length causes increase in Tm but it may also change secondary structure that would increase or decrease AON's skipping efficiency. Moreover, presence of CCC and GGG repeats and G/C contents of targeted region change the effect.
The human and mouse IL-1RAcP exon 9 sequences are around 20% different. Therefore, they have different secondary structures which makes some target sites less or more accessible for the AONs. For human IL-1RAcP exon 9, we have shown proof-of-concept of the exon skipping approach.
The efficacy of the only tested chimeric AON PS372L specific for human IL-1RAcP was much lower compared with the efficacy of the mouse-specific AON PS300L. However, it is still possible to design more chimeric AONs with varying the position and the number of LNAs to achieve better skipping and biological effect in the human system.
We have designed more AONs for mouse IL-1RAcP exon 9, covering most of the possible target regions. Therefore, it was more likely to find AONs with better skipping efficacy for mouse compared with human. The first selection was followed by further optimization to maximize the outcome both in vitro and in vivo. We added LNA bases to the most promising mouse 2′-O-MePS AON (PS300), making a chimeric (PS300L), to improve its efficiency, as LNA bases display a remarkably increased thermodynamic stability and enhanced nucleic acid recognition. 18 This resulted in an increase in efficiency up to 90%. PS300L contains five LNA bases, mainly placed on G and Cs in order to provide higher increase in Tm (>15 °C increase in Tm compared with PS300). Although it was already partially prevented by 2′-O-Me modification, an unmethylated C of an internal CpG was LNA modified to prevent its recognition as nonself causing immunostimulation. 19 The main challenge with the in vivo experiments is the delivery of the AON to the target organ or cell type. Previous studies have shown that after systemic administration, AONs mainly accumulate in the liver and are taken up by both hepatocytes and Kupffer cells. In order to direct the cellular uptake more in favor of hepatocytes, we used a lipid-based delivery method 20 and complexed the AON to Invivofectamine. The increased uptake of AON by hepatocyes resulted in dramatic increase in IL-1RAcP exon 9 skipping up to 90% even with low dose. However, not only liver cells express IL-1RAcP. IL-1RAcP mRNAs were observed to vary in a tissue or cell type-specific manner, making certain organs more responsive and susceptible to IL-1-induced inflammation. 21 Therapeutic control of IL-1 responsiveness might be improved by targeting effector cells, especially macrophages, directly, providing both a reduction of membrane bound IL-1RAcP on these cells and an increase of Δ9IL-1RAcP that forms high affinity IL-1 scavenger. Nevertheless, targeting of AONs to immune cells is not very effective. One approach to achieve transit across the cell membrane is conjugation of AONs to arginine-rich or cell-specific peptides. A variety of different arginine-rich peptides have been used for the delivery of AONs to T-cells and dendritic cells. 17 New delivery methodologies will boost the development of new therapeutic interventions in the immune system based on AON-mediated exon skipping.
In conclusion, we have shown that AONs specific for exon 9 can modify very effectively the pre-mRNA splicing of IL1-RAcP in vitro and in vivo, in mouse liver. In vitro we demonstrated that this resulted in decrease in IL-1β-mediated signaling. Thus, AONs have the capacity to induce a novel splice variant with therapeutic potential and this might be an attractive therapeutic approach to cope with IL-1-induced inflammatory conditions. The development of specific carrier molecules that direct the efficient uptake of the AONs to certain cell types, e.g., immune cells would considerably enhance the applicability and will improve the efficacy of exon skipping-based therapies in the near future.
Materials and methods
Design of AON. Based on the criteria published in Aartsma-Rus et.al. 16 a series of AONs were designed targeting exoninternal sequences or exon-intron junctions ( Table 1). AONs with phosphorothioate backbones and 2′-O-methyl ribose modifications (2′-O-MePS) were synthesized by Prosensa (Leiden, Netherlands) and AONs with 2′-O-MePS with additional LNA modifications were synthesized by Eurogentec (Seraing, Belgium). Transfection efficiency was assessed using a control AON with 5′-fluorescein group (6-FAM). All AONs were high-pressure liquid chromatography purified.
Cell culture and AON transfection. NIH-3T3 (mouse embryonic fibroblast cell line), HEPG2 (human hepatocellular liver carcinoma cell line), and HEK293T (human embryonic kidney) cells were cultured in Dulbecco's modified Eagle's medium + 10% fetal bovine serum + penicillin/streptomycin at 37 °C with 5% CO 2 and passaged when confluent using 0.25% trypsin diluted with phosphate-buffered saline. Cells were plated in 6-well plates (1 × 10 6 cells per well) and transfected with 10-500 nmol/l AON in 2 ml Dulbecco's modified Eagle's medium supplemented with 10% fetal bovine serum and Lipofectamine 2000 (Invitrogen, Carlsbad, CA) according to the manufacturer's instruction. The nuclear localization and transfection efficiency of the 6-FAM-labeled AON was assessed using a fluorescent microscope starting from 6-8 hours after transfection. Medium was changed 6-8 hours after transfection and the cells were cultured further to confluency for 24 or 48 hours for RNA or protein isolation, respectively.
RNA isolation, RT-PCR, and qPCR. Total RNA was isolated by using Trizol (Invitrogen) reagent according to the manufacturer's protocol from minimally 1 × 10 6 cells or 10 mg of tissue. For isolation of RNA from mouse liver samples, 20-30 mg of tissue were homogenized in Magna Lyser Green Beads (Roche Applied Science, Nijmegen, Netherlands) containing 500 μl phosphate-buffered saline with 5 μl 2-mercaptoehtanol for 20 seconds at 7,000 rpm, followed by another 10 seconds at 7,000 rpm in the Magna Lyser (Roche Applied Science). Homogenized tissue of 250 μl was added to 750 μl Trizol and RNA was isolated according to the manufacturer's protocol. About 1 μg of total RNA was used for first strand cDNA synthesis with random hexamer primers (Roche Applied Science). For the analysis of IL-1RAcP exon skipping, 1 μl of 20 μl cDNA was then amplified using the following primer sets, mouse IL-1RAcP forward (exon 8) primer GAGGATCTCAGGCGCAACTA, reverse (exon 10) primer TCAGCAGCACAAATTCCTCTT and forward (exon 5) primer CGTTTCATCTCACCAGGACTC, reverse (exon 11) primer GTTGGGGCTTAGAACAACCA; human IL-1RAcP forward (exon 8) primer CAAGCGCAGCTATGTCTGTC, reverse (exon 10) primer TCTCGGTCAAAGATGCACAG and forward (exon 5) primer CGTTTCATCTCACCAGGACTC, reverse (exon 11) primer GTTGGGGCTTAGAACAACCA and the following PCR conditions: 25 cycles at 94 °C, 30 seconds; 60 °C, 30 seconds; 72 °C, 1 minute (30 cycles for in vivo samples). PCR products were analyzed on 1.5% agarose gel stained with ethidium bromide To confirm proper exon skipping, PCR products were purified from gel with NucleoSpin Extract II Kit (Macherey-Nagel, Düren, Germany) following the manufacturer's instructions and analyzed by Sanger sequencing. PCR products were also run on a DNA1000 LabChip on a 2100 Bioanalyzer (Agilent Technologies, Santa Clara, CA) which allows semi-quantitative assessment of exon skipping levels. qPCR reactions containing FastStart Universal SYBR Green Master mix (Roche Applied Science) and 10 pmol of each qPCR primer and 5 μl of 10 times diluted cDNA in a 20 μl total volume for each sample were performed on the Roche Light-Cycler 48. Data were normalized to values of β-actin gene. The primer sets used in qPCR reactions were: mouse IL-1RAcP forward primer: AGAACTCGCCTGTGGTTTTG and reverse primer: TTCCAAAGTGAGCTCGGTAAA, mouse β-actin forward primer: TGCGTGACATCAAAGAGAAG and reverse primer: GATGCCACAGGATTCCATA. For qPCR analysis of IL-1-induced IL-6 and ICAM-1 mRNA expression, the following primers were used: Mouse IL-6 forward primer: AGT-TGCCTTCTTGGGACTGA, reverse primer: GTCTCCTCT CCGGACTTGTG; human ICAM-1 forward primer: CATAGAGA CCCCGTTGCCTAAA, reverse primer: TGGCTATCTTCTT GCACATTGC; human β-actin forward primer: AATGTCGC GGAGGACTTTGATTGC, reverse primer: AGGATGGCAA GGGACTTCCTGTAA.
In vitro human IL-1RAcP expression system. Human FL IL-RAcP and IL-1RAcP without exon 9 (Δ9IL-1RAcP) cDNA were synthesized according to the method described by Ko et al. 22 cDNA was made with total random hexamers using RNA isolated from the human liver cell line HEPG2. From this cDNA FL IL-1RAcP cDNA was cloned into the pcDNA3.1B (−) expression vector using primers with restriction endonuclease sites. For the exon 9 deletion construct, exons 1 to 8 and exons 10 and 11 fragments were generated by PCR using primers with restriction enzyme sites, which allowed cloning into pcDNA3.1B (−). The restriction enzyme used to fuse exon 8 to exon 10 is type IIs restriction enzyme. Type IIs restriction enzymes cut outside their recognition site, the actual cut is sequence independent. The resulting sticky ends allow a seamless joining of the coding sequences of exon 8 and exon 10.
Analysis of IL-1RAcP protein. HEK293T cells (1 × 10 6 per well of a 6-well plate) were transfected with 8 μg plasmids using Lipofectamine 2000. Whole cell extracts were prepared after 48 hours after transfection by lysing the cells with RIPA buffer (Therma Scientific, Waltham, MA). Cells were incubated on ice for 15 minutes with gentle shaking and then disrupted by multiple passages through a syringe with a 19-G needle. Cell debris was removed by centrifugation at 4 °C at 12,000g for 10 minutes. The protein concentration was determined by the Quant-it Protein assay kit (Invitrogen). In addition, cell culture supernatant was collected for protein analysis.
For western blot 15 μl of each sample was mixed with 5 μl loading buffer, boiled for 5 minutes and loaded and run first at 70 V for 30 minutes then at 100 V on a 10% sodium dodecyl sulfate-polyacrylamide gel electrophoresis followed by transfer onto a nitrocellulose membrane. The membrane was blocked in Odyssey Blocking Buffer (Li-cor, Lincoln, NE) for 1 hour at room temperature and subsequently incubated overnight at 4 °C with a 1:1,000 dilution of goat anti-human IL-1RAcP antibody (R&D Systems, Minneapolis, MN). After five washes in 0.1% Tween 20 in phosphate-buffered saline, membranes were incubated for 1 hour at room temperature with the fluorescently labeled donkey anti-goat secondary antibody (Li-cor) diluted 1: 5,000 in Li-cor Odyssey blocking buffer and scanned in Odyssey Imaging System (Li-cor).
IL-1-induced cytokine production assay. 1 × 10 6 NIH-3T3 and HEPG2 cells were seeded in each well of a 6-well plate in 2 ml Dulbecco's modified Eagle's medium supplemented with 10% fetal bovine serum on day 0. On day 1, cells were transfected with PS300L (50 nmol/l) and PS372L (100 nmol/l), respectively. On day 2, the medium was refreshed and transfection was repeated only for HEPG2 with PS372L. On day 3 NIH-3T3 and on day 4 HEPG2 cells were stimulated with 10 ng/ml mouse IL-1β (Miltenyi Biotec, Bergisch Gladbach, Germany) and 50 ng/ml TNF-α (Miltenyi Biotec) for 5 hours. After IL-1 stimulation expression of IL-6 and ICAM-1, from mouse and human cell line, respectively was determined by qPCR.
IL-1RAcP skipping in mouse liver. AON PS300, PS 300L, and control small-interfering RNA were complexed with Invivofectamine 2.0 Reagent (Invitrogen, Bleiswijk, Netherlands) according to the manufacturer's protocol with the amount of AON being 2 mg/ml of Invivofectamine 2.0 Reagent. Subsequently, 6 weeks old female C57BL/6J mice were intravenously injected via the tail vein with 200 μl complexed AONs at a dose of ~10 mg AON per kg body weight. At 2 days after AON injection, all mice were subjected to liver biopsy as described previously 23 and they were killed on day 5. Figure S1. RT-PCR analysis by using primers targeting exon 5 and 11. Figure S2. RT-PCR analysis of liver samples of mice treated with Invivofectamine-complexed PS300. |
/**
* This class tests methods in the PersonService class. TODO: Test all methods in the PersonService
* class.
*/
public class PersonServiceTest extends BaseContextSensitiveTest {
protected static final String CREATE_PATIENT_XML = "org/openmrs/api/include/PatientServiceTest-createPatient.xml";
protected static final String CREATE_RELATIONSHIP_XML = "org/openmrs/api/include/PersonServiceTest-createRelationship.xml";
protected static final String CREATE_PERSON_PROPERTY_XML = "org/openmrs/api/include/PersonServiceTest-PersonAttributeType.xml";
private static final Integer RETIRED_PERSON_ATTRIBUTE_TYPE = 1;
private static final Integer UNRETIRED_PERSON_ATTRIBUTE_TYPE = 2;
protected static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
protected PatientService ps = null;
protected AdministrationService adminService = null;
protected PersonService personService = null;
@Before
public void onSetUpInTransaction() {
if (ps == null) {
ps = Context.getPatientService();
adminService = Context.getAdministrationService();
personService = Context.getPersonService();
}
}
/**
* Tests a voided relationship between personA and Person B to see if it is still listed when
* retrieving unvoided relationships for personA and if it is still listed when retrieving
* unvoided relationships for personB.
*
* @see PersonService#getRelationshipsByPerson(Person)
*/
@Test
public void getRelationshipsByPerson_shouldOnlyGetUnvoidedRelationships() {
executeDataSet(CREATE_PATIENT_XML);
executeDataSet(CREATE_RELATIONSHIP_XML);
Patient p1 = ps.getPatient(6);
Patient p2 = ps.getPatient(8);
// Create a sibling relationship between o1 and p2
Relationship sibling = new Relationship();
sibling.setPersonA(p1);
sibling.setPersonB(p2);
sibling.setRelationshipType(personService.getRelationshipType(4));
personService.saveRelationship(sibling);
// Make p2 the Doctor of p1.
Relationship doctor = new Relationship();
doctor.setPersonB(p1);
doctor.setPersonA(p2);
doctor.setRelationshipType(personService.getRelationshipType(3));
personService.saveRelationship(doctor);
// Void all relationships.
List<Relationship> allRels = personService.getAllRelationships();
for (Relationship r : allRels) {
personService.voidRelationship(r, "Because of a JUnit test.");
}
List<Relationship> updatedARels = personService.getRelationshipsByPerson(p1);
List<Relationship> updatedBRels = personService.getRelationshipsByPerson(p2);
// Neither p1 or p2 should have any relationships now.
assertEquals(0, updatedARels.size());
assertEquals(updatedARels, updatedBRels);
}
/**
* Tests a voided relationship between personA and Person B to see if it is still listed when
* retrieving unvoided relationships for personA and if it is still listed when retrieving
* unvoided relationships for personB.
*
* @see PersonService#getRelationshipsByPerson(Person,Date)
*/
@Test
public void getRelationshipsByPerson_shouldOnlyGetUnvoidedRelationshipsRegardlessOfEffectiveDate() throws Exception {
executeDataSet(CREATE_PATIENT_XML);
executeDataSet(CREATE_RELATIONSHIP_XML);
Patient p1 = ps.getPatient(6);
Patient p2 = ps.getPatient(8);
// Create a sibling relationship between o1 and p2
Relationship sibling = new Relationship();
sibling.setPersonA(p1);
sibling.setPersonB(p2);
sibling.setRelationshipType(personService.getRelationshipType(4));
personService.saveRelationship(sibling);
// Make p2 the Doctor of p1.
Relationship doctor = new Relationship();
doctor.setPersonB(p1);
doctor.setPersonA(p2);
doctor.setRelationshipType(personService.getRelationshipType(3));
personService.saveRelationship(doctor);
// Void all relationships.
List<Relationship> allRels = personService.getAllRelationships();
for (Relationship r : allRels) {
personService.voidRelationship(r, "Because of a JUnit test.");
}
// Get unvoided relationships after voiding all of them.
// (specified date should not matter as no relationships have date specified)
List<Relationship> updatedARels = personService.getRelationshipsByPerson(p1, new Date());
List<Relationship> updatedBRels = personService.getRelationshipsByPerson(p2, new Date());
// Neither p1 or p2 should have any relationships now.
assertEquals(0, updatedARels.size());
assertEquals(updatedARels, updatedBRels);
}
/*
* Helper to create patient that does not have any existing relationships. Returns created Patient.
*/
private Patient createTestPatient() {
Patient patient = new Patient();
PersonName pName = new PersonName();
pName.setGivenName("Tom");
pName.setMiddleName("E.");
pName.setFamilyName("Patient");
patient.addName(pName);
PersonAddress pAddress = new PersonAddress();
pAddress.setAddress1("123 My street");
pAddress.setAddress2("Apt 402");
pAddress.setCityVillage("Anywhere city");
pAddress.setCountry("Some Country");
Set<PersonAddress> pAddressList = patient.getAddresses();
pAddressList.add(pAddress);
patient.setAddresses(pAddressList);
patient.addAddress(pAddress);
patient.setBirthdate(new Date());
patient.setBirthdateEstimated(true);
patient.setDeathDate(new Date());
patient.setCauseOfDeath(new Concept(1));
patient.setGender("male");
List<PatientIdentifierType> patientIdTypes = ps.getAllPatientIdentifierTypes();
assertNotNull(patientIdTypes);
PatientIdentifier patientIdentifier = new PatientIdentifier();
patientIdentifier.setIdentifier("123-0");
patientIdentifier.setIdentifierType(patientIdTypes.get(0));
patientIdentifier.setLocation(new Location(1));
patientIdentifier.setPreferred(true);
Set<PatientIdentifier> patientIdentifiers = new TreeSet<>();
patientIdentifiers.add(patientIdentifier);
patient.setIdentifiers(patientIdentifiers);
ps.savePatient(patient);
return patient;
}
/*
* Helper to create relationships with start and/or endDate. Returns a List of the relationships created.
*/
private List<Relationship> createTestDatedRelationships(Person personA, Person personB, RelationshipType rt)
throws Exception {
List<Relationship> rels = new ArrayList<>();
// Start & end dates
Relationship r = new Relationship(); // 0
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setStartDate(df.parse("1980-01-01"));
r.setEndDate(df.parse("2010-01-01"));
personService.saveRelationship(r);
rels.add(r);
r = new Relationship(); // 1
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setStartDate(df.parse("1990-01-01"));
r.setEndDate(df.parse("2010-01-01"));
personService.saveRelationship(r);
rels.add(r);
r = new Relationship(); // 2
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setStartDate(df.parse("1980-01-01"));
r.setEndDate(df.parse("1990-01-01"));
personService.saveRelationship(r);
rels.add(r);
// Only start dates
r = new Relationship(); // 3
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setStartDate(df.parse("1980-01-01"));
personService.saveRelationship(r);
rels.add(r);
r = new Relationship(); // 4
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setStartDate(df.parse("1990-01-01"));
personService.saveRelationship(r);
rels.add(r);
r = new Relationship(); // 5
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setStartDate(df.parse("2010-01-01"));
personService.saveRelationship(r);
rels.add(r);
// Only end dates
r = new Relationship(); // 6
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setEndDate(df.parse("1980-01-01"));
personService.saveRelationship(r);
rels.add(r);
r = new Relationship(); // 7
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setEndDate(df.parse("1990-01-01"));
personService.saveRelationship(r);
rels.add(r);
r = new Relationship(); // 8
r.setPersonA(personA);
r.setPersonB(personB);
r.setRelationshipType(rt);
r.setEndDate(df.parse("2010-01-01"));
personService.saveRelationship(r);
rels.add(r);
return rels;
}
/**
* Creates several relationships. Tests that a relationship is returned only when the effective
* date is as follows: - for relationships with both a start date and an end date, the effective
* date falls between the start and end dates; - for relationships with only a start date, the
* effective date falls after the start date; - for relationships with only an end date, the
* effective date falls before the end date; - relationship with neither a start nor end date
* are always returned.
*
* @see PersonService#getRelationshipsByPerson(Person,Date)
*/
@Test
public void getRelationshipsByPerson_shouldFetchRelationshipsThatWereActiveDuringEffectiveDate() throws Exception {
executeDataSet(CREATE_PATIENT_XML);
executeDataSet(CREATE_RELATIONSHIP_XML);
// TODO use xml imported in BaseContextSensitiveTest#baseSetupWithStandardDataAndAuthentication()
Patient patient = createTestPatient();
List<Relationship> rels = createTestDatedRelationships(ps.getPatient(2), patient, personService
.getRelationshipType(4));
// Get relationships effective 1988-01-01
List<Relationship> res = personService.getRelationshipsByPerson(patient, df.parse("1988-01-01"));
// Verify # of results and which results we have received
assertEquals(5, res.size());
for (Relationship rr : res) {
if (!rr.equals(rels.get(0)) && !rr.equals(rels.get(2)) && !rr.equals(rels.get(3)) && !rr.equals(rels.get(7))
&& !rr.equals(rels.get(8))) {
if (rr.equals(rels.get(1))) {
fail("unexpected relationship 1 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else if (rr.equals(rels.get(4))) {
fail("unexpected relationship 4 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else if (rr.equals(rels.get(5))) {
fail("unexpected relationship 5 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else if (rr.equals(rels.get(6))) {
fail("unexpected relationship 6 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else {
fail("unrecognized unexpected relationship in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
}
}
}
}
/**
* This test should get the first/last name out of a string into a PersonName object.
*
* @see PersonService#parsePersonName(String)
*/
@Test
public void parsePersonName_shouldParseTwoPersonNameWithComma() throws Exception {
PersonName pname = Context.getPersonService().parsePersonName("Doe, John");
assertEquals("Doe", pname.getFamilyName());
assertEquals("John", pname.getGivenName());
// try without a space
pname = Context.getPersonService().parsePersonName("Doe,John");
assertEquals("Doe", pname.getFamilyName());
assertEquals("John", pname.getGivenName());
}
/**
* @see PersonService#parsePersonName(String)
*/
@Test
public void parsePersonName_shouldParseTwoPersonNameWithoutComma() throws Exception {
PersonName pname2 = Context.getPersonService().parsePersonName("John Doe");
assertEquals("Doe", pname2.getFamilyName());
assertEquals("John", pname2.getGivenName());
}
/**
* @see PersonService#savePersonAttributeType(PersonAttributeType)
*/
@Test
public void savePersonAttributeType_shouldSetTheDateCreatedAndCreatorOnNew() throws Exception {
PersonService service = Context.getPersonService();
PersonAttributeType pat = new PersonAttributeType();
pat.setName("attr type name");
pat.setDescription("attr type desc");
pat.setFormat("java.lang.String");
service.savePersonAttributeType(pat);
assertEquals(1, pat.getCreator().getId().intValue());
assertNotNull(pat.getDateCreated());
}
/**
* @see PersonService#savePersonAttributeType(PersonAttributeType)
*/
@Test
public void savePersonAttributeType_shouldSetTheDateChangedAndChangedByOnUpdate() throws Exception {
PersonService service = Context.getPersonService();
// get the type and change something about it
PersonAttributeType pat = service.getPersonAttributeType(2);
pat.setName("attr type name");
// save the type again
service.savePersonAttributeType(pat);
assertEquals(1, pat.getChangedBy().getId().intValue());
assertNotNull(pat.getDateChanged());
}
/**
* @see PersonService#savePersonAttributeType(PersonAttributeType)
*/
@Test
public void savePersonAttributeType_shouldUpdateAnyGlobalPropertyWhichReferenceThisType() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-updatePersonAttributeType.xml");
PersonService service = Context.getPersonService();
AdministrationService as = Context.getAdministrationService();
// get the type and change its name
PersonAttributeType pat = service.getPersonAttributeType(1);
assertEquals("Race", pat.getName());
String patientHeader = as.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_HEADER_ATTRIBUTES);
assertEquals("Race,Birthpalce", patientHeader);
String patientListing = as.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_LISTING_ATTRIBUTES);
assertEquals("Race,Birthpalce", patientListing);
String patientViewing = as.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_VIEWING_ATTRIBUTES);
assertEquals("Birthpalce", patientViewing);
pat.setName("Race Updated");
pat = service.savePersonAttributeType(pat);
assertEquals("Race Updated", pat.getName());
patientHeader = as.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_HEADER_ATTRIBUTES);
assertEquals("Race Updated,Birthpalce", patientHeader);
patientListing = as.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_LISTING_ATTRIBUTES);
assertEquals("Race Updated,Birthpalce", patientListing);
patientViewing = as.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_VIEWING_ATTRIBUTES);
assertEquals("Birthpalce", patientViewing);
}
/**
* @see PersonService#getSimilarPeople(String,Integer,String)
*/
@Test
public void getSimilarPeople_shouldAcceptGreaterThanThreeNames() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-names.xml");
Set<Person> matches = Context.getPersonService().getSimilarPeople("Darius Graham Jazayeri Junior", 1979, "M");
Assert.assertEquals(2, matches.size());
assertTrue(containsId(matches, 1006));
assertTrue(containsId(matches, 1007));
}
/**
* @see PersonService#getSimilarPeople(String,Integer,String)
*/
@Test
public void getSimilarPeople_shouldMatchSingleSearchToAnyNamePart() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-names.xml");
Set<Person> matches = Context.getPersonService().getSimilarPeople("Darius", 1979, "M");
Assert.assertEquals(9, matches.size());
assertTrue(containsId(matches, 1000));
assertTrue(containsId(matches, 1001));
assertTrue(containsId(matches, 1002));
assertTrue(containsId(matches, 1003));
assertTrue(containsId(matches, 1004));
assertTrue(containsId(matches, 1005));
assertTrue(containsId(matches, 1006));
assertTrue(containsId(matches, 1007));
assertTrue(containsId(matches, 1008));
}
/**
* @see PersonService#getSimilarPeople(String,Integer,String)
*/
@Test
public void getSimilarPeople_shouldMatchTwoWordSearchToAnyNamePart() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-names.xml");
Set<Person> matches = Context.getPersonService().getSimilarPeople("Darius Graham", 1979, "M");
Assert.assertEquals(6, matches.size());
assertTrue(containsId(matches, 1000));
assertTrue(containsId(matches, 1003));
assertTrue(containsId(matches, 1004));
assertTrue(containsId(matches, 1005));
assertTrue(containsId(matches, 1006));
assertTrue(containsId(matches, 1007));
}
/**
* @see PersonService#getSimilarPeople(String,Integer,String)
*/
@Test
public void getSimilarPeople_shouldMatchThreeWordSearchToAnyNamePart() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-names.xml");
Set<Person> matches = Context.getPersonService().getSimilarPeople("Darius Graham Jazayeri", 1979, "M");
Assert.assertEquals(3, matches.size());
assertTrue(containsId(matches, 1003));
assertTrue(containsId(matches, 1006));
assertTrue(containsId(matches, 1007));
}
/**
* @see PersonService#getPeople(String,Boolean)
*/
@Test
public void getPeople_shouldMatchSearchToFamilyName2() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-extranames.xml");
updateSearchIndex();
List<Person> people = Context.getPersonService().getPeople("Johnson", false);
Assert.assertEquals(3, people.size());
assertTrue(TestUtil.containsId(people, 2));
assertTrue(TestUtil.containsId(people, 4));
assertTrue(TestUtil.containsId(people, 5));
}
/**
* @see PersonService#getSimilarPeople(String,Integer,String)
*/
@Test
public void getSimilarPeople_shouldMatchSearchToFamilyName2() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-extranames.xml");
Set<Person> people = Context.getPersonService().getSimilarPeople("Johnson", null, "M");
Assert.assertEquals(2, people.size());
assertTrue(TestUtil.containsId(people, 2));
assertTrue(TestUtil.containsId(people, 4));
}
/**
* @see PersonService#getAllPersonAttributeTypes()
*/
@Test
public void getAllPersonAttributeTypes_shouldReturnAllPersonAttributeTypesIncludingRetired() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredPersonAttributeType.xml");
List<PersonAttributeType> attributeTypes = Context.getPersonService().getAllPersonAttributeTypes();
assertTrue("At least one element, otherwise no checking for retired will take place",
attributeTypes.size() > 0);
boolean foundRetired = false;
for (PersonAttributeType personAttributeType : attributeTypes) {
if (personAttributeType.getRetired()) {
foundRetired = true;
break;
}
}
assertTrue("There should be at least one retired person attribute type found in the list", foundRetired);
}
/**
* @see PersonService#getAllPersonAttributeTypes(null)
*/
@Test
public void getAllPersonAttributeTypes_shouldReturnAllPersonAttributeTypesExcludingRetiredWhenIncludeRetiredIsFalse()
throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredPersonAttributeType.xml");
List<PersonAttributeType> attributeTypes = Context.getPersonService().getAllPersonAttributeTypes(false);
assertTrue("At least one element, otherwise no checking for retired will take place",
attributeTypes.size() > 0);
boolean foundRetired = false;
for (PersonAttributeType personAttributeType : attributeTypes) {
if (personAttributeType.getRetired()) {
foundRetired = true;
break;
}
}
Assert.assertFalse("There should be no retired person attribute type found in the list", foundRetired);
}
/**
* @see PersonService#getAllPersonAttributeTypes(null)
*/
@Test
public void getAllPersonAttributeTypes_shouldReturnAllPersonAttributeTypesIncludingRetiredWhenIncludeRetiredIsTrue()
throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredPersonAttributeType.xml");
//TODO: is this the correct way? or should we loop to find a retired type and then perform the following?
List<PersonAttributeType> attributeTypes = Context.getPersonService().getAllPersonAttributeTypes(true);
assertTrue("At least one element, otherwise no checking for retired will take place",
attributeTypes.size() > 0);
boolean foundRetired = false;
for (PersonAttributeType personAttributeType : attributeTypes) {
if (personAttributeType.getRetired()) {
foundRetired = true;
break;
}
}
assertTrue("There should be at least one retired person attribute type found in the list", foundRetired);
}
/**
* @see PersonService#getAllRelationships()
*/
@Test
public void getAllRelationships_shouldReturnAllUnvoidedRelationships() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
List<Relationship> relationships = Context.getPersonService().getAllRelationships();
assertTrue("At least one element, otherwise no checking for voided will take place",
relationships.size() > 0);
boolean foundVoided = false;
for (Relationship relationship : relationships) {
if (relationship.getVoided()) {
foundVoided = true;
break;
}
}
Assert.assertFalse("There should be no voided relationship here", foundVoided);
}
/**
* @see PersonService#getAllRelationships(null)
*/
@Test
public void getAllRelationships_shouldReturnAllRelationshipIncludingVoidedWhenIncludeVoidedEqualsTrue() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
List<Relationship> relationships = Context.getPersonService().getAllRelationships(true);
assertTrue("At least one element, otherwise no checking for voided will take place",
relationships.size() > 0);
boolean foundVoided = false;
for (Relationship relationship : relationships) {
if (relationship.getVoided()) {
foundVoided = true;
break;
}
}
assertTrue("There should be voided relationship here", foundVoided);
}
/**
* @see PersonService#getAllRelationships(null)
*/
@Test
public void getAllRelationships_shouldReturnAllRelationshipExcludingVoidedWhenIncludeVoidedEqualsFalse()
throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
List<Relationship> relationships = Context.getPersonService().getAllRelationships(false);
assertTrue("At least one element, otherwise no checking for voided will take place",
relationships.size() > 0);
boolean foundVoided = false;
for (Relationship relationship : relationships) {
if (relationship.getVoided()) {
foundVoided = true;
break;
}
}
Assert.assertFalse("There should be no voided relationship here", foundVoided);
}
/**
* @see PersonService#getAllRelationshipTypes()
*/
@Test
public void getAllRelationshipTypes_shouldReturnAllRelationshipTypes() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
List<RelationshipType> relationshipTypes = Context.getPersonService().getAllRelationshipTypes();
assertTrue("Number of relationship type are 6", relationshipTypes.size() == 6);
}
@Test(expected = APIException.class)
public void retireRelationshipType_shouldFailIfGivenReasonIsNull() {
personService.retireRelationshipType(new RelationshipType(), null);
}
@Test(expected = APIException.class)
public void retireRelationshipType_shouldFailIfGivenReasonIsEmptyString() {
personService.retireRelationshipType(new RelationshipType(), "");
}
@Test
public void retireRelationshipType_shouldRetireGivenRelationshipType() {
RelationshipType rt = personService.getRelationshipType(1);
assertFalse(rt.getRetired());
String reason = "reason";
personService.retireRelationshipType(rt, reason);
assertTrue(rt.getRetired());
assertThat(rt.getRetiredBy(), is(Context.getAuthenticatedUser()));
assertNotNull(rt.getDateRetired());
assertThat(rt.getRetireReason(), is(reason));
}
@Test
public void unretireRelationshipType_shouldRetireGivenRelationshipType() {
RelationshipType rt = personService.getRelationshipType(1);
personService.retireRelationshipType(rt, "reason");
assertTrue(rt.getRetired());
personService.unretireRelationshipType(rt);
assertFalse(rt.getRetired());
assertNull(rt.getRetiredBy());
assertNull(rt.getDateRetired());
assertNull(rt.getRetireReason());
}
/**
* @see PersonService#getPerson(Integer)
*/
@Test
public void getPerson_shouldReturnNullWhenPersonNull() throws Exception {
Assert.assertNull(Context.getPersonService().getPerson(null));
}
/**
* @see PersonService#getPerson(Integer)
*/
@Test
public void getPerson_shouldReturnNullWhenNoPersonHasTheGivenId() throws Exception {
Person person = Context.getPersonService().getPerson(10000);
Assert.assertNull(person);
}
/**
* @see PersonService#getPersonAttribute(Integer)
*/
@Test
public void getPersonAttribute_shouldReturnNullWhenGivenIdDoesNotExist() throws Exception {
PersonAttribute personAttribute = Context.getPersonService().getPersonAttribute(10000);
Assert.assertNull(personAttribute);
}
/**
* @see PersonService#getPersonAttribute(Integer)
*/
@Test
public void getPersonAttribute_shouldReturnPersonAttributeWhenGivenIdDoesExist() throws Exception {
PersonAttribute personAttribute = Context.getPersonService().getPersonAttribute(17);
Assert.assertNotNull(personAttribute);
assertTrue("Expecting the return is of a person attribute", personAttribute.getClass().equals(
PersonAttribute.class));
}
/**
* @see PersonService#getPersonAttributeType(Integer)
*/
@Test
public void getPersonAttributeType_shouldReturnNullWhenNoPersonAttributeWithTheGivenIdExist() throws Exception {
PersonAttributeType attributeType = Context.getPersonService().getPersonAttributeType(10000);
Assert.assertNull(attributeType);
}
/**
* @see PersonService#getPersonAttributeTypeByName(String)
*/
@Test
public void getPersonAttributeTypeByName_shouldReturnPersonAttributeTypeWhenNameMatchesGivenTypeName() throws Exception {
PersonAttributeType attributeType = Context.getPersonService().getPersonAttributeTypeByName("Birthplace");
Assert.assertNotNull(attributeType);
}
/**
* @see PersonService#getPersonAttributeTypeByName(String)
*/
@Test
public void getPersonAttributeTypeByName_shouldReturnNullWhenNoPersonAttributeTypeMatchGivenTypeName() throws Exception {
PersonAttributeType attributeType = Context.getPersonService().getPersonAttributeTypeByName("Credit Card");
Assert.assertNull(attributeType);
}
/**
* @see PersonService#getPersonAttributeTypes(String,String,Integer,Boolean)
*/
@Test
public void getPersonAttributeTypes_shouldReturnPersonAttributeTypesMatchingGivenParameters() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredPersonAttributeType.xml");
List<PersonAttributeType> attributeTypes = Context.getPersonService().getPersonAttributeTypes(
"A nonexistent attr type name", null, null, null);
Assert.assertNotNull(attributeTypes);
assertTrue("Number of matched attribute type is 0", attributeTypes.isEmpty());
attributeTypes = Context.getPersonService().getPersonAttributeTypes(null, "org.openmrs.Concept", null, null);
Assert.assertNotNull(attributeTypes);
assertTrue("Number of matched attribute type is 1", attributeTypes.size() == 1);
attributeTypes = Context.getPersonService().getPersonAttributeTypes(null, null, null, false);
Assert.assertNotNull(attributeTypes);
assertTrue("Number of matched attribute type is 6", attributeTypes.size() == 6);
}
/**
* @see PersonService#getPersonAttributeTypes(String,String,Integer,Boolean)
*/
@Test
public void getPersonAttributeTypes_shouldReturnEmptyListWhenNoPersonAttributeTypesMatchGivenParameters()
throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredPersonAttributeType.xml");
List<PersonAttributeType> attributeTypes = Context.getPersonService().getPersonAttributeTypes(
"A non-existent attr type name", "java.lang.String", null, false);
Assert.assertNotNull(attributeTypes);
assertTrue("Should return empty list", attributeTypes.isEmpty());
}
/**
* @see PersonService#getRelationship(Integer)
*/
@Test
public void getRelationship_shouldReturnRelationshipWithGivenId() throws Exception {
Relationship relationship = Context.getPersonService().getRelationship(1);
Assert.assertNotNull(relationship);
}
/**
* @see PersonService#getRelationship(Integer)
*/
@Test
public void getRelationship_shouldReturnNullWhenRelationshipWithGivenIdDoesNotExist() throws Exception {
Relationship relationship = Context.getPersonService().getRelationship(10000);
Assert.assertNull(relationship);
}
/**
* @see PersonService#getRelationshipMap(RelationshipType)
*/
@Test
public void getRelationshipMap_shouldReturnEmptyMapWhenNoRelationshipHasTheMatchingRelationshipType() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
PersonService personService = Context.getPersonService();
RelationshipType relationshipType = personService.getRelationshipType(15);
Map<Person, List<Person>> relationshipMap = personService.getRelationshipMap(relationshipType);
Assert.assertNotNull(relationshipMap);
assertTrue("There should be no element in the map", relationshipMap.isEmpty());
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType)
*/
@Test
public void getRelationships_shouldFetchRelationshipsMatchingTheGivenFromPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person firstPerson = personService.getPerson(502);
List<Relationship> relationships = personService.getRelationships(firstPerson, null, null);
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the from person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType)
*/
@Test
public void getRelationships_shouldFetchRelationshipsMatchingTheGivenToPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person secondPerson = personService.getPerson(7);
List<Relationship> relationships = personService.getRelationships(null, secondPerson, null);
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the to person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType)
*/
@Test
public void getRelationships_shouldFetchRelationshipsMatchingTheGivenRelType() throws Exception {
PersonService personService = Context.getPersonService();
RelationshipType relationshipType = personService.getRelationshipType(1);
List<Relationship> relationships = personService.getRelationships(null, null, relationshipType);
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the relationship type", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date)
*/
@Test
public void getRelationships2_shouldFetchRelationshipsMatchingTheGivenFromPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person firstPerson = personService.getPerson(502);
List<Relationship> relationships = personService.getRelationships(firstPerson, null, null, new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the from person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date)
*/
@Test
public void getRelationships2_shouldFetchRelationshipsMatchingTheGivenToPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person secondPerson = personService.getPerson(7);
List<Relationship> relationships = personService.getRelationships(null, secondPerson, null, new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the to person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date)
*/
@Test
public void getRelationships2_shouldFetchRelationshipsMatchingTheGivenRelType() throws Exception {
PersonService personService = Context.getPersonService();
RelationshipType relationshipType = personService.getRelationshipType(1);
List<Relationship> relationships = personService.getRelationships(null, null, relationshipType, new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the relationship type", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date)
*/
@Test
public void getRelationships2_shouldReturnEmptyListWhenNoRelationshipMatchingGivenParametersExist() throws Exception {
PersonService personService = Context.getPersonService();
Person firstPerson = personService.getPerson(501);
Person secondPerson = personService.getPerson(2);
RelationshipType relationshipType = personService.getRelationshipType(1);
List<Relationship> relationships = personService.getRelationships(firstPerson, secondPerson, relationshipType,
new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be no relationship found given the from person", relationships.isEmpty());
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date)
*/
@Test
public void getRelationships2_shouldFetchRelationshipsThatWereActiveDuringEffectiveDate() throws Exception {
executeDataSet(CREATE_PATIENT_XML);
executeDataSet(CREATE_RELATIONSHIP_XML);
// TODO use xml imported in BaseContextSensitiveTest#baseSetupWithStandardDataAndAuthentication()
Patient patient = createTestPatient();
List<Relationship> rels = createTestDatedRelationships(ps.getPatient(2), patient, personService
.getRelationshipType(4));
// Get relationships effective 1988-01-01
List<Relationship> res = personService.getRelationships(ps.getPatient(2), patient, null, df.parse("1988-01-01"));
// Verify # of results and which results we have received
assertEquals(5, res.size());
for (Relationship rr : res) {
if (!rr.equals(rels.get(0)) && !rr.equals(rels.get(2)) && !rr.equals(rels.get(3)) && !rr.equals(rels.get(7))
&& !rr.equals(rels.get(8))) {
if (rr.equals(rels.get(1))) {
fail("unexpected relationship 1 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else if (rr.equals(rels.get(4))) {
fail("unexpected relationship 4 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else if (rr.equals(rels.get(5))) {
fail("unexpected relationship 5 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else if (rr.equals(rels.get(6))) {
fail("unexpected relationship 6 in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
} else {
fail("unrecognized unexpected relationship in results from getRelationshipsByPerson with effeciveDate of 1988-01-01");
}
}
}
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date,Date)
*/
@Test
public void getRelationships3_shouldFetchRelationshipsMatchingTheGivenFromPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person firstPerson = personService.getPerson(502);
List<Relationship> relationships = personService.getRelationships(firstPerson, null, null, new Date(), new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the from person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date,Date)
*/
@Test
public void getRelationships3_shouldFetchRelationshipsMatchingTheGivenToPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person secondPerson = personService.getPerson(7);
List<Relationship> relationships = personService.getRelationships(null, secondPerson, null, new Date(), new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the to person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date,Date)
*/
@Test
public void getRelationships3_shouldFetchRelationshipsMatchingTheGivenRelType() throws Exception {
PersonService personService = Context.getPersonService();
RelationshipType relationshipType = personService.getRelationshipType(1);
List<Relationship> relationships = personService.getRelationships(null, null, relationshipType, new Date(),
new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the relationship type", relationships.size() > 0);
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date,Date)
*/
@Test
public void getRelationships3_shouldReturnEmptyListWhenNoRelationshipMatchingGivenParametersExist() throws Exception {
PersonService personService = Context.getPersonService();
Person firstPerson = personService.getPerson(501);
Person secondPerson = personService.getPerson(2);
RelationshipType relationshipType = personService.getRelationshipType(1);
List<Relationship> relationships = personService.getRelationships(firstPerson, secondPerson, relationshipType,
new Date(), new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be no relationship found given the from person", relationships.isEmpty());
}
/**
* @see PersonService#getRelationships(Person,Person,RelationshipType,Date,Date)
*/
@Test
public void getRelationships3_shouldFetchRelationshipsThatWereActiveDuringTheSpecifiedDateRange() throws Exception {
executeDataSet(CREATE_PATIENT_XML);
executeDataSet(CREATE_RELATIONSHIP_XML);
// TODO use xml imported in BaseContextSensitiveTest#baseSetupWithStandardDataAndAuthentication()
Patient patient = createTestPatient();
List<Relationship> rels = createTestDatedRelationships(ps.getPatient(2), patient, personService
.getRelationshipType(4));
// Get relationships effective between 1987-01-01 and 1988-01-01
List<Relationship> res = personService.getRelationships(ps.getPatient(2), patient, null, df.parse("1987-01-01"), df
.parse("1988-01-01"));
// Verify # of results and which results we have received
assertEquals(5, res.size());
for (Relationship rr : res) {
if (!rr.equals(rels.get(0)) && !rr.equals(rels.get(2)) && !rr.equals(rels.get(3)) && !rr.equals(rels.get(7))
&& !rr.equals(rels.get(8))) {
if (rr.equals(rels.get(1))) {
fail("unexpected relationship 1 in results from getRelationshipsByPerson effective between 1987-01-01 and 1988-01-01");
} else if (rr.equals(rels.get(4))) {
fail("unexpected relationship 4 in results from getRelationshipsByPerson effective between 1987-01-01 and 1988-01-01");
} else if (rr.equals(rels.get(5))) {
fail("unexpected relationship 5 in results from getRelationshipsByPerson effective between 1987-01-01 and 1988-01-01");
} else if (rr.equals(rels.get(6))) {
fail("unexpected relationship 6 in results from getRelationshipsByPerson effective between 1987-01-01 and 1988-01-01");
} else {
fail("unrecognized unexpected relationship in results from getRelationshipsByPerson effective between 1987-01-01 and 1988-01-01");
}
}
}
}
/**
* @see PersonService#getRelationshipsByPerson(Person)
*/
@Test
public void getRelationshipsByPerson_shouldFetchRelationshipsAssociatedWithTheGivenPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person person = personService.getPerson(2);
List<Relationship> relationships = personService.getRelationshipsByPerson(person);
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationshipsByPerson(Person)
*/
@Test
public void getRelationshipsByPerson_shouldFetchUnvoidedRelationshipsOnly() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
PersonService personService = Context.getPersonService();
Person person = personService.getPerson(6);
List<Relationship> relationships = personService.getRelationshipsByPerson(person);
Assert.assertNotNull(relationships);
assertTrue("There should be no relationship found given the person", relationships.isEmpty());
}
/**
* @see PersonService#getRelationshipsByPerson(Person)
*/
@Test
public void getRelationshipsByPerson2_shouldFetchRelationshipsAssociatedWithTheGivenPerson() throws Exception {
PersonService personService = Context.getPersonService();
Person person = personService.getPerson(2);
List<Relationship> relationships = personService.getRelationshipsByPerson(person, new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be relationship found given the person", relationships.size() > 0);
}
/**
* @see PersonService#getRelationshipsByPerson(Person)
*/
@Test
public void getRelationshipsByPerson2_shouldFetchUnvoidedRelationshipsOnly() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
PersonService personService = Context.getPersonService();
Person person = personService.getPerson(6);
List<Relationship> relationships = personService.getRelationshipsByPerson(person, new Date());
Assert.assertNotNull(relationships);
assertTrue("There should be no relationship found given the person", relationships.isEmpty());
}
/**
* @see PersonService#getRelationshipType(Integer)
*/
@Test
public void getRelationshipType_shouldReturnRelationshipTypeWithTheGivenRelationshipTypeId() throws Exception {
RelationshipType relationshipType = Context.getPersonService().getRelationshipType(1);
Assert.assertNotNull(relationshipType);
assertTrue("Expecting the return is of a relationship type", relationshipType.getClass().equals(
RelationshipType.class));
}
/**
* @see PersonService#getRelationshipType(Integer)
*/
@Test
public void getRelationshipType_shouldReturnNullWhenNoRelationshipTypeMatchesGivenRelationshipTypeId() throws Exception {
RelationshipType relationshipType = Context.getPersonService().getRelationshipType(10000);
Assert.assertNull(relationshipType);
}
/**
* @see PersonService#getRelationshipTypeByName(String)
*/
@Test
public void getRelationshipTypeByName_shouldReturnNullWhenNoRelationshipTypeMatchTheGivenName() throws Exception {
RelationshipType relationshipType = Context.getPersonService().getRelationshipTypeByName("Supervisor");
Assert.assertNull(relationshipType);
}
/**
* @see PersonService#getRelationshipTypes(String)
*/
@Test
public void getRelationshipTypes_shouldReturnEmptyListWhenNoRelationshipTypeMatchTheSearchString() throws Exception {
List<RelationshipType> relationshipTypes = Context.getPersonService().getRelationshipTypes("Doctor");
Assert.assertNotNull(relationshipTypes);
assertTrue("There should be no relationship type for the given name", relationshipTypes.isEmpty());
}
/**
* @see PersonService#getRelationshipTypes(String,Boolean) TODO Needs to test
* "preferred"
*/
@Test
public void getRelationshipTypes_shouldReturnListOfPreferredRelationshipTypeMatchingGivenName() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createRetiredRelationship.xml");
List<RelationshipType> relationshipTypes = Context.getPersonService().getRelationshipTypes("Sibling/Sibling", true);
Assert.assertNotNull(relationshipTypes);
assertTrue("There should be relationship type for the given name", relationshipTypes.size() > 0);
}
/**
* @see PersonService#getRelationshipTypes(String,Boolean)
*/
@Test
public void getRelationshipTypes_shouldReturnEmptyListWhenNoPreferredRelationshipTypeMatchTheGivenName()
throws Exception {
List<RelationshipType> relationshipTypes = Context.getPersonService().getRelationshipTypes("Doctor/Patient", true);
Assert.assertNotNull(relationshipTypes);
assertTrue("There should be no relationship type for the given name", relationshipTypes.isEmpty());
}
/**
* @see PersonService#purgePerson(Person)
*/
@Test
public void purgePerson_shouldDeletePersonFromTheDatabase() throws Exception {
PersonService personService = Context.getPersonService();
User user = Context.getAuthenticatedUser();
Person person = new Person();
person.setPersonCreator(user);
person.setPersonDateCreated(new Date());
person.setPersonChangedBy(user);
person.setPersonDateChanged(new Date());
person.setGender("F");
Assert.assertNull(person.getId());
person.addName(new PersonName("givenName", "middleName", "familyName"));
person = personService.savePerson(person);
Assert.assertNotNull(person.getId());
personService.purgePerson(person);
Person deletedPerson = personService.getPerson(person.getId());
Assert.assertNull(deletedPerson);
}
/**
* @see PersonService#purgePersonAttributeType(PersonAttributeType)
*/
@Test
public void purgePersonAttributeType_shouldDeletePersonAttributeTypeFromDatabase() throws Exception {
PersonService service = Context.getPersonService();
PersonAttributeType pat = new PersonAttributeType();
pat.setName("attr type name");
pat.setDescription("attr type desc");
pat.setFormat("java.lang.String");
service.savePersonAttributeType(pat);
assertNotNull(pat.getId());
service.purgePersonAttributeType(pat);
PersonAttributeType deletedPersonAttributeType = service.getPersonAttributeType(pat.getId());
Assert.assertNull(deletedPersonAttributeType);
}
/**
* @see PersonService#savePersonMergeLog(PersonMergeLog)
*/
@Test(expected = APIException.class)
public void savePersonMergeLog_shouldRequireLoser() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
personMergeLog.setLoser(null);
Context.getPersonService().savePersonMergeLog(personMergeLog);
}
/**
* @see PersonService#savePersonMergeLog(PersonMergeLog)
*/
@Test(expected = APIException.class)
public void savePersonMergeLog_shouldRequireWinner() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
personMergeLog.setWinner(null);
Context.getPersonService().savePersonMergeLog(personMergeLog);
}
/**
* @see PersonService#savePersonMergeLog(PersonMergeLog)
*/
@Test(expected = APIException.class)
public void savePersonMergeLog_shouldRequirePersonMergeLogData() throws Exception {
PersonMergeLog personMergeLog = new PersonMergeLog();
personMergeLog.setPersonMergeLogData(null);
Context.getPersonService().savePersonMergeLog(personMergeLog);
}
/**
* @see PersonService#savePersonMergeLog(PersonMergeLog)
*/
@Test
public void savePersonMergeLog_shouldSavePersonMergeLog() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
try {
PersonMergeLog persisted = Context.getPersonService().savePersonMergeLog(personMergeLog);
Assert.assertNotNull("patientMergeLogId has not been set which indicates a problem saving the object", persisted
.getPersonMergeLogId());
}
catch (Exception ex) {
Assert.fail("should not fail when all required fields are set. " + ex.getMessage());
}
}
/**
* @see PersonService#savePersonMergeLog(PersonMergeLog)
*/
@Test
public void savePersonMergeLog_shouldSerializePersonMergeLogData() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
personMergeLog.setSerializedMergedData(null);
PersonMergeLog persisted = Context.getPersonService().savePersonMergeLog(personMergeLog);
Assert.assertNotNull("PatientMergeLogData has not been serialized", persisted.getSerializedMergedData());
}
/**
* @see PersonService#savePersonMergeLog(PersonMergeLog)
*/
@Test
public void savePersonMergeLog_shouldSetDateCreatedIfNull() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
personMergeLog.setDateCreated(null);
PersonMergeLog persisted = Context.getPersonService().savePersonMergeLog(personMergeLog);
Assert.assertNotNull("dateCreated has not been set", persisted.getDateCreated());
}
/**
* @see PersonService#savePersonMergeLog(PersonMergeLog)
*/
@Test
public void savePersonMergeLog_shouldSetCreatorIfNull() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
personMergeLog.setCreator(null);
PersonMergeLog persisted = Context.getPersonService().savePersonMergeLog(personMergeLog);
Assert.assertEquals("creator has not been correctly set", Context.getAuthenticatedUser().getUserId(), persisted
.getCreator().getUserId());
}
/**
* @see PersonService#getLosingPersonMergeLog(Person)
*/
@Test
public void getLosingPersonMergeLog_shouldFindPersonMergeLogByLoser() throws Exception {
//log merge 1 >> 2
PersonMergeLog personMergeLog12 = getTestPersonMergeLog();
personMergeLog12.setLoser(new Person(1));
personMergeLog12.setWinner(new Person(2));
Context.getPersonService().savePersonMergeLog(personMergeLog12);
//log merge 2 >> 6
PersonMergeLog personMergeLog26 = getTestPersonMergeLog();
personMergeLog26.setLoser(new Person(2));
personMergeLog26.setWinner(new Person(6));
Context.getPersonService().savePersonMergeLog(personMergeLog26);
//find where loser is 2
PersonMergeLog l = Context.getPersonService().getLosingPersonMergeLog(new Person(2), true);
Assert.assertEquals("Incorrect PersonMergeLog found by loser", l.getUuid(), personMergeLog26.getUuid());
}
/**
* @see PersonService#getWinningPersonMergeLogs(Person)
*/
@Test
public void getWinningPersonMergeLogs_shouldRetrievePersonMergeLogsByWinner() throws Exception {
//log merge 1 >> 2
PersonMergeLog personMergeLog12 = getTestPersonMergeLog();
personMergeLog12.setLoser(new Person(1));
personMergeLog12.setWinner(new Person(2));
Context.getPersonService().savePersonMergeLog(personMergeLog12);
//log merge 1 >> 6
PersonMergeLog personMergeLog16 = getTestPersonMergeLog();
personMergeLog16.setLoser(new Person(1));
personMergeLog16.setWinner(new Person(6));
Context.getPersonService().savePersonMergeLog(personMergeLog16);
//log merge 2 >> 6
PersonMergeLog personMergeLog26 = getTestPersonMergeLog();
personMergeLog26.setLoser(new Person(2));
personMergeLog26.setWinner(new Person(6));
Context.getPersonService().savePersonMergeLog(personMergeLog26);
//find where winner is 6
List<PersonMergeLog> lst = Context.getPersonService().getWinningPersonMergeLogs(new Person(6), true);
Assert.assertEquals("Incorrect number of PersonMergeLog objects found by winner", 2, lst.size());
for (PersonMergeLog l : lst) {
if (!l.getUuid().equals(personMergeLog16.getUuid()) && !l.getUuid().equals(personMergeLog26.getUuid())) {
fail("Unexpected PersonMergeLog found by winner");
}
}
}
private PersonMergeLog getTestPersonMergeLog() {
PersonMergeLog personMergeLog = new PersonMergeLog();
personMergeLog.setLoser(new Person(1));
personMergeLog.setWinner(new Person(2));
PersonMergeLogData data = new PersonMergeLogData();
data.addCreatedAddress("1");
data.addCreatedAttribute("2");
data.addCreatedIdentifier("3");
data.addCreatedName("4");
data.addCreatedOrder("5");
data.addCreatedProgram("6");
data.addCreatedRelationship("7");
data.addMovedEncounter("8");
data.addMovedIndependentObservation("9");
data.addMovedUser("10");
data.addVoidedRelationship("11");
data.setPriorCauseOfDeath("test");
data.setPriorDateOfBirth(new Date());
data.setPriorDateOfBirthEstimated(true);
data.setPriorDateOfDeath(new Date());
data.setPriorGender("F");
personMergeLog.setPersonMergeLogData(data);
return personMergeLog;
}
/**
* @see PersonService#getPersonMergeLogByUuid(String,boolean)
*/
@Test(expected = APIException.class)
public void getPersonMergeLogByUuid_shouldRequireUuid() throws Exception {
Context.getPersonService().getPersonMergeLogByUuid(null, false);
}
/**
* @see PersonService#getPersonMergeLogByUuid(String,boolean)
*/
@Test
public void getPersonMergeLogByUuid_shouldRetrievePersonMergeLogAndDeserializeData() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
int originalHashValue = personMergeLog.getPersonMergeLogData().computeHashValue();
PersonMergeLog persisted = Context.getPersonService().savePersonMergeLog(personMergeLog);
PersonMergeLog retrieved = Context.getPersonService().getPersonMergeLogByUuid(persisted.getUuid(), true);
Assert.assertNotNull("problem retrieving PersonMergeLog by UUID", retrieved);
Assert.assertEquals("deserialized data is not identical to original data", originalHashValue, retrieved
.getPersonMergeLogData().computeHashValue());
}
/**
* @see PersonService#getPersonMergeLogByUuid(String,boolean)
*/
@Test
public void getPersonMergeLogByUuid_shouldRetrievePersonMergeLogWithoutDeserializingData() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
PersonMergeLog persisted = Context.getPersonService().savePersonMergeLog(personMergeLog);
PersonMergeLog retrieved = Context.getPersonService().getPersonMergeLogByUuid(persisted.getUuid(), false);
Assert.assertNotNull("problem retrieving PersonMergeLog by UUID", retrieved);
}
/**
* @see PersonService#getAllPersonMergeLogs(boolean)
*/
@Test
public void getAllPersonMergeLogs_shouldRetrieveAllPersonMergeLogsAndDeserializeThem() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
Context.getPersonService().savePersonMergeLog(personMergeLog);
List<PersonMergeLog> result = Context.getPersonService().getAllPersonMergeLogs(true);
Assert.assertEquals("could not retrieve expected number of PersonMergeLog objects", 1, result.size());
Assert.assertNotNull("PersonMergeLog at index 0 is null", result.get(0));
Assert.assertNotNull("PersonMergeLog data has not been deserialized", result.get(0).getPersonMergeLogData());
}
/**
* @see PersonService#getAllPersonMergeLogs(boolean)
*/
@Test
public void getAllPersonMergeLogs_shouldRetrieveAllPersonMergeLogsFromTheModel() throws Exception {
PersonMergeLog personMergeLog = getTestPersonMergeLog();
Context.getPersonService().savePersonMergeLog(personMergeLog);
List<PersonMergeLog> result = Context.getPersonService().getAllPersonMergeLogs(false);
Assert.assertEquals("could not retrieve expected number of PersonMergeLog objects", 1, result.size());
}
/**
* @see PersonService#purgeRelationship(Relationship)
*/
@Test
public void purgeRelationship_shouldDeleteRelationshipFromTheDatabase() throws Exception {
PersonService personService = Context.getPersonService();
Relationship relationship = personService.getRelationship(1);
personService.purgeRelationship(relationship);
Relationship deletedRelationship = personService.getRelationship(1);
Assert.assertNull(deletedRelationship);
}
/**
* @see PersonService#purgeRelationshipType(RelationshipType)
*/
@Test
public void purgeRelationshipType_shouldDeleteRelationshipTypeFromTheDatabase() throws Exception {
PersonService personService = Context.getPersonService();
RelationshipType relationshipType = new RelationshipType();
relationshipType.setDescription("Test relationship");
relationshipType.setaIsToB("Sister");
relationshipType.setbIsToA("Brother");
relationshipType = personService.saveRelationshipType(relationshipType);
assertNotNull(relationshipType.getId());
personService.purgeRelationshipType(relationshipType);
RelationshipType deletedRelationshipType = personService.getRelationshipType(relationshipType.getId());
Assert.assertNull(deletedRelationshipType);
}
/**
* @see PersonService#savePerson(Person)
*/
@Test
public void savePerson_shouldCreateNewObjectWhenPersonIdIsNull() throws Exception {
User user = Context.getAuthenticatedUser();
Person person = new Person();
person.setPersonCreator(user);
person.setPersonDateCreated(new Date());
person.setPersonChangedBy(user);
person.setPersonDateChanged(new Date());
person.setGender("F");
Assert.assertNull(person.getId());
person.addName(new PersonName("givenName", "middleName", "familyName"));
Person personSaved = Context.getPersonService().savePerson(person);
Assert.assertNotNull(personSaved.getId());
}
/**
* @see PersonService#savePerson(Person)
*/
@Test
public void savePerson_shouldUpdateExistingObjectWhenPersonIdIsNotNull() throws Exception {
Person personSaved = Context.getPersonService().getPerson(1);
Assert.assertNotNull(personSaved.getId());
personSaved.setGender("M");
Person personUpdated = Context.getPersonService().savePerson(personSaved);
Assert.assertEquals("M", personUpdated.getGender());
}
/**
* @see PersonService#saveRelationship(Relationship)
*/
@Test(expected = APIException.class)
public void saveRelationship_shouldThrowAPIException() {
Relationship relationship = new Relationship();
Person person = new Person();
relationship.setPersonA(person);
relationship.setPersonB(person);
personService.saveRelationship(relationship);
}
/**
* @see PersonService#saveRelationship(Relationship)
*/
@Test
public void saveRelationship_shouldCreateNewObjectWhenRelationshipIdIsNull() throws Exception {
PersonService personService = Context.getPersonService();
Relationship relationship = new Relationship();
relationship.setPersonA(personService.getPerson(1));
relationship.setPersonB(personService.getPerson(2));
relationship.setRelationshipType(personService.getRelationshipType(1));
Assert.assertNull(relationship.getRelationshipId());
Relationship savedRelationship = personService.saveRelationship(relationship);
Assert.assertNotNull(savedRelationship.getRelationshipId());
}
/**
* @see PersonService#saveRelationship(Relationship)
*/
@Test
public void saveRelationship_shouldUpdateExistingObjectWhenRelationshipIdIsNotNull() throws Exception {
PersonService personService = Context.getPersonService();
Relationship savedRelationship = personService.getRelationship(1);
Assert.assertNotNull(savedRelationship.getRelationshipId());
savedRelationship.setRelationshipType(personService.getRelationshipType(2));
Relationship updatedRelationship = personService.saveRelationship(savedRelationship);
Assert.assertEquals(personService.getRelationshipType(2), updatedRelationship.getRelationshipType());
}
/**
* @see PersonService#saveRelationshipType(RelationshipType)
*/
@Test
public void saveRelationshipType_shouldCreateNewObjectWhenRelationshipTypeIdIsNull() throws Exception {
RelationshipType relationshipType = new RelationshipType();
relationshipType.setDescription("Test relationship");
relationshipType.setaIsToB("Sister");
relationshipType.setbIsToA("Brother");
Assert.assertNull(relationshipType.getRelationshipTypeId());
RelationshipType savedRelationshipType = personService.saveRelationshipType(relationshipType);
Assert.assertNotNull(savedRelationshipType.getRelationshipTypeId());
}
/**
* @see PersonService#saveRelationshipType(RelationshipType)
*/
@Test
public void saveRelationshipType_shouldUpdateExistingObjectWhenRelationshipTypeIdIsNotNull() throws Exception {
RelationshipType savedRelationshipType = Context.getPersonService().getRelationshipType(1);
Assert.assertNotNull(savedRelationshipType.getRelationshipTypeId());
savedRelationshipType.setPreferred(true);
RelationshipType updatedRelationshipType = personService.saveRelationshipType(savedRelationshipType);
Assert.assertEquals(true, updatedRelationshipType.getPreferred());
}
@Test
public void unvoidPerson_shouldReturnNullwhenGivenNull() {
Assert.assertNull(Context.getPersonService().unvoidPerson(null));
}
/**
* @see PersonService#unvoidPerson(Person) TODO NullPointerException during
* RequiredDataAdvice.before() TODO Should we be able to unvoid an already not voided
* record? This test assumes yes.
*/
@Test
public void unvoidPerson_shouldUnvoidTheGivenPerson() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createPersonPurgeVoidTest.xml");
Person person = Context.getPersonService().getPerson(1002);
assertTrue(person.getVoided());
Assert.assertNotNull(person.getDateVoided());
Person unvoidedPerson = Context.getPersonService().unvoidPerson(person);
Assert.assertFalse(unvoidedPerson.getVoided());
Assert.assertNull(unvoidedPerson.getVoidedBy());
Assert.assertNull(unvoidedPerson.getPersonVoidReason());
Assert.assertNull(unvoidedPerson.getPersonDateVoided());
}
/**
* @see PersonService#unvoidRelationship(Relationship)
*/
@Test
public void unvoidRelationship_shouldUnvoidVoidedRelationship() throws Exception {
Relationship relationship = Context.getPersonService().getRelationship(1);
Relationship voidedRelationship = Context.getPersonService().voidRelationship(relationship,
"Test Voiding Relationship");
assertTrue(voidedRelationship.getVoided());
Assert.assertNotNull(voidedRelationship.getVoidedBy());
Assert.assertNotNull(voidedRelationship.getVoidReason());
Assert.assertNotNull(voidedRelationship.getDateVoided());
Relationship unvoidedRelationship = Context.getPersonService().unvoidRelationship(voidedRelationship);
Assert.assertFalse(unvoidedRelationship.getVoided());
Assert.assertNull(unvoidedRelationship.getVoidedBy());
Assert.assertNull(unvoidedRelationship.getVoidReason());
Assert.assertNull(unvoidedRelationship.getDateVoided());
}
/**
* @see PersonService#voidPerson(Person,String)
*/
@Test
public void voidPerson_shouldReturnNullwhenGivenNull() {
Assert.assertEquals(Context.getPersonService().voidPerson(null, "Testing person null"), null);
}
/**
* @see PersonService#voidPerson(Person, String)
*/
@Test
public void voidPerson_shouldReturnVoidedPersonWithGivenReason() throws Exception {
executeDataSet("org/openmrs/api/include/PersonServiceTest-createPersonPurgeVoidTest.xml");
Person person = Context.getPersonService().getPerson(1001);
Context.getPersonService().voidPerson(person, "Test Voiding Person");
Context.flushSession();
Context.clearSession();
Person voidedPerson = Context.getPersonService().getPerson(1001);
assertTrue(voidedPerson.getVoided());
Assert.assertNotNull(voidedPerson.getVoidedBy());
Assert.assertNotNull(voidedPerson.getPersonVoidReason());
Assert.assertNotNull(voidedPerson.getPersonDateVoided());
Assert.assertEquals(voidedPerson.getPersonVoidReason(), "Test Voiding Person");
}
@Test
public void voidRelationship_shouldVoidRelationshipIfGivenRelationshipIsNotVoided() {
Relationship relationship = personService.getRelationship(1);
assertFalse("We need an unvoided relationship to test the method", relationship.getVoided());
String voidReason = "Something";
// TODO - voiding is done by the BaseVoidHandler called via AOP before voidRelationship
// is executed. Coverage of voidRelationship is low because relationship.getVoided() is true
// when entering voidRelationship
// Documented at TRUNK-5151
personService.voidRelationship(relationship, voidReason);
Relationship voidedRelationship = personService.getRelationship(1);
assertTrue(voidedRelationship.getVoided());
assertThat(voidedRelationship.getVoidReason(), is(voidReason));
assertNotNull(voidedRelationship.getDateVoided());
assertEquals(voidedRelationship.getVoidedBy(), Context.getAuthenticatedUser());
}
@Test
public void voidRelationship_shouldVoidRelationshipWithVoidReasonNullIfGivenRelationshipIsNotVoided() {
Relationship relationship = personService.getRelationship(1);
assertFalse("We need an unvoided relationship to test the method", relationship.getVoided());
String voidReason = null;
// TODO - voiding is done by the BaseVoidHandler called via AOP before voidRelationship
// is executed. Coverage of voidRelationship is low because relationship.getVoided() is true
// when entering voidRelationship
// Documented at TRUNK-5151
personService.voidRelationship(relationship, voidReason);
Relationship voidedRelationship = personService.getRelationship(1);
assertTrue(voidedRelationship.getVoided());
assertThat(voidedRelationship.getVoidReason(), is(voidReason));
assertNotNull(voidedRelationship.getDateVoided());
assertEquals(voidedRelationship.getVoidedBy(), Context.getAuthenticatedUser());
}
@Test
public void voidRelationship_shouldVoidRelationshipAndSetVoidedByToGivenUserIfGivenRelationshipIsNotVoided() {
Relationship relationship = personService.getRelationship(1);
assertFalse("We need an unvoided relationship to test the method", relationship.getVoided());
String voidReason = "Something";
User user = Context.getUserService().getUser(501);
assertNotNull("need a user to void", user);
relationship.setVoidedBy(user);
// TODO - voiding is done by the BaseVoidHandler called via AOP before voidRelationship
// is executed. Coverage of voidRelationship is low because relationship.getVoided() is true
// when entering voidRelationship
// Documented at TRUNK-5151
personService.voidRelationship(relationship, voidReason);
Relationship voidedRelationship = personService.getRelationship(1);
assertTrue(voidedRelationship.getVoided());
assertThat(voidedRelationship.getVoidReason(), is(voidReason));
assertNotNull(voidedRelationship.getDateVoided());
assertEquals(voidedRelationship.getVoidedBy(), user);
}
/**
* @see PersonService#getPersonAddressByUuid(String)
*/
@Test
public void getPersonAddressByUuid_shouldFindObjectGivenValidUuid() throws Exception {
String uuid = "3350d0b5-821c-4e5e-ad1d-a9bce331e118";
PersonAddress personAddress = Context.getPersonService().getPersonAddressByUuid(uuid);
Assert.assertEquals(2, (int) personAddress.getPersonAddressId());
}
/**
* @see PersonService#getPersonAddressByUuid(String)
*/
@Test
public void getPersonAddressByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() throws Exception {
Assert.assertNull(Context.getPersonService().getPersonAddressByUuid("some invalid uuid"));
}
/**
* @see PersonService#getPersonAttributeByUuid(String)
*/
@Test
public void getPersonAttributeByUuid_shouldFindObjectGivenValidUuid() throws Exception {
String uuid = "0768f3da-b692-44b7-a33f-abf2c450474e";
PersonAttribute person = Context.getPersonService().getPersonAttributeByUuid(uuid);
Assert.assertEquals(1, (int) person.getPersonAttributeId());
}
/**
* @see PersonService#getPersonAttributeByUuid(String)
*/
@Test
public void getPersonAttributeByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() throws Exception {
Assert.assertNull(Context.getPersonService().getPersonAttributeByUuid("some invalid uuid"));
}
/**
* @see PersonService#getPersonAttributeTypeByUuid(String)
*/
@Test
public void getPersonAttributeTypeByUuid_shouldFindObjectGivenValidUuid() throws Exception {
String uuid = "b3b6d540-a32e-44c7-91b3-292d97667518";
PersonAttributeType personAttributeType = Context.getPersonService().getPersonAttributeTypeByUuid(uuid);
Assert.assertEquals(1, (int) personAttributeType.getPersonAttributeTypeId());
}
/**
* @see PersonService#getPersonAttributeTypeByUuid(String)
*/
@Test
public void getPersonAttributeTypeByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() throws Exception {
Assert.assertNull(Context.getPersonService().getPersonAttributeTypeByUuid("some invalid uuid"));
}
/**
* @see PersonService#getPersonByUuid(String)
*/
@Test
public void getPersonByUuid_shouldFindObjectGivenValidUuid() throws Exception {
String uuid = "ba1b19c2-3ed6-4f63-b8c0-f762dc8d7562";
Person person = Context.getPersonService().getPersonByUuid(uuid);
Assert.assertEquals(1, (int) person.getPersonId());
}
/**
* @see PersonService#getPersonByUuid(String)
*/
@Test
public void getPersonByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() throws Exception {
Assert.assertNull(Context.getPersonService().getPersonByUuid("some invalid uuid"));
}
/**
* @see PersonService#getPersonNameByUuid(String)
*/
@Test
public void getPersonNameByUuid_shouldFindObjectGivenValidUuid() throws Exception {
String uuid = "399e3a7b-6482-487d-94ce-c07bb3ca3cc7";
PersonName personName = Context.getPersonService().getPersonNameByUuid(uuid);
Assert.assertEquals(2, (int) personName.getPersonNameId());
}
/**
* @see PersonService#getPersonNameByUuid(String)
*/
@Test
public void getPersonNameByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() throws Exception {
Assert.assertNull(Context.getPersonService().getPersonNameByUuid("some invalid uuid"));
}
@Test
public void getPersonNameById_shouldFindObjectGivenValidId() throws Exception {
PersonName personName = Context.getPersonService().getPersonName(2);
Assert.assertEquals(2, (int) personName.getId());
}
@Test
public void getPersonNameById_shouldNotFindAnyObjectGivenInvalidId() throws Exception {
PersonName personName = Context.getPersonService().getPersonName(-1);
Assert.assertNull(personName);
}
/**
* @see PersonService#getRelationshipByUuid(String)
*/
@Test
public void getRelationshipByUuid_shouldFindObjectGivenValidUuid() throws Exception {
String uuid = "c18717dd-5d78-4a0e-84fc-ee62c5f0676a";
Relationship relationship = Context.getPersonService().getRelationshipByUuid(uuid);
Assert.assertEquals(1, (int) relationship.getRelationshipId());
}
/**
* @see PersonService#getRelationshipByUuid(String)
*/
@Test
public void getRelationshipByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() throws Exception {
Assert.assertNull(Context.getPersonService().getRelationshipByUuid("some invalid uuid"));
}
/**
* @see PersonService#getRelationshipTypeByUuid(String)
*/
@Test
public void getRelationshipTypeByUuid_shouldFindObjectGivenValidUuid() throws Exception {
String uuid = "6d9002ea-a96b-4889-af78-82d48c57a110";
RelationshipType relationshipType = Context.getPersonService().getRelationshipTypeByUuid(uuid);
Assert.assertEquals(1, (int) relationshipType.getRelationshipTypeId());
}
/**
* @see PersonService#getRelationshipTypeByUuid(String)
*/
@Test
public void getRelationshipTypeByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() throws Exception {
Assert.assertNull(Context.getPersonService().getRelationshipTypeByUuid("some invalid uuid"));
}
/**
* @see PersonService#parsePersonName(String)
*/
@Test
public void parsePersonName_shouldNotFailWhenEndingWithWhitespace() throws Exception {
PersonName pname = Context.getPersonService().parsePersonName("John ");
assertEquals("John", pname.getGivenName());
}
/**
* @see PersonService#parsePersonName(String)
*/
@Test
public void parsePersonName_shouldNotFailWhenEndingWithAComma() throws Exception {
PersonName pname = Context.getPersonService().parsePersonName("John,");
assertEquals("John", pname.getGivenName());
}
/**
* @see PersonService#parsePersonName(String)
*/
@Test
public void parsePersonName_shouldParseFourPersonName() throws Exception {
PersonName pname = Context.getPersonService().parsePersonName("John David Alex Smith");
assertEquals("John", pname.getGivenName());
assertEquals("David", pname.getMiddleName());
assertEquals("Alex", pname.getFamilyName());
assertEquals("Smith", pname.getFamilyName2());
}
/**
* @see PersonService#voidPersonName(org.openmrs.PersonName, String)
*/
@Test
public void voidPersonName_shouldVoidPersonNameWithTheGivenReason() throws Exception {
executeDataSet("org/openmrs/api/include/PersionServiceTest-voidUnvoidPersonName.xml");
PersonName personName = Context.getPersonService().getPersonNameByUuid("5e6571cc-c7f2-41de-b289-f55f8fe79c6f");
Assert.assertFalse(personName.getVoided());
PersonName voidedPersonName = Context.getPersonService().voidPersonName(personName, "Test Voiding PersonName");
assertTrue(voidedPersonName.getVoided());
Assert.assertNotNull(voidedPersonName.getVoidedBy());
Assert.assertNotNull(voidedPersonName.getDateVoided());
Assert.assertEquals(voidedPersonName.getVoidReason(), "Test Voiding PersonName");
}
/**
* @see PersonService#unvoidPersonName(org.openmrs.PersonName)
*/
@Test
public void unvoidPersonName_shouldUnvoidVoidedPersonName() throws Exception {
executeDataSet("org/openmrs/api/include/PersionServiceTest-voidUnvoidPersonName.xml");
PersonName voidedPersonName = Context.getPersonService().getPersonNameByUuid("a6ghgh7e-1384-493a-a55b-d325924acd94");
assertTrue(voidedPersonName.getVoided());
PersonName unvoidedPersonName = Context.getPersonService().unvoidPersonName(voidedPersonName);
Assert.assertFalse(unvoidedPersonName.getVoided());
Assert.assertNull(unvoidedPersonName.getVoidedBy());
Assert.assertNull(unvoidedPersonName.getDateVoided());
Assert.assertNull(unvoidedPersonName.getVoidReason());
}
/**
* @throws APIException
* @see PersonService#savePersonName(org.openmrs.PersonName)
*/
@Test(expected = APIException.class)
public void savePersonName_shouldFailIfYouTryToVoidTheLastNonVoidedName() throws Exception {
executeDataSet("org/openmrs/api/include/PersionServiceTest-voidUnvoidPersonName.xml");
PersonName personName = Context.getPersonService().getPersonNameByUuid("39ghgh7b-6482-487d-94ce-c07bb3ca3cc1");
Assert.assertFalse(personName.getVoided());
Context.getPersonService().voidPersonName(personName, "Test Voiding PersonName");
}
/**
* @see PersonService#voidPersonAddress(org.openmrs.PersonAddress, String)
*/
@Test
public void voidPersonAddress_shouldVoidPersonAddressWithTheGivenReason() throws Exception {
executeDataSet("org/openmrs/api/include/PersionServiceTest-voidUnvoidPersonAddress.xml");
PersonAddress personAddress = Context.getPersonService().getPersonAddressByUuid(
"33ghd0b5-821c-4e5e-ad1d-a9bce331e118");
Assert.assertFalse(personAddress.getVoided());
PersonAddress voidedPersonAddress = Context.getPersonService().voidPersonAddress(personAddress,
"Test Voiding PersonAddress");
assertTrue(voidedPersonAddress.getVoided());
Assert.assertNotNull(voidedPersonAddress.getVoidedBy());
Assert.assertNotNull(voidedPersonAddress.getDateVoided());
Assert.assertEquals(voidedPersonAddress.getVoidReason(), "Test Voiding PersonAddress");
}
/**
* @see PersonService#unvoidPersonAddress(org.openmrs.PersonAddress)
*/
@Test
public void unvoidPersonAddress_shouldUnvoidVoidedpersonAddress() throws Exception {
executeDataSet("org/openmrs/api/include/PersionServiceTest-voidUnvoidPersonAddress.xml");
PersonAddress voidedPersonAddress = Context.getPersonService().getPersonAddressByUuid(
"33ghghb5-821c-4e5e-ad1d-a9bce331e777");
assertTrue(voidedPersonAddress.getVoided());
PersonAddress unvoidedPersonAddress = Context.getPersonService().unvoidPersonAddress(voidedPersonAddress);
Assert.assertFalse(unvoidedPersonAddress.getVoided());
Assert.assertNull(unvoidedPersonAddress.getVoidedBy());
Assert.assertNull(unvoidedPersonAddress.getDateVoided());
Assert.assertNull(unvoidedPersonAddress.getVoidReason());
}
/**
* @see PersonService#unvoidPerson(Person)
*/
@Test
public void unvoidPerson_shouldNotUnretireUsers() throws Exception {
//given
Person person = personService.getPerson(2);
User user = new User(person);
Context.getUserService().createUser(user, "Admin123");
personService.voidPerson(person, "reason");
//when
personService.unvoidPerson(person);
//then
assertTrue(Context.getUserService().getUsersByPerson(person, false).isEmpty());
}
/**
* @see PersonService#unvoidPerson(Person)
*/
@Test
public void unvoidPerson_shouldUnvoidPatient() throws Exception {
//given
Person person = personService.getPerson(2);
personService.voidPerson(person, "reason");
//when
personService.unvoidPerson(person);
//then
Assert.assertFalse(person.getVoided());
}
/**
* @see PersonService#voidPerson(Person,String)
*/
@Test
public void voidPerson_shouldRetireUsers() throws Exception {
//given
Person person = personService.getPerson(2);
User user = new User(person);
Context.getUserService().createUser(user, "Admin123");
Assert.assertFalse(Context.getUserService().getUsersByPerson(person, false).isEmpty());
//when
personService.voidPerson(person, "reason");
//then
assertTrue(Context.getUserService().getUsersByPerson(person, false).isEmpty());
}
/**
* @see PersonService#voidPerson(Person,String)
*/
@Test
public void voidPerson_shouldVoidPatient() throws Exception {
//given
Person person = personService.getPerson(2);
//when
personService.voidPerson(person, "reason");
//then
assertTrue(person.getVoided());
}
/**
* @see PersonService#saveRelationshipType(RelationshipType)
*/
@Test(expected = APIException.class)
public void saveRelationshipType_shouldFailIfTheDescriptionIsNotSpecified() throws Exception {
RelationshipType relationshipType = new RelationshipType();
relationshipType.setaIsToB("Sister");
relationshipType.setbIsToA("Brother");
personService.saveRelationshipType(relationshipType);
}
/**
* @see PersonService#savePerson(Person)
*/
@Test
public void savePerson_shouldSetThePreferredNameAndAddressIfNoneIsSpecified() throws Exception {
Person person = new Person();
person.setGender("M");
PersonName name = new PersonName("givenName", "middleName", "familyName");
person.addName(name);
PersonAddress address = new PersonAddress();
address.setAddress1("some address");
person.addAddress(address);
personService.savePerson(person);
assertTrue(name.getPreferred());
assertTrue(address.getPreferred());
}
/**
* @see PersonService#savePerson(Person)
*/
@Test
public void savePerson_shouldNotSetThePreferredNameAndAddressIfTheyAlreadyExist() throws Exception {
Person person = new Person();
person.setGender("M");
PersonName name = new PersonName("givenName", "middleName", "familyName");
PersonName preferredName = new PersonName("givenName", "middleName", "familyName");
preferredName.setPreferred(true);
person.addName(name);
person.addName(preferredName);
PersonAddress address = new PersonAddress();
address.setAddress1("some address");
PersonAddress preferredAddress = new PersonAddress();
preferredAddress.setAddress1("another address");
preferredAddress.setPreferred(true);
person.addAddress(address);
person.addAddress(preferredAddress);
personService.savePerson(person);
assertTrue(preferredName.getPreferred());
assertTrue(preferredAddress.getPreferred());
Assert.assertFalse(name.getPreferred());
Assert.assertFalse(address.getPreferred());
}
/**
* @see PersonService#savePerson(Person)
*/
@Test
public void savePerson_shouldNotSetAVoidedNameOrAddressAsPreferred() throws Exception {
Person person = new Person();
person.setGender("M");
PersonName name = new PersonName("givenName", "middleName", "familyName");
PersonName preferredName = new PersonName("givenName", "middleName", "familyName");
preferredName.setPreferred(true);
preferredName.setVoided(true);
person.addName(name);
person.addName(preferredName);
PersonAddress address = new PersonAddress();
address.setAddress1("some address");
PersonAddress preferredAddress = new PersonAddress();
preferredAddress.setAddress1("another address");
preferredAddress.setPreferred(true);
preferredAddress.setVoided(true);
person.addAddress(address);
person.addAddress(preferredAddress);
personService.savePerson(person);
Assert.assertFalse(preferredName.getPreferred());
Assert.assertFalse(preferredAddress.getPreferred());
assertTrue(name.getPreferred());
assertTrue(address.getPreferred());
}
/**
* Creates a new Global Property to lock person attribute types by setting its value
* @param propertyValue value for person attribute types locked GP
*/
public void createPersonAttributeTypeLockedGPAndSetValue(String propertyValue) {
GlobalProperty gp = new GlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PERSON_ATRIBUTE_TYPES_LOCKED);
gp.setPropertyValue(propertyValue);
Context.getAdministrationService().saveGlobalProperty(gp);
}
/**
* @see PersonService#savePersonAttributeType(PersonAttributeType)
* @throws PersonAttributeTypeLockedException
*/
@Test(expected = PersonAttributeTypeLockedException.class)
public void savePersonAttributeType_shouldThrowAnErrorWhenTryingToSavePersonAttributeTypeWhilePersonAttributeTypesAreLocked()
throws Exception {
PersonService ps = Context.getPersonService();
createPersonAttributeTypeLockedGPAndSetValue("true");
PersonAttributeType pat = ps.getPersonAttributeType(1);
pat.setDescription("New person attribute type");
ps.savePersonAttributeType(pat);
}
@Test(expected = PersonAttributeTypeLockedException.class)
public void shouldFailToRetirePersonAttributeTypeWhilePersonAttributeTypesAreLocked() {
createPersonAttributeTypeLockedGPAndSetValue("true");
PersonAttributeType pat = personService.getPersonAttributeType(UNRETIRED_PERSON_ATTRIBUTE_TYPE);
personService.retirePersonAttributeType(pat, "Retire test");
}
@Test(expected = APIException.class)
public void shouldFailToRetirePersonAttributeTypeIfGivenReasonIsNull() {
PersonAttributeType pat = personService.getPersonAttributeType(UNRETIRED_PERSON_ATTRIBUTE_TYPE);
personService.retirePersonAttributeType(pat, null);
}
@Test(expected = APIException.class)
public void shouldFailToRetirePersonAttributeTypeIfGivenReasonIsEmpty() {
PersonAttributeType pat = personService.getPersonAttributeType(UNRETIRED_PERSON_ATTRIBUTE_TYPE);
personService.retirePersonAttributeType(pat, "");
}
@Test
public void shouldRetirePersonAttributeType() {
PersonAttributeType pat = personService.getPersonAttributeType(UNRETIRED_PERSON_ATTRIBUTE_TYPE);
assertFalse("need an unretired PersonAttributeType", pat.getRetired());
String retireReason = "reason";
personService.retirePersonAttributeType(pat, retireReason);
PersonAttributeType retiredPat = personService.getPersonAttributeType(UNRETIRED_PERSON_ATTRIBUTE_TYPE);
assertTrue(retiredPat.getRetired());
assertThat(retiredPat.getRetiredBy(), is(Context.getAuthenticatedUser()));
assertThat(retiredPat.getRetireReason(), is(retireReason));
assertNotNull(retiredPat.getDateRetired());
}
@Test(expected = PersonAttributeTypeLockedException.class)
public void unretirePersonAttributeType_shouldThrowAnErrorWhenTryingToUnretirePersonAttributeTypeWhilePersonAttributeTypesAreLocked() {
createPersonAttributeTypeLockedGPAndSetValue("true");
PersonAttributeType pat = personService.getPersonAttributeType(RETIRED_PERSON_ATTRIBUTE_TYPE);
personService.unretirePersonAttributeType(pat);
}
@Test
public void shouldUnretirePersonAttributeType() {
PersonAttributeType pat = personService.getPersonAttributeType(RETIRED_PERSON_ATTRIBUTE_TYPE);
personService.unretirePersonAttributeType(pat);
PersonAttributeType unretiredPat = personService.getPersonAttributeType(UNRETIRED_PERSON_ATTRIBUTE_TYPE);
assertFalse(unretiredPat.getRetired());
assertNull(unretiredPat.getRetiredBy());
assertNull(unretiredPat.getRetireReason());
assertNull(unretiredPat.getDateRetired());
}
/**
* @see PersonService#purgePersonAttributeType(PersonAttributeType)
* @throws PersonAttributeTypeLockedException
*/
@Test(expected = PersonAttributeTypeLockedException.class)
public void purgePersonAttributeType_shouldThrowAnErrorWhileTryingToDeletePersonAttributeTypeWhenPersonAttributeTypesAreLocked()
throws Exception {
PersonService ps = Context.getPersonService();
createPersonAttributeTypeLockedGPAndSetValue("true");
PersonAttributeType pat = ps.getPersonAttributeType(1);
ps.purgePersonAttributeType(pat);
}
@Test
public void getPersonAttributeTypes_shouldReturnAllPersonAttributeTypesWithViewTypeNull() {
List<PersonAttributeType> expected = personService.getAllPersonAttributeTypes();
List<PersonAttributeType> result = personService.getPersonAttributeTypes(null, null);
assertThat(result, containsInAnyOrder(expected.toArray()));
}
@Test
public void getPersonAttributeTypes_shouldReturnEmptyListWithViewTypeListing() {
List<PersonAttributeType> result = personService.getPersonAttributeTypes(null, PersonService.ATTR_VIEW_TYPE.LISTING);
assertTrue(result.isEmpty());
}
@Test
public void getPersonAttributeTypes_shouldReturnEmptyListWhenViewTypeListingAndPerson() {
List<PersonAttributeType> result = personService.getPersonAttributeTypes(OpenmrsConstants.PERSON_TYPE.PERSON, PersonService.ATTR_VIEW_TYPE.LISTING);
assertTrue(result.isEmpty());
}
@Test
public void getPersonAttributeTypes_shouldReturnEmptyListWhenViewTypePatientAndViewing() {
List<PersonAttributeType> result = personService.getPersonAttributeTypes(OpenmrsConstants.PERSON_TYPE.PATIENT, PersonService.ATTR_VIEW_TYPE.VIEWING);
assertTrue(result.isEmpty());
}
@Test
public void getPersonAttributeTypes_shouldReturnListWithNullWhenGlobalPropertyNotExists() {
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_LISTING_ATTRIBUTES, "9");
assertNull(personService.getPersonAttributeType(9));
List<PersonAttributeType> result = personService.getPersonAttributeTypes(null, PersonService.ATTR_VIEW_TYPE.LISTING);
// This is a bug Trunk-5149
assertEquals(result.size(), 1);
assertNull(result.get(0));
}
@Test
public void getPersonAttributeTypes_shouldReturnNothingWhenGlobalPropertyLargerNineExists() {
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_LISTING_ATTRIBUTES, "99");
executeDataSet(CREATE_PERSON_PROPERTY_XML);
assertNotNull(personService.getPersonAttributeType(99));
List<PersonAttributeType> result = personService.getPersonAttributeTypes(null, PersonService.ATTR_VIEW_TYPE.LISTING);
// This is probably a bug TRUNK-5148
assertEquals(result.size(), 1);
assertNull(result.get(0));
}
@Test
public void getPersonAttributeTypes_shouldReturnPatientAttributesWhenGivenViewTypeListing() {
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_LISTING_ATTRIBUTES, "1");
PersonAttributeType race = personService.getPersonAttributeType(1);
List<PersonAttributeType> result = personService.getPersonAttributeTypes(null, PersonService.ATTR_VIEW_TYPE.LISTING);
assertThat(result, contains(race));
assertEquals(result.size(), 1);
}
@Test
public void getPersonAttributeTypes_shouldReturnUserAndPatientAttributesWhenViewTypeListiningAndPerson() {
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_LISTING_ATTRIBUTES, "1");
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_USER_LISTING_ATTRIBUTES, "2");
PersonAttributeType race = personService.getPersonAttributeType(1);
PersonAttributeType birthplace = personService.getPersonAttributeType(2);
List<PersonAttributeType> result = personService.getPersonAttributeTypes(OpenmrsConstants.PERSON_TYPE.PERSON, PersonService.ATTR_VIEW_TYPE.LISTING);
assertThat(result, contains(race, birthplace));
assertEquals(result.size(), 2);
}
@Test
public void getPersonAttributeTypes_shouldReturnPatientAttributesWhenViewTypeViewingAndPatient() {
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_VIEWING_ATTRIBUTES, "1");
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_USER_VIEWING_ATTRIBUTES, "2");
PersonAttributeType race = personService.getPersonAttributeType(1);
List<PersonAttributeType> result = personService.getPersonAttributeTypes(OpenmrsConstants.PERSON_TYPE.PATIENT, PersonService.ATTR_VIEW_TYPE.VIEWING);
assertThat(result, contains(race));
assertEquals(result.size(), 1);
}
@Test
public void getPersonAttributeTypes_shouldReturnUserAttributesWhenViewTypeHeaderAndUser() {
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_PATIENT_HEADER_ATTRIBUTES, "1");
adminService.setGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_USER_HEADER_ATTRIBUTES, "2");
PersonAttributeType birthplace = personService.getPersonAttributeType(2);
List<PersonAttributeType> result = personService.getPersonAttributeTypes(OpenmrsConstants.PERSON_TYPE.USER, PersonService.ATTR_VIEW_TYPE.HEADER);
assertThat(result, contains(birthplace));
assertEquals(result.size(), 1);
}
} |
def fit(self, signal):
if signal.ndim == 1:
self.signal = signal.reshape(-1, 1)
else:
self.signal = signal
n_samples, _ = self.signal.shape
strides = (self.signal.itemsize, self.signal.itemsize)
shape = (n_samples - self.order, self.order)
lagged = as_strided(self.signal, shape=shape, strides=strides)
lagged_after_padding = np.pad(lagged,
((self.order, 0), (0, 0)),
mode="edge")
self.covar = np.c_[lagged_after_padding, np.ones(n_samples)]
self.signal[:self.order] = self.signal[self.order]
return self |
from __future__ import absolute_import
# Import python libs
import copy
import logging
import os
# Import salt libs
import salt.loader
import salt.utils
import salt.utils.gitfs
import salt.utils.dictupdate
import salt.pillar.git_pillar
import salt.ext.six as six
from salt.exceptions import SaltException
try:
from salt.utils.data import repack_dictlist
except ImportError:
from salt.utils import repack_dictlist
PER_REMOTE_OVERRIDES = salt.pillar.git_pillar.PER_REMOTE_OVERRIDES
PER_REMOTE_ONLY = tuple(set(list(salt.pillar.git_pillar.PER_REMOTE_ONLY) + ["stack"]))
# Set up logging
LOG = logging.getLogger(__name__)
# Define the module's virtual name
__virtualname__ = "gitstack"
def __virtual__():
"""
Only load if GitStack pillars are defined
"""
gitstack_pillars = [x for x in __opts__["ext_pillar"] if "gitstack" in x]
if not gitstack_pillars:
# No GitStack external pillars were configured
return False
return __virtualname__
def ext_pillar(minion_id, pillar, *repos, **single_repo_conf):
try:
stacks, gitpillar = _init_gitpillar(repos, single_repo_conf)
except GitStackPillarException as ex:
LOG.error(ex.message)
return {}
# Initialize variables
stack_config = []
stack_config_kwargs = {}
# Replace relative paths with the absolute path of the cloned repository
if single_repo_conf:
stack_config = _resolve_stack(
single_repo_conf["stack"], list(gitpillar.pillar_dirs.items())[0][0]
)
else:
pillar_dirs = list(gitpillar.pillar_dirs.keys())
for idx, stack in enumerate(stacks):
try:
pillar_dir = pillar_dirs[idx]
except IndexError:
LOG.warning("Ignoring GitStack stack configuration: %s", stack)
LOG.warning("Ignoring GitStack repo maybe failed checkout")
continue
if isinstance(stack, dict):
salt.utils.dictupdate.update(
stack_config,
_resolve_stack(stack, pillar_dir)
)
elif isinstance(stack, list):
stack_config.extend(_resolve_stack(stack, pillar_dir))
else:
stack_config.append(_resolve_stack(stack, pillar_dir))
return _call_stack_pillar(minion_id, pillar, stack_config, stack_config_kwargs)
def _init_gitpillar(repos, single_repo_conf):
# legacy configuration with a plain dict under GitStack ext_pillar key
if single_repo_conf and single_repo_conf.get("repo", None) is not None:
stacks, init_gitpillar_args = _get_legacy_init_args(single_repo_conf)
# new configuration way
elif isinstance(repos, (list, tuple)) and len(repos) > 0:
stacks, init_gitpillar_args = _get_init_args(repos)
else:
# Invalid configuration
raise GitStackPillarException(
"Configuration for GitStack must be a list of dicts or a single dict"
)
opts = copy.deepcopy(__opts__)
opts["pillar_roots"] = {}
opts["__git_pillar"] = True
# check arguments to use with GitPillar, we could check also salt version
if len(_get_function_varnames(salt.utils.gitfs.GitPillar.__init__)) > 2:
# Include GLOBAL_ONLY args for Salt versions that require it
if "global_only" in _get_function_varnames(salt.utils.gitfs.GitPillar.__init__):
init_gitpillar_args.append(salt.pillar.git_pillar.GLOBAL_ONLY)
# Initialize GitPillar object
gitpillar = salt.utils.gitfs.GitPillar(opts, *init_gitpillar_args)
else:
# Include GLOBAL_ONLY args for Salt versions that require it
if "global_only" in _get_function_varnames(
salt.utils.gitfs.GitPillar.init_remotes
):
init_gitpillar_args.append(salt.pillar.git_pillar.GLOBAL_ONLY)
# Initialize GitPillar object
gitpillar = salt.utils.gitfs.GitPillar(opts)
gitpillar.init_remotes(*init_gitpillar_args)
if __opts__.get("__role") == "minion":
# If masterless, fetch the remotes. We'll need to remove this once
# we make the minion daemon able to run standalone.
gitpillar.fetch_remotes()
gitpillar.checkout()
if not gitpillar.pillar_dirs:
raise GitStackPillarException(
"Repositories used by GitStack must be included in the git pillar configuration"
)
return stacks, gitpillar
def _get_init_args(repos):
stacks = []
invalid_repos_idx = []
for repo_idx, repo in enumerate(repos):
keywords = repack_dictlist(repo[next(iter(repo))])
if "stack" not in keywords:
# stack param is mandatory in GitStack repos configuration
LOG.warning(
"Configuration for GitStack must contain a stack key for each repo."
)
LOG.warning(
"Configured GitStack repo %s (at position %d) will be ignored",
next(iter(repo)),
repo_idx,
)
invalid_repos_idx.append(repo_idx)
continue
stacks.append(keywords["stack"])
valid_repos = [
repo for repo_idx, repo in enumerate(repos) if repo_idx not in invalid_repos_idx
]
init_gitpillar_args = [valid_repos, PER_REMOTE_OVERRIDES, PER_REMOTE_ONLY]
return stacks, init_gitpillar_args
def _get_legacy_init_args(single_repo_conf):
branch = single_repo_conf.get("branch", "master")
repo = single_repo_conf["repo"]
remote = " ".join([branch, repo])
init_gitpillar_args = [[remote], PER_REMOTE_OVERRIDES, PER_REMOTE_ONLY]
if "stack" not in single_repo_conf:
raise GitStackPillarException(
"A stack key is mandatory in GitStack configuration"
)
return [], init_gitpillar_args
def _resolve_stack(relative, path):
"""
Resolve relative paths to the absolute path of the cloned Git repo
"""
if isinstance(relative, dict):
absolute = {}
for key, value in six.iteritems(relative):
absolute[key] = _resolve_stack(value, path)
elif isinstance(relative, list):
absolute = []
for item in relative:
absolute.append(_resolve_stack(item, path))
elif isinstance(relative, six.string_types):
absolute = os.path.join(path, relative)
else:
absolute = relative
return absolute
def _call_stack_pillar(minion_id, pillar, stack_config, stack_config_kwargs):
# Load the 'stack' pillar module
stack_pillar = salt.loader.pillars(__opts__, __salt__, __context__)["stack"]
# Call the 'stack' pillar module
if isinstance(stack_config, dict):
return stack_pillar(minion_id, pillar, **stack_config)
if isinstance(stack_config, list):
return stack_pillar(minion_id, pillar, *stack_config, **stack_config_kwargs)
return stack_pillar(minion_id, pillar, stack_config)
def _get_function_varnames(function):
"""
Return the var names for a function
"""
if six.PY2:
return function.im_func.func_code.co_varnames
return function.__code__.co_varnames
class GitStackPillarException(SaltException):
"""
Raised when GitStack encounters a problem.
"""
|
/**
* Created by fabianterhorst on 18.05.16.
*/
public class LayoutConverters {
private List<LayoutConverter> converters;
public LayoutConverters() {
}
public void setAll(List<LayoutConverter> converters) {
this.converters = converters;
}
public LayoutAttribute convert(String attributeValue, String attributeName, List<LayoutAttribute> attributes) {
LayoutAttribute layoutAttribute = null;
for (LayoutConverter layoutConverter : converters) {
if (layoutAttribute == null) {
layoutAttribute = layoutConverter.convert(attributeValue, attributeName);
if (layoutAttribute != null && (layoutAttribute.getType() == LayoutAttribute.Type.ASSIGNED)) {
break;
} else if (layoutAttribute != null && checkIfConstructorTypeIsAlreadyDefined(layoutAttribute.getType(), attributes)) {
return new LayoutAttribute();
}
}
}
return layoutAttribute;
}
private boolean checkIfConstructorTypeIsAlreadyDefined(LayoutAttribute.Type type, List<LayoutAttribute> attributes) {
if (type == LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_1
|| type == LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_2
|| type == LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_3
|| type == LayoutAttribute.Type.PARAM_CONSTRUCTOR_1
|| type == LayoutAttribute.Type.PARAM_CONSTRUCTOR_2
|| type == LayoutAttribute.Type.PARAM_CONSTRUCTOR_3) {
checkAttributesForType(type, attributes);
}
return false;
}
private boolean checkAttributesForType(LayoutAttribute.Type type, List<LayoutAttribute> attributes) {
for (LayoutAttribute attribute : attributes) {
if (attribute.getType() == type) {
return true;
}
}
return false;
}
public List<LayoutAttribute> finish(List<LayoutAttribute> attributes) {
List<LayoutAttribute> finished = new ArrayList<>();
for (LayoutConverter layoutConverter : converters) {
List<LayoutAttribute> currentlyFinished = layoutConverter.finish();
if (currentlyFinished != null) {
finished.addAll(currentlyFinished);
}
}
if (!checkAttributesForType(LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_1, attributes)) {
finished.add(new LayoutAttribute(LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_1, "getContext()"));
}
if (checkAttributesForType(LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_3, attributes) && !checkAttributesForType(LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_2, attributes)) {
finished.add(new LayoutAttribute(LayoutAttribute.Type.LAYOUT_CONSTRUCTOR_2, "(AttributeSet) null"));
}
return finished;
}
} |
Do older veterans experience change in posttraumatic cognitions following treatment for posttraumatic stress disorder?
OBJECTIVE
It is unclear whether PTSD treatments improve negative posttraumatic cognitions (NPCs) and if changes in NPCs mediate treatment outcomes in older veterans. The current study examined if prolonged exposure therapy (PE) and relaxation therapy (RT) reduce NPCs over time in older adult veterans with PTSD.
METHOD
This study analyzed data from a randomized controlled trial of 86 older male veterans with PTSD randomized to PE or RT. The Posttraumatic Cognitions Inventory (PTCI; Foa et al., 1999), which includes a total score and three subscales, Negative Cognitions of the Self (Self), Negative Cognitions of the World (World), and Self-Blame (Blame), was used to assess NPCs at pretreatment, posttreatment, and 6-month follow-up.
RESULTS
Changes in NPCs differed by treatment condition. Veterans who received PE had significantly reduced overall NPCs and NPCs about the self at posttreatment, but these NPCs were no longer significantly different from baseline at the follow-up assessment. In contrast, NPCs about the world and self-blame did not significantly change following PE. NPCs did not change following RT. Effects of PE on decreased 6-month follow-up clinician-rated PTSD symptoms were conveyed through intervening effects of decreased posttreatment PTCI total scores, suggesting the utility of targeting posttraumatic cognitions as a mechanism of long-term PTSD symptom reduction.
CONCLUSIONS
Given that reductions in overall negative cognitions are associated with lower clinician-administered PTSD scores 6 months after PE, clinicians could consider monitoring changes in these cognitions over the course of treatment. RT is not a recommended treatment approach to target NPCs in older adults with PTSD. (PsycInfo Database Record (c) 2021 APA, all rights reserved). |
<filename>lenstools/utils/__init__.py
from .algorithms import *
from .misc import *
from .mpi import *
from .fft import * |
/*[clinic input]
preserve
[clinic start generated code]*/
#if defined(HAVE_GETSPNAM)
PyDoc_STRVAR(spwd_getspnam__doc__,
"getspnam($module, arg, /)\n"
"--\n"
"\n"
"Return the shadow password database entry for the given user name.\n"
"\n"
"See `help(spwd)` for more on shadow password database entries.");
#define SPWD_GETSPNAM_METHODDEF \
{"getspnam", (PyCFunction)spwd_getspnam, METH_O, spwd_getspnam__doc__},
static PyObject *
spwd_getspnam_impl(PyObject *module, PyObject *arg);
static PyObject *
spwd_getspnam(PyObject *module, PyObject *arg_)
{
PyObject *return_value = NULL;
PyObject *arg;
if (!PyArg_Parse(arg_, "U:getspnam", &arg)) {
goto exit;
}
return_value = spwd_getspnam_impl(module, arg);
exit:
return return_value;
}
#endif /* defined(HAVE_GETSPNAM) */
#if defined(HAVE_GETSPENT)
PyDoc_STRVAR(spwd_getspall__doc__,
"getspall($module, /)\n"
"--\n"
"\n"
"Return a list of all available shadow password database entries, in arbitrary order.\n"
"\n"
"See `help(spwd)` for more on shadow password database entries.");
#define SPWD_GETSPALL_METHODDEF \
{"getspall", (PyCFunction)spwd_getspall, METH_NOARGS, spwd_getspall__doc__},
static PyObject *
spwd_getspall_impl(PyObject *module);
static PyObject *
spwd_getspall(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return spwd_getspall_impl(module);
}
#endif /* defined(HAVE_GETSPENT) */
#ifndef SPWD_GETSPNAM_METHODDEF
#define SPWD_GETSPNAM_METHODDEF
#endif /* !defined(SPWD_GETSPNAM_METHODDEF) */
#ifndef SPWD_GETSPALL_METHODDEF
#define SPWD_GETSPALL_METHODDEF
#endif /* !defined(SPWD_GETSPALL_METHODDEF) */
/*[clinic end generated code: output=07cd8af0afd77fe7 input=a9049054013a1b77]*/
|
<filename>assignment_3/3_generative/part3/distributions.py<gh_stars>0
"""
This file contains classes for a bimodal Gaussian distribution and a
multivariate Gaussian distribution with diagonal covariance matrix.
Author: Deep Learning Course, C.Winkler | Fall 2020
Date Created: 2020-11-25
"""
import numpy as np
import torch
import math
def broadcast(x, a, b):
"""
Broadcast shape of input tensors a and b to be able to perform element-wise
multiplication along the last dimension of x.
Inputs:
x - Input tensor of shape [n, n, d].
a - First input tensor of shape [d].
b - Second input tensor of shape [d].
Returns:
Tensor of shape [1, 1, d]
"""
#####
new_a = a.view(((1,) * (len(x.shape)-1)) + x.shape[-1:])
new_b = b.view(((1,) * (len(x.shape)-1)) + x.shape[-1:])
#####
return new_a, new_b
# return (t.view(((1,) * (len(x.shape)-1)) + x.shape[-1:]) for t in [a, b])
class BimodalGaussianDiag:
"""
Class specifying a Bimodal Bivariate Gaussian distribution with diagonal
covariance matrix. Contains functions to compute the log-likelihood and to
sample from the distribution.
Inputs:
mu (list) - List of tensors of shape of 1xdims. These are
the mean values of the distribution for each
random variable.
sigma (list) - List of tensors of shape 1xdims. These are the
values of standard devations of each random variable.
dims(int) - Dimensionality of random vector.
"""
def __init__(self, mu, sigma, dims):
# TODO: Implement initalization
self.p1 = MultivariateGaussianDiag(mu[0], sigma[0], dims)
self.p2 = MultivariateGaussianDiag(mu[1], sigma[1], dims)
# self.mus = torch.tensor(mu)
# self.sigmas = torch.tensor(sigma)
self.dims = dims
# raise NotImplementedError
def log_prob(self, x):
# TODO: Implement log probability computation
logp_p1 = self.p1.log_prob(x)
logp_p2 = self.p2.log_prob(x)
logp = torch.log(0.5 * logp_p1.exp() + 0.5 * logp_p2.exp())
# raise NotImplementedError
return logp
def sample(self, num_samples):
# TODO: Implement sampling procedure
mask = torch.randint(0,2, size=[num_samples], dtype=torch.bool)
p1_samples = self.p1.sample(num_samples)
p2_samples = self.p2.sample(num_samples)
samples = torch.cat((p1_samples[mask, :], p2_samples[~mask, :]), dim=0)
# raise NotImplementedError
return samples
class MultivariateGaussianDiag:
"""
Class specifying a Multivariate Gaussian distribution with diagonal
covariance matrix. Contains functions to compute the log-likelihood and
sample from the distribution.
Inputs:
mu (list) - List of tensors of shape of 1xdims. These are
the mean values of the distribution for each
random variable.
sigma (list) - List of tensors of shape 1xdims. These are the
values of standard devations of each random variable.
dims(int) - Dimensionality of random vector.
"""
def __init__(self, mu, sigma, dims):
super().__init__()
# TODO: Implement initalization
self.mu = torch.tensor(mu)
self.sigma = torch.tensor(sigma)
self.dims = dims
# logp = None
# raise NotImplementedError
def log_prob(self, x):
# TODO: Implement log probability computation
# print("Multivariate log prob x shape")
# print(x.shape)
broad_mu, broad_sigma = broadcast(x, self.mu, self.sigma)
exponent = (x-broad_mu) * torch.reciprocal(broad_sigma) * (x-broad_mu)
log_p = -0.5*self.dims - 0.5 * torch.log(torch.prod(self.sigma)) - 0.5*exponent
log_p = torch.sum(log_p, dim=-1)
return log_p
def sample(self, num_samples):
# TODO: Implement sampling procedure
epsilon = torch.randn(num_samples, self.dims)
samples = self.mu[None, :] + epsilon * self.sigma[None, :]
# raise NotImplementedError
return samples
|
import * as core from '@actions/core'
import * as github from '@actions/github'
import {EnvVariables, Inputs, Label, Metadata, Octokit, Results} from './types'
export const handleEvent = async (): Promise<void> => {
const {accessToken} = getEnvVariables()
const octokit = github.getOctokit(accessToken)
const metadata = getMetadata()
const approvals = await getApprovals(octokit, metadata)
const {requiredApprovals, approvedLabel} = getInputs()
const enough = approvals >= requiredApprovals
const {pullLabels} = metadata
const includes = pullLabels.includes(approvedLabel)
if (enough && !includes) {
await applyLabel(octokit, metadata, approvedLabel)
return
}
if (!enough && includes) {
await removeLabel(octokit, metadata, approvedLabel)
}
}
const getEnvVariables = (): EnvVariables => {
const accessToken = process.env.GITHUB_TOKEN
if (!accessToken) {
throw new Error('GITHUB_TOKEN is undefined')
}
return {accessToken}
}
const getInputs = (): Inputs => {
const requiredApprovals = core.getInput('requiredApprovals')
const approvedLabel = core.getInput('approvedLabel')
return {
requiredApprovals: parseInt(requiredApprovals),
approvedLabel
}
}
const getMetadata = (): Metadata => {
const {repository, pull_request: pullRequest} = github.context.payload
if (!repository || !pullRequest) {
throw new Error('Invalid payload')
}
const pullLabels = pullRequest.labels.map((label: Label) => label.name)
return {
repo: repository.name,
owner: repository.owner.login,
pullNumber: pullRequest.number,
pullLabels
}
}
const getApprovals = async (
octokit: Octokit,
{owner, repo, pullNumber}: Metadata
): Promise<number> => {
const {data: reviews} = await octokit.pulls.listReviews({
owner,
repo,
pull_number: pullNumber
})
const results: Results = {}
for (const review of reviews) {
const reviewer = review.user?.login
const state = review.state
if (reviewer && state !== 'COMMENTED') {
results[reviewer] = state
}
}
const states = Object.values(results)
const approvals = states.filter(state => state === 'APPROVED')
return approvals.length
}
const applyLabel = async (
octokit: Octokit,
{owner, repo, pullNumber}: Metadata,
approvedLabel: string
): Promise<void> => {
await octokit.issues.addLabels({
owner,
repo,
issue_number: pullNumber,
labels: [approvedLabel]
})
}
const removeLabel = async (
octokit: Octokit,
{owner, repo, pullNumber}: Metadata,
approvedLabel: string
): Promise<void> => {
await octokit.issues.removeLabel({
owner,
repo,
issue_number: pullNumber,
name: approvedLabel
})
}
|
At some point yesterday, you probably read about soon-to-be-NFL-quarterback Teddy Bridgewater giving his mom a pink Cadillac, thus fulfilling a promise that he made to her when he was nine. It was a sweet story, the kind that's designed to make us all feel good about sports and moms and America. It was also essentially a commercial, orchestrated by Spike Lee's ad agency and Cadillac.
Lee and Cadillac combined to produce a short documentary about Bridgewater, the climax of which was the gifting of the new car, which Cadillac provided. From the Miami Herald:
Lee, whose advertising agency Spike DDB "is the African American agency of record for Cadillac," was approached by Cadillac to tell Bridgewater's story. He said he came to Miami two weeks ago to begin filming Bridgewater and his family. "It was a natural fit when they heard the story of Teddy promising his mother a Cadillac when he was 9 and at the time not even knowing the significance of the color pink," Lee said. "Everything clicked and it came together very quickly, even though we didn't go home until 4 a.m. [Tuesday] because we had to edit, mix and color correct.
This is why when Bridgewater posted pictures of his mother and her new car on his Instagram page, one of them came with a caption that had the vibe of a press release. This is a feel-good story, but it's also meant to make you feel good about the Cadillac brand.
Today, draft prospect Eric Ebron proposed to his girlfriend on the roof of the Empire State Building, a romantic event which produced heartwarming blog posts like this one. Today was a big day for Ebron, but it was also a big day for Gillette:
Advertisement
Kill all the brands. |
<gh_stars>0
import * as tf from '@tensorflow/tfjs';
import * as tfvis from '@tensorflow/tfjs-vis'
import LabelData from '../data/labelData.json'
import LabelData2 from '../data/labelData2.json'
import LabelData3 from '../data/labelData3.json'
const modelName = "localstorage://number-model'"
class TFUtil {
model: any = null
construnct(){
}
getModel = async () => {
try {
let savedmodel = await tf.loadLayersModel(modelName);
const optimizer = tf.train.adam();
savedmodel.compile({
optimizer: optimizer,
loss: 'categoricalCrossentropy',
metrics: ['accuracy'],
});
console.log("Use Saved Model")
return savedmodel
} catch (e){
console.log("Create Model", e)
}
const model = tf.sequential();
const IMAGE_WIDTH = 49;
const IMAGE_HEIGHT = 50;
const IMAGE_CHANNELS = 1;
model.add(tf.layers.conv2d({
inputShape: [IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_CHANNELS],
kernelSize: 5,
filters: 8,
strides: 1,
activation: 'relu',
kernelInitializer: 'varianceScaling'
}));
model.add(tf.layers.maxPooling2d({ poolSize: [2, 2], strides: [2, 2] }));
model.add(tf.layers.conv2d({
kernelSize: 5,
filters: 16,
strides: 1,
activation: 'relu',
kernelInitializer: 'varianceScaling'
}));
model.add(tf.layers.maxPooling2d({ poolSize: [2, 2], strides: [2, 2] }));
model.add(tf.layers.flatten());
const NUM_OUTPUT_CLASSES = 10;
model.add(tf.layers.dense({
units: NUM_OUTPUT_CLASSES,
kernelInitializer: 'varianceScaling',
activation: 'softmax'
}));
const optimizer = tf.train.adam();
model.compile({
optimizer: optimizer,
loss: 'categoricalCrossentropy',
metrics: ['accuracy'],
});
return model
}
train = async (model: any) => {
const metrics = ['loss', 'val_loss', 'acc', 'val_acc'];
const container = {
name: 'Model Training', tab: 'Model', styles: { height: '1000px' }
};
const fitCallbacks = tfvis.show.fitCallbacks(container, metrics);
const BATCH_SIZE = 1000;
const [trainXs, trainYs] = tf.tidy(() => {
const dataCount = LabelData.length
console.log("dataCount", dataCount)
let ts = []
let labels = []
for (let i = 0; i < dataCount; i++) {
ts.push(LabelData[i].data)
labels.push(LabelData[i].label)
}
for (let i = 0; i < LabelData2.length; i++) {
ts.push(LabelData[i].data)
labels.push(LabelData[i].label)
}
for (let i = 0; i < LabelData3.length; i++) {
ts.push(LabelData[i].data)
labels.push(LabelData[i].label)
}
let tx = tf.tensor(ts)
let ty = tf.oneHot(labels, 10)
//tf.tensor(labels)
tx = tx.reshape([dataCount * 3, 49, 50, 1])
console.log("tx shape", tx.shape)
console.log("ty shape", ty.shape)
return [
tx, ty
];
});
const [testXs, testYs] = tf.tidy(() => {
let ts = []
let labels = []
let testCount = 20
for (let i = 0; i < testCount; i++) {
// let t = tf.tensor(LabelData[i].data).reshape([49, 50, 1])
ts.push(LabelData[i].data)
labels.push(LabelData[i].label)
}
let tx = tf.tensor(ts).reshape([testCount, 49, 50, 1])
let ty = tf.oneHot(labels, 10)
return [
tx, ty
];
});
return model.fit(trainXs, trainYs, {
batchSize: BATCH_SIZE,
validationData: [testXs, testYs],
epochs: 10,
shuffle: true,
callbacks: fitCallbacks
});
}
predict = async (index: number) => {
let model = await this.getModel()
let ts = []
let labels = []
ts.push(LabelData[index].data)
labels.push(LabelData[index].label)
let tx = tf.tensor(ts).reshape([1, 49, 50, 1])
let ty = tf.oneHot(labels, 10)
let preds = model.predict(tx)
console.log("preds", preds)
let arg = (preds as any).argMax(-1)
console.log("arg", arg)
arg.print()
let result = await arg.array()
console.log("answer", result[0])
console.log("Label", labels, ty)
tx.dispose()
ty.dispose()
return result[0]
}
predictNumber = async (data: number[]) => {
if (this.model === null) {
this.model = await this.getModel()
}
let tx = tf.tensor(data).reshape([1, 49, 50, 1])
let preds = this.model.predict(tx).argMax(-1)
let result = await preds.array()
tx.dispose()
return result[0]
}
saveModel = async (model: any) => {
await model.save(modelName)
}
}
const shared = new TFUtil()
export default shared |
import { InMemoryDbService } from 'angular-in-memory-web-api';
import { IDepartment } from './departments';
export class DepartmentData implements InMemoryDbService {
createDb(): { departments: IDepartment[]} {
const departments: IDepartment[] = [
{
id: 1,
departmentName: 'Network',
departmentManager: 'Adam',
departmentLocation: 'Paris'
},
{
id: 2,
departmentName: 'DevOps',
departmentManager: 'Leila',
departmentLocation: 'Rome'
},
{
id: 1,
departmentName: 'Database',
departmentManager: 'Fatima',
departmentLocation: 'France'
},
{
id: 1,
departmentName: 'IT Support',
departmentManager: 'Ryan',
departmentLocation: 'Casablanca'
}
];
return { departments };
}
}
|
/// Constructs a new `Cuboid` with the given dimensions.
pub fn new(x_size: Scalar, y_size: Scalar, z_size: Scalar) -> Cuboid {
let half_x = x_size / 2.0;
let half_y = y_size / 2.0;
let half_z = z_size / 2.0;
Cuboid {
dimensions: Vec3D::new(x_size, y_size, z_size),
vertices: [
// TODO refactor this to something else (z = height??)
Vec3D::new( half_x, half_y, half_z),
Vec3D::new(-half_x, half_y, half_z),
Vec3D::new(-half_x, -half_y, half_z),
Vec3D::new( half_x, -half_y, half_z),
Vec3D::new( half_x, half_y, -half_z),
Vec3D::new(-half_x, half_y, -half_z),
Vec3D::new(-half_x, -half_y, -half_z),
Vec3D::new( half_x, -half_y, -half_z),
],
}
} |
{-# LANGUAGE DataKinds #-}
import Options.Declarative
test :: Cmd "verbosity test" ()
test = do
logStr 0 "verbosity level 0"
logStr 1 "verbosity level 1"
logStr 2 "verbosity level 2"
logStr 3 "verbosity level 3"
main :: IO ()
main = run_ test
|
<gh_stars>10-100
package model
import (
"encoding/json"
"errors"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter"
"strings"
)
//
type UpdateAlarmRequestBody struct {
// 告警名称,只能包含0-9/a-z/A-Z/_/-或汉字。
AlarmName *string `json:"alarm_name,omitempty"`
// 告警描述,长度0-256。
AlarmDescription *string `json:"alarm_description,omitempty"`
Condition *Condition `json:"condition,omitempty"`
// 是否启用该条告警触发的动作,默认为true。注:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notificationList值保持一致。
AlarmActionEnabled *bool `json:"alarm_action_enabled,omitempty"`
// 告警级别,默认为2,级别为1、2、3、4。分别对应紧急、重要、次要、提示。
AlarmLevel *int32 `json:"alarm_level,omitempty"`
// 告警类型,支持的枚举类型:EVENT.SYS:针对系统事件的告警规则;EVENT.CUSTOM:针对自定义事件的告警规则;RESOURCE_GROUP:针对资源分组的告警规则。
AlarmType *UpdateAlarmRequestBodyAlarmType `json:"alarm_type,omitempty"`
// 告警触发的动作。 结构样例如下: { \"type\": \"notification\",\"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"] } type取值: notification:通知。 autoscaling:弹性伸缩。
AlarmActions *[]AlarmActions `json:"alarm_actions,omitempty"`
// 数据不足触发的动作(该参数已废弃,建议无需配置)。
InsufficientdataActions *[]AlarmActions `json:"insufficientdata_actions,omitempty"`
// 告警恢复触发的动作
OkActions *[]AlarmActions `json:"ok_actions,omitempty"`
}
func (o UpdateAlarmRequestBody) String() string {
data, err := json.Marshal(o)
if err != nil {
return "UpdateAlarmRequestBody struct{}"
}
return strings.Join([]string{"UpdateAlarmRequestBody", string(data)}, " ")
}
type UpdateAlarmRequestBodyAlarmType struct {
value string
}
type UpdateAlarmRequestBodyAlarmTypeEnum struct {
EVENT_SYS UpdateAlarmRequestBodyAlarmType
EVENT_CUSTOM UpdateAlarmRequestBodyAlarmType
RESOURCE_GROUP UpdateAlarmRequestBodyAlarmType
}
func GetUpdateAlarmRequestBodyAlarmTypeEnum() UpdateAlarmRequestBodyAlarmTypeEnum {
return UpdateAlarmRequestBodyAlarmTypeEnum{
EVENT_SYS: UpdateAlarmRequestBodyAlarmType{
value: "EVENT.SYS",
},
EVENT_CUSTOM: UpdateAlarmRequestBodyAlarmType{
value: "EVENT.CUSTOM",
},
RESOURCE_GROUP: UpdateAlarmRequestBodyAlarmType{
value: "RESOURCE_GROUP",
},
}
}
func (c UpdateAlarmRequestBodyAlarmType) MarshalJSON() ([]byte, error) {
return json.Marshal(c.value)
}
func (c *UpdateAlarmRequestBodyAlarmType) UnmarshalJSON(b []byte) error {
myConverter := converter.StringConverterFactory("string")
if myConverter != nil {
val, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\""))
if err == nil {
c.value = val.(string)
return nil
}
return err
} else {
return errors.New("convert enum data to string error")
}
}
|
Beating heart versus conventional mitral valve surgery.
OBJECTIVES
The present study aimed to compare the results of beating heart technique and conventional mitral valve surgery (MVS).
METHODS
Three hundred and nineteen patients who underwent MVS between April 2005 and December 2006 were enrolled in the study. While 125 patients underwent beating heart MVS (group 1), the conventional approach was used for 194 patients (group 2). Of those patients who underwent beating heart MVS, 75 underwent MVS without cross-clamping the aorta. Coronary sinus retroperfusion was used during surgery in the remaining 50 patients. The right anterolateral thoracotomy was performed in nine out of the 29 patients requiring re-operation, while resternotomy was performed in 20.
RESULTS
No significant differences were shown between the groups in the preoperative period in terms of the Parsonnet mortality score, Ontario mortality score, and length of intensive care stay. However, there were significant differences with respect to EuroSCORE risk score, EuroSCORE mortality, and Parsonnet risk score, and length of hospital stay according to Ontario risk scoring. It was established that the patients in group 1 had a shorter length of hospital stay . Group 1 was observed to have shorter time periods when the groups were compared regarding operative time , cross-clamping (XCL) time , and cardiopulmonary bypass time . There were also significant differences in favor of group 1 in terms of postoperative need for inotropic support . Although there were no statistically significant differences in the groups in terms of mortality rates according to the Parsonnet scoring system, with the exception of the moderate risk group, it was noted that the mortality rates in the beating heart group were lower.
CONCLUSIONS
This study concluded that beating heart MVS can be performed successfully, particularly for patients at higher risk which will lead to increased morbidity and mortality in postoperative period. |
/** Authenticate principal against credential
* @param principal - the user id to authenticate
* @param credential - an opaque credential.
* @return Always returns true.
*/
private boolean authenticate(Principal principal, Object credential)
{
boolean authenticated = true;
return authenticated;
} |
/**
* Sign extends variable bit-width integer.
* @param x variable bit-width integer
* @param w bit width (32)
*/
function signExtend(x: number, w: number=32): number {
w = 32-w;
return (x<<w)>>w;
}
export default signExtend;
|
<gh_stars>0
package com.icepoint.framework.core.flow.dsl;
import com.icepoint.framework.core.flow.ResultContainer;
import com.icepoint.framework.core.flow.Source;
import com.icepoint.framework.core.util.MessageTemplates;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.util.Assert;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* @author <NAME>
*/
public abstract class FlowDefinition<B extends FlowDefinition<B, F>, F extends Flow>
extends BaseFlowDefinition<B, F> {
static {
// 泛型过滤器
registerComponentHandler(new ParameterizedTypeReference<GenericFilter<Object>>() {
}, new ComponentHandler<GenericFilter<Object>>() {
private boolean result = true;
@Override
public void handle(GenericFilter<Object> filter, Source<?> source, ResultContainer resultContainer) {
result = filter.filter(source.getPayload(), source.getMetadata());
}
@Override
public boolean shouldContinue() {
return result;
}
});
// 普通过滤器
registerComponentHandler(Filter.class, new ComponentHandler<Filter>() {
private boolean result = true;
@Override
public void handle(Filter filter, Source<?> source, ResultContainer resultContainer) {
result = filter.filter(source);
}
@Override
public boolean shouldContinue() {
return result;
}
});
// 泛型处理器
registerComponentHandler(new ParameterizedTypeReference<GenericHandler<Object>>() {
}, (handler, s, r) -> {
Object newPayload = handler.handle(s.getPayload(), s.getMetadata());
s.setPayloadAs(newPayload);
r.setResult(s.getPayload());
});
// 普通处理器
registerComponentHandler(Handler.class, (handler, s, r) -> handler.handle(s));
}
FlowDefinition() {
}
public B filter(Filter filter) {
Assert.notNull(filter, MessageTemplates.notNull("filter"));
return addComponent(filter);
}
public <P> B filter(GenericFilter<P> filter) {
Assert.notNull(filter, MessageTemplates.notNull("filter"));
return addComponent(filter);
}
public <P> B filter(Class<P> payloadType, GenericFilter<P> filter) {
return filter(filter);
}
public B handle(Handler handler) {
Assert.notNull(handler, MessageTemplates.notNull("handler"));
return addComponent(handler);
}
public <P> B handle(GenericHandler<P> handler) {
Assert.notNull(handler, MessageTemplates.notNull("handler"));
return addComponent(handler);
}
public <P> B handle(Class<P> payloadType, GenericHandler<P> handler) {
return handle(handler);
}
public AggregatorBuilder<B, ? extends F> branches(Consumer<BranchesFlowBuilder> consumer) {
BranchesFlowBuilder builder = new BranchesFlowBuilder();
consumer.accept(builder);
return newAggregatorBuilder(builder);
}
public <K> AggregatorBuilder<B, ? extends F> routes(RouteMode routeMode, Function<Source<?>, K> matchKeyExtractor,
BiPredicate<K, K> matchPredicate, Consumer<StandardRouterFlowBuilder<K>> consumer) {
StandardRouterFlowBuilder<K> builder =
new StandardRouterFlowBuilder<>(matchKeyExtractor, matchPredicate, routeMode);
consumer.accept(builder);
return newAggregatorBuilder(builder);
}
@SuppressWarnings({ "unchecked", "rawtypes" })
private AggregatorBuilder<B, ? extends F> newAggregatorBuilder(AggregatableFlowBuilder<?, ?> builder) {
return new AggregatorBuilder(this, builder);
}
}
|
/**
* Search all hops for a hop where a certain transform is at the end.
*
* @param toTransform The transform at the end of the hop.
* @return The hop or null if no hop was found.
*/
public PipelineHopMeta findPipelineHopTo(TransformMeta toTransform) {
int i;
for (i = 0; i < nrPipelineHops(); i++) {
PipelineHopMeta hi = getPipelineHop(i);
if (hi.getToTransform() != null
&& hi.getToTransform().equals(toTransform)) {
return hi;
}
}
return null;
} |
/**
* @author Konstantin Bulenkov
*/
public class SearchEverywhereUI extends BorderLayoutPanel {
private SETab mySelectedTab;
public SearchEverywhereUI(@Nullable SearchEverywhereContributor selected) {
}
private class SETab extends JLabel {
public SETab(String tabName) {
super(tabName);
}
@Override
public Border getBorder() {
return JBUI.Borders.empty(0, 12);
}
@Override
public Color getBackground() {
return mySelectedTab == this ? new JBColor(0xdedede, 0x565a5e) : super.getBackground();
}
}
} |
<filename>src/settings.ts
import { HtmlUtility, RectangleSize } from "@fal-works/creative-coding-core";
/**
* The id of the HTML element to which the canvas should belong.
*/
export const HTML_ELEMENT_ID = "FarEast";
/**
* The HTML element to which the canvas should belong.
*/
export const HTML_ELEMENT = HtmlUtility.getElementOrBody(HTML_ELEMENT_ID);
/**
* The logical size of the canvas.
*/
export const LOGICAL_CANVAS_SIZE: RectangleSize.Unit = {
width: 800,
height: 800
};
/**
* If music should be enabled.
*/
export const ENABLE_MUSIC = true;
/**
* If canvas should be scaled so that it fits to the parent HTML element.
*/
export const ENABLE_CANVAS_SCALING = true;
/**
* The directory path of assets.
*/
export const ASSETS_DIRECTORY_PATH = "assets";
|
<reponame>dimafirsov/jira-templator<gh_stars>0
import { MainPagePo as main } from './MainPage.po';
import { SettingsPagePo as settings } from './SettingsPage.po';
describe('Main Page > ', () => {
beforeEach(() => {
cy.visit('/');
});
it('should contain expected text', () => {
cy.contains(main.page.header.homeTitleText);
cy.contains('No items selected');
cy.contains('Quick Access Board');
// cy.percySnapshot('Default view of the Main page');
cy.screenshot();
});
it('should navigate to Settings when clicked on corresponding link', () => {
cy.get('a').contains('Settings').click();
cy.get(settings.page.tab.el).contains(settings.page.tab.general.label).should('exist');
cy.get(settings.page.tab.el).contains(settings.page.tab.general.label)
.get('.nui-tab-heading')
.should('have.class', 'active');
});
it('should close the whats new card on Close button click', () => {
const icon = cy.get(main.page.whatsNewCard.closeIcon);
icon.click();
cy.contains(main.page.whatsNewCard.linkToChangeLogText).should('not.exist');
icon.should('not.exist');
// cy.percySnapshot('Should the whats new card be removed');
cy.screenshot();
});
it('should show the tooltip then hovered over the close icon', () => {
const icon = cy.get(main.page.whatsNewCard.closeIcon);
icon.trigger('onmouseover');
// cy.percySnapshot('Should show the tooltip over the close icon');
cy.screenshot();
});
it('should Settings button exist', () => {
const settingsButton = cy.get(main.page.header.settingsButton);
settingsButton.should('exist');
});
it('should Settings button lead to settings', () => {
const settingsButton = cy.get(main.page.header.settingsButton);
settingsButton.click();
cy.contains('General Settings');
});
});
|
<reponame>hafeez3000/vitess<gh_stars>0
// Copyright 2013, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package hourglass
import (
"container/heap"
"sync"
"testing"
"time"
)
// sandboxEvent abstracts sandboxTimer and sandboxTicker,
// which supports generic start/stop/trigger actions.
type sandboxEvent interface {
trigger()
targetTime() time.Time
}
// timerEventQueue holds scheduled sandboxTimer and sandboxTicker.
type timerEventQueue []sandboxEvent
var mu sync.Mutex
var currentTime time.Time
var eventQueue *timerEventQueue
// initSandboxMode enables sandbox mode.
// It resets sandbox time function when called with a start time.
func initSandboxMode(start time.Time) {
mu.Lock()
defer mu.Unlock()
currentTime = start
eventQueue = &timerEventQueue{}
heap.Init(eventQueue)
}
// InitSandboxTest initializes the sandbox mode in tests with a given start time.
func InitSandboxTest(_ *testing.T, start time.Time) {
initSandboxMode(start)
}
// InitSandboxBench initializes the sandbox mode in benchmarks with a given start time.
func InitSandboxBench(_ *testing.B, start time.Time) {
initSandboxMode(start)
}
// isSandboxMode returns true if currently it is in sandbox mode.
func isSandboxMode() bool {
return eventQueue != nil
}
// It implements heap interface for timerEventQueue
func (queue timerEventQueue) Len() int {
return len(queue)
}
func (queue timerEventQueue) Less(i, j int) bool {
return queue[i].targetTime().Before(queue[j].targetTime())
}
func (queue timerEventQueue) Swap(i, j int) {
queue[i], queue[j] = queue[j], queue[i]
}
func (queue *timerEventQueue) Push(x interface{}) {
*queue = append(*queue, x.(sandboxEvent))
}
func (queue *timerEventQueue) Pop() interface{} {
n := len(*queue)
popped := (*queue)[n-1]
*queue = (*queue)[:n-1]
return popped
}
// Advance the sandbox time by the duration d.
// It will panic if it is not called in sandbox mode.
func Advance(t *testing.T, d time.Duration) {
if !isSandboxMode() {
panic("func Hourglass.Advance can only be called in sandbox mode")
}
targetTime := currentTime.Add(d)
// notify Tick and Timer
for {
mu.Lock()
if eventQueue.Len() == 0 {
mu.Unlock()
break
}
event := heap.Pop(eventQueue).(sandboxEvent)
if event.targetTime().After(targetTime) {
// It encounters an event with scheduled time after advanced time,
// so it puts it back to the eventQueue and breaks.
heap.Push(eventQueue, event)
mu.Unlock()
break
}
// advance currentTime to the scheduled time of the processing event.
// So inside the trigger we have Now() == event.targetTime()
currentTime = event.targetTime()
mu.Unlock()
event.trigger()
}
// advance currentTime to the required time
mu.Lock()
currentTime = targetTime
mu.Unlock()
}
// Since returns the time elapsed since t, and is a replacement for time.Since.
// It is shorthand for hourglass.Now().Sub(t).
func Since(t time.Time) time.Duration {
return Now().Sub(t)
}
// Now returns the current local time, and is a replacement for time.Now.
// Sandbox time when in sandbox mode; system time otherwise.
func Now() time.Time {
if isSandboxMode() {
mu.Lock()
defer mu.Unlock()
return currentTime
}
return time.Now()
}
// Sleep pauses the current goroutine for the duration d, and is a replacement for time.Sleep.
func Sleep(d time.Duration) {
if isSandboxMode() {
// register for interrupt
<-newSandTimer(d).C
} else {
time.Sleep(d)
}
}
// RealSleep always pauses the current goroutine for duration d at system level.
// It will panic if it is not called in sandbox mode.
func RealSleep(t *testing.T, d time.Duration) {
if !isSandboxMode() {
panic("func Hourglass.RealSleep can only be called in sandbox mode")
}
time.Sleep(d)
}
// when is a helper function for setting the 'when' field of a sandboxTimer and sandboxTicker.
// It returns the future time, which is currentTime + d.
// If d is negative or zero, it is ignored by returning currentTime.
func when(d time.Duration) time.Time {
mu.Lock()
defer mu.Unlock()
if d > 0 {
return currentTime.Add(d)
}
return currentTime
}
// startEvent starts the sandboxEvent.
// If the scheduled time of the event is current or earlier, it calls function f immediately,
// otherwise it pushes the event into the event queue.
func startEvent(t sandboxEvent) {
mu.Lock()
currTime := currentTime
mu.Unlock()
if t.targetTime().After(currTime) {
mu.Lock()
heap.Push(eventQueue, t)
mu.Unlock()
} else {
go t.trigger()
}
}
// stopEvent stops the sandboxEvent.
// It removes the event from the event queue.
func stopEvent(t sandboxEvent) {
mu.Lock()
for i, item := range *eventQueue {
if item == t {
heap.Remove(eventQueue, i)
break
}
}
mu.Unlock()
}
// sandboxTimer implements the function of time.Timer in sandbox mode.
// They can be scheduled to trigger at a later time (when), with the scheduled Time or a callback function.
// Timer only triggers once.
type sandboxTimer struct {
C chan time.Time
started bool
when time.Time
callbackArg interface{}
}
// newSandTimer creates a new SandTimer that will send
// the sandbox time on its channel after at least duration d.
// If duration p is greater than 0, it is treated as a periodic ticker.
func newSandTimer(d time.Duration) *sandboxTimer {
c := make(chan time.Time)
t := &sandboxTimer{C: c, when: when(d), callbackArg: c, started: true}
startEvent(t)
return t
}
func (t *sandboxTimer) targetTime() time.Time {
return t.when
}
// trigger handles time-up action depending on the type of callbackArg.
// It sends the target time when if callbackArg is a channel,
// and calls the func in another goroutine if callbackArg is a func.
func (t *sandboxTimer) trigger() {
t.started = false
switch t.callbackArg.(type) {
case chan time.Time:
// Blocking send of time on sandboxTimer.callbackArg,
// which is also sandboxTimer.C.
// Used in NewTimer, it may block as the chan is synchronized.
// Used in NewTicker, it does not drop messages,
// as we assume callback will not be slower than the interval.
t.callbackArg.(chan time.Time) <- t.when
case func():
t.callbackArg.(func())()
}
}
// Reset changes the sandbox timer to expire after duration d, simulating time.Timer.Reset behavior.
// It returns true if the sandbox timer had been active,
// false if the sandbox timer expired or been stopped.
func (t *sandboxTimer) Reset(d time.Duration) bool {
active := t.started
if active {
stopEvent(t)
}
t.when = when(d)
t.started = true
startEvent(t)
return active
}
// Stop prevents the Timer from firing, simulating time.Timer.Stop behavior.
// It returns true if the call stops the timer, false if the timer has already expired or been stopped.
// Stop does not close the channel, to prevent a read from the channel succeeding incorrectly.
func (t *sandboxTimer) Stop() bool {
active := t.started
if active {
stopEvent(t)
t.started = false
}
return active
}
// Timer represents a system time.Timer, or a sandboxTimer.
// When the Timer expires, the current time will be sent on C,
// unless the Timer was created by AfterFunc.
type Timer struct {
C <-chan time.Time
sysTimer *time.Timer
sandTimer *sandboxTimer
}
// NewTimer creats a new Timer that will send the current time on its channel after at least duration d,
// and is a replacement of time.NewTimer.
func NewTimer(d time.Duration) *Timer {
if isSandboxMode() {
sandT := newSandTimer(d)
return &Timer{C: sandT.C, sandTimer: sandT}
}
sysT := time.NewTimer(d)
return &Timer{C: sysT.C, sysTimer: sysT}
}
// Reset changes the timer to expire after duration d, which is a replacement of time.Timer.Reset.
// It returns true if the timer had been active, false if the timer had expired or been fired.
func (t *Timer) Reset(d time.Duration) bool {
if isSandboxMode() {
return t.sandTimer.Reset(d)
}
return t.sysTimer.Reset(d)
}
// Stop prevents the Timer from firing, and is a replacement of time.Timer.Stop.
// It return true if the call stops the timer, false if the timer has already expired or been stopped.
// Stop does not close the channel, to prevent a read from the channel succeeding incorrectly.
func (t *Timer) Stop() bool {
if isSandboxMode() {
return t.sandTimer.Stop()
}
return t.sysTimer.Stop()
}
// After waits for the duration to elapse and then sends the current time on the returned channel,
// and is a replacement of time.After.
// It is equivalent to NewTimer(d).C.
func After(d time.Duration) <-chan time.Time {
return NewTimer(d).C
}
// AfterFunc waits for the duration to elapse and then calls f in its own goroutine,
// and is a replacement of time.AfterFunc.
// It returns a Timer that can be used to cancel the call using its Stop method.
func AfterFunc(d time.Duration, f func()) *Timer {
if isSandboxMode() {
sandT := &sandboxTimer{when: when(d), callbackArg: f, started: true}
startEvent(sandT)
return &Timer{sandTimer: sandT}
}
return &Timer{sysTimer: time.AfterFunc(d, f)}
}
// sandboxTicker implements the function of time.Ticker in sandbox mode.
// It can be scheduled to trigger periodically, with the scheduled Time sent on channel.
type sandboxTicker struct {
C chan time.Time
when time.Time
period time.Duration
}
func (t *sandboxTicker) targetTime() time.Time {
return t.when
}
// trigger handles time-up action for sandboxTicker.
// It queues itself with the next target time, and sends the target time.
func (t *sandboxTicker) trigger() {
// It must queue itself first before send the time.
// Otherwise if application code stops ticker right after it receives the time,
// a race condition may occur that the stop may fail because ticker has not been queued.
currTime := t.when
t.when = t.when.Add(t.period)
mu.Lock()
heap.Push(eventQueue, t)
mu.Unlock()
t.C <- currTime
}
// Stop prevents the Timer from firing, simulating time.Timer.Stop behavior.
// It returns true if the call stops the timer, false if the timer has already expired or been stopped.
// Stop does not close the channel, to prevent a read from the channel succeeding incorrectly.
func (t *sandboxTicker) Stop() {
stopEvent(t)
}
// newSandTimer creates a new SandTimer that will send
// the sandbox time on its channel after at least duration d.
// If duration p is greater than 0, it is treated as a periodic ticker.
func newSandTicker(d time.Duration) *sandboxTicker {
c := make(chan time.Time)
t := &sandboxTicker{C: c, when: when(d), period: d}
startEvent(t)
return t
}
// Ticker holds a channel that delivers ticks of a clock at intervals, and is a replacement of time.Ticker.
type Ticker struct {
C <-chan time.Time // The channel on which the ticks are delivered
sysTicker *time.Ticker
sandTicker *sandboxTicker
}
// NewTicker returns a new Ticker containing a channel that will send the
// time with a period specified by the duration argument,
// and is a replacement of time.NewTicker.
// It adjusts the intervals or drops ticks to make up for slow receivers.
// The duration d must be greater than zero; if not, NewTicker will panic.
func NewTicker(d time.Duration) *Ticker {
if d <= 0 {
panic("non-positive interval for NewTicker")
}
if isSandboxMode() {
sandT := newSandTicker(d)
return &Ticker{C: sandT.C, sandTicker: sandT}
}
sysT := time.NewTicker(d)
return &Ticker{C: sysT.C, sysTicker: sysT}
}
// Stop turns off a ticker. After being stopped, it will not send more ticks.
// Stop does not close the channel, to prevent a read from the channel succeeding.
// It is a replacement of time.Ticker.Stop.
func (t *Ticker) Stop() {
if isSandboxMode() {
t.sandTicker.Stop()
} else {
t.sysTicker.Stop()
}
}
// Tick is a convenience wrapper for NewTicker providing access to the ticking channel only,
// and is a replacement of time.Tick.
// Useful for clients that have no need to shut down the ticker.
func Tick(d time.Duration) <-chan time.Time {
if d <= 0 {
return nil
}
return NewTicker(d).C
}
|
#ifndef Music_h
#define Music_h
// Serial speed. match on the other side.
#define SERIAL_SPEED 19200 // baud
// LED pin to show we're playing
#define LED_PIN 13
// minimum volume to set [0-255]. 0 is loudest
#define MIN_MP3_VOL 100
// See: https://learn.adafruit.com/adafruit-vs1053-mp3-aac-ogg-midi-wav-play-and-record-codec-tutorial/simple-audio-player-wiring
// and player_interrupts example
// VS1053 mp3:
// SPI library requirements: http://arduino.cc/en/Reference/SPI
#define MP3_CLK 13 // SPI CLK
#define MP3_MISO 12 // SPI MISO
#define MP3_MOSI 11 // SPI MOSI
#define MP3_DREQ 2 // IRQ 1; set to 3 in the example; VS1053 Data request, ideally an Interrupt pin; called DREQ in the example
#define MP3_XDCS 3 // can move; set to 8 in the example; VS1053 Data/command select pin (output); called BREAKOUT_DCS in the example
#define MP3_SDCS 4 // can move; set to 4 in the example; Card chip select pin; called CARDCS in the example
#define MP3_CS 5 // can move; set to 10 in example; VS1053 chip select pin (output); called BREAKOUT_CS in the example
#define MP3_RST 6 // can move; set to 9 in the example; VS1053 reset pin (output); called BREAKOUT_RESET in the example
// holds the number of possible tracks to play in each gesture
// also holds the location
typedef struct
{
const char *loc;
int count;
} DirInfo;
#endif
|
/**
* Class encapsulating what the Cluster Controller knows about a distributor node. Most of the information is
* common between Storage- and Distributor- nodes, and stored in the base class NodeInfo.
*
* @author hakonhall
*/
public class DistributorNodeInfo extends NodeInfo {
public DistributorNodeInfo(ContentCluster cluster, int index, String rpcAddress, Distribution distribution) {
super(cluster, new Node(NodeType.DISTRIBUTOR, index), false, rpcAddress, distribution);
}
} |
Professional identity formation of medical students: A mixed-methods study in a hierarchical and collectivist culture
Background Professional identity formation (PIF) has been recognized as an integral part of professional development in medical education. PIF is dynamic: it occurs longitudinally and requires immersion in the socialization process. Consequently, in the medical education context, it is vital to foster a nurturing learning environment that facilitates PIF. Aim This study assesses PIF among medical students in various stages of study and explores their perceptions of PIF, with its contributing and inhibiting factors. Method This mixed-methods study uses a sequential explanatory approach with undergraduate (years 2, 4, and 6) and postgraduate medical students in Indonesia. We examine the subjects by administering an adapted questionnaire on PIF. We completed a series of FGDs following questionnaire administration. Quantitative and thematic analyses were conducted sequentially. Results & Discussion A total of 433 respondents completed the questionnaire. There were statistically significant differences among subjects on the subscales “Recognition and internalization of professional roles” and “Self-control in professional behavior”; the more senior students had higher scores. We conducted 6 FGDs in total. The results characterize PIF as a complex, dynamic, and longitudinal journey to becoming a medical doctor that is closely related to a student’s motivation. The FGDs also highlight the importance of both internal factors (students’ values, attributes, and personal circumstances) and external factors (curriculum, the learning environment, workplace-based learning, and external expectations) for PIF in medical education. Conclusion Higher-level students show higher scores in some aspects of PIF, which further validates the potential use of the questionnaire to monitor PIF, a dynamic process influenced by internal and external factors. Generating awareness among medical students and encouraging reflection on their PIF stage may be crucial for PIF processes. Supplementary Information The online version contains supplementary material available at 10.1186/s12909-022-03393-9.
Introduction
Medical professionalism encompasses multiple behaviors that may change over time and requires the professionals to picture themselves as the member of the medical professions who are able to provide excellent, ethical and altruistic patient care . It stands on basic principles such as excellence, accountability, altruism, and Open Access *Correspondence: [email protected] Findyartini et al. BMC Medical Education (2022) 22:443 humanism , as well as adherence to ethical principles, effective interactions with patients and their family members, effective interactions with the healthcare system, and commitment towards improvement for self, others and the system . It has been further emphasized that virtue-based and behavior-based professionalism in medicine should be strengthen by personal and professional identity formation . One way to anchor professional development is to have students recognize their own professional identity formation . This formation begins when they become medical students and continues after their graduation. A wide range of interactions with teachers, peers, senior colleagues, and the broader medicine/healthcare community immerses medical students in the socialization process , which is central to PIF . Consequently, a supportive community of practice and a nurturing learning environment are important for medical students to internalize professional attitudes . In a clinical setting, professional identity helps healthcare professionals define practice boundaries and reduce role confusion in teamwork . Thus, it facilitates the advocacy of professional opinions for both practitioners and educators . A scoping review on PIF among medical students highlights that it is a multifactorial phenomenon which involves a continuous construction and deconstruction of individual, relational and societal identities. This dynamic nature can be influenced by individual values and beliefs and their interactions with environmental factors including clinical and non-clinical experiences of medical students .
In medical education, Kegan's model is acknowledged by researchers as deeply analyzing the PIF process in medical students. Based on this model, we categorize PIF into 6 stages: the incorporation, impulsion, imperial, interpersonal, institutional, and inter-individual stages. It is believed that students undergo stages 2-4 during medical education . In stage 2 (the imperial stage), medical students are expected to recognize and follow professional rules without adequate self-reflection. As PIF advances in stage 4 (the institutional stage), medical students develop to understand relationships in terms of different values and expectations. Eventually, they become more reflective and can internalize professional and institutional values . Measurements have been developed to identify the PIF stages of medical students, using questionnaires based on Kegan's model .
Numerous methods can assess professional identity development, including students' reflections and a validated questionnaire. The latter can be used over time, which is critical for understanding dynamic development (e.g., Tagawa M, 2019 , Tagawa M, 2020 ). Studies on PIF among medical students are usually conducted by exploring this phenomenon in a given context, using focus group discussions on related topics . Another way to study PIF is to measure students' development through a professional identity essay (PIE) filled with responses to several prompts .
These approaches encourage students to consciously consider their professional identity development . For instance, personal narrative reflection encourages students to sense their current being as a student. This helps them reflect on any experience of identity dissonance and to narrate their future aspirations as healthcare professionals . Additionally, revealing the development of professional identity from the subconscious level generates further discussions with peers, senior colleagues, and medical teachers as mentors . Eventually, it can help students reshape and negotiate their professional identity.
Studies show that the professional development of medical students and residents, including misconduct in medical education, may predict future unprofessional behavior in practice . Further studies also highlighted unprofessional behaviors among medical students as caused by challenges in their reflectiveness and adaptability. Those behaviors require further identification of underlying problems, remediation and even case dismissal if necessary . Furthermore, a study in a hierarchical and collectivist culture underscores the strong influence of the culture towards clinical year students' responses when they encounter professional dilemma , showing that professionalism and professional identity formation are always contextual and should consider sociocultural backgrounds .
Therefore, as studies about professional identity formation of medical students have been extensively conducted in western contexts , we would like to explore the PIF of medical students in Indonesia-a country with hierarchical and collectivist cultural backgrounds, in which the society accept inequality in power (superiority and subordinary) and prioritize on connectedness . Studies on PIF of medical teachers in this setting suggests the strong incorporation of religious values, family influences and societal recognition in their PIF . PIF studies on medical students in this cultural setting, on the other hand, is rather limited.
Our study therefore is expected to yield further information in this specific context regarding the roles of individuals and institutions in PIF of medical students. In addition, studies aiming to measure PIF using a quantitative tool and to explore it using qualitative approaches are usually conducted separately. Therefore, considering the role of medical schools and the importance of PIF for medical students, we would like to measure PIF at various stages of medical training and explore students' perceptions of PIF and its contributing/inhibiting factors sequentially. Our research questions are three-folds: a. What is the validity of an adapted PIF questionnaire in Indonesia context?; b. What are the measures of PIF of students at various stages of medical education?; c. How do students perceive PIF and its contributing/inhibiting factors? The validation and use of instruments to measure PIF can further support professional development in medical students through the identification of 'where they are at' and the exploration of contributing/inhibiting factors are expected to further inform medical schools to support and nurture the PIF contextually.
Context
The study was conducted at Faculty of Medicine Universitas Indonesia, a medical school that is home to more than 40 undergraduate and postgraduate medical programs. The undergraduate program has the largest numbers of students among other programs. Students of the undergraduate and postgraduate programs involved in this study were enrolled in a competency-based medical curriculum in their respective programs.
Design
This is a mixed-methods study using a sequential explanatory approach . We selected this approach to gain a comprehensive understanding of PIF among medical students and residents, using systematic quantitative and qualitative measures, as PIF is a complex phenomenon that requires a deep and reflective understanding of its stage and dynamic processes . The purpose of using mixed methods approach in this study was to provide a more thorough qualitative description to explain further about the findings from the quantitative stage . While the quantitative measurement of PIF using validated questionnaire in this study was aimed to provide the PIF profiles of medical students across study years, further exploration through FGDs was intended to provide the dynamic processes of the PIF.
Respondents
The study involved undergraduate medical students (years 2, 4, and 6) and postgraduate medical students or residents (years 2-3 of each program). Their involvement at these levels was expected to facilitate the study aim of observing differences in PIF questionnaire scores to better understand PIF among students at different year levels.
Quantitative stage
a. Instrument.
The questionnaire in this study was adapted from a questionnaire developed by Tagawa . The use of the questionnaire was supported by the construct validity and good reliability of the questionnaire which is aligned with the PIF stages of medical students based on Kegan's model. The opportunity to capture the different levels of PIF using the questionnaire was critical in this study. This was translated from English into Indonesian and backtranslated to assure meaning comparability and content validity (see Table 1). The translations were completed by a professional translator and curated by the authors (AF, EF, NG), who have expertise in medical education and have been studying PIF in medical education. Following translation, we used the questionnaire to complete a cognitive interview involving three authors (TZA, MAF, and MF), who are current undergraduate medical students at FMUI, as well as 5 other students who did not participate in the survey. Subsequent amendments to the Indonesian translation were made to relevant items to improve clarity and facilitate appropriate responses. Each revision involved a back-translation amendment and check of the meaning comparability with the original items.
b. Data collection
In the first stage of the study, we administered the translated PIF questionnaires developed by Tagawa to undergraduate medical students year two, four, and six and residents year two. We involved residents year two in this study as they resembled groups of practicing doctors so that we could explore the PIF process more comprehensively. We employed a total sampling approach, with a target response rate of 60-70% of each group of respondents. All potential respondents were invited through an online broadcast via the group leaders and study program coordinators. It was emphasized to the potential respondents that their participation was voluntary and would not affect their ongoing study and evaluation. Data collection was completed from August-September 2020, and several reminders were sent out to increase the response rate.
After administering the questionnaire, using SPSS IBM 27 we completed exploratory factor analysis (EFA) to identify latent variables in the questionnaire by developing factors or dimensions constructed by strongly correlated items . We aimed to compare the factors identified in our analysis to those in the original questionnaire . We conducted an EFA with Principal Axis Factoring (PAF) to support the construct validity of our PIF questionnaire.
Following the instrument validation, further data analysis was conducted to compare and contrast the scores of PIF among the four groups of respondents. Given the abnormal distribution of the data, non-parametric tests, Kurskall-Wallis were completed to analyze the median difference of the four groups, followed by Mann-Whitney as a post-hoc analysis).
Qualitative stage
Following the data analysis of the quantitative phase, focus group discussions were conducted to further explore the findings, particularly to explore the perceptions in regards to the PIF process and the factors that contribute and inhibit it. Focus group questions were developed based on a concept of PIF integrated with socialization theory, as well as Kegan's model (Appendix 2).
In order to best represent views on PIF, focus group (FG) participants were purposively selected using maximum variety sampling approach from those who filled out the questionnaires and agreed to be invited to a focus group session . The maximum variety sampling approach was used to select the FG participants, accounting for representativeness regarding gender and study program (for residents). Two FGs were conducted for each class group (years 2, 4, and 6) of undergraduate program; two other FGs were conducted for residents in both surgical and nonsurgical study programs.
All FGs were moderated by the core research teams who were medical educationalists in the institution with no involvement in the assessment process of students or residents participating in the FGs. All FGs were conducted online using video conference platforms due to the COVID-19 pandemic ongoing at time. Focus groups were recorded in the platform for further analysis.
The qualitative data obtained were transcribed verbatim and analyzed using a thematic analysis using inductive and deductive approach according to the related theory of PIF using the Steps for Coding and Theorisation (SCAT) method . The initial thematic analysis followed by initial discussion to identify the core themes and subthemes was conducted on two transcripts independently by two authors who were also the FG moderators prior to further analysis of all transcripts. The study was approved by the Research Ethical Committee of the Faculty of Medicine Universitas Indonesia (Number: KET-497/UN2.F1/ETIK/PPM.00.02/2020).
Questionnaire validation
We performed EFA using PAF with oblique rotation. The EFA contains several steps. First, our analysis using the Kaiser-Meyer-Olkin (KMO) and Bartlett's Test of Sphericity showed that the data fulfilled the initial criteria of the EFA (KMO = 0.831 and Bartlett's Test of Sphericity = X2 1.357 (105), p 0.000). Second, the questionnaire items were correlated, factors were extracted, and oblique rotation was conducted. The eigenvalue and scree plot were used to determine the number of retained factors (Appendix 1). All items were loaded strongly (> 0,4), especially in one factor. There were no cross-loadings and each factor consisted of at least 3 items, leading to adequate support for the constructed factors (Table 1). The interpretation of conceptual meaning of the constructed factors resulted in 4 factors/subscales: recognition and internalization of professional roles (items 8,9,12,14); self-control in professional behavior (items 3, 6, 7, 15); reflections on professionalism (items 10, 11, 13); and thought processes as a medical/ health professional (items 1, 2, 4, 5).
The Cronbach's alphas of the overall scale and each subscale were calculated to assess the internal consistency of the questionnaire. The reliability of the overall scale was 0.776, while that of subscales 1-4 were 0.662, 0. 661, 0.627, and 0.522, respectively; these are quite satisfactory results, with the exception of subscale 4 .
Quantitative stage
A total of 443 respondents participated in the survey stage, with 106 (23.9%), 110 (24.8%), 108 (24.4%), and 119 (26.9%) participants in year 2, year 4, year 6, or stage 2 (residents), respectively. The response rate at each level was 46-71% of total respondents in each group. Univariate analysis of the questionnaire is described in Table 2. Table 3 presents further analyses of the score comparisons for undergraduate medical students in years 2, 4, and 6, as well as stage 2 residents. Table 3 shows a total PIF score difference among the 4 groups and indicates that year 6 students and stage 2 residents had higher scores than the other two groups, although these differences are not statistically significant. The significant subscale score differences are observed in subscales 1 and 2 regarding "Recognition and internalization of professional roles" and "Self-control towards professional behaviors", respectively. The post-hoc analysis using the Mann-Whitney test results is described as follows, with the use of adjusted Bonferroni p , we should understand how the progress of the disease. " -At, second-year student.
Personal Circumstances
Personal circumstances, such as whether a student is facing burnout or emotional exhaustion, affect the professional development process. Other personal qualities, such as self-expectations and a sense of competence, are also critical in professional development:
External factors
Some of the external factors affecting PIF are the curriculum, education system, learning environment, workplace-based learning, and external expectations.
Curriculum
Participants revealed that curriculum plays an important role in PIF. Burdensome tasks and assignments, one-way lectures, and monotonous teaching and learning methods can hinder professional development and dampen the desire for lifelong learning, particularly due to the protracted study period in medical education. This occurs more frequently during the transition stage, at the end of the preclinical stage. The score-oriented paradigm was also mentioned as an inhibiting factor in professional development, because it could damage students' integrity: "I used to learn very diligently when I was in the first year. As time goes by, the learning materials are added up but the approaches are very similar. It feels like a repeating pattern, and what I usually do now is study only to pass the exam and avoid remedials. " -C, fourth-year student.
Medical students also highlighted the importance of explicit teaching/learning activities and called for professionalism assessments to be integrated into the curriculum. Students also demanded a code of conduct regarding standardized professional and unprofessional behaviors and consistent practices among all stakeholders, as students felt that there was a discrepancy between what is taught and what is observed in daily practice.
"As I progress through medical school, I see more differences between the rules being taught and the behavior of people, showing decreased levels of integrity. " -Q, final-year student.
Because clinical skills are considered important, students value a curriculum that provides early clinical exposure during the preclinical stages. However, clinical students reported that clinical rotations conducted departmentally somewhat inhibited their professional development: "What I think makes it difficult to grasp the idea of being a professional medical doctor is that, in some clinical rotations, we only learn specifically about a particular discipline and pay less attention to the basic clinical skills and the clinical experiences . " -H, finalyear student.
Students reported that curriculum adaptations due to the COVID-19 pandemic (ongoing at the time of this study) created anxiety in their efforts to reach competency.
Learning Environment
In terms of the learning environment, students experienced situations in which things were not done exactly as they had been taught (hidden curriculum). In practice, numerous factors may preclude taking an ideal approach: "We realize that learning is not entirely about knowing the subject matter. As you become involved in patient care, you see that you need more than that. And sometimes what we are taught does not align with the reality in practice. " -E, final-year student.
To deal with the complexity in the learning environment, medical students and residents emphasized the roles of teachers in their professional development. They value teachers as more authoritative figures who serve as good role models, provide feedback, and nurture students: "Through bedside teaching while examining patients, we observe how attendings communicate and treat patients, and we can adopt it. Also, when attendings observe us , it really helps us to learn how to be professional. " -Ft, resident.
Respondents also highlighted the importance of support systems from study program administrators, peers, and family. They also credited interactions through extracurricular activities and student organizations: "The student body and organizations are really important because they help us get used to managing time and interacting with many different kinds of people. It also helps us make a strong commitment and be responsible and professional. "-Sh, second-year student.
The hierarchical nature of medical education often results in negative role modeling practices and bullying. The respondents described this issue as inhibiting their professional development process: "Interaction between senior and junior residents is not always smooth. Now that I am in , I finally understand the reason why they did what they did. But for me, I choose to do it differently. " -Yi, resident.
Workplace-Based Learning
Preclinical students stated that they learned a lot about being professional during their shadowing sessions with teachers. Shadowing sessions were conducted in a module in which students were given an opportunity to shadow their clinical teachers in medical practice, thus visualizing their future occupation as medical doctors. Interacting with standardized patients also helped them develop their professional identity: "For me personally, the shadowing session really created a perception on what ideal and professional doctors were, and how they act. " -K, fourth-year student Clinical students mentioned the importance of interacting with patients during their clinical clerkship. The experience of learning in various hospitals and healthcare facilities helped them grasp not only their roles as medical doctors, but also the challenges commonly faced in the workplace: "Working as junior doctors in the primary health setting was really different from the theory being taught during these medical school years. And it gives me a clearer view that we are exposed to this situation so that we can always be professional regardless of the situation and limitations in the field. " -Y, final-year student.
For residents, prior experience in working as general practitioners also helped them develop their professional identity: "It took me several years before finally deciding to continue with residency; I was an intern in a suburb area for one year, followed by working in a military hospital for another year, and then I moved to the city and worked in a private hospital for four years. Then I decided to continue with the residency program. " -F, resident.
Expectations of Surroundings
In the process of internalizing professionalism, students paid attention to the expected behaviors of medical students from the community, as well as from their teachers: "I have to admit that one of the ways we learn is to follow our teachers' expectations. Sometimes it was good because it resembles the ideal doctor, but sometimes we only try to please the teacher, not to understand the knowledge itself. " -H, final-year student.
Discussion
Our research on PIF among medical students utilizes a mixed-methods (sequential explanatory) approach to measure the development of PIF at various stages of medical education. We explore students' perceptions of PIF, along with its contributing and inhibiting factors. To measure PIF, we have adapted a validated questionnaire by Tagawa (2019Tagawa ( , 2020 and further analyzed it systematically to provide evidence for its content and construct validity and reliability. Thus, our use of the questionnaire in this setting was justified and supported by robust instrument preparation . The four factors identified from the EFA-recognition and internalization of professional roles, self-control in professional behavior, reflections on professionalism, and thought processes as a medical/health professional-align with the PIF conceptual frameworks . Tagawa's original questionnaire (Tagawa 2019, Tagawa 2020) consists of 15 items categorized into 5 factors: selfcontrol as a professional, awareness of being a medical doctor, reflection as a medical doctor, execution of social responsibility, and external and internal self-harmonization . These factors align with our EFA results and with the PIF concept, despite some categorization differences. In our study, recognition and internalization of professional roles (Factor 1) encompasses items that carry direct meaning for how students internalize professionalism as part of becoming medical doctors. The second factor, self-control in professional behavior, includes examples of how medical students control themselves upon encountering potential emotional or non-supportive conditions influencing their professional behavior. This factor and its items are similar to those in Tagawa's questionnaire. The third factor we identify (reflections on professionalism) is similar to Tagawa's third factor (reflection as a medical doctor). Both factors include items related to aspects that affect self-evaluation, such as long-term effects and personal values. Unlike Tagawa's questionnaire, the third factor in our study also included item 13, which further highlights personal values in reflections on professionalism. Meanwhile, item 9, which is included in Tagawa's third factor, was identified as part of the first factor in our study (recognition and internalization of professional roles). Items identified as part of "thought process as a medical/health professional" (Factor 4) in this study were included under the factor "selfcontrol as a professional" in Tagawa's study.
Further analysis of the quantitative data reveals differences in subscale 1 (recognition and internalization of professional roles) and subscale 2 (self-control in professional behavior) among undergraduate medical students in years 2, 4, 6 and stage 2 residents; more advanced groups exhibited higher scores. Since it is expected that more experience and a better socialization process in medical education and healthcare would yield a more developed professional identity, this study demonstrates that the use of the PIF questionnaire supports this construct and may enable institutions to initially assess medical students' PIF stage, before exploring and nurturing it further through various strategies . According to socialization theory , lower PIF questionnaire scores may reflect legitimate peripheral positions of the students in the community of practice as medical doctors. Students still bring in their personal identity, motivation, and family/friends' influences. The higher the score, the more students transition into the community of practice towards full participation which highlights their increased capacity to 'think and act' like professionals. Medical schools have critical roles in nurturing the PIF of medical students since the socialization process can be facilitated through meaningful learning experience both in preclinical and clinical years, the availability of role models and mentors, explicit curriculum and assessment for professional development, students' self-reflection skills and positive learning environment .
Aligned with the above discussion, the current study provides further explanation from the qualitative data revealed in the current setting, which depicts two primary themes: the process of PIF in medical students and the factors affecting PIF. First, the PIF process in medical students is initiated by students' motivation to become medical doctors. This study reveals that a student's motivation can originate intrinsically or extrinsically, which further influences how students see themselves and their surroundings and how the interactions of multiple factors contribute to their goals and performances. The three key components elaborated in the Self-Determination (SDT) Theory-autonomy, relatedness, and competence -further explain how motivations are central to the PIF process. Stronger intrinsic motivations have positive impacts on PIF, such as improved empathy development .
Furthermore, the students in this study were aware that PIF is a journey; they saw themselves as progressing towards what they envision as their future selves as professional medical doctors. Despite the array of motivations identified in this study, students from various year levels and residents articulated a common vision of the attributes of professional medical doctors. Their visions spanned the necessary knowledge and skills, the need to become lifelong learners, the centrality of personal wellbeing, and the importance of people skills such as communication, teamwork, empathy, and self-awareness. This envisioning of what they are becoming, supported by intrinsic motivations, indicates the progression of their PIF .
In addition, we reveal that external factors play critical roles in the PIF process; these factors intercalate with internal factors in medical students, resulting in their professional development, showing a psychosocial transition . Because students demonstrated awareness that PIF is a deliberate process and that they were currently in the transition stage, students should be supported so they can adapt successfully; these efforts should account for students' personal circumstances, support systems, and learning strategies . This is particularly emphasized in the current study which highlights the hierarchical and collectivist culture .
In this study, in line with the results of scoping review on undergraduate medical students' PIF , students mentioned the curriculum (including the hidden curriculum), the learning environment, workplace-based learning, and expected behaviors from the surroundings as external factors affecting their PIF processes. These external factors affect the context in which the transition occurs . Opportunities to have role models, interact with patients, and receive feedback were described as supportive in the PIF process. However, the practice of a hidden curriculum, as well as the ongoing pandemic, create uncertainty in this process. As the heart of PIF was to accept and adapt with changes, reflective interactions discussing this uncertainty have become crucial for the PIF process . Encouragement of such reflective inquiries by students is necessary as it would facilitate their learning and their ability to take advantage for their professional development, even from the negative role modelling . Coming from a culture where uncertainty tends to be highly avoided, this study underscores the importance of a more teacher-driven, structured, longitudinal approach, providing clear guidance and guidelines for students, to conduct reflective practice and in seeking feedback from their mentors .
Ideally, these external factors can be addressed with support throughout the transition, for example, by ensuring the availability, quality, and relevance of an institutional support network for students . The results of our study show that some of these external factors hinder more than support the process. For example, the informants in this study suggest that the interaction between senior-junior students and between teacher and students can be very hierarchical and not always constructive towards their understanding of their roles and professional development. Considering that identity is dynamic and that PIF among medical students is highly influenced by informal out-of-classroom interactions with other members of the professions, educational institutions should provide adequate network and institutional support for PIF through more casual interactions in various learning settings, in order to foster successful transformations .
This study has several implications for medical education and the professional development of medical students and residents, in particular in the collectivist and hierarchical setting. First, PIF is an active and longitudinal process that requires motivation to control the dialogue of internal and external factors within oneself. Therefore, student-centered and personalized learning opportunities enriched with reflection and mentoring are necessary in medical schools to nurture motivation and a positive PIF process. Our study shows the importance of motivation and other personal factors, such as coping mechanisms, in students' resilience in their medical education endeavor, which is instrumental for PIF . Second, medical students must consider what they are becoming and where they are in this process. Consequently, measurements of PIF using a questionnaire, as applied in this study, can be a useful metric for assessing PIF among medical students. Of course, this approach should be implemented alongside further reflective discussions to help students gain a meaningful understanding of their PIF process. Third, given the role of external factors, we also highlight the need to modify and optimize curricula to support PIF where appropriate, such as by incorporating more interactive teaching/learning sessions, integrated and relevant clinical rotations, positive role-modeling, early workplace-based learning, and feedback and mentoring in the preclinical and clinical stages.
We acknowledge the limitations of this study. It was conducted in a single institution, which may limit its generalizability, given some contextual factors. We involved medical students from different year levels and adopted a mixed-methods approach to elucidate the PIF profiles of medical students and perform in-depth analysis of its nature and contributing factors; we hope that our findings will prove relevant in other settings. In addition, the first stage of this study employed a cross-sectional approach. Therefore, although this study found some significant differences in PIF subscales (with higher scores for higher-level students), it could not elaborate the actual PIF development. Further studies should utilize the questionnaire longitudinally to assess PIF over time and document the narratives of PIF at the respective levels.
Conclusion
This study demonstrates a cross-cultural validity of the Tagawa PIF scales with modified four subscales: recognition and internalization of professional roles, self-control in professional behavior, reflections on professionalism and thought processes as a medical/health professional. Assessing PIF among medical students at different stages in a hierarchical and collectivist culture using the adapted PIF scales, our study demonstrates the PIF transition across educational stages, affected by internal factors (students' values, abilities and traits, and personal circumstances) and external factors (curriculum, learning |
// Handover decides if a node should transfer its current role to another
// node. This is typically run when the node is shutting down and is hence going to be offline soon.
//
// Return the role that should be handed over and list of candidates that
// should receive it, in order of preference.
func (c *RolesChanges) Handover(id uint64) (client.NodeRole, []client.NodeInfo) {
node := c.get(id)
if node == nil {
return -1, nil
}
if node.Role != client.Voter && node.Role != client.StandBy {
return -1, nil
}
peers := c.list(node.Role, true)
for i := range peers {
if peers[i].ID == node.ID {
peers = append(peers[:i], peers[i+1:]...)
break
}
}
domains := c.failureDomains(peers)
candidates := c.list(client.Spare, true)
if node.Role == client.Voter {
candidates = append(c.list(client.StandBy, true), candidates...)
}
if len(candidates) == 0 {
return -1, nil
}
c.sortCandidates(candidates, domains)
return node.Role, candidates
} |
/**
* A serialization capability entry consisting of format and schema.
*
* @author Stefan Haun ([email protected])
*
*/
@Immutable
public class SerializationCapability {
private final String format;
private final String schema;
public SerializationCapability(String format, String schema) {
super();
this.format = format;
this.schema = schema;
}
public String getFormat() {
return format;
}
public String getSchema() {
return schema;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((format == null) ? 0 : format.hashCode());
result = prime * result + ((schema == null) ? 0 : schema.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SerializationCapability other = (SerializationCapability) obj;
if (format == null) {
if (other.format != null)
return false;
} else if (!format.equals(other.format))
return false;
if (schema == null) {
if (other.schema != null)
return false;
} else if (!schema.equals(other.schema))
return false;
return true;
}
public static List<SerializationCapability> retrieveSerializationCapabilities() {
final List<SerializationCapability> result = new ArrayList<SerializationCapability>();
for (final String schema : SchemaRegistry.getInstance()
.getAvailableSchemas()) {
final SerializationProvider prov = SchemaRegistry.getInstance()
.getSerializationProvider(schema);
for (final String format : prov.availableFormats())
result.add(new SerializationCapability(format, schema));
}
return result;
}
} |
<reponame>std282/dmf2smps
package freqs
import "math"
var smpsFMtable = [12]int{
//0x25E, // B
0x284, // C
0x2AB, // C#
0x2D3, // D
0x2FE, // D#
0x32D, // E
0x35C, // F
0x38F, // F#
0x3C5, // G
0x3FF, // G#
0x43C, // A
0x47C, // A#
0x4BC, // B
}
// getEquFreqFM returns equivalent matched FM frequency
func getEquFreqFM(note byte, disp int) int {
var octave uint
note -= 0x81
for note >= 12 {
note -= 12
octave++
}
return (smpsFMtable[note] + disp) << octave
}
func approxFreqFM(freq int) (note byte, disp int8) {
// Marginal frequency - maximum frequency that is representable in one FM
// octave range.
marginFreq := func() int {
freqB := float64(smpsFMtable[11])
quarterToneMult := math.Pow(2, 0.5/12)
return int(freqB * quarterToneMult)
}()
// Computing pre-multiplied frequency
noteOctaveShift := 0
for freq > marginFreq {
freq /= 2
noteOctaveShift += 12
}
// Looking for note whose frequency is the closest to pre-multiplied
minDisp := 65536
noteSemitoneShift := 0
for noteVal, noteFreq := range smpsFMtable {
disp := freq - noteFreq
if abs(disp) < abs(minDisp) {
minDisp = disp
noteSemitoneShift = noteVal
}
}
// Following switch-case is really unlikely to happen
warnAboutOverflow := func(got, set int) {
logWarn.Printf(
"FM frequency approximation resulted in note displacement overflow; need %d, in fact set %d",
got,
set,
)
}
switch {
case minDisp < -128:
warnAboutOverflow(minDisp, -128)
minDisp = -128
case minDisp > 127:
warnAboutOverflow(minDisp, 127)
minDisp = 127
}
note = byte(0x81 + noteSemitoneShift + noteOctaveShift)
disp = int8(minDisp)
return
}
// OptimizeFM finds optimal match for note and its displacement. That is, it
// finds such note that the displacement is as small as possible.
func OptimizeFM(inNote byte, inDisp int) (outNote byte, outDisp int8) {
freq := getEquFreqFM(inNote, inDisp)
outNote, outDisp = approxFreqFM(freq)
return
}
// DisplaceFM displaces optimized note to specified amount of semitones
func DisplaceFM(inNote byte, inDisp int8, semitones float64) (outNote byte, outDisp int8) {
freq := func() int {
orig := getEquFreqFM(inNote, int(inDisp))
mult := math.Pow(2, semitones/12)
resFreq := float64(orig) * mult
return int(resFreq)
}()
outNote, outDisp = approxFreqFM(freq)
return
}
// DisplaceRawFM displaces unoptimized note to specified amount of semitones
func DisplaceRawFM(inNote byte, inDisp int, semitones float64) (outNote byte, outDisp int8) {
freq := func() int {
orig := getEquFreqFM(inNote, inDisp)
mult := math.Pow(2, semitones/12)
resFreq := float64(orig) * mult
return int(resFreq)
}()
outNote, outDisp = approxFreqFM(freq)
return
}
|
/**
* Salesforce v1 stores the Cotrainer with the Trainee record and not the Trainer record... #hackamania
* @param batchTrainer
* @return
*/
public Trainer transformCoTrainer(SalesforceTrainee batchTrainer) {
Trainer trainer = new Trainer();
if (batchTrainer == null) {
return null;
}
trainer.setName(batchTrainer.getName());
String email = guessEmail(batchTrainer.getName());
if (email != null) {
trainer.setEmail(email);
logger.info("Guessed co-trainer email as: " + email);
return trainer;
}else {
return null;
}
} |
"""
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 file is originally from: https://bitbucket.org/hpk42/py, specifically:
https://bitbucket.org/hpk42/py/src/980c8d526463958ee7cae678a7e4e9b054f36b94/py/_xmlgen.py?at=default
by holger krekel, holger at merlinux eu. 2009
"""
import re
import sys
if sys.version_info >= (3, 0):
def u(s):
return s
def unicode(x):
if hasattr(x, "__unicode__"):
return x.__unicode__()
return str(x)
else:
def u(s):
return unicode(s)
# pylint: disable=W1612
unicode = unicode
class NamespaceMetaclass(type):
def __getattr__(self, name):
if name[:1] == "_":
raise AttributeError(name)
if self == Namespace:
raise ValueError("Namespace class is abstract")
tagspec = self.__tagspec__
if tagspec is not None and name not in tagspec:
raise AttributeError(name)
classattr = {}
if self.__stickyname__:
classattr["xmlname"] = name
cls = type(name, (self.__tagclass__,), classattr)
setattr(self, name, cls)
return cls
class Tag(list):
class Attr(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
def __init__(self, *args, **kwargs):
super(Tag, self).__init__(args)
self.attr = self.Attr(**kwargs)
def __unicode__(self):
return self.unicode(indent=0)
__str__ = __unicode__
def unicode(self, indent=2):
l = []
SimpleUnicodeVisitor(l.append, indent).visit(self)
return u("").join(l)
def __repr__(self):
name = self.__class__.__name__
return "<%r tag object %d>" % (name, id(self))
Namespace = NamespaceMetaclass(
"Namespace",
(object,),
{
"__tagspec__": None,
"__tagclass__": Tag,
"__stickyname__": False,
},
)
class HtmlTag(Tag):
def unicode(self, indent=2):
l = []
HtmlVisitor(l.append, indent, shortempty=False).visit(self)
return u("").join(l)
# exported plain html namespace
class html(Namespace):
__tagclass__ = HtmlTag
__stickyname__ = True
__tagspec__ = dict(
[
(x, 1)
for x in (
"a,abbr,acronym,address,applet,area,b,bdo,big,blink,"
"blockquote,body,br,button,caption,center,cite,code,col,"
"colgroup,comment,dd,del,dfn,dir,div,dl,dt,em,embed,"
"fieldset,font,form,frameset,h1,h2,h3,h4,h5,h6,head,html,"
"i,iframe,img,input,ins,kbd,label,legend,li,link,listing,"
"map,marquee,menu,meta,multicol,nobr,noembed,noframes,"
"noscript,object,ol,optgroup,option,p,pre,q,s,script,"
"select,small,span,strike,strong,style,sub,sup,table,"
"tbody,td,textarea,tfoot,th,thead,title,tr,tt,u,ul,xmp,"
"base,basefont,frame,hr,isindex,param,samp,var"
).split(",")
if x
]
)
class Style(object):
def __init__(self, **kw):
for x, y in kw.items():
x = x.replace("_", "-")
setattr(self, x, y)
class raw(object):
"""just a box that can contain a unicode string that will be
included directly in the output"""
def __init__(self, uniobj):
self.uniobj = uniobj
class SimpleUnicodeVisitor(object):
"""recursive visitor to write unicode."""
def __init__(self, write, indent=0, curindent=0, shortempty=True):
self.write = write
self.cache = {}
self.visited = {} # for detection of recursion
self.indent = indent
self.curindent = curindent
self.parents = []
self.shortempty = shortempty # short empty tags or not
def visit(self, node):
"""dispatcher on node's class/bases name."""
cls = node.__class__
try:
visitmethod = self.cache[cls]
except KeyError:
for subclass in cls.__mro__:
visitmethod = getattr(self, subclass.__name__, None)
if visitmethod is not None:
break
else:
visitmethod = self.__object
self.cache[cls] = visitmethod
visitmethod(node)
# the default fallback handler is marked private
# to avoid clashes with the tag name object
def __object(self, obj):
# self.write(obj)
self.write(escape(unicode(obj)))
def raw(self, obj):
self.write(obj.uniobj)
def list(self, obj):
assert id(obj) not in self.visited
self.visited[id(obj)] = 1
for elem in obj:
self.visit(elem)
def Tag(self, tag):
assert id(tag) not in self.visited
try:
tag.parent = self.parents[-1]
except IndexError:
tag.parent = None
self.visited[id(tag)] = 1
tagname = getattr(tag, "xmlname", tag.__class__.__name__)
if self.curindent and not self._isinline(tagname):
self.write("\n" + u(" ") * self.curindent)
if tag:
self.curindent += self.indent
self.write(u("<%s%s>") % (tagname, self.attributes(tag)))
self.parents.append(tag)
for x in tag:
self.visit(x)
self.parents.pop()
self.write(u("</%s>") % tagname)
self.curindent -= self.indent
else:
nameattr = tagname + self.attributes(tag)
if self._issingleton(tagname):
self.write(u("<%s/>") % (nameattr,))
else:
self.write(u("<%s></%s>") % (nameattr, tagname))
def attributes(self, tag):
# serialize attributes
attrlist = dir(tag.attr)
attrlist.sort()
l = []
for name in attrlist:
res = self.repr_attribute(tag.attr, name)
if res is not None:
l.append(res)
l.extend(self.getstyle(tag))
return u("").join(l)
def repr_attribute(self, attrs, name):
if name[:2] != "__":
value = getattr(attrs, name)
if name.endswith("_"):
name = name[:-1]
if isinstance(value, raw):
insert = value.uniobj
else:
insert = escape(unicode(value))
return ' %s="%s"' % (name, insert)
def getstyle(self, tag):
"""return attribute list suitable for styling."""
try:
styledict = tag.style.__dict__
except AttributeError:
return []
else:
stylelist = [x + ": " + y for x, y in styledict.items()]
return [u(' style="%s"') % u("; ").join(stylelist)]
def _issingleton(self, tagname):
"""can (and will) be overridden in subclasses"""
return self.shortempty
def _isinline(self, tagname):
"""can (and will) be overridden in subclasses"""
return False
class HtmlVisitor(SimpleUnicodeVisitor):
single = dict(
[
(x, 1)
for x in ("br,img,area,param,col,hr,meta,link,base," "input,frame").split(
","
)
]
)
inline = dict(
[
(x, 1)
for x in (
"a abbr acronym b basefont bdo big br cite code dfn em font "
"i img input kbd label q s samp select small span strike "
"strong sub sup textarea tt u var".split(" ")
)
]
)
def repr_attribute(self, attrs, name):
if name == "class_":
value = getattr(attrs, name)
if value is None:
return
return super(HtmlVisitor, self).repr_attribute(attrs, name)
def _issingleton(self, tagname):
return tagname in self.single
def _isinline(self, tagname):
return tagname in self.inline
class _escape:
def __init__(self):
self.escape = {
u('"'): u("""),
u("<"): u("<"),
u(">"): u(">"),
u("&"): u("&"),
u("'"): u("'"),
}
self.charef_rex = re.compile(u("|").join(self.escape.keys()))
def _replacer(self, match):
return self.escape[match.group(0)]
def __call__(self, ustring):
"""xml-escape the given unicode string."""
ustring = unicode(ustring)
return self.charef_rex.sub(self._replacer, ustring)
escape = _escape()
|
CLOSE Robert Lewis Dear, the suspect in the November Colorado Springs Planned Parenthood shooting, also tried to blow up the building where patients and staff were hiding according to new documents. Wochit
FILE - In this Dec. 9, 2015, file photo, Robert Dear, center, talks during a court appearance in Colorado Springs, Colo. The man who admitted killing multiple people at a Colorado Planned Parenthood clinic is returning to court for the continuation of a hearing on whether he's mentally competent to stand trial. A psychologist who examined Dear is scheduled to testify Tuesday, May 10, 2016. (Andy Cross/The Denver Post via AP, Pool, File) (Photo: Andy Cross, AP)
COLORADO SPRINGS — A man who admitted killing three people at a Colorado Planned Parenthood clinic is returning to court for the continuation of a hearing on whether he's mentally competent to stand trial.
A psychologist who examined 57-year-old Robert Dear is scheduled to testify Tuesday.
Dear is charged with 179 counts including murder, attempted murder and assault in the Nov. 27 shootings at the Colorado Springs clinic. Nine people were injured in the attack.
In court, he has declared himself a "warrior for the babies" and said he was guilty.
The hearing started last month, when two psychologists testified that Dear isn't competent to stand trial.
If the judge agrees, Dear's case would be put on hold while he undergoes treatment at a state psychiatric hospital intended to restore him to competency.
Read or Share this story: http://noconow.co/27awjyJ |
Blood Lead Levels In Victorian Children
A recent study of lead levels in the blood of Sydney schoolchildren purported to show “an alarming situation of epidemic proportions”, with up to 24% of children in one survey having blood lead levels greater than 25 μg/100 mL (1.21 μmol/L). In the present study, 446 Victorian children were tested for lead level in venous blood, showing a mean blood lead level of 11.4 μg/ 100 mL (0.55 μmol/L), and only six children (1.3%) with blood lead levels in excess of 25 μg/100 mL (1.21 μmol/L) were found. It is suggested that the blood lead levels in the Sydney study may have been falsely high because of the use of capillary blood samples which are prone to contamination. |
def authcode_post(self, path, **kwargs):
kwargs.setdefault('data', {})['authcode'] = self.authcode
return self._session.okc_post(path, **kwargs) |
The Operative: “Are you willing to die for that belief?” Capt. Malcolm “Mal” Reynolds: “I am… but it ain’t exactly Plan A." —Serenity
Passion matters. If there’s a lesson to be drawn from many of the films in the New Cult Canon—specifically the ones that died in theaters, only to find a following down the line—it’s that the passionate few speak louder than the passive many. That may not always register in dollars and cents, but it’s what keeps low-rated TV shows alive, sustains talented artists whose appeal often eludes the mainstream, and tends the garden of cinema history long after blockbusters have faded. In the Internet age, the effect has been amplified tenfold, as nerdy legions have united to wage successful campaigns large and small, from making an 18-year-old Rage Against The Machine song Britain’s No. 1 Christmas single to forcing renewals of struggling shows by sending 20 tons of peanuts to network headquarters (Jericho) or buying Subway sandwiches en masse (Chuck).
Advertisement
Behold the mighty power of the Whedon cult. At any other time, and with any other creator, Joss Whedon’s recent Fox science-fiction show Dollhouse wouldn’t have made it past two or three episodes. The creative tension with the network was very public, and it significantly damaged the show in the early going. The original pilot was scotched, schedulers immediately relegated the show to a doomed Friday slot, and ratings that were unpromising at the beginning slipped to apocalyptic levels as the season wore on. And yet through some metrics unrelated to Nielsen ratings—hoped-for DVD sales, favorable online and DVR numbers, vague demographic targeting—Dollhouse enjoyed a full, improbable second season that allowed Whedon and company to wrap things up on their own terms. (Season two’s brazen refusal to do any handholding was especially notable under the circumstances. Newbies were thrown right into the deep end.)
Had Whedon’s brilliant 2002 space-Western series Firefly been around in the age of Twitter and Facebook and DVRs, perhaps it wouldn’t have been yanked from Fox after 11 of its 14 episodes aired. No matter. The passion index was high enough for Whedon to convince Universal to bankroll a modestly budgeted feature to resolve the questions left unanswered by a failed TV show. And really, there was genuine logic behind it: Firefly’s core fan base—called “The Browncoats,” after the collection of rogue heroes at the show’s center—could be counted on to buy tickets, and their advocacy (not to mention the quality of the material) might persuade the uninitiated to give it a shot. And thus 2005’s Serenity, Whedon’s feature debut as writer-director, found its way into theaters in the dregs of late September, opened to middling business, and fell predictably into the warm embrace of couch potatoes on DVD.
There are two main points I’d like to make about Serenity. 1. It’s about as good an adaptation as anyone had a right to expect, swiftly paced and full of the humor, adventure, and irreverence that made Firefly so special. 2. Whenever I’m inclined to think the ’00s were far more exciting for TV than for cinema, Serenity is Exhibit B. (Exhibit A being The Wire, of course.) For Whedon, converting Firefly into a two-hour movie is an act of compression, not expansion. The film’s effects are splashier and the choreography is more elaborate, but the job of squeezing in a season’s worth of mythology—and bringing the story to a real conclusion—is virtually impossible to pull off. Whedon’s task was not unlike the recent Star Trek reboot, in that he had to reintroduce a cast of TV characters. But it was much harder, because Firefly was never part of the cultural lexicon, and thus more difficult to shorthand.
Advertisement
So Serenity has to do two things at once: Satisfy fans who already know these characters and are looking for payoffs and closure, and bring an entirely new audience into the fold. Whedon does a near-miraculous job negotiating this impossible balance, particularly in the early going, which swiftly, elegantly sets up the Firefly universe, introduces most of the main characters, and puts Serenity’s plot in motion. In what’s later revealed to be propaganda-as-history, spoon-fed to impressionable schoolchildren, a video tells of humanity outgrowing Earth and resettling on dozens of terraformed planets and hundreds of moons in a new solar system. This sliver of the galaxy is controlled by the Alliance, which won a victory over “the Independents” to ensure (so the video says) that “everyone can enjoy the comfort and enlightenment of true civilization.”
The Alliance controls six “Central Planets,” but the outer planets are a dusty haven for Old West-style lawlessness and the occasional raid by a breed of cannibal savages called the Reavers. On the rickety-but-true ship known as Firefly, war vet Captain Malcolm Reynolds (better known simply as “Mal”) and his band of outlaws thieve and scavenge their black-market bounty, living in proud defiance of the government. Played with rascally charm by Nathan Fillion—who leads a cast many have likened to Star Wars populated entirely by Han Solos—Mal “aims to misbehave,” and his loyal crew follows suit, including pilot Wash (Alan Tudyk) and his ass-kicking wife Zöe (Gina Torres), shifty mercenary Jayne (Adam Baldwin), the adorable (and affection-starved) mechanic Kaylee (Jewel Staite), and sometime escort Inara (Morena Baccarin), who starts the movie off-ship. The wildcards in the bunch are Simon (Sean Maher), a doctor, and his unstable, psychic sister River (Summer Glau), who’s been programmed by the Alliance as a very dangerous weapon. How dangerous? This dangerous:
Advertisement
Because there’s so much heavy lifting to be done in the introductions alone, Whedon wisely keeps the plotting simple: The government wants River back at all costs—as much for the secrets she knows as her potential for destruction—and they’ve sent The Operative, a Man With No Name-type played with sinister bloodlessness by Chiwetel Ejiofor, to track her down. Finding out the big secret the Alliance is hiding—a whopper, and one with a strong connection to the technology-as-tool-of-oppression theme of Dollhouse—is the lynchpin to the Firefly series, and Whedon delivers that revelation with the full force it deserves. A strong vein of libertarian paranoia runs through Whedon’s work (“People don’t like to be meddled with,” says young River. “We’re in their homes and in their heads, and we haven’t the right”) and Serenity sees it through to a future where a totalitarian government, in seeking to calm and appease the masses, robs them of their humanity.
Yet the need to drive the narrative forward and turn Serenity into a thrilling space adventure—which, again, it definitely is—often betrays the laconic charm of the TV show. Though it had its share of narrative through-lines and mini-arcs, Firefly was slightly more episodic than other Whedon shows, content to follow Mal and the gang on various missions of the week on the outer planets. It was a relaxed, funny, smartly conceived hour with occasional bursts of action, building its tone around Fillion’s old-school toughness and way with a one-liner. And with all that time to stretch out, Firefly was democratic in giving all the players their due; it’s the nature (and boundless promise) of television that shows can take advantage of the limitless space for character development, and that’s something Whedon has understood from the beginning, well before the current wave of novelistic TV shows. So there’s a divide inherent in Serenity: The Browncoats have a tremendous amount of investment in these characters, but their fates are probably not so urgent to people who are only just learning their names. Hard as he tries to bring general audiences into the fold, Whedon doesn’t entirely solve this dilemma, and winds up hanging onto several “for fans only” developments that never would have made the cut in a stand-alone film.
Whedon puts too much of a gloss over relationships that reprise the romantic tensions of the TV show without advancing them much, like the frisky interplay between Mal and Inara (who’s peripheral to the film’s story), and Kaylee’s pining over Simon, who was always too hung up with his sister to pay much attention to her. (Though Kaylee has one of my favorite lines in the film, when she openly admits, “Goin’ on a year now, I ain’t had nothin’ twixt my nethers weren’t run on batteries!”) More inexplicable is the brief appearance of Shepherd Book (Ron Glass), whom Firefly fans remember fondly as a former passenger of mysterious origin, and non-fans know as some guy whose heroic martyrdom is given inexplicable weight. Even the death of a major character in Serenity opens up a rift: on opening night, I heard plenty of gasps and sniffles from the Browncoats (some of whom did indeed show up in the garb). But outside of the initial shock—Whedon has been known to kill off characters swiftly, and this one is breathtakingly fast—the mourning is left to the die-hards.
Advertisement
Then again, Whedon may be inclined to play to fans anyway; that’s what happened in the second season of Dollhouse, and he can really only do so much handholding before losing everyone. The key to enjoying Serenity—and I clearly have had my struggles—is to appreciate how much Whedon tries to make a movie here, not just a special double episode of an unjustly cancelled TV show. While I missed the relative longueurs of Firefly, with its balance of space-Western adventure and hang-out time, the action in Serenity is exciting and purposeful, and its rebellious, anti-establishment essence survives intact. Between the Reavers and Ejiofor’s deliciously mercenary villain, Mal and the gang are forced to slip between threats both savage and smart, but Whedon keeps the tone light and irreverent, and nobody writes better wise-ass dialogue. Witness this typically sharp exchange between Mal and The Operative:
For whatever reason—let’s just say the general suckiness of humanity—Serenity wasn’t a box-office smash, which dispelled for a while any hope that Whedon would carry George Lucas’ populist science-fiction mantle into an infinitely cooler future. But it realizes a fantasy that advocates of other brilliant-but-cancelled TV shows usually only experience in fan fiction: It brings a beloved series to a natural, satisfying close. (Let’s face it: Even successful TV series don’t often come in for a graceful ending. Most of them overstay their welcome or peter out meekly.) And the only way to account for that is passion. A few loud voices raised in unison sounded like a much larger chorus to a studio, and with Serenity, Whedon and his followers got away with something.
Advertisement
Coming Up:
March 18: Glengarry Glen Ross
April 1: Hard-Boiled
April 15: The Cook, The Thief, His Wife & Her Lover |
#!/usr/bin/python3
import setup_run_dir # this import tricks script to run from 2 levels up
from amrlib.graph_processing.amr_plot import AMRPlot
from amrlib.graph_processing.amr_loading import load_amr_entries
if __name__ == '__main__':
input_file = 'amrlib/data/LDC2020T02/test.txt'
snum = 4 # id numbers start at 1 so they are 1 more than snum
# Load the file
entries = load_amr_entries(input_file)
print('Found %d entries' % len(entries))
print()
# Parse AMR
entry = entries[snum]
plot = AMRPlot()
plot.build_from_graph(entry, debug=False)
plot.view()
|
/**
* SCOPE
* A report provider, for example, a transfer agent, fund accountant or market data provider, sends the PriceReportCancellation message to the report recipient, for example, a fund management company, transfer agent, market data provider, regulator or any other interested party to cancel previously sent prices.
*
* USAGE
* The PriceReportCancellation message is used to either:
* - cancel an entire PriceReport that was previously sent (by quoting the business reference of the original price report in the PriceReportIdentification element), or,
* - cancel one or more individual prices from a previously sent price report (by using the PriceDetailsToBeCancelled sequence).
* Technically, it is possible to cancel all the prices individually by using the PriceDetailsToBeCancelled sequence, but this is not recommended.
* The cancellation should not contain the cancellation of prices for more than one NAV date.
*
*
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PriceReportCancellationV04", propOrder = {
"msgId",
"poolRef",
"prvsRef",
"msgPgntn",
"pricRptId",
"cxlId",
"cxlRsn",
"xpctdPricCrrctnDt",
"cmpltPricCxl",
"cancPricValtnDtls",
"xtnsn"
})
public class PriceReportCancellationV04 {
@XmlElement(name = "MsgId", required = true)
protected MessageIdentification1 msgId;
@XmlElement(name = "PoolRef")
protected AdditionalReference3 poolRef;
@XmlElement(name = "PrvsRef")
protected AdditionalReference3 prvsRef;
@XmlElement(name = "MsgPgntn", required = true)
protected Pagination msgPgntn;
@XmlElement(name = "PricRptId", required = true)
protected String pricRptId;
@XmlElement(name = "CxlId", required = true)
protected String cxlId;
@XmlElement(name = "CxlRsn")
protected String cxlRsn;
@XmlElement(name = "XpctdPricCrrctnDt")
protected DateAndDateTime1Choice xpctdPricCrrctnDt;
@XmlElement(name = "CmpltPricCxl")
protected boolean cmpltPricCxl;
@XmlElement(name = "CancPricValtnDtls")
protected List<PriceReport3> cancPricValtnDtls;
@XmlElement(name = "Xtnsn")
protected List<Extension1> xtnsn;
/**
* Gets the value of the msgId property.
*
* @return
* possible object is
* {@link MessageIdentification1 }
*
*/
public MessageIdentification1 getMsgId() {
return msgId;
}
/**
* Sets the value of the msgId property.
*
* @param value
* allowed object is
* {@link MessageIdentification1 }
*
*/
public PriceReportCancellationV04 setMsgId(MessageIdentification1 value) {
this.msgId = value;
return this;
}
/**
* Gets the value of the poolRef property.
*
* @return
* possible object is
* {@link AdditionalReference3 }
*
*/
public AdditionalReference3 getPoolRef() {
return poolRef;
}
/**
* Sets the value of the poolRef property.
*
* @param value
* allowed object is
* {@link AdditionalReference3 }
*
*/
public PriceReportCancellationV04 setPoolRef(AdditionalReference3 value) {
this.poolRef = value;
return this;
}
/**
* Gets the value of the prvsRef property.
*
* @return
* possible object is
* {@link AdditionalReference3 }
*
*/
public AdditionalReference3 getPrvsRef() {
return prvsRef;
}
/**
* Sets the value of the prvsRef property.
*
* @param value
* allowed object is
* {@link AdditionalReference3 }
*
*/
public PriceReportCancellationV04 setPrvsRef(AdditionalReference3 value) {
this.prvsRef = value;
return this;
}
/**
* Gets the value of the msgPgntn property.
*
* @return
* possible object is
* {@link Pagination }
*
*/
public Pagination getMsgPgntn() {
return msgPgntn;
}
/**
* Sets the value of the msgPgntn property.
*
* @param value
* allowed object is
* {@link Pagination }
*
*/
public PriceReportCancellationV04 setMsgPgntn(Pagination value) {
this.msgPgntn = value;
return this;
}
/**
* Gets the value of the pricRptId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPricRptId() {
return pricRptId;
}
/**
* Sets the value of the pricRptId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public PriceReportCancellationV04 setPricRptId(String value) {
this.pricRptId = value;
return this;
}
/**
* Gets the value of the cxlId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCxlId() {
return cxlId;
}
/**
* Sets the value of the cxlId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public PriceReportCancellationV04 setCxlId(String value) {
this.cxlId = value;
return this;
}
/**
* Gets the value of the cxlRsn property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCxlRsn() {
return cxlRsn;
}
/**
* Sets the value of the cxlRsn property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public PriceReportCancellationV04 setCxlRsn(String value) {
this.cxlRsn = value;
return this;
}
/**
* Gets the value of the xpctdPricCrrctnDt property.
*
* @return
* possible object is
* {@link DateAndDateTime1Choice }
*
*/
public DateAndDateTime1Choice getXpctdPricCrrctnDt() {
return xpctdPricCrrctnDt;
}
/**
* Sets the value of the xpctdPricCrrctnDt property.
*
* @param value
* allowed object is
* {@link DateAndDateTime1Choice }
*
*/
public PriceReportCancellationV04 setXpctdPricCrrctnDt(DateAndDateTime1Choice value) {
this.xpctdPricCrrctnDt = value;
return this;
}
/**
* Gets the value of the cmpltPricCxl property.
*
*/
public boolean isCmpltPricCxl() {
return cmpltPricCxl;
}
/**
* Sets the value of the cmpltPricCxl property.
*
*/
public PriceReportCancellationV04 setCmpltPricCxl(boolean value) {
this.cmpltPricCxl = value;
return this;
}
/**
* Gets the value of the cancPricValtnDtls property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the cancPricValtnDtls property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCancPricValtnDtls().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link PriceReport3 }
*
*
*/
public List<PriceReport3> getCancPricValtnDtls() {
if (cancPricValtnDtls == null) {
cancPricValtnDtls = new ArrayList<PriceReport3>();
}
return this.cancPricValtnDtls;
}
/**
* Gets the value of the xtnsn property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the xtnsn property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getXtnsn().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Extension1 }
*
*
*/
public List<Extension1> getXtnsn() {
if (xtnsn == null) {
xtnsn = new ArrayList<Extension1>();
}
return this.xtnsn;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}
@Override
public boolean equals(Object that) {
return EqualsBuilder.reflectionEquals(this, that);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
/**
* Adds a new item to the cancPricValtnDtls list.
* @see #getCancPricValtnDtls()
*
*/
public PriceReportCancellationV04 addCancPricValtnDtls(PriceReport3 cancPricValtnDtls) {
getCancPricValtnDtls().add(cancPricValtnDtls);
return this;
}
/**
* Adds a new item to the xtnsn list.
* @see #getXtnsn()
*
*/
public PriceReportCancellationV04 addXtnsn(Extension1 xtnsn) {
getXtnsn().add(xtnsn);
return this;
}
} |
// Parameters returns the parameters to be passed into a environment CloudFormation template.
func (e *EnvStackConfig) Parameters() ([]*cloudformation.Parameter, error) {
httpsListener := "false"
if len(e.in.ImportCertARNs) != 0 || e.in.App.Domain != "" {
httpsListener = "true"
}
return []*cloudformation.Parameter{
{
ParameterKey: aws.String(envParamAppNameKey),
ParameterValue: aws.String(e.in.App.Name),
},
{
ParameterKey: aws.String(envParamEnvNameKey),
ParameterValue: aws.String(e.in.Name),
},
{
ParameterKey: aws.String(envParamToolsAccountPrincipalKey),
ParameterValue: aws.String(e.in.App.AccountPrincipalARN),
},
{
ParameterKey: aws.String(envParamAppDNSKey),
ParameterValue: aws.String(e.in.App.Domain),
},
{
ParameterKey: aws.String(envParamAppDNSDelegationRoleKey),
ParameterValue: aws.String(e.in.App.DNSDelegationRole()),
},
{
ParameterKey: aws.String(EnvParamServiceDiscoveryEndpoint),
ParameterValue: aws.String(fmt.Sprintf(fmtServiceDiscoveryEndpoint, e.in.Name, e.in.App.Name)),
},
{
ParameterKey: aws.String(envParamCreateHTTPSListenerKey),
ParameterValue: aws.String(httpsListener),
},
{
ParameterKey: aws.String(EnvParamAliasesKey),
ParameterValue: aws.String(""),
},
{
ParameterKey: aws.String(EnvParamALBWorkloadsKey),
ParameterValue: aws.String(""),
},
{
ParameterKey: aws.String(envParamEFSWorkloadsKey),
ParameterValue: aws.String(""),
},
{
ParameterKey: aws.String(envParamNATWorkloadsKey),
ParameterValue: aws.String(""),
},
}, nil
} |
import FWCore.ParameterSet.Config as cms
# Coincidence of HF towers above threshold
from HeavyIonsAnalysis.Configuration.hfCoincFilter_cff import *
# Selection of at least a two-track fitted vertex
primaryVertexFilter = cms.EDFilter("VertexSelector",
src = cms.InputTag("hiSelectedVertex"),
cut = cms.string("!isFake && abs(z) <= 25 && position.Rho <= 2 && tracksSize >= 2"),
filter = cms.bool(True), # otherwise it won't filter the events
)
# Cluster-shape filter re-run offline
from RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi import *
from HLTrigger.special.hltPixelClusterShapeFilter_cfi import *
hltPixelClusterShapeFilter.inputTag = "siPixelRecHits"
# Reject BSC beam halo L1 technical bits
from L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff import *
from HLTrigger.HLTfilters.hltLevel1GTSeed_cfi import hltLevel1GTSeed
noBSChalo = hltLevel1GTSeed.clone(
L1TechTriggerSeeding = cms.bool(True),
L1SeedsLogicalExpression = cms.string('NOT (36 OR 37 OR 38 OR 39)')
)
collisionEventSelection = cms.Sequence(noBSChalo *
hfCoincFilter3 *
primaryVertexFilter *
siPixelRecHits *
hltPixelClusterShapeFilter)
|
import Icon from 'antd/lib/icon';
import React, { Children } from 'react';
import Tooltip from 'antd/lib/tooltip';
import { connectField, filterDOMProps, joinName } from 'uniforms';
import ListItemField from './ListItemField';
import ListAddField from './ListAddField';
const List = ({
children,
error,
errorMessage,
info,
initialCount,
itemProps,
label,
labelCol,
name,
showInlineError,
value,
wrapperCol,
...props
}) => (
<div {...filterDOMProps(props)}>
{!!label && (
<div>
{label}
{!!info && (
<span>
<Tooltip title={info}>
<Icon type="question-circle-o" />
</Tooltip>
</span>
)}
</div>
)}
{!!(error && showInlineError) && <div>{errorMessage}</div>}
{children
? value.map((item: any, index: number) =>
Children.map(children, child =>
React.cloneElement(child, {
key: index,
label: null,
name: joinName(
name,
child.props.name && child.props.name.replace('$', index),
),
}),
),
)
: value.map((item: any, index: number) => (
<ListItemField
key={index}
label={null}
labelCol={labelCol}
name={joinName(name, index)}
wrapperCol={wrapperCol}
{...itemProps}
/>
))}
<ListAddField name={`${name}.$`} initialCount={initialCount} />
</div>
);
List.defaultProps = {
style: {
border: '1px solid #DDD',
borderRadius: '7px',
marginBottom: '5px',
marginTop: '5px',
padding: '10px',
},
};
export default connectField(List, {
ensureValue: false,
includeInChain: false,
});
|
use libc::fork;
use std::fs;
use std::{ffi::CString, process::exit};
#[macro_use]
extern crate log;
extern crate simple_logger;
use crate::debugger::Debugger;
pub mod breakpoint;
pub mod command;
pub mod debugger;
pub mod expr;
pub mod utils;
fn main() {
simple_logger::init_with_level(log::Level::Info).unwrap();
let args: Vec<String> = std::env::args().collect();
if args.len() < 2 {
println!("no program specified");
exit(1);
}
let prog = args[1].clone();
unsafe {
let pid = fork();
if pid == 0 {
libc::personality(libc::ADDR_NO_RANDOMIZE as libc::c_ulong);
execute_debuggee(&prog);
} else if pid >= 1 {
println!("starting debugger process");
let bin_data = fs::read(prog.clone()).expect("read object file failed");
let obj_file = object::File::parse(&*bin_data).expect("parse object content failed");
let mut debugger = Debugger::new(prog, pid, obj_file);
match debugger.wait_for_signal() {
Ok(_) => debugger.run(),
Err(e) => println!("error:{:?}", e),
}
}
}
}
unsafe fn execute_debuggee(prog: &str) {
let r = libc::ptrace(libc::PTRACE_TRACEME, 0, 0, 0);
if r < 0 {
println!("error in ptrace");
}
// dbg!(r);
let prog_ctr = CString::new(prog).unwrap();
libc::execl(prog_ctr.as_ptr(), prog_ctr.as_ptr(), 0);
}
|
// Copyright (c) 2019, <NAME> <<EMAIL>>
// See LICENSE for licensing information
package main
import (
"flag"
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"testing"
"github.com/rogpeppe/go-internal/goproxytest"
"github.com/rogpeppe/go-internal/gotooltest"
"github.com/rogpeppe/go-internal/testscript"
)
var proxyURL string
func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(garbleMain{m}, map[string]func() int{
"garble": main1,
}))
}
type garbleMain struct {
m *testing.M
}
func (m garbleMain) Run() int {
// Start the Go proxy server running for all tests.
srv, err := goproxytest.NewServer("testdata/mod", "")
if err != nil {
panic(fmt.Sprintf("cannot start proxy: %v", err))
}
proxyURL = srv.URL
return m.m.Run()
}
var update = flag.Bool("u", false, "update testscript output files")
func TestScripts(t *testing.T) {
t.Parallel()
p := testscript.Params{
Dir: filepath.Join("testdata", "scripts"),
Setup: func(env *testscript.Env) error {
env.Vars = append(env.Vars,
"GOPROXY="+proxyURL,
"GONOSUMDB=*",
)
bindir := filepath.Join(env.WorkDir, ".bin")
if err := os.Mkdir(bindir, 0o777); err != nil {
return err
}
binfile := filepath.Join(bindir, "garble")
if runtime.GOOS == "windows" {
binfile += ".exe"
}
if err := os.Symlink(os.Args[0], binfile); err != nil {
return err
}
env.Vars = append(env.Vars, fmt.Sprintf("PATH=%s%c%s", bindir, filepath.ListSeparator, os.Getenv("PATH")))
env.Vars = append(env.Vars, "TESTSCRIPT_COMMAND=garble")
return nil
},
Cmds: map[string]func(ts *testscript.TestScript, neg bool, args []string){
"binsubstr": binsubstr,
"bincmp": bincmp,
},
UpdateScripts: *update,
}
if err := gotooltest.Setup(&p); err != nil {
t.Fatal(err)
}
testscript.Run(t, p)
}
func binsubstr(ts *testscript.TestScript, neg bool, args []string) {
if len(args) < 2 {
ts.Fatalf("usage: binsubstr file substr...")
}
data := ts.ReadFile(args[0])
for _, substr := range args[1:] {
match := strings.Contains(data, substr)
if match && neg {
ts.Fatalf("unexpected match for %q in %s", substr, args[0])
} else if !match && !neg {
ts.Fatalf("expected match for %q in %s", substr, args[0])
}
}
}
func bincmp(ts *testscript.TestScript, neg bool, args []string) {
if neg {
ts.Fatalf("unsupported: ! bincmp")
}
if len(args) != 2 {
ts.Fatalf("usage: bincmp file1 file2")
}
data1 := ts.ReadFile(args[0])
data2 := ts.ReadFile(args[1])
if data1 != data2 {
if _, err := exec.LookPath("diffoscope"); err != nil {
ts.Logf("diffoscope is not installing; skipping binary diff")
} else {
// We'll error below; ignore the exec error here.
ts.Exec("diffoscope", ts.MkAbs(args[0]), ts.MkAbs(args[1]))
}
sizeDiff := len(data2) - len(data1)
ts.Fatalf("%s and %s differ; diffoscope above, size diff: %+d",
args[0], args[1], sizeDiff)
}
}
func TestFlagValue(t *testing.T) {
t.Parallel()
tests := []struct {
name string
flags []string
flagName string
want string
}{
{"StrSpace", []string{"-buildid", "bar"}, "-buildid", "bar"},
{"StrSpaceDash", []string{"-buildid", "-bar"}, "-buildid", "-bar"},
{"StrEqual", []string{"-buildid=bar"}, "-buildid", "bar"},
{"StrEqualDash", []string{"-buildid=-bar"}, "-buildid", "-bar"},
{"StrMissing", []string{"-foo"}, "-buildid", ""},
{"StrNotFollowed", []string{"-buildid"}, "-buildid", ""},
{"StrEmpty", []string{"-buildid="}, "-buildid", ""},
}
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()
got := flagValue(test.flags, test.flagName)
if got != test.want {
t.Fatalf("flagValue(%q, %q) got %q, want %q",
test.flags, test.flagName, got, test.want)
}
})
}
}
|
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { Project } from "ts-morph";
import { getAutorestOptions } from "../../autorestSession";
export function generateRollupConfig(project: Project) {
const { generateMetadata } = getAutorestOptions();
if (!generateMetadata) {
return;
}
const rollupFile = project.createSourceFile("rollup.config.js", undefined, {
overwrite: true
});
rollupFile.addStatements(
`import nodeResolve from "@rollup/plugin-node-resolve";
import cjs from "@rollup/plugin-commonjs";
import sourcemaps from "rollup-plugin-sourcemaps";
import multiEntry from "@rollup/plugin-multi-entry";
import json from "@rollup/plugin-json";
import nodeBuiltins from "builtin-modules";
/**
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
*
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
* __exportStar downleveled helper function to declare its exports which confuses
* rollup's automatic discovery mechanism.
*
* @returns an object reference that can be \`...\`'d into your cjs() configuration.
*/
export function openTelemetryCommonJs() {
const namedExports = {};
for (const key of [
"@opentelemetry/api",
"@azure/core-tracing/node_modules/@opentelemetry/api"
]) {
namedExports[key] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext",
"setSpanContext"
];
}
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
for (const version of releasedOpenTelemetryVersions) {
namedExports[
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
\`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@\${version}/node_modules/@opentelemetry/api/build/src/index.js\`
] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"StatusCode",
"CanonicalCode",
"getSpanContext",
"setSpanContext"
];
}
return namedExports;
}
// #region Warning Handler
/**
* A function that can determine whether a rollupwarning should be ignored. If
* the function returns \`true\`, then the warning will not be displayed.
*/
function ignoreNiseSinonEvalWarnings(warning) {
return (
warning.code === "EVAL" &&
(warning.id && ((warning.id.includes("node_modules/nise")) ||
warning.id.includes("node_modules/sinon")) === true)
);
}
function ignoreChaiCircularDependencyWarnings(warning) {
return (
warning.code === "CIRCULAR_DEPENDENCY" &&
(warning.importer && warning.importer.includes("node_modules/chai") === true)
);
}
const warningInhibitors = [
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
/**
* Construct a warning handler for the shared rollup configuration
* that ignores certain warnings that are not relevant to testing.
*/
function makeOnWarnForTesting() {
return (warning, warn) => {
// If every inhibitor returns false (i.e. no inhibitors), then show the warning
if (warningInhibitors.every(inhib => !inhib(warning))) {
warn(warning);
}
};
}
// #endregion
function makeBrowserTestConfig() {
const config = {
input: {
include: ["dist-esm/test/**/*.spec.js"],
exclude: ["dist-esm/test/**/node/**"]
},
output: {
file: \`dist-test/index.browser.js\`,
format: "umd",
sourcemap: true
},
preserveSymlinks: false,
plugins: [
multiEntry({ exports: false }),
nodeResolve({
mainFields: ["module", "browser"]
}),
cjs({
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
json(),
sourcemaps()
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
],
onwarn: makeOnWarnForTesting(),
// Disable tree-shaking of test code. In [email protected],
// rollup started respecting the "sideEffects" field in package.json. Since
// our package.json sets "sideEffects=false", this also applies to test
// code, which causes all tests to be removed by tree-shaking.
treeshake: false
};
return config;
}
const defaultConfigurationOptions = {
disableBrowserBundle: false
};
export function makeConfig(
pkg,
options
) {
options = {
...defaultConfigurationOptions,
...(options || {})
};
const baseConfig = {
// Use the package's module field if it has one
input: pkg["module"] || "dist-esm/src/index.js",
external: [
...nodeBuiltins,
...Object.keys(pkg.dependencies),
...Object.keys(pkg.devDependencies)
],
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()]
};
const config = [baseConfig];
if (!options.disableBrowserBundle) {
config.push(makeBrowserTestConfig());
}
return config;
}
export default makeConfig(require("./package.json"));`
);
}
|
Substrate Metabolism under Cold Stress in Seasonally Acclimatized Dark-Eyed Juncos
Seasonally acclimatized dark-eyed juncos were exposed to one of three temperature regimes: 30° C (thermoneutrality), - 12° C (moderate cold), or 2° C in a 20.9% oxygen/79.1% helium gas mixture (severe cold), for 2 h or until they became hypothermic. Plasma glucose and free fatty acids (FFA), pectoralis muscle and liver glycogen, and pectoralis lactate were measured after exposure. Pectoralis muscle mass increased by 28% in winter. This increased muscle mass may assist in improving cold tolerance by increasing capacity for shivering thermogenesis in winter birds. Plasma glucose was signiicantly reduced and plasma FFA were significantly elevated under severe cold in winter No differences in plasma metabolites with temperature were detected in summer. Pectoralis muscle glycogen decreased with increasing severity of cold stress at both seasons, but winter levels were significantly greater than summer levels under severe cold. No temperature-induced differences in liver glycogen were apparent, but pooled winter values significantly exceeded summer values. Pectoralis lactate was significantly lower under severe cold at both seasons. In addition, mean lactate values for birds becoming hypothermic in both summer (n = 7) and winter (n = 1) were markedly lower than for normothermic birds at the same test temperatures. These data are consistent with a pattern of augmentedpreferential use of FFA to support shivering, coupled with sparing of muscle glycogen, in winter birds relative to summer birds. Furthermore, the decrement of pectoralis lactate with hypothermia may suggest a link between a reduced ability to mobilize muscle glycogen and the onset of hypothermia. |
import { JsonFetchWrapper } from "../../../utils";
import { gBifBaseApiUrlV1 } from "../../../lib/constants";
import { gbifLimitKingdom, gbifLimitPhylum } from "../../../lib/settings";
export const getTaxonKeyBySciName = ({
sciName,
}: {
sciName: string;
}): Promise<{ scientificName: string; taxonKey: number } | null> => {
return JsonFetchWrapper<{
usageKey: number;
matchType: string;
confidence: number;
scientificName: string;
}>(`${gBifBaseApiUrlV1}/species/match`, {
method: "GET",
urlSearchParams: {
kingdom: gbifLimitKingdom,
genus: sciName,
},
})
.then(({ data }) => {
if (data) {
const { scientificName, usageKey } = data;
return { scientificName, taxonKey: usageKey };
} else {
return null;
}
})
.catch(() => null);
};
|
State and Metropolitan Variation in Lack of Health Insurance among Working-Age Adults, Behavioral Risk Factor Surveillance System, 2006
Objective. Lack of health insurance coverage for working-age adults is one of the most pressing issues facing the U.S. population, and it continues to be a concern for a large number of people. In the absence of a national solution, the states and municipalities are left to address this need. We examined the disparities in uninsurance prevalence by state and metropolitan areas in the U.S. and among racial/ethnic groups. Method. Data from the 2006 Behavioral Risk Factor Surveillance System (BRFSS) were analyzed for working-age adults 18 to 64 years of age. Results. In 2006, according to the BRFSS data, overall 18.6% (standard error 5 0.20) of working-age adults were without health insurance coverage; by state, this proportion ranged from 9.7% to 29.0%. Health insurance coverage varied by state and metropolitan area and racial/ethnic group, and a higher age-adjusted prevalence of uninsurance was observed for non-Hispanic black and Hispanic respondents. Conclusions. A substantial proportion of working-age Americans remain without health insurance coverage. Disparities in health insurance coverage were observed by population and geographic groups. Overall, black and Hispanic populations fared far worse in terms of lack of health-care coverage than working-age white Americans. |
A robot would be the best placekicker of all time. A human kicker learns a few motions — one for kickoffs, one for field goals, one for onside kicks, one for pooches — and then tries to repeat those motions the same way every time. We call the good kickers “automatic,” praising them for becoming as robotic as humanly possible.
Human kickers sometimes crack under the pressure of big moments, messing up their mechanics when asked to make clutch kicks — or even near-meaningless ones. But not KickerBot 3000. Its shiny metal leg would never fail, hitting the ball with the perfect velocity and the perfect trajectory every single time. But until the NCAA stretches its definition of amateurism to include machines, special teams coaches are stuck with humans.
Tiny humans, at that. Not because being tiny makes you good at kicking; it’s just that if you’re big, you’re put into positions and sports where being big is a boon. Instead, kickers look like soccer players in pads and helmets, skinnier and smaller than their teammates.
That used to be the case with Penn State’s Joey Julius, a former soccer player. In 2010, Julius was called into camp for the United States U-15 boys’ national team. In 2013, Julius accepted a scholarship to play soccer at SIU-Edwardsville. In 2014, Julius decided he’d rather play football.
By the time Julius competed for the Penn State kicking job in 2015, he’d gained enough weight to acquire the nickname “The Big Toe.” He now weighs more than most of the team’s linebackers, and it’s hard to imagine him ever having played a sport that required 90 minutes of constant running.
Like many others, I came to love Penn State’s large kicker. While the traditional kicking motion is a fluid display of coordinated power, Julius’s approach is about as ungraceful as possible. In my eyes, he was a gleeful rebuke of what kickers are supposed to be. He didn’t need to be big, but he was anyway, and he still got the job done.
When he first suited up for the Nittany Lions last season, Julius’s weight made him into an Object of Internet Curiosity, a fun thing to tweet and giggle about. But offline, he experienced depression and physical discomfort. Over the past few weeks, Julius opened up about his binge-eating disorder, which caused him to miss spring practice as he sought treatment. In secret, he would eat until he was full and then continue eating until his body hurt. If his eating disorder had not been treated, Julius speculated, he might have died.
In 2015 Julius served as Penn State’s placekicker, connecting on 10 of 12 field goals and 20 of 24 extra points. This season, he’s handling only kickoffs, but he’s achieved another degree of virality. At the beginning of last month, he took down Kent State’s Kavious Price by hurling his big body into a wide receiver who was 100 pounds lighter. The tackle wasn’t exactly good form, but Julius’s sheer mass sent Price teetering backward and to the ground.
Then he got Michigan’s Jourdan Lewis, who’s one of the best players in football. Kicker or not, this hit would’ve been a highlight for anyone:
After the game, Lewis went on to describe Julius as “a nose tackle who can kick,” which sounds like the next frontier of positional flexibility. But the subtext of Lewis’s words is clear: Julius is so different from every other kicker that he can’t even be defined as one.
Of course, football does not celebrate things that are different. Apparently, opponents are upset that they have to block 11 players instead of blocking 10 while ignoring the frightened kicker. Maryland and Minnesota players went out of their way to demolish Julius, blowing him up with blindside hits that both led to ejections. These were contract killings with no football significance whatsoever. In the instance of the Maryland hit, the play was already dead.
Look at Julius — prone, limp, seemingly deceased:
Taking down an oblivious kicker is not impressive; it just makes me think you’re a jerk.
Oddly enough, a portion of the internet commentariat suggested that Julius brought this upon himself. If you’re going to try to make tackles, they said, people are going to hit back. Look at the comment section — a beautiful Petri dish spawning the worst takes possible — from the YouTube video of Julius’s hit on Lewis.
When defensive ends make big hits, opponents don’t demolish them after the whistle to get even. The problem is that Julius is a kicker: He’s not supposed to try, and now he’s being punished for doing so.
It is easy to make fun of kickers for being different from the average football player. But now that Julius has proven that he’s nearly as athletic and as strong as his teammates and opponents, he’s finding out that’s not allowed, either. He finally brought a knife to a knife fight, and his opponents went and got bazookas.
At a position that calls for automatons, Julius is exceptionally human. Sure, KickerBot 3000 would be a better kicker than Julius, drilling every field goal and blasting the ball out of the end zone for a touchback on every kickoff. But Julius makes football more interesting. He makes us think about things that we never think about with the scores of skinny kickers who scurry to the sideline after their duty is done. That deserves celebration, but sometimes, being a robot doesn’t sound too bad. |
// Callback for notifications from blockdag. It notifies clients that are
// long polling for changes or subscribed to websockets notifications.
func (s *Server) handleBlockDAGNotification(notification *blockdag.Notification) {
switch notification.Type {
case blockdag.NTBlockAdded:
data, ok := notification.Data.(*blockdag.BlockAddedNotificationData)
if !ok {
log.Warnf("Block added notification data is of wrong type.")
break
}
block := data.Block
tipHashes := s.cfg.DAG.TipHashes()
s.gbtWorkState.NotifyBlockAdded(tipHashes)
s.ntfnMgr.NotifyBlockAdded(block)
case blockdag.NTChainChanged:
data, ok := notification.Data.(*blockdag.ChainChangedNotificationData)
if !ok {
log.Warnf("Chain changed notification data is of wrong type.")
break
}
if s.cfg.AcceptanceIndex == nil {
break
}
s.ntfnMgr.NotifyChainChanged(data.RemovedChainBlockHashes,
data.AddedChainBlockHashes)
}
} |
t=int(input())
for _ in range(t):
n=int(input())
arr=list(map(int,input().split()))
c=[0,0,0]
for i in arr:
if(i%3==0):
c[0]+=1
elif(i%3==1):
c[1]+=1
else:
c[2]+=1
ans=0
avg=sum(c)//3
for j in range(3):
for i in range(3):
if(c[(i+1)%3]<avg and c[i]>c[(i+1)%3]):
t=min(c[i]-c[(i+1)%3], avg-c[(i+1)%3])
c[(i+1)%3]+=t
c[i]-=t
ans+=t
print(ans) |
/**
* @(#)SoundDriver.java
*
* @author David Navarro, Nicholas Hernandez
* @version 1.01 5/6/2014
*
*/
public class SoundDriver {
private Clip[] clips;
private int[] framePosition;
private boolean[] isPlaying;
private FloatControl gainControl;
public SoundDriver(String[] aClips) {
clips = new Clip[aClips.length];
framePosition = new int[aClips.length];
isPlaying = new boolean[aClips.length];
try {
AudioFormat format = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED,
AudioSystem.NOT_SPECIFIED,
16, 2, 4,
AudioSystem.NOT_SPECIFIED, true);
DataLine.Info info = new DataLine.Info(Clip.class, format);
for (int i = 0; i < clips.length; i++) {
File soundFile = new File(aClips[i]);
BufferedInputStream bs = new BufferedInputStream(new FileInputStream(soundFile));
AudioInputStream soundIn = AudioSystem.getAudioInputStream(bs);
clips[i] = (Clip) AudioSystem.getLine(info);
clips[i].open(soundIn);
gainControl = (FloatControl) clips[i].getControl(FloatControl.Type.MASTER_GAIN);
}
//System.out.println("Audio File Loaded");
} catch (UnsupportedAudioFileException ex) {
System.out.println("Unsupported Audio File");
} catch (LineUnavailableException ex) {
System.out.println("Line Unavailable");
} catch (IOException ex) {
System.out.println("IO Error" + ex);
}
}
public void play(int value) {
clips[value].stop();
clips[value].setFramePosition(0);
clips[value].start();
}
public void loop(int value) {
clips[value].stop();
clips[value].setFramePosition(0);
clips[value].loop(Clip.LOOP_CONTINUOUSLY);
}
public void stop(int value) {
clips[value].stop();
}
public void pause(int value){
framePosition[value] = clips[value].getFramePosition();
clips[value].stop();
}
public void resume(int value){
clips[value].setFramePosition(framePosition[value]);
clips[value].start();
}
public boolean isPlaying(int value){
return clips[value].isRunning();
}
public void setVolume(float volume) {
//gainControl.setValue(volume);
}
} |
// Reconcile kicks off the state synchronization for every target group inside this TargetGroups
// instance. It returns the new TargetGroups its created and a list of TargetGroups it believes
// should be cleaned up.
func (t TargetGroups) Reconcile(rOpts *ReconcileOptions) (TargetGroups, TargetGroups, error) {
var output TargetGroups
var cleanUp TargetGroups
for _, tg := range t {
tgOpts := &targetgroup.ReconcileOptions{
Eventf: rOpts.Eventf,
VpcID: rOpts.VpcID,
ManagedSGInstance: rOpts.ManagedSGInstance,
}
if err := tg.Reconcile(tgOpts); err != nil {
return nil, nil, err
}
if tg.Deleted {
cleanUp = append(cleanUp, tg)
}
output = append(output, tg)
}
return output, cleanUp, nil
} |
School districts around the Bay Area are spying on their own students — often with private investigators — just to make sure the kids really live where they say they do.
Sometimes, private eyes surreptitiously photograph the youngsters as they come and go from homes suspected of being fronts. Sometimes, they lie about who and what they’re doing in hopes people unwittingly will rat the kids out.
This schoolhouse subterfuge tumbled into the open last month when the Orinda Union School District kicked out a 7-year-old Latina it erroneously believed did not reside in the tony, mostly white suburb. But in mostly affluent districts from Los Gatos to Palo Alto to Mill Valley, residency checks have been standard operating procedure for years.
Convinced that duplicitous parents are claiming Junior lives with Grandma to get him a better education, school administrators believe they have to expose the fraud so they can protect scarce resources for the kids who actually live in their community. But their tactics are raising hackles.
“We’re very concerned to know that students are being surveilled,” said Linnea Nelson, education equity staff attorney for the American Civil Liberties Union. “I question the resources put into that method when there seems to be much simpler ways to determine if someone lives in the district.”
To make the case that Vivian, the 7-year-old, did not live in Orinda, a private investigator hired by the district nosed around the girl’s old neighborhood in Bay Point, passing himself off as a car insurance investigator when he spoke to neighbors and to the girl’s mother.
The district later reversed itself and allowed the girl to stay at the school after a story in this newspaper recounted that Vivian’s mother was a live-in nanny for an Orinda couple, and that her primary residence was their home. The paper is not using Vivian’s last name for security reasons.
“It seems excessive for a school district to go straight to hiring a private investigator when questions of residency arise,” said Miriam Storch, who employs Vivian’s mom. “Most people are reasonable, and we’re talking about parents here, not criminals. When ordinary people are doing something wrong and you confront them about it, they’re probably going to admit it.”
The small Orinda district said it frequently uses investigators because it has no one on staff able to handle such queries. This newspaper’s survey of many Bay Area school districts, large and small, found that using private eyes is common.
Several high-performing districts throughout the Bay Area divulge on registration forms that investigators might be used if questions of residency come up.
According to the Los Gatos Union School District policy: “The district will actively investigate all cases where it has reason to believe that residency status has changed and/or false information has been provided, including the use of private investigators to verify residency status.” Parents are warned they can be criminally liable if they provide false information.
San Francisco Unified also warns parents that it uses private investigators, although spokeswoman Gentle Blythe said it largely assigns the task to in-house employees who must identify themselves as working for the district. The district’s website urges readers to “Report residency fraud!” with a confidential telephone hotline number and email tip line. The recorded phone hotline message asks for a student’s name, school, grade level and “alleged address,” promising to keep the report confidential.
A 2010 district probe resulted in the dismissal of a couple hundred students with faulty addresses, and their parents were socked with bills ranging from $500 to $4,500 for the investigation, Blythe said.
Chris Reynolds, president of California Association of Licensed Investigators, said the investigations usually begin with public database searches, but the next step is surveillance, involving photographing the child coming and going from a suspected residence over a number of days, he said.
“It’s the only way to verify,” Reynolds said. “Families will invariably say, ‘Prove it.'”
A run-of-the-mill investigation can run from $1,000 to $2,500, he said.
As school funds dry up, Reynolds said the demand for residency checks has increased. Many of his cases involve special-needs students, as a single child can cost a district more than $1 million in services during progression from kindergarten through high school.
In a 2010 San Jose Unified School District case, the parents of a special-needs student challenged the district’s dismissal of their middle school child over residency. In its decision, the district cited a private investigator who had observed the parents’ house 19 times and the grandmother’s house 10 times. The investigator, hired by the district for two months, documented the comings and goings of inhabitants from 100 yards away. A judge later determined the boy lived within the district’s boundaries, according to court documents.
Oakland Unified will hire an investigator when it believes a special-needs student might reside outside its boundaries, said spokesman Troy Flint.
“We’re so strapped for resources in that department,” he said. “The caseloads are heavier than we want them … and they’re very costly.”
The job description for this type of investigative work reveals just how steady — and sensitive — it can be. Dinolt, Becnel & Wells, a Washington, D.C.-based private eye firm, promotes its student surveillance capabilities on its website with a detailed description of how it does the work.
“Because we were following children, this surveillance had to be handled with the utmost delicacy,” the website explains. “Naturally, the public is very sensitive to people taking pictures of kids in public, and the last thing we wanted was to cause any anxiety over our investigations. To lessen the chances of detection, we often used multiple investigator teams — sometimes with as many as five investigators tailing a single subject — and a 300 mm lens to observe students and their families from a very safe distance.”
Other districts have chosen a different tack. Fremont Unified, a large district with 42 schools and about 34,000 students, declines to use private investigators, instead opting for principals or student support services staff who make home visits.
“We do not conduct surveillance but visit the residence to talk with the family,” said Superintendent Jim Morris, indicating that occurs about five to 10 times a year. “That’s the way we have always done it, and it has been effective for us.”
Palo Alto Unified School District employs a part-time residency officer, said spokeswoman Tabitha Kappeler-Hurley. But on rare occasions it hires a private investigator to assist, she said, and the work can include surveillance and photographs. She said the outside investigators are provided with a district ID in case there are questions.
Jesus “Jesse” Zuniga Jr., a retired Hayward and Tracy police officer, according to his LinkedIn profile, investigated Vivian, the Orinda student. He gave his business card to the girl’s mother after saying he was looking into an auto accident involving her car — there was no such accident — and asking where she lived. The girl had spent extra time in Bay Point because her great grandmother, who lived there, had been ill, which may have led to the mistaken conclusion she was not an Orinda resident.
In a phone call, Zuniga declined to talk about the specifics of the case. However, he said it’s common for those in his profession to make up a story to hide their true purpose.
Reynolds, head of the licensed investigators group, said such pretexts, or fibs, are legal but not often necessary in school residency probes because the investigator usually never talks to a parent.
Such tactics bother Storch, who said she hopes Vivian’s case launches a review of how districts conduct such investigations.
“How students are identified for investigation, how an investigation is deemed necessary, and how those investigations are conducted needs to be reviewed and made public knowledge,” she said. “I think we can all work together to come up with a better system that everyone is comfortable with.”
Contact Matthias Gafni at 925-952-5026. Follow him at Twitter.com/mgafni. |
<gh_stars>0
// Lean compiler output
// Module: Init.Lean.Delaborator
// Imports: Init.Lean.KeyedDeclsAttribute Init.Lean.Parser.Level Init.Lean.Elab
#include "runtime/lean.h"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern lean_object* l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__1;
lean_object* l_List_firstM___main___at_Lean_Delaborator_delabFor___main___spec__7(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Name_toString___closed__1;
lean_object* l_Lean_Delaborator_withAppFn___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main(lean_object*);
lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Delaborator_delabFor___main___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___lambda__1___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__1___closed__6;
lean_object* l_Lean_Delaborator_getExprKind___closed__27;
extern lean_object* l_Lean_Parser_Term_explicit___elambda__1___closed__2;
lean_object* l_Lean_Delaborator_getExprKind___closed__9;
lean_object* lean_local_ctx_get_unused_name(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_DelabM_monadQuotation___closed__2;
lean_object* l___regBuiltin_Lean_Delaborator_delabFVar___closed__1;
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__1___closed__5;
lean_object* l_Lean_Delaborator_annotatePos(lean_object*, lean_object*);
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__2___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabSort___closed__12;
lean_object* l_Lean_Delaborator_annotatePos___main(lean_object*, lean_object*);
lean_object* l_Lean_mkTermIdFromIdent(lean_object*);
lean_object* l_Lean_LocalDecl_userName(lean_object*);
extern lean_object* l_Lean_Nat_HasQuote___closed__2;
lean_object* l_unreachable_x21___rarg(lean_object*);
lean_object* l_Lean_Delaborator_DelabM_inhabited(lean_object*);
lean_object* l_PersistentHashMap_empty___at_Lean_Delaborator_delabAttribute___spec__3;
lean_object* l_Lean_Delaborator_getExpr___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getExpr(lean_object*, lean_object*, lean_object*);
lean_object* l_Array_eraseIdx___rarg(lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_uget(lean_object*, size_t);
lean_object* l___regBuiltin_Lean_Delaborator_delabFVar(lean_object*);
lean_object* l_Lean_Expr_bindingDomain_x21(lean_object*);
extern lean_object* l_Lean_Parser_Term_explicit___elambda__1___closed__1;
lean_object* l_Lean_Delaborator_delab(lean_object*, lean_object*, lean_object*);
uint8_t lean_name_eq(lean_object*, lean_object*);
extern lean_object* l_Lean_registerTraceClass___closed__1;
lean_object* l_Lean_Delaborator_getExprKind___closed__15;
extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2;
lean_object* l_Lean_Level_quote___main___lambda__2___closed__1;
lean_object* l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withBindingBody___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabAppImplicit___closed__1;
lean_object* l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__31;
lean_object* l_Lean_Delaborator_whenNotPPOption(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_getPPBinderTypes___closed__3;
lean_object* l_Lean_Delaborator_getExprKind___closed__1;
lean_object* l_Lean_Delaborator_getExprKind___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withAppFn(lean_object*);
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_getPPExplicit(lean_object*);
extern lean_object* l_Lean_Parser_Term_type___elambda__1___closed__2;
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__3;
lean_object* l_Lean_Delaborator_DelabM_monadQuotation___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_ppOptions___closed__1;
extern lean_object* l_Lean_Level_LevelToFormat_Result_format___main___closed__1;
extern lean_object* l_Array_empty___closed__1;
lean_object* l_Lean_Delaborator_getImplicitParams___closed__1;
lean_object* l_Lean_Delaborator_withAppArg(lean_object*);
lean_object* l_Lean_Delaborator_descend___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_List_tailD___rarg(lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Level_max___elambda__1___closed__1;
lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Delaborator_delabFor___main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Level_dec___main(lean_object*);
lean_object* l_Lean_Level_quote___main___closed__5;
extern lean_object* l_Lean_Parser_Level_num___elambda__1___closed__1;
lean_object* l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1___rarg(lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__10;
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux___main___closed__1;
lean_object* l_Lean_Delaborator_getExprKind___closed__23;
lean_object* l_Lean_Delaborator_withAppFnArgs___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_DelabM_inhabited___closed__1;
lean_object* lean_expr_instantiate1(lean_object*, lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__21;
lean_object* lean_array_get_size(lean_object*);
lean_object* lean_string_append(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__8;
lean_object* l_Lean_Level_quote___main___closed__3;
lean_object* l_Lean_Delaborator_getExprKind___closed__17;
lean_object* l_Lean_Delaborator_DelabM_monadQuotation___closed__4;
lean_object* l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1;
lean_object* l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__1;
lean_object* l_Lean_Expr_getAppFn___main(lean_object*);
extern lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__5;
lean_object* l_Lean_Delaborator_DelabM_monadQuotation___closed__1;
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_typeAscription___elambda__1___closed__2;
lean_object* l_Lean_Delaborator_getExprKind___closed__4;
lean_object* l_Lean_Delaborator_annotateCurPos___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
size_t l_USize_shiftRight(size_t, size_t);
extern lean_object* l_Lean_Parser_Term_proj___elambda__1___closed__1;
lean_object* l_Lean_Level_HasQuote___closed__1;
lean_object* lean_string_utf8_byte_size(lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_sort___elambda__1___closed__2;
lean_object* l_Lean_Level_HasQuote;
lean_object* l___regBuiltin_Lean_Delaborator_delabAppImplicit(lean_object*);
lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabMVar(lean_object*);
extern lean_object* l_Lean_mkTermIdFromIdent___closed__1;
lean_object* l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__1;
lean_object* l_Lean_Delaborator_delabMVar(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_LocalContext_Inhabited___closed__1;
extern lean_object* l_Lean_mkAppStx___closed__8;
uint8_t l_Lean_getPPUniverses(lean_object*);
extern lean_object* l_Lean_mkAppStx___closed__7;
lean_object* lean_nat_add(lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_sort___elambda__1___closed__5;
uint8_t l_Lean_getPPBinderTypes(lean_object*);
lean_object* l_Lean_Delaborator_delabAppImplicit(lean_object*, lean_object*, lean_object*);
lean_object* l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__32;
lean_object* l_Lean_Delaborator_getExprKind___closed__10;
lean_object* l_Lean_Delaborator_delabSort___closed__3;
extern lean_object* l_Lean_mkTermIdFromIdent___closed__2;
lean_object* l_Lean_Delaborator_getExprKind___closed__12;
lean_object* l_Lean_Level_quote___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1;
lean_object* l_Lean_Level_quote___main___lambda__1___closed__1;
lean_object* l_Lean_Level_quote___main___closed__6;
lean_object* l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__2;
lean_object* l_Lean_Delaborator_delabSort___closed__7;
extern lean_object* l_Lean_Parser_Term_namedPattern___elambda__1___closed__5;
lean_object* l_Lean_Delaborator_annotateCurPos(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppExplicit___closed__3;
extern lean_object* l_Lean_Parser_Level_imax___elambda__1___closed__1;
extern lean_object* l_Lean_Parser_Term_sort___elambda__1___closed__1;
lean_object* l_Lean_Level_getLevelOffset___main(lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__13;
lean_object* l_Lean_ppOptions(lean_object*);
lean_object* lean_array_fget(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__7;
lean_object* l_Lean_Delaborator_delabAppExplicit(lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_infoForPos___closed__2;
lean_object* l_Lean_Delaborator_delabSort___closed__10;
extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1;
extern lean_object* l_Lean_Parser_Term_type___elambda__1___closed__5;
extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__11;
extern lean_object* l_Lean_numLitKind;
lean_object* l_Lean_Delaborator_delabFVar(lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabExplicitLam___closed__1;
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__7;
lean_object* l_Lean_Delaborator_delab___closed__1;
lean_object* l_Lean_Delaborator_getExprKind___closed__20;
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabLit(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_append___main(lean_object*, lean_object*);
uint8_t l_Lean_KVMap_getBool(lean_object*, lean_object*, uint8_t);
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__3;
extern lean_object* l_Lean_Parser_Level_addLit___elambda__1___closed__2;
lean_object* l_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1___boxed(lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
lean_object* l_Lean_Level_quote___main___closed__1;
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__5;
lean_object* l_Lean_Level_quote___main___lambda__4___closed__1;
lean_object* l_Lean_Delaborator_whenPPOption(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Meta_recursorAttribute___closed__1;
lean_object* l___regBuiltin_Lean_Delaborator_delabAppExplicit(lean_object*);
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Unhygienic_run___rarg(lean_object*);
lean_object* l_Lean_Expr_fvarId_x21(lean_object*);
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabSort___closed__5;
extern lean_object* l_Lean_Unhygienic_MonadQuotation___closed__4;
lean_object* l_Lean_Level_quote___main___closed__2;
lean_object* l_Lean_Delaborator_getExprKind___closed__11;
lean_object* l_Lean_Level_quote___main___lambda__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Level_toNat(lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabLit(lean_object*);
lean_object* l_Lean_Delaborator_delabAttribute___closed__2;
lean_object* l_Lean_Delaborator_mkDelabAttribute___lambda__1(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__5;
lean_object* l_Lean_Delaborator_infoForPos___closed__1;
size_t l_Lean_Name_hash(lean_object*);
lean_object* l_Nat_repr(lean_object*);
extern lean_object* l_Char_HasRepr___closed__1;
uint8_t l_Lean_LocalDecl_binderInfo(lean_object*);
extern lean_object* l_Lean_Level_LevelToFormat_Result_format___main___closed__5;
extern lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__3;
lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Delaborator_2__delabLamAux___main___spec__1(lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
lean_object* l_Lean_Delaborator_getExprKind___closed__26;
lean_object* l_Lean_Delaborator_delabFor___main(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withAppFnArgs(lean_object*);
lean_object* lean_name_mk_string(lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_fun___elambda__1___closed__2;
extern lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2;
lean_object* l_Lean_Delaborator_getPPOption(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1(lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__1(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_numLitKind___closed__2;
lean_object* l_Lean_Level_getOffsetAux___main(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withBindingBody___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_attrParamSyntaxToIdentifier(lean_object*);
size_t lean_usize_modn(size_t, lean_object*);
lean_object* l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__1;
extern lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__2;
lean_object* l_Lean_Delaborator_getExprKind___closed__33;
lean_object* l_Lean_Level_quote___main___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Expr_isConst(lean_object*);
uint8_t l_Array_isEmpty___rarg(lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___lambda__1___closed__2;
extern lean_object* l_String_Iterator_HasRepr___closed__2;
lean_object* l_Lean_Delaborator_infoForPos(lean_object*);
lean_object* l_Lean_Delaborator_withBindingDomain(lean_object*);
lean_object* l_Array_umapMAux___main___at_Lean_Delaborator_delabConst___spec__1(lean_object*, lean_object*);
lean_object* l_List_redLength___main___rarg(lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__24;
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__4;
lean_object* l_mkHashMapImp___rarg(lean_object*);
lean_object* l_Lean_Delaborator_delabSort___closed__6;
lean_object* l_Lean_Delaborator_delabAttribute___closed__4;
lean_object* l_Lean_Delaborator_getExprKind___closed__7;
lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_HashMapImp_find_x3f___at_Lean_Delaborator_delabFor___main___spec__5(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
extern lean_object* l_Lean_Parser_FirstTokens_toStr___closed__3;
lean_object* l_Lean_Delaborator_delabAppExplicit___closed__4;
lean_object* l_Lean_Delaborator_getExprKind___closed__19;
extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3;
lean_object* l_PersistentHashMap_findAux___main___at_Lean_Delaborator_delabFor___main___spec__3___boxed(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Expr_isLambda(lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__6;
lean_object* l___regBuiltin_Lean_Delaborator_delabExplicitLam(lean_object*);
lean_object* l_Lean_Delaborator_DelabM_monadQuotation;
extern lean_object* l___private_Init_Lean_Elab_DoNotation_7__expandDoElemsAux___main___closed__2;
size_t l_USize_land(size_t, size_t);
extern lean_object* l_Lean_String_HasQuote___closed__2;
lean_object* l_Lean_Level_quote___main___closed__4;
uint8_t l_Lean_Syntax_isAtom(lean_object*);
extern lean_object* l_Lean_nullKind___closed__2;
extern lean_object* l_Lean_Meta_mkAuxName___closed__1;
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__6;
lean_object* l_Lean_Delaborator_getExprKind___closed__5;
extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__10;
lean_object* l_Lean_Delaborator_getExprKind___closed__22;
extern lean_object* l_Lean_Parser_Level_hole___elambda__1___closed__1;
extern lean_object* l_Lean_mkAppStx___closed__3;
lean_object* l_Lean_Delaborator_getPPOption___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_prop___elambda__1___closed__2;
lean_object* l_Lean_Delaborator_delabSort___closed__2;
extern lean_object* l_Lean_Parser_Term_implicitBinder___elambda__1___closed__2;
extern lean_object* l_Lean_Syntax_inhabited;
lean_object* l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__1;
lean_object* l_Lean_Meta_withLocalDecl___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabAppExplicit___closed__1;
lean_object* l_Lean_delab(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__13;
lean_object* l_Lean_Delaborator_delabFor(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getPPOption___closed__1;
lean_object* l_Lean_Delaborator_delabExplicitLam(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_mkAppStx___closed__5;
lean_object* l_Lean_Level_quote___main___lambda__1___closed__4;
extern lean_object* l_PersistentArray_Stats_toString___closed__4;
uint8_t l_Lean_BinderInfo_beq(uint8_t, uint8_t);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__2;
lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*);
uint8_t lean_expr_eqv(lean_object*, lean_object*);
lean_object* l_Lean_ppOptions___closed__2;
lean_object* l_Lean_Level_quote___main___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2;
lean_object* l_Lean_Level_quote___main___lambda__9___closed__1;
lean_object* l_Lean_Delaborator_descend(lean_object*);
lean_object* l_Lean_SMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__1___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__9___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabConst(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getArgs(lean_object*);
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_BinderInfo_isExplicit(uint8_t);
lean_object* l_Lean_Delaborator_delabMVar___closed__1;
lean_object* l_Lean_Level_quote___main___lambda__1___closed__2;
lean_object* l_Lean_Delaborator_delabSort___closed__13;
extern lean_object* l_Lean_Parser_Term_paren___elambda__1___closed__1;
lean_object* l_Lean_Delaborator_delabMVar___closed__2;
lean_object* l_Lean_Level_quote___main___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_SMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__1(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__16;
lean_object* l_Lean_Level_quote___main___lambda__4___closed__2;
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__2;
lean_object* l_Lean_Delaborator_delabAttribute___closed__1;
extern lean_object* l_Lean_Parser_Term_prop___elambda__1___closed__5;
lean_object* l_Lean_Level_quote___main___lambda__9(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getImplicitParams(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_getPPAll___boxed(lean_object*);
lean_object* lean_register_option(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppExplicit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withBindingDomain___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_getPPAll___closed__1;
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__1;
lean_object* l_Lean_getPPAll___closed__2;
lean_object* l_Lean_getPPUniverses___closed__1;
lean_object* l_Lean_getPPUniverses___boxed(lean_object*);
lean_object* l_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6___boxed(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1;
lean_object* l_Lean_mkStxStrLit(lean_object*, lean_object*);
lean_object* lean_nat_mul(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__2;
lean_object* l_Lean_Delaborator_delabConst___closed__1;
extern lean_object* l_Lean_Parser_Command_universes___elambda__1___closed__1;
lean_object* l_Lean_getPPExplicit___boxed(lean_object*);
lean_object* l_Lean_Delaborator_getExprKind(lean_object*, lean_object*, lean_object*);
lean_object* l_HashMapImp_find_x3f___at_Lean_Delaborator_delabFor___main___spec__5___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__1___closed__3;
lean_object* l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__2;
lean_object* lean_mk_syntax_num_lit(lean_object*);
lean_object* l_Lean_Syntax_setInfo(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__8;
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux___main___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppExplicit___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Level_LevelToFormat_Result_format___main___closed__3;
lean_object* l_Lean_mkTermIdFrom(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute(lean_object*);
lean_object* l_Lean_Delaborator_delabSort___closed__9;
lean_object* l_Lean_Name_getRoot___main(lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabLit___closed__1;
lean_object* l_Lean_getPPExplicit___closed__1;
lean_object* l_Lean_Delaborator_getExprKind___closed__6;
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__12;
lean_object* l_Array_toList___rarg(lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabSort___closed__1;
lean_object* l___regBuiltin_Lean_Delaborator_delabMVar___closed__1;
lean_object* l_Lean_Delaborator_delabAttribute;
lean_object* l_Lean_Delaborator_delabConst___closed__2;
uint8_t l_Lean_Expr_binderInfo(lean_object*);
uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*);
lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabConst___closed__4;
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__4;
lean_object* l_Lean_Level_quote___main___lambda__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabSort___closed__8;
extern lean_object* l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__41;
lean_object* l_Lean_Delaborator_delabSort___closed__4;
lean_object* l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__2;
lean_object* l_Lean_Level_quote___main___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_PersistentHashMap_findAux___main___at_Lean_Delaborator_delabFor___main___spec__3(lean_object*, size_t, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_mk_syntax_ident(lean_object*);
lean_object* l_Lean_Delaborator_delabSort___closed__1;
lean_object* l_Lean_mkStxLit(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_DelabM_monadQuotation___closed__3;
lean_object* l_Lean_Delaborator_getImplicitParams___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withBindingBody(lean_object*);
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
extern lean_object* l_Lean_mkOptionalNode___closed__2;
extern lean_object* l_Lean_Meta_isClassQuick___main___closed__1;
lean_object* l_Lean_Delaborator_descend___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__11;
extern lean_object* l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4;
lean_object* l_Lean_Delaborator_withAppFnArgs___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withAppArg___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*);
uint8_t l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_List_isEmpty___rarg(lean_object*);
lean_object* l_Lean_getPPBinderTypes___closed__2;
lean_object* l_Lean_Delaborator_delabAppExplicit___closed__2;
lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*);
lean_object* l_Lean_KeyedDeclsAttribute_init___rarg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAttribute___closed__5;
lean_object* l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_getImplicitParams___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_usize_to_nat(size_t);
lean_object* l_Lean_Delaborator_withAppFnArgs___main(lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__30;
uint8_t l_Lean_getPPAll(lean_object*);
lean_object* l_Lean_Delaborator_getExprKind___closed__3;
lean_object* l_Lean_Delaborator_getExprKind___closed__18;
lean_object* l_Lean_Delaborator_delabAttribute___closed__3;
lean_object* l_Lean_Delaborator_getExprKind___closed__28;
lean_object* l_Lean_Delaborator_getExprKind___closed__14;
extern lean_object* l_Lean_mkAppStx___closed__2;
lean_object* l_Lean_Expr_bindingBody_x21(lean_object*);
lean_object* l___private_Init_Lean_Delaborator_1__shouldGroupWithNext(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabSort___closed__11;
lean_object* l_Lean_Delaborator_delabSort(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Level_quote(lean_object*);
lean_object* l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1___boxed(lean_object*, lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__57;
lean_object* l_Lean_Delaborator_delabConst___closed__3;
lean_object* l_Lean_Delaborator_getExprKind___closed__29;
extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4;
extern lean_object* l_Lean_Parser_Term_sortApp___elambda__1___closed__2;
lean_object* l_Lean_Delaborator_getExprKind___closed__25;
lean_object* l_Lean_Level_quote___main___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_getPPBinderTypes___closed__4;
extern lean_object* l_Lean_mkAppStx___closed__1;
lean_object* l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1(lean_object*);
lean_object* l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_forallTelescopeReducing___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_mkDelabAttribute___closed__9;
extern lean_object* l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__2;
lean_object* l_Lean_getPPBinderTypes___closed__1;
lean_object* l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2;
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__2(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__1;
lean_object* l_mkHashMap___at_Lean_Delaborator_delabAttribute___spec__2(lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_withBindingBody___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltin_Lean_Delaborator_delabSort(lean_object*);
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
lean_object* l_Lean_Delaborator_delabAppExplicit___closed__1;
lean_object* l_Lean_Level_quote___main___lambda__6___closed__1;
lean_object* l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Level_quote___main___lambda__6___closed__2;
lean_object* l_Lean_getPPBinderTypes___boxed(lean_object*);
lean_object* _init_l_Lean_Level_quote___main___lambda__1___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("0");
return x_1;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__1___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Level_quote___main___lambda__1___closed__1;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__1___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Level_quote___main___lambda__1___closed__2;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__1___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_numLitKind___closed__2;
x_2 = l_Lean_Level_quote___main___lambda__1___closed__3;
x_3 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__1___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Level_quote___main___lambda__1___closed__4;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__1___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Parser_Level_num___elambda__1___closed__1;
x_2 = l_Lean_Level_quote___main___lambda__1___closed__5;
x_3 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* l_Lean_Level_quote___main___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5;
x_4 = l_Lean_Level_quote___main___lambda__1___closed__6;
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_4);
lean_ctor_set(x_5, 1, x_3);
return x_5;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__2___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Level_LevelToFormat_Result_format___main___closed__1;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* l_Lean_Level_quote___main___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17;
x_5 = l_Lean_Level_getLevelOffset___main(x_1);
x_6 = l_Lean_Level_quote___main(x_5);
x_7 = l_Array_empty___closed__1;
x_8 = lean_array_push(x_7, x_6);
x_9 = l_Lean_Level_quote___main___lambda__2___closed__1;
x_10 = lean_array_push(x_8, x_9);
x_11 = lean_unsigned_to_nat(0u);
x_12 = l_Lean_Level_getOffsetAux___main(x_1, x_11);
x_13 = lean_mk_syntax_num_lit(x_12);
x_14 = lean_array_push(x_10, x_13);
x_15 = l_Lean_Parser_Level_addLit___elambda__1___closed__2;
x_16 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_16, 0, x_15);
lean_ctor_set(x_16, 1, x_14);
x_17 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_17, 0, x_16);
lean_ctor_set(x_17, 1, x_4);
return x_17;
}
}
lean_object* l_Lean_Level_quote___main___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
x_5 = lean_mk_syntax_num_lit(x_1);
x_6 = l_Array_empty___closed__1;
x_7 = lean_array_push(x_6, x_5);
x_8 = l_Lean_Parser_Level_num___elambda__1___closed__1;
x_9 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_9, 0, x_8);
lean_ctor_set(x_9, 1, x_7);
x_10 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_10, 0, x_9);
lean_ctor_set(x_10, 1, x_4);
return x_10;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__4___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Level_LevelToFormat_Result_format___main___closed__3;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__4___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Level_quote___main___lambda__4___closed__1;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Level_quote___main___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
x_7 = l_Lean_Level_quote___main(x_1);
x_8 = l_Array_empty___closed__1;
x_9 = lean_array_push(x_8, x_7);
x_10 = lean_array_push(x_9, x_2);
x_11 = l_Lean_nullKind___closed__2;
x_12 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_12, 0, x_11);
lean_ctor_set(x_12, 1, x_10);
x_13 = l_Lean_Level_quote___main___lambda__4___closed__2;
x_14 = lean_array_push(x_13, x_12);
x_15 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_15, 0, x_3);
lean_ctor_set(x_15, 1, x_14);
x_16 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_16, 0, x_15);
lean_ctor_set(x_16, 1, x_6);
return x_16;
}
}
lean_object* l_Lean_Level_quote___main___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17;
x_7 = l_Lean_Level_quote___main(x_1);
x_8 = l_Array_empty___closed__1;
x_9 = lean_array_push(x_8, x_7);
x_10 = lean_unsigned_to_nat(0u);
x_11 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_2, x_2, x_10, x_9);
x_12 = l_Lean_nullKind___closed__2;
x_13 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_13, 0, x_12);
lean_ctor_set(x_13, 1, x_11);
x_14 = l_Lean_Level_quote___main___lambda__4___closed__2;
x_15 = lean_array_push(x_14, x_13);
x_16 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_16, 0, x_3);
lean_ctor_set(x_16, 1, x_15);
x_17 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_17, 0, x_16);
lean_ctor_set(x_17, 1, x_6);
return x_17;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__6___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Level_LevelToFormat_Result_format___main___closed__5;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__6___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Level_quote___main___lambda__6___closed__1;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Level_quote___main___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
x_7 = l_Lean_Level_quote___main(x_1);
x_8 = l_Array_empty___closed__1;
x_9 = lean_array_push(x_8, x_7);
x_10 = lean_array_push(x_9, x_2);
x_11 = l_Lean_nullKind___closed__2;
x_12 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_12, 0, x_11);
lean_ctor_set(x_12, 1, x_10);
x_13 = l_Lean_Level_quote___main___lambda__6___closed__2;
x_14 = lean_array_push(x_13, x_12);
x_15 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_15, 0, x_3);
lean_ctor_set(x_15, 1, x_14);
x_16 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_16, 0, x_15);
lean_ctor_set(x_16, 1, x_6);
return x_16;
}
}
lean_object* l_Lean_Level_quote___main___lambda__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17;
x_7 = l_Lean_Level_quote___main(x_1);
x_8 = l_Array_empty___closed__1;
x_9 = lean_array_push(x_8, x_7);
x_10 = lean_unsigned_to_nat(0u);
x_11 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_2, x_2, x_10, x_9);
x_12 = l_Lean_nullKind___closed__2;
x_13 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_13, 0, x_12);
lean_ctor_set(x_13, 1, x_11);
x_14 = l_Lean_Level_quote___main___lambda__6___closed__2;
x_15 = lean_array_push(x_14, x_13);
x_16 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_16, 0, x_3);
lean_ctor_set(x_16, 1, x_15);
x_17 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_17, 0, x_16);
lean_ctor_set(x_17, 1, x_6);
return x_17;
}
}
lean_object* l_Lean_Level_quote___main___lambda__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6;
x_5 = lean_mk_syntax_ident(x_1);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_5);
lean_ctor_set(x_6, 1, x_4);
return x_6;
}
}
lean_object* _init_l_Lean_Level_quote___main___lambda__9___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Parser_Level_hole___elambda__1___closed__1;
x_2 = l___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___lambda__1___closed__2;
x_3 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* l_Lean_Level_quote___main___lambda__9(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5;
x_4 = l_Lean_Level_quote___main___lambda__9___closed__1;
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_4);
lean_ctor_set(x_5, 1, x_3);
return x_5;
}
}
lean_object* _init_l_Lean_Level_quote___main___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__1___boxed), 3, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Level_quote___main___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_2 = l_Lean_Level_quote___main___closed__1;
x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_3, 0, x_1);
lean_closure_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Level_quote___main___closed__2;
x_2 = l_Lean_Unhygienic_run___rarg(x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Level_quote___main___closed__4() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__9___boxed), 3, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Level_quote___main___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_2 = l_Lean_Level_quote___main___closed__4;
x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_3, 0, x_1);
lean_closure_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Level_quote___main___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Level_quote___main___closed__5;
x_2 = l_Lean_Unhygienic_run___rarg(x_1);
return x_2;
}
}
lean_object* l_Lean_Level_quote___main(lean_object* x_1) {
_start:
{
switch (lean_obj_tag(x_1)) {
case 0:
{
lean_object* x_2;
lean_dec(x_1);
x_2 = l_Lean_Level_quote___main___closed__3;
return x_2;
}
case 1:
{
lean_object* x_3;
x_3 = l_Lean_Level_toNat(x_1);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
x_4 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__2___boxed), 4, 1);
lean_closure_set(x_4, 0, x_1);
x_5 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_6 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_6, 0, x_5);
lean_closure_set(x_6, 1, x_4);
x_7 = l_Lean_Unhygienic_run___rarg(x_6);
return x_7;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
lean_dec(x_1);
x_8 = lean_ctor_get(x_3, 0);
lean_inc(x_8);
lean_dec(x_3);
x_9 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__3___boxed), 4, 1);
lean_closure_set(x_9, 0, x_8);
x_10 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_11 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_11, 0, x_10);
lean_closure_set(x_11, 1, x_9);
x_12 = l_Lean_Unhygienic_run___rarg(x_11);
return x_12;
}
}
case 2:
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_31; uint8_t x_32;
x_13 = lean_ctor_get(x_1, 0);
lean_inc(x_13);
x_14 = lean_ctor_get(x_1, 1);
lean_inc(x_14);
lean_dec(x_1);
x_15 = l_Lean_Level_quote___main(x_14);
x_31 = l_Lean_Parser_Level_max___elambda__1___closed__1;
lean_inc(x_15);
x_32 = l_Lean_Syntax_isOfKind(x_15, x_31);
if (x_32 == 0)
{
uint8_t x_33;
x_33 = 0;
x_16 = x_33;
goto block_30;
}
else
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37;
x_34 = l_Lean_Syntax_getArgs(x_15);
x_35 = lean_array_get_size(x_34);
lean_dec(x_34);
x_36 = lean_unsigned_to_nat(2u);
x_37 = lean_nat_dec_eq(x_35, x_36);
lean_dec(x_35);
x_16 = x_37;
goto block_30;
}
block_30:
{
if (x_16 == 0)
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21;
x_17 = l_Lean_Parser_Level_max___elambda__1___closed__1;
x_18 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__4___boxed), 6, 3);
lean_closure_set(x_18, 0, x_13);
lean_closure_set(x_18, 1, x_15);
lean_closure_set(x_18, 2, x_17);
x_19 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_20 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_20, 0, x_19);
lean_closure_set(x_20, 1, x_18);
x_21 = l_Lean_Unhygienic_run___rarg(x_20);
return x_21;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
x_22 = lean_unsigned_to_nat(1u);
x_23 = l_Lean_Syntax_getArg(x_15, x_22);
lean_dec(x_15);
x_24 = l_Lean_Syntax_getArgs(x_23);
lean_dec(x_23);
x_25 = l_Lean_Parser_Level_max___elambda__1___closed__1;
x_26 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__5___boxed), 6, 3);
lean_closure_set(x_26, 0, x_13);
lean_closure_set(x_26, 1, x_24);
lean_closure_set(x_26, 2, x_25);
x_27 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_28 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_28, 0, x_27);
lean_closure_set(x_28, 1, x_26);
x_29 = l_Lean_Unhygienic_run___rarg(x_28);
return x_29;
}
}
}
case 3:
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; lean_object* x_56; uint8_t x_57;
x_38 = lean_ctor_get(x_1, 0);
lean_inc(x_38);
x_39 = lean_ctor_get(x_1, 1);
lean_inc(x_39);
lean_dec(x_1);
x_40 = l_Lean_Level_quote___main(x_39);
x_56 = l_Lean_Parser_Level_imax___elambda__1___closed__1;
lean_inc(x_40);
x_57 = l_Lean_Syntax_isOfKind(x_40, x_56);
if (x_57 == 0)
{
uint8_t x_58;
x_58 = 0;
x_41 = x_58;
goto block_55;
}
else
{
lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62;
x_59 = l_Lean_Syntax_getArgs(x_40);
x_60 = lean_array_get_size(x_59);
lean_dec(x_59);
x_61 = lean_unsigned_to_nat(2u);
x_62 = lean_nat_dec_eq(x_60, x_61);
lean_dec(x_60);
x_41 = x_62;
goto block_55;
}
block_55:
{
if (x_41 == 0)
{
lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46;
x_42 = l_Lean_Parser_Level_imax___elambda__1___closed__1;
x_43 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__6___boxed), 6, 3);
lean_closure_set(x_43, 0, x_38);
lean_closure_set(x_43, 1, x_40);
lean_closure_set(x_43, 2, x_42);
x_44 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_45 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_45, 0, x_44);
lean_closure_set(x_45, 1, x_43);
x_46 = l_Lean_Unhygienic_run___rarg(x_45);
return x_46;
}
else
{
lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54;
x_47 = lean_unsigned_to_nat(1u);
x_48 = l_Lean_Syntax_getArg(x_40, x_47);
lean_dec(x_40);
x_49 = l_Lean_Syntax_getArgs(x_48);
lean_dec(x_48);
x_50 = l_Lean_Parser_Level_imax___elambda__1___closed__1;
x_51 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__7___boxed), 6, 3);
lean_closure_set(x_51, 0, x_38);
lean_closure_set(x_51, 1, x_49);
lean_closure_set(x_51, 2, x_50);
x_52 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_53 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_53, 0, x_52);
lean_closure_set(x_53, 1, x_51);
x_54 = l_Lean_Unhygienic_run___rarg(x_53);
return x_54;
}
}
}
case 4:
{
lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
x_63 = lean_ctor_get(x_1, 0);
lean_inc(x_63);
lean_dec(x_1);
x_64 = lean_alloc_closure((void*)(l_Lean_Level_quote___main___lambda__8___boxed), 4, 1);
lean_closure_set(x_64, 0, x_63);
x_65 = l_Lean_Unhygienic_MonadQuotation___closed__4;
x_66 = lean_alloc_closure((void*)(l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_5__explodeHeadPat___spec__1___rarg), 4, 2);
lean_closure_set(x_66, 0, x_65);
lean_closure_set(x_66, 1, x_64);
x_67 = l_Lean_Unhygienic_run___rarg(x_66);
return x_67;
}
default:
{
lean_object* x_68;
lean_dec(x_1);
x_68 = l_Lean_Level_quote___main___closed__6;
return x_68;
}
}
}
}
lean_object* l_Lean_Level_quote___main___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_Lean_Level_quote___main___lambda__1(x_1, x_2, x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_4;
}
}
lean_object* l_Lean_Level_quote___main___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Level_quote___main___lambda__2(x_1, x_2, x_3, x_4);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_5;
}
}
lean_object* l_Lean_Level_quote___main___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Level_quote___main___lambda__3(x_1, x_2, x_3, x_4);
lean_dec(x_3);
lean_dec(x_2);
return x_5;
}
}
lean_object* l_Lean_Level_quote___main___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7;
x_7 = l_Lean_Level_quote___main___lambda__4(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_5);
lean_dec(x_4);
return x_7;
}
}
lean_object* l_Lean_Level_quote___main___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7;
x_7 = l_Lean_Level_quote___main___lambda__5(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_2);
return x_7;
}
}
lean_object* l_Lean_Level_quote___main___lambda__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7;
x_7 = l_Lean_Level_quote___main___lambda__6(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_5);
lean_dec(x_4);
return x_7;
}
}
lean_object* l_Lean_Level_quote___main___lambda__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7;
x_7 = l_Lean_Level_quote___main___lambda__7(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_2);
return x_7;
}
}
lean_object* l_Lean_Level_quote___main___lambda__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Level_quote___main___lambda__8(x_1, x_2, x_3, x_4);
lean_dec(x_3);
lean_dec(x_2);
return x_5;
}
}
lean_object* l_Lean_Level_quote___main___lambda__9___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_Lean_Level_quote___main___lambda__9(x_1, x_2, x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_4;
}
}
lean_object* l_Lean_Level_quote(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = l_Lean_Level_quote___main(x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Level_HasQuote___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Level_quote), 1, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Level_HasQuote() {
_start:
{
lean_object* x_1;
x_1 = l_Lean_Level_HasQuote___closed__1;
return x_1;
}
}
lean_object* _init_l_Lean_getPPBinderTypes___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("pp");
return x_1;
}
}
lean_object* _init_l_Lean_getPPBinderTypes___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_getPPBinderTypes___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_getPPBinderTypes___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("binder_types");
return x_1;
}
}
lean_object* _init_l_Lean_getPPBinderTypes___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_getPPBinderTypes___closed__2;
x_2 = l_Lean_getPPBinderTypes___closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
uint8_t l_Lean_getPPBinderTypes(lean_object* x_1) {
_start:
{
lean_object* x_2; uint8_t x_3; uint8_t x_4;
x_2 = l_Lean_getPPBinderTypes___closed__4;
x_3 = 1;
x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3);
return x_4;
}
}
lean_object* l_Lean_getPPBinderTypes___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3;
x_2 = l_Lean_getPPBinderTypes(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
lean_object* _init_l_Lean_getPPExplicit___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_getPPBinderTypes___closed__2;
x_2 = l_Lean_Parser_Term_explicit___elambda__1___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
uint8_t l_Lean_getPPExplicit(lean_object* x_1) {
_start:
{
lean_object* x_2; uint8_t x_3; uint8_t x_4;
x_2 = l_Lean_getPPExplicit___closed__1;
x_3 = 0;
x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3);
return x_4;
}
}
lean_object* l_Lean_getPPExplicit___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3;
x_2 = l_Lean_getPPExplicit(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
lean_object* _init_l_Lean_getPPUniverses___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_getPPBinderTypes___closed__2;
x_2 = l_Lean_Parser_Command_universes___elambda__1___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
uint8_t l_Lean_getPPUniverses(lean_object* x_1) {
_start:
{
lean_object* x_2; uint8_t x_3; uint8_t x_4;
x_2 = l_Lean_getPPUniverses___closed__1;
x_3 = 0;
x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3);
return x_4;
}
}
lean_object* l_Lean_getPPUniverses___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3;
x_2 = l_Lean_getPPUniverses(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
lean_object* _init_l_Lean_getPPAll___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("all");
return x_1;
}
}
lean_object* _init_l_Lean_getPPAll___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_getPPBinderTypes___closed__2;
x_2 = l_Lean_getPPAll___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
uint8_t l_Lean_getPPAll(lean_object* x_1) {
_start:
{
lean_object* x_2; uint8_t x_3; uint8_t x_4;
x_2 = l_Lean_getPPAll___closed__2;
x_3 = 0;
x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3);
return x_4;
}
}
lean_object* l_Lean_getPPAll___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3;
x_2 = l_Lean_getPPAll(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
lean_object* _init_l_Lean_ppOptions___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("(pretty printer) display implicit arguments");
return x_1;
}
}
lean_object* _init_l_Lean_ppOptions___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_1 = l_Lean_registerTraceClass___closed__1;
x_2 = l_Lean_getPPBinderTypes___closed__1;
x_3 = l_Lean_ppOptions___closed__1;
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_3);
return x_4;
}
}
lean_object* l_Lean_ppOptions(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_2 = l_Lean_getPPExplicit___closed__1;
x_3 = l_Lean_ppOptions___closed__2;
x_4 = lean_register_option(x_2, x_3, x_1);
if (lean_obj_tag(x_4) == 0)
{
uint8_t x_5;
x_5 = !lean_is_exclusive(x_4);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7;
x_6 = lean_ctor_get(x_4, 0);
lean_dec(x_6);
x_7 = lean_box(0);
lean_ctor_set(x_4, 0, x_7);
return x_4;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10;
x_8 = lean_ctor_get(x_4, 1);
lean_inc(x_8);
lean_dec(x_4);
x_9 = lean_box(0);
x_10 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_10, 0, x_9);
lean_ctor_set(x_10, 1, x_8);
return x_10;
}
}
else
{
uint8_t x_11;
x_11 = !lean_is_exclusive(x_4);
if (x_11 == 0)
{
return x_4;
}
else
{
lean_object* x_12; lean_object* x_13; lean_object* x_14;
x_12 = lean_ctor_get(x_4, 0);
x_13 = lean_ctor_get(x_4, 1);
lean_inc(x_13);
lean_inc(x_12);
lean_dec(x_4);
x_14 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_14, 0, x_12);
lean_ctor_set(x_14, 1, x_13);
return x_14;
}
}
}
}
lean_object* l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1___rarg(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3;
x_2 = lean_box(0);
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
lean_object* l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = lean_alloc_closure((void*)(l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1___rarg), 1, 0);
return x_4;
}
}
lean_object* _init_l_Lean_Delaborator_DelabM_inhabited___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1___boxed), 3, 1);
lean_closure_set(x_1, 0, lean_box(0));
return x_1;
}
}
lean_object* l_Lean_Delaborator_DelabM_inhabited(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
return x_2;
}
}
lean_object* l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec(x_2);
return x_4;
}
}
lean_object* l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6;
x_5 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_5, 0, x_1);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_5);
lean_ctor_set(x_6, 1, x_4);
return x_6;
}
}
lean_object* l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg___boxed), 4, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_DelabM_monadQuotation___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6;
x_6 = lean_apply_3(x_2, x_3, x_4, x_5);
return x_6;
}
}
lean_object* _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg___boxed), 4, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_box(0);
x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg___boxed), 4, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_DelabM_monadQuotation___lambda__1), 5, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_1 = l_Lean_Delaborator_DelabM_monadQuotation___closed__1;
x_2 = l_Lean_Delaborator_DelabM_monadQuotation___closed__2;
x_3 = l_Lean_Delaborator_DelabM_monadQuotation___closed__3;
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_3);
return x_4;
}
}
lean_object* _init_l_Lean_Delaborator_DelabM_monadQuotation() {
_start:
{
lean_object* x_1;
x_1 = l_Lean_Delaborator_DelabM_monadQuotation___closed__4;
return x_1;
}
}
lean_object* l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_ReaderT_pure___at_Lean_Delaborator_DelabM_monadQuotation___spec__1___rarg(x_1, x_2, x_3, x_4);
lean_dec(x_3);
lean_dec(x_2);
return x_5;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("invalid attribute argument, expected identifier");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__1;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* l_Lean_Delaborator_mkDelabAttribute___lambda__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_attrParamSyntaxToIdentifier(x_2);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4;
x_4 = l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__2;
return x_4;
}
else
{
lean_object* x_5; lean_object* x_6;
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("builtinDelab");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_mkDelabAttribute___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("delab");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_mkDelabAttribute___closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__5() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("Delaborator");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_mkAppStx___closed__2;
x_2 = l_Lean_Delaborator_mkDelabAttribute___closed__5;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__7() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("Delab");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Delaborator_mkDelabAttribute___closed__6;
x_2 = l_Lean_Delaborator_mkDelabAttribute___closed__7;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__9() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("Register a delaborator.\n\n[delab k] registers a declaration of type `Lean.Delaborator.Delab` for the `Lean.Expr`\nconstructor `k`. Multiple delaborators for a single constructor are tried in turn until\nthe first success. If the term to be delaborated is an application of a constant `c`,\nelaborators for `app.c` are tried first; this is also done for `Expr.const`s (\"nullary applications\")\nto reduce special casing. If the term is an `Expr.mdata` with a single key `k`, `mdata.k`\nis tried first.");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__10() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_mkDelabAttribute___lambda__1___boxed), 2, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_1 = l_Lean_Delaborator_mkDelabAttribute___closed__2;
x_2 = l_Lean_Delaborator_mkDelabAttribute___closed__4;
x_3 = l_Lean_Delaborator_mkDelabAttribute___closed__9;
x_4 = l_Lean_Delaborator_mkDelabAttribute___closed__8;
x_5 = l_Lean_Delaborator_mkDelabAttribute___closed__10;
x_6 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_6, 0, x_1);
lean_ctor_set(x_6, 1, x_2);
lean_ctor_set(x_6, 2, x_3);
lean_ctor_set(x_6, 3, x_4);
lean_ctor_set(x_6, 4, x_5);
return x_6;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__12() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("delabAttribute");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_mkDelabAttribute___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Delaborator_mkDelabAttribute___closed__6;
x_2 = l_Lean_Delaborator_mkDelabAttribute___closed__12;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_mkDelabAttribute(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_2 = l_Lean_Delaborator_mkDelabAttribute___closed__11;
x_3 = l_Lean_Delaborator_mkDelabAttribute___closed__13;
x_4 = l_Lean_KeyedDeclsAttribute_init___rarg(x_2, x_3, x_1);
return x_4;
}
}
lean_object* l_Lean_Delaborator_mkDelabAttribute___lambda__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Delaborator_mkDelabAttribute___lambda__1(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_mkHashMap___at_Lean_Delaborator_delabAttribute___spec__2(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = l_mkHashMapImp___rarg(x_1);
return x_2;
}
}
lean_object* _init_l_PersistentHashMap_empty___at_Lean_Delaborator_delabAttribute___spec__3() {
_start:
{
lean_object* x_1;
x_1 = l_Lean_LocalContext_Inhabited___closed__1;
return x_1;
}
}
lean_object* _init_l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_unsigned_to_nat(8u);
x_2 = l_mkHashMapImp___rarg(x_1);
return x_2;
}
}
lean_object* _init_l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__2() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_1 = 1;
x_2 = l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__1;
x_3 = l_PersistentHashMap_empty___at_Lean_Delaborator_delabAttribute___spec__3;
x_4 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_4, 0, x_2);
lean_ctor_set(x_4, 1, x_3);
lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1);
return x_4;
}
}
lean_object* _init_l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1() {
_start:
{
lean_object* x_1;
x_1 = l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__2;
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_delabAttribute___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAttribute___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabAttribute___closed__1;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAttribute___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_1 = lean_unsigned_to_nat(0u);
x_2 = l_Lean_EnvExtension_Inhabited___rarg___closed__1;
x_3 = l_Lean_Delaborator_delabAttribute___closed__2;
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_3);
return x_4;
}
}
lean_object* _init_l_Lean_Delaborator_delabAttribute___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
x_1 = l_Lean_Delaborator_delabAttribute___closed__3;
x_2 = lean_box(0);
x_3 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1;
x_4 = l_Lean_Meta_recursorAttribute___closed__1;
x_5 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3;
x_6 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4;
x_7 = lean_alloc_ctor(0, 6, 0);
lean_ctor_set(x_7, 0, x_1);
lean_ctor_set(x_7, 1, x_2);
lean_ctor_set(x_7, 2, x_3);
lean_ctor_set(x_7, 3, x_4);
lean_ctor_set(x_7, 4, x_5);
lean_ctor_set(x_7, 5, x_6);
return x_7;
}
}
lean_object* _init_l_Lean_Delaborator_delabAttribute___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_delabAttribute___closed__4;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_getExpr(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_4 = lean_ctor_get(x_1, 0);
lean_inc(x_4);
x_5 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_5, 0, x_4);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_5);
lean_ctor_set(x_6, 1, x_3);
return x_6;
}
}
lean_object* l_Lean_Delaborator_getExpr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_4;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("bvar");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__2;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__4() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("fvar");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__4;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__5;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__7() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("mvar");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__7;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__8;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_Term_sort___elambda__1___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__10;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__12() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_mkAppStx___closed__7;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__12;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__14() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("lam");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__14;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__16() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__15;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__17() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("forallE");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__18() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__17;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__19() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__18;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__20() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("letE");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__21() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__20;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__22() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__21;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__23() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("lit");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__24() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__23;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__25() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__24;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__26() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("mdata");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__27() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__26;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__28() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__27;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__29() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_Term_proj___elambda__1___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__30() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__29;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__31() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("localE");
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__32() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Delaborator_getExprKind___closed__31;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_getExprKind___closed__33() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_getExprKind___closed__32;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* l_Lean_Delaborator_getExprKind(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; uint8_t x_6;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_5, 0);
switch (lean_obj_tag(x_7)) {
case 0:
{
uint8_t x_8;
lean_free_object(x_5);
lean_dec(x_7);
x_8 = !lean_is_exclusive(x_4);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10;
x_9 = lean_ctor_get(x_4, 0);
lean_dec(x_9);
x_10 = l_Lean_Delaborator_getExprKind___closed__3;
lean_ctor_set(x_4, 0, x_10);
return x_4;
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_11 = lean_ctor_get(x_4, 1);
lean_inc(x_11);
lean_dec(x_4);
x_12 = l_Lean_Delaborator_getExprKind___closed__3;
x_13 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_13, 0, x_12);
lean_ctor_set(x_13, 1, x_11);
return x_13;
}
}
case 1:
{
uint8_t x_14;
lean_free_object(x_5);
lean_dec(x_7);
x_14 = !lean_is_exclusive(x_4);
if (x_14 == 0)
{
lean_object* x_15; lean_object* x_16;
x_15 = lean_ctor_get(x_4, 0);
lean_dec(x_15);
x_16 = l_Lean_Delaborator_getExprKind___closed__6;
lean_ctor_set(x_4, 0, x_16);
return x_4;
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19;
x_17 = lean_ctor_get(x_4, 1);
lean_inc(x_17);
lean_dec(x_4);
x_18 = l_Lean_Delaborator_getExprKind___closed__6;
x_19 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set(x_19, 1, x_17);
return x_19;
}
}
case 2:
{
uint8_t x_20;
lean_free_object(x_5);
lean_dec(x_7);
x_20 = !lean_is_exclusive(x_4);
if (x_20 == 0)
{
lean_object* x_21; lean_object* x_22;
x_21 = lean_ctor_get(x_4, 0);
lean_dec(x_21);
x_22 = l_Lean_Delaborator_getExprKind___closed__9;
lean_ctor_set(x_4, 0, x_22);
return x_4;
}
else
{
lean_object* x_23; lean_object* x_24; lean_object* x_25;
x_23 = lean_ctor_get(x_4, 1);
lean_inc(x_23);
lean_dec(x_4);
x_24 = l_Lean_Delaborator_getExprKind___closed__9;
x_25 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_25, 0, x_24);
lean_ctor_set(x_25, 1, x_23);
return x_25;
}
}
case 3:
{
uint8_t x_26;
lean_free_object(x_5);
lean_dec(x_7);
x_26 = !lean_is_exclusive(x_4);
if (x_26 == 0)
{
lean_object* x_27; lean_object* x_28;
x_27 = lean_ctor_get(x_4, 0);
lean_dec(x_27);
x_28 = l_Lean_Delaborator_getExprKind___closed__11;
lean_ctor_set(x_4, 0, x_28);
return x_4;
}
else
{
lean_object* x_29; lean_object* x_30; lean_object* x_31;
x_29 = lean_ctor_get(x_4, 1);
lean_inc(x_29);
lean_dec(x_4);
x_30 = l_Lean_Delaborator_getExprKind___closed__11;
x_31 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_31, 0, x_30);
lean_ctor_set(x_31, 1, x_29);
return x_31;
}
}
case 4:
{
uint8_t x_32;
x_32 = !lean_is_exclusive(x_4);
if (x_32 == 0)
{
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36;
x_33 = lean_ctor_get(x_4, 0);
lean_dec(x_33);
x_34 = lean_ctor_get(x_7, 0);
lean_inc(x_34);
lean_dec(x_7);
x_35 = l_Lean_Delaborator_getExprKind___closed__12;
x_36 = l_Lean_Name_append___main(x_35, x_34);
lean_ctor_set(x_5, 0, x_36);
return x_4;
}
else
{
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
x_37 = lean_ctor_get(x_4, 1);
lean_inc(x_37);
lean_dec(x_4);
x_38 = lean_ctor_get(x_7, 0);
lean_inc(x_38);
lean_dec(x_7);
x_39 = l_Lean_Delaborator_getExprKind___closed__12;
x_40 = l_Lean_Name_append___main(x_39, x_38);
lean_ctor_set(x_5, 0, x_40);
x_41 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_41, 0, x_5);
lean_ctor_set(x_41, 1, x_37);
return x_41;
}
}
case 5:
{
uint8_t x_42;
x_42 = !lean_is_exclusive(x_4);
if (x_42 == 0)
{
lean_object* x_43; lean_object* x_44; lean_object* x_45;
x_43 = lean_ctor_get(x_4, 0);
lean_dec(x_43);
x_44 = lean_ctor_get(x_7, 0);
lean_inc(x_44);
lean_dec(x_7);
x_45 = l_Lean_Expr_getAppFn___main(x_44);
lean_dec(x_44);
if (lean_obj_tag(x_45) == 4)
{
lean_object* x_46; lean_object* x_47; lean_object* x_48;
x_46 = lean_ctor_get(x_45, 0);
lean_inc(x_46);
lean_dec(x_45);
x_47 = l_Lean_Delaborator_getExprKind___closed__12;
x_48 = l_Lean_Name_append___main(x_47, x_46);
lean_ctor_set(x_5, 0, x_48);
return x_4;
}
else
{
lean_object* x_49;
lean_dec(x_45);
lean_free_object(x_5);
x_49 = l_Lean_Delaborator_getExprKind___closed__13;
lean_ctor_set(x_4, 0, x_49);
return x_4;
}
}
else
{
lean_object* x_50; lean_object* x_51; lean_object* x_52;
x_50 = lean_ctor_get(x_4, 1);
lean_inc(x_50);
lean_dec(x_4);
x_51 = lean_ctor_get(x_7, 0);
lean_inc(x_51);
lean_dec(x_7);
x_52 = l_Lean_Expr_getAppFn___main(x_51);
lean_dec(x_51);
if (lean_obj_tag(x_52) == 4)
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56;
x_53 = lean_ctor_get(x_52, 0);
lean_inc(x_53);
lean_dec(x_52);
x_54 = l_Lean_Delaborator_getExprKind___closed__12;
x_55 = l_Lean_Name_append___main(x_54, x_53);
lean_ctor_set(x_5, 0, x_55);
x_56 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_56, 0, x_5);
lean_ctor_set(x_56, 1, x_50);
return x_56;
}
else
{
lean_object* x_57; lean_object* x_58;
lean_dec(x_52);
lean_free_object(x_5);
x_57 = l_Lean_Delaborator_getExprKind___closed__13;
x_58 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_58, 0, x_57);
lean_ctor_set(x_58, 1, x_50);
return x_58;
}
}
}
case 6:
{
uint8_t x_59;
lean_free_object(x_5);
lean_dec(x_7);
x_59 = !lean_is_exclusive(x_4);
if (x_59 == 0)
{
lean_object* x_60; lean_object* x_61;
x_60 = lean_ctor_get(x_4, 0);
lean_dec(x_60);
x_61 = l_Lean_Delaborator_getExprKind___closed__16;
lean_ctor_set(x_4, 0, x_61);
return x_4;
}
else
{
lean_object* x_62; lean_object* x_63; lean_object* x_64;
x_62 = lean_ctor_get(x_4, 1);
lean_inc(x_62);
lean_dec(x_4);
x_63 = l_Lean_Delaborator_getExprKind___closed__16;
x_64 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_64, 0, x_63);
lean_ctor_set(x_64, 1, x_62);
return x_64;
}
}
case 7:
{
uint8_t x_65;
lean_free_object(x_5);
lean_dec(x_7);
x_65 = !lean_is_exclusive(x_4);
if (x_65 == 0)
{
lean_object* x_66; lean_object* x_67;
x_66 = lean_ctor_get(x_4, 0);
lean_dec(x_66);
x_67 = l_Lean_Delaborator_getExprKind___closed__19;
lean_ctor_set(x_4, 0, x_67);
return x_4;
}
else
{
lean_object* x_68; lean_object* x_69; lean_object* x_70;
x_68 = lean_ctor_get(x_4, 1);
lean_inc(x_68);
lean_dec(x_4);
x_69 = l_Lean_Delaborator_getExprKind___closed__19;
x_70 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_70, 0, x_69);
lean_ctor_set(x_70, 1, x_68);
return x_70;
}
}
case 8:
{
uint8_t x_71;
lean_free_object(x_5);
lean_dec(x_7);
x_71 = !lean_is_exclusive(x_4);
if (x_71 == 0)
{
lean_object* x_72; lean_object* x_73;
x_72 = lean_ctor_get(x_4, 0);
lean_dec(x_72);
x_73 = l_Lean_Delaborator_getExprKind___closed__22;
lean_ctor_set(x_4, 0, x_73);
return x_4;
}
else
{
lean_object* x_74; lean_object* x_75; lean_object* x_76;
x_74 = lean_ctor_get(x_4, 1);
lean_inc(x_74);
lean_dec(x_4);
x_75 = l_Lean_Delaborator_getExprKind___closed__22;
x_76 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_76, 0, x_75);
lean_ctor_set(x_76, 1, x_74);
return x_76;
}
}
case 9:
{
uint8_t x_77;
lean_free_object(x_5);
lean_dec(x_7);
x_77 = !lean_is_exclusive(x_4);
if (x_77 == 0)
{
lean_object* x_78; lean_object* x_79;
x_78 = lean_ctor_get(x_4, 0);
lean_dec(x_78);
x_79 = l_Lean_Delaborator_getExprKind___closed__25;
lean_ctor_set(x_4, 0, x_79);
return x_4;
}
else
{
lean_object* x_80; lean_object* x_81; lean_object* x_82;
x_80 = lean_ctor_get(x_4, 1);
lean_inc(x_80);
lean_dec(x_4);
x_81 = l_Lean_Delaborator_getExprKind___closed__25;
x_82 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_82, 0, x_81);
lean_ctor_set(x_82, 1, x_80);
return x_82;
}
}
case 10:
{
lean_object* x_83;
x_83 = lean_ctor_get(x_7, 0);
lean_inc(x_83);
lean_dec(x_7);
if (lean_obj_tag(x_83) == 0)
{
uint8_t x_84;
lean_free_object(x_5);
x_84 = !lean_is_exclusive(x_4);
if (x_84 == 0)
{
lean_object* x_85; lean_object* x_86;
x_85 = lean_ctor_get(x_4, 0);
lean_dec(x_85);
x_86 = l_Lean_Delaborator_getExprKind___closed__28;
lean_ctor_set(x_4, 0, x_86);
return x_4;
}
else
{
lean_object* x_87; lean_object* x_88; lean_object* x_89;
x_87 = lean_ctor_get(x_4, 1);
lean_inc(x_87);
lean_dec(x_4);
x_88 = l_Lean_Delaborator_getExprKind___closed__28;
x_89 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_89, 0, x_88);
lean_ctor_set(x_89, 1, x_87);
return x_89;
}
}
else
{
lean_object* x_90; lean_object* x_91;
x_90 = lean_ctor_get(x_83, 0);
lean_inc(x_90);
x_91 = lean_ctor_get(x_83, 1);
lean_inc(x_91);
lean_dec(x_83);
if (lean_obj_tag(x_91) == 0)
{
uint8_t x_92;
x_92 = !lean_is_exclusive(x_4);
if (x_92 == 0)
{
lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96;
x_93 = lean_ctor_get(x_4, 0);
lean_dec(x_93);
x_94 = lean_ctor_get(x_90, 0);
lean_inc(x_94);
lean_dec(x_90);
x_95 = l_Lean_Delaborator_getExprKind___closed__27;
x_96 = l_Lean_Name_append___main(x_95, x_94);
lean_ctor_set(x_5, 0, x_96);
return x_4;
}
else
{
lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101;
x_97 = lean_ctor_get(x_4, 1);
lean_inc(x_97);
lean_dec(x_4);
x_98 = lean_ctor_get(x_90, 0);
lean_inc(x_98);
lean_dec(x_90);
x_99 = l_Lean_Delaborator_getExprKind___closed__27;
x_100 = l_Lean_Name_append___main(x_99, x_98);
lean_ctor_set(x_5, 0, x_100);
x_101 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_101, 0, x_5);
lean_ctor_set(x_101, 1, x_97);
return x_101;
}
}
else
{
uint8_t x_102;
lean_dec(x_91);
lean_dec(x_90);
lean_free_object(x_5);
x_102 = !lean_is_exclusive(x_4);
if (x_102 == 0)
{
lean_object* x_103; lean_object* x_104;
x_103 = lean_ctor_get(x_4, 0);
lean_dec(x_103);
x_104 = l_Lean_Delaborator_getExprKind___closed__28;
lean_ctor_set(x_4, 0, x_104);
return x_4;
}
else
{
lean_object* x_105; lean_object* x_106; lean_object* x_107;
x_105 = lean_ctor_get(x_4, 1);
lean_inc(x_105);
lean_dec(x_4);
x_106 = l_Lean_Delaborator_getExprKind___closed__28;
x_107 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_107, 0, x_106);
lean_ctor_set(x_107, 1, x_105);
return x_107;
}
}
}
}
case 11:
{
uint8_t x_108;
lean_free_object(x_5);
lean_dec(x_7);
x_108 = !lean_is_exclusive(x_4);
if (x_108 == 0)
{
lean_object* x_109; lean_object* x_110;
x_109 = lean_ctor_get(x_4, 0);
lean_dec(x_109);
x_110 = l_Lean_Delaborator_getExprKind___closed__30;
lean_ctor_set(x_4, 0, x_110);
return x_4;
}
else
{
lean_object* x_111; lean_object* x_112; lean_object* x_113;
x_111 = lean_ctor_get(x_4, 1);
lean_inc(x_111);
lean_dec(x_4);
x_112 = l_Lean_Delaborator_getExprKind___closed__30;
x_113 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_113, 0, x_112);
lean_ctor_set(x_113, 1, x_111);
return x_113;
}
}
default:
{
uint8_t x_114;
lean_free_object(x_5);
lean_dec(x_7);
x_114 = !lean_is_exclusive(x_4);
if (x_114 == 0)
{
lean_object* x_115; lean_object* x_116;
x_115 = lean_ctor_get(x_4, 0);
lean_dec(x_115);
x_116 = l_Lean_Delaborator_getExprKind___closed__33;
lean_ctor_set(x_4, 0, x_116);
return x_4;
}
else
{
lean_object* x_117; lean_object* x_118; lean_object* x_119;
x_117 = lean_ctor_get(x_4, 1);
lean_inc(x_117);
lean_dec(x_4);
x_118 = l_Lean_Delaborator_getExprKind___closed__33;
x_119 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_119, 0, x_118);
lean_ctor_set(x_119, 1, x_117);
return x_119;
}
}
}
}
else
{
lean_object* x_120;
x_120 = lean_ctor_get(x_5, 0);
lean_inc(x_120);
lean_dec(x_5);
switch (lean_obj_tag(x_120)) {
case 0:
{
lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124;
lean_dec(x_120);
x_121 = lean_ctor_get(x_4, 1);
lean_inc(x_121);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_122 = x_4;
} else {
lean_dec_ref(x_4);
x_122 = lean_box(0);
}
x_123 = l_Lean_Delaborator_getExprKind___closed__3;
if (lean_is_scalar(x_122)) {
x_124 = lean_alloc_ctor(0, 2, 0);
} else {
x_124 = x_122;
}
lean_ctor_set(x_124, 0, x_123);
lean_ctor_set(x_124, 1, x_121);
return x_124;
}
case 1:
{
lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128;
lean_dec(x_120);
x_125 = lean_ctor_get(x_4, 1);
lean_inc(x_125);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_126 = x_4;
} else {
lean_dec_ref(x_4);
x_126 = lean_box(0);
}
x_127 = l_Lean_Delaborator_getExprKind___closed__6;
if (lean_is_scalar(x_126)) {
x_128 = lean_alloc_ctor(0, 2, 0);
} else {
x_128 = x_126;
}
lean_ctor_set(x_128, 0, x_127);
lean_ctor_set(x_128, 1, x_125);
return x_128;
}
case 2:
{
lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132;
lean_dec(x_120);
x_129 = lean_ctor_get(x_4, 1);
lean_inc(x_129);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_130 = x_4;
} else {
lean_dec_ref(x_4);
x_130 = lean_box(0);
}
x_131 = l_Lean_Delaborator_getExprKind___closed__9;
if (lean_is_scalar(x_130)) {
x_132 = lean_alloc_ctor(0, 2, 0);
} else {
x_132 = x_130;
}
lean_ctor_set(x_132, 0, x_131);
lean_ctor_set(x_132, 1, x_129);
return x_132;
}
case 3:
{
lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136;
lean_dec(x_120);
x_133 = lean_ctor_get(x_4, 1);
lean_inc(x_133);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_134 = x_4;
} else {
lean_dec_ref(x_4);
x_134 = lean_box(0);
}
x_135 = l_Lean_Delaborator_getExprKind___closed__11;
if (lean_is_scalar(x_134)) {
x_136 = lean_alloc_ctor(0, 2, 0);
} else {
x_136 = x_134;
}
lean_ctor_set(x_136, 0, x_135);
lean_ctor_set(x_136, 1, x_133);
return x_136;
}
case 4:
{
lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143;
x_137 = lean_ctor_get(x_4, 1);
lean_inc(x_137);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_138 = x_4;
} else {
lean_dec_ref(x_4);
x_138 = lean_box(0);
}
x_139 = lean_ctor_get(x_120, 0);
lean_inc(x_139);
lean_dec(x_120);
x_140 = l_Lean_Delaborator_getExprKind___closed__12;
x_141 = l_Lean_Name_append___main(x_140, x_139);
x_142 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_142, 0, x_141);
if (lean_is_scalar(x_138)) {
x_143 = lean_alloc_ctor(0, 2, 0);
} else {
x_143 = x_138;
}
lean_ctor_set(x_143, 0, x_142);
lean_ctor_set(x_143, 1, x_137);
return x_143;
}
case 5:
{
lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147;
x_144 = lean_ctor_get(x_4, 1);
lean_inc(x_144);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_145 = x_4;
} else {
lean_dec_ref(x_4);
x_145 = lean_box(0);
}
x_146 = lean_ctor_get(x_120, 0);
lean_inc(x_146);
lean_dec(x_120);
x_147 = l_Lean_Expr_getAppFn___main(x_146);
lean_dec(x_146);
if (lean_obj_tag(x_147) == 4)
{
lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152;
x_148 = lean_ctor_get(x_147, 0);
lean_inc(x_148);
lean_dec(x_147);
x_149 = l_Lean_Delaborator_getExprKind___closed__12;
x_150 = l_Lean_Name_append___main(x_149, x_148);
x_151 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_151, 0, x_150);
if (lean_is_scalar(x_145)) {
x_152 = lean_alloc_ctor(0, 2, 0);
} else {
x_152 = x_145;
}
lean_ctor_set(x_152, 0, x_151);
lean_ctor_set(x_152, 1, x_144);
return x_152;
}
else
{
lean_object* x_153; lean_object* x_154;
lean_dec(x_147);
x_153 = l_Lean_Delaborator_getExprKind___closed__13;
if (lean_is_scalar(x_145)) {
x_154 = lean_alloc_ctor(0, 2, 0);
} else {
x_154 = x_145;
}
lean_ctor_set(x_154, 0, x_153);
lean_ctor_set(x_154, 1, x_144);
return x_154;
}
}
case 6:
{
lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158;
lean_dec(x_120);
x_155 = lean_ctor_get(x_4, 1);
lean_inc(x_155);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_156 = x_4;
} else {
lean_dec_ref(x_4);
x_156 = lean_box(0);
}
x_157 = l_Lean_Delaborator_getExprKind___closed__16;
if (lean_is_scalar(x_156)) {
x_158 = lean_alloc_ctor(0, 2, 0);
} else {
x_158 = x_156;
}
lean_ctor_set(x_158, 0, x_157);
lean_ctor_set(x_158, 1, x_155);
return x_158;
}
case 7:
{
lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162;
lean_dec(x_120);
x_159 = lean_ctor_get(x_4, 1);
lean_inc(x_159);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_160 = x_4;
} else {
lean_dec_ref(x_4);
x_160 = lean_box(0);
}
x_161 = l_Lean_Delaborator_getExprKind___closed__19;
if (lean_is_scalar(x_160)) {
x_162 = lean_alloc_ctor(0, 2, 0);
} else {
x_162 = x_160;
}
lean_ctor_set(x_162, 0, x_161);
lean_ctor_set(x_162, 1, x_159);
return x_162;
}
case 8:
{
lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166;
lean_dec(x_120);
x_163 = lean_ctor_get(x_4, 1);
lean_inc(x_163);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_164 = x_4;
} else {
lean_dec_ref(x_4);
x_164 = lean_box(0);
}
x_165 = l_Lean_Delaborator_getExprKind___closed__22;
if (lean_is_scalar(x_164)) {
x_166 = lean_alloc_ctor(0, 2, 0);
} else {
x_166 = x_164;
}
lean_ctor_set(x_166, 0, x_165);
lean_ctor_set(x_166, 1, x_163);
return x_166;
}
case 9:
{
lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170;
lean_dec(x_120);
x_167 = lean_ctor_get(x_4, 1);
lean_inc(x_167);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_168 = x_4;
} else {
lean_dec_ref(x_4);
x_168 = lean_box(0);
}
x_169 = l_Lean_Delaborator_getExprKind___closed__25;
if (lean_is_scalar(x_168)) {
x_170 = lean_alloc_ctor(0, 2, 0);
} else {
x_170 = x_168;
}
lean_ctor_set(x_170, 0, x_169);
lean_ctor_set(x_170, 1, x_167);
return x_170;
}
case 10:
{
lean_object* x_171;
x_171 = lean_ctor_get(x_120, 0);
lean_inc(x_171);
lean_dec(x_120);
if (lean_obj_tag(x_171) == 0)
{
lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175;
x_172 = lean_ctor_get(x_4, 1);
lean_inc(x_172);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_173 = x_4;
} else {
lean_dec_ref(x_4);
x_173 = lean_box(0);
}
x_174 = l_Lean_Delaborator_getExprKind___closed__28;
if (lean_is_scalar(x_173)) {
x_175 = lean_alloc_ctor(0, 2, 0);
} else {
x_175 = x_173;
}
lean_ctor_set(x_175, 0, x_174);
lean_ctor_set(x_175, 1, x_172);
return x_175;
}
else
{
lean_object* x_176; lean_object* x_177;
x_176 = lean_ctor_get(x_171, 0);
lean_inc(x_176);
x_177 = lean_ctor_get(x_171, 1);
lean_inc(x_177);
lean_dec(x_171);
if (lean_obj_tag(x_177) == 0)
{
lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184;
x_178 = lean_ctor_get(x_4, 1);
lean_inc(x_178);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_179 = x_4;
} else {
lean_dec_ref(x_4);
x_179 = lean_box(0);
}
x_180 = lean_ctor_get(x_176, 0);
lean_inc(x_180);
lean_dec(x_176);
x_181 = l_Lean_Delaborator_getExprKind___closed__27;
x_182 = l_Lean_Name_append___main(x_181, x_180);
x_183 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_183, 0, x_182);
if (lean_is_scalar(x_179)) {
x_184 = lean_alloc_ctor(0, 2, 0);
} else {
x_184 = x_179;
}
lean_ctor_set(x_184, 0, x_183);
lean_ctor_set(x_184, 1, x_178);
return x_184;
}
else
{
lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188;
lean_dec(x_177);
lean_dec(x_176);
x_185 = lean_ctor_get(x_4, 1);
lean_inc(x_185);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_186 = x_4;
} else {
lean_dec_ref(x_4);
x_186 = lean_box(0);
}
x_187 = l_Lean_Delaborator_getExprKind___closed__28;
if (lean_is_scalar(x_186)) {
x_188 = lean_alloc_ctor(0, 2, 0);
} else {
x_188 = x_186;
}
lean_ctor_set(x_188, 0, x_187);
lean_ctor_set(x_188, 1, x_185);
return x_188;
}
}
}
case 11:
{
lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192;
lean_dec(x_120);
x_189 = lean_ctor_get(x_4, 1);
lean_inc(x_189);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_190 = x_4;
} else {
lean_dec_ref(x_4);
x_190 = lean_box(0);
}
x_191 = l_Lean_Delaborator_getExprKind___closed__30;
if (lean_is_scalar(x_190)) {
x_192 = lean_alloc_ctor(0, 2, 0);
} else {
x_192 = x_190;
}
lean_ctor_set(x_192, 0, x_191);
lean_ctor_set(x_192, 1, x_189);
return x_192;
}
default:
{
lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196;
lean_dec(x_120);
x_193 = lean_ctor_get(x_4, 1);
lean_inc(x_193);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_194 = x_4;
} else {
lean_dec_ref(x_4);
x_194 = lean_box(0);
}
x_195 = l_Lean_Delaborator_getExprKind___closed__33;
if (lean_is_scalar(x_194)) {
x_196 = lean_alloc_ctor(0, 2, 0);
} else {
x_196 = x_194;
}
lean_ctor_set(x_196, 0, x_195);
lean_ctor_set(x_196, 1, x_193);
return x_196;
}
}
}
}
}
lean_object* l_Lean_Delaborator_getExprKind___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_Lean_Delaborator_getExprKind(x_1, x_2, x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_4;
}
}
lean_object* l_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_3;
x_3 = lean_box(0);
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8;
x_4 = lean_ctor_get(x_1, 0);
x_5 = lean_ctor_get(x_1, 1);
x_6 = lean_ctor_get(x_1, 2);
x_7 = lean_ctor_get(x_1, 3);
x_8 = lean_nat_dec_lt(x_2, x_5);
if (x_8 == 0)
{
uint8_t x_9;
x_9 = lean_nat_dec_lt(x_5, x_2);
if (x_9 == 0)
{
lean_object* x_10;
lean_inc(x_6);
x_10 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_10, 0, x_6);
return x_10;
}
else
{
x_1 = x_7;
goto _start;
}
}
else
{
x_1 = x_4;
goto _start;
}
}
}
}
lean_object* _init_l_Lean_Delaborator_getPPOption___closed__1() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3;
x_1 = 1;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_getPPOption(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; uint8_t x_7;
x_5 = lean_ctor_get(x_2, 2);
lean_inc(x_5);
lean_inc(x_1);
lean_inc(x_5);
x_6 = lean_apply_1(x_1, x_5);
x_7 = lean_unbox(x_6);
lean_dec(x_6);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11;
x_8 = lean_ctor_get(x_2, 3);
lean_inc(x_8);
x_9 = lean_ctor_get(x_2, 1);
lean_inc(x_9);
lean_dec(x_2);
x_10 = l_Lean_getPPAll(x_5);
lean_dec(x_5);
x_11 = l_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1(x_8, x_9);
lean_dec(x_9);
lean_dec(x_8);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14;
lean_dec(x_1);
x_12 = lean_box(x_10);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
x_14 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_14, 0, x_13);
lean_ctor_set(x_14, 1, x_4);
return x_14;
}
else
{
uint8_t x_15;
x_15 = !lean_is_exclusive(x_11);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; uint8_t x_18;
x_16 = lean_ctor_get(x_11, 0);
lean_inc(x_16);
x_17 = lean_apply_1(x_1, x_16);
x_18 = lean_unbox(x_17);
lean_dec(x_17);
if (x_18 == 0)
{
uint8_t x_19; lean_object* x_20; lean_object* x_21;
x_19 = l_Lean_getPPAll(x_16);
lean_dec(x_16);
x_20 = lean_box(x_19);
lean_ctor_set(x_11, 0, x_20);
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_11);
lean_ctor_set(x_21, 1, x_4);
return x_21;
}
else
{
lean_object* x_22; lean_object* x_23;
lean_free_object(x_11);
lean_dec(x_16);
x_22 = l_Lean_Delaborator_getPPOption___closed__1;
x_23 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_23, 0, x_22);
lean_ctor_set(x_23, 1, x_4);
return x_23;
}
}
else
{
lean_object* x_24; lean_object* x_25; uint8_t x_26;
x_24 = lean_ctor_get(x_11, 0);
lean_inc(x_24);
lean_dec(x_11);
lean_inc(x_24);
x_25 = lean_apply_1(x_1, x_24);
x_26 = lean_unbox(x_25);
lean_dec(x_25);
if (x_26 == 0)
{
uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
x_27 = l_Lean_getPPAll(x_24);
lean_dec(x_24);
x_28 = lean_box(x_27);
x_29 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_29, 0, x_28);
x_30 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_30, 0, x_29);
lean_ctor_set(x_30, 1, x_4);
return x_30;
}
else
{
lean_object* x_31; lean_object* x_32;
lean_dec(x_24);
x_31 = l_Lean_Delaborator_getPPOption___closed__1;
x_32 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_32, 0, x_31);
lean_ctor_set(x_32, 1, x_4);
return x_32;
}
}
}
}
else
{
lean_object* x_33; lean_object* x_34; lean_object* x_35;
lean_dec(x_5);
x_33 = lean_ctor_get(x_2, 3);
lean_inc(x_33);
x_34 = lean_ctor_get(x_2, 1);
lean_inc(x_34);
lean_dec(x_2);
x_35 = l_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1(x_33, x_34);
lean_dec(x_34);
lean_dec(x_33);
if (lean_obj_tag(x_35) == 0)
{
lean_object* x_36; lean_object* x_37;
lean_dec(x_1);
x_36 = l_Lean_Delaborator_getPPOption___closed__1;
x_37 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_37, 0, x_36);
lean_ctor_set(x_37, 1, x_4);
return x_37;
}
else
{
uint8_t x_38;
x_38 = !lean_is_exclusive(x_35);
if (x_38 == 0)
{
lean_object* x_39; lean_object* x_40; uint8_t x_41;
x_39 = lean_ctor_get(x_35, 0);
lean_inc(x_39);
x_40 = lean_apply_1(x_1, x_39);
x_41 = lean_unbox(x_40);
lean_dec(x_40);
if (x_41 == 0)
{
uint8_t x_42; lean_object* x_43; lean_object* x_44;
x_42 = l_Lean_getPPAll(x_39);
lean_dec(x_39);
x_43 = lean_box(x_42);
lean_ctor_set(x_35, 0, x_43);
x_44 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_44, 0, x_35);
lean_ctor_set(x_44, 1, x_4);
return x_44;
}
else
{
lean_object* x_45; lean_object* x_46;
lean_free_object(x_35);
lean_dec(x_39);
x_45 = l_Lean_Delaborator_getPPOption___closed__1;
x_46 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_46, 0, x_45);
lean_ctor_set(x_46, 1, x_4);
return x_46;
}
}
else
{
lean_object* x_47; lean_object* x_48; uint8_t x_49;
x_47 = lean_ctor_get(x_35, 0);
lean_inc(x_47);
lean_dec(x_35);
lean_inc(x_47);
x_48 = lean_apply_1(x_1, x_47);
x_49 = lean_unbox(x_48);
lean_dec(x_48);
if (x_49 == 0)
{
uint8_t x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53;
x_50 = l_Lean_getPPAll(x_47);
lean_dec(x_47);
x_51 = lean_box(x_50);
x_52 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_52, 0, x_51);
x_53 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_53, 0, x_52);
lean_ctor_set(x_53, 1, x_4);
return x_53;
}
else
{
lean_object* x_54; lean_object* x_55;
lean_dec(x_47);
x_54 = l_Lean_Delaborator_getPPOption___closed__1;
x_55 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_55, 0, x_54);
lean_ctor_set(x_55, 1, x_4);
return x_55;
}
}
}
}
}
}
lean_object* l_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_Delaborator_getPPOption___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Delaborator_getPPOption(x_1, x_2, x_3, x_4);
lean_dec(x_3);
return x_5;
}
}
lean_object* l_Lean_Delaborator_whenPPOption(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9;
lean_inc(x_3);
x_6 = l_Lean_Delaborator_getPPOption(x_1, x_3, x_4, x_5);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec(x_7);
x_9 = lean_unbox(x_8);
lean_dec(x_8);
if (x_9 == 0)
{
uint8_t x_10;
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_10 = !lean_is_exclusive(x_6);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12;
x_11 = lean_ctor_get(x_6, 0);
lean_dec(x_11);
x_12 = lean_box(0);
lean_ctor_set(x_6, 0, x_12);
return x_6;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15;
x_13 = lean_ctor_get(x_6, 1);
lean_inc(x_13);
lean_dec(x_6);
x_14 = lean_box(0);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_14);
lean_ctor_set(x_15, 1, x_13);
return x_15;
}
}
else
{
lean_object* x_16; lean_object* x_17;
x_16 = lean_ctor_get(x_6, 1);
lean_inc(x_16);
lean_dec(x_6);
x_17 = lean_apply_3(x_2, x_3, x_4, x_16);
return x_17;
}
}
}
lean_object* l_Lean_Delaborator_whenNotPPOption(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9;
lean_inc(x_3);
x_6 = l_Lean_Delaborator_getPPOption(x_1, x_3, x_4, x_5);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec(x_7);
x_9 = lean_unbox(x_8);
lean_dec(x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11;
x_10 = lean_ctor_get(x_6, 1);
lean_inc(x_10);
lean_dec(x_6);
x_11 = lean_apply_3(x_2, x_3, x_4, x_10);
return x_11;
}
else
{
uint8_t x_12;
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_12 = !lean_is_exclusive(x_6);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14;
x_13 = lean_ctor_get(x_6, 0);
lean_dec(x_13);
x_14 = lean_box(0);
lean_ctor_set(x_6, 0, x_14);
return x_6;
}
else
{
lean_object* x_15; lean_object* x_16; lean_object* x_17;
x_15 = lean_ctor_get(x_6, 1);
lean_inc(x_15);
lean_dec(x_6);
x_16 = lean_box(0);
x_17 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_17, 0, x_16);
lean_ctor_set(x_17, 1, x_15);
return x_17;
}
}
}
}
lean_object* l_Lean_Delaborator_descend___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint8_t x_7;
x_7 = !lean_is_exclusive(x_4);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_8 = lean_ctor_get(x_4, 1);
x_9 = lean_ctor_get(x_4, 0);
lean_dec(x_9);
x_10 = lean_unsigned_to_nat(3u);
x_11 = lean_nat_mul(x_8, x_10);
lean_dec(x_8);
x_12 = lean_nat_add(x_11, x_2);
lean_dec(x_11);
lean_ctor_set(x_4, 1, x_12);
lean_ctor_set(x_4, 0, x_1);
x_13 = lean_apply_3(x_3, x_4, x_5, x_6);
return x_13;
}
else
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21;
x_14 = lean_ctor_get(x_4, 1);
x_15 = lean_ctor_get(x_4, 2);
x_16 = lean_ctor_get(x_4, 3);
lean_inc(x_16);
lean_inc(x_15);
lean_inc(x_14);
lean_dec(x_4);
x_17 = lean_unsigned_to_nat(3u);
x_18 = lean_nat_mul(x_14, x_17);
lean_dec(x_14);
x_19 = lean_nat_add(x_18, x_2);
lean_dec(x_18);
x_20 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_20, 0, x_1);
lean_ctor_set(x_20, 1, x_19);
lean_ctor_set(x_20, 2, x_15);
lean_ctor_set(x_20, 3, x_16);
x_21 = lean_apply_3(x_3, x_20, x_5, x_6);
return x_21;
}
}
}
lean_object* l_Lean_Delaborator_descend(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_descend___rarg___boxed), 6, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_descend___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7;
x_7 = l_Lean_Delaborator_descend___rarg(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_2);
return x_7;
}
}
lean_object* l_Lean_Delaborator_withAppFn___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7;
x_5 = l_Lean_Delaborator_getExpr(x_2, x_3, x_4);
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec(x_6);
if (lean_obj_tag(x_7) == 5)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
x_8 = lean_ctor_get(x_5, 1);
lean_inc(x_8);
lean_dec(x_5);
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
lean_dec(x_7);
x_10 = lean_unsigned_to_nat(0u);
x_11 = l_Lean_Delaborator_descend___rarg(x_9, x_10, x_1, x_2, x_3, x_8);
return x_11;
}
else
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
lean_dec(x_7);
lean_dec(x_1);
x_12 = lean_ctor_get(x_5, 1);
lean_inc(x_12);
lean_dec(x_5);
x_13 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_14 = l_unreachable_x21___rarg(x_13);
x_15 = lean_apply_3(x_14, x_2, x_3, x_12);
return x_15;
}
}
}
lean_object* l_Lean_Delaborator_withAppFn(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_withAppFn___rarg), 4, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_withAppArg___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7;
x_5 = l_Lean_Delaborator_getExpr(x_2, x_3, x_4);
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec(x_6);
if (lean_obj_tag(x_7) == 5)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
x_8 = lean_ctor_get(x_5, 1);
lean_inc(x_8);
lean_dec(x_5);
x_9 = lean_ctor_get(x_7, 1);
lean_inc(x_9);
lean_dec(x_7);
x_10 = lean_unsigned_to_nat(1u);
x_11 = l_Lean_Delaborator_descend___rarg(x_9, x_10, x_1, x_2, x_3, x_8);
return x_11;
}
else
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
lean_dec(x_7);
lean_dec(x_1);
x_12 = lean_ctor_get(x_5, 1);
lean_inc(x_12);
lean_dec(x_5);
x_13 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_14 = l_unreachable_x21___rarg(x_13);
x_15 = lean_apply_3(x_14, x_2, x_3, x_12);
return x_15;
}
}
}
lean_object* l_Lean_Delaborator_withAppArg(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_withAppArg___rarg), 4, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_withAppFnArgs___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8;
x_6 = l_Lean_Delaborator_getExpr(x_3, x_4, x_5);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec(x_7);
if (lean_obj_tag(x_8) == 5)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11;
lean_dec(x_8);
x_9 = lean_ctor_get(x_6, 1);
lean_inc(x_9);
lean_dec(x_6);
lean_inc(x_2);
x_10 = lean_alloc_closure((void*)(l_Lean_Delaborator_withAppFnArgs___main___rarg), 5, 2);
lean_closure_set(x_10, 0, x_1);
lean_closure_set(x_10, 1, x_2);
lean_inc(x_4);
lean_inc(x_3);
x_11 = l_Lean_Delaborator_withAppFn___rarg(x_10, x_3, x_4, x_9);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_12;
x_12 = lean_ctor_get(x_11, 0);
lean_inc(x_12);
if (lean_obj_tag(x_12) == 0)
{
uint8_t x_13;
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_13 = !lean_is_exclusive(x_11);
if (x_13 == 0)
{
lean_object* x_14; lean_object* x_15;
x_14 = lean_ctor_get(x_11, 0);
lean_dec(x_14);
x_15 = lean_box(0);
lean_ctor_set(x_11, 0, x_15);
return x_11;
}
else
{
lean_object* x_16; lean_object* x_17; lean_object* x_18;
x_16 = lean_ctor_get(x_11, 1);
lean_inc(x_16);
lean_dec(x_11);
x_17 = lean_box(0);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_17);
lean_ctor_set(x_18, 1, x_16);
return x_18;
}
}
else
{
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22;
x_19 = lean_ctor_get(x_11, 1);
lean_inc(x_19);
lean_dec(x_11);
x_20 = lean_ctor_get(x_12, 0);
lean_inc(x_20);
lean_dec(x_12);
x_21 = lean_apply_1(x_2, x_20);
x_22 = l_Lean_Delaborator_withAppArg___rarg(x_21, x_3, x_4, x_19);
return x_22;
}
}
else
{
uint8_t x_23;
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_23 = !lean_is_exclusive(x_11);
if (x_23 == 0)
{
return x_11;
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26;
x_24 = lean_ctor_get(x_11, 0);
x_25 = lean_ctor_get(x_11, 1);
lean_inc(x_25);
lean_inc(x_24);
lean_dec(x_11);
x_26 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_26, 0, x_24);
lean_ctor_set(x_26, 1, x_25);
return x_26;
}
}
}
else
{
lean_object* x_27; lean_object* x_28;
lean_dec(x_8);
lean_dec(x_2);
x_27 = lean_ctor_get(x_6, 1);
lean_inc(x_27);
lean_dec(x_6);
x_28 = lean_apply_3(x_1, x_3, x_4, x_27);
return x_28;
}
}
}
lean_object* l_Lean_Delaborator_withAppFnArgs___main(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_withAppFnArgs___main___rarg), 5, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_withAppFnArgs___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6;
x_6 = l_Lean_Delaborator_withAppFnArgs___main___rarg(x_1, x_2, x_3, x_4, x_5);
return x_6;
}
}
lean_object* l_Lean_Delaborator_withAppFnArgs(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_withAppFnArgs___rarg), 5, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_withBindingDomain___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
x_5 = l_Lean_Delaborator_getExpr(x_2, x_3, x_4);
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_5, 1);
lean_inc(x_7);
lean_dec(x_5);
x_8 = lean_ctor_get(x_6, 0);
lean_inc(x_8);
lean_dec(x_6);
x_9 = l_Lean_Expr_bindingDomain_x21(x_8);
lean_dec(x_8);
x_10 = lean_unsigned_to_nat(0u);
x_11 = l_Lean_Delaborator_descend___rarg(x_9, x_10, x_1, x_2, x_3, x_7);
return x_11;
}
}
lean_object* l_Lean_Delaborator_withBindingDomain(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_withBindingDomain___rarg), 4, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_withBindingBody___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
x_7 = l_Lean_Expr_bindingBody_x21(x_1);
x_8 = lean_expr_instantiate1(x_7, x_4);
lean_dec(x_7);
x_9 = lean_unsigned_to_nat(1u);
x_10 = l_Lean_Delaborator_descend___rarg(x_8, x_9, x_2, x_3, x_5, x_6);
return x_10;
}
}
lean_object* l_Lean_Delaborator_withBindingBody___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13;
x_6 = l_Lean_Delaborator_getExpr(x_3, x_4, x_5);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_6, 1);
lean_inc(x_8);
lean_dec(x_6);
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
lean_dec(x_7);
x_10 = l_Lean_Expr_bindingDomain_x21(x_9);
x_11 = l_Lean_Expr_binderInfo(x_9);
x_12 = lean_alloc_closure((void*)(l_Lean_Delaborator_withBindingBody___rarg___lambda__1___boxed), 6, 3);
lean_closure_set(x_12, 0, x_9);
lean_closure_set(x_12, 1, x_2);
lean_closure_set(x_12, 2, x_3);
x_13 = l_Lean_Meta_withLocalDecl___rarg(x_1, x_10, x_11, x_12, x_4, x_8);
return x_13;
}
}
lean_object* l_Lean_Delaborator_withBindingBody(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_withBindingBody___rarg), 5, 0);
return x_2;
}
}
lean_object* l_Lean_Delaborator_withBindingBody___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7;
x_7 = l_Lean_Delaborator_withBindingBody___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_4);
lean_dec(x_1);
return x_7;
}
}
lean_object* _init_l_Lean_Delaborator_infoForPos___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_String_Iterator_HasRepr___closed__2;
x_2 = lean_string_utf8_byte_size(x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_infoForPos___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_1 = l_String_Iterator_HasRepr___closed__2;
x_2 = lean_unsigned_to_nat(0u);
x_3 = l_Lean_Delaborator_infoForPos___closed__1;
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_3);
return x_4;
}
}
lean_object* l_Lean_Delaborator_infoForPos(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3;
x_2 = l_Lean_Delaborator_infoForPos___closed__2;
x_3 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
lean_ctor_set(x_3, 2, x_2);
return x_3;
}
}
lean_object* l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; uint8_t x_4;
x_3 = lean_array_get_size(x_1);
x_4 = lean_nat_dec_lt(x_2, x_3);
lean_dec(x_3);
if (x_4 == 0)
{
lean_object* x_5;
lean_dec(x_2);
x_5 = lean_box(0);
return x_5;
}
else
{
lean_object* x_6; uint8_t x_7;
x_6 = lean_array_fget(x_1, x_2);
x_7 = l_Lean_Syntax_isAtom(x_6);
lean_dec(x_6);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9;
x_8 = lean_unsigned_to_nat(1u);
x_9 = lean_nat_add(x_2, x_8);
lean_dec(x_2);
x_2 = x_9;
goto _start;
}
else
{
lean_object* x_11;
x_11 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_11, 0, x_2);
return x_11;
}
}
}
}
lean_object* l_Lean_Delaborator_annotatePos___main(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
switch (lean_obj_tag(x_2)) {
case 1:
{
lean_object* x_31;
x_31 = lean_ctor_get(x_2, 0);
lean_inc(x_31);
if (lean_obj_tag(x_31) == 1)
{
lean_object* x_32;
x_32 = lean_ctor_get(x_31, 0);
lean_inc(x_32);
if (lean_obj_tag(x_32) == 1)
{
lean_object* x_33;
x_33 = lean_ctor_get(x_32, 0);
lean_inc(x_33);
if (lean_obj_tag(x_33) == 1)
{
lean_object* x_34;
x_34 = lean_ctor_get(x_33, 0);
lean_inc(x_34);
if (lean_obj_tag(x_34) == 1)
{
lean_object* x_35;
x_35 = lean_ctor_get(x_34, 0);
lean_inc(x_35);
if (lean_obj_tag(x_35) == 0)
{
lean_object* x_36; uint8_t x_37;
x_36 = lean_ctor_get(x_2, 1);
lean_inc(x_36);
x_37 = !lean_is_exclusive(x_31);
if (x_37 == 0)
{
lean_object* x_38; lean_object* x_39; uint8_t x_40;
x_38 = lean_ctor_get(x_31, 1);
x_39 = lean_ctor_get(x_31, 0);
lean_dec(x_39);
x_40 = !lean_is_exclusive(x_32);
if (x_40 == 0)
{
lean_object* x_41; lean_object* x_42; uint8_t x_43;
x_41 = lean_ctor_get(x_32, 1);
x_42 = lean_ctor_get(x_32, 0);
lean_dec(x_42);
x_43 = !lean_is_exclusive(x_33);
if (x_43 == 0)
{
lean_object* x_44; lean_object* x_45; uint8_t x_46;
x_44 = lean_ctor_get(x_33, 1);
x_45 = lean_ctor_get(x_33, 0);
lean_dec(x_45);
x_46 = !lean_is_exclusive(x_34);
if (x_46 == 0)
{
lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50;
x_47 = lean_ctor_get(x_34, 1);
x_48 = lean_ctor_get(x_34, 0);
lean_dec(x_48);
x_49 = l_Lean_mkAppStx___closed__1;
x_50 = lean_string_dec_eq(x_47, x_49);
lean_dec(x_47);
if (x_50 == 0)
{
lean_object* x_51;
lean_free_object(x_34);
lean_free_object(x_33);
lean_dec(x_44);
lean_free_object(x_32);
lean_dec(x_41);
lean_free_object(x_31);
lean_dec(x_38);
lean_dec(x_36);
x_51 = lean_box(0);
x_3 = x_51;
goto block_30;
}
else
{
uint8_t x_52;
x_52 = !lean_is_exclusive(x_2);
if (x_52 == 0)
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56;
x_53 = lean_ctor_get(x_2, 1);
lean_dec(x_53);
x_54 = lean_ctor_get(x_2, 0);
lean_dec(x_54);
x_55 = l_Lean_mkAppStx___closed__3;
x_56 = lean_string_dec_eq(x_44, x_55);
if (x_56 == 0)
{
lean_object* x_57; lean_object* x_58; lean_object* x_59;
lean_ctor_set(x_34, 1, x_49);
lean_inc(x_36);
lean_inc(x_31);
x_57 = l_Lean_Syntax_getArgs(x_2);
lean_dec(x_2);
x_58 = lean_unsigned_to_nat(0u);
x_59 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_57, x_58);
lean_dec(x_57);
if (lean_obj_tag(x_59) == 0)
{
lean_object* x_60;
lean_dec(x_1);
x_60 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_60, 0, x_31);
lean_ctor_set(x_60, 1, x_36);
return x_60;
}
else
{
lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64;
x_61 = lean_ctor_get(x_59, 0);
lean_inc(x_61);
lean_dec(x_59);
x_62 = l_Lean_Delaborator_infoForPos(x_1);
x_63 = lean_array_get_size(x_36);
x_64 = lean_nat_dec_lt(x_61, x_63);
lean_dec(x_63);
if (x_64 == 0)
{
lean_object* x_65;
lean_dec(x_62);
lean_dec(x_61);
x_65 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_65, 0, x_31);
lean_ctor_set(x_65, 1, x_36);
return x_65;
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71;
x_66 = lean_array_fget(x_36, x_61);
x_67 = lean_box(0);
x_68 = lean_array_fset(x_36, x_61, x_67);
x_69 = l_Lean_Syntax_setInfo(x_62, x_66);
x_70 = lean_array_fset(x_68, x_61, x_69);
lean_dec(x_61);
x_71 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_71, 0, x_31);
lean_ctor_set(x_71, 1, x_70);
return x_71;
}
}
}
else
{
lean_object* x_72; uint8_t x_73;
lean_dec(x_44);
x_72 = l_Lean_mkAppStx___closed__5;
x_73 = lean_string_dec_eq(x_41, x_72);
if (x_73 == 0)
{
lean_object* x_74; lean_object* x_75; lean_object* x_76;
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_55);
lean_inc(x_36);
lean_inc(x_31);
x_74 = l_Lean_Syntax_getArgs(x_2);
lean_dec(x_2);
x_75 = lean_unsigned_to_nat(0u);
x_76 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_74, x_75);
lean_dec(x_74);
if (lean_obj_tag(x_76) == 0)
{
lean_object* x_77;
lean_dec(x_1);
x_77 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_77, 0, x_31);
lean_ctor_set(x_77, 1, x_36);
return x_77;
}
else
{
lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81;
x_78 = lean_ctor_get(x_76, 0);
lean_inc(x_78);
lean_dec(x_76);
x_79 = l_Lean_Delaborator_infoForPos(x_1);
x_80 = lean_array_get_size(x_36);
x_81 = lean_nat_dec_lt(x_78, x_80);
lean_dec(x_80);
if (x_81 == 0)
{
lean_object* x_82;
lean_dec(x_79);
lean_dec(x_78);
x_82 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_82, 0, x_31);
lean_ctor_set(x_82, 1, x_36);
return x_82;
}
else
{
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88;
x_83 = lean_array_fget(x_36, x_78);
x_84 = lean_box(0);
x_85 = lean_array_fset(x_36, x_78, x_84);
x_86 = l_Lean_Syntax_setInfo(x_79, x_83);
x_87 = lean_array_fset(x_85, x_78, x_86);
lean_dec(x_78);
x_88 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_88, 0, x_31);
lean_ctor_set(x_88, 1, x_87);
return x_88;
}
}
}
else
{
lean_object* x_89; uint8_t x_90;
lean_dec(x_41);
x_89 = l_Lean_mkTermIdFromIdent___closed__1;
x_90 = lean_string_dec_eq(x_38, x_89);
if (x_90 == 0)
{
lean_object* x_91; uint8_t x_92;
x_91 = l_Lean_mkAppStx___closed__7;
x_92 = lean_string_dec_eq(x_38, x_91);
if (x_92 == 0)
{
lean_object* x_93; lean_object* x_94; lean_object* x_95;
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_55);
lean_ctor_set(x_32, 1, x_72);
lean_inc(x_36);
lean_inc(x_31);
x_93 = l_Lean_Syntax_getArgs(x_2);
lean_dec(x_2);
x_94 = lean_unsigned_to_nat(0u);
x_95 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_93, x_94);
lean_dec(x_93);
if (lean_obj_tag(x_95) == 0)
{
lean_object* x_96;
lean_dec(x_1);
x_96 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_96, 0, x_31);
lean_ctor_set(x_96, 1, x_36);
return x_96;
}
else
{
lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100;
x_97 = lean_ctor_get(x_95, 0);
lean_inc(x_97);
lean_dec(x_95);
x_98 = l_Lean_Delaborator_infoForPos(x_1);
x_99 = lean_array_get_size(x_36);
x_100 = lean_nat_dec_lt(x_97, x_99);
lean_dec(x_99);
if (x_100 == 0)
{
lean_object* x_101;
lean_dec(x_98);
lean_dec(x_97);
x_101 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_101, 0, x_31);
lean_ctor_set(x_101, 1, x_36);
return x_101;
}
else
{
lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107;
x_102 = lean_array_fget(x_36, x_97);
x_103 = lean_box(0);
x_104 = lean_array_fset(x_36, x_97, x_103);
x_105 = l_Lean_Syntax_setInfo(x_98, x_102);
x_106 = lean_array_fset(x_104, x_97, x_105);
lean_dec(x_97);
x_107 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_107, 0, x_31);
lean_ctor_set(x_107, 1, x_106);
return x_107;
}
}
}
else
{
lean_object* x_108; lean_object* x_109; uint8_t x_110;
lean_dec(x_38);
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_55);
lean_ctor_set(x_32, 1, x_72);
lean_ctor_set(x_31, 1, x_91);
x_108 = lean_array_get_size(x_36);
x_109 = lean_unsigned_to_nat(0u);
x_110 = lean_nat_dec_lt(x_109, x_108);
lean_dec(x_108);
if (x_110 == 0)
{
lean_dec(x_1);
return x_2;
}
else
{
lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115;
x_111 = lean_array_fget(x_36, x_109);
x_112 = lean_box(0);
x_113 = lean_array_fset(x_36, x_109, x_112);
x_114 = l_Lean_Delaborator_annotatePos___main(x_1, x_111);
x_115 = lean_array_fset(x_113, x_109, x_114);
lean_ctor_set(x_2, 1, x_115);
return x_2;
}
}
}
else
{
lean_object* x_116; lean_object* x_117; uint8_t x_118;
lean_dec(x_38);
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_55);
lean_ctor_set(x_32, 1, x_72);
lean_ctor_set(x_31, 1, x_89);
x_116 = lean_array_get_size(x_36);
x_117 = lean_unsigned_to_nat(0u);
x_118 = lean_nat_dec_lt(x_117, x_116);
lean_dec(x_116);
if (x_118 == 0)
{
lean_dec(x_1);
return x_2;
}
else
{
lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123;
x_119 = lean_array_fget(x_36, x_117);
x_120 = lean_box(0);
x_121 = lean_array_fset(x_36, x_117, x_120);
x_122 = l_Lean_Delaborator_annotatePos___main(x_1, x_119);
x_123 = lean_array_fset(x_121, x_117, x_122);
lean_ctor_set(x_2, 1, x_123);
return x_2;
}
}
}
}
}
else
{
lean_object* x_124; uint8_t x_125;
lean_dec(x_2);
x_124 = l_Lean_mkAppStx___closed__3;
x_125 = lean_string_dec_eq(x_44, x_124);
if (x_125 == 0)
{
lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129;
lean_ctor_set(x_34, 1, x_49);
lean_inc(x_36);
lean_inc(x_31);
x_126 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_126, 0, x_31);
lean_ctor_set(x_126, 1, x_36);
x_127 = l_Lean_Syntax_getArgs(x_126);
lean_dec(x_126);
x_128 = lean_unsigned_to_nat(0u);
x_129 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_127, x_128);
lean_dec(x_127);
if (lean_obj_tag(x_129) == 0)
{
lean_object* x_130;
lean_dec(x_1);
x_130 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_130, 0, x_31);
lean_ctor_set(x_130, 1, x_36);
return x_130;
}
else
{
lean_object* x_131; lean_object* x_132; lean_object* x_133; uint8_t x_134;
x_131 = lean_ctor_get(x_129, 0);
lean_inc(x_131);
lean_dec(x_129);
x_132 = l_Lean_Delaborator_infoForPos(x_1);
x_133 = lean_array_get_size(x_36);
x_134 = lean_nat_dec_lt(x_131, x_133);
lean_dec(x_133);
if (x_134 == 0)
{
lean_object* x_135;
lean_dec(x_132);
lean_dec(x_131);
x_135 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_135, 0, x_31);
lean_ctor_set(x_135, 1, x_36);
return x_135;
}
else
{
lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141;
x_136 = lean_array_fget(x_36, x_131);
x_137 = lean_box(0);
x_138 = lean_array_fset(x_36, x_131, x_137);
x_139 = l_Lean_Syntax_setInfo(x_132, x_136);
x_140 = lean_array_fset(x_138, x_131, x_139);
lean_dec(x_131);
x_141 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_141, 0, x_31);
lean_ctor_set(x_141, 1, x_140);
return x_141;
}
}
}
else
{
lean_object* x_142; uint8_t x_143;
lean_dec(x_44);
x_142 = l_Lean_mkAppStx___closed__5;
x_143 = lean_string_dec_eq(x_41, x_142);
if (x_143 == 0)
{
lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147;
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_124);
lean_inc(x_36);
lean_inc(x_31);
x_144 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_144, 0, x_31);
lean_ctor_set(x_144, 1, x_36);
x_145 = l_Lean_Syntax_getArgs(x_144);
lean_dec(x_144);
x_146 = lean_unsigned_to_nat(0u);
x_147 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_145, x_146);
lean_dec(x_145);
if (lean_obj_tag(x_147) == 0)
{
lean_object* x_148;
lean_dec(x_1);
x_148 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_148, 0, x_31);
lean_ctor_set(x_148, 1, x_36);
return x_148;
}
else
{
lean_object* x_149; lean_object* x_150; lean_object* x_151; uint8_t x_152;
x_149 = lean_ctor_get(x_147, 0);
lean_inc(x_149);
lean_dec(x_147);
x_150 = l_Lean_Delaborator_infoForPos(x_1);
x_151 = lean_array_get_size(x_36);
x_152 = lean_nat_dec_lt(x_149, x_151);
lean_dec(x_151);
if (x_152 == 0)
{
lean_object* x_153;
lean_dec(x_150);
lean_dec(x_149);
x_153 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_153, 0, x_31);
lean_ctor_set(x_153, 1, x_36);
return x_153;
}
else
{
lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159;
x_154 = lean_array_fget(x_36, x_149);
x_155 = lean_box(0);
x_156 = lean_array_fset(x_36, x_149, x_155);
x_157 = l_Lean_Syntax_setInfo(x_150, x_154);
x_158 = lean_array_fset(x_156, x_149, x_157);
lean_dec(x_149);
x_159 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_159, 0, x_31);
lean_ctor_set(x_159, 1, x_158);
return x_159;
}
}
}
else
{
lean_object* x_160; uint8_t x_161;
lean_dec(x_41);
x_160 = l_Lean_mkTermIdFromIdent___closed__1;
x_161 = lean_string_dec_eq(x_38, x_160);
if (x_161 == 0)
{
lean_object* x_162; uint8_t x_163;
x_162 = l_Lean_mkAppStx___closed__7;
x_163 = lean_string_dec_eq(x_38, x_162);
if (x_163 == 0)
{
lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167;
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_124);
lean_ctor_set(x_32, 1, x_142);
lean_inc(x_36);
lean_inc(x_31);
x_164 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_164, 0, x_31);
lean_ctor_set(x_164, 1, x_36);
x_165 = l_Lean_Syntax_getArgs(x_164);
lean_dec(x_164);
x_166 = lean_unsigned_to_nat(0u);
x_167 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_165, x_166);
lean_dec(x_165);
if (lean_obj_tag(x_167) == 0)
{
lean_object* x_168;
lean_dec(x_1);
x_168 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_168, 0, x_31);
lean_ctor_set(x_168, 1, x_36);
return x_168;
}
else
{
lean_object* x_169; lean_object* x_170; lean_object* x_171; uint8_t x_172;
x_169 = lean_ctor_get(x_167, 0);
lean_inc(x_169);
lean_dec(x_167);
x_170 = l_Lean_Delaborator_infoForPos(x_1);
x_171 = lean_array_get_size(x_36);
x_172 = lean_nat_dec_lt(x_169, x_171);
lean_dec(x_171);
if (x_172 == 0)
{
lean_object* x_173;
lean_dec(x_170);
lean_dec(x_169);
x_173 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_173, 0, x_31);
lean_ctor_set(x_173, 1, x_36);
return x_173;
}
else
{
lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179;
x_174 = lean_array_fget(x_36, x_169);
x_175 = lean_box(0);
x_176 = lean_array_fset(x_36, x_169, x_175);
x_177 = l_Lean_Syntax_setInfo(x_170, x_174);
x_178 = lean_array_fset(x_176, x_169, x_177);
lean_dec(x_169);
x_179 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_179, 0, x_31);
lean_ctor_set(x_179, 1, x_178);
return x_179;
}
}
}
else
{
lean_object* x_180; lean_object* x_181; uint8_t x_182;
lean_dec(x_38);
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_124);
lean_ctor_set(x_32, 1, x_142);
lean_ctor_set(x_31, 1, x_162);
x_180 = lean_array_get_size(x_36);
x_181 = lean_unsigned_to_nat(0u);
x_182 = lean_nat_dec_lt(x_181, x_180);
lean_dec(x_180);
if (x_182 == 0)
{
lean_object* x_183;
lean_dec(x_1);
x_183 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_183, 0, x_31);
lean_ctor_set(x_183, 1, x_36);
return x_183;
}
else
{
lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189;
x_184 = lean_array_fget(x_36, x_181);
x_185 = lean_box(0);
x_186 = lean_array_fset(x_36, x_181, x_185);
x_187 = l_Lean_Delaborator_annotatePos___main(x_1, x_184);
x_188 = lean_array_fset(x_186, x_181, x_187);
x_189 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_189, 0, x_31);
lean_ctor_set(x_189, 1, x_188);
return x_189;
}
}
}
else
{
lean_object* x_190; lean_object* x_191; uint8_t x_192;
lean_dec(x_38);
lean_ctor_set(x_34, 1, x_49);
lean_ctor_set(x_33, 1, x_124);
lean_ctor_set(x_32, 1, x_142);
lean_ctor_set(x_31, 1, x_160);
x_190 = lean_array_get_size(x_36);
x_191 = lean_unsigned_to_nat(0u);
x_192 = lean_nat_dec_lt(x_191, x_190);
lean_dec(x_190);
if (x_192 == 0)
{
lean_object* x_193;
lean_dec(x_1);
x_193 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_193, 0, x_31);
lean_ctor_set(x_193, 1, x_36);
return x_193;
}
else
{
lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199;
x_194 = lean_array_fget(x_36, x_191);
x_195 = lean_box(0);
x_196 = lean_array_fset(x_36, x_191, x_195);
x_197 = l_Lean_Delaborator_annotatePos___main(x_1, x_194);
x_198 = lean_array_fset(x_196, x_191, x_197);
x_199 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_199, 0, x_31);
lean_ctor_set(x_199, 1, x_198);
return x_199;
}
}
}
}
}
}
}
else
{
lean_object* x_200; size_t x_201; lean_object* x_202; uint8_t x_203;
x_200 = lean_ctor_get(x_34, 1);
x_201 = lean_ctor_get_usize(x_34, 2);
lean_inc(x_200);
lean_dec(x_34);
x_202 = l_Lean_mkAppStx___closed__1;
x_203 = lean_string_dec_eq(x_200, x_202);
lean_dec(x_200);
if (x_203 == 0)
{
lean_object* x_204;
lean_free_object(x_33);
lean_dec(x_44);
lean_free_object(x_32);
lean_dec(x_41);
lean_free_object(x_31);
lean_dec(x_38);
lean_dec(x_36);
x_204 = lean_box(0);
x_3 = x_204;
goto block_30;
}
else
{
lean_object* x_205; lean_object* x_206; uint8_t x_207;
if (lean_is_exclusive(x_2)) {
lean_ctor_release(x_2, 0);
lean_ctor_release(x_2, 1);
x_205 = x_2;
} else {
lean_dec_ref(x_2);
x_205 = lean_box(0);
}
x_206 = l_Lean_mkAppStx___closed__3;
x_207 = lean_string_dec_eq(x_44, x_206);
if (x_207 == 0)
{
lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212;
x_208 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_208, 0, x_35);
lean_ctor_set(x_208, 1, x_202);
lean_ctor_set_usize(x_208, 2, x_201);
lean_ctor_set(x_33, 0, x_208);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_205)) {
x_209 = lean_alloc_ctor(1, 2, 0);
} else {
x_209 = x_205;
}
lean_ctor_set(x_209, 0, x_31);
lean_ctor_set(x_209, 1, x_36);
x_210 = l_Lean_Syntax_getArgs(x_209);
lean_dec(x_209);
x_211 = lean_unsigned_to_nat(0u);
x_212 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_210, x_211);
lean_dec(x_210);
if (lean_obj_tag(x_212) == 0)
{
lean_object* x_213;
lean_dec(x_1);
x_213 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_213, 0, x_31);
lean_ctor_set(x_213, 1, x_36);
return x_213;
}
else
{
lean_object* x_214; lean_object* x_215; lean_object* x_216; uint8_t x_217;
x_214 = lean_ctor_get(x_212, 0);
lean_inc(x_214);
lean_dec(x_212);
x_215 = l_Lean_Delaborator_infoForPos(x_1);
x_216 = lean_array_get_size(x_36);
x_217 = lean_nat_dec_lt(x_214, x_216);
lean_dec(x_216);
if (x_217 == 0)
{
lean_object* x_218;
lean_dec(x_215);
lean_dec(x_214);
x_218 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_218, 0, x_31);
lean_ctor_set(x_218, 1, x_36);
return x_218;
}
else
{
lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224;
x_219 = lean_array_fget(x_36, x_214);
x_220 = lean_box(0);
x_221 = lean_array_fset(x_36, x_214, x_220);
x_222 = l_Lean_Syntax_setInfo(x_215, x_219);
x_223 = lean_array_fset(x_221, x_214, x_222);
lean_dec(x_214);
x_224 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_224, 0, x_31);
lean_ctor_set(x_224, 1, x_223);
return x_224;
}
}
}
else
{
lean_object* x_225; uint8_t x_226;
lean_dec(x_44);
x_225 = l_Lean_mkAppStx___closed__5;
x_226 = lean_string_dec_eq(x_41, x_225);
if (x_226 == 0)
{
lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231;
x_227 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_227, 0, x_35);
lean_ctor_set(x_227, 1, x_202);
lean_ctor_set_usize(x_227, 2, x_201);
lean_ctor_set(x_33, 1, x_206);
lean_ctor_set(x_33, 0, x_227);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_205)) {
x_228 = lean_alloc_ctor(1, 2, 0);
} else {
x_228 = x_205;
}
lean_ctor_set(x_228, 0, x_31);
lean_ctor_set(x_228, 1, x_36);
x_229 = l_Lean_Syntax_getArgs(x_228);
lean_dec(x_228);
x_230 = lean_unsigned_to_nat(0u);
x_231 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_229, x_230);
lean_dec(x_229);
if (lean_obj_tag(x_231) == 0)
{
lean_object* x_232;
lean_dec(x_1);
x_232 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_232, 0, x_31);
lean_ctor_set(x_232, 1, x_36);
return x_232;
}
else
{
lean_object* x_233; lean_object* x_234; lean_object* x_235; uint8_t x_236;
x_233 = lean_ctor_get(x_231, 0);
lean_inc(x_233);
lean_dec(x_231);
x_234 = l_Lean_Delaborator_infoForPos(x_1);
x_235 = lean_array_get_size(x_36);
x_236 = lean_nat_dec_lt(x_233, x_235);
lean_dec(x_235);
if (x_236 == 0)
{
lean_object* x_237;
lean_dec(x_234);
lean_dec(x_233);
x_237 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_237, 0, x_31);
lean_ctor_set(x_237, 1, x_36);
return x_237;
}
else
{
lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243;
x_238 = lean_array_fget(x_36, x_233);
x_239 = lean_box(0);
x_240 = lean_array_fset(x_36, x_233, x_239);
x_241 = l_Lean_Syntax_setInfo(x_234, x_238);
x_242 = lean_array_fset(x_240, x_233, x_241);
lean_dec(x_233);
x_243 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_243, 0, x_31);
lean_ctor_set(x_243, 1, x_242);
return x_243;
}
}
}
else
{
lean_object* x_244; uint8_t x_245;
lean_dec(x_41);
x_244 = l_Lean_mkTermIdFromIdent___closed__1;
x_245 = lean_string_dec_eq(x_38, x_244);
if (x_245 == 0)
{
lean_object* x_246; uint8_t x_247;
x_246 = l_Lean_mkAppStx___closed__7;
x_247 = lean_string_dec_eq(x_38, x_246);
if (x_247 == 0)
{
lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252;
x_248 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_248, 0, x_35);
lean_ctor_set(x_248, 1, x_202);
lean_ctor_set_usize(x_248, 2, x_201);
lean_ctor_set(x_33, 1, x_206);
lean_ctor_set(x_33, 0, x_248);
lean_ctor_set(x_32, 1, x_225);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_205)) {
x_249 = lean_alloc_ctor(1, 2, 0);
} else {
x_249 = x_205;
}
lean_ctor_set(x_249, 0, x_31);
lean_ctor_set(x_249, 1, x_36);
x_250 = l_Lean_Syntax_getArgs(x_249);
lean_dec(x_249);
x_251 = lean_unsigned_to_nat(0u);
x_252 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_250, x_251);
lean_dec(x_250);
if (lean_obj_tag(x_252) == 0)
{
lean_object* x_253;
lean_dec(x_1);
x_253 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_253, 0, x_31);
lean_ctor_set(x_253, 1, x_36);
return x_253;
}
else
{
lean_object* x_254; lean_object* x_255; lean_object* x_256; uint8_t x_257;
x_254 = lean_ctor_get(x_252, 0);
lean_inc(x_254);
lean_dec(x_252);
x_255 = l_Lean_Delaborator_infoForPos(x_1);
x_256 = lean_array_get_size(x_36);
x_257 = lean_nat_dec_lt(x_254, x_256);
lean_dec(x_256);
if (x_257 == 0)
{
lean_object* x_258;
lean_dec(x_255);
lean_dec(x_254);
x_258 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_258, 0, x_31);
lean_ctor_set(x_258, 1, x_36);
return x_258;
}
else
{
lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264;
x_259 = lean_array_fget(x_36, x_254);
x_260 = lean_box(0);
x_261 = lean_array_fset(x_36, x_254, x_260);
x_262 = l_Lean_Syntax_setInfo(x_255, x_259);
x_263 = lean_array_fset(x_261, x_254, x_262);
lean_dec(x_254);
x_264 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_264, 0, x_31);
lean_ctor_set(x_264, 1, x_263);
return x_264;
}
}
}
else
{
lean_object* x_265; lean_object* x_266; lean_object* x_267; uint8_t x_268;
lean_dec(x_38);
x_265 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_265, 0, x_35);
lean_ctor_set(x_265, 1, x_202);
lean_ctor_set_usize(x_265, 2, x_201);
lean_ctor_set(x_33, 1, x_206);
lean_ctor_set(x_33, 0, x_265);
lean_ctor_set(x_32, 1, x_225);
lean_ctor_set(x_31, 1, x_246);
x_266 = lean_array_get_size(x_36);
x_267 = lean_unsigned_to_nat(0u);
x_268 = lean_nat_dec_lt(x_267, x_266);
lean_dec(x_266);
if (x_268 == 0)
{
lean_object* x_269;
lean_dec(x_1);
if (lean_is_scalar(x_205)) {
x_269 = lean_alloc_ctor(1, 2, 0);
} else {
x_269 = x_205;
}
lean_ctor_set(x_269, 0, x_31);
lean_ctor_set(x_269, 1, x_36);
return x_269;
}
else
{
lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275;
x_270 = lean_array_fget(x_36, x_267);
x_271 = lean_box(0);
x_272 = lean_array_fset(x_36, x_267, x_271);
x_273 = l_Lean_Delaborator_annotatePos___main(x_1, x_270);
x_274 = lean_array_fset(x_272, x_267, x_273);
if (lean_is_scalar(x_205)) {
x_275 = lean_alloc_ctor(1, 2, 0);
} else {
x_275 = x_205;
}
lean_ctor_set(x_275, 0, x_31);
lean_ctor_set(x_275, 1, x_274);
return x_275;
}
}
}
else
{
lean_object* x_276; lean_object* x_277; lean_object* x_278; uint8_t x_279;
lean_dec(x_38);
x_276 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_276, 0, x_35);
lean_ctor_set(x_276, 1, x_202);
lean_ctor_set_usize(x_276, 2, x_201);
lean_ctor_set(x_33, 1, x_206);
lean_ctor_set(x_33, 0, x_276);
lean_ctor_set(x_32, 1, x_225);
lean_ctor_set(x_31, 1, x_244);
x_277 = lean_array_get_size(x_36);
x_278 = lean_unsigned_to_nat(0u);
x_279 = lean_nat_dec_lt(x_278, x_277);
lean_dec(x_277);
if (x_279 == 0)
{
lean_object* x_280;
lean_dec(x_1);
if (lean_is_scalar(x_205)) {
x_280 = lean_alloc_ctor(1, 2, 0);
} else {
x_280 = x_205;
}
lean_ctor_set(x_280, 0, x_31);
lean_ctor_set(x_280, 1, x_36);
return x_280;
}
else
{
lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286;
x_281 = lean_array_fget(x_36, x_278);
x_282 = lean_box(0);
x_283 = lean_array_fset(x_36, x_278, x_282);
x_284 = l_Lean_Delaborator_annotatePos___main(x_1, x_281);
x_285 = lean_array_fset(x_283, x_278, x_284);
if (lean_is_scalar(x_205)) {
x_286 = lean_alloc_ctor(1, 2, 0);
} else {
x_286 = x_205;
}
lean_ctor_set(x_286, 0, x_31);
lean_ctor_set(x_286, 1, x_285);
return x_286;
}
}
}
}
}
}
}
else
{
lean_object* x_287; size_t x_288; lean_object* x_289; size_t x_290; lean_object* x_291; lean_object* x_292; uint8_t x_293;
x_287 = lean_ctor_get(x_33, 1);
x_288 = lean_ctor_get_usize(x_33, 2);
lean_inc(x_287);
lean_dec(x_33);
x_289 = lean_ctor_get(x_34, 1);
lean_inc(x_289);
x_290 = lean_ctor_get_usize(x_34, 2);
if (lean_is_exclusive(x_34)) {
lean_ctor_release(x_34, 0);
lean_ctor_release(x_34, 1);
x_291 = x_34;
} else {
lean_dec_ref(x_34);
x_291 = lean_box(0);
}
x_292 = l_Lean_mkAppStx___closed__1;
x_293 = lean_string_dec_eq(x_289, x_292);
lean_dec(x_289);
if (x_293 == 0)
{
lean_object* x_294;
lean_dec(x_291);
lean_dec(x_287);
lean_free_object(x_32);
lean_dec(x_41);
lean_free_object(x_31);
lean_dec(x_38);
lean_dec(x_36);
x_294 = lean_box(0);
x_3 = x_294;
goto block_30;
}
else
{
lean_object* x_295; lean_object* x_296; uint8_t x_297;
if (lean_is_exclusive(x_2)) {
lean_ctor_release(x_2, 0);
lean_ctor_release(x_2, 1);
x_295 = x_2;
} else {
lean_dec_ref(x_2);
x_295 = lean_box(0);
}
x_296 = l_Lean_mkAppStx___closed__3;
x_297 = lean_string_dec_eq(x_287, x_296);
if (x_297 == 0)
{
lean_object* x_298; lean_object* x_299; lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303;
if (lean_is_scalar(x_291)) {
x_298 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_298 = x_291;
}
lean_ctor_set(x_298, 0, x_35);
lean_ctor_set(x_298, 1, x_292);
lean_ctor_set_usize(x_298, 2, x_290);
x_299 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_299, 0, x_298);
lean_ctor_set(x_299, 1, x_287);
lean_ctor_set_usize(x_299, 2, x_288);
lean_ctor_set(x_32, 0, x_299);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_295)) {
x_300 = lean_alloc_ctor(1, 2, 0);
} else {
x_300 = x_295;
}
lean_ctor_set(x_300, 0, x_31);
lean_ctor_set(x_300, 1, x_36);
x_301 = l_Lean_Syntax_getArgs(x_300);
lean_dec(x_300);
x_302 = lean_unsigned_to_nat(0u);
x_303 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_301, x_302);
lean_dec(x_301);
if (lean_obj_tag(x_303) == 0)
{
lean_object* x_304;
lean_dec(x_1);
x_304 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_304, 0, x_31);
lean_ctor_set(x_304, 1, x_36);
return x_304;
}
else
{
lean_object* x_305; lean_object* x_306; lean_object* x_307; uint8_t x_308;
x_305 = lean_ctor_get(x_303, 0);
lean_inc(x_305);
lean_dec(x_303);
x_306 = l_Lean_Delaborator_infoForPos(x_1);
x_307 = lean_array_get_size(x_36);
x_308 = lean_nat_dec_lt(x_305, x_307);
lean_dec(x_307);
if (x_308 == 0)
{
lean_object* x_309;
lean_dec(x_306);
lean_dec(x_305);
x_309 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_309, 0, x_31);
lean_ctor_set(x_309, 1, x_36);
return x_309;
}
else
{
lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; lean_object* x_315;
x_310 = lean_array_fget(x_36, x_305);
x_311 = lean_box(0);
x_312 = lean_array_fset(x_36, x_305, x_311);
x_313 = l_Lean_Syntax_setInfo(x_306, x_310);
x_314 = lean_array_fset(x_312, x_305, x_313);
lean_dec(x_305);
x_315 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_315, 0, x_31);
lean_ctor_set(x_315, 1, x_314);
return x_315;
}
}
}
else
{
lean_object* x_316; uint8_t x_317;
lean_dec(x_287);
x_316 = l_Lean_mkAppStx___closed__5;
x_317 = lean_string_dec_eq(x_41, x_316);
if (x_317 == 0)
{
lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323;
if (lean_is_scalar(x_291)) {
x_318 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_318 = x_291;
}
lean_ctor_set(x_318, 0, x_35);
lean_ctor_set(x_318, 1, x_292);
lean_ctor_set_usize(x_318, 2, x_290);
x_319 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_319, 0, x_318);
lean_ctor_set(x_319, 1, x_296);
lean_ctor_set_usize(x_319, 2, x_288);
lean_ctor_set(x_32, 0, x_319);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_295)) {
x_320 = lean_alloc_ctor(1, 2, 0);
} else {
x_320 = x_295;
}
lean_ctor_set(x_320, 0, x_31);
lean_ctor_set(x_320, 1, x_36);
x_321 = l_Lean_Syntax_getArgs(x_320);
lean_dec(x_320);
x_322 = lean_unsigned_to_nat(0u);
x_323 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_321, x_322);
lean_dec(x_321);
if (lean_obj_tag(x_323) == 0)
{
lean_object* x_324;
lean_dec(x_1);
x_324 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_324, 0, x_31);
lean_ctor_set(x_324, 1, x_36);
return x_324;
}
else
{
lean_object* x_325; lean_object* x_326; lean_object* x_327; uint8_t x_328;
x_325 = lean_ctor_get(x_323, 0);
lean_inc(x_325);
lean_dec(x_323);
x_326 = l_Lean_Delaborator_infoForPos(x_1);
x_327 = lean_array_get_size(x_36);
x_328 = lean_nat_dec_lt(x_325, x_327);
lean_dec(x_327);
if (x_328 == 0)
{
lean_object* x_329;
lean_dec(x_326);
lean_dec(x_325);
x_329 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_329, 0, x_31);
lean_ctor_set(x_329, 1, x_36);
return x_329;
}
else
{
lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335;
x_330 = lean_array_fget(x_36, x_325);
x_331 = lean_box(0);
x_332 = lean_array_fset(x_36, x_325, x_331);
x_333 = l_Lean_Syntax_setInfo(x_326, x_330);
x_334 = lean_array_fset(x_332, x_325, x_333);
lean_dec(x_325);
x_335 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_335, 0, x_31);
lean_ctor_set(x_335, 1, x_334);
return x_335;
}
}
}
else
{
lean_object* x_336; uint8_t x_337;
lean_dec(x_41);
x_336 = l_Lean_mkTermIdFromIdent___closed__1;
x_337 = lean_string_dec_eq(x_38, x_336);
if (x_337 == 0)
{
lean_object* x_338; uint8_t x_339;
x_338 = l_Lean_mkAppStx___closed__7;
x_339 = lean_string_dec_eq(x_38, x_338);
if (x_339 == 0)
{
lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345;
if (lean_is_scalar(x_291)) {
x_340 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_340 = x_291;
}
lean_ctor_set(x_340, 0, x_35);
lean_ctor_set(x_340, 1, x_292);
lean_ctor_set_usize(x_340, 2, x_290);
x_341 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_341, 0, x_340);
lean_ctor_set(x_341, 1, x_296);
lean_ctor_set_usize(x_341, 2, x_288);
lean_ctor_set(x_32, 1, x_316);
lean_ctor_set(x_32, 0, x_341);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_295)) {
x_342 = lean_alloc_ctor(1, 2, 0);
} else {
x_342 = x_295;
}
lean_ctor_set(x_342, 0, x_31);
lean_ctor_set(x_342, 1, x_36);
x_343 = l_Lean_Syntax_getArgs(x_342);
lean_dec(x_342);
x_344 = lean_unsigned_to_nat(0u);
x_345 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_343, x_344);
lean_dec(x_343);
if (lean_obj_tag(x_345) == 0)
{
lean_object* x_346;
lean_dec(x_1);
x_346 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_346, 0, x_31);
lean_ctor_set(x_346, 1, x_36);
return x_346;
}
else
{
lean_object* x_347; lean_object* x_348; lean_object* x_349; uint8_t x_350;
x_347 = lean_ctor_get(x_345, 0);
lean_inc(x_347);
lean_dec(x_345);
x_348 = l_Lean_Delaborator_infoForPos(x_1);
x_349 = lean_array_get_size(x_36);
x_350 = lean_nat_dec_lt(x_347, x_349);
lean_dec(x_349);
if (x_350 == 0)
{
lean_object* x_351;
lean_dec(x_348);
lean_dec(x_347);
x_351 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_351, 0, x_31);
lean_ctor_set(x_351, 1, x_36);
return x_351;
}
else
{
lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357;
x_352 = lean_array_fget(x_36, x_347);
x_353 = lean_box(0);
x_354 = lean_array_fset(x_36, x_347, x_353);
x_355 = l_Lean_Syntax_setInfo(x_348, x_352);
x_356 = lean_array_fset(x_354, x_347, x_355);
lean_dec(x_347);
x_357 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_357, 0, x_31);
lean_ctor_set(x_357, 1, x_356);
return x_357;
}
}
}
else
{
lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; uint8_t x_362;
lean_dec(x_38);
if (lean_is_scalar(x_291)) {
x_358 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_358 = x_291;
}
lean_ctor_set(x_358, 0, x_35);
lean_ctor_set(x_358, 1, x_292);
lean_ctor_set_usize(x_358, 2, x_290);
x_359 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_359, 0, x_358);
lean_ctor_set(x_359, 1, x_296);
lean_ctor_set_usize(x_359, 2, x_288);
lean_ctor_set(x_32, 1, x_316);
lean_ctor_set(x_32, 0, x_359);
lean_ctor_set(x_31, 1, x_338);
x_360 = lean_array_get_size(x_36);
x_361 = lean_unsigned_to_nat(0u);
x_362 = lean_nat_dec_lt(x_361, x_360);
lean_dec(x_360);
if (x_362 == 0)
{
lean_object* x_363;
lean_dec(x_1);
if (lean_is_scalar(x_295)) {
x_363 = lean_alloc_ctor(1, 2, 0);
} else {
x_363 = x_295;
}
lean_ctor_set(x_363, 0, x_31);
lean_ctor_set(x_363, 1, x_36);
return x_363;
}
else
{
lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369;
x_364 = lean_array_fget(x_36, x_361);
x_365 = lean_box(0);
x_366 = lean_array_fset(x_36, x_361, x_365);
x_367 = l_Lean_Delaborator_annotatePos___main(x_1, x_364);
x_368 = lean_array_fset(x_366, x_361, x_367);
if (lean_is_scalar(x_295)) {
x_369 = lean_alloc_ctor(1, 2, 0);
} else {
x_369 = x_295;
}
lean_ctor_set(x_369, 0, x_31);
lean_ctor_set(x_369, 1, x_368);
return x_369;
}
}
}
else
{
lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; uint8_t x_374;
lean_dec(x_38);
if (lean_is_scalar(x_291)) {
x_370 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_370 = x_291;
}
lean_ctor_set(x_370, 0, x_35);
lean_ctor_set(x_370, 1, x_292);
lean_ctor_set_usize(x_370, 2, x_290);
x_371 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_371, 0, x_370);
lean_ctor_set(x_371, 1, x_296);
lean_ctor_set_usize(x_371, 2, x_288);
lean_ctor_set(x_32, 1, x_316);
lean_ctor_set(x_32, 0, x_371);
lean_ctor_set(x_31, 1, x_336);
x_372 = lean_array_get_size(x_36);
x_373 = lean_unsigned_to_nat(0u);
x_374 = lean_nat_dec_lt(x_373, x_372);
lean_dec(x_372);
if (x_374 == 0)
{
lean_object* x_375;
lean_dec(x_1);
if (lean_is_scalar(x_295)) {
x_375 = lean_alloc_ctor(1, 2, 0);
} else {
x_375 = x_295;
}
lean_ctor_set(x_375, 0, x_31);
lean_ctor_set(x_375, 1, x_36);
return x_375;
}
else
{
lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381;
x_376 = lean_array_fget(x_36, x_373);
x_377 = lean_box(0);
x_378 = lean_array_fset(x_36, x_373, x_377);
x_379 = l_Lean_Delaborator_annotatePos___main(x_1, x_376);
x_380 = lean_array_fset(x_378, x_373, x_379);
if (lean_is_scalar(x_295)) {
x_381 = lean_alloc_ctor(1, 2, 0);
} else {
x_381 = x_295;
}
lean_ctor_set(x_381, 0, x_31);
lean_ctor_set(x_381, 1, x_380);
return x_381;
}
}
}
}
}
}
}
else
{
lean_object* x_382; size_t x_383; lean_object* x_384; size_t x_385; lean_object* x_386; lean_object* x_387; size_t x_388; lean_object* x_389; lean_object* x_390; uint8_t x_391;
x_382 = lean_ctor_get(x_32, 1);
x_383 = lean_ctor_get_usize(x_32, 2);
lean_inc(x_382);
lean_dec(x_32);
x_384 = lean_ctor_get(x_33, 1);
lean_inc(x_384);
x_385 = lean_ctor_get_usize(x_33, 2);
if (lean_is_exclusive(x_33)) {
lean_ctor_release(x_33, 0);
lean_ctor_release(x_33, 1);
x_386 = x_33;
} else {
lean_dec_ref(x_33);
x_386 = lean_box(0);
}
x_387 = lean_ctor_get(x_34, 1);
lean_inc(x_387);
x_388 = lean_ctor_get_usize(x_34, 2);
if (lean_is_exclusive(x_34)) {
lean_ctor_release(x_34, 0);
lean_ctor_release(x_34, 1);
x_389 = x_34;
} else {
lean_dec_ref(x_34);
x_389 = lean_box(0);
}
x_390 = l_Lean_mkAppStx___closed__1;
x_391 = lean_string_dec_eq(x_387, x_390);
lean_dec(x_387);
if (x_391 == 0)
{
lean_object* x_392;
lean_dec(x_389);
lean_dec(x_386);
lean_dec(x_384);
lean_dec(x_382);
lean_free_object(x_31);
lean_dec(x_38);
lean_dec(x_36);
x_392 = lean_box(0);
x_3 = x_392;
goto block_30;
}
else
{
lean_object* x_393; lean_object* x_394; uint8_t x_395;
if (lean_is_exclusive(x_2)) {
lean_ctor_release(x_2, 0);
lean_ctor_release(x_2, 1);
x_393 = x_2;
} else {
lean_dec_ref(x_2);
x_393 = lean_box(0);
}
x_394 = l_Lean_mkAppStx___closed__3;
x_395 = lean_string_dec_eq(x_384, x_394);
if (x_395 == 0)
{
lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; lean_object* x_402;
if (lean_is_scalar(x_389)) {
x_396 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_396 = x_389;
}
lean_ctor_set(x_396, 0, x_35);
lean_ctor_set(x_396, 1, x_390);
lean_ctor_set_usize(x_396, 2, x_388);
if (lean_is_scalar(x_386)) {
x_397 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_397 = x_386;
}
lean_ctor_set(x_397, 0, x_396);
lean_ctor_set(x_397, 1, x_384);
lean_ctor_set_usize(x_397, 2, x_385);
x_398 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_398, 0, x_397);
lean_ctor_set(x_398, 1, x_382);
lean_ctor_set_usize(x_398, 2, x_383);
lean_ctor_set(x_31, 0, x_398);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_393)) {
x_399 = lean_alloc_ctor(1, 2, 0);
} else {
x_399 = x_393;
}
lean_ctor_set(x_399, 0, x_31);
lean_ctor_set(x_399, 1, x_36);
x_400 = l_Lean_Syntax_getArgs(x_399);
lean_dec(x_399);
x_401 = lean_unsigned_to_nat(0u);
x_402 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_400, x_401);
lean_dec(x_400);
if (lean_obj_tag(x_402) == 0)
{
lean_object* x_403;
lean_dec(x_1);
x_403 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_403, 0, x_31);
lean_ctor_set(x_403, 1, x_36);
return x_403;
}
else
{
lean_object* x_404; lean_object* x_405; lean_object* x_406; uint8_t x_407;
x_404 = lean_ctor_get(x_402, 0);
lean_inc(x_404);
lean_dec(x_402);
x_405 = l_Lean_Delaborator_infoForPos(x_1);
x_406 = lean_array_get_size(x_36);
x_407 = lean_nat_dec_lt(x_404, x_406);
lean_dec(x_406);
if (x_407 == 0)
{
lean_object* x_408;
lean_dec(x_405);
lean_dec(x_404);
x_408 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_408, 0, x_31);
lean_ctor_set(x_408, 1, x_36);
return x_408;
}
else
{
lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414;
x_409 = lean_array_fget(x_36, x_404);
x_410 = lean_box(0);
x_411 = lean_array_fset(x_36, x_404, x_410);
x_412 = l_Lean_Syntax_setInfo(x_405, x_409);
x_413 = lean_array_fset(x_411, x_404, x_412);
lean_dec(x_404);
x_414 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_414, 0, x_31);
lean_ctor_set(x_414, 1, x_413);
return x_414;
}
}
}
else
{
lean_object* x_415; uint8_t x_416;
lean_dec(x_384);
x_415 = l_Lean_mkAppStx___closed__5;
x_416 = lean_string_dec_eq(x_382, x_415);
if (x_416 == 0)
{
lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423;
if (lean_is_scalar(x_389)) {
x_417 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_417 = x_389;
}
lean_ctor_set(x_417, 0, x_35);
lean_ctor_set(x_417, 1, x_390);
lean_ctor_set_usize(x_417, 2, x_388);
if (lean_is_scalar(x_386)) {
x_418 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_418 = x_386;
}
lean_ctor_set(x_418, 0, x_417);
lean_ctor_set(x_418, 1, x_394);
lean_ctor_set_usize(x_418, 2, x_385);
x_419 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_419, 0, x_418);
lean_ctor_set(x_419, 1, x_382);
lean_ctor_set_usize(x_419, 2, x_383);
lean_ctor_set(x_31, 0, x_419);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_393)) {
x_420 = lean_alloc_ctor(1, 2, 0);
} else {
x_420 = x_393;
}
lean_ctor_set(x_420, 0, x_31);
lean_ctor_set(x_420, 1, x_36);
x_421 = l_Lean_Syntax_getArgs(x_420);
lean_dec(x_420);
x_422 = lean_unsigned_to_nat(0u);
x_423 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_421, x_422);
lean_dec(x_421);
if (lean_obj_tag(x_423) == 0)
{
lean_object* x_424;
lean_dec(x_1);
x_424 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_424, 0, x_31);
lean_ctor_set(x_424, 1, x_36);
return x_424;
}
else
{
lean_object* x_425; lean_object* x_426; lean_object* x_427; uint8_t x_428;
x_425 = lean_ctor_get(x_423, 0);
lean_inc(x_425);
lean_dec(x_423);
x_426 = l_Lean_Delaborator_infoForPos(x_1);
x_427 = lean_array_get_size(x_36);
x_428 = lean_nat_dec_lt(x_425, x_427);
lean_dec(x_427);
if (x_428 == 0)
{
lean_object* x_429;
lean_dec(x_426);
lean_dec(x_425);
x_429 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_429, 0, x_31);
lean_ctor_set(x_429, 1, x_36);
return x_429;
}
else
{
lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435;
x_430 = lean_array_fget(x_36, x_425);
x_431 = lean_box(0);
x_432 = lean_array_fset(x_36, x_425, x_431);
x_433 = l_Lean_Syntax_setInfo(x_426, x_430);
x_434 = lean_array_fset(x_432, x_425, x_433);
lean_dec(x_425);
x_435 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_435, 0, x_31);
lean_ctor_set(x_435, 1, x_434);
return x_435;
}
}
}
else
{
lean_object* x_436; uint8_t x_437;
lean_dec(x_382);
x_436 = l_Lean_mkTermIdFromIdent___closed__1;
x_437 = lean_string_dec_eq(x_38, x_436);
if (x_437 == 0)
{
lean_object* x_438; uint8_t x_439;
x_438 = l_Lean_mkAppStx___closed__7;
x_439 = lean_string_dec_eq(x_38, x_438);
if (x_439 == 0)
{
lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446;
if (lean_is_scalar(x_389)) {
x_440 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_440 = x_389;
}
lean_ctor_set(x_440, 0, x_35);
lean_ctor_set(x_440, 1, x_390);
lean_ctor_set_usize(x_440, 2, x_388);
if (lean_is_scalar(x_386)) {
x_441 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_441 = x_386;
}
lean_ctor_set(x_441, 0, x_440);
lean_ctor_set(x_441, 1, x_394);
lean_ctor_set_usize(x_441, 2, x_385);
x_442 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_442, 0, x_441);
lean_ctor_set(x_442, 1, x_415);
lean_ctor_set_usize(x_442, 2, x_383);
lean_ctor_set(x_31, 0, x_442);
lean_inc(x_36);
lean_inc(x_31);
if (lean_is_scalar(x_393)) {
x_443 = lean_alloc_ctor(1, 2, 0);
} else {
x_443 = x_393;
}
lean_ctor_set(x_443, 0, x_31);
lean_ctor_set(x_443, 1, x_36);
x_444 = l_Lean_Syntax_getArgs(x_443);
lean_dec(x_443);
x_445 = lean_unsigned_to_nat(0u);
x_446 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_444, x_445);
lean_dec(x_444);
if (lean_obj_tag(x_446) == 0)
{
lean_object* x_447;
lean_dec(x_1);
x_447 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_447, 0, x_31);
lean_ctor_set(x_447, 1, x_36);
return x_447;
}
else
{
lean_object* x_448; lean_object* x_449; lean_object* x_450; uint8_t x_451;
x_448 = lean_ctor_get(x_446, 0);
lean_inc(x_448);
lean_dec(x_446);
x_449 = l_Lean_Delaborator_infoForPos(x_1);
x_450 = lean_array_get_size(x_36);
x_451 = lean_nat_dec_lt(x_448, x_450);
lean_dec(x_450);
if (x_451 == 0)
{
lean_object* x_452;
lean_dec(x_449);
lean_dec(x_448);
x_452 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_452, 0, x_31);
lean_ctor_set(x_452, 1, x_36);
return x_452;
}
else
{
lean_object* x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; lean_object* x_457; lean_object* x_458;
x_453 = lean_array_fget(x_36, x_448);
x_454 = lean_box(0);
x_455 = lean_array_fset(x_36, x_448, x_454);
x_456 = l_Lean_Syntax_setInfo(x_449, x_453);
x_457 = lean_array_fset(x_455, x_448, x_456);
lean_dec(x_448);
x_458 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_458, 0, x_31);
lean_ctor_set(x_458, 1, x_457);
return x_458;
}
}
}
else
{
lean_object* x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; uint8_t x_464;
lean_dec(x_38);
if (lean_is_scalar(x_389)) {
x_459 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_459 = x_389;
}
lean_ctor_set(x_459, 0, x_35);
lean_ctor_set(x_459, 1, x_390);
lean_ctor_set_usize(x_459, 2, x_388);
if (lean_is_scalar(x_386)) {
x_460 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_460 = x_386;
}
lean_ctor_set(x_460, 0, x_459);
lean_ctor_set(x_460, 1, x_394);
lean_ctor_set_usize(x_460, 2, x_385);
x_461 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_461, 0, x_460);
lean_ctor_set(x_461, 1, x_415);
lean_ctor_set_usize(x_461, 2, x_383);
lean_ctor_set(x_31, 1, x_438);
lean_ctor_set(x_31, 0, x_461);
x_462 = lean_array_get_size(x_36);
x_463 = lean_unsigned_to_nat(0u);
x_464 = lean_nat_dec_lt(x_463, x_462);
lean_dec(x_462);
if (x_464 == 0)
{
lean_object* x_465;
lean_dec(x_1);
if (lean_is_scalar(x_393)) {
x_465 = lean_alloc_ctor(1, 2, 0);
} else {
x_465 = x_393;
}
lean_ctor_set(x_465, 0, x_31);
lean_ctor_set(x_465, 1, x_36);
return x_465;
}
else
{
lean_object* x_466; lean_object* x_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471;
x_466 = lean_array_fget(x_36, x_463);
x_467 = lean_box(0);
x_468 = lean_array_fset(x_36, x_463, x_467);
x_469 = l_Lean_Delaborator_annotatePos___main(x_1, x_466);
x_470 = lean_array_fset(x_468, x_463, x_469);
if (lean_is_scalar(x_393)) {
x_471 = lean_alloc_ctor(1, 2, 0);
} else {
x_471 = x_393;
}
lean_ctor_set(x_471, 0, x_31);
lean_ctor_set(x_471, 1, x_470);
return x_471;
}
}
}
else
{
lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; uint8_t x_477;
lean_dec(x_38);
if (lean_is_scalar(x_389)) {
x_472 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_472 = x_389;
}
lean_ctor_set(x_472, 0, x_35);
lean_ctor_set(x_472, 1, x_390);
lean_ctor_set_usize(x_472, 2, x_388);
if (lean_is_scalar(x_386)) {
x_473 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_473 = x_386;
}
lean_ctor_set(x_473, 0, x_472);
lean_ctor_set(x_473, 1, x_394);
lean_ctor_set_usize(x_473, 2, x_385);
x_474 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_474, 0, x_473);
lean_ctor_set(x_474, 1, x_415);
lean_ctor_set_usize(x_474, 2, x_383);
lean_ctor_set(x_31, 1, x_436);
lean_ctor_set(x_31, 0, x_474);
x_475 = lean_array_get_size(x_36);
x_476 = lean_unsigned_to_nat(0u);
x_477 = lean_nat_dec_lt(x_476, x_475);
lean_dec(x_475);
if (x_477 == 0)
{
lean_object* x_478;
lean_dec(x_1);
if (lean_is_scalar(x_393)) {
x_478 = lean_alloc_ctor(1, 2, 0);
} else {
x_478 = x_393;
}
lean_ctor_set(x_478, 0, x_31);
lean_ctor_set(x_478, 1, x_36);
return x_478;
}
else
{
lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484;
x_479 = lean_array_fget(x_36, x_476);
x_480 = lean_box(0);
x_481 = lean_array_fset(x_36, x_476, x_480);
x_482 = l_Lean_Delaborator_annotatePos___main(x_1, x_479);
x_483 = lean_array_fset(x_481, x_476, x_482);
if (lean_is_scalar(x_393)) {
x_484 = lean_alloc_ctor(1, 2, 0);
} else {
x_484 = x_393;
}
lean_ctor_set(x_484, 0, x_31);
lean_ctor_set(x_484, 1, x_483);
return x_484;
}
}
}
}
}
}
}
else
{
lean_object* x_485; size_t x_486; lean_object* x_487; size_t x_488; lean_object* x_489; lean_object* x_490; size_t x_491; lean_object* x_492; lean_object* x_493; size_t x_494; lean_object* x_495; lean_object* x_496; uint8_t x_497;
x_485 = lean_ctor_get(x_31, 1);
x_486 = lean_ctor_get_usize(x_31, 2);
lean_inc(x_485);
lean_dec(x_31);
x_487 = lean_ctor_get(x_32, 1);
lean_inc(x_487);
x_488 = lean_ctor_get_usize(x_32, 2);
if (lean_is_exclusive(x_32)) {
lean_ctor_release(x_32, 0);
lean_ctor_release(x_32, 1);
x_489 = x_32;
} else {
lean_dec_ref(x_32);
x_489 = lean_box(0);
}
x_490 = lean_ctor_get(x_33, 1);
lean_inc(x_490);
x_491 = lean_ctor_get_usize(x_33, 2);
if (lean_is_exclusive(x_33)) {
lean_ctor_release(x_33, 0);
lean_ctor_release(x_33, 1);
x_492 = x_33;
} else {
lean_dec_ref(x_33);
x_492 = lean_box(0);
}
x_493 = lean_ctor_get(x_34, 1);
lean_inc(x_493);
x_494 = lean_ctor_get_usize(x_34, 2);
if (lean_is_exclusive(x_34)) {
lean_ctor_release(x_34, 0);
lean_ctor_release(x_34, 1);
x_495 = x_34;
} else {
lean_dec_ref(x_34);
x_495 = lean_box(0);
}
x_496 = l_Lean_mkAppStx___closed__1;
x_497 = lean_string_dec_eq(x_493, x_496);
lean_dec(x_493);
if (x_497 == 0)
{
lean_object* x_498;
lean_dec(x_495);
lean_dec(x_492);
lean_dec(x_490);
lean_dec(x_489);
lean_dec(x_487);
lean_dec(x_485);
lean_dec(x_36);
x_498 = lean_box(0);
x_3 = x_498;
goto block_30;
}
else
{
lean_object* x_499; lean_object* x_500; uint8_t x_501;
if (lean_is_exclusive(x_2)) {
lean_ctor_release(x_2, 0);
lean_ctor_release(x_2, 1);
x_499 = x_2;
} else {
lean_dec_ref(x_2);
x_499 = lean_box(0);
}
x_500 = l_Lean_mkAppStx___closed__3;
x_501 = lean_string_dec_eq(x_490, x_500);
if (x_501 == 0)
{
lean_object* x_502; lean_object* x_503; lean_object* x_504; lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; lean_object* x_509;
if (lean_is_scalar(x_495)) {
x_502 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_502 = x_495;
}
lean_ctor_set(x_502, 0, x_35);
lean_ctor_set(x_502, 1, x_496);
lean_ctor_set_usize(x_502, 2, x_494);
if (lean_is_scalar(x_492)) {
x_503 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_503 = x_492;
}
lean_ctor_set(x_503, 0, x_502);
lean_ctor_set(x_503, 1, x_490);
lean_ctor_set_usize(x_503, 2, x_491);
if (lean_is_scalar(x_489)) {
x_504 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_504 = x_489;
}
lean_ctor_set(x_504, 0, x_503);
lean_ctor_set(x_504, 1, x_487);
lean_ctor_set_usize(x_504, 2, x_488);
x_505 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_505, 0, x_504);
lean_ctor_set(x_505, 1, x_485);
lean_ctor_set_usize(x_505, 2, x_486);
lean_inc(x_36);
lean_inc(x_505);
if (lean_is_scalar(x_499)) {
x_506 = lean_alloc_ctor(1, 2, 0);
} else {
x_506 = x_499;
}
lean_ctor_set(x_506, 0, x_505);
lean_ctor_set(x_506, 1, x_36);
x_507 = l_Lean_Syntax_getArgs(x_506);
lean_dec(x_506);
x_508 = lean_unsigned_to_nat(0u);
x_509 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_507, x_508);
lean_dec(x_507);
if (lean_obj_tag(x_509) == 0)
{
lean_object* x_510;
lean_dec(x_1);
x_510 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_510, 0, x_505);
lean_ctor_set(x_510, 1, x_36);
return x_510;
}
else
{
lean_object* x_511; lean_object* x_512; lean_object* x_513; uint8_t x_514;
x_511 = lean_ctor_get(x_509, 0);
lean_inc(x_511);
lean_dec(x_509);
x_512 = l_Lean_Delaborator_infoForPos(x_1);
x_513 = lean_array_get_size(x_36);
x_514 = lean_nat_dec_lt(x_511, x_513);
lean_dec(x_513);
if (x_514 == 0)
{
lean_object* x_515;
lean_dec(x_512);
lean_dec(x_511);
x_515 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_515, 0, x_505);
lean_ctor_set(x_515, 1, x_36);
return x_515;
}
else
{
lean_object* x_516; lean_object* x_517; lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521;
x_516 = lean_array_fget(x_36, x_511);
x_517 = lean_box(0);
x_518 = lean_array_fset(x_36, x_511, x_517);
x_519 = l_Lean_Syntax_setInfo(x_512, x_516);
x_520 = lean_array_fset(x_518, x_511, x_519);
lean_dec(x_511);
x_521 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_521, 0, x_505);
lean_ctor_set(x_521, 1, x_520);
return x_521;
}
}
}
else
{
lean_object* x_522; uint8_t x_523;
lean_dec(x_490);
x_522 = l_Lean_mkAppStx___closed__5;
x_523 = lean_string_dec_eq(x_487, x_522);
if (x_523 == 0)
{
lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531;
if (lean_is_scalar(x_495)) {
x_524 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_524 = x_495;
}
lean_ctor_set(x_524, 0, x_35);
lean_ctor_set(x_524, 1, x_496);
lean_ctor_set_usize(x_524, 2, x_494);
if (lean_is_scalar(x_492)) {
x_525 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_525 = x_492;
}
lean_ctor_set(x_525, 0, x_524);
lean_ctor_set(x_525, 1, x_500);
lean_ctor_set_usize(x_525, 2, x_491);
if (lean_is_scalar(x_489)) {
x_526 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_526 = x_489;
}
lean_ctor_set(x_526, 0, x_525);
lean_ctor_set(x_526, 1, x_487);
lean_ctor_set_usize(x_526, 2, x_488);
x_527 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_527, 0, x_526);
lean_ctor_set(x_527, 1, x_485);
lean_ctor_set_usize(x_527, 2, x_486);
lean_inc(x_36);
lean_inc(x_527);
if (lean_is_scalar(x_499)) {
x_528 = lean_alloc_ctor(1, 2, 0);
} else {
x_528 = x_499;
}
lean_ctor_set(x_528, 0, x_527);
lean_ctor_set(x_528, 1, x_36);
x_529 = l_Lean_Syntax_getArgs(x_528);
lean_dec(x_528);
x_530 = lean_unsigned_to_nat(0u);
x_531 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_529, x_530);
lean_dec(x_529);
if (lean_obj_tag(x_531) == 0)
{
lean_object* x_532;
lean_dec(x_1);
x_532 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_532, 0, x_527);
lean_ctor_set(x_532, 1, x_36);
return x_532;
}
else
{
lean_object* x_533; lean_object* x_534; lean_object* x_535; uint8_t x_536;
x_533 = lean_ctor_get(x_531, 0);
lean_inc(x_533);
lean_dec(x_531);
x_534 = l_Lean_Delaborator_infoForPos(x_1);
x_535 = lean_array_get_size(x_36);
x_536 = lean_nat_dec_lt(x_533, x_535);
lean_dec(x_535);
if (x_536 == 0)
{
lean_object* x_537;
lean_dec(x_534);
lean_dec(x_533);
x_537 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_537, 0, x_527);
lean_ctor_set(x_537, 1, x_36);
return x_537;
}
else
{
lean_object* x_538; lean_object* x_539; lean_object* x_540; lean_object* x_541; lean_object* x_542; lean_object* x_543;
x_538 = lean_array_fget(x_36, x_533);
x_539 = lean_box(0);
x_540 = lean_array_fset(x_36, x_533, x_539);
x_541 = l_Lean_Syntax_setInfo(x_534, x_538);
x_542 = lean_array_fset(x_540, x_533, x_541);
lean_dec(x_533);
x_543 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_543, 0, x_527);
lean_ctor_set(x_543, 1, x_542);
return x_543;
}
}
}
else
{
lean_object* x_544; uint8_t x_545;
lean_dec(x_487);
x_544 = l_Lean_mkTermIdFromIdent___closed__1;
x_545 = lean_string_dec_eq(x_485, x_544);
if (x_545 == 0)
{
lean_object* x_546; uint8_t x_547;
x_546 = l_Lean_mkAppStx___closed__7;
x_547 = lean_string_dec_eq(x_485, x_546);
if (x_547 == 0)
{
lean_object* x_548; lean_object* x_549; lean_object* x_550; lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555;
if (lean_is_scalar(x_495)) {
x_548 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_548 = x_495;
}
lean_ctor_set(x_548, 0, x_35);
lean_ctor_set(x_548, 1, x_496);
lean_ctor_set_usize(x_548, 2, x_494);
if (lean_is_scalar(x_492)) {
x_549 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_549 = x_492;
}
lean_ctor_set(x_549, 0, x_548);
lean_ctor_set(x_549, 1, x_500);
lean_ctor_set_usize(x_549, 2, x_491);
if (lean_is_scalar(x_489)) {
x_550 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_550 = x_489;
}
lean_ctor_set(x_550, 0, x_549);
lean_ctor_set(x_550, 1, x_522);
lean_ctor_set_usize(x_550, 2, x_488);
x_551 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_551, 0, x_550);
lean_ctor_set(x_551, 1, x_485);
lean_ctor_set_usize(x_551, 2, x_486);
lean_inc(x_36);
lean_inc(x_551);
if (lean_is_scalar(x_499)) {
x_552 = lean_alloc_ctor(1, 2, 0);
} else {
x_552 = x_499;
}
lean_ctor_set(x_552, 0, x_551);
lean_ctor_set(x_552, 1, x_36);
x_553 = l_Lean_Syntax_getArgs(x_552);
lean_dec(x_552);
x_554 = lean_unsigned_to_nat(0u);
x_555 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_553, x_554);
lean_dec(x_553);
if (lean_obj_tag(x_555) == 0)
{
lean_object* x_556;
lean_dec(x_1);
x_556 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_556, 0, x_551);
lean_ctor_set(x_556, 1, x_36);
return x_556;
}
else
{
lean_object* x_557; lean_object* x_558; lean_object* x_559; uint8_t x_560;
x_557 = lean_ctor_get(x_555, 0);
lean_inc(x_557);
lean_dec(x_555);
x_558 = l_Lean_Delaborator_infoForPos(x_1);
x_559 = lean_array_get_size(x_36);
x_560 = lean_nat_dec_lt(x_557, x_559);
lean_dec(x_559);
if (x_560 == 0)
{
lean_object* x_561;
lean_dec(x_558);
lean_dec(x_557);
x_561 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_561, 0, x_551);
lean_ctor_set(x_561, 1, x_36);
return x_561;
}
else
{
lean_object* x_562; lean_object* x_563; lean_object* x_564; lean_object* x_565; lean_object* x_566; lean_object* x_567;
x_562 = lean_array_fget(x_36, x_557);
x_563 = lean_box(0);
x_564 = lean_array_fset(x_36, x_557, x_563);
x_565 = l_Lean_Syntax_setInfo(x_558, x_562);
x_566 = lean_array_fset(x_564, x_557, x_565);
lean_dec(x_557);
x_567 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_567, 0, x_551);
lean_ctor_set(x_567, 1, x_566);
return x_567;
}
}
}
else
{
lean_object* x_568; lean_object* x_569; lean_object* x_570; lean_object* x_571; lean_object* x_572; lean_object* x_573; uint8_t x_574;
lean_dec(x_485);
if (lean_is_scalar(x_495)) {
x_568 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_568 = x_495;
}
lean_ctor_set(x_568, 0, x_35);
lean_ctor_set(x_568, 1, x_496);
lean_ctor_set_usize(x_568, 2, x_494);
if (lean_is_scalar(x_492)) {
x_569 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_569 = x_492;
}
lean_ctor_set(x_569, 0, x_568);
lean_ctor_set(x_569, 1, x_500);
lean_ctor_set_usize(x_569, 2, x_491);
if (lean_is_scalar(x_489)) {
x_570 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_570 = x_489;
}
lean_ctor_set(x_570, 0, x_569);
lean_ctor_set(x_570, 1, x_522);
lean_ctor_set_usize(x_570, 2, x_488);
x_571 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_571, 0, x_570);
lean_ctor_set(x_571, 1, x_546);
lean_ctor_set_usize(x_571, 2, x_486);
x_572 = lean_array_get_size(x_36);
x_573 = lean_unsigned_to_nat(0u);
x_574 = lean_nat_dec_lt(x_573, x_572);
lean_dec(x_572);
if (x_574 == 0)
{
lean_object* x_575;
lean_dec(x_1);
if (lean_is_scalar(x_499)) {
x_575 = lean_alloc_ctor(1, 2, 0);
} else {
x_575 = x_499;
}
lean_ctor_set(x_575, 0, x_571);
lean_ctor_set(x_575, 1, x_36);
return x_575;
}
else
{
lean_object* x_576; lean_object* x_577; lean_object* x_578; lean_object* x_579; lean_object* x_580; lean_object* x_581;
x_576 = lean_array_fget(x_36, x_573);
x_577 = lean_box(0);
x_578 = lean_array_fset(x_36, x_573, x_577);
x_579 = l_Lean_Delaborator_annotatePos___main(x_1, x_576);
x_580 = lean_array_fset(x_578, x_573, x_579);
if (lean_is_scalar(x_499)) {
x_581 = lean_alloc_ctor(1, 2, 0);
} else {
x_581 = x_499;
}
lean_ctor_set(x_581, 0, x_571);
lean_ctor_set(x_581, 1, x_580);
return x_581;
}
}
}
else
{
lean_object* x_582; lean_object* x_583; lean_object* x_584; lean_object* x_585; lean_object* x_586; lean_object* x_587; uint8_t x_588;
lean_dec(x_485);
if (lean_is_scalar(x_495)) {
x_582 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_582 = x_495;
}
lean_ctor_set(x_582, 0, x_35);
lean_ctor_set(x_582, 1, x_496);
lean_ctor_set_usize(x_582, 2, x_494);
if (lean_is_scalar(x_492)) {
x_583 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_583 = x_492;
}
lean_ctor_set(x_583, 0, x_582);
lean_ctor_set(x_583, 1, x_500);
lean_ctor_set_usize(x_583, 2, x_491);
if (lean_is_scalar(x_489)) {
x_584 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
} else {
x_584 = x_489;
}
lean_ctor_set(x_584, 0, x_583);
lean_ctor_set(x_584, 1, x_522);
lean_ctor_set_usize(x_584, 2, x_488);
x_585 = lean_alloc_ctor(1, 2, sizeof(size_t)*1);
lean_ctor_set(x_585, 0, x_584);
lean_ctor_set(x_585, 1, x_544);
lean_ctor_set_usize(x_585, 2, x_486);
x_586 = lean_array_get_size(x_36);
x_587 = lean_unsigned_to_nat(0u);
x_588 = lean_nat_dec_lt(x_587, x_586);
lean_dec(x_586);
if (x_588 == 0)
{
lean_object* x_589;
lean_dec(x_1);
if (lean_is_scalar(x_499)) {
x_589 = lean_alloc_ctor(1, 2, 0);
} else {
x_589 = x_499;
}
lean_ctor_set(x_589, 0, x_585);
lean_ctor_set(x_589, 1, x_36);
return x_589;
}
else
{
lean_object* x_590; lean_object* x_591; lean_object* x_592; lean_object* x_593; lean_object* x_594; lean_object* x_595;
x_590 = lean_array_fget(x_36, x_587);
x_591 = lean_box(0);
x_592 = lean_array_fset(x_36, x_587, x_591);
x_593 = l_Lean_Delaborator_annotatePos___main(x_1, x_590);
x_594 = lean_array_fset(x_592, x_587, x_593);
if (lean_is_scalar(x_499)) {
x_595 = lean_alloc_ctor(1, 2, 0);
} else {
x_595 = x_499;
}
lean_ctor_set(x_595, 0, x_585);
lean_ctor_set(x_595, 1, x_594);
return x_595;
}
}
}
}
}
}
}
else
{
lean_object* x_596;
lean_dec(x_35);
lean_dec(x_34);
lean_dec(x_33);
lean_dec(x_32);
lean_dec(x_31);
x_596 = lean_box(0);
x_3 = x_596;
goto block_30;
}
}
else
{
lean_object* x_597;
lean_dec(x_34);
lean_dec(x_33);
lean_dec(x_32);
lean_dec(x_31);
x_597 = lean_box(0);
x_3 = x_597;
goto block_30;
}
}
else
{
lean_object* x_598;
lean_dec(x_33);
lean_dec(x_32);
lean_dec(x_31);
x_598 = lean_box(0);
x_3 = x_598;
goto block_30;
}
}
else
{
lean_object* x_599;
lean_dec(x_32);
lean_dec(x_31);
x_599 = lean_box(0);
x_3 = x_599;
goto block_30;
}
}
else
{
lean_object* x_600;
lean_dec(x_31);
x_600 = lean_box(0);
x_3 = x_600;
goto block_30;
}
}
case 3:
{
lean_object* x_601; lean_object* x_602;
x_601 = l_Lean_Delaborator_infoForPos(x_1);
x_602 = l_Lean_Syntax_setInfo(x_601, x_2);
return x_602;
}
default:
{
lean_object* x_603;
x_603 = lean_box(0);
x_3 = x_603;
goto block_30;
}
}
block_30:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6;
lean_dec(x_3);
x_4 = l_Lean_Syntax_getArgs(x_2);
x_5 = lean_unsigned_to_nat(0u);
x_6 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_4, x_5);
lean_dec(x_4);
if (lean_obj_tag(x_6) == 0)
{
lean_dec(x_1);
return x_2;
}
else
{
if (lean_obj_tag(x_2) == 1)
{
lean_object* x_7; uint8_t x_8;
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec(x_6);
x_8 = !lean_is_exclusive(x_2);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12;
x_9 = lean_ctor_get(x_2, 1);
x_10 = l_Lean_Delaborator_infoForPos(x_1);
x_11 = lean_array_get_size(x_9);
x_12 = lean_nat_dec_lt(x_7, x_11);
lean_dec(x_11);
if (x_12 == 0)
{
lean_dec(x_10);
lean_dec(x_7);
return x_2;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17;
x_13 = lean_array_fget(x_9, x_7);
x_14 = lean_box(0);
x_15 = lean_array_fset(x_9, x_7, x_14);
x_16 = l_Lean_Syntax_setInfo(x_10, x_13);
x_17 = lean_array_fset(x_15, x_7, x_16);
lean_dec(x_7);
lean_ctor_set(x_2, 1, x_17);
return x_2;
}
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22;
x_18 = lean_ctor_get(x_2, 0);
x_19 = lean_ctor_get(x_2, 1);
lean_inc(x_19);
lean_inc(x_18);
lean_dec(x_2);
x_20 = l_Lean_Delaborator_infoForPos(x_1);
x_21 = lean_array_get_size(x_19);
x_22 = lean_nat_dec_lt(x_7, x_21);
lean_dec(x_21);
if (x_22 == 0)
{
lean_object* x_23;
lean_dec(x_20);
lean_dec(x_7);
x_23 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_23, 0, x_18);
lean_ctor_set(x_23, 1, x_19);
return x_23;
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
x_24 = lean_array_fget(x_19, x_7);
x_25 = lean_box(0);
x_26 = lean_array_fset(x_19, x_7, x_25);
x_27 = l_Lean_Syntax_setInfo(x_20, x_24);
x_28 = lean_array_fset(x_26, x_7, x_27);
lean_dec(x_7);
x_29 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_29, 0, x_18);
lean_ctor_set(x_29, 1, x_28);
return x_29;
}
}
}
else
{
lean_dec(x_6);
lean_dec(x_1);
return x_2;
}
}
}
}
}
lean_object* l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Array_findIdxAux___main___at_Lean_Delaborator_annotatePos___main___spec__1(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_Delaborator_annotatePos(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Delaborator_annotatePos___main(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_annotateCurPos(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
x_5 = lean_ctor_get(x_2, 1);
lean_inc(x_5);
lean_dec(x_2);
x_6 = l_Lean_Delaborator_annotatePos___main(x_5, x_1);
x_7 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_7, 0, x_6);
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_7);
lean_ctor_set(x_8, 1, x_4);
return x_8;
}
}
lean_object* l_Lean_Delaborator_annotateCurPos___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Delaborator_annotateCurPos(x_1, x_2, x_3, x_4);
lean_dec(x_3);
return x_5;
}
}
lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Delaborator_delabFor___main___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; uint8_t x_7;
x_6 = lean_array_get_size(x_1);
x_7 = lean_nat_dec_lt(x_4, x_6);
lean_dec(x_6);
if (x_7 == 0)
{
lean_object* x_8;
lean_dec(x_4);
x_8 = lean_box(0);
return x_8;
}
else
{
lean_object* x_9; uint8_t x_10;
x_9 = lean_array_fget(x_1, x_4);
x_10 = lean_name_eq(x_5, x_9);
lean_dec(x_9);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12;
x_11 = lean_unsigned_to_nat(1u);
x_12 = lean_nat_add(x_4, x_11);
lean_dec(x_4);
x_3 = lean_box(0);
x_4 = x_12;
goto _start;
}
else
{
lean_object* x_14; lean_object* x_15;
x_14 = lean_array_fget(x_2, x_4);
lean_dec(x_4);
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
}
}
}
lean_object* l_PersistentHashMap_findAux___main___at_Lean_Delaborator_delabFor___main___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_4; size_t x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
x_4 = lean_ctor_get(x_1, 0);
lean_inc(x_4);
lean_dec(x_1);
x_5 = 5;
x_6 = l_PersistentHashMap_insertAux___main___rarg___closed__2;
x_7 = x_2 & x_6;
x_8 = lean_usize_to_nat(x_7);
x_9 = lean_box(2);
x_10 = lean_array_get(x_9, x_4, x_8);
lean_dec(x_8);
lean_dec(x_4);
switch (lean_obj_tag(x_10)) {
case 0:
{
lean_object* x_11; lean_object* x_12; uint8_t x_13;
x_11 = lean_ctor_get(x_10, 0);
lean_inc(x_11);
x_12 = lean_ctor_get(x_10, 1);
lean_inc(x_12);
lean_dec(x_10);
x_13 = lean_name_eq(x_3, x_11);
lean_dec(x_11);
if (x_13 == 0)
{
lean_object* x_14;
lean_dec(x_12);
x_14 = lean_box(0);
return x_14;
}
else
{
lean_object* x_15;
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_12);
return x_15;
}
}
case 1:
{
lean_object* x_16; size_t x_17;
x_16 = lean_ctor_get(x_10, 0);
lean_inc(x_16);
lean_dec(x_10);
x_17 = x_2 >> x_5;
x_1 = x_16;
x_2 = x_17;
goto _start;
}
default:
{
lean_object* x_19;
x_19 = lean_box(0);
return x_19;
}
}
}
else
{
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
x_20 = lean_ctor_get(x_1, 0);
lean_inc(x_20);
x_21 = lean_ctor_get(x_1, 1);
lean_inc(x_21);
lean_dec(x_1);
x_22 = lean_unsigned_to_nat(0u);
x_23 = l_PersistentHashMap_findAtAux___main___at_Lean_Delaborator_delabFor___main___spec__4(x_20, x_21, lean_box(0), x_22, x_3);
lean_dec(x_21);
lean_dec(x_20);
return x_23;
}
}
}
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__2(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; size_t x_4; lean_object* x_5;
x_3 = lean_ctor_get(x_1, 0);
lean_inc(x_3);
lean_dec(x_1);
x_4 = l_Lean_Name_hash(x_2);
x_5 = l_PersistentHashMap_findAux___main___at_Lean_Delaborator_delabFor___main___spec__3(x_3, x_4, x_2);
return x_5;
}
}
lean_object* l_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3;
x_3 = lean_box(0);
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7;
x_4 = lean_ctor_get(x_2, 0);
x_5 = lean_ctor_get(x_2, 1);
x_6 = lean_ctor_get(x_2, 2);
x_7 = lean_name_eq(x_4, x_1);
if (x_7 == 0)
{
x_2 = x_6;
goto _start;
}
else
{
lean_object* x_9;
lean_inc(x_5);
x_9 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_9, 0, x_5);
return x_9;
}
}
}
}
lean_object* l_HashMapImp_find_x3f___at_Lean_Delaborator_delabFor___main___spec__5(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8;
x_3 = lean_ctor_get(x_1, 1);
x_4 = lean_array_get_size(x_3);
x_5 = l_Lean_Name_hash(x_2);
x_6 = lean_usize_modn(x_5, x_4);
lean_dec(x_4);
x_7 = lean_array_uget(x_3, x_6);
x_8 = l_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6(x_2, x_7);
lean_dec(x_7);
return x_8;
}
}
lean_object* l_Lean_SMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3;
x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*2);
if (x_3 == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_4 = lean_ctor_get(x_1, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_1, 1);
lean_inc(x_5);
lean_dec(x_1);
x_6 = l_PersistentHashMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__2(x_5, x_2);
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_7;
x_7 = l_HashMapImp_find_x3f___at_Lean_Delaborator_delabFor___main___spec__5(x_4, x_2);
lean_dec(x_4);
return x_7;
}
else
{
lean_dec(x_4);
return x_6;
}
}
else
{
lean_object* x_8; lean_object* x_9;
x_8 = lean_ctor_get(x_1, 0);
lean_inc(x_8);
lean_dec(x_1);
x_9 = l_HashMapImp_find_x3f___at_Lean_Delaborator_delabFor___main___spec__5(x_8, x_2);
lean_dec(x_8);
return x_9;
}
}
}
lean_object* l_List_firstM___main___at_Lean_Delaborator_delabFor___main___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_5; lean_object* x_6;
lean_dec(x_3);
lean_dec(x_2);
x_5 = lean_box(0);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_5);
lean_ctor_set(x_6, 1, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9;
x_7 = lean_ctor_get(x_1, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_1, 1);
lean_inc(x_8);
lean_dec(x_1);
lean_inc(x_3);
lean_inc(x_2);
x_9 = lean_apply_3(x_7, x_2, x_3, x_4);
if (lean_obj_tag(x_9) == 0)
{
lean_object* x_10;
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
if (lean_obj_tag(x_10) == 0)
{
lean_object* x_11;
x_11 = lean_ctor_get(x_9, 1);
lean_inc(x_11);
lean_dec(x_9);
x_1 = x_8;
x_4 = x_11;
goto _start;
}
else
{
uint8_t x_13;
lean_dec(x_8);
lean_dec(x_3);
lean_dec(x_2);
x_13 = !lean_is_exclusive(x_9);
if (x_13 == 0)
{
lean_object* x_14;
x_14 = lean_ctor_get(x_9, 0);
lean_dec(x_14);
return x_9;
}
else
{
lean_object* x_15; lean_object* x_16;
x_15 = lean_ctor_get(x_9, 1);
lean_inc(x_15);
lean_dec(x_9);
x_16 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_16, 0, x_10);
lean_ctor_set(x_16, 1, x_15);
return x_16;
}
}
}
else
{
uint8_t x_17;
lean_dec(x_8);
lean_dec(x_3);
lean_dec(x_2);
x_17 = !lean_is_exclusive(x_9);
if (x_17 == 0)
{
return x_9;
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20;
x_18 = lean_ctor_get(x_9, 0);
x_19 = lean_ctor_get(x_9, 1);
lean_inc(x_19);
lean_inc(x_18);
lean_dec(x_9);
x_20 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_20, 0, x_18);
lean_ctor_set(x_20, 1, x_19);
return x_20;
}
}
}
}
}
lean_object* l_Lean_Delaborator_delabFor___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = l_Lean_Delaborator_delabAttribute;
x_7 = lean_ctor_get(x_6, 1);
lean_inc(x_7);
x_8 = l_Lean_PersistentEnvExtension_getState___rarg(x_7, x_5);
lean_dec(x_5);
lean_dec(x_7);
x_9 = lean_ctor_get(x_8, 1);
lean_inc(x_9);
lean_dec(x_8);
x_10 = l_Lean_SMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__1(x_9, x_1);
if (lean_obj_tag(x_10) == 0)
{
lean_object* x_26;
x_26 = lean_box(0);
x_11 = x_26;
x_12 = x_4;
goto block_25;
}
else
{
lean_object* x_27; lean_object* x_28;
x_27 = lean_ctor_get(x_10, 0);
lean_inc(x_27);
lean_dec(x_10);
lean_inc(x_3);
lean_inc(x_2);
x_28 = l_List_firstM___main___at_Lean_Delaborator_delabFor___main___spec__7(x_27, x_2, x_3, x_4);
if (lean_obj_tag(x_28) == 0)
{
lean_object* x_29;
x_29 = lean_ctor_get(x_28, 0);
lean_inc(x_29);
if (lean_obj_tag(x_29) == 0)
{
lean_object* x_30; lean_object* x_31;
x_30 = lean_ctor_get(x_28, 1);
lean_inc(x_30);
lean_dec(x_28);
x_31 = lean_box(0);
x_11 = x_31;
x_12 = x_30;
goto block_25;
}
else
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36;
x_32 = lean_ctor_get(x_28, 1);
lean_inc(x_32);
lean_dec(x_28);
x_33 = lean_ctor_get(x_29, 0);
lean_inc(x_33);
lean_dec(x_29);
lean_inc(x_2);
x_34 = l_Lean_Delaborator_annotateCurPos(x_33, x_2, x_3, x_32);
x_35 = lean_ctor_get(x_34, 0);
lean_inc(x_35);
x_36 = lean_ctor_get(x_34, 1);
lean_inc(x_36);
lean_dec(x_34);
x_11 = x_35;
x_12 = x_36;
goto block_25;
}
}
else
{
uint8_t x_37;
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_37 = !lean_is_exclusive(x_28);
if (x_37 == 0)
{
return x_28;
}
else
{
lean_object* x_38; lean_object* x_39; lean_object* x_40;
x_38 = lean_ctor_get(x_28, 0);
x_39 = lean_ctor_get(x_28, 1);
lean_inc(x_39);
lean_inc(x_38);
lean_dec(x_28);
x_40 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_40, 0, x_38);
lean_ctor_set(x_40, 1, x_39);
return x_40;
}
}
}
block_25:
{
if (lean_obj_tag(x_11) == 0)
{
if (lean_obj_tag(x_1) == 1)
{
lean_object* x_13;
x_13 = lean_ctor_get(x_1, 0);
lean_inc(x_13);
lean_dec(x_1);
if (lean_obj_tag(x_13) == 0)
{
lean_object* x_14; lean_object* x_15;
lean_dec(x_3);
lean_dec(x_2);
x_14 = lean_box(0);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_14);
lean_ctor_set(x_15, 1, x_12);
return x_15;
}
else
{
lean_object* x_16;
x_16 = l_Lean_Name_getRoot___main(x_13);
lean_dec(x_13);
x_1 = x_16;
x_4 = x_12;
goto _start;
}
}
else
{
lean_object* x_18; lean_object* x_19;
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_18 = lean_box(0);
x_19 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set(x_19, 1, x_12);
return x_19;
}
}
else
{
uint8_t x_20;
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_20 = !lean_is_exclusive(x_11);
if (x_20 == 0)
{
lean_object* x_21;
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_11);
lean_ctor_set(x_21, 1, x_12);
return x_21;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24;
x_22 = lean_ctor_get(x_11, 0);
lean_inc(x_22);
lean_dec(x_11);
x_23 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_23, 0, x_22);
x_24 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_12);
return x_24;
}
}
}
}
}
lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Delaborator_delabFor___main___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6;
x_6 = l_PersistentHashMap_findAtAux___main___at_Lean_Delaborator_delabFor___main___spec__4(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_5);
lean_dec(x_2);
lean_dec(x_1);
return x_6;
}
}
lean_object* l_PersistentHashMap_findAux___main___at_Lean_Delaborator_delabFor___main___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; lean_object* x_5;
x_4 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_5 = l_PersistentHashMap_findAux___main___at_Lean_Delaborator_delabFor___main___spec__3(x_1, x_4, x_3);
lean_dec(x_3);
return x_5;
}
}
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__2___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_PersistentHashMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__2(x_1, x_2);
lean_dec(x_2);
return x_3;
}
}
lean_object* l_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_HashMapImp_find_x3f___at_Lean_Delaborator_delabFor___main___spec__5___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_HashMapImp_find_x3f___at_Lean_Delaborator_delabFor___main___spec__5(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_SMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_SMap_find_x3f___at_Lean_Delaborator_delabFor___main___spec__1(x_1, x_2);
lean_dec(x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_delabFor(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Delaborator_delabFor___main(x_1, x_2, x_3, x_4);
return x_5;
}
}
lean_object* _init_l_Lean_Delaborator_delab___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("don't know how to delaborate '");
return x_1;
}
}
lean_object* l_Lean_Delaborator_delab(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
x_4 = l_Lean_Delaborator_getExprKind(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_4, 1);
lean_inc(x_6);
lean_dec(x_4);
x_7 = lean_ctor_get(x_5, 0);
lean_inc(x_7);
lean_dec(x_5);
x_8 = l_Lean_Name_toString___closed__1;
lean_inc(x_7);
x_9 = l_Lean_Name_toStringWithSep___main(x_8, x_7);
x_10 = l_Lean_Delaborator_delab___closed__1;
x_11 = lean_string_append(x_10, x_9);
lean_dec(x_9);
x_12 = l_Char_HasRepr___closed__1;
x_13 = lean_string_append(x_11, x_12);
x_14 = lean_alloc_ctor(21, 1, 0);
lean_ctor_set(x_14, 0, x_13);
x_15 = l_Lean_Delaborator_delabFor___main(x_7, x_1, x_2, x_6);
if (lean_obj_tag(x_15) == 0)
{
lean_object* x_16;
x_16 = lean_ctor_get(x_15, 0);
lean_inc(x_16);
if (lean_obj_tag(x_16) == 0)
{
uint8_t x_17;
x_17 = !lean_is_exclusive(x_15);
if (x_17 == 0)
{
lean_object* x_18;
x_18 = lean_ctor_get(x_15, 0);
lean_dec(x_18);
lean_ctor_set_tag(x_15, 1);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
else
{
lean_object* x_19; lean_object* x_20;
x_19 = lean_ctor_get(x_15, 1);
lean_inc(x_19);
lean_dec(x_15);
x_20 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_20, 0, x_14);
lean_ctor_set(x_20, 1, x_19);
return x_20;
}
}
else
{
uint8_t x_21;
lean_dec(x_14);
x_21 = !lean_is_exclusive(x_15);
if (x_21 == 0)
{
lean_object* x_22; uint8_t x_23;
x_22 = lean_ctor_get(x_15, 0);
lean_dec(x_22);
x_23 = !lean_is_exclusive(x_16);
if (x_23 == 0)
{
return x_15;
}
else
{
lean_object* x_24; lean_object* x_25;
x_24 = lean_ctor_get(x_16, 0);
lean_inc(x_24);
lean_dec(x_16);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
lean_ctor_set(x_15, 0, x_25);
return x_15;
}
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
x_26 = lean_ctor_get(x_15, 1);
lean_inc(x_26);
lean_dec(x_15);
x_27 = lean_ctor_get(x_16, 0);
lean_inc(x_27);
if (lean_is_exclusive(x_16)) {
lean_ctor_release(x_16, 0);
x_28 = x_16;
} else {
lean_dec_ref(x_16);
x_28 = lean_box(0);
}
if (lean_is_scalar(x_28)) {
x_29 = lean_alloc_ctor(1, 1, 0);
} else {
x_29 = x_28;
}
lean_ctor_set(x_29, 0, x_27);
x_30 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_30, 0, x_29);
lean_ctor_set(x_30, 1, x_26);
return x_30;
}
}
}
else
{
uint8_t x_31;
lean_dec(x_14);
x_31 = !lean_is_exclusive(x_15);
if (x_31 == 0)
{
return x_15;
}
else
{
lean_object* x_32; lean_object* x_33; lean_object* x_34;
x_32 = lean_ctor_get(x_15, 0);
x_33 = lean_ctor_get(x_15, 1);
lean_inc(x_33);
lean_inc(x_32);
lean_dec(x_15);
x_34 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_34, 0, x_32);
lean_ctor_set(x_34, 1, x_33);
return x_34;
}
}
}
}
lean_object* l_Lean_Delaborator_delabFVar(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; uint8_t x_6;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_5, 0);
if (lean_obj_tag(x_7) == 1)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10;
lean_dec(x_1);
x_8 = lean_ctor_get(x_4, 1);
lean_inc(x_8);
lean_dec(x_4);
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
lean_dec(x_7);
x_10 = l_Lean_Meta_getLocalDecl(x_9, x_2, x_8);
if (lean_obj_tag(x_10) == 0)
{
uint8_t x_11;
x_11 = !lean_is_exclusive(x_10);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
x_12 = lean_ctor_get(x_10, 0);
x_13 = l_Lean_LocalDecl_userName(x_12);
lean_dec(x_12);
x_14 = lean_box(0);
x_15 = l_Lean_mkTermIdFrom(x_14, x_13);
lean_ctor_set(x_5, 0, x_15);
lean_ctor_set(x_10, 0, x_5);
return x_10;
}
else
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21;
x_16 = lean_ctor_get(x_10, 0);
x_17 = lean_ctor_get(x_10, 1);
lean_inc(x_17);
lean_inc(x_16);
lean_dec(x_10);
x_18 = l_Lean_LocalDecl_userName(x_16);
lean_dec(x_16);
x_19 = lean_box(0);
x_20 = l_Lean_mkTermIdFrom(x_19, x_18);
lean_ctor_set(x_5, 0, x_20);
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_5);
lean_ctor_set(x_21, 1, x_17);
return x_21;
}
}
else
{
uint8_t x_22;
lean_free_object(x_5);
x_22 = !lean_is_exclusive(x_10);
if (x_22 == 0)
{
return x_10;
}
else
{
lean_object* x_23; lean_object* x_24; lean_object* x_25;
x_23 = lean_ctor_get(x_10, 0);
x_24 = lean_ctor_get(x_10, 1);
lean_inc(x_24);
lean_inc(x_23);
lean_dec(x_10);
x_25 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_25, 0, x_23);
lean_ctor_set(x_25, 1, x_24);
return x_25;
}
}
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
lean_free_object(x_5);
lean_dec(x_7);
x_26 = lean_ctor_get(x_4, 1);
lean_inc(x_26);
lean_dec(x_4);
x_27 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_28 = l_unreachable_x21___rarg(x_27);
x_29 = lean_apply_3(x_28, x_1, x_2, x_26);
return x_29;
}
}
else
{
lean_object* x_30;
x_30 = lean_ctor_get(x_5, 0);
lean_inc(x_30);
lean_dec(x_5);
if (lean_obj_tag(x_30) == 1)
{
lean_object* x_31; lean_object* x_32; lean_object* x_33;
lean_dec(x_1);
x_31 = lean_ctor_get(x_4, 1);
lean_inc(x_31);
lean_dec(x_4);
x_32 = lean_ctor_get(x_30, 0);
lean_inc(x_32);
lean_dec(x_30);
x_33 = l_Lean_Meta_getLocalDecl(x_32, x_2, x_31);
if (lean_obj_tag(x_33) == 0)
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
x_34 = lean_ctor_get(x_33, 0);
lean_inc(x_34);
x_35 = lean_ctor_get(x_33, 1);
lean_inc(x_35);
if (lean_is_exclusive(x_33)) {
lean_ctor_release(x_33, 0);
lean_ctor_release(x_33, 1);
x_36 = x_33;
} else {
lean_dec_ref(x_33);
x_36 = lean_box(0);
}
x_37 = l_Lean_LocalDecl_userName(x_34);
lean_dec(x_34);
x_38 = lean_box(0);
x_39 = l_Lean_mkTermIdFrom(x_38, x_37);
x_40 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_40, 0, x_39);
if (lean_is_scalar(x_36)) {
x_41 = lean_alloc_ctor(0, 2, 0);
} else {
x_41 = x_36;
}
lean_ctor_set(x_41, 0, x_40);
lean_ctor_set(x_41, 1, x_35);
return x_41;
}
else
{
lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45;
x_42 = lean_ctor_get(x_33, 0);
lean_inc(x_42);
x_43 = lean_ctor_get(x_33, 1);
lean_inc(x_43);
if (lean_is_exclusive(x_33)) {
lean_ctor_release(x_33, 0);
lean_ctor_release(x_33, 1);
x_44 = x_33;
} else {
lean_dec_ref(x_33);
x_44 = lean_box(0);
}
if (lean_is_scalar(x_44)) {
x_45 = lean_alloc_ctor(1, 2, 0);
} else {
x_45 = x_44;
}
lean_ctor_set(x_45, 0, x_42);
lean_ctor_set(x_45, 1, x_43);
return x_45;
}
}
else
{
lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49;
lean_dec(x_30);
x_46 = lean_ctor_get(x_4, 1);
lean_inc(x_46);
lean_dec(x_4);
x_47 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_48 = l_unreachable_x21___rarg(x_47);
x_49 = lean_apply_3(x_48, x_1, x_2, x_46);
return x_49;
}
}
}
}
lean_object* _init_l___regBuiltin_Lean_Delaborator_delabFVar___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabFVar), 3, 0);
return x_1;
}
}
lean_object* l___regBuiltin_Lean_Delaborator_delabFVar(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Delaborator_delabAttribute;
x_3 = l_Lean_Delaborator_getExprKind___closed__5;
x_4 = l___regBuiltin_Lean_Delaborator_delabFVar___closed__1;
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* _init_l_Lean_Delaborator_delabMVar___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_FirstTokens_toStr___closed__3;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabMVar___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabMVar___closed__1;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_delabMVar(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; uint8_t x_6;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_5, 0);
if (lean_obj_tag(x_7) == 2)
{
uint8_t x_8;
lean_dec(x_2);
lean_dec(x_1);
x_8 = !lean_is_exclusive(x_4);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
x_9 = lean_ctor_get(x_4, 0);
lean_dec(x_9);
x_10 = lean_ctor_get(x_7, 0);
lean_inc(x_10);
lean_dec(x_7);
x_11 = lean_mk_syntax_ident(x_10);
x_12 = l_Lean_Delaborator_delabMVar___closed__2;
x_13 = lean_array_push(x_12, x_11);
x_14 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
x_15 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_15, 0, x_14);
lean_ctor_set(x_15, 1, x_13);
lean_ctor_set(x_5, 0, x_15);
return x_4;
}
else
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
x_16 = lean_ctor_get(x_4, 1);
lean_inc(x_16);
lean_dec(x_4);
x_17 = lean_ctor_get(x_7, 0);
lean_inc(x_17);
lean_dec(x_7);
x_18 = lean_mk_syntax_ident(x_17);
x_19 = l_Lean_Delaborator_delabMVar___closed__2;
x_20 = lean_array_push(x_19, x_18);
x_21 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
x_22 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_22, 0, x_21);
lean_ctor_set(x_22, 1, x_20);
lean_ctor_set(x_5, 0, x_22);
x_23 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_23, 0, x_5);
lean_ctor_set(x_23, 1, x_16);
return x_23;
}
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
lean_free_object(x_5);
lean_dec(x_7);
x_24 = lean_ctor_get(x_4, 1);
lean_inc(x_24);
lean_dec(x_4);
x_25 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_26 = l_unreachable_x21___rarg(x_25);
x_27 = lean_apply_3(x_26, x_1, x_2, x_24);
return x_27;
}
}
else
{
lean_object* x_28;
x_28 = lean_ctor_get(x_5, 0);
lean_inc(x_28);
lean_dec(x_5);
if (lean_obj_tag(x_28) == 2)
{
lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38;
lean_dec(x_2);
lean_dec(x_1);
x_29 = lean_ctor_get(x_4, 1);
lean_inc(x_29);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_30 = x_4;
} else {
lean_dec_ref(x_4);
x_30 = lean_box(0);
}
x_31 = lean_ctor_get(x_28, 0);
lean_inc(x_31);
lean_dec(x_28);
x_32 = lean_mk_syntax_ident(x_31);
x_33 = l_Lean_Delaborator_delabMVar___closed__2;
x_34 = lean_array_push(x_33, x_32);
x_35 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
x_36 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_36, 0, x_35);
lean_ctor_set(x_36, 1, x_34);
x_37 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_37, 0, x_36);
if (lean_is_scalar(x_30)) {
x_38 = lean_alloc_ctor(0, 2, 0);
} else {
x_38 = x_30;
}
lean_ctor_set(x_38, 0, x_37);
lean_ctor_set(x_38, 1, x_29);
return x_38;
}
else
{
lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42;
lean_dec(x_28);
x_39 = lean_ctor_get(x_4, 1);
lean_inc(x_39);
lean_dec(x_4);
x_40 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_41 = l_unreachable_x21___rarg(x_40);
x_42 = lean_apply_3(x_41, x_1, x_2, x_39);
return x_42;
}
}
}
}
lean_object* _init_l___regBuiltin_Lean_Delaborator_delabMVar___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabMVar), 3, 0);
return x_1;
}
}
lean_object* l___regBuiltin_Lean_Delaborator_delabMVar(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Delaborator_delabAttribute;
x_3 = l_Lean_Delaborator_getExprKind___closed__8;
x_4 = l___regBuiltin_Lean_Delaborator_delabMVar___closed__1;
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_Term_sort___elambda__1___closed__5;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabSort___closed__1;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Parser_Term_sort___elambda__1___closed__2;
x_2 = l_Lean_Delaborator_delabSort___closed__2;
x_3 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabSort___closed__3;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_Term_prop___elambda__1___closed__5;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabSort___closed__5;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Parser_Term_prop___elambda__1___closed__2;
x_2 = l_Lean_Delaborator_delabSort___closed__6;
x_3 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_delabSort___closed__7;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_Term_type___elambda__1___closed__5;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabSort___closed__9;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Parser_Term_type___elambda__1___closed__2;
x_2 = l_Lean_Delaborator_delabSort___closed__10;
x_3 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__12() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Delaborator_delabSort___closed__11;
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l_Lean_Delaborator_delabSort___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabSort___closed__11;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_delabSort(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
if (lean_is_exclusive(x_5)) {
lean_ctor_release(x_5, 0);
x_7 = x_5;
} else {
lean_dec_ref(x_5);
x_7 = lean_box(0);
}
if (lean_obj_tag(x_6) == 3)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
lean_dec(x_2);
lean_dec(x_1);
x_8 = lean_ctor_get(x_4, 1);
lean_inc(x_8);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_9 = x_4;
} else {
lean_dec_ref(x_4);
x_9 = lean_box(0);
}
x_10 = lean_ctor_get(x_6, 0);
lean_inc(x_10);
lean_dec(x_6);
switch (lean_obj_tag(x_10)) {
case 0:
{
lean_object* x_20; lean_object* x_21;
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_7);
x_20 = l_Lean_Delaborator_delabSort___closed__8;
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set(x_21, 1, x_8);
return x_21;
}
case 1:
{
lean_object* x_22;
x_22 = lean_ctor_get(x_10, 0);
lean_inc(x_22);
if (lean_obj_tag(x_22) == 0)
{
lean_object* x_23; lean_object* x_24;
lean_dec(x_22);
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_7);
x_23 = l_Lean_Delaborator_delabSort___closed__12;
x_24 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_8);
return x_24;
}
else
{
lean_object* x_25;
lean_dec(x_22);
x_25 = l_Lean_Level_dec___main(x_10);
if (lean_obj_tag(x_25) == 0)
{
lean_object* x_26;
x_26 = lean_box(0);
x_11 = x_26;
goto block_19;
}
else
{
uint8_t x_27;
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_7);
x_27 = !lean_is_exclusive(x_25);
if (x_27 == 0)
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34;
x_28 = lean_ctor_get(x_25, 0);
x_29 = l_Lean_Level_quote___main(x_28);
x_30 = l_Lean_Delaborator_delabSort___closed__13;
x_31 = lean_array_push(x_30, x_29);
x_32 = l_Lean_Parser_Term_sortApp___elambda__1___closed__2;
x_33 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_33, 0, x_32);
lean_ctor_set(x_33, 1, x_31);
lean_ctor_set(x_25, 0, x_33);
x_34 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_34, 0, x_25);
lean_ctor_set(x_34, 1, x_8);
return x_34;
}
else
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42;
x_35 = lean_ctor_get(x_25, 0);
lean_inc(x_35);
lean_dec(x_25);
x_36 = l_Lean_Level_quote___main(x_35);
x_37 = l_Lean_Delaborator_delabSort___closed__13;
x_38 = lean_array_push(x_37, x_36);
x_39 = l_Lean_Parser_Term_sortApp___elambda__1___closed__2;
x_40 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_40, 0, x_39);
lean_ctor_set(x_40, 1, x_38);
x_41 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_41, 0, x_40);
x_42 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_42, 0, x_41);
lean_ctor_set(x_42, 1, x_8);
return x_42;
}
}
}
}
default:
{
lean_object* x_43;
x_43 = l_Lean_Level_dec___main(x_10);
if (lean_obj_tag(x_43) == 0)
{
lean_object* x_44;
x_44 = lean_box(0);
x_11 = x_44;
goto block_19;
}
else
{
uint8_t x_45;
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_7);
x_45 = !lean_is_exclusive(x_43);
if (x_45 == 0)
{
lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52;
x_46 = lean_ctor_get(x_43, 0);
x_47 = l_Lean_Level_quote___main(x_46);
x_48 = l_Lean_Delaborator_delabSort___closed__13;
x_49 = lean_array_push(x_48, x_47);
x_50 = l_Lean_Parser_Term_sortApp___elambda__1___closed__2;
x_51 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_51, 0, x_50);
lean_ctor_set(x_51, 1, x_49);
lean_ctor_set(x_43, 0, x_51);
x_52 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_52, 0, x_43);
lean_ctor_set(x_52, 1, x_8);
return x_52;
}
else
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60;
x_53 = lean_ctor_get(x_43, 0);
lean_inc(x_53);
lean_dec(x_43);
x_54 = l_Lean_Level_quote___main(x_53);
x_55 = l_Lean_Delaborator_delabSort___closed__13;
x_56 = lean_array_push(x_55, x_54);
x_57 = l_Lean_Parser_Term_sortApp___elambda__1___closed__2;
x_58 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_58, 0, x_57);
lean_ctor_set(x_58, 1, x_56);
x_59 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_59, 0, x_58);
x_60 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_60, 0, x_59);
lean_ctor_set(x_60, 1, x_8);
return x_60;
}
}
}
}
block_19:
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18;
lean_dec(x_11);
x_12 = l_Lean_Level_quote___main(x_10);
x_13 = l_Lean_Delaborator_delabSort___closed__4;
x_14 = lean_array_push(x_13, x_12);
x_15 = l_Lean_Parser_Term_sortApp___elambda__1___closed__2;
x_16 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_16, 0, x_15);
lean_ctor_set(x_16, 1, x_14);
if (lean_is_scalar(x_7)) {
x_17 = lean_alloc_ctor(1, 1, 0);
} else {
x_17 = x_7;
}
lean_ctor_set(x_17, 0, x_16);
if (lean_is_scalar(x_9)) {
x_18 = lean_alloc_ctor(0, 2, 0);
} else {
x_18 = x_9;
}
lean_ctor_set(x_18, 0, x_17);
lean_ctor_set(x_18, 1, x_8);
return x_18;
}
}
else
{
lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64;
lean_dec(x_7);
lean_dec(x_6);
x_61 = lean_ctor_get(x_4, 1);
lean_inc(x_61);
lean_dec(x_4);
x_62 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_63 = l_unreachable_x21___rarg(x_62);
x_64 = lean_apply_3(x_63, x_1, x_2, x_61);
return x_64;
}
}
}
lean_object* _init_l___regBuiltin_Lean_Delaborator_delabSort___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabSort), 3, 0);
return x_1;
}
}
lean_object* l___regBuiltin_Lean_Delaborator_delabSort(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Delaborator_delabAttribute;
x_3 = l_Lean_Delaborator_getExprKind___closed__10;
x_4 = l___regBuiltin_Lean_Delaborator_delabSort___closed__1;
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* l_Array_umapMAux___main___at_Lean_Delaborator_delabConst___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; uint8_t x_4;
x_3 = lean_array_get_size(x_2);
x_4 = lean_nat_dec_lt(x_1, x_3);
lean_dec(x_3);
if (x_4 == 0)
{
lean_dec(x_1);
return x_2;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_5 = lean_array_fget(x_2, x_1);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_fset(x_2, x_1, x_6);
x_8 = x_5;
x_9 = l_Lean_Level_quote___main(x_8);
x_10 = lean_unsigned_to_nat(1u);
x_11 = lean_nat_add(x_1, x_10);
x_12 = x_9;
x_13 = lean_array_fset(x_7, x_1, x_12);
lean_dec(x_1);
x_1 = x_11;
x_2 = x_13;
goto _start;
}
}
}
lean_object* _init_l_Lean_Delaborator_delabConst___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_getPPUniverses___boxed), 1, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_delabConst___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__5;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabConst___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabConst___closed__2;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabConst___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_PersistentArray_Stats_toString___closed__4;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_delabConst(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; uint8_t x_6;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_5, 0);
if (lean_obj_tag(x_7) == 4)
{
uint8_t x_8;
x_8 = !lean_is_exclusive(x_4);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_31;
x_9 = lean_ctor_get(x_4, 1);
x_10 = lean_ctor_get(x_4, 0);
lean_dec(x_10);
x_11 = lean_ctor_get(x_7, 0);
lean_inc(x_11);
x_12 = lean_ctor_get(x_7, 1);
lean_inc(x_12);
lean_dec(x_7);
x_13 = l_Lean_Delaborator_delabConst___closed__1;
x_14 = l_Lean_Delaborator_getPPOption(x_13, x_1, x_2, x_9);
lean_dec(x_2);
x_15 = lean_ctor_get(x_14, 0);
lean_inc(x_15);
x_16 = lean_ctor_get(x_14, 1);
lean_inc(x_16);
if (lean_is_exclusive(x_14)) {
lean_ctor_release(x_14, 0);
lean_ctor_release(x_14, 1);
x_17 = x_14;
} else {
lean_dec_ref(x_14);
x_17 = lean_box(0);
}
x_18 = lean_ctor_get(x_15, 0);
lean_inc(x_18);
if (lean_is_exclusive(x_15)) {
lean_ctor_release(x_15, 0);
x_19 = x_15;
} else {
lean_dec_ref(x_15);
x_19 = lean_box(0);
}
x_31 = l_List_isEmpty___rarg(x_12);
if (x_31 == 0)
{
uint8_t x_32;
x_32 = lean_unbox(x_18);
lean_dec(x_18);
if (x_32 == 0)
{
lean_object* x_33;
lean_dec(x_12);
lean_free_object(x_4);
lean_free_object(x_5);
x_33 = lean_box(0);
x_20 = x_33;
goto block_30;
}
else
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57;
lean_dec(x_19);
lean_dec(x_17);
x_34 = lean_mk_syntax_ident(x_11);
x_35 = l_Array_empty___closed__1;
x_36 = lean_array_push(x_35, x_34);
x_37 = l_List_redLength___main___rarg(x_12);
x_38 = lean_mk_empty_array_with_capacity(x_37);
lean_dec(x_37);
x_39 = l_List_toArrayAux___main___rarg(x_12, x_38);
x_40 = x_39;
x_41 = lean_unsigned_to_nat(0u);
x_42 = l_Array_umapMAux___main___at_Lean_Delaborator_delabConst___spec__1(x_41, x_40);
x_43 = x_42;
x_44 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_43, x_43, x_41, x_35);
lean_dec(x_43);
x_45 = l_Lean_nullKind___closed__2;
x_46 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_46, 0, x_45);
lean_ctor_set(x_46, 1, x_44);
x_47 = l_Lean_Delaborator_delabConst___closed__3;
x_48 = lean_array_push(x_47, x_46);
x_49 = l_Lean_Delaborator_delabConst___closed__4;
x_50 = lean_array_push(x_48, x_49);
x_51 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2;
x_52 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_52, 0, x_51);
lean_ctor_set(x_52, 1, x_50);
x_53 = lean_array_push(x_35, x_52);
x_54 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_54, 0, x_45);
lean_ctor_set(x_54, 1, x_53);
x_55 = lean_array_push(x_36, x_54);
x_56 = l_Lean_mkTermIdFromIdent___closed__2;
x_57 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_57, 0, x_56);
lean_ctor_set(x_57, 1, x_55);
lean_ctor_set(x_5, 0, x_57);
lean_ctor_set(x_4, 1, x_16);
return x_4;
}
}
else
{
lean_object* x_58;
lean_dec(x_18);
lean_dec(x_12);
lean_free_object(x_4);
lean_free_object(x_5);
x_58 = lean_box(0);
x_20 = x_58;
goto block_30;
}
block_30:
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
lean_dec(x_20);
x_21 = lean_mk_syntax_ident(x_11);
x_22 = l_Array_empty___closed__1;
x_23 = lean_array_push(x_22, x_21);
x_24 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4;
x_25 = lean_array_push(x_23, x_24);
x_26 = l_Lean_mkTermIdFromIdent___closed__2;
x_27 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_27, 0, x_26);
lean_ctor_set(x_27, 1, x_25);
if (lean_is_scalar(x_19)) {
x_28 = lean_alloc_ctor(1, 1, 0);
} else {
x_28 = x_19;
}
lean_ctor_set(x_28, 0, x_27);
if (lean_is_scalar(x_17)) {
x_29 = lean_alloc_ctor(0, 2, 0);
} else {
x_29 = x_17;
}
lean_ctor_set(x_29, 0, x_28);
lean_ctor_set(x_29, 1, x_16);
return x_29;
}
}
else
{
lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_80;
x_59 = lean_ctor_get(x_4, 1);
lean_inc(x_59);
lean_dec(x_4);
x_60 = lean_ctor_get(x_7, 0);
lean_inc(x_60);
x_61 = lean_ctor_get(x_7, 1);
lean_inc(x_61);
lean_dec(x_7);
x_62 = l_Lean_Delaborator_delabConst___closed__1;
x_63 = l_Lean_Delaborator_getPPOption(x_62, x_1, x_2, x_59);
lean_dec(x_2);
x_64 = lean_ctor_get(x_63, 0);
lean_inc(x_64);
x_65 = lean_ctor_get(x_63, 1);
lean_inc(x_65);
if (lean_is_exclusive(x_63)) {
lean_ctor_release(x_63, 0);
lean_ctor_release(x_63, 1);
x_66 = x_63;
} else {
lean_dec_ref(x_63);
x_66 = lean_box(0);
}
x_67 = lean_ctor_get(x_64, 0);
lean_inc(x_67);
if (lean_is_exclusive(x_64)) {
lean_ctor_release(x_64, 0);
x_68 = x_64;
} else {
lean_dec_ref(x_64);
x_68 = lean_box(0);
}
x_80 = l_List_isEmpty___rarg(x_61);
if (x_80 == 0)
{
uint8_t x_81;
x_81 = lean_unbox(x_67);
lean_dec(x_67);
if (x_81 == 0)
{
lean_object* x_82;
lean_dec(x_61);
lean_free_object(x_5);
x_82 = lean_box(0);
x_69 = x_82;
goto block_79;
}
else
{
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107;
lean_dec(x_68);
lean_dec(x_66);
x_83 = lean_mk_syntax_ident(x_60);
x_84 = l_Array_empty___closed__1;
x_85 = lean_array_push(x_84, x_83);
x_86 = l_List_redLength___main___rarg(x_61);
x_87 = lean_mk_empty_array_with_capacity(x_86);
lean_dec(x_86);
x_88 = l_List_toArrayAux___main___rarg(x_61, x_87);
x_89 = x_88;
x_90 = lean_unsigned_to_nat(0u);
x_91 = l_Array_umapMAux___main___at_Lean_Delaborator_delabConst___spec__1(x_90, x_89);
x_92 = x_91;
x_93 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_92, x_92, x_90, x_84);
lean_dec(x_92);
x_94 = l_Lean_nullKind___closed__2;
x_95 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_95, 0, x_94);
lean_ctor_set(x_95, 1, x_93);
x_96 = l_Lean_Delaborator_delabConst___closed__3;
x_97 = lean_array_push(x_96, x_95);
x_98 = l_Lean_Delaborator_delabConst___closed__4;
x_99 = lean_array_push(x_97, x_98);
x_100 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2;
x_101 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_101, 0, x_100);
lean_ctor_set(x_101, 1, x_99);
x_102 = lean_array_push(x_84, x_101);
x_103 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_103, 0, x_94);
lean_ctor_set(x_103, 1, x_102);
x_104 = lean_array_push(x_85, x_103);
x_105 = l_Lean_mkTermIdFromIdent___closed__2;
x_106 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_106, 0, x_105);
lean_ctor_set(x_106, 1, x_104);
lean_ctor_set(x_5, 0, x_106);
x_107 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_107, 0, x_5);
lean_ctor_set(x_107, 1, x_65);
return x_107;
}
}
else
{
lean_object* x_108;
lean_dec(x_67);
lean_dec(x_61);
lean_free_object(x_5);
x_108 = lean_box(0);
x_69 = x_108;
goto block_79;
}
block_79:
{
lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78;
lean_dec(x_69);
x_70 = lean_mk_syntax_ident(x_60);
x_71 = l_Array_empty___closed__1;
x_72 = lean_array_push(x_71, x_70);
x_73 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4;
x_74 = lean_array_push(x_72, x_73);
x_75 = l_Lean_mkTermIdFromIdent___closed__2;
x_76 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_76, 0, x_75);
lean_ctor_set(x_76, 1, x_74);
if (lean_is_scalar(x_68)) {
x_77 = lean_alloc_ctor(1, 1, 0);
} else {
x_77 = x_68;
}
lean_ctor_set(x_77, 0, x_76);
if (lean_is_scalar(x_66)) {
x_78 = lean_alloc_ctor(0, 2, 0);
} else {
x_78 = x_66;
}
lean_ctor_set(x_78, 0, x_77);
lean_ctor_set(x_78, 1, x_65);
return x_78;
}
}
}
else
{
lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112;
lean_free_object(x_5);
lean_dec(x_7);
x_109 = lean_ctor_get(x_4, 1);
lean_inc(x_109);
lean_dec(x_4);
x_110 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_111 = l_unreachable_x21___rarg(x_110);
x_112 = lean_apply_3(x_111, x_1, x_2, x_109);
return x_112;
}
}
else
{
lean_object* x_113;
x_113 = lean_ctor_get(x_5, 0);
lean_inc(x_113);
lean_dec(x_5);
if (lean_obj_tag(x_113) == 4)
{
lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; uint8_t x_136;
x_114 = lean_ctor_get(x_4, 1);
lean_inc(x_114);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_115 = x_4;
} else {
lean_dec_ref(x_4);
x_115 = lean_box(0);
}
x_116 = lean_ctor_get(x_113, 0);
lean_inc(x_116);
x_117 = lean_ctor_get(x_113, 1);
lean_inc(x_117);
lean_dec(x_113);
x_118 = l_Lean_Delaborator_delabConst___closed__1;
x_119 = l_Lean_Delaborator_getPPOption(x_118, x_1, x_2, x_114);
lean_dec(x_2);
x_120 = lean_ctor_get(x_119, 0);
lean_inc(x_120);
x_121 = lean_ctor_get(x_119, 1);
lean_inc(x_121);
if (lean_is_exclusive(x_119)) {
lean_ctor_release(x_119, 0);
lean_ctor_release(x_119, 1);
x_122 = x_119;
} else {
lean_dec_ref(x_119);
x_122 = lean_box(0);
}
x_123 = lean_ctor_get(x_120, 0);
lean_inc(x_123);
if (lean_is_exclusive(x_120)) {
lean_ctor_release(x_120, 0);
x_124 = x_120;
} else {
lean_dec_ref(x_120);
x_124 = lean_box(0);
}
x_136 = l_List_isEmpty___rarg(x_117);
if (x_136 == 0)
{
uint8_t x_137;
x_137 = lean_unbox(x_123);
lean_dec(x_123);
if (x_137 == 0)
{
lean_object* x_138;
lean_dec(x_117);
lean_dec(x_115);
x_138 = lean_box(0);
x_125 = x_138;
goto block_135;
}
else
{
lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164;
lean_dec(x_124);
lean_dec(x_122);
x_139 = lean_mk_syntax_ident(x_116);
x_140 = l_Array_empty___closed__1;
x_141 = lean_array_push(x_140, x_139);
x_142 = l_List_redLength___main___rarg(x_117);
x_143 = lean_mk_empty_array_with_capacity(x_142);
lean_dec(x_142);
x_144 = l_List_toArrayAux___main___rarg(x_117, x_143);
x_145 = x_144;
x_146 = lean_unsigned_to_nat(0u);
x_147 = l_Array_umapMAux___main___at_Lean_Delaborator_delabConst___spec__1(x_146, x_145);
x_148 = x_147;
x_149 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_148, x_148, x_146, x_140);
lean_dec(x_148);
x_150 = l_Lean_nullKind___closed__2;
x_151 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_151, 0, x_150);
lean_ctor_set(x_151, 1, x_149);
x_152 = l_Lean_Delaborator_delabConst___closed__3;
x_153 = lean_array_push(x_152, x_151);
x_154 = l_Lean_Delaborator_delabConst___closed__4;
x_155 = lean_array_push(x_153, x_154);
x_156 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2;
x_157 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_157, 0, x_156);
lean_ctor_set(x_157, 1, x_155);
x_158 = lean_array_push(x_140, x_157);
x_159 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_159, 0, x_150);
lean_ctor_set(x_159, 1, x_158);
x_160 = lean_array_push(x_141, x_159);
x_161 = l_Lean_mkTermIdFromIdent___closed__2;
x_162 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_162, 0, x_161);
lean_ctor_set(x_162, 1, x_160);
x_163 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_163, 0, x_162);
if (lean_is_scalar(x_115)) {
x_164 = lean_alloc_ctor(0, 2, 0);
} else {
x_164 = x_115;
}
lean_ctor_set(x_164, 0, x_163);
lean_ctor_set(x_164, 1, x_121);
return x_164;
}
}
else
{
lean_object* x_165;
lean_dec(x_123);
lean_dec(x_117);
lean_dec(x_115);
x_165 = lean_box(0);
x_125 = x_165;
goto block_135;
}
block_135:
{
lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134;
lean_dec(x_125);
x_126 = lean_mk_syntax_ident(x_116);
x_127 = l_Array_empty___closed__1;
x_128 = lean_array_push(x_127, x_126);
x_129 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4;
x_130 = lean_array_push(x_128, x_129);
x_131 = l_Lean_mkTermIdFromIdent___closed__2;
x_132 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_132, 0, x_131);
lean_ctor_set(x_132, 1, x_130);
if (lean_is_scalar(x_124)) {
x_133 = lean_alloc_ctor(1, 1, 0);
} else {
x_133 = x_124;
}
lean_ctor_set(x_133, 0, x_132);
if (lean_is_scalar(x_122)) {
x_134 = lean_alloc_ctor(0, 2, 0);
} else {
x_134 = x_122;
}
lean_ctor_set(x_134, 0, x_133);
lean_ctor_set(x_134, 1, x_121);
return x_134;
}
}
else
{
lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169;
lean_dec(x_113);
x_166 = lean_ctor_get(x_4, 1);
lean_inc(x_166);
lean_dec(x_4);
x_167 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_168 = l_unreachable_x21___rarg(x_167);
x_169 = lean_apply_3(x_168, x_1, x_2, x_166);
return x_169;
}
}
}
}
lean_object* _init_l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__1() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3;
x_1 = 1;
x_2 = lean_box(x_1);
x_3 = x_2;
return x_3;
}
}
lean_object* _init_l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__2() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3;
x_1 = 0;
x_2 = lean_box(x_1);
x_3 = x_2;
return x_3;
}
}
lean_object* l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; uint8_t x_6;
x_5 = lean_array_get_size(x_2);
x_6 = lean_nat_dec_lt(x_1, x_5);
lean_dec(x_5);
if (x_6 == 0)
{
lean_object* x_7;
lean_dec(x_3);
lean_dec(x_1);
x_7 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_7, 0, x_2);
lean_ctor_set(x_7, 1, x_4);
return x_7;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_8 = lean_array_fget(x_2, x_1);
x_9 = lean_unsigned_to_nat(0u);
x_10 = lean_array_fset(x_2, x_1, x_9);
x_11 = x_8;
x_12 = l_Lean_Expr_fvarId_x21(x_11);
lean_dec(x_11);
lean_inc(x_3);
x_13 = l_Lean_Meta_getLocalDecl(x_12, x_3, x_4);
if (lean_obj_tag(x_13) == 0)
{
lean_object* x_14; lean_object* x_15; uint8_t x_16; uint8_t x_17;
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_13, 1);
lean_inc(x_15);
lean_dec(x_13);
x_16 = l_Lean_LocalDecl_binderInfo(x_14);
lean_dec(x_14);
x_17 = l_Lean_BinderInfo_isExplicit(x_16);
if (x_17 == 0)
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21;
x_18 = lean_unsigned_to_nat(1u);
x_19 = lean_nat_add(x_1, x_18);
x_20 = l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__1;
x_21 = lean_array_fset(x_10, x_1, x_20);
lean_dec(x_1);
x_1 = x_19;
x_2 = x_21;
x_4 = x_15;
goto _start;
}
else
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26;
x_23 = lean_unsigned_to_nat(1u);
x_24 = lean_nat_add(x_1, x_23);
x_25 = l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__2;
x_26 = lean_array_fset(x_10, x_1, x_25);
lean_dec(x_1);
x_1 = x_24;
x_2 = x_26;
x_4 = x_15;
goto _start;
}
}
else
{
uint8_t x_28;
lean_dec(x_10);
lean_dec(x_3);
lean_dec(x_1);
x_28 = !lean_is_exclusive(x_13);
if (x_28 == 0)
{
return x_13;
}
else
{
lean_object* x_29; lean_object* x_30; lean_object* x_31;
x_29 = lean_ctor_get(x_13, 0);
x_30 = lean_ctor_get(x_13, 1);
lean_inc(x_30);
lean_inc(x_29);
lean_dec(x_13);
x_31 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_31, 0, x_29);
lean_ctor_set(x_31, 1, x_30);
return x_31;
}
}
}
}
}
lean_object* l_Lean_Delaborator_getImplicitParams___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9;
x_5 = x_1;
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1), 4, 2);
lean_closure_set(x_7, 0, x_6);
lean_closure_set(x_7, 1, x_5);
x_8 = x_7;
x_9 = lean_apply_2(x_8, x_3, x_4);
return x_9;
}
}
lean_object* _init_l_Lean_Delaborator_getImplicitParams___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_getImplicitParams___lambda__1___boxed), 4, 0);
return x_1;
}
}
lean_object* l_Lean_Delaborator_getImplicitParams(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
lean_inc(x_2);
x_4 = l_Lean_Meta_inferType(x_1, x_2, x_3);
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_4, 1);
lean_inc(x_6);
lean_dec(x_4);
x_7 = l_Lean_Delaborator_getImplicitParams___closed__1;
x_8 = l_Lean_Meta_forallTelescopeReducing___rarg(x_5, x_7, x_2, x_6);
return x_8;
}
else
{
uint8_t x_9;
lean_dec(x_2);
x_9 = !lean_is_exclusive(x_4);
if (x_9 == 0)
{
return x_4;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12;
x_10 = lean_ctor_get(x_4, 0);
x_11 = lean_ctor_get(x_4, 1);
lean_inc(x_11);
lean_inc(x_10);
lean_dec(x_4);
x_12 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
return x_12;
}
}
}
}
lean_object* l_Lean_Delaborator_getImplicitParams___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Delaborator_getImplicitParams___lambda__1(x_1, x_2, x_3, x_4);
lean_dec(x_2);
return x_5;
}
}
uint8_t l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5;
x_5 = lean_nat_dec_lt(x_4, x_3);
if (x_5 == 0)
{
uint8_t x_6;
lean_dec(x_4);
x_6 = 0;
return x_6;
}
else
{
lean_object* x_7; uint8_t x_8;
x_7 = lean_array_fget(x_2, x_4);
x_8 = lean_unbox(x_7);
lean_dec(x_7);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10;
x_9 = lean_unsigned_to_nat(1u);
x_10 = lean_nat_add(x_4, x_9);
lean_dec(x_4);
x_4 = x_10;
goto _start;
}
else
{
lean_dec(x_4);
return x_8;
}
}
}
}
lean_object* l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6;
lean_inc(x_4);
lean_inc(x_3);
x_6 = lean_apply_3(x_1, x_3, x_4, x_5);
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
if (lean_obj_tag(x_7) == 0)
{
uint8_t x_8;
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_8 = !lean_is_exclusive(x_6);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10;
x_9 = lean_ctor_get(x_6, 0);
lean_dec(x_9);
x_10 = lean_box(0);
lean_ctor_set(x_6, 0, x_10);
return x_6;
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_11 = lean_ctor_get(x_6, 1);
lean_inc(x_11);
lean_dec(x_6);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_13, 0, x_12);
lean_ctor_set(x_13, 1, x_11);
return x_13;
}
}
else
{
lean_object* x_14; lean_object* x_15; lean_object* x_16;
x_14 = lean_ctor_get(x_6, 1);
lean_inc(x_14);
lean_dec(x_6);
x_15 = lean_ctor_get(x_7, 0);
lean_inc(x_15);
lean_dec(x_7);
x_16 = lean_apply_4(x_2, x_15, x_3, x_4, x_14);
return x_16;
}
}
else
{
uint8_t x_17;
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_17 = !lean_is_exclusive(x_6);
if (x_17 == 0)
{
return x_6;
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20;
x_18 = lean_ctor_get(x_6, 0);
x_19 = lean_ctor_get(x_6, 1);
lean_inc(x_19);
lean_inc(x_18);
lean_dec(x_6);
x_20 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_20, 0, x_18);
lean_ctor_set(x_20, 1, x_19);
return x_20;
}
}
}
}
lean_object* l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg), 5, 0);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__5;
x_3 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Array_empty___closed__1;
x_2 = l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__1;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Delaborator_delabAppExplicit___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; uint8_t x_69;
x_69 = l_Lean_Expr_isConst(x_1);
if (x_69 == 0)
{
lean_object* x_70;
lean_inc(x_3);
x_70 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_70) == 0)
{
lean_object* x_71; lean_object* x_72;
x_71 = lean_ctor_get(x_70, 0);
lean_inc(x_71);
x_72 = lean_ctor_get(x_70, 1);
lean_inc(x_72);
lean_dec(x_70);
x_5 = x_71;
x_6 = x_72;
goto block_68;
}
else
{
uint8_t x_73;
lean_dec(x_3);
lean_dec(x_1);
x_73 = !lean_is_exclusive(x_70);
if (x_73 == 0)
{
return x_70;
}
else
{
lean_object* x_74; lean_object* x_75; lean_object* x_76;
x_74 = lean_ctor_get(x_70, 0);
x_75 = lean_ctor_get(x_70, 1);
lean_inc(x_75);
lean_inc(x_74);
lean_dec(x_70);
x_76 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_76, 0, x_74);
lean_ctor_set(x_76, 1, x_75);
return x_76;
}
}
}
else
{
lean_object* x_77;
lean_inc(x_3);
x_77 = l_Lean_Delaborator_delabConst(x_2, x_3, x_4);
if (lean_obj_tag(x_77) == 0)
{
lean_object* x_78; lean_object* x_79;
x_78 = lean_ctor_get(x_77, 0);
lean_inc(x_78);
x_79 = lean_ctor_get(x_77, 1);
lean_inc(x_79);
lean_dec(x_77);
x_5 = x_78;
x_6 = x_79;
goto block_68;
}
else
{
uint8_t x_80;
lean_dec(x_3);
lean_dec(x_1);
x_80 = !lean_is_exclusive(x_77);
if (x_80 == 0)
{
return x_77;
}
else
{
lean_object* x_81; lean_object* x_82; lean_object* x_83;
x_81 = lean_ctor_get(x_77, 0);
x_82 = lean_ctor_get(x_77, 1);
lean_inc(x_82);
lean_inc(x_81);
lean_dec(x_77);
x_83 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_83, 0, x_81);
lean_ctor_set(x_83, 1, x_82);
return x_83;
}
}
}
block_68:
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_7; lean_object* x_8;
lean_dec(x_3);
lean_dec(x_1);
x_7 = lean_box(0);
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_7);
lean_ctor_set(x_8, 1, x_6);
return x_8;
}
else
{
uint8_t x_9;
x_9 = !lean_is_exclusive(x_5);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11;
x_10 = lean_ctor_get(x_5, 0);
x_11 = l_Lean_Delaborator_getImplicitParams(x_1, x_3, x_6);
if (lean_obj_tag(x_11) == 0)
{
uint8_t x_12;
x_12 = !lean_is_exclusive(x_11);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16;
x_13 = lean_ctor_get(x_11, 0);
x_14 = lean_array_get_size(x_13);
x_15 = lean_unsigned_to_nat(0u);
x_16 = l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1(x_13, x_13, x_14, x_15);
lean_dec(x_14);
lean_dec(x_13);
if (x_16 == 0)
{
lean_object* x_17; lean_object* x_18;
x_17 = l_Array_empty___closed__1;
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_10);
lean_ctor_set(x_18, 1, x_17);
lean_ctor_set(x_5, 0, x_18);
lean_ctor_set(x_11, 0, x_5);
return x_11;
}
else
{
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24;
x_19 = l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2;
x_20 = lean_array_push(x_19, x_10);
x_21 = l_Lean_Parser_Term_explicit___elambda__1___closed__2;
x_22 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_22, 0, x_21);
lean_ctor_set(x_22, 1, x_20);
x_23 = l_Array_empty___closed__1;
x_24 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_24, 0, x_22);
lean_ctor_set(x_24, 1, x_23);
lean_ctor_set(x_5, 0, x_24);
lean_ctor_set(x_11, 0, x_5);
return x_11;
}
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29;
x_25 = lean_ctor_get(x_11, 0);
x_26 = lean_ctor_get(x_11, 1);
lean_inc(x_26);
lean_inc(x_25);
lean_dec(x_11);
x_27 = lean_array_get_size(x_25);
x_28 = lean_unsigned_to_nat(0u);
x_29 = l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1(x_25, x_25, x_27, x_28);
lean_dec(x_27);
lean_dec(x_25);
if (x_29 == 0)
{
lean_object* x_30; lean_object* x_31; lean_object* x_32;
x_30 = l_Array_empty___closed__1;
x_31 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_31, 0, x_10);
lean_ctor_set(x_31, 1, x_30);
lean_ctor_set(x_5, 0, x_31);
x_32 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_32, 0, x_5);
lean_ctor_set(x_32, 1, x_26);
return x_32;
}
else
{
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39;
x_33 = l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2;
x_34 = lean_array_push(x_33, x_10);
x_35 = l_Lean_Parser_Term_explicit___elambda__1___closed__2;
x_36 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_36, 0, x_35);
lean_ctor_set(x_36, 1, x_34);
x_37 = l_Array_empty___closed__1;
x_38 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_38, 0, x_36);
lean_ctor_set(x_38, 1, x_37);
lean_ctor_set(x_5, 0, x_38);
x_39 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_39, 0, x_5);
lean_ctor_set(x_39, 1, x_26);
return x_39;
}
}
}
else
{
uint8_t x_40;
lean_free_object(x_5);
lean_dec(x_10);
x_40 = !lean_is_exclusive(x_11);
if (x_40 == 0)
{
return x_11;
}
else
{
lean_object* x_41; lean_object* x_42; lean_object* x_43;
x_41 = lean_ctor_get(x_11, 0);
x_42 = lean_ctor_get(x_11, 1);
lean_inc(x_42);
lean_inc(x_41);
lean_dec(x_11);
x_43 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_43, 0, x_41);
lean_ctor_set(x_43, 1, x_42);
return x_43;
}
}
}
else
{
lean_object* x_44; lean_object* x_45;
x_44 = lean_ctor_get(x_5, 0);
lean_inc(x_44);
lean_dec(x_5);
x_45 = l_Lean_Delaborator_getImplicitParams(x_1, x_3, x_6);
if (lean_obj_tag(x_45) == 0)
{
lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51;
x_46 = lean_ctor_get(x_45, 0);
lean_inc(x_46);
x_47 = lean_ctor_get(x_45, 1);
lean_inc(x_47);
if (lean_is_exclusive(x_45)) {
lean_ctor_release(x_45, 0);
lean_ctor_release(x_45, 1);
x_48 = x_45;
} else {
lean_dec_ref(x_45);
x_48 = lean_box(0);
}
x_49 = lean_array_get_size(x_46);
x_50 = lean_unsigned_to_nat(0u);
x_51 = l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1(x_46, x_46, x_49, x_50);
lean_dec(x_49);
lean_dec(x_46);
if (x_51 == 0)
{
lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55;
x_52 = l_Array_empty___closed__1;
x_53 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_53, 0, x_44);
lean_ctor_set(x_53, 1, x_52);
x_54 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_54, 0, x_53);
if (lean_is_scalar(x_48)) {
x_55 = lean_alloc_ctor(0, 2, 0);
} else {
x_55 = x_48;
}
lean_ctor_set(x_55, 0, x_54);
lean_ctor_set(x_55, 1, x_47);
return x_55;
}
else
{
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63;
x_56 = l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2;
x_57 = lean_array_push(x_56, x_44);
x_58 = l_Lean_Parser_Term_explicit___elambda__1___closed__2;
x_59 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_59, 0, x_58);
lean_ctor_set(x_59, 1, x_57);
x_60 = l_Array_empty___closed__1;
x_61 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_61, 0, x_59);
lean_ctor_set(x_61, 1, x_60);
x_62 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_62, 0, x_61);
if (lean_is_scalar(x_48)) {
x_63 = lean_alloc_ctor(0, 2, 0);
} else {
x_63 = x_48;
}
lean_ctor_set(x_63, 0, x_62);
lean_ctor_set(x_63, 1, x_47);
return x_63;
}
}
else
{
lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
lean_dec(x_44);
x_64 = lean_ctor_get(x_45, 0);
lean_inc(x_64);
x_65 = lean_ctor_get(x_45, 1);
lean_inc(x_65);
if (lean_is_exclusive(x_45)) {
lean_ctor_release(x_45, 0);
lean_ctor_release(x_45, 1);
x_66 = x_45;
} else {
lean_dec_ref(x_45);
x_66 = lean_box(0);
}
if (lean_is_scalar(x_66)) {
x_67 = lean_alloc_ctor(1, 2, 0);
} else {
x_67 = x_66;
}
lean_ctor_set(x_67, 0, x_64);
lean_ctor_set(x_67, 1, x_65);
return x_67;
}
}
}
}
}
}
lean_object* l_Lean_Delaborator_delabAppExplicit___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5;
x_5 = !lean_is_exclusive(x_1);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8;
x_6 = lean_ctor_get(x_1, 0);
x_7 = lean_ctor_get(x_1, 1);
x_8 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9;
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
if (lean_obj_tag(x_9) == 0)
{
uint8_t x_10;
lean_free_object(x_1);
lean_dec(x_7);
lean_dec(x_6);
x_10 = !lean_is_exclusive(x_8);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12;
x_11 = lean_ctor_get(x_8, 0);
lean_dec(x_11);
x_12 = lean_box(0);
lean_ctor_set(x_8, 0, x_12);
return x_8;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15;
x_13 = lean_ctor_get(x_8, 1);
lean_inc(x_13);
lean_dec(x_8);
x_14 = lean_box(0);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_14);
lean_ctor_set(x_15, 1, x_13);
return x_15;
}
}
else
{
uint8_t x_16;
x_16 = !lean_is_exclusive(x_8);
if (x_16 == 0)
{
lean_object* x_17; uint8_t x_18;
x_17 = lean_ctor_get(x_8, 0);
lean_dec(x_17);
x_18 = !lean_is_exclusive(x_9);
if (x_18 == 0)
{
lean_object* x_19; lean_object* x_20;
x_19 = lean_ctor_get(x_9, 0);
x_20 = lean_array_push(x_7, x_19);
lean_ctor_set(x_1, 1, x_20);
lean_ctor_set(x_9, 0, x_1);
return x_8;
}
else
{
lean_object* x_21; lean_object* x_22; lean_object* x_23;
x_21 = lean_ctor_get(x_9, 0);
lean_inc(x_21);
lean_dec(x_9);
x_22 = lean_array_push(x_7, x_21);
lean_ctor_set(x_1, 1, x_22);
x_23 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_23, 0, x_1);
lean_ctor_set(x_8, 0, x_23);
return x_8;
}
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
x_24 = lean_ctor_get(x_8, 1);
lean_inc(x_24);
lean_dec(x_8);
x_25 = lean_ctor_get(x_9, 0);
lean_inc(x_25);
if (lean_is_exclusive(x_9)) {
lean_ctor_release(x_9, 0);
x_26 = x_9;
} else {
lean_dec_ref(x_9);
x_26 = lean_box(0);
}
x_27 = lean_array_push(x_7, x_25);
lean_ctor_set(x_1, 1, x_27);
if (lean_is_scalar(x_26)) {
x_28 = lean_alloc_ctor(1, 1, 0);
} else {
x_28 = x_26;
}
lean_ctor_set(x_28, 0, x_1);
x_29 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_29, 0, x_28);
lean_ctor_set(x_29, 1, x_24);
return x_29;
}
}
}
else
{
uint8_t x_30;
lean_free_object(x_1);
lean_dec(x_7);
lean_dec(x_6);
x_30 = !lean_is_exclusive(x_8);
if (x_30 == 0)
{
return x_8;
}
else
{
lean_object* x_31; lean_object* x_32; lean_object* x_33;
x_31 = lean_ctor_get(x_8, 0);
x_32 = lean_ctor_get(x_8, 1);
lean_inc(x_32);
lean_inc(x_31);
lean_dec(x_8);
x_33 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_33, 0, x_31);
lean_ctor_set(x_33, 1, x_32);
return x_33;
}
}
}
else
{
lean_object* x_34; lean_object* x_35; lean_object* x_36;
x_34 = lean_ctor_get(x_1, 0);
x_35 = lean_ctor_get(x_1, 1);
lean_inc(x_35);
lean_inc(x_34);
lean_dec(x_1);
x_36 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_36) == 0)
{
lean_object* x_37;
x_37 = lean_ctor_get(x_36, 0);
lean_inc(x_37);
if (lean_obj_tag(x_37) == 0)
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
lean_dec(x_35);
lean_dec(x_34);
x_38 = lean_ctor_get(x_36, 1);
lean_inc(x_38);
if (lean_is_exclusive(x_36)) {
lean_ctor_release(x_36, 0);
lean_ctor_release(x_36, 1);
x_39 = x_36;
} else {
lean_dec_ref(x_36);
x_39 = lean_box(0);
}
x_40 = lean_box(0);
if (lean_is_scalar(x_39)) {
x_41 = lean_alloc_ctor(0, 2, 0);
} else {
x_41 = x_39;
}
lean_ctor_set(x_41, 0, x_40);
lean_ctor_set(x_41, 1, x_38);
return x_41;
}
else
{
lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49;
x_42 = lean_ctor_get(x_36, 1);
lean_inc(x_42);
if (lean_is_exclusive(x_36)) {
lean_ctor_release(x_36, 0);
lean_ctor_release(x_36, 1);
x_43 = x_36;
} else {
lean_dec_ref(x_36);
x_43 = lean_box(0);
}
x_44 = lean_ctor_get(x_37, 0);
lean_inc(x_44);
if (lean_is_exclusive(x_37)) {
lean_ctor_release(x_37, 0);
x_45 = x_37;
} else {
lean_dec_ref(x_37);
x_45 = lean_box(0);
}
x_46 = lean_array_push(x_35, x_44);
x_47 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_47, 0, x_34);
lean_ctor_set(x_47, 1, x_46);
if (lean_is_scalar(x_45)) {
x_48 = lean_alloc_ctor(1, 1, 0);
} else {
x_48 = x_45;
}
lean_ctor_set(x_48, 0, x_47);
if (lean_is_scalar(x_43)) {
x_49 = lean_alloc_ctor(0, 2, 0);
} else {
x_49 = x_43;
}
lean_ctor_set(x_49, 0, x_48);
lean_ctor_set(x_49, 1, x_42);
return x_49;
}
}
else
{
lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53;
lean_dec(x_35);
lean_dec(x_34);
x_50 = lean_ctor_get(x_36, 0);
lean_inc(x_50);
x_51 = lean_ctor_get(x_36, 1);
lean_inc(x_51);
if (lean_is_exclusive(x_36)) {
lean_ctor_release(x_36, 0);
lean_ctor_release(x_36, 1);
x_52 = x_36;
} else {
lean_dec_ref(x_36);
x_52 = lean_box(0);
}
if (lean_is_scalar(x_52)) {
x_53 = lean_alloc_ctor(1, 2, 0);
} else {
x_53 = x_52;
}
lean_ctor_set(x_53, 0, x_50);
lean_ctor_set(x_53, 1, x_51);
return x_53;
}
}
}
}
lean_object* _init_l_Lean_Delaborator_delabAppExplicit___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_getExpr___boxed), 3, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppExplicit___closed__2() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabAppExplicit___lambda__1), 4, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppExplicit___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Delaborator_delabAppExplicit___closed__1;
x_2 = l_Lean_Delaborator_delabAppExplicit___closed__2;
x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg), 5, 2);
lean_closure_set(x_3, 0, x_1);
lean_closure_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppExplicit___closed__4() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabAppExplicit___lambda__2), 4, 0);
return x_1;
}
}
lean_object* l_Lean_Delaborator_delabAppExplicit(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_4 = l_Lean_Delaborator_delabAppExplicit___closed__3;
x_5 = l_Lean_Delaborator_delabAppExplicit___closed__4;
x_6 = l_Lean_Delaborator_withAppFnArgs___main___rarg(x_4, x_5, x_1, x_2, x_3);
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
if (lean_obj_tag(x_7) == 0)
{
uint8_t x_8;
x_8 = !lean_is_exclusive(x_6);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10;
x_9 = lean_ctor_get(x_6, 0);
lean_dec(x_9);
x_10 = lean_box(0);
lean_ctor_set(x_6, 0, x_10);
return x_6;
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_11 = lean_ctor_get(x_6, 1);
lean_inc(x_11);
lean_dec(x_6);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_13, 0, x_12);
lean_ctor_set(x_13, 1, x_11);
return x_13;
}
}
else
{
uint8_t x_14;
x_14 = !lean_is_exclusive(x_7);
if (x_14 == 0)
{
uint8_t x_15;
x_15 = !lean_is_exclusive(x_6);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20;
x_16 = lean_ctor_get(x_7, 0);
x_17 = lean_ctor_get(x_6, 0);
lean_dec(x_17);
x_18 = lean_ctor_get(x_16, 0);
lean_inc(x_18);
x_19 = lean_ctor_get(x_16, 1);
lean_inc(x_19);
lean_dec(x_16);
x_20 = l_Array_isEmpty___rarg(x_19);
if (x_20 == 0)
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
x_21 = l_Array_empty___closed__1;
x_22 = lean_array_push(x_21, x_18);
x_23 = lean_unsigned_to_nat(0u);
x_24 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_19, x_19, x_23, x_21);
lean_dec(x_19);
x_25 = l_Lean_nullKind___closed__2;
x_26 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_26, 0, x_25);
lean_ctor_set(x_26, 1, x_24);
x_27 = lean_array_push(x_22, x_26);
x_28 = l_Lean_mkAppStx___closed__8;
x_29 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_29, 0, x_28);
lean_ctor_set(x_29, 1, x_27);
lean_ctor_set(x_7, 0, x_29);
return x_6;
}
else
{
lean_dec(x_19);
lean_ctor_set(x_7, 0, x_18);
return x_6;
}
}
else
{
lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34;
x_30 = lean_ctor_get(x_7, 0);
x_31 = lean_ctor_get(x_6, 1);
lean_inc(x_31);
lean_dec(x_6);
x_32 = lean_ctor_get(x_30, 0);
lean_inc(x_32);
x_33 = lean_ctor_get(x_30, 1);
lean_inc(x_33);
lean_dec(x_30);
x_34 = l_Array_isEmpty___rarg(x_33);
if (x_34 == 0)
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44;
x_35 = l_Array_empty___closed__1;
x_36 = lean_array_push(x_35, x_32);
x_37 = lean_unsigned_to_nat(0u);
x_38 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_33, x_33, x_37, x_35);
lean_dec(x_33);
x_39 = l_Lean_nullKind___closed__2;
x_40 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_40, 0, x_39);
lean_ctor_set(x_40, 1, x_38);
x_41 = lean_array_push(x_36, x_40);
x_42 = l_Lean_mkAppStx___closed__8;
x_43 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_43, 0, x_42);
lean_ctor_set(x_43, 1, x_41);
lean_ctor_set(x_7, 0, x_43);
x_44 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_44, 0, x_7);
lean_ctor_set(x_44, 1, x_31);
return x_44;
}
else
{
lean_object* x_45;
lean_dec(x_33);
lean_ctor_set(x_7, 0, x_32);
x_45 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_45, 0, x_7);
lean_ctor_set(x_45, 1, x_31);
return x_45;
}
}
}
else
{
lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51;
x_46 = lean_ctor_get(x_7, 0);
lean_inc(x_46);
lean_dec(x_7);
x_47 = lean_ctor_get(x_6, 1);
lean_inc(x_47);
if (lean_is_exclusive(x_6)) {
lean_ctor_release(x_6, 0);
lean_ctor_release(x_6, 1);
x_48 = x_6;
} else {
lean_dec_ref(x_6);
x_48 = lean_box(0);
}
x_49 = lean_ctor_get(x_46, 0);
lean_inc(x_49);
x_50 = lean_ctor_get(x_46, 1);
lean_inc(x_50);
lean_dec(x_46);
x_51 = l_Array_isEmpty___rarg(x_50);
if (x_51 == 0)
{
lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62;
x_52 = l_Array_empty___closed__1;
x_53 = lean_array_push(x_52, x_49);
x_54 = lean_unsigned_to_nat(0u);
x_55 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_50, x_50, x_54, x_52);
lean_dec(x_50);
x_56 = l_Lean_nullKind___closed__2;
x_57 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_57, 0, x_56);
lean_ctor_set(x_57, 1, x_55);
x_58 = lean_array_push(x_53, x_57);
x_59 = l_Lean_mkAppStx___closed__8;
x_60 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_60, 0, x_59);
lean_ctor_set(x_60, 1, x_58);
x_61 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_61, 0, x_60);
if (lean_is_scalar(x_48)) {
x_62 = lean_alloc_ctor(0, 2, 0);
} else {
x_62 = x_48;
}
lean_ctor_set(x_62, 0, x_61);
lean_ctor_set(x_62, 1, x_47);
return x_62;
}
else
{
lean_object* x_63; lean_object* x_64;
lean_dec(x_50);
x_63 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_63, 0, x_49);
if (lean_is_scalar(x_48)) {
x_64 = lean_alloc_ctor(0, 2, 0);
} else {
x_64 = x_48;
}
lean_ctor_set(x_64, 0, x_63);
lean_ctor_set(x_64, 1, x_47);
return x_64;
}
}
}
}
else
{
uint8_t x_65;
x_65 = !lean_is_exclusive(x_6);
if (x_65 == 0)
{
return x_6;
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68;
x_66 = lean_ctor_get(x_6, 0);
x_67 = lean_ctor_get(x_6, 1);
lean_inc(x_67);
lean_inc(x_66);
lean_dec(x_6);
x_68 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_68, 0, x_66);
lean_ctor_set(x_68, 1, x_67);
return x_68;
}
}
}
}
lean_object* l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6;
x_5 = l_Array_anyRangeMAux___main___at_Lean_Delaborator_delabAppExplicit___spec__1(x_1, x_2, x_3, x_4);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_6 = lean_box(x_5);
return x_6;
}
}
lean_object* _init_l___regBuiltin_Lean_Delaborator_delabAppExplicit___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabAppExplicit), 3, 0);
return x_1;
}
}
lean_object* l___regBuiltin_Lean_Delaborator_delabAppExplicit(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Delaborator_delabAttribute;
x_3 = l_Lean_Delaborator_getExprKind___closed__12;
x_4 = l___regBuiltin_Lean_Delaborator_delabAppExplicit___closed__1;
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5;
x_5 = l_Lean_Expr_isConst(x_1);
if (x_5 == 0)
{
lean_object* x_6;
lean_inc(x_3);
x_6 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
if (lean_obj_tag(x_7) == 0)
{
uint8_t x_8;
lean_dec(x_3);
lean_dec(x_1);
x_8 = !lean_is_exclusive(x_6);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10;
x_9 = lean_ctor_get(x_6, 0);
lean_dec(x_9);
x_10 = lean_box(0);
lean_ctor_set(x_6, 0, x_10);
return x_6;
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_11 = lean_ctor_get(x_6, 1);
lean_inc(x_11);
lean_dec(x_6);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_13, 0, x_12);
lean_ctor_set(x_13, 1, x_11);
return x_13;
}
}
else
{
lean_object* x_14; uint8_t x_15;
x_14 = lean_ctor_get(x_6, 1);
lean_inc(x_14);
lean_dec(x_6);
x_15 = !lean_is_exclusive(x_7);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17;
x_16 = lean_ctor_get(x_7, 0);
x_17 = l_Lean_Delaborator_getImplicitParams(x_1, x_3, x_14);
if (lean_obj_tag(x_17) == 0)
{
uint8_t x_18;
x_18 = !lean_is_exclusive(x_17);
if (x_18 == 0)
{
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
x_19 = lean_ctor_get(x_17, 0);
x_20 = l_Array_toList___rarg(x_19);
lean_dec(x_19);
x_21 = l_Array_empty___closed__1;
x_22 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_22, 0, x_20);
lean_ctor_set(x_22, 1, x_21);
x_23 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_23, 0, x_16);
lean_ctor_set(x_23, 1, x_22);
lean_ctor_set(x_7, 0, x_23);
lean_ctor_set(x_17, 0, x_7);
return x_17;
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
x_24 = lean_ctor_get(x_17, 0);
x_25 = lean_ctor_get(x_17, 1);
lean_inc(x_25);
lean_inc(x_24);
lean_dec(x_17);
x_26 = l_Array_toList___rarg(x_24);
lean_dec(x_24);
x_27 = l_Array_empty___closed__1;
x_28 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_28, 0, x_26);
lean_ctor_set(x_28, 1, x_27);
x_29 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_29, 0, x_16);
lean_ctor_set(x_29, 1, x_28);
lean_ctor_set(x_7, 0, x_29);
x_30 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_30, 0, x_7);
lean_ctor_set(x_30, 1, x_25);
return x_30;
}
}
else
{
uint8_t x_31;
lean_free_object(x_7);
lean_dec(x_16);
x_31 = !lean_is_exclusive(x_17);
if (x_31 == 0)
{
return x_17;
}
else
{
lean_object* x_32; lean_object* x_33; lean_object* x_34;
x_32 = lean_ctor_get(x_17, 0);
x_33 = lean_ctor_get(x_17, 1);
lean_inc(x_33);
lean_inc(x_32);
lean_dec(x_17);
x_34 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_34, 0, x_32);
lean_ctor_set(x_34, 1, x_33);
return x_34;
}
}
}
else
{
lean_object* x_35; lean_object* x_36;
x_35 = lean_ctor_get(x_7, 0);
lean_inc(x_35);
lean_dec(x_7);
x_36 = l_Lean_Delaborator_getImplicitParams(x_1, x_3, x_14);
if (lean_obj_tag(x_36) == 0)
{
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45;
x_37 = lean_ctor_get(x_36, 0);
lean_inc(x_37);
x_38 = lean_ctor_get(x_36, 1);
lean_inc(x_38);
if (lean_is_exclusive(x_36)) {
lean_ctor_release(x_36, 0);
lean_ctor_release(x_36, 1);
x_39 = x_36;
} else {
lean_dec_ref(x_36);
x_39 = lean_box(0);
}
x_40 = l_Array_toList___rarg(x_37);
lean_dec(x_37);
x_41 = l_Array_empty___closed__1;
x_42 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_42, 0, x_40);
lean_ctor_set(x_42, 1, x_41);
x_43 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_43, 0, x_35);
lean_ctor_set(x_43, 1, x_42);
x_44 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_44, 0, x_43);
if (lean_is_scalar(x_39)) {
x_45 = lean_alloc_ctor(0, 2, 0);
} else {
x_45 = x_39;
}
lean_ctor_set(x_45, 0, x_44);
lean_ctor_set(x_45, 1, x_38);
return x_45;
}
else
{
lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49;
lean_dec(x_35);
x_46 = lean_ctor_get(x_36, 0);
lean_inc(x_46);
x_47 = lean_ctor_get(x_36, 1);
lean_inc(x_47);
if (lean_is_exclusive(x_36)) {
lean_ctor_release(x_36, 0);
lean_ctor_release(x_36, 1);
x_48 = x_36;
} else {
lean_dec_ref(x_36);
x_48 = lean_box(0);
}
if (lean_is_scalar(x_48)) {
x_49 = lean_alloc_ctor(1, 2, 0);
} else {
x_49 = x_48;
}
lean_ctor_set(x_49, 0, x_46);
lean_ctor_set(x_49, 1, x_47);
return x_49;
}
}
}
}
else
{
uint8_t x_50;
lean_dec(x_3);
lean_dec(x_1);
x_50 = !lean_is_exclusive(x_6);
if (x_50 == 0)
{
return x_6;
}
else
{
lean_object* x_51; lean_object* x_52; lean_object* x_53;
x_51 = lean_ctor_get(x_6, 0);
x_52 = lean_ctor_get(x_6, 1);
lean_inc(x_52);
lean_inc(x_51);
lean_dec(x_6);
x_53 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_53, 0, x_51);
lean_ctor_set(x_53, 1, x_52);
return x_53;
}
}
}
else
{
lean_object* x_54;
lean_inc(x_3);
x_54 = l_Lean_Delaborator_delabConst(x_2, x_3, x_4);
if (lean_obj_tag(x_54) == 0)
{
lean_object* x_55;
x_55 = lean_ctor_get(x_54, 0);
lean_inc(x_55);
if (lean_obj_tag(x_55) == 0)
{
uint8_t x_56;
lean_dec(x_3);
lean_dec(x_1);
x_56 = !lean_is_exclusive(x_54);
if (x_56 == 0)
{
lean_object* x_57; lean_object* x_58;
x_57 = lean_ctor_get(x_54, 0);
lean_dec(x_57);
x_58 = lean_box(0);
lean_ctor_set(x_54, 0, x_58);
return x_54;
}
else
{
lean_object* x_59; lean_object* x_60; lean_object* x_61;
x_59 = lean_ctor_get(x_54, 1);
lean_inc(x_59);
lean_dec(x_54);
x_60 = lean_box(0);
x_61 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_61, 0, x_60);
lean_ctor_set(x_61, 1, x_59);
return x_61;
}
}
else
{
lean_object* x_62; uint8_t x_63;
x_62 = lean_ctor_get(x_54, 1);
lean_inc(x_62);
lean_dec(x_54);
x_63 = !lean_is_exclusive(x_55);
if (x_63 == 0)
{
lean_object* x_64; lean_object* x_65;
x_64 = lean_ctor_get(x_55, 0);
x_65 = l_Lean_Delaborator_getImplicitParams(x_1, x_3, x_62);
if (lean_obj_tag(x_65) == 0)
{
uint8_t x_66;
x_66 = !lean_is_exclusive(x_65);
if (x_66 == 0)
{
lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71;
x_67 = lean_ctor_get(x_65, 0);
x_68 = l_Array_toList___rarg(x_67);
lean_dec(x_67);
x_69 = l_Array_empty___closed__1;
x_70 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_70, 0, x_68);
lean_ctor_set(x_70, 1, x_69);
x_71 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_71, 0, x_64);
lean_ctor_set(x_71, 1, x_70);
lean_ctor_set(x_55, 0, x_71);
lean_ctor_set(x_65, 0, x_55);
return x_65;
}
else
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78;
x_72 = lean_ctor_get(x_65, 0);
x_73 = lean_ctor_get(x_65, 1);
lean_inc(x_73);
lean_inc(x_72);
lean_dec(x_65);
x_74 = l_Array_toList___rarg(x_72);
lean_dec(x_72);
x_75 = l_Array_empty___closed__1;
x_76 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_76, 0, x_74);
lean_ctor_set(x_76, 1, x_75);
x_77 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_77, 0, x_64);
lean_ctor_set(x_77, 1, x_76);
lean_ctor_set(x_55, 0, x_77);
x_78 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_78, 0, x_55);
lean_ctor_set(x_78, 1, x_73);
return x_78;
}
}
else
{
uint8_t x_79;
lean_free_object(x_55);
lean_dec(x_64);
x_79 = !lean_is_exclusive(x_65);
if (x_79 == 0)
{
return x_65;
}
else
{
lean_object* x_80; lean_object* x_81; lean_object* x_82;
x_80 = lean_ctor_get(x_65, 0);
x_81 = lean_ctor_get(x_65, 1);
lean_inc(x_81);
lean_inc(x_80);
lean_dec(x_65);
x_82 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_82, 0, x_80);
lean_ctor_set(x_82, 1, x_81);
return x_82;
}
}
}
else
{
lean_object* x_83; lean_object* x_84;
x_83 = lean_ctor_get(x_55, 0);
lean_inc(x_83);
lean_dec(x_55);
x_84 = l_Lean_Delaborator_getImplicitParams(x_1, x_3, x_62);
if (lean_obj_tag(x_84) == 0)
{
lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93;
x_85 = lean_ctor_get(x_84, 0);
lean_inc(x_85);
x_86 = lean_ctor_get(x_84, 1);
lean_inc(x_86);
if (lean_is_exclusive(x_84)) {
lean_ctor_release(x_84, 0);
lean_ctor_release(x_84, 1);
x_87 = x_84;
} else {
lean_dec_ref(x_84);
x_87 = lean_box(0);
}
x_88 = l_Array_toList___rarg(x_85);
lean_dec(x_85);
x_89 = l_Array_empty___closed__1;
x_90 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_90, 0, x_88);
lean_ctor_set(x_90, 1, x_89);
x_91 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_91, 0, x_83);
lean_ctor_set(x_91, 1, x_90);
x_92 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_92, 0, x_91);
if (lean_is_scalar(x_87)) {
x_93 = lean_alloc_ctor(0, 2, 0);
} else {
x_93 = x_87;
}
lean_ctor_set(x_93, 0, x_92);
lean_ctor_set(x_93, 1, x_86);
return x_93;
}
else
{
lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97;
lean_dec(x_83);
x_94 = lean_ctor_get(x_84, 0);
lean_inc(x_94);
x_95 = lean_ctor_get(x_84, 1);
lean_inc(x_95);
if (lean_is_exclusive(x_84)) {
lean_ctor_release(x_84, 0);
lean_ctor_release(x_84, 1);
x_96 = x_84;
} else {
lean_dec_ref(x_84);
x_96 = lean_box(0);
}
if (lean_is_scalar(x_96)) {
x_97 = lean_alloc_ctor(1, 2, 0);
} else {
x_97 = x_96;
}
lean_ctor_set(x_97, 0, x_94);
lean_ctor_set(x_97, 1, x_95);
return x_97;
}
}
}
}
else
{
uint8_t x_98;
lean_dec(x_3);
lean_dec(x_1);
x_98 = !lean_is_exclusive(x_54);
if (x_98 == 0)
{
return x_54;
}
else
{
lean_object* x_99; lean_object* x_100; lean_object* x_101;
x_99 = lean_ctor_get(x_54, 0);
x_100 = lean_ctor_get(x_54, 1);
lean_inc(x_100);
lean_inc(x_99);
lean_dec(x_54);
x_101 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_101, 0, x_99);
lean_ctor_set(x_101, 1, x_100);
return x_101;
}
}
}
}
}
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6;
x_5 = lean_ctor_get(x_1, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
if (lean_obj_tag(x_6) == 0)
{
uint8_t x_7;
x_7 = !lean_is_exclusive(x_1);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; uint8_t x_10;
x_8 = lean_ctor_get(x_1, 0);
x_9 = lean_ctor_get(x_1, 1);
lean_dec(x_9);
x_10 = !lean_is_exclusive(x_5);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_11 = lean_ctor_get(x_5, 1);
x_12 = lean_ctor_get(x_5, 0);
lean_dec(x_12);
x_13 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_13) == 0)
{
lean_object* x_14;
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
if (lean_obj_tag(x_14) == 0)
{
uint8_t x_15;
lean_free_object(x_5);
lean_dec(x_11);
lean_free_object(x_1);
lean_dec(x_8);
x_15 = !lean_is_exclusive(x_13);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17;
x_16 = lean_ctor_get(x_13, 0);
lean_dec(x_16);
x_17 = lean_box(0);
lean_ctor_set(x_13, 0, x_17);
return x_13;
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20;
x_18 = lean_ctor_get(x_13, 1);
lean_inc(x_18);
lean_dec(x_13);
x_19 = lean_box(0);
x_20 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_20, 0, x_19);
lean_ctor_set(x_20, 1, x_18);
return x_20;
}
}
else
{
uint8_t x_21;
x_21 = !lean_is_exclusive(x_13);
if (x_21 == 0)
{
lean_object* x_22; uint8_t x_23;
x_22 = lean_ctor_get(x_13, 0);
lean_dec(x_22);
x_23 = !lean_is_exclusive(x_14);
if (x_23 == 0)
{
lean_object* x_24; lean_object* x_25; lean_object* x_26;
x_24 = lean_ctor_get(x_14, 0);
x_25 = l_List_tailD___rarg(x_6, x_6);
x_26 = lean_array_push(x_11, x_24);
lean_ctor_set(x_5, 1, x_26);
lean_ctor_set(x_5, 0, x_25);
lean_ctor_set(x_14, 0, x_1);
return x_13;
}
else
{
lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
x_27 = lean_ctor_get(x_14, 0);
lean_inc(x_27);
lean_dec(x_14);
x_28 = l_List_tailD___rarg(x_6, x_6);
x_29 = lean_array_push(x_11, x_27);
lean_ctor_set(x_5, 1, x_29);
lean_ctor_set(x_5, 0, x_28);
x_30 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_30, 0, x_1);
lean_ctor_set(x_13, 0, x_30);
return x_13;
}
}
else
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37;
x_31 = lean_ctor_get(x_13, 1);
lean_inc(x_31);
lean_dec(x_13);
x_32 = lean_ctor_get(x_14, 0);
lean_inc(x_32);
if (lean_is_exclusive(x_14)) {
lean_ctor_release(x_14, 0);
x_33 = x_14;
} else {
lean_dec_ref(x_14);
x_33 = lean_box(0);
}
x_34 = l_List_tailD___rarg(x_6, x_6);
x_35 = lean_array_push(x_11, x_32);
lean_ctor_set(x_5, 1, x_35);
lean_ctor_set(x_5, 0, x_34);
if (lean_is_scalar(x_33)) {
x_36 = lean_alloc_ctor(1, 1, 0);
} else {
x_36 = x_33;
}
lean_ctor_set(x_36, 0, x_1);
x_37 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_37, 0, x_36);
lean_ctor_set(x_37, 1, x_31);
return x_37;
}
}
}
else
{
uint8_t x_38;
lean_free_object(x_5);
lean_dec(x_11);
lean_free_object(x_1);
lean_dec(x_8);
x_38 = !lean_is_exclusive(x_13);
if (x_38 == 0)
{
return x_13;
}
else
{
lean_object* x_39; lean_object* x_40; lean_object* x_41;
x_39 = lean_ctor_get(x_13, 0);
x_40 = lean_ctor_get(x_13, 1);
lean_inc(x_40);
lean_inc(x_39);
lean_dec(x_13);
x_41 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_41, 0, x_39);
lean_ctor_set(x_41, 1, x_40);
return x_41;
}
}
}
else
{
lean_object* x_42; lean_object* x_43;
x_42 = lean_ctor_get(x_5, 1);
lean_inc(x_42);
lean_dec(x_5);
x_43 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_43) == 0)
{
lean_object* x_44;
x_44 = lean_ctor_get(x_43, 0);
lean_inc(x_44);
if (lean_obj_tag(x_44) == 0)
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48;
lean_dec(x_42);
lean_free_object(x_1);
lean_dec(x_8);
x_45 = lean_ctor_get(x_43, 1);
lean_inc(x_45);
if (lean_is_exclusive(x_43)) {
lean_ctor_release(x_43, 0);
lean_ctor_release(x_43, 1);
x_46 = x_43;
} else {
lean_dec_ref(x_43);
x_46 = lean_box(0);
}
x_47 = lean_box(0);
if (lean_is_scalar(x_46)) {
x_48 = lean_alloc_ctor(0, 2, 0);
} else {
x_48 = x_46;
}
lean_ctor_set(x_48, 0, x_47);
lean_ctor_set(x_48, 1, x_45);
return x_48;
}
else
{
lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57;
x_49 = lean_ctor_get(x_43, 1);
lean_inc(x_49);
if (lean_is_exclusive(x_43)) {
lean_ctor_release(x_43, 0);
lean_ctor_release(x_43, 1);
x_50 = x_43;
} else {
lean_dec_ref(x_43);
x_50 = lean_box(0);
}
x_51 = lean_ctor_get(x_44, 0);
lean_inc(x_51);
if (lean_is_exclusive(x_44)) {
lean_ctor_release(x_44, 0);
x_52 = x_44;
} else {
lean_dec_ref(x_44);
x_52 = lean_box(0);
}
x_53 = l_List_tailD___rarg(x_6, x_6);
x_54 = lean_array_push(x_42, x_51);
x_55 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_55, 0, x_53);
lean_ctor_set(x_55, 1, x_54);
lean_ctor_set(x_1, 1, x_55);
if (lean_is_scalar(x_52)) {
x_56 = lean_alloc_ctor(1, 1, 0);
} else {
x_56 = x_52;
}
lean_ctor_set(x_56, 0, x_1);
if (lean_is_scalar(x_50)) {
x_57 = lean_alloc_ctor(0, 2, 0);
} else {
x_57 = x_50;
}
lean_ctor_set(x_57, 0, x_56);
lean_ctor_set(x_57, 1, x_49);
return x_57;
}
}
else
{
lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61;
lean_dec(x_42);
lean_free_object(x_1);
lean_dec(x_8);
x_58 = lean_ctor_get(x_43, 0);
lean_inc(x_58);
x_59 = lean_ctor_get(x_43, 1);
lean_inc(x_59);
if (lean_is_exclusive(x_43)) {
lean_ctor_release(x_43, 0);
lean_ctor_release(x_43, 1);
x_60 = x_43;
} else {
lean_dec_ref(x_43);
x_60 = lean_box(0);
}
if (lean_is_scalar(x_60)) {
x_61 = lean_alloc_ctor(1, 2, 0);
} else {
x_61 = x_60;
}
lean_ctor_set(x_61, 0, x_58);
lean_ctor_set(x_61, 1, x_59);
return x_61;
}
}
}
else
{
lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65;
x_62 = lean_ctor_get(x_1, 0);
lean_inc(x_62);
lean_dec(x_1);
x_63 = lean_ctor_get(x_5, 1);
lean_inc(x_63);
if (lean_is_exclusive(x_5)) {
lean_ctor_release(x_5, 0);
lean_ctor_release(x_5, 1);
x_64 = x_5;
} else {
lean_dec_ref(x_5);
x_64 = lean_box(0);
}
x_65 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_65) == 0)
{
lean_object* x_66;
x_66 = lean_ctor_get(x_65, 0);
lean_inc(x_66);
if (lean_obj_tag(x_66) == 0)
{
lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70;
lean_dec(x_64);
lean_dec(x_63);
lean_dec(x_62);
x_67 = lean_ctor_get(x_65, 1);
lean_inc(x_67);
if (lean_is_exclusive(x_65)) {
lean_ctor_release(x_65, 0);
lean_ctor_release(x_65, 1);
x_68 = x_65;
} else {
lean_dec_ref(x_65);
x_68 = lean_box(0);
}
x_69 = lean_box(0);
if (lean_is_scalar(x_68)) {
x_70 = lean_alloc_ctor(0, 2, 0);
} else {
x_70 = x_68;
}
lean_ctor_set(x_70, 0, x_69);
lean_ctor_set(x_70, 1, x_67);
return x_70;
}
else
{
lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80;
x_71 = lean_ctor_get(x_65, 1);
lean_inc(x_71);
if (lean_is_exclusive(x_65)) {
lean_ctor_release(x_65, 0);
lean_ctor_release(x_65, 1);
x_72 = x_65;
} else {
lean_dec_ref(x_65);
x_72 = lean_box(0);
}
x_73 = lean_ctor_get(x_66, 0);
lean_inc(x_73);
if (lean_is_exclusive(x_66)) {
lean_ctor_release(x_66, 0);
x_74 = x_66;
} else {
lean_dec_ref(x_66);
x_74 = lean_box(0);
}
x_75 = l_List_tailD___rarg(x_6, x_6);
x_76 = lean_array_push(x_63, x_73);
if (lean_is_scalar(x_64)) {
x_77 = lean_alloc_ctor(0, 2, 0);
} else {
x_77 = x_64;
}
lean_ctor_set(x_77, 0, x_75);
lean_ctor_set(x_77, 1, x_76);
x_78 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_78, 0, x_62);
lean_ctor_set(x_78, 1, x_77);
if (lean_is_scalar(x_74)) {
x_79 = lean_alloc_ctor(1, 1, 0);
} else {
x_79 = x_74;
}
lean_ctor_set(x_79, 0, x_78);
if (lean_is_scalar(x_72)) {
x_80 = lean_alloc_ctor(0, 2, 0);
} else {
x_80 = x_72;
}
lean_ctor_set(x_80, 0, x_79);
lean_ctor_set(x_80, 1, x_71);
return x_80;
}
}
else
{
lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84;
lean_dec(x_64);
lean_dec(x_63);
lean_dec(x_62);
x_81 = lean_ctor_get(x_65, 0);
lean_inc(x_81);
x_82 = lean_ctor_get(x_65, 1);
lean_inc(x_82);
if (lean_is_exclusive(x_65)) {
lean_ctor_release(x_65, 0);
lean_ctor_release(x_65, 1);
x_83 = x_65;
} else {
lean_dec_ref(x_65);
x_83 = lean_box(0);
}
if (lean_is_scalar(x_83)) {
x_84 = lean_alloc_ctor(1, 2, 0);
} else {
x_84 = x_83;
}
lean_ctor_set(x_84, 0, x_81);
lean_ctor_set(x_84, 1, x_82);
return x_84;
}
}
}
else
{
lean_object* x_85; uint8_t x_86;
x_85 = lean_ctor_get(x_6, 0);
lean_inc(x_85);
x_86 = lean_unbox(x_85);
lean_dec(x_85);
if (x_86 == 0)
{
uint8_t x_87;
x_87 = !lean_is_exclusive(x_1);
if (x_87 == 0)
{
lean_object* x_88; lean_object* x_89; uint8_t x_90;
x_88 = lean_ctor_get(x_1, 0);
x_89 = lean_ctor_get(x_1, 1);
lean_dec(x_89);
x_90 = !lean_is_exclusive(x_5);
if (x_90 == 0)
{
lean_object* x_91; lean_object* x_92; lean_object* x_93;
x_91 = lean_ctor_get(x_5, 1);
x_92 = lean_ctor_get(x_5, 0);
lean_dec(x_92);
x_93 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_93) == 0)
{
lean_object* x_94;
x_94 = lean_ctor_get(x_93, 0);
lean_inc(x_94);
if (lean_obj_tag(x_94) == 0)
{
uint8_t x_95;
lean_free_object(x_5);
lean_dec(x_91);
lean_free_object(x_1);
lean_dec(x_88);
lean_dec(x_6);
x_95 = !lean_is_exclusive(x_93);
if (x_95 == 0)
{
lean_object* x_96; lean_object* x_97;
x_96 = lean_ctor_get(x_93, 0);
lean_dec(x_96);
x_97 = lean_box(0);
lean_ctor_set(x_93, 0, x_97);
return x_93;
}
else
{
lean_object* x_98; lean_object* x_99; lean_object* x_100;
x_98 = lean_ctor_get(x_93, 1);
lean_inc(x_98);
lean_dec(x_93);
x_99 = lean_box(0);
x_100 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_100, 0, x_99);
lean_ctor_set(x_100, 1, x_98);
return x_100;
}
}
else
{
uint8_t x_101;
x_101 = !lean_is_exclusive(x_93);
if (x_101 == 0)
{
lean_object* x_102; uint8_t x_103;
x_102 = lean_ctor_get(x_93, 0);
lean_dec(x_102);
x_103 = !lean_is_exclusive(x_94);
if (x_103 == 0)
{
lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107;
x_104 = lean_ctor_get(x_94, 0);
x_105 = lean_box(0);
x_106 = l_List_tailD___rarg(x_6, x_105);
lean_dec(x_6);
x_107 = lean_array_push(x_91, x_104);
lean_ctor_set(x_5, 1, x_107);
lean_ctor_set(x_5, 0, x_106);
lean_ctor_set(x_94, 0, x_1);
return x_93;
}
else
{
lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112;
x_108 = lean_ctor_get(x_94, 0);
lean_inc(x_108);
lean_dec(x_94);
x_109 = lean_box(0);
x_110 = l_List_tailD___rarg(x_6, x_109);
lean_dec(x_6);
x_111 = lean_array_push(x_91, x_108);
lean_ctor_set(x_5, 1, x_111);
lean_ctor_set(x_5, 0, x_110);
x_112 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_112, 0, x_1);
lean_ctor_set(x_93, 0, x_112);
return x_93;
}
}
else
{
lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120;
x_113 = lean_ctor_get(x_93, 1);
lean_inc(x_113);
lean_dec(x_93);
x_114 = lean_ctor_get(x_94, 0);
lean_inc(x_114);
if (lean_is_exclusive(x_94)) {
lean_ctor_release(x_94, 0);
x_115 = x_94;
} else {
lean_dec_ref(x_94);
x_115 = lean_box(0);
}
x_116 = lean_box(0);
x_117 = l_List_tailD___rarg(x_6, x_116);
lean_dec(x_6);
x_118 = lean_array_push(x_91, x_114);
lean_ctor_set(x_5, 1, x_118);
lean_ctor_set(x_5, 0, x_117);
if (lean_is_scalar(x_115)) {
x_119 = lean_alloc_ctor(1, 1, 0);
} else {
x_119 = x_115;
}
lean_ctor_set(x_119, 0, x_1);
x_120 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_120, 0, x_119);
lean_ctor_set(x_120, 1, x_113);
return x_120;
}
}
}
else
{
uint8_t x_121;
lean_free_object(x_5);
lean_dec(x_91);
lean_free_object(x_1);
lean_dec(x_88);
lean_dec(x_6);
x_121 = !lean_is_exclusive(x_93);
if (x_121 == 0)
{
return x_93;
}
else
{
lean_object* x_122; lean_object* x_123; lean_object* x_124;
x_122 = lean_ctor_get(x_93, 0);
x_123 = lean_ctor_get(x_93, 1);
lean_inc(x_123);
lean_inc(x_122);
lean_dec(x_93);
x_124 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_124, 0, x_122);
lean_ctor_set(x_124, 1, x_123);
return x_124;
}
}
}
else
{
lean_object* x_125; lean_object* x_126;
x_125 = lean_ctor_get(x_5, 1);
lean_inc(x_125);
lean_dec(x_5);
x_126 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_126) == 0)
{
lean_object* x_127;
x_127 = lean_ctor_get(x_126, 0);
lean_inc(x_127);
if (lean_obj_tag(x_127) == 0)
{
lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131;
lean_dec(x_125);
lean_free_object(x_1);
lean_dec(x_88);
lean_dec(x_6);
x_128 = lean_ctor_get(x_126, 1);
lean_inc(x_128);
if (lean_is_exclusive(x_126)) {
lean_ctor_release(x_126, 0);
lean_ctor_release(x_126, 1);
x_129 = x_126;
} else {
lean_dec_ref(x_126);
x_129 = lean_box(0);
}
x_130 = lean_box(0);
if (lean_is_scalar(x_129)) {
x_131 = lean_alloc_ctor(0, 2, 0);
} else {
x_131 = x_129;
}
lean_ctor_set(x_131, 0, x_130);
lean_ctor_set(x_131, 1, x_128);
return x_131;
}
else
{
lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141;
x_132 = lean_ctor_get(x_126, 1);
lean_inc(x_132);
if (lean_is_exclusive(x_126)) {
lean_ctor_release(x_126, 0);
lean_ctor_release(x_126, 1);
x_133 = x_126;
} else {
lean_dec_ref(x_126);
x_133 = lean_box(0);
}
x_134 = lean_ctor_get(x_127, 0);
lean_inc(x_134);
if (lean_is_exclusive(x_127)) {
lean_ctor_release(x_127, 0);
x_135 = x_127;
} else {
lean_dec_ref(x_127);
x_135 = lean_box(0);
}
x_136 = lean_box(0);
x_137 = l_List_tailD___rarg(x_6, x_136);
lean_dec(x_6);
x_138 = lean_array_push(x_125, x_134);
x_139 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_139, 0, x_137);
lean_ctor_set(x_139, 1, x_138);
lean_ctor_set(x_1, 1, x_139);
if (lean_is_scalar(x_135)) {
x_140 = lean_alloc_ctor(1, 1, 0);
} else {
x_140 = x_135;
}
lean_ctor_set(x_140, 0, x_1);
if (lean_is_scalar(x_133)) {
x_141 = lean_alloc_ctor(0, 2, 0);
} else {
x_141 = x_133;
}
lean_ctor_set(x_141, 0, x_140);
lean_ctor_set(x_141, 1, x_132);
return x_141;
}
}
else
{
lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145;
lean_dec(x_125);
lean_free_object(x_1);
lean_dec(x_88);
lean_dec(x_6);
x_142 = lean_ctor_get(x_126, 0);
lean_inc(x_142);
x_143 = lean_ctor_get(x_126, 1);
lean_inc(x_143);
if (lean_is_exclusive(x_126)) {
lean_ctor_release(x_126, 0);
lean_ctor_release(x_126, 1);
x_144 = x_126;
} else {
lean_dec_ref(x_126);
x_144 = lean_box(0);
}
if (lean_is_scalar(x_144)) {
x_145 = lean_alloc_ctor(1, 2, 0);
} else {
x_145 = x_144;
}
lean_ctor_set(x_145, 0, x_142);
lean_ctor_set(x_145, 1, x_143);
return x_145;
}
}
}
else
{
lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149;
x_146 = lean_ctor_get(x_1, 0);
lean_inc(x_146);
lean_dec(x_1);
x_147 = lean_ctor_get(x_5, 1);
lean_inc(x_147);
if (lean_is_exclusive(x_5)) {
lean_ctor_release(x_5, 0);
lean_ctor_release(x_5, 1);
x_148 = x_5;
} else {
lean_dec_ref(x_5);
x_148 = lean_box(0);
}
x_149 = l_Lean_Delaborator_delab(x_2, x_3, x_4);
if (lean_obj_tag(x_149) == 0)
{
lean_object* x_150;
x_150 = lean_ctor_get(x_149, 0);
lean_inc(x_150);
if (lean_obj_tag(x_150) == 0)
{
lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154;
lean_dec(x_148);
lean_dec(x_147);
lean_dec(x_146);
lean_dec(x_6);
x_151 = lean_ctor_get(x_149, 1);
lean_inc(x_151);
if (lean_is_exclusive(x_149)) {
lean_ctor_release(x_149, 0);
lean_ctor_release(x_149, 1);
x_152 = x_149;
} else {
lean_dec_ref(x_149);
x_152 = lean_box(0);
}
x_153 = lean_box(0);
if (lean_is_scalar(x_152)) {
x_154 = lean_alloc_ctor(0, 2, 0);
} else {
x_154 = x_152;
}
lean_ctor_set(x_154, 0, x_153);
lean_ctor_set(x_154, 1, x_151);
return x_154;
}
else
{
lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165;
x_155 = lean_ctor_get(x_149, 1);
lean_inc(x_155);
if (lean_is_exclusive(x_149)) {
lean_ctor_release(x_149, 0);
lean_ctor_release(x_149, 1);
x_156 = x_149;
} else {
lean_dec_ref(x_149);
x_156 = lean_box(0);
}
x_157 = lean_ctor_get(x_150, 0);
lean_inc(x_157);
if (lean_is_exclusive(x_150)) {
lean_ctor_release(x_150, 0);
x_158 = x_150;
} else {
lean_dec_ref(x_150);
x_158 = lean_box(0);
}
x_159 = lean_box(0);
x_160 = l_List_tailD___rarg(x_6, x_159);
lean_dec(x_6);
x_161 = lean_array_push(x_147, x_157);
if (lean_is_scalar(x_148)) {
x_162 = lean_alloc_ctor(0, 2, 0);
} else {
x_162 = x_148;
}
lean_ctor_set(x_162, 0, x_160);
lean_ctor_set(x_162, 1, x_161);
x_163 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_163, 0, x_146);
lean_ctor_set(x_163, 1, x_162);
if (lean_is_scalar(x_158)) {
x_164 = lean_alloc_ctor(1, 1, 0);
} else {
x_164 = x_158;
}
lean_ctor_set(x_164, 0, x_163);
if (lean_is_scalar(x_156)) {
x_165 = lean_alloc_ctor(0, 2, 0);
} else {
x_165 = x_156;
}
lean_ctor_set(x_165, 0, x_164);
lean_ctor_set(x_165, 1, x_155);
return x_165;
}
}
else
{
lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169;
lean_dec(x_148);
lean_dec(x_147);
lean_dec(x_146);
lean_dec(x_6);
x_166 = lean_ctor_get(x_149, 0);
lean_inc(x_166);
x_167 = lean_ctor_get(x_149, 1);
lean_inc(x_167);
if (lean_is_exclusive(x_149)) {
lean_ctor_release(x_149, 0);
lean_ctor_release(x_149, 1);
x_168 = x_149;
} else {
lean_dec_ref(x_149);
x_168 = lean_box(0);
}
if (lean_is_scalar(x_168)) {
x_169 = lean_alloc_ctor(1, 2, 0);
} else {
x_169 = x_168;
}
lean_ctor_set(x_169, 0, x_166);
lean_ctor_set(x_169, 1, x_167);
return x_169;
}
}
}
else
{
uint8_t x_170;
lean_dec(x_3);
lean_dec(x_2);
x_170 = !lean_is_exclusive(x_1);
if (x_170 == 0)
{
lean_object* x_171; uint8_t x_172;
x_171 = lean_ctor_get(x_1, 1);
lean_dec(x_171);
x_172 = !lean_is_exclusive(x_5);
if (x_172 == 0)
{
lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176;
x_173 = lean_ctor_get(x_5, 0);
lean_dec(x_173);
x_174 = lean_ctor_get(x_6, 1);
lean_inc(x_174);
lean_dec(x_6);
lean_ctor_set(x_5, 0, x_174);
x_175 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_175, 0, x_1);
x_176 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_176, 0, x_175);
lean_ctor_set(x_176, 1, x_4);
return x_176;
}
else
{
lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181;
x_177 = lean_ctor_get(x_5, 1);
lean_inc(x_177);
lean_dec(x_5);
x_178 = lean_ctor_get(x_6, 1);
lean_inc(x_178);
lean_dec(x_6);
x_179 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_179, 0, x_178);
lean_ctor_set(x_179, 1, x_177);
lean_ctor_set(x_1, 1, x_179);
x_180 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_180, 0, x_1);
x_181 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_181, 0, x_180);
lean_ctor_set(x_181, 1, x_4);
return x_181;
}
}
else
{
lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189;
x_182 = lean_ctor_get(x_1, 0);
lean_inc(x_182);
lean_dec(x_1);
x_183 = lean_ctor_get(x_5, 1);
lean_inc(x_183);
if (lean_is_exclusive(x_5)) {
lean_ctor_release(x_5, 0);
lean_ctor_release(x_5, 1);
x_184 = x_5;
} else {
lean_dec_ref(x_5);
x_184 = lean_box(0);
}
x_185 = lean_ctor_get(x_6, 1);
lean_inc(x_185);
lean_dec(x_6);
if (lean_is_scalar(x_184)) {
x_186 = lean_alloc_ctor(0, 2, 0);
} else {
x_186 = x_184;
}
lean_ctor_set(x_186, 0, x_185);
lean_ctor_set(x_186, 1, x_183);
x_187 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_187, 0, x_182);
lean_ctor_set(x_187, 1, x_186);
x_188 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_188, 0, x_187);
x_189 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_189, 0, x_188);
lean_ctor_set(x_189, 1, x_4);
return x_189;
}
}
}
}
}
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8;
x_5 = lean_ctor_get(x_1, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_1, 0);
lean_inc(x_6);
lean_dec(x_1);
x_7 = lean_ctor_get(x_5, 1);
lean_inc(x_7);
lean_dec(x_5);
x_8 = l_Array_isEmpty___rarg(x_7);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
x_9 = l_Array_empty___closed__1;
x_10 = lean_array_push(x_9, x_6);
x_11 = lean_unsigned_to_nat(0u);
x_12 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_7, x_7, x_11, x_9);
lean_dec(x_7);
x_13 = l_Lean_nullKind___closed__2;
x_14 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_14, 0, x_13);
lean_ctor_set(x_14, 1, x_12);
x_15 = lean_array_push(x_10, x_14);
x_16 = l_Lean_mkAppStx___closed__8;
x_17 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_17, 0, x_16);
lean_ctor_set(x_17, 1, x_15);
x_18 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_18, 0, x_17);
x_19 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set(x_19, 1, x_4);
return x_19;
}
else
{
lean_object* x_20; lean_object* x_21;
lean_dec(x_7);
x_20 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_20, 0, x_6);
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set(x_21, 1, x_4);
return x_21;
}
}
}
lean_object* _init_l_Lean_Delaborator_delabAppImplicit___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabAppImplicit___lambda__1), 4, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppImplicit___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Delaborator_delabAppExplicit___closed__1;
x_2 = l_Lean_Delaborator_delabAppImplicit___closed__1;
x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg), 5, 2);
lean_closure_set(x_3, 0, x_1);
lean_closure_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppImplicit___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabAppImplicit___lambda__2), 4, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppImplicit___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Delaborator_delabAppImplicit___closed__2;
x_2 = l_Lean_Delaborator_delabAppImplicit___closed__3;
x_3 = lean_alloc_closure((void*)(l_Lean_Delaborator_withAppFnArgs___rarg), 5, 2);
lean_closure_set(x_3, 0, x_1);
lean_closure_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppImplicit___closed__5() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabAppImplicit___lambda__3___boxed), 4, 0);
return x_1;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppImplicit___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Delaborator_delabAppImplicit___closed__4;
x_2 = l_Lean_Delaborator_delabAppImplicit___closed__5;
x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg), 5, 2);
lean_closure_set(x_3, 0, x_1);
lean_closure_set(x_3, 1, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Delaborator_delabAppImplicit___closed__7() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_getPPExplicit___boxed), 1, 0);
return x_1;
}
}
lean_object* l_Lean_Delaborator_delabAppImplicit(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_4 = l_Lean_Delaborator_delabAppImplicit___closed__7;
x_5 = l_Lean_Delaborator_delabAppImplicit___closed__6;
x_6 = l_Lean_Delaborator_whenNotPPOption(x_4, x_5, x_1, x_2, x_3);
return x_6;
}
}
lean_object* l_Lean_Delaborator_delabAppImplicit___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5;
x_5 = l_Lean_Delaborator_delabAppImplicit___lambda__3(x_1, x_2, x_3, x_4);
lean_dec(x_3);
lean_dec(x_2);
return x_5;
}
}
lean_object* _init_l___regBuiltin_Lean_Delaborator_delabAppImplicit___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabAppImplicit), 3, 0);
return x_1;
}
}
lean_object* l___regBuiltin_Lean_Delaborator_delabAppImplicit(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Delaborator_delabAttribute;
x_3 = l_Lean_Delaborator_getExprKind___closed__12;
x_4 = l___regBuiltin_Lean_Delaborator_delabAppImplicit___closed__1;
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* _init_l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_getPPBinderTypes___boxed), 1, 0);
return x_1;
}
}
lean_object* _init_l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1;
x_2 = lean_alloc_closure((void*)(l_Lean_Delaborator_getPPOption___boxed), 4, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* _init_l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3;
x_1 = 0;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
lean_object* l___private_Init_Lean_Delaborator_1__shouldGroupWithNext(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_ctor_get(x_4, 1);
lean_inc(x_6);
lean_dec(x_4);
x_7 = lean_ctor_get(x_5, 0);
lean_inc(x_7);
lean_dec(x_5);
x_8 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1;
lean_inc(x_1);
x_9 = l_Lean_Delaborator_getPPOption(x_8, x_1, x_2, x_6);
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
switch (lean_obj_tag(x_7)) {
case 6:
{
lean_object* x_11;
x_11 = lean_ctor_get(x_7, 2);
lean_inc(x_11);
if (lean_obj_tag(x_11) == 6)
{
uint8_t x_12;
x_12 = !lean_is_exclusive(x_9);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18;
x_13 = lean_ctor_get(x_9, 1);
x_14 = lean_ctor_get(x_9, 0);
lean_dec(x_14);
x_15 = lean_ctor_get(x_10, 0);
lean_inc(x_15);
lean_dec(x_10);
x_16 = l_Lean_Meta_mkAuxName___closed__1;
x_17 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2;
x_18 = l_Lean_Delaborator_withBindingBody___rarg(x_16, x_17, x_1, x_2, x_13);
if (lean_obj_tag(x_18) == 0)
{
lean_object* x_19;
x_19 = lean_ctor_get(x_18, 0);
lean_inc(x_19);
if (lean_obj_tag(x_19) == 0)
{
uint8_t x_20;
lean_dec(x_15);
lean_free_object(x_9);
lean_dec(x_11);
lean_dec(x_7);
x_20 = !lean_is_exclusive(x_18);
if (x_20 == 0)
{
lean_object* x_21; lean_object* x_22;
x_21 = lean_ctor_get(x_18, 0);
lean_dec(x_21);
x_22 = lean_box(0);
lean_ctor_set(x_18, 0, x_22);
return x_18;
}
else
{
lean_object* x_23; lean_object* x_24; lean_object* x_25;
x_23 = lean_ctor_get(x_18, 1);
lean_inc(x_23);
lean_dec(x_18);
x_24 = lean_box(0);
x_25 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_25, 0, x_24);
lean_ctor_set(x_25, 1, x_23);
return x_25;
}
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; uint8_t x_31; uint8_t x_32; uint8_t x_43;
x_26 = lean_ctor_get(x_18, 1);
lean_inc(x_26);
if (lean_is_exclusive(x_18)) {
lean_ctor_release(x_18, 0);
lean_ctor_release(x_18, 1);
x_27 = x_18;
} else {
lean_dec_ref(x_18);
x_27 = lean_box(0);
}
x_28 = lean_ctor_get(x_19, 0);
lean_inc(x_28);
if (lean_is_exclusive(x_19)) {
lean_ctor_release(x_19, 0);
x_29 = x_19;
} else {
lean_dec_ref(x_19);
x_29 = lean_box(0);
}
x_30 = l_Lean_Expr_binderInfo(x_7);
x_31 = l_Lean_Expr_binderInfo(x_11);
x_43 = l_Lean_BinderInfo_beq(x_30, x_31);
if (x_43 == 0)
{
lean_object* x_44;
lean_dec(x_29);
lean_dec(x_28);
lean_dec(x_27);
lean_dec(x_15);
lean_dec(x_11);
lean_dec(x_7);
x_44 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 1, x_26);
lean_ctor_set(x_9, 0, x_44);
return x_9;
}
else
{
lean_object* x_45; lean_object* x_46; uint8_t x_47;
x_45 = l_Lean_Expr_bindingDomain_x21(x_7);
lean_dec(x_7);
x_46 = l_Lean_Expr_bindingDomain_x21(x_11);
lean_dec(x_11);
x_47 = lean_expr_eqv(x_45, x_46);
lean_dec(x_46);
lean_dec(x_45);
if (x_47 == 0)
{
lean_object* x_48;
lean_dec(x_29);
lean_dec(x_28);
lean_dec(x_27);
lean_dec(x_15);
x_48 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 1, x_26);
lean_ctor_set(x_9, 0, x_48);
return x_9;
}
else
{
uint8_t x_49; uint8_t x_50;
x_49 = 3;
x_50 = l_Lean_BinderInfo_beq(x_31, x_49);
if (x_50 == 0)
{
uint8_t x_51;
lean_free_object(x_9);
x_51 = lean_unbox(x_15);
lean_dec(x_15);
if (x_51 == 0)
{
uint8_t x_52;
x_52 = lean_unbox(x_28);
if (x_52 == 0)
{
uint8_t x_53;
x_53 = 1;
x_32 = x_53;
goto block_42;
}
else
{
uint8_t x_54;
x_54 = 0;
x_32 = x_54;
goto block_42;
}
}
else
{
uint8_t x_55;
x_55 = lean_unbox(x_28);
if (x_55 == 0)
{
uint8_t x_56;
x_56 = 0;
x_32 = x_56;
goto block_42;
}
else
{
uint8_t x_57;
x_57 = 1;
x_32 = x_57;
goto block_42;
}
}
}
else
{
lean_object* x_58;
lean_dec(x_29);
lean_dec(x_28);
lean_dec(x_27);
lean_dec(x_15);
x_58 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 1, x_26);
lean_ctor_set(x_9, 0, x_58);
return x_9;
}
}
}
block_42:
{
if (x_32 == 0)
{
lean_object* x_33; lean_object* x_34;
lean_dec(x_29);
lean_dec(x_28);
x_33 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
if (lean_is_scalar(x_27)) {
x_34 = lean_alloc_ctor(0, 2, 0);
} else {
x_34 = x_27;
}
lean_ctor_set(x_34, 0, x_33);
lean_ctor_set(x_34, 1, x_26);
return x_34;
}
else
{
uint8_t x_35; uint8_t x_36;
x_35 = 0;
x_36 = l_Lean_BinderInfo_beq(x_31, x_35);
if (x_36 == 0)
{
lean_object* x_37; lean_object* x_38; lean_object* x_39;
lean_dec(x_28);
x_37 = lean_box(x_32);
if (lean_is_scalar(x_29)) {
x_38 = lean_alloc_ctor(1, 1, 0);
} else {
x_38 = x_29;
}
lean_ctor_set(x_38, 0, x_37);
if (lean_is_scalar(x_27)) {
x_39 = lean_alloc_ctor(0, 2, 0);
} else {
x_39 = x_27;
}
lean_ctor_set(x_39, 0, x_38);
lean_ctor_set(x_39, 1, x_26);
return x_39;
}
else
{
lean_object* x_40; lean_object* x_41;
if (lean_is_scalar(x_29)) {
x_40 = lean_alloc_ctor(1, 1, 0);
} else {
x_40 = x_29;
}
lean_ctor_set(x_40, 0, x_28);
if (lean_is_scalar(x_27)) {
x_41 = lean_alloc_ctor(0, 2, 0);
} else {
x_41 = x_27;
}
lean_ctor_set(x_41, 0, x_40);
lean_ctor_set(x_41, 1, x_26);
return x_41;
}
}
}
}
}
else
{
uint8_t x_59;
lean_dec(x_15);
lean_free_object(x_9);
lean_dec(x_11);
lean_dec(x_7);
x_59 = !lean_is_exclusive(x_18);
if (x_59 == 0)
{
return x_18;
}
else
{
lean_object* x_60; lean_object* x_61; lean_object* x_62;
x_60 = lean_ctor_get(x_18, 0);
x_61 = lean_ctor_get(x_18, 1);
lean_inc(x_61);
lean_inc(x_60);
lean_dec(x_18);
x_62 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_62, 0, x_60);
lean_ctor_set(x_62, 1, x_61);
return x_62;
}
}
}
else
{
lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
x_63 = lean_ctor_get(x_9, 1);
lean_inc(x_63);
lean_dec(x_9);
x_64 = lean_ctor_get(x_10, 0);
lean_inc(x_64);
lean_dec(x_10);
x_65 = l_Lean_Meta_mkAuxName___closed__1;
x_66 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2;
x_67 = l_Lean_Delaborator_withBindingBody___rarg(x_65, x_66, x_1, x_2, x_63);
if (lean_obj_tag(x_67) == 0)
{
lean_object* x_68;
x_68 = lean_ctor_get(x_67, 0);
lean_inc(x_68);
if (lean_obj_tag(x_68) == 0)
{
lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72;
lean_dec(x_64);
lean_dec(x_11);
lean_dec(x_7);
x_69 = lean_ctor_get(x_67, 1);
lean_inc(x_69);
if (lean_is_exclusive(x_67)) {
lean_ctor_release(x_67, 0);
lean_ctor_release(x_67, 1);
x_70 = x_67;
} else {
lean_dec_ref(x_67);
x_70 = lean_box(0);
}
x_71 = lean_box(0);
if (lean_is_scalar(x_70)) {
x_72 = lean_alloc_ctor(0, 2, 0);
} else {
x_72 = x_70;
}
lean_ctor_set(x_72, 0, x_71);
lean_ctor_set(x_72, 1, x_69);
return x_72;
}
else
{
lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77; uint8_t x_78; uint8_t x_79; uint8_t x_90;
x_73 = lean_ctor_get(x_67, 1);
lean_inc(x_73);
if (lean_is_exclusive(x_67)) {
lean_ctor_release(x_67, 0);
lean_ctor_release(x_67, 1);
x_74 = x_67;
} else {
lean_dec_ref(x_67);
x_74 = lean_box(0);
}
x_75 = lean_ctor_get(x_68, 0);
lean_inc(x_75);
if (lean_is_exclusive(x_68)) {
lean_ctor_release(x_68, 0);
x_76 = x_68;
} else {
lean_dec_ref(x_68);
x_76 = lean_box(0);
}
x_77 = l_Lean_Expr_binderInfo(x_7);
x_78 = l_Lean_Expr_binderInfo(x_11);
x_90 = l_Lean_BinderInfo_beq(x_77, x_78);
if (x_90 == 0)
{
lean_object* x_91; lean_object* x_92;
lean_dec(x_76);
lean_dec(x_75);
lean_dec(x_74);
lean_dec(x_64);
lean_dec(x_11);
lean_dec(x_7);
x_91 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_92 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_92, 0, x_91);
lean_ctor_set(x_92, 1, x_73);
return x_92;
}
else
{
lean_object* x_93; lean_object* x_94; uint8_t x_95;
x_93 = l_Lean_Expr_bindingDomain_x21(x_7);
lean_dec(x_7);
x_94 = l_Lean_Expr_bindingDomain_x21(x_11);
lean_dec(x_11);
x_95 = lean_expr_eqv(x_93, x_94);
lean_dec(x_94);
lean_dec(x_93);
if (x_95 == 0)
{
lean_object* x_96; lean_object* x_97;
lean_dec(x_76);
lean_dec(x_75);
lean_dec(x_74);
lean_dec(x_64);
x_96 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_97 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_97, 0, x_96);
lean_ctor_set(x_97, 1, x_73);
return x_97;
}
else
{
uint8_t x_98; uint8_t x_99;
x_98 = 3;
x_99 = l_Lean_BinderInfo_beq(x_78, x_98);
if (x_99 == 0)
{
uint8_t x_100;
x_100 = lean_unbox(x_64);
lean_dec(x_64);
if (x_100 == 0)
{
uint8_t x_101;
x_101 = lean_unbox(x_75);
if (x_101 == 0)
{
uint8_t x_102;
x_102 = 1;
x_79 = x_102;
goto block_89;
}
else
{
uint8_t x_103;
x_103 = 0;
x_79 = x_103;
goto block_89;
}
}
else
{
uint8_t x_104;
x_104 = lean_unbox(x_75);
if (x_104 == 0)
{
uint8_t x_105;
x_105 = 0;
x_79 = x_105;
goto block_89;
}
else
{
uint8_t x_106;
x_106 = 1;
x_79 = x_106;
goto block_89;
}
}
}
else
{
lean_object* x_107; lean_object* x_108;
lean_dec(x_76);
lean_dec(x_75);
lean_dec(x_74);
lean_dec(x_64);
x_107 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_108 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_108, 0, x_107);
lean_ctor_set(x_108, 1, x_73);
return x_108;
}
}
}
block_89:
{
if (x_79 == 0)
{
lean_object* x_80; lean_object* x_81;
lean_dec(x_76);
lean_dec(x_75);
x_80 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
if (lean_is_scalar(x_74)) {
x_81 = lean_alloc_ctor(0, 2, 0);
} else {
x_81 = x_74;
}
lean_ctor_set(x_81, 0, x_80);
lean_ctor_set(x_81, 1, x_73);
return x_81;
}
else
{
uint8_t x_82; uint8_t x_83;
x_82 = 0;
x_83 = l_Lean_BinderInfo_beq(x_78, x_82);
if (x_83 == 0)
{
lean_object* x_84; lean_object* x_85; lean_object* x_86;
lean_dec(x_75);
x_84 = lean_box(x_79);
if (lean_is_scalar(x_76)) {
x_85 = lean_alloc_ctor(1, 1, 0);
} else {
x_85 = x_76;
}
lean_ctor_set(x_85, 0, x_84);
if (lean_is_scalar(x_74)) {
x_86 = lean_alloc_ctor(0, 2, 0);
} else {
x_86 = x_74;
}
lean_ctor_set(x_86, 0, x_85);
lean_ctor_set(x_86, 1, x_73);
return x_86;
}
else
{
lean_object* x_87; lean_object* x_88;
if (lean_is_scalar(x_76)) {
x_87 = lean_alloc_ctor(1, 1, 0);
} else {
x_87 = x_76;
}
lean_ctor_set(x_87, 0, x_75);
if (lean_is_scalar(x_74)) {
x_88 = lean_alloc_ctor(0, 2, 0);
} else {
x_88 = x_74;
}
lean_ctor_set(x_88, 0, x_87);
lean_ctor_set(x_88, 1, x_73);
return x_88;
}
}
}
}
}
else
{
lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112;
lean_dec(x_64);
lean_dec(x_11);
lean_dec(x_7);
x_109 = lean_ctor_get(x_67, 0);
lean_inc(x_109);
x_110 = lean_ctor_get(x_67, 1);
lean_inc(x_110);
if (lean_is_exclusive(x_67)) {
lean_ctor_release(x_67, 0);
lean_ctor_release(x_67, 1);
x_111 = x_67;
} else {
lean_dec_ref(x_67);
x_111 = lean_box(0);
}
if (lean_is_scalar(x_111)) {
x_112 = lean_alloc_ctor(1, 2, 0);
} else {
x_112 = x_111;
}
lean_ctor_set(x_112, 0, x_109);
lean_ctor_set(x_112, 1, x_110);
return x_112;
}
}
}
else
{
uint8_t x_113;
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_7);
lean_dec(x_2);
lean_dec(x_1);
x_113 = !lean_is_exclusive(x_9);
if (x_113 == 0)
{
lean_object* x_114; lean_object* x_115;
x_114 = lean_ctor_get(x_9, 0);
lean_dec(x_114);
x_115 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 0, x_115);
return x_9;
}
else
{
lean_object* x_116; lean_object* x_117; lean_object* x_118;
x_116 = lean_ctor_get(x_9, 1);
lean_inc(x_116);
lean_dec(x_9);
x_117 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_118 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_118, 0, x_117);
lean_ctor_set(x_118, 1, x_116);
return x_118;
}
}
}
case 7:
{
lean_object* x_119;
x_119 = lean_ctor_get(x_7, 2);
lean_inc(x_119);
if (lean_obj_tag(x_119) == 7)
{
uint8_t x_120;
x_120 = !lean_is_exclusive(x_9);
if (x_120 == 0)
{
lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126;
x_121 = lean_ctor_get(x_9, 1);
x_122 = lean_ctor_get(x_9, 0);
lean_dec(x_122);
x_123 = lean_ctor_get(x_10, 0);
lean_inc(x_123);
lean_dec(x_10);
x_124 = l_Lean_Meta_mkAuxName___closed__1;
x_125 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2;
x_126 = l_Lean_Delaborator_withBindingBody___rarg(x_124, x_125, x_1, x_2, x_121);
if (lean_obj_tag(x_126) == 0)
{
lean_object* x_127;
x_127 = lean_ctor_get(x_126, 0);
lean_inc(x_127);
if (lean_obj_tag(x_127) == 0)
{
uint8_t x_128;
lean_dec(x_123);
lean_free_object(x_9);
lean_dec(x_119);
lean_dec(x_7);
x_128 = !lean_is_exclusive(x_126);
if (x_128 == 0)
{
lean_object* x_129; lean_object* x_130;
x_129 = lean_ctor_get(x_126, 0);
lean_dec(x_129);
x_130 = lean_box(0);
lean_ctor_set(x_126, 0, x_130);
return x_126;
}
else
{
lean_object* x_131; lean_object* x_132; lean_object* x_133;
x_131 = lean_ctor_get(x_126, 1);
lean_inc(x_131);
lean_dec(x_126);
x_132 = lean_box(0);
x_133 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_133, 0, x_132);
lean_ctor_set(x_133, 1, x_131);
return x_133;
}
}
else
{
lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; uint8_t x_138; uint8_t x_139; uint8_t x_140; uint8_t x_151;
x_134 = lean_ctor_get(x_126, 1);
lean_inc(x_134);
if (lean_is_exclusive(x_126)) {
lean_ctor_release(x_126, 0);
lean_ctor_release(x_126, 1);
x_135 = x_126;
} else {
lean_dec_ref(x_126);
x_135 = lean_box(0);
}
x_136 = lean_ctor_get(x_127, 0);
lean_inc(x_136);
if (lean_is_exclusive(x_127)) {
lean_ctor_release(x_127, 0);
x_137 = x_127;
} else {
lean_dec_ref(x_127);
x_137 = lean_box(0);
}
x_138 = l_Lean_Expr_binderInfo(x_7);
x_139 = l_Lean_Expr_binderInfo(x_119);
x_151 = l_Lean_BinderInfo_beq(x_138, x_139);
if (x_151 == 0)
{
lean_object* x_152;
lean_dec(x_137);
lean_dec(x_136);
lean_dec(x_135);
lean_dec(x_123);
lean_dec(x_119);
lean_dec(x_7);
x_152 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 1, x_134);
lean_ctor_set(x_9, 0, x_152);
return x_9;
}
else
{
lean_object* x_153; lean_object* x_154; uint8_t x_155;
x_153 = l_Lean_Expr_bindingDomain_x21(x_7);
lean_dec(x_7);
x_154 = l_Lean_Expr_bindingDomain_x21(x_119);
lean_dec(x_119);
x_155 = lean_expr_eqv(x_153, x_154);
lean_dec(x_154);
lean_dec(x_153);
if (x_155 == 0)
{
lean_object* x_156;
lean_dec(x_137);
lean_dec(x_136);
lean_dec(x_135);
lean_dec(x_123);
x_156 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 1, x_134);
lean_ctor_set(x_9, 0, x_156);
return x_9;
}
else
{
uint8_t x_157; uint8_t x_158;
x_157 = 3;
x_158 = l_Lean_BinderInfo_beq(x_139, x_157);
if (x_158 == 0)
{
uint8_t x_159;
lean_free_object(x_9);
x_159 = lean_unbox(x_123);
lean_dec(x_123);
if (x_159 == 0)
{
uint8_t x_160;
x_160 = lean_unbox(x_136);
if (x_160 == 0)
{
uint8_t x_161;
x_161 = 1;
x_140 = x_161;
goto block_150;
}
else
{
uint8_t x_162;
x_162 = 0;
x_140 = x_162;
goto block_150;
}
}
else
{
uint8_t x_163;
x_163 = lean_unbox(x_136);
if (x_163 == 0)
{
uint8_t x_164;
x_164 = 0;
x_140 = x_164;
goto block_150;
}
else
{
uint8_t x_165;
x_165 = 1;
x_140 = x_165;
goto block_150;
}
}
}
else
{
lean_object* x_166;
lean_dec(x_137);
lean_dec(x_136);
lean_dec(x_135);
lean_dec(x_123);
x_166 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 1, x_134);
lean_ctor_set(x_9, 0, x_166);
return x_9;
}
}
}
block_150:
{
if (x_140 == 0)
{
lean_object* x_141; lean_object* x_142;
lean_dec(x_137);
lean_dec(x_136);
x_141 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
if (lean_is_scalar(x_135)) {
x_142 = lean_alloc_ctor(0, 2, 0);
} else {
x_142 = x_135;
}
lean_ctor_set(x_142, 0, x_141);
lean_ctor_set(x_142, 1, x_134);
return x_142;
}
else
{
uint8_t x_143; uint8_t x_144;
x_143 = 0;
x_144 = l_Lean_BinderInfo_beq(x_139, x_143);
if (x_144 == 0)
{
lean_object* x_145; lean_object* x_146; lean_object* x_147;
lean_dec(x_136);
x_145 = lean_box(x_140);
if (lean_is_scalar(x_137)) {
x_146 = lean_alloc_ctor(1, 1, 0);
} else {
x_146 = x_137;
}
lean_ctor_set(x_146, 0, x_145);
if (lean_is_scalar(x_135)) {
x_147 = lean_alloc_ctor(0, 2, 0);
} else {
x_147 = x_135;
}
lean_ctor_set(x_147, 0, x_146);
lean_ctor_set(x_147, 1, x_134);
return x_147;
}
else
{
lean_object* x_148; lean_object* x_149;
if (lean_is_scalar(x_137)) {
x_148 = lean_alloc_ctor(1, 1, 0);
} else {
x_148 = x_137;
}
lean_ctor_set(x_148, 0, x_136);
if (lean_is_scalar(x_135)) {
x_149 = lean_alloc_ctor(0, 2, 0);
} else {
x_149 = x_135;
}
lean_ctor_set(x_149, 0, x_148);
lean_ctor_set(x_149, 1, x_134);
return x_149;
}
}
}
}
}
else
{
uint8_t x_167;
lean_dec(x_123);
lean_free_object(x_9);
lean_dec(x_119);
lean_dec(x_7);
x_167 = !lean_is_exclusive(x_126);
if (x_167 == 0)
{
return x_126;
}
else
{
lean_object* x_168; lean_object* x_169; lean_object* x_170;
x_168 = lean_ctor_get(x_126, 0);
x_169 = lean_ctor_get(x_126, 1);
lean_inc(x_169);
lean_inc(x_168);
lean_dec(x_126);
x_170 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_170, 0, x_168);
lean_ctor_set(x_170, 1, x_169);
return x_170;
}
}
}
else
{
lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175;
x_171 = lean_ctor_get(x_9, 1);
lean_inc(x_171);
lean_dec(x_9);
x_172 = lean_ctor_get(x_10, 0);
lean_inc(x_172);
lean_dec(x_10);
x_173 = l_Lean_Meta_mkAuxName___closed__1;
x_174 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2;
x_175 = l_Lean_Delaborator_withBindingBody___rarg(x_173, x_174, x_1, x_2, x_171);
if (lean_obj_tag(x_175) == 0)
{
lean_object* x_176;
x_176 = lean_ctor_get(x_175, 0);
lean_inc(x_176);
if (lean_obj_tag(x_176) == 0)
{
lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180;
lean_dec(x_172);
lean_dec(x_119);
lean_dec(x_7);
x_177 = lean_ctor_get(x_175, 1);
lean_inc(x_177);
if (lean_is_exclusive(x_175)) {
lean_ctor_release(x_175, 0);
lean_ctor_release(x_175, 1);
x_178 = x_175;
} else {
lean_dec_ref(x_175);
x_178 = lean_box(0);
}
x_179 = lean_box(0);
if (lean_is_scalar(x_178)) {
x_180 = lean_alloc_ctor(0, 2, 0);
} else {
x_180 = x_178;
}
lean_ctor_set(x_180, 0, x_179);
lean_ctor_set(x_180, 1, x_177);
return x_180;
}
else
{
lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; uint8_t x_185; uint8_t x_186; uint8_t x_187; uint8_t x_198;
x_181 = lean_ctor_get(x_175, 1);
lean_inc(x_181);
if (lean_is_exclusive(x_175)) {
lean_ctor_release(x_175, 0);
lean_ctor_release(x_175, 1);
x_182 = x_175;
} else {
lean_dec_ref(x_175);
x_182 = lean_box(0);
}
x_183 = lean_ctor_get(x_176, 0);
lean_inc(x_183);
if (lean_is_exclusive(x_176)) {
lean_ctor_release(x_176, 0);
x_184 = x_176;
} else {
lean_dec_ref(x_176);
x_184 = lean_box(0);
}
x_185 = l_Lean_Expr_binderInfo(x_7);
x_186 = l_Lean_Expr_binderInfo(x_119);
x_198 = l_Lean_BinderInfo_beq(x_185, x_186);
if (x_198 == 0)
{
lean_object* x_199; lean_object* x_200;
lean_dec(x_184);
lean_dec(x_183);
lean_dec(x_182);
lean_dec(x_172);
lean_dec(x_119);
lean_dec(x_7);
x_199 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_200 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_200, 0, x_199);
lean_ctor_set(x_200, 1, x_181);
return x_200;
}
else
{
lean_object* x_201; lean_object* x_202; uint8_t x_203;
x_201 = l_Lean_Expr_bindingDomain_x21(x_7);
lean_dec(x_7);
x_202 = l_Lean_Expr_bindingDomain_x21(x_119);
lean_dec(x_119);
x_203 = lean_expr_eqv(x_201, x_202);
lean_dec(x_202);
lean_dec(x_201);
if (x_203 == 0)
{
lean_object* x_204; lean_object* x_205;
lean_dec(x_184);
lean_dec(x_183);
lean_dec(x_182);
lean_dec(x_172);
x_204 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_205 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_205, 0, x_204);
lean_ctor_set(x_205, 1, x_181);
return x_205;
}
else
{
uint8_t x_206; uint8_t x_207;
x_206 = 3;
x_207 = l_Lean_BinderInfo_beq(x_186, x_206);
if (x_207 == 0)
{
uint8_t x_208;
x_208 = lean_unbox(x_172);
lean_dec(x_172);
if (x_208 == 0)
{
uint8_t x_209;
x_209 = lean_unbox(x_183);
if (x_209 == 0)
{
uint8_t x_210;
x_210 = 1;
x_187 = x_210;
goto block_197;
}
else
{
uint8_t x_211;
x_211 = 0;
x_187 = x_211;
goto block_197;
}
}
else
{
uint8_t x_212;
x_212 = lean_unbox(x_183);
if (x_212 == 0)
{
uint8_t x_213;
x_213 = 0;
x_187 = x_213;
goto block_197;
}
else
{
uint8_t x_214;
x_214 = 1;
x_187 = x_214;
goto block_197;
}
}
}
else
{
lean_object* x_215; lean_object* x_216;
lean_dec(x_184);
lean_dec(x_183);
lean_dec(x_182);
lean_dec(x_172);
x_215 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_216 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_216, 0, x_215);
lean_ctor_set(x_216, 1, x_181);
return x_216;
}
}
}
block_197:
{
if (x_187 == 0)
{
lean_object* x_188; lean_object* x_189;
lean_dec(x_184);
lean_dec(x_183);
x_188 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
if (lean_is_scalar(x_182)) {
x_189 = lean_alloc_ctor(0, 2, 0);
} else {
x_189 = x_182;
}
lean_ctor_set(x_189, 0, x_188);
lean_ctor_set(x_189, 1, x_181);
return x_189;
}
else
{
uint8_t x_190; uint8_t x_191;
x_190 = 0;
x_191 = l_Lean_BinderInfo_beq(x_186, x_190);
if (x_191 == 0)
{
lean_object* x_192; lean_object* x_193; lean_object* x_194;
lean_dec(x_183);
x_192 = lean_box(x_187);
if (lean_is_scalar(x_184)) {
x_193 = lean_alloc_ctor(1, 1, 0);
} else {
x_193 = x_184;
}
lean_ctor_set(x_193, 0, x_192);
if (lean_is_scalar(x_182)) {
x_194 = lean_alloc_ctor(0, 2, 0);
} else {
x_194 = x_182;
}
lean_ctor_set(x_194, 0, x_193);
lean_ctor_set(x_194, 1, x_181);
return x_194;
}
else
{
lean_object* x_195; lean_object* x_196;
if (lean_is_scalar(x_184)) {
x_195 = lean_alloc_ctor(1, 1, 0);
} else {
x_195 = x_184;
}
lean_ctor_set(x_195, 0, x_183);
if (lean_is_scalar(x_182)) {
x_196 = lean_alloc_ctor(0, 2, 0);
} else {
x_196 = x_182;
}
lean_ctor_set(x_196, 0, x_195);
lean_ctor_set(x_196, 1, x_181);
return x_196;
}
}
}
}
}
else
{
lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220;
lean_dec(x_172);
lean_dec(x_119);
lean_dec(x_7);
x_217 = lean_ctor_get(x_175, 0);
lean_inc(x_217);
x_218 = lean_ctor_get(x_175, 1);
lean_inc(x_218);
if (lean_is_exclusive(x_175)) {
lean_ctor_release(x_175, 0);
lean_ctor_release(x_175, 1);
x_219 = x_175;
} else {
lean_dec_ref(x_175);
x_219 = lean_box(0);
}
if (lean_is_scalar(x_219)) {
x_220 = lean_alloc_ctor(1, 2, 0);
} else {
x_220 = x_219;
}
lean_ctor_set(x_220, 0, x_217);
lean_ctor_set(x_220, 1, x_218);
return x_220;
}
}
}
else
{
uint8_t x_221;
lean_dec(x_119);
lean_dec(x_10);
lean_dec(x_7);
lean_dec(x_2);
lean_dec(x_1);
x_221 = !lean_is_exclusive(x_9);
if (x_221 == 0)
{
lean_object* x_222; lean_object* x_223;
x_222 = lean_ctor_get(x_9, 0);
lean_dec(x_222);
x_223 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 0, x_223);
return x_9;
}
else
{
lean_object* x_224; lean_object* x_225; lean_object* x_226;
x_224 = lean_ctor_get(x_9, 1);
lean_inc(x_224);
lean_dec(x_9);
x_225 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_226 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_226, 0, x_225);
lean_ctor_set(x_226, 1, x_224);
return x_226;
}
}
}
default:
{
uint8_t x_227;
lean_dec(x_10);
lean_dec(x_7);
lean_dec(x_2);
lean_dec(x_1);
x_227 = !lean_is_exclusive(x_9);
if (x_227 == 0)
{
lean_object* x_228; lean_object* x_229;
x_228 = lean_ctor_get(x_9, 0);
lean_dec(x_228);
x_229 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
lean_ctor_set(x_9, 0, x_229);
return x_9;
}
else
{
lean_object* x_230; lean_object* x_231; lean_object* x_232;
x_230 = lean_ctor_get(x_9, 1);
lean_inc(x_230);
lean_dec(x_9);
x_231 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3;
x_232 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_232, 0, x_231);
lean_ctor_set(x_232, 1, x_230);
return x_232;
}
}
}
}
}
lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Delaborator_2__delabLamAux___main___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; uint8_t x_4;
x_3 = lean_array_get_size(x_2);
x_4 = lean_nat_dec_lt(x_1, x_3);
lean_dec(x_3);
if (x_4 == 0)
{
lean_dec(x_1);
return x_2;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_5 = lean_array_fget(x_2, x_1);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_fset(x_2, x_1, x_6);
x_8 = x_5;
x_9 = l_Lean_mkTermIdFromIdent(x_8);
x_10 = lean_unsigned_to_nat(1u);
x_11 = lean_nat_add(x_1, x_10);
x_12 = x_9;
x_13 = lean_array_fset(x_7, x_1, x_12);
lean_dec(x_1);
x_1 = x_11;
x_2 = x_13;
goto _start;
}
}
}
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux___main___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33;
x_6 = lean_unsigned_to_nat(0u);
x_7 = l_Array_empty___closed__1;
x_8 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_6, x_7);
x_9 = l_Lean_nullKind___closed__2;
x_10 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_10, 0, x_9);
lean_ctor_set(x_10, 1, x_8);
x_11 = l_Lean_Elab_Term_expandCDot_x3f___closed__2;
x_12 = lean_array_push(x_11, x_10);
x_13 = l_Lean_Elab_Term_expandCDot_x3f___closed__3;
x_14 = lean_array_push(x_12, x_13);
x_15 = lean_array_push(x_14, x_2);
x_16 = l_Lean_Parser_Term_fun___elambda__1___closed__2;
x_17 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_17, 0, x_16);
lean_ctor_set(x_17, 1, x_15);
x_18 = lean_array_push(x_7, x_17);
x_19 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4;
x_20 = lean_array_push(x_18, x_19);
x_21 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_21, 0, x_9);
lean_ctor_set(x_21, 1, x_20);
x_22 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__41;
x_23 = lean_array_push(x_22, x_21);
x_24 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__57;
x_25 = lean_array_push(x_23, x_24);
x_26 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_27 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_27, 0, x_26);
lean_ctor_set(x_27, 1, x_25);
x_28 = l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2;
x_29 = lean_array_push(x_28, x_27);
x_30 = l_Lean_Parser_Term_explicit___elambda__1___closed__2;
x_31 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_31, 0, x_30);
lean_ctor_set(x_31, 1, x_29);
x_32 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_32, 0, x_31);
x_33 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_33, 0, x_32);
lean_ctor_set(x_33, 1, x_5);
return x_33;
}
}
lean_object* _init_l___private_Init_Lean_Delaborator_2__delabLamAux___main___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delab), 3, 0);
return x_1;
}
}
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_6 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1;
lean_inc(x_3);
x_7 = l_Lean_Delaborator_getPPOption(x_6, x_3, x_4, x_5);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
x_9 = lean_ctor_get(x_7, 1);
lean_inc(x_9);
lean_dec(x_7);
x_10 = lean_ctor_get(x_8, 0);
lean_inc(x_10);
lean_dec(x_8);
x_11 = l_Lean_Delaborator_getExpr(x_3, x_4, x_9);
x_12 = lean_ctor_get(x_11, 0);
lean_inc(x_12);
x_13 = lean_ctor_get(x_12, 0);
lean_inc(x_13);
lean_dec(x_12);
if (lean_obj_tag(x_13) == 6)
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25;
x_14 = lean_ctor_get(x_11, 1);
lean_inc(x_14);
lean_dec(x_11);
x_15 = lean_ctor_get(x_13, 0);
lean_inc(x_15);
x_16 = lean_ctor_get(x_13, 2);
lean_inc(x_16);
x_17 = lean_ctor_get(x_4, 1);
lean_inc(x_17);
x_18 = lean_local_ctx_get_unused_name(x_17, x_15);
lean_inc(x_18);
x_19 = lean_mk_syntax_ident(x_18);
lean_inc(x_3);
x_20 = l_Lean_Delaborator_annotateCurPos(x_19, x_3, x_4, x_14);
x_21 = lean_ctor_get(x_20, 0);
lean_inc(x_21);
x_22 = lean_ctor_get(x_20, 1);
lean_inc(x_22);
lean_dec(x_20);
x_23 = lean_ctor_get(x_21, 0);
lean_inc(x_23);
lean_dec(x_21);
lean_inc(x_23);
x_24 = lean_array_push(x_2, x_23);
lean_inc(x_4);
lean_inc(x_3);
x_25 = l___private_Init_Lean_Delaborator_1__shouldGroupWithNext(x_3, x_4, x_22);
if (lean_obj_tag(x_25) == 0)
{
lean_object* x_26;
x_26 = lean_ctor_get(x_25, 0);
lean_inc(x_26);
if (lean_obj_tag(x_26) == 0)
{
uint8_t x_27;
lean_dec(x_24);
lean_dec(x_23);
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_13);
lean_dec(x_10);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_27 = !lean_is_exclusive(x_25);
if (x_27 == 0)
{
lean_object* x_28; lean_object* x_29;
x_28 = lean_ctor_get(x_25, 0);
lean_dec(x_28);
x_29 = lean_box(0);
lean_ctor_set(x_25, 0, x_29);
return x_25;
}
else
{
lean_object* x_30; lean_object* x_31; lean_object* x_32;
x_30 = lean_ctor_get(x_25, 1);
lean_inc(x_30);
lean_dec(x_25);
x_31 = lean_box(0);
x_32 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_32, 0, x_31);
lean_ctor_set(x_32, 1, x_30);
return x_32;
}
}
else
{
lean_object* x_33; uint8_t x_34;
x_33 = lean_ctor_get(x_26, 0);
lean_inc(x_33);
lean_dec(x_26);
x_34 = lean_unbox(x_33);
lean_dec(x_33);
if (x_34 == 0)
{
lean_object* x_35; lean_object* x_36; lean_object* x_37;
x_35 = lean_ctor_get(x_25, 1);
lean_inc(x_35);
lean_dec(x_25);
x_36 = l___private_Init_Lean_Delaborator_2__delabLamAux___main___closed__1;
lean_inc(x_4);
lean_inc(x_3);
x_37 = l_Lean_Delaborator_withBindingDomain___rarg(x_36, x_3, x_4, x_35);
if (lean_obj_tag(x_37) == 0)
{
lean_object* x_38;
x_38 = lean_ctor_get(x_37, 0);
lean_inc(x_38);
if (lean_obj_tag(x_38) == 0)
{
uint8_t x_39;
lean_dec(x_24);
lean_dec(x_23);
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_13);
lean_dec(x_10);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_39 = !lean_is_exclusive(x_37);
if (x_39 == 0)
{
lean_object* x_40; lean_object* x_41;
x_40 = lean_ctor_get(x_37, 0);
lean_dec(x_40);
x_41 = lean_box(0);
lean_ctor_set(x_37, 0, x_41);
return x_37;
}
else
{
lean_object* x_42; lean_object* x_43; lean_object* x_44;
x_42 = lean_ctor_get(x_37, 1);
lean_inc(x_42);
lean_dec(x_37);
x_43 = lean_box(0);
x_44 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_44, 0, x_43);
lean_ctor_set(x_44, 1, x_42);
return x_44;
}
}
else
{
lean_object* x_45; lean_object* x_46; uint8_t x_47;
x_45 = lean_ctor_get(x_37, 1);
lean_inc(x_45);
if (lean_is_exclusive(x_37)) {
lean_ctor_release(x_37, 0);
lean_ctor_release(x_37, 1);
x_46 = x_37;
} else {
lean_dec_ref(x_37);
x_46 = lean_box(0);
}
x_47 = !lean_is_exclusive(x_38);
if (x_47 == 0)
{
lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_63; lean_object* x_64;
x_48 = lean_ctor_get(x_38, 0);
x_63 = l_Lean_Expr_binderInfo(x_13);
lean_dec(x_13);
x_64 = lean_box(x_63);
switch (lean_obj_tag(x_64)) {
case 0:
{
uint8_t x_65;
x_65 = lean_unbox(x_10);
lean_dec(x_10);
if (x_65 == 0)
{
lean_object* x_66;
lean_dec(x_48);
lean_dec(x_24);
x_66 = l_Lean_mkTermIdFromIdent(x_23);
lean_ctor_set(x_38, 0, x_66);
x_49 = x_38;
x_50 = x_45;
goto block_62;
}
else
{
lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73;
lean_dec(x_23);
x_67 = x_24;
x_68 = lean_unsigned_to_nat(0u);
x_69 = l_Array_umapMAux___main___at___private_Init_Lean_Delaborator_2__delabLamAux___main___spec__1(x_68, x_67);
x_70 = x_69;
x_71 = lean_array_get_size(x_70);
x_72 = lean_unsigned_to_nat(1u);
x_73 = lean_nat_dec_lt(x_72, x_71);
lean_dec(x_71);
if (x_73 == 0)
{
lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92;
x_74 = l_Lean_Syntax_inhabited;
x_75 = lean_array_get(x_74, x_70, x_68);
lean_dec(x_70);
x_76 = l_Array_empty___closed__1;
x_77 = lean_array_push(x_76, x_75);
x_78 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__2;
x_79 = lean_array_push(x_78, x_48);
x_80 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2;
x_81 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_81, 0, x_80);
lean_ctor_set(x_81, 1, x_79);
x_82 = lean_array_push(x_76, x_81);
x_83 = l_Lean_nullKind___closed__2;
x_84 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_84, 0, x_83);
lean_ctor_set(x_84, 1, x_82);
x_85 = lean_array_push(x_77, x_84);
x_86 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_86, 0, x_83);
lean_ctor_set(x_86, 1, x_85);
x_87 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__41;
x_88 = lean_array_push(x_87, x_86);
x_89 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__57;
x_90 = lean_array_push(x_88, x_89);
x_91 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_92 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_92, 0, x_91);
lean_ctor_set(x_92, 1, x_90);
lean_ctor_set(x_38, 0, x_92);
x_49 = x_38;
x_50 = x_45;
goto block_62;
}
else
{
lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118;
x_93 = l_Lean_Syntax_inhabited;
x_94 = lean_array_get(x_93, x_70, x_68);
x_95 = l_Array_empty___closed__1;
x_96 = lean_array_push(x_95, x_94);
x_97 = l_Array_eraseIdx___rarg(x_70, x_68);
x_98 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_97, x_97, x_68, x_95);
lean_dec(x_97);
x_99 = l_Lean_nullKind___closed__2;
x_100 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_100, 0, x_99);
lean_ctor_set(x_100, 1, x_98);
x_101 = lean_array_push(x_96, x_100);
x_102 = l_Lean_mkAppStx___closed__8;
x_103 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_103, 0, x_102);
lean_ctor_set(x_103, 1, x_101);
x_104 = lean_array_push(x_95, x_103);
x_105 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__2;
x_106 = lean_array_push(x_105, x_48);
x_107 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2;
x_108 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_108, 0, x_107);
lean_ctor_set(x_108, 1, x_106);
x_109 = lean_array_push(x_95, x_108);
x_110 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_110, 0, x_99);
lean_ctor_set(x_110, 1, x_109);
x_111 = lean_array_push(x_104, x_110);
x_112 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_112, 0, x_99);
lean_ctor_set(x_112, 1, x_111);
x_113 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__41;
x_114 = lean_array_push(x_113, x_112);
x_115 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__57;
x_116 = lean_array_push(x_114, x_115);
x_117 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_118 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_118, 0, x_117);
lean_ctor_set(x_118, 1, x_116);
lean_ctor_set(x_38, 0, x_118);
x_49 = x_38;
x_50 = x_45;
goto block_62;
}
}
}
case 1:
{
uint8_t x_119;
lean_dec(x_23);
x_119 = lean_unbox(x_10);
lean_dec(x_10);
if (x_119 == 0)
{
lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132;
lean_dec(x_48);
x_120 = lean_unsigned_to_nat(0u);
x_121 = l_Array_empty___closed__1;
x_122 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_24, x_24, x_120, x_121);
lean_dec(x_24);
x_123 = l_Lean_nullKind___closed__2;
x_124 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_124, 0, x_123);
lean_ctor_set(x_124, 1, x_122);
x_125 = l___private_Init_Lean_Elab_DoNotation_7__expandDoElemsAux___main___closed__2;
x_126 = lean_array_push(x_125, x_124);
x_127 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4;
x_128 = lean_array_push(x_126, x_127);
x_129 = l_Lean_Delaborator_delabConst___closed__4;
x_130 = lean_array_push(x_128, x_129);
x_131 = l_Lean_Parser_Term_implicitBinder___elambda__1___closed__2;
x_132 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_132, 0, x_131);
lean_ctor_set(x_132, 1, x_130);
lean_ctor_set(x_38, 0, x_132);
x_49 = x_38;
x_50 = x_45;
goto block_62;
}
else
{
lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147;
x_133 = lean_unsigned_to_nat(0u);
x_134 = l_Array_empty___closed__1;
x_135 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_24, x_24, x_133, x_134);
lean_dec(x_24);
x_136 = l_Lean_nullKind___closed__2;
x_137 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_137, 0, x_136);
lean_ctor_set(x_137, 1, x_135);
x_138 = l___private_Init_Lean_Elab_DoNotation_7__expandDoElemsAux___main___closed__2;
x_139 = lean_array_push(x_138, x_137);
x_140 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__2;
x_141 = lean_array_push(x_140, x_48);
x_142 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_142, 0, x_136);
lean_ctor_set(x_142, 1, x_141);
x_143 = lean_array_push(x_139, x_142);
x_144 = l_Lean_Delaborator_delabConst___closed__4;
x_145 = lean_array_push(x_143, x_144);
x_146 = l_Lean_Parser_Term_implicitBinder___elambda__1___closed__2;
x_147 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_147, 0, x_146);
lean_ctor_set(x_147, 1, x_145);
lean_ctor_set(x_38, 0, x_147);
x_49 = x_38;
x_50 = x_45;
goto block_62;
}
}
case 3:
{
lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160;
lean_dec(x_24);
lean_dec(x_10);
x_148 = l_Array_empty___closed__1;
x_149 = lean_array_push(x_148, x_23);
x_150 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__1;
x_151 = lean_array_push(x_149, x_150);
x_152 = l_Lean_nullKind___closed__2;
x_153 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_153, 0, x_152);
lean_ctor_set(x_153, 1, x_151);
x_154 = l_Lean_Elab_Term_elabArrayLit___closed__10;
x_155 = lean_array_push(x_154, x_153);
x_156 = lean_array_push(x_155, x_48);
x_157 = l_Lean_Elab_Term_elabArrayLit___closed__11;
x_158 = lean_array_push(x_156, x_157);
x_159 = l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
x_160 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_160, 0, x_159);
lean_ctor_set(x_160, 1, x_158);
lean_ctor_set(x_38, 0, x_160);
x_49 = x_38;
x_50 = x_45;
goto block_62;
}
default:
{
lean_object* x_161; lean_object* x_162; lean_object* x_163;
lean_dec(x_64);
lean_free_object(x_38);
lean_dec(x_48);
lean_dec(x_24);
lean_dec(x_23);
lean_dec(x_10);
x_161 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_162 = l_unreachable_x21___rarg(x_161);
lean_inc(x_4);
lean_inc(x_3);
x_163 = lean_apply_3(x_162, x_3, x_4, x_45);
if (lean_obj_tag(x_163) == 0)
{
lean_object* x_164; lean_object* x_165;
x_164 = lean_ctor_get(x_163, 0);
lean_inc(x_164);
x_165 = lean_ctor_get(x_163, 1);
lean_inc(x_165);
lean_dec(x_163);
x_49 = x_164;
x_50 = x_165;
goto block_62;
}
else
{
uint8_t x_166;
lean_dec(x_46);
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_166 = !lean_is_exclusive(x_163);
if (x_166 == 0)
{
return x_163;
}
else
{
lean_object* x_167; lean_object* x_168; lean_object* x_169;
x_167 = lean_ctor_get(x_163, 0);
x_168 = lean_ctor_get(x_163, 1);
lean_inc(x_168);
lean_inc(x_167);
lean_dec(x_163);
x_169 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_169, 0, x_167);
lean_ctor_set(x_169, 1, x_168);
return x_169;
}
}
}
}
block_62:
{
if (lean_obj_tag(x_49) == 0)
{
lean_object* x_51; lean_object* x_52;
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_51 = lean_box(0);
if (lean_is_scalar(x_46)) {
x_52 = lean_alloc_ctor(0, 2, 0);
} else {
x_52 = x_46;
}
lean_ctor_set(x_52, 0, x_51);
lean_ctor_set(x_52, 1, x_50);
return x_52;
}
else
{
lean_object* x_53; lean_object* x_54; uint8_t x_55;
lean_dec(x_46);
x_53 = lean_ctor_get(x_49, 0);
lean_inc(x_53);
lean_dec(x_49);
x_54 = lean_array_push(x_1, x_53);
x_55 = l_Lean_Expr_isLambda(x_16);
lean_dec(x_16);
if (x_55 == 0)
{
lean_object* x_56; lean_object* x_57; lean_object* x_58;
x_56 = lean_alloc_closure((void*)(l___private_Init_Lean_Delaborator_2__delabLamAux___main___lambda__1___boxed), 5, 1);
lean_closure_set(x_56, 0, x_54);
x_57 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg), 5, 2);
lean_closure_set(x_57, 0, x_36);
lean_closure_set(x_57, 1, x_56);
x_58 = l_Lean_Delaborator_withBindingBody___rarg(x_18, x_57, x_3, x_4, x_50);
return x_58;
}
else
{
lean_object* x_59; lean_object* x_60; lean_object* x_61;
x_59 = l_Array_empty___closed__1;
x_60 = lean_alloc_closure((void*)(l___private_Init_Lean_Delaborator_2__delabLamAux___main), 5, 2);
lean_closure_set(x_60, 0, x_54);
lean_closure_set(x_60, 1, x_59);
x_61 = l_Lean_Delaborator_withBindingBody___rarg(x_18, x_60, x_3, x_4, x_50);
return x_61;
}
}
}
}
else
{
lean_object* x_170; lean_object* x_171; lean_object* x_172; uint8_t x_185; lean_object* x_186;
x_170 = lean_ctor_get(x_38, 0);
lean_inc(x_170);
lean_dec(x_38);
x_185 = l_Lean_Expr_binderInfo(x_13);
lean_dec(x_13);
x_186 = lean_box(x_185);
switch (lean_obj_tag(x_186)) {
case 0:
{
uint8_t x_187;
x_187 = lean_unbox(x_10);
lean_dec(x_10);
if (x_187 == 0)
{
lean_object* x_188; lean_object* x_189;
lean_dec(x_170);
lean_dec(x_24);
x_188 = l_Lean_mkTermIdFromIdent(x_23);
x_189 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_189, 0, x_188);
x_171 = x_189;
x_172 = x_45;
goto block_184;
}
else
{
lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; uint8_t x_196;
lean_dec(x_23);
x_190 = x_24;
x_191 = lean_unsigned_to_nat(0u);
x_192 = l_Array_umapMAux___main___at___private_Init_Lean_Delaborator_2__delabLamAux___main___spec__1(x_191, x_190);
x_193 = x_192;
x_194 = lean_array_get_size(x_193);
x_195 = lean_unsigned_to_nat(1u);
x_196 = lean_nat_dec_lt(x_195, x_194);
lean_dec(x_194);
if (x_196 == 0)
{
lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216;
x_197 = l_Lean_Syntax_inhabited;
x_198 = lean_array_get(x_197, x_193, x_191);
lean_dec(x_193);
x_199 = l_Array_empty___closed__1;
x_200 = lean_array_push(x_199, x_198);
x_201 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__2;
x_202 = lean_array_push(x_201, x_170);
x_203 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2;
x_204 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_204, 0, x_203);
lean_ctor_set(x_204, 1, x_202);
x_205 = lean_array_push(x_199, x_204);
x_206 = l_Lean_nullKind___closed__2;
x_207 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_207, 0, x_206);
lean_ctor_set(x_207, 1, x_205);
x_208 = lean_array_push(x_200, x_207);
x_209 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_209, 0, x_206);
lean_ctor_set(x_209, 1, x_208);
x_210 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__41;
x_211 = lean_array_push(x_210, x_209);
x_212 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__57;
x_213 = lean_array_push(x_211, x_212);
x_214 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_215 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_215, 0, x_214);
lean_ctor_set(x_215, 1, x_213);
x_216 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_216, 0, x_215);
x_171 = x_216;
x_172 = x_45;
goto block_184;
}
else
{
lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243;
x_217 = l_Lean_Syntax_inhabited;
x_218 = lean_array_get(x_217, x_193, x_191);
x_219 = l_Array_empty___closed__1;
x_220 = lean_array_push(x_219, x_218);
x_221 = l_Array_eraseIdx___rarg(x_193, x_191);
x_222 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_221, x_221, x_191, x_219);
lean_dec(x_221);
x_223 = l_Lean_nullKind___closed__2;
x_224 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_224, 0, x_223);
lean_ctor_set(x_224, 1, x_222);
x_225 = lean_array_push(x_220, x_224);
x_226 = l_Lean_mkAppStx___closed__8;
x_227 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_227, 0, x_226);
lean_ctor_set(x_227, 1, x_225);
x_228 = lean_array_push(x_219, x_227);
x_229 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__2;
x_230 = lean_array_push(x_229, x_170);
x_231 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2;
x_232 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_232, 0, x_231);
lean_ctor_set(x_232, 1, x_230);
x_233 = lean_array_push(x_219, x_232);
x_234 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_234, 0, x_223);
lean_ctor_set(x_234, 1, x_233);
x_235 = lean_array_push(x_228, x_234);
x_236 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_236, 0, x_223);
lean_ctor_set(x_236, 1, x_235);
x_237 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__41;
x_238 = lean_array_push(x_237, x_236);
x_239 = l___private_Init_Lean_Elab_Quotation_2__quoteSyntax___main___closed__57;
x_240 = lean_array_push(x_238, x_239);
x_241 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_242 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_242, 0, x_241);
lean_ctor_set(x_242, 1, x_240);
x_243 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_243, 0, x_242);
x_171 = x_243;
x_172 = x_45;
goto block_184;
}
}
}
case 1:
{
uint8_t x_244;
lean_dec(x_23);
x_244 = lean_unbox(x_10);
lean_dec(x_10);
if (x_244 == 0)
{
lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258;
lean_dec(x_170);
x_245 = lean_unsigned_to_nat(0u);
x_246 = l_Array_empty___closed__1;
x_247 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_24, x_24, x_245, x_246);
lean_dec(x_24);
x_248 = l_Lean_nullKind___closed__2;
x_249 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_249, 0, x_248);
lean_ctor_set(x_249, 1, x_247);
x_250 = l___private_Init_Lean_Elab_DoNotation_7__expandDoElemsAux___main___closed__2;
x_251 = lean_array_push(x_250, x_249);
x_252 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4;
x_253 = lean_array_push(x_251, x_252);
x_254 = l_Lean_Delaborator_delabConst___closed__4;
x_255 = lean_array_push(x_253, x_254);
x_256 = l_Lean_Parser_Term_implicitBinder___elambda__1___closed__2;
x_257 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_257, 0, x_256);
lean_ctor_set(x_257, 1, x_255);
x_258 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_258, 0, x_257);
x_171 = x_258;
x_172 = x_45;
goto block_184;
}
else
{
lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274;
x_259 = lean_unsigned_to_nat(0u);
x_260 = l_Array_empty___closed__1;
x_261 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_24, x_24, x_259, x_260);
lean_dec(x_24);
x_262 = l_Lean_nullKind___closed__2;
x_263 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_263, 0, x_262);
lean_ctor_set(x_263, 1, x_261);
x_264 = l___private_Init_Lean_Elab_DoNotation_7__expandDoElemsAux___main___closed__2;
x_265 = lean_array_push(x_264, x_263);
x_266 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__2;
x_267 = lean_array_push(x_266, x_170);
x_268 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_268, 0, x_262);
lean_ctor_set(x_268, 1, x_267);
x_269 = lean_array_push(x_265, x_268);
x_270 = l_Lean_Delaborator_delabConst___closed__4;
x_271 = lean_array_push(x_269, x_270);
x_272 = l_Lean_Parser_Term_implicitBinder___elambda__1___closed__2;
x_273 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_273, 0, x_272);
lean_ctor_set(x_273, 1, x_271);
x_274 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_274, 0, x_273);
x_171 = x_274;
x_172 = x_45;
goto block_184;
}
}
case 3:
{
lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288;
lean_dec(x_24);
lean_dec(x_10);
x_275 = l_Array_empty___closed__1;
x_276 = lean_array_push(x_275, x_23);
x_277 = l___private_Init_Lean_Elab_Match_2__expandSimpleMatchWithType___closed__1;
x_278 = lean_array_push(x_276, x_277);
x_279 = l_Lean_nullKind___closed__2;
x_280 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_280, 0, x_279);
lean_ctor_set(x_280, 1, x_278);
x_281 = l_Lean_Elab_Term_elabArrayLit___closed__10;
x_282 = lean_array_push(x_281, x_280);
x_283 = lean_array_push(x_282, x_170);
x_284 = l_Lean_Elab_Term_elabArrayLit___closed__11;
x_285 = lean_array_push(x_283, x_284);
x_286 = l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
x_287 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_287, 0, x_286);
lean_ctor_set(x_287, 1, x_285);
x_288 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_288, 0, x_287);
x_171 = x_288;
x_172 = x_45;
goto block_184;
}
default:
{
lean_object* x_289; lean_object* x_290; lean_object* x_291;
lean_dec(x_186);
lean_dec(x_170);
lean_dec(x_24);
lean_dec(x_23);
lean_dec(x_10);
x_289 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_290 = l_unreachable_x21___rarg(x_289);
lean_inc(x_4);
lean_inc(x_3);
x_291 = lean_apply_3(x_290, x_3, x_4, x_45);
if (lean_obj_tag(x_291) == 0)
{
lean_object* x_292; lean_object* x_293;
x_292 = lean_ctor_get(x_291, 0);
lean_inc(x_292);
x_293 = lean_ctor_get(x_291, 1);
lean_inc(x_293);
lean_dec(x_291);
x_171 = x_292;
x_172 = x_293;
goto block_184;
}
else
{
lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297;
lean_dec(x_46);
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_294 = lean_ctor_get(x_291, 0);
lean_inc(x_294);
x_295 = lean_ctor_get(x_291, 1);
lean_inc(x_295);
if (lean_is_exclusive(x_291)) {
lean_ctor_release(x_291, 0);
lean_ctor_release(x_291, 1);
x_296 = x_291;
} else {
lean_dec_ref(x_291);
x_296 = lean_box(0);
}
if (lean_is_scalar(x_296)) {
x_297 = lean_alloc_ctor(1, 2, 0);
} else {
x_297 = x_296;
}
lean_ctor_set(x_297, 0, x_294);
lean_ctor_set(x_297, 1, x_295);
return x_297;
}
}
}
block_184:
{
if (lean_obj_tag(x_171) == 0)
{
lean_object* x_173; lean_object* x_174;
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_173 = lean_box(0);
if (lean_is_scalar(x_46)) {
x_174 = lean_alloc_ctor(0, 2, 0);
} else {
x_174 = x_46;
}
lean_ctor_set(x_174, 0, x_173);
lean_ctor_set(x_174, 1, x_172);
return x_174;
}
else
{
lean_object* x_175; lean_object* x_176; uint8_t x_177;
lean_dec(x_46);
x_175 = lean_ctor_get(x_171, 0);
lean_inc(x_175);
lean_dec(x_171);
x_176 = lean_array_push(x_1, x_175);
x_177 = l_Lean_Expr_isLambda(x_16);
lean_dec(x_16);
if (x_177 == 0)
{
lean_object* x_178; lean_object* x_179; lean_object* x_180;
x_178 = lean_alloc_closure((void*)(l___private_Init_Lean_Delaborator_2__delabLamAux___main___lambda__1___boxed), 5, 1);
lean_closure_set(x_178, 0, x_176);
x_179 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Delaborator_delabAppExplicit___spec__2___rarg), 5, 2);
lean_closure_set(x_179, 0, x_36);
lean_closure_set(x_179, 1, x_178);
x_180 = l_Lean_Delaborator_withBindingBody___rarg(x_18, x_179, x_3, x_4, x_172);
return x_180;
}
else
{
lean_object* x_181; lean_object* x_182; lean_object* x_183;
x_181 = l_Array_empty___closed__1;
x_182 = lean_alloc_closure((void*)(l___private_Init_Lean_Delaborator_2__delabLamAux___main), 5, 2);
lean_closure_set(x_182, 0, x_176);
lean_closure_set(x_182, 1, x_181);
x_183 = l_Lean_Delaborator_withBindingBody___rarg(x_18, x_182, x_3, x_4, x_172);
return x_183;
}
}
}
}
}
}
else
{
uint8_t x_298;
lean_dec(x_24);
lean_dec(x_23);
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_13);
lean_dec(x_10);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_298 = !lean_is_exclusive(x_37);
if (x_298 == 0)
{
return x_37;
}
else
{
lean_object* x_299; lean_object* x_300; lean_object* x_301;
x_299 = lean_ctor_get(x_37, 0);
x_300 = lean_ctor_get(x_37, 1);
lean_inc(x_300);
lean_inc(x_299);
lean_dec(x_37);
x_301 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_301, 0, x_299);
lean_ctor_set(x_301, 1, x_300);
return x_301;
}
}
}
else
{
lean_object* x_302; lean_object* x_303; lean_object* x_304;
lean_dec(x_23);
lean_dec(x_16);
lean_dec(x_13);
lean_dec(x_10);
x_302 = lean_ctor_get(x_25, 1);
lean_inc(x_302);
lean_dec(x_25);
x_303 = lean_alloc_closure((void*)(l___private_Init_Lean_Delaborator_2__delabLamAux___main), 5, 2);
lean_closure_set(x_303, 0, x_1);
lean_closure_set(x_303, 1, x_24);
x_304 = l_Lean_Delaborator_withBindingBody___rarg(x_18, x_303, x_3, x_4, x_302);
return x_304;
}
}
}
else
{
uint8_t x_305;
lean_dec(x_24);
lean_dec(x_23);
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_13);
lean_dec(x_10);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_305 = !lean_is_exclusive(x_25);
if (x_305 == 0)
{
return x_25;
}
else
{
lean_object* x_306; lean_object* x_307; lean_object* x_308;
x_306 = lean_ctor_get(x_25, 0);
x_307 = lean_ctor_get(x_25, 1);
lean_inc(x_307);
lean_inc(x_306);
lean_dec(x_25);
x_308 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_308, 0, x_306);
lean_ctor_set(x_308, 1, x_307);
return x_308;
}
}
}
else
{
lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312;
lean_dec(x_13);
lean_dec(x_10);
lean_dec(x_2);
lean_dec(x_1);
x_309 = lean_ctor_get(x_11, 1);
lean_inc(x_309);
lean_dec(x_11);
x_310 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_311 = l_unreachable_x21___rarg(x_310);
x_312 = lean_apply_3(x_311, x_3, x_4, x_309);
return x_312;
}
}
}
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux___main___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6;
x_6 = l___private_Init_Lean_Delaborator_2__delabLamAux___main___lambda__1(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
return x_6;
}
}
lean_object* l___private_Init_Lean_Delaborator_2__delabLamAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6;
x_6 = l___private_Init_Lean_Delaborator_2__delabLamAux___main(x_1, x_2, x_3, x_4, x_5);
return x_6;
}
}
lean_object* l_Lean_Delaborator_delabExplicitLam(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5;
x_4 = l_Array_empty___closed__1;
x_5 = l___private_Init_Lean_Delaborator_2__delabLamAux___main(x_4, x_4, x_1, x_2, x_3);
return x_5;
}
}
lean_object* _init_l___regBuiltin_Lean_Delaborator_delabExplicitLam___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabExplicitLam), 3, 0);
return x_1;
}
}
lean_object* l___regBuiltin_Lean_Delaborator_delabExplicitLam(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Delaborator_delabAttribute;
x_3 = l_Lean_Delaborator_getExprKind___closed__15;
x_4 = l___regBuiltin_Lean_Delaborator_delabExplicitLam___closed__1;
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* l_Lean_Delaborator_delabLit(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; uint8_t x_6;
x_4 = l_Lean_Delaborator_getExpr(x_1, x_2, x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
lean_object* x_7;
x_7 = lean_ctor_get(x_5, 0);
if (lean_obj_tag(x_7) == 9)
{
lean_object* x_8;
lean_dec(x_2);
lean_dec(x_1);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec(x_7);
if (lean_obj_tag(x_8) == 0)
{
uint8_t x_9;
x_9 = !lean_is_exclusive(x_4);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
x_10 = lean_ctor_get(x_4, 0);
lean_dec(x_10);
x_11 = lean_ctor_get(x_8, 0);
lean_inc(x_11);
lean_dec(x_8);
x_12 = l_Nat_repr(x_11);
x_13 = lean_box(0);
x_14 = l_Lean_numLitKind;
x_15 = l_Lean_mkStxLit(x_14, x_12, x_13);
x_16 = l_Lean_mkOptionalNode___closed__2;
x_17 = lean_array_push(x_16, x_15);
x_18 = l_Lean_Nat_HasQuote___closed__2;
x_19 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set(x_19, 1, x_17);
lean_ctor_set(x_5, 0, x_19);
return x_4;
}
else
{
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
x_20 = lean_ctor_get(x_4, 1);
lean_inc(x_20);
lean_dec(x_4);
x_21 = lean_ctor_get(x_8, 0);
lean_inc(x_21);
lean_dec(x_8);
x_22 = l_Nat_repr(x_21);
x_23 = lean_box(0);
x_24 = l_Lean_numLitKind;
x_25 = l_Lean_mkStxLit(x_24, x_22, x_23);
x_26 = l_Lean_mkOptionalNode___closed__2;
x_27 = lean_array_push(x_26, x_25);
x_28 = l_Lean_Nat_HasQuote___closed__2;
x_29 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_29, 0, x_28);
lean_ctor_set(x_29, 1, x_27);
lean_ctor_set(x_5, 0, x_29);
x_30 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_30, 0, x_5);
lean_ctor_set(x_30, 1, x_20);
return x_30;
}
}
else
{
uint8_t x_31;
x_31 = !lean_is_exclusive(x_4);
if (x_31 == 0)
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39;
x_32 = lean_ctor_get(x_4, 0);
lean_dec(x_32);
x_33 = lean_ctor_get(x_8, 0);
lean_inc(x_33);
lean_dec(x_8);
x_34 = lean_box(0);
x_35 = l_Lean_mkStxStrLit(x_33, x_34);
x_36 = l_Lean_mkOptionalNode___closed__2;
x_37 = lean_array_push(x_36, x_35);
x_38 = l_Lean_String_HasQuote___closed__2;
x_39 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_39, 0, x_38);
lean_ctor_set(x_39, 1, x_37);
lean_ctor_set(x_5, 0, x_39);
return x_4;
}
else
{
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48;
x_40 = lean_ctor_get(x_4, 1);
lean_inc(x_40);
lean_dec(x_4);
x_41 = lean_ctor_get(x_8, 0);
lean_inc(x_41);
lean_dec(x_8);
x_42 = lean_box(0);
x_43 = l_Lean_mkStxStrLit(x_41, x_42);
x_44 = l_Lean_mkOptionalNode___closed__2;
x_45 = lean_array_push(x_44, x_43);
x_46 = l_Lean_String_HasQuote___closed__2;
x_47 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_47, 0, x_46);
lean_ctor_set(x_47, 1, x_45);
lean_ctor_set(x_5, 0, x_47);
x_48 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_48, 0, x_5);
lean_ctor_set(x_48, 1, x_40);
return x_48;
}
}
}
else
{
lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52;
lean_free_object(x_5);
lean_dec(x_7);
x_49 = lean_ctor_get(x_4, 1);
lean_inc(x_49);
lean_dec(x_4);
x_50 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_51 = l_unreachable_x21___rarg(x_50);
x_52 = lean_apply_3(x_51, x_1, x_2, x_49);
return x_52;
}
}
else
{
lean_object* x_53;
x_53 = lean_ctor_get(x_5, 0);
lean_inc(x_53);
lean_dec(x_5);
if (lean_obj_tag(x_53) == 9)
{
lean_object* x_54;
lean_dec(x_2);
lean_dec(x_1);
x_54 = lean_ctor_get(x_53, 0);
lean_inc(x_54);
lean_dec(x_53);
if (lean_obj_tag(x_54) == 0)
{
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
x_55 = lean_ctor_get(x_4, 1);
lean_inc(x_55);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_56 = x_4;
} else {
lean_dec_ref(x_4);
x_56 = lean_box(0);
}
x_57 = lean_ctor_get(x_54, 0);
lean_inc(x_57);
lean_dec(x_54);
x_58 = l_Nat_repr(x_57);
x_59 = lean_box(0);
x_60 = l_Lean_numLitKind;
x_61 = l_Lean_mkStxLit(x_60, x_58, x_59);
x_62 = l_Lean_mkOptionalNode___closed__2;
x_63 = lean_array_push(x_62, x_61);
x_64 = l_Lean_Nat_HasQuote___closed__2;
x_65 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_65, 0, x_64);
lean_ctor_set(x_65, 1, x_63);
x_66 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_66, 0, x_65);
if (lean_is_scalar(x_56)) {
x_67 = lean_alloc_ctor(0, 2, 0);
} else {
x_67 = x_56;
}
lean_ctor_set(x_67, 0, x_66);
lean_ctor_set(x_67, 1, x_55);
return x_67;
}
else
{
lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78;
x_68 = lean_ctor_get(x_4, 1);
lean_inc(x_68);
if (lean_is_exclusive(x_4)) {
lean_ctor_release(x_4, 0);
lean_ctor_release(x_4, 1);
x_69 = x_4;
} else {
lean_dec_ref(x_4);
x_69 = lean_box(0);
}
x_70 = lean_ctor_get(x_54, 0);
lean_inc(x_70);
lean_dec(x_54);
x_71 = lean_box(0);
x_72 = l_Lean_mkStxStrLit(x_70, x_71);
x_73 = l_Lean_mkOptionalNode___closed__2;
x_74 = lean_array_push(x_73, x_72);
x_75 = l_Lean_String_HasQuote___closed__2;
x_76 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_76, 0, x_75);
lean_ctor_set(x_76, 1, x_74);
x_77 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_77, 0, x_76);
if (lean_is_scalar(x_69)) {
x_78 = lean_alloc_ctor(0, 2, 0);
} else {
x_78 = x_69;
}
lean_ctor_set(x_78, 0, x_77);
lean_ctor_set(x_78, 1, x_68);
return x_78;
}
}
else
{
lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82;
lean_dec(x_53);
x_79 = lean_ctor_get(x_4, 1);
lean_inc(x_79);
lean_dec(x_4);
x_80 = l_Lean_Delaborator_DelabM_inhabited___closed__1;
x_81 = l_unreachable_x21___rarg(x_80);
x_82 = lean_apply_3(x_81, x_1, x_2, x_79);
return x_82;
}
}
}
}
lean_object* _init_l___regBuiltin_Lean_Delaborator_delabLit___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Delaborator_delabLit), 3, 0);
return x_1;
}
}
lean_object* l___regBuiltin_Lean_Delaborator_delabLit(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Delaborator_delabAttribute;
x_3 = l_Lean_Delaborator_getExprKind___closed__24;
x_4 = l___regBuiltin_Lean_Delaborator_delabLit___closed__1;
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* l_Lean_delab(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8;
x_6 = lean_unsigned_to_nat(1u);
x_7 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_7, 0, x_1);
lean_ctor_set(x_7, 1, x_6);
lean_ctor_set(x_7, 2, x_2);
lean_ctor_set(x_7, 3, x_3);
lean_inc(x_4);
x_8 = l_Lean_Delaborator_delab(x_7, x_4, x_5);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9;
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
if (lean_obj_tag(x_9) == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_10 = lean_ctor_get(x_8, 1);
lean_inc(x_10);
lean_dec(x_8);
x_11 = l_Lean_Meta_isClassQuick___main___closed__1;
x_12 = l_unreachable_x21___rarg(x_11);
x_13 = lean_apply_2(x_12, x_4, x_10);
return x_13;
}
else
{
uint8_t x_14;
lean_dec(x_4);
x_14 = !lean_is_exclusive(x_8);
if (x_14 == 0)
{
lean_object* x_15; lean_object* x_16;
x_15 = lean_ctor_get(x_8, 0);
lean_dec(x_15);
x_16 = lean_ctor_get(x_9, 0);
lean_inc(x_16);
lean_dec(x_9);
lean_ctor_set(x_8, 0, x_16);
return x_8;
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19;
x_17 = lean_ctor_get(x_8, 1);
lean_inc(x_17);
lean_dec(x_8);
x_18 = lean_ctor_get(x_9, 0);
lean_inc(x_18);
lean_dec(x_9);
x_19 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set(x_19, 1, x_17);
return x_19;
}
}
}
else
{
uint8_t x_20;
lean_dec(x_4);
x_20 = !lean_is_exclusive(x_8);
if (x_20 == 0)
{
return x_8;
}
else
{
lean_object* x_21; lean_object* x_22; lean_object* x_23;
x_21 = lean_ctor_get(x_8, 0);
x_22 = lean_ctor_get(x_8, 1);
lean_inc(x_22);
lean_inc(x_21);
lean_dec(x_8);
x_23 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_23, 0, x_21);
lean_ctor_set(x_23, 1, x_22);
return x_23;
}
}
}
}
lean_object* initialize_Init_Lean_KeyedDeclsAttribute(lean_object*);
lean_object* initialize_Init_Lean_Parser_Level(lean_object*);
lean_object* initialize_Init_Lean_Elab(lean_object*);
static bool _G_initialized = false;
lean_object* initialize_Init_Lean_Delaborator(lean_object* w) {
lean_object * res;
if (_G_initialized) return lean_mk_io_result(lean_box(0));
_G_initialized = true;
res = initialize_Init_Lean_KeyedDeclsAttribute(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Init_Lean_Parser_Level(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Init_Lean_Elab(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Level_quote___main___lambda__1___closed__1 = _init_l_Lean_Level_quote___main___lambda__1___closed__1();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__1___closed__1);
l_Lean_Level_quote___main___lambda__1___closed__2 = _init_l_Lean_Level_quote___main___lambda__1___closed__2();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__1___closed__2);
l_Lean_Level_quote___main___lambda__1___closed__3 = _init_l_Lean_Level_quote___main___lambda__1___closed__3();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__1___closed__3);
l_Lean_Level_quote___main___lambda__1___closed__4 = _init_l_Lean_Level_quote___main___lambda__1___closed__4();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__1___closed__4);
l_Lean_Level_quote___main___lambda__1___closed__5 = _init_l_Lean_Level_quote___main___lambda__1___closed__5();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__1___closed__5);
l_Lean_Level_quote___main___lambda__1___closed__6 = _init_l_Lean_Level_quote___main___lambda__1___closed__6();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__1___closed__6);
l_Lean_Level_quote___main___lambda__2___closed__1 = _init_l_Lean_Level_quote___main___lambda__2___closed__1();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__2___closed__1);
l_Lean_Level_quote___main___lambda__4___closed__1 = _init_l_Lean_Level_quote___main___lambda__4___closed__1();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__4___closed__1);
l_Lean_Level_quote___main___lambda__4___closed__2 = _init_l_Lean_Level_quote___main___lambda__4___closed__2();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__4___closed__2);
l_Lean_Level_quote___main___lambda__6___closed__1 = _init_l_Lean_Level_quote___main___lambda__6___closed__1();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__6___closed__1);
l_Lean_Level_quote___main___lambda__6___closed__2 = _init_l_Lean_Level_quote___main___lambda__6___closed__2();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__6___closed__2);
l_Lean_Level_quote___main___lambda__9___closed__1 = _init_l_Lean_Level_quote___main___lambda__9___closed__1();
lean_mark_persistent(l_Lean_Level_quote___main___lambda__9___closed__1);
l_Lean_Level_quote___main___closed__1 = _init_l_Lean_Level_quote___main___closed__1();
lean_mark_persistent(l_Lean_Level_quote___main___closed__1);
l_Lean_Level_quote___main___closed__2 = _init_l_Lean_Level_quote___main___closed__2();
lean_mark_persistent(l_Lean_Level_quote___main___closed__2);
l_Lean_Level_quote___main___closed__3 = _init_l_Lean_Level_quote___main___closed__3();
lean_mark_persistent(l_Lean_Level_quote___main___closed__3);
l_Lean_Level_quote___main___closed__4 = _init_l_Lean_Level_quote___main___closed__4();
lean_mark_persistent(l_Lean_Level_quote___main___closed__4);
l_Lean_Level_quote___main___closed__5 = _init_l_Lean_Level_quote___main___closed__5();
lean_mark_persistent(l_Lean_Level_quote___main___closed__5);
l_Lean_Level_quote___main___closed__6 = _init_l_Lean_Level_quote___main___closed__6();
lean_mark_persistent(l_Lean_Level_quote___main___closed__6);
l_Lean_Level_HasQuote___closed__1 = _init_l_Lean_Level_HasQuote___closed__1();
lean_mark_persistent(l_Lean_Level_HasQuote___closed__1);
l_Lean_Level_HasQuote = _init_l_Lean_Level_HasQuote();
lean_mark_persistent(l_Lean_Level_HasQuote);
l_Lean_getPPBinderTypes___closed__1 = _init_l_Lean_getPPBinderTypes___closed__1();
lean_mark_persistent(l_Lean_getPPBinderTypes___closed__1);
l_Lean_getPPBinderTypes___closed__2 = _init_l_Lean_getPPBinderTypes___closed__2();
lean_mark_persistent(l_Lean_getPPBinderTypes___closed__2);
l_Lean_getPPBinderTypes___closed__3 = _init_l_Lean_getPPBinderTypes___closed__3();
lean_mark_persistent(l_Lean_getPPBinderTypes___closed__3);
l_Lean_getPPBinderTypes___closed__4 = _init_l_Lean_getPPBinderTypes___closed__4();
lean_mark_persistent(l_Lean_getPPBinderTypes___closed__4);
l_Lean_getPPExplicit___closed__1 = _init_l_Lean_getPPExplicit___closed__1();
lean_mark_persistent(l_Lean_getPPExplicit___closed__1);
l_Lean_getPPUniverses___closed__1 = _init_l_Lean_getPPUniverses___closed__1();
lean_mark_persistent(l_Lean_getPPUniverses___closed__1);
l_Lean_getPPAll___closed__1 = _init_l_Lean_getPPAll___closed__1();
lean_mark_persistent(l_Lean_getPPAll___closed__1);
l_Lean_getPPAll___closed__2 = _init_l_Lean_getPPAll___closed__2();
lean_mark_persistent(l_Lean_getPPAll___closed__2);
l_Lean_ppOptions___closed__1 = _init_l_Lean_ppOptions___closed__1();
lean_mark_persistent(l_Lean_ppOptions___closed__1);
l_Lean_ppOptions___closed__2 = _init_l_Lean_ppOptions___closed__2();
lean_mark_persistent(l_Lean_ppOptions___closed__2);
res = l_Lean_ppOptions(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Delaborator_DelabM_inhabited___closed__1 = _init_l_Lean_Delaborator_DelabM_inhabited___closed__1();
lean_mark_persistent(l_Lean_Delaborator_DelabM_inhabited___closed__1);
l_Lean_Delaborator_DelabM_monadQuotation___closed__1 = _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__1();
lean_mark_persistent(l_Lean_Delaborator_DelabM_monadQuotation___closed__1);
l_Lean_Delaborator_DelabM_monadQuotation___closed__2 = _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__2();
lean_mark_persistent(l_Lean_Delaborator_DelabM_monadQuotation___closed__2);
l_Lean_Delaborator_DelabM_monadQuotation___closed__3 = _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__3();
lean_mark_persistent(l_Lean_Delaborator_DelabM_monadQuotation___closed__3);
l_Lean_Delaborator_DelabM_monadQuotation___closed__4 = _init_l_Lean_Delaborator_DelabM_monadQuotation___closed__4();
lean_mark_persistent(l_Lean_Delaborator_DelabM_monadQuotation___closed__4);
l_Lean_Delaborator_DelabM_monadQuotation = _init_l_Lean_Delaborator_DelabM_monadQuotation();
lean_mark_persistent(l_Lean_Delaborator_DelabM_monadQuotation);
l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__1 = _init_l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__1();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__1);
l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__2 = _init_l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__2();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___lambda__1___closed__2);
l_Lean_Delaborator_mkDelabAttribute___closed__1 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__1();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__1);
l_Lean_Delaborator_mkDelabAttribute___closed__2 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__2();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__2);
l_Lean_Delaborator_mkDelabAttribute___closed__3 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__3();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__3);
l_Lean_Delaborator_mkDelabAttribute___closed__4 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__4();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__4);
l_Lean_Delaborator_mkDelabAttribute___closed__5 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__5();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__5);
l_Lean_Delaborator_mkDelabAttribute___closed__6 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__6();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__6);
l_Lean_Delaborator_mkDelabAttribute___closed__7 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__7();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__7);
l_Lean_Delaborator_mkDelabAttribute___closed__8 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__8();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__8);
l_Lean_Delaborator_mkDelabAttribute___closed__9 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__9();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__9);
l_Lean_Delaborator_mkDelabAttribute___closed__10 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__10();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__10);
l_Lean_Delaborator_mkDelabAttribute___closed__11 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__11();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__11);
l_Lean_Delaborator_mkDelabAttribute___closed__12 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__12();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__12);
l_Lean_Delaborator_mkDelabAttribute___closed__13 = _init_l_Lean_Delaborator_mkDelabAttribute___closed__13();
lean_mark_persistent(l_Lean_Delaborator_mkDelabAttribute___closed__13);
l_PersistentHashMap_empty___at_Lean_Delaborator_delabAttribute___spec__3 = _init_l_PersistentHashMap_empty___at_Lean_Delaborator_delabAttribute___spec__3();
lean_mark_persistent(l_PersistentHashMap_empty___at_Lean_Delaborator_delabAttribute___spec__3);
l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__1 = _init_l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__1();
lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__1);
l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__2 = _init_l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__2();
lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1___closed__2);
l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1 = _init_l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1();
lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Delaborator_delabAttribute___spec__1);
l_Lean_Delaborator_delabAttribute___closed__1 = _init_l_Lean_Delaborator_delabAttribute___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delabAttribute___closed__1);
l_Lean_Delaborator_delabAttribute___closed__2 = _init_l_Lean_Delaborator_delabAttribute___closed__2();
lean_mark_persistent(l_Lean_Delaborator_delabAttribute___closed__2);
l_Lean_Delaborator_delabAttribute___closed__3 = _init_l_Lean_Delaborator_delabAttribute___closed__3();
lean_mark_persistent(l_Lean_Delaborator_delabAttribute___closed__3);
l_Lean_Delaborator_delabAttribute___closed__4 = _init_l_Lean_Delaborator_delabAttribute___closed__4();
lean_mark_persistent(l_Lean_Delaborator_delabAttribute___closed__4);
l_Lean_Delaborator_delabAttribute___closed__5 = _init_l_Lean_Delaborator_delabAttribute___closed__5();
lean_mark_persistent(l_Lean_Delaborator_delabAttribute___closed__5);
res = l_Lean_Delaborator_mkDelabAttribute(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
l_Lean_Delaborator_delabAttribute = lean_io_result_get_value(res);
lean_mark_persistent(l_Lean_Delaborator_delabAttribute);
lean_dec_ref(res);
l_Lean_Delaborator_getExprKind___closed__1 = _init_l_Lean_Delaborator_getExprKind___closed__1();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__1);
l_Lean_Delaborator_getExprKind___closed__2 = _init_l_Lean_Delaborator_getExprKind___closed__2();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__2);
l_Lean_Delaborator_getExprKind___closed__3 = _init_l_Lean_Delaborator_getExprKind___closed__3();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__3);
l_Lean_Delaborator_getExprKind___closed__4 = _init_l_Lean_Delaborator_getExprKind___closed__4();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__4);
l_Lean_Delaborator_getExprKind___closed__5 = _init_l_Lean_Delaborator_getExprKind___closed__5();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__5);
l_Lean_Delaborator_getExprKind___closed__6 = _init_l_Lean_Delaborator_getExprKind___closed__6();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__6);
l_Lean_Delaborator_getExprKind___closed__7 = _init_l_Lean_Delaborator_getExprKind___closed__7();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__7);
l_Lean_Delaborator_getExprKind___closed__8 = _init_l_Lean_Delaborator_getExprKind___closed__8();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__8);
l_Lean_Delaborator_getExprKind___closed__9 = _init_l_Lean_Delaborator_getExprKind___closed__9();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__9);
l_Lean_Delaborator_getExprKind___closed__10 = _init_l_Lean_Delaborator_getExprKind___closed__10();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__10);
l_Lean_Delaborator_getExprKind___closed__11 = _init_l_Lean_Delaborator_getExprKind___closed__11();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__11);
l_Lean_Delaborator_getExprKind___closed__12 = _init_l_Lean_Delaborator_getExprKind___closed__12();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__12);
l_Lean_Delaborator_getExprKind___closed__13 = _init_l_Lean_Delaborator_getExprKind___closed__13();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__13);
l_Lean_Delaborator_getExprKind___closed__14 = _init_l_Lean_Delaborator_getExprKind___closed__14();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__14);
l_Lean_Delaborator_getExprKind___closed__15 = _init_l_Lean_Delaborator_getExprKind___closed__15();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__15);
l_Lean_Delaborator_getExprKind___closed__16 = _init_l_Lean_Delaborator_getExprKind___closed__16();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__16);
l_Lean_Delaborator_getExprKind___closed__17 = _init_l_Lean_Delaborator_getExprKind___closed__17();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__17);
l_Lean_Delaborator_getExprKind___closed__18 = _init_l_Lean_Delaborator_getExprKind___closed__18();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__18);
l_Lean_Delaborator_getExprKind___closed__19 = _init_l_Lean_Delaborator_getExprKind___closed__19();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__19);
l_Lean_Delaborator_getExprKind___closed__20 = _init_l_Lean_Delaborator_getExprKind___closed__20();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__20);
l_Lean_Delaborator_getExprKind___closed__21 = _init_l_Lean_Delaborator_getExprKind___closed__21();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__21);
l_Lean_Delaborator_getExprKind___closed__22 = _init_l_Lean_Delaborator_getExprKind___closed__22();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__22);
l_Lean_Delaborator_getExprKind___closed__23 = _init_l_Lean_Delaborator_getExprKind___closed__23();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__23);
l_Lean_Delaborator_getExprKind___closed__24 = _init_l_Lean_Delaborator_getExprKind___closed__24();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__24);
l_Lean_Delaborator_getExprKind___closed__25 = _init_l_Lean_Delaborator_getExprKind___closed__25();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__25);
l_Lean_Delaborator_getExprKind___closed__26 = _init_l_Lean_Delaborator_getExprKind___closed__26();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__26);
l_Lean_Delaborator_getExprKind___closed__27 = _init_l_Lean_Delaborator_getExprKind___closed__27();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__27);
l_Lean_Delaborator_getExprKind___closed__28 = _init_l_Lean_Delaborator_getExprKind___closed__28();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__28);
l_Lean_Delaborator_getExprKind___closed__29 = _init_l_Lean_Delaborator_getExprKind___closed__29();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__29);
l_Lean_Delaborator_getExprKind___closed__30 = _init_l_Lean_Delaborator_getExprKind___closed__30();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__30);
l_Lean_Delaborator_getExprKind___closed__31 = _init_l_Lean_Delaborator_getExprKind___closed__31();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__31);
l_Lean_Delaborator_getExprKind___closed__32 = _init_l_Lean_Delaborator_getExprKind___closed__32();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__32);
l_Lean_Delaborator_getExprKind___closed__33 = _init_l_Lean_Delaborator_getExprKind___closed__33();
lean_mark_persistent(l_Lean_Delaborator_getExprKind___closed__33);
l_Lean_Delaborator_getPPOption___closed__1 = _init_l_Lean_Delaborator_getPPOption___closed__1();
lean_mark_persistent(l_Lean_Delaborator_getPPOption___closed__1);
l_Lean_Delaborator_infoForPos___closed__1 = _init_l_Lean_Delaborator_infoForPos___closed__1();
lean_mark_persistent(l_Lean_Delaborator_infoForPos___closed__1);
l_Lean_Delaborator_infoForPos___closed__2 = _init_l_Lean_Delaborator_infoForPos___closed__2();
lean_mark_persistent(l_Lean_Delaborator_infoForPos___closed__2);
l_Lean_Delaborator_delab___closed__1 = _init_l_Lean_Delaborator_delab___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delab___closed__1);
l___regBuiltin_Lean_Delaborator_delabFVar___closed__1 = _init_l___regBuiltin_Lean_Delaborator_delabFVar___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Delaborator_delabFVar___closed__1);
res = l___regBuiltin_Lean_Delaborator_delabFVar(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Delaborator_delabMVar___closed__1 = _init_l_Lean_Delaborator_delabMVar___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delabMVar___closed__1);
l_Lean_Delaborator_delabMVar___closed__2 = _init_l_Lean_Delaborator_delabMVar___closed__2();
lean_mark_persistent(l_Lean_Delaborator_delabMVar___closed__2);
l___regBuiltin_Lean_Delaborator_delabMVar___closed__1 = _init_l___regBuiltin_Lean_Delaborator_delabMVar___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Delaborator_delabMVar___closed__1);
res = l___regBuiltin_Lean_Delaborator_delabMVar(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Delaborator_delabSort___closed__1 = _init_l_Lean_Delaborator_delabSort___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__1);
l_Lean_Delaborator_delabSort___closed__2 = _init_l_Lean_Delaborator_delabSort___closed__2();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__2);
l_Lean_Delaborator_delabSort___closed__3 = _init_l_Lean_Delaborator_delabSort___closed__3();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__3);
l_Lean_Delaborator_delabSort___closed__4 = _init_l_Lean_Delaborator_delabSort___closed__4();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__4);
l_Lean_Delaborator_delabSort___closed__5 = _init_l_Lean_Delaborator_delabSort___closed__5();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__5);
l_Lean_Delaborator_delabSort___closed__6 = _init_l_Lean_Delaborator_delabSort___closed__6();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__6);
l_Lean_Delaborator_delabSort___closed__7 = _init_l_Lean_Delaborator_delabSort___closed__7();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__7);
l_Lean_Delaborator_delabSort___closed__8 = _init_l_Lean_Delaborator_delabSort___closed__8();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__8);
l_Lean_Delaborator_delabSort___closed__9 = _init_l_Lean_Delaborator_delabSort___closed__9();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__9);
l_Lean_Delaborator_delabSort___closed__10 = _init_l_Lean_Delaborator_delabSort___closed__10();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__10);
l_Lean_Delaborator_delabSort___closed__11 = _init_l_Lean_Delaborator_delabSort___closed__11();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__11);
l_Lean_Delaborator_delabSort___closed__12 = _init_l_Lean_Delaborator_delabSort___closed__12();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__12);
l_Lean_Delaborator_delabSort___closed__13 = _init_l_Lean_Delaborator_delabSort___closed__13();
lean_mark_persistent(l_Lean_Delaborator_delabSort___closed__13);
l___regBuiltin_Lean_Delaborator_delabSort___closed__1 = _init_l___regBuiltin_Lean_Delaborator_delabSort___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Delaborator_delabSort___closed__1);
res = l___regBuiltin_Lean_Delaborator_delabSort(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Delaborator_delabConst___closed__1 = _init_l_Lean_Delaborator_delabConst___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delabConst___closed__1);
l_Lean_Delaborator_delabConst___closed__2 = _init_l_Lean_Delaborator_delabConst___closed__2();
lean_mark_persistent(l_Lean_Delaborator_delabConst___closed__2);
l_Lean_Delaborator_delabConst___closed__3 = _init_l_Lean_Delaborator_delabConst___closed__3();
lean_mark_persistent(l_Lean_Delaborator_delabConst___closed__3);
l_Lean_Delaborator_delabConst___closed__4 = _init_l_Lean_Delaborator_delabConst___closed__4();
lean_mark_persistent(l_Lean_Delaborator_delabConst___closed__4);
l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__1 = _init_l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__1();
lean_mark_persistent(l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__1);
l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__2 = _init_l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__2();
lean_mark_persistent(l_Array_umapMAux___main___at_Lean_Delaborator_getImplicitParams___spec__1___closed__2);
l_Lean_Delaborator_getImplicitParams___closed__1 = _init_l_Lean_Delaborator_getImplicitParams___closed__1();
lean_mark_persistent(l_Lean_Delaborator_getImplicitParams___closed__1);
l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__1 = _init_l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__1);
l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2 = _init_l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2();
lean_mark_persistent(l_Lean_Delaborator_delabAppExplicit___lambda__1___closed__2);
l_Lean_Delaborator_delabAppExplicit___closed__1 = _init_l_Lean_Delaborator_delabAppExplicit___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delabAppExplicit___closed__1);
l_Lean_Delaborator_delabAppExplicit___closed__2 = _init_l_Lean_Delaborator_delabAppExplicit___closed__2();
lean_mark_persistent(l_Lean_Delaborator_delabAppExplicit___closed__2);
l_Lean_Delaborator_delabAppExplicit___closed__3 = _init_l_Lean_Delaborator_delabAppExplicit___closed__3();
lean_mark_persistent(l_Lean_Delaborator_delabAppExplicit___closed__3);
l_Lean_Delaborator_delabAppExplicit___closed__4 = _init_l_Lean_Delaborator_delabAppExplicit___closed__4();
lean_mark_persistent(l_Lean_Delaborator_delabAppExplicit___closed__4);
l___regBuiltin_Lean_Delaborator_delabAppExplicit___closed__1 = _init_l___regBuiltin_Lean_Delaborator_delabAppExplicit___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Delaborator_delabAppExplicit___closed__1);
res = l___regBuiltin_Lean_Delaborator_delabAppExplicit(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Delaborator_delabAppImplicit___closed__1 = _init_l_Lean_Delaborator_delabAppImplicit___closed__1();
lean_mark_persistent(l_Lean_Delaborator_delabAppImplicit___closed__1);
l_Lean_Delaborator_delabAppImplicit___closed__2 = _init_l_Lean_Delaborator_delabAppImplicit___closed__2();
lean_mark_persistent(l_Lean_Delaborator_delabAppImplicit___closed__2);
l_Lean_Delaborator_delabAppImplicit___closed__3 = _init_l_Lean_Delaborator_delabAppImplicit___closed__3();
lean_mark_persistent(l_Lean_Delaborator_delabAppImplicit___closed__3);
l_Lean_Delaborator_delabAppImplicit___closed__4 = _init_l_Lean_Delaborator_delabAppImplicit___closed__4();
lean_mark_persistent(l_Lean_Delaborator_delabAppImplicit___closed__4);
l_Lean_Delaborator_delabAppImplicit___closed__5 = _init_l_Lean_Delaborator_delabAppImplicit___closed__5();
lean_mark_persistent(l_Lean_Delaborator_delabAppImplicit___closed__5);
l_Lean_Delaborator_delabAppImplicit___closed__6 = _init_l_Lean_Delaborator_delabAppImplicit___closed__6();
lean_mark_persistent(l_Lean_Delaborator_delabAppImplicit___closed__6);
l_Lean_Delaborator_delabAppImplicit___closed__7 = _init_l_Lean_Delaborator_delabAppImplicit___closed__7();
lean_mark_persistent(l_Lean_Delaborator_delabAppImplicit___closed__7);
l___regBuiltin_Lean_Delaborator_delabAppImplicit___closed__1 = _init_l___regBuiltin_Lean_Delaborator_delabAppImplicit___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Delaborator_delabAppImplicit___closed__1);
res = l___regBuiltin_Lean_Delaborator_delabAppImplicit(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1 = _init_l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1();
lean_mark_persistent(l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__1);
l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2 = _init_l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2();
lean_mark_persistent(l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__2);
l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3 = _init_l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3();
lean_mark_persistent(l___private_Init_Lean_Delaborator_1__shouldGroupWithNext___closed__3);
l___private_Init_Lean_Delaborator_2__delabLamAux___main___closed__1 = _init_l___private_Init_Lean_Delaborator_2__delabLamAux___main___closed__1();
lean_mark_persistent(l___private_Init_Lean_Delaborator_2__delabLamAux___main___closed__1);
l___regBuiltin_Lean_Delaborator_delabExplicitLam___closed__1 = _init_l___regBuiltin_Lean_Delaborator_delabExplicitLam___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Delaborator_delabExplicitLam___closed__1);
res = l___regBuiltin_Lean_Delaborator_delabExplicitLam(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l___regBuiltin_Lean_Delaborator_delabLit___closed__1 = _init_l___regBuiltin_Lean_Delaborator_delabLit___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Delaborator_delabLit___closed__1);
res = l___regBuiltin_Lean_Delaborator_delabLit(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
return lean_mk_io_result(lean_box(0));
}
#ifdef __cplusplus
}
#endif
|
class TestPassthruBasics:
"""Tests basic PassthruQNode properties."""
def test_always_mutable(self, mock_qnode):
"""PassthruQNodes are always mutable."""
assert mock_qnode.mutable
def test_repr(self, mock_qnode):
"""String representation."""
assert repr(mock_qnode) == "<PassthruQNode: device='mock_device', func=circuit, wires=2>" |
/**
* Represents the result of fetching the results for a query for a specific library
*/
public class FetchResult {
private final String fetcherName;
private final BibDatabase fetchResult;
public FetchResult(String fetcherName, BibDatabase fetcherResult) {
this.fetcherName = fetcherName;
this.fetchResult = fetcherResult;
}
public String getFetcherName() {
return fetcherName;
}
public BibDatabase getFetchResult() {
return fetchResult;
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.