; RUN: llvm-as -f %s -o - | llc
;; Register allocation is doing a very poor job on this routine from yyparse
;; in Burg:
;; -- at least two long-lived values are being allocated to %o? registers
;; -- even worse, those registers are being saved and restored repeatedly
;; at function calls, even though there are no intervening uses.
;; -- outgoing args of some function calls have to be swapped, causing
;; another write/read from stack to do the exchange (use -dregalloc=y).
;;
;; XFAIL: darwin
%Arity = type %struct.arity*
%Binding = type %struct.binding*
%DeltaCost = type [4 x short]
%Dimension = type %struct.dimension*
%Index_Map = type { int, %Item_Set* }
%IntList = type %struct.intlist*
%Item = type { %DeltaCost, %Rule }
%ItemArray = type %Item*
%Item_Set = type %struct.item_set*
%List = type %struct.list*
%Mapping = type %struct.mapping*
%NonTerminal = type %struct.nonterminal*
%Operator = type %struct.operator*
%Pattern = type %struct.pattern*
%PatternAST = type %struct.patternAST*
%Plank = type %struct.plank*
%PlankMap = type %struct.plankMap*
%ReadFn = type int ()*
%Rule = type %struct.rule*
%RuleAST = type %struct.ruleAST*
%StateMap = type %struct.stateMap*
%StrTableElement = type %struct.strTableElement*
%Symbol = type %struct.symbol*
%Table = type %struct.table*
%YYSTYPE = type { %IntList }
%struct.arity = type { int, %List }
%struct.binding = type { sbyte*, int }
%struct.dimension = type { short*, %Index_Map, %Mapping, int, %PlankMap }
%struct.index_map = type { int, %Item_Set* }
%struct.intlist = type { int, %IntList }
%struct.item = type { %DeltaCost, %Rule }
%struct.item_set = type { int, int, %Operator, [2 x %Item_Set], %Item_Set, short*, %ItemArray, %ItemArray }
%struct.list = type { sbyte*, %List }
%struct.mapping = type { %List*, int, int, int, %Item_Set* }
%struct.nonterminal = type { sbyte*, int, int, int, %PlankMap, %Rule }
%struct.operator = type { sbyte*, uint, int, int, int, int, %Table }
%struct.pattern = type { %NonTerminal, %Operator, [2 x %NonTerminal] }
%struct.patternAST = type { %Symbol, sbyte*, %List }
%struct.plank = type { sbyte*, %List, int }
%struct.plankMap = type { %List, int, %StateMap }
%struct.rule = type { %DeltaCost, int, int, int, %NonTerminal, %Pattern, uint }
%struct.ruleAST = type { sbyte*, %PatternAST, int, %IntList, %Rule, %StrTableElement, %StrTableElement }
%struct.stateMap = type { sbyte*, %Plank, int, short* }
%struct.strTableElement = type { sbyte*, %IntList, sbyte* }
%struct.symbol = type { sbyte*, int, { %Operator } }
%struct.table = type { %Operator, %List, short*, [2 x %Dimension], %Item_Set* }
%yylval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
%yylhs = external global [25 x short] ; <[25 x short]*> [#uses=1]
%yylen = external global [25 x short] ; <[25 x short]*> [#uses=1]
%yydefred = external global [43 x short] ; <[43 x short]*> [#uses=1]
%yydgoto = external global [12 x short] ; <[12 x short]*> [#uses=1]
%yysindex = external global [43 x short] ; <[43 x short]*> [#uses=2]
%yyrindex = external global [43 x short] ; <[43 x short]*> [#uses=1]
%yygindex = external global [12 x short] ; <[12 x short]*> [#uses=1]
%yytable = external global [263 x short] ; <[263 x short]*> [#uses=4]
%yycheck = external global [263 x short] ; <[263 x short]*> [#uses=4]
%yynerrs = external global int ; <int*> [#uses=3]
%yyerrflag = external global int ; <int*> [#uses=6]
%yychar = external global int ; <int*> [#uses=15]
%yyssp = external global short* ; <short**> [#uses=15]
%yyvsp = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=30]
%yyval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
%yyss = external global short* ; <short**> [#uses=3]
%yysslim = external global short* ; <short**> [#uses=3]
%yyvs = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=1]
%.LC01