Luce / engineering
Learn Luce LuciaOS

Lists, maps, arrays, and builders

Assigning a list to a second name creates another reference to the same growable object. Appending through either name updates the object both names observe.

Follow one list alias

The example creates a list, shares it, appends through the second name, and reads through the first. MIR spells out the owning reference operations and checked index. LLVM calls the one container runtime. Assembly contains those calls plus the branches for stale objects, bounds, and allocation failure.

Compiler traceFollow one program through four representations
compiler build information

Luce source. Names and indentation describe the program for a reader.

open source file

func main(args: list[str]):
    var values = [len(args), 2]
    let same = values
    same.append(3)
    print(str(values[len(values) - 1]))

Luce MIR. Types, registers, blocks, calls, and lifetime operations form the instruction plan sent to the LLVM backend.

open MIR file
MIR instruction guide hover, focus, or tap dotted terms

r7 is one typed intermediate value, %2 is a local storage slot, and b1 is a basic block. Read each block from top to bottom, then follow its final control-flow instruction.

Hover or focus a dotted term in the file for its explanation. On a touch screen, tap a term to keep the note open and tap elsewhere to close it. The list includes the operations that appear in this file.

func …
Starts one MIR function and lists the source-level parameters with their resolved types.
local %N
Reserves a typed local slot. The slot gives later blocks a stable place to read or replace.
b0, b1, …
Names a basic block. Control enters at the label and runs until a branch, jump, trap, or return chooses what happens next.
r0, r1, …
Names one typed intermediate result. Each register is assigned once, which makes data flow explicit.
local_get
Reads a local slot into a fresh MIR register so this use has a precise value and type.
local_set
Writes a register into a local slot. Later blocks read that slot after control-flow paths join.
const
Creates a typed literal such as 2 or 10 inside the instruction stream.
subtract.i64
Subtracts signed 64-bit integers under Luce's checked-arithmetic rule.
intrinsic NAME
Invokes a language operation with runtime rules recorded by the compiler. The name identifies the operation.
intrinsic len
Reads the logical length defined by the value's type, such as argument count or Unicode-scalar count.
intrinsic str_value
Converts a typed value into owned text through Luce's string conversion rules.
intrinsic print
Sends text through the installed host output capability.
intrinsic append_value
Appends a value to a list and applies the element's ownership rule during storage.
intrinsic index_get
Checks an index and loads the selected element using the collection's value representation.
intrinsic retain
Adds one strong owner before another place begins holding the same reference.
intrinsic release
Removes one strong owner and runs destruction when the count reaches zero.
intrinsic drop_storage
Releases any reference held by a temporary value and leaves that temporary in its empty state.
heap_new
Allocates a runtime object row for a class or other reference-backed value.
ret
Returns the current function's result to its caller and closes the current control-flow path.

func main(args: list[str]) -> None
    local %1 (temporary): list[i64]
    local %2 values: list[i64]
    local %3 same: list[i64]
    local %4 (temporary): str
  b0:
    r0 = local_get %0
    r1 = intrinsic len, r0
    r2 = const 2
    r3 = heap_new list[i64]
    intrinsic append_value, r3, r1
    intrinsic append_value, r3, r2
    local_set %2, r3
    r7 = local_get %2
    intrinsic retain, r7
    local_set %3, r7
    r10 = local_get %3
    r11 = const 3
    intrinsic append_value, r10, r11
    r13 = local_get %2
    r14 = local_get %2
    r15 = intrinsic len, r14
    r16 = const 1
    r17 = subtract.i64 r15, r16
    r18 = intrinsic index_get, r13, r17
    r19 = intrinsic str_value, r18
    local_set %4, r19
    intrinsic print, r19
    r22 = local_get %4
    r23 = intrinsic drop_storage, r22
    local_set %4, r23
    r25 = local_get %3
    intrinsic release, r25
    r27 = local_get %2
    intrinsic release, r27
    ret

LLVM IR. The backend expands MIR into typed memory operations, calls, checks, and control-flow blocks for LLVM.

open LLVM IR file
LLVM IR instruction guide hover, focus, or tap dotted terms

%7 is an SSA value, i64 is a 64-bit integer type, ptr is a pointer, and @name is a module symbol. Numbered labels divide the function into basic blocks.

Hover or focus a dotted term in the file for its explanation. On a touch screen, tap a term to keep the note open and tap elsewhere to close it. The list includes the operations that appear in this file.

@name = …
Defines module data such as text constants, source positions, function records, and the artifact identity tag.
define … @name
Begins a generated function. The parameter attributes tell LLVM which pointers are valid, writable, or read-only.
declare … @name
Declares a runtime or LLVM helper whose body is provided elsewhere.
numeric label
Starts an LLVM basic block. Every branch names one of these labels as its destination.
%0, %1, …
Names an SSA value. Each name is assigned once, allowing LLVM to trace definitions and uses directly.
alloca
Reserves a stack slot for a local value, return area, or temporary aggregate.
getelementptr
Calculates the address of a field or indexed element while preserving LLVM's type and bounds information.
load
Copies a typed value from memory into an SSA value.
store
Copies an SSA value into a stack slot, object field, return area, or runtime structure.
icmp
Compares integers or pointers and produces the one-bit condition consumed by a branch or select.
br
Transfers control to another block. With an i1 operand it chooses between two destinations.
select
Chooses one of two SSA values from a condition, which can become a branch-free machine instruction.
call
Invokes a generated function, a runtime helper, a host callback, or an LLVM intrinsic.
extractvalue
Reads one field from an SSA aggregate, such as the result and overflow bit returned together.
insertvalue
Builds an SSA aggregate one field at a time.
ptrtoint
Encodes a pointer as an integer field inside Luce's uniform runtime value representation.
inttoptr
Recovers a pointer from the integer field of Luce's uniform runtime value representation.
zext
Widens an unsigned value by filling the new high bits with zero.
trunc
Keeps the low bits while converting to a narrower integer representation.
lshr
Shifts bits right and fills the high side with zero; this is useful for unpacking handle fields.
and
Combines or masks bits, often to inspect a flag in a packed handle or status value.
or
Sets or combines bits in a packed value.
add
Adds integer values or address-related offsets under the flags attached to the instruction.
mul
Multiplies integers after the language-specific checks have been represented.
ret
Returns a status or value and ends the current basic block.
@llvm.ssub.with.overflow.i64
Returns a signed difference together with the overflow bit required by checked subtraction.
@llvm.memcpy.inline
Copies a small fixed-size value representation; LLVM can expand it directly for the target.
@luce_rt_open
Creates the per-run runtime state and installs the table used to turn function numbers into source-aware traces.
@luce_rt_close
Closes the per-run runtime state after the final status and reports have been collected.
@luce_rt_args_list
Builds the owned list[str] passed to main from the host's argument callbacks.
@luce_rt_status
Combines the generated function result with runtime trap, error, exhaustion, and exit state.
@luce_rt_report_error
Sends an uncaught recoverable error through the host's error-report callback.
@luce_rt_report
Sends the completed trap report through the host callback selected by the entry wrapper.
@luce_rt_leaked
Reads the live-object count used to detect references that remain after program cleanup.
@luce_rt_exhaust
Records allocation exhaustion in the current run so the entry wrapper returns the corresponding status.
@luce_rt_raise
Records a source-aware trap in the runtime so every execution path reports the same code and location.
@luce_rt_unwound
Adds one generated function frame while a trap or uncaught error travels toward the entry point.
@luce_rt_retain
Adds a strong owner to a runtime object handle.
@luce_rt_release
Removes a strong owner and triggers destruction at zero.
@luce_rt_drop_storage
Releases reference-bearing fields in a temporary runtime value.
@luce_rt_str
Converts a uniform runtime value into owned UTF-8 text.
@luce_rt_append
Appends an element through the runtime's list or builder storage and ownership rules.
@luce_rt_new_list
Allocates the runtime object that owns a list buffer.
@luce_rt_files_install
Copies file-related callbacks from the host table into the current runtime context.
@luce_rt_sockets_install
Copies network callbacks from the host table into the current runtime context.
@luce_rt_graphics_install
Copies window and graphics callbacks from the host table into the current runtime context.
!prof
Attaches branch-probability metadata so LLVM can place common and failure paths efficiently.

; ModuleID = '/Users/sedov/Dev/luciaos/www/lucelang/examples/collections.luc'
source_filename = "/Users/sedov/Dev/luciaos/www/lucelang/examples/collections.luc"
target triple = "arm64-apple-darwin24.6.0"

@luce.text.0 = private unnamed_addr constant [0 x i8] zeroinitializer
@luce.text.1 = private unnamed_addr constant [21 x i8] c"null object reference"
@luce.text.2 = private unnamed_addr constant [22 x i8] c"object used after free"
@luce.text.3 = private unnamed_addr constant [16 x i8] c"integer overflow"
@luce.text.4 = private unnamed_addr constant [19 x i8] c"index out of bounds"
@luce.text.5 = private unnamed_addr constant [24 x i8] c"host service unavailable"
@luce.text.6 = private unnamed_addr constant [4 x i8] c"main"
@luce.text.7 = private unnamed_addr constant [62 x i8] c"/Users/sedov/Dev/luciaos/www/lucelang/examples/collections.luc"
@luce.origins.0 = private constant [30 x { i32, i32 }] [{ i32, i32 } { i32 2, i32 5 }, { i32, i32 } { i32 2, i32 5 }, { i32, i32 } { i32 2, i32 5 }, { i32, i32 } { i32 2, i32 5 }, { i32, i32 } { i32 2, i32 5 }, { i32, i32 } { i32 2, i32 5 }, { i32, i32 } { i32 2, i32 5 }, { i32, i32 } { i32 3, i32 5 }, { i32, i32 } { i32 3, i32 5 }, { i32, i32 } { i32 3, i32 5 }, { i32, i32 } { i32 4, i32 5 }, { i32, i32 } { i32 4, i32 5 }, { i32, i32 } { i32 4, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }, { i32, i32 } { i32 5, i32 5 }]
@luce.functions = private constant [1 x { ptr, i64, ptr, i64, ptr, i64 }] [{ ptr, i64, ptr, i64, ptr, i64 } { ptr @luce.text.6, i64 4, ptr @luce.text.7, i64 62, ptr @luce.origins.0, i64 30 }]
@luce.text.8 = private unnamed_addr constant [19 x i8] c"call depth exceeded"
@luce_artifact = constant { i64, i64, i64, i32, i32, i32, i32, { i32, [52 x i8] } } { i64 23734338332087628, i64 0, i64 -7092229304759745108, i32 3, i32 29, i32 1, i32 0, { i32, [52 x i8] } { i32 18, [52 x i8] c"aarch64-macos-none\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" } }

define internal i32 @luce.0.main(ptr align 8 nocapture readonly nonnull dereferenceable(472) noundef %0, ptr align 8 nocapture nonnull noundef %1, i64 noundef %2, i64 %3) {
4:
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  store i64 %3, ptr %5, align 8
  store i64 4294967295, ptr %6, align 8
  store i64 4294967295, ptr %7, align 8
  store i64 4294967295, ptr %8, align 8
  %10 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 0
  store i8 4, ptr %10, align 1
  %11 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 1
  store i8 -1, ptr %11, align 1
  %12 = extractvalue { ptr, i64 } { ptr @luce.text.0, i64 0 }, 0
  %13 = ptrtoint ptr %12 to i64
  %14 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 3
  store i64 %13, ptr %14, align 8
  %15 = extractvalue { ptr, i64 } { ptr @luce.text.0, i64 0 }, 1
  %16 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 4
  store i64 %15, ptr %16, align 8
  %17 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %18 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %17, i32 0, i32 0
  store i8 2, ptr %18, align 1
  %19 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %17, i32 0, i32 4
  store i64 0, ptr %19, align 8
  %20 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %21 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %22 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %21, i32 0, i32 0
  store i8 6, ptr %22, align 1
  %23 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %21, i32 0, i32 4
  store i64 0, ptr %23, align 8
  %24 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %25 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %24, i32 0, i32 0
  store i8 2, ptr %25, align 1
  %26 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %24, i32 0, i32 4
  store i64 0, ptr %26, align 8
  %27 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %28 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %27, i32 0, i32 0
  store i8 6, ptr %28, align 1
  %29 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %27, i32 0, i32 4
  store i64 0, ptr %29, align 8
  %30 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %31 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %30, i32 0, i32 0
  store i8 2, ptr %31, align 1
  %32 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %30, i32 0, i32 4
  store i64 0, ptr %32, align 8
  %33 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %34 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %33, i32 0, i32 0
  store i8 6, ptr %34, align 1
  %35 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %33, i32 0, i32 4
  store i64 0, ptr %35, align 8
  %36 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %37 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %36, i32 0, i32 0
  store i8 6, ptr %37, align 1
  %38 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %36, i32 0, i32 4
  store i64 0, ptr %38, align 8
  %39 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %40 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %39, i32 0, i32 0
  store i8 2, ptr %40, align 1
  %41 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %39, i32 0, i32 4
  store i64 0, ptr %41, align 8
  %42 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %43 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %42, i32 0, i32 0
  store i8 2, ptr %43, align 1
  %44 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %42, i32 0, i32 4
  store i64 0, ptr %44, align 8
  %45 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %46 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %47 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %48 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %47, i32 0, i32 0
  store i8 6, ptr %48, align 1
  %49 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %47, i32 0, i32 4
  store i64 0, ptr %49, align 8
  %50 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %51 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %50, i32 0, i32 0
  store i8 6, ptr %51, align 1
  %52 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %50, i32 0, i32 4
  store i64 0, ptr %52, align 8
  br label %53

53:
  %54 = load i64, ptr %5, align 8
  %55 = trunc i64 %54 to i32
  %56 = lshr i64 %54, 32
  %57 = trunc i64 %56 to i32
  %58 = icmp eq i32 %55, -1
  br i1 %58, label %59, label %62, !prof !0

59:
  %60 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 0
  %61 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 1
  call void @luce_rt_raise(ptr %1, i32 14, ptr %60, i64 %61)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 1)
  ret i32 1

62:
  %63 = getelementptr inbounds i8, ptr %1, i64 96
  %64 = load ptr, ptr %63, align 8!alias.scope !1, !noalias !2
  %65 = zext i32 %55 to i64
  %66 = mul nsw i64 %65, 112
  %67 = getelementptr inbounds i8, ptr %64, i64 %66
  %68 = getelementptr inbounds i8, ptr %67, i64 96
  %69 = load i32, ptr %68, align 4, !alias.scope !1, !noalias !2
  %70 = icmp ne i32 %69, %57
  br i1 %70, label %71, label %74, !prof !0

71:
  %72 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %73 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %72, i64 %73)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 1)
  ret i32 1

74:
  %75 = and i32 %69, 1
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %80, !prof !0

77:
  %78 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %79 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %78, i64 %79)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 1)
  ret i32 1

80:
  %81 = getelementptr inbounds i8, ptr %67, i64 16
  %82 = load i64, ptr %81, align 8!alias.scope !1, !noalias !2
  %83 = load ptr, ptr %67, align 8, !alias.scope !1, !noalias !2
  %84 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %17, i32 0, i32 3
  store i64 0, ptr %84, align 8
  %85 = call i32 @luce_rt_new_list(ptr %1, ptr %17, ptr %20)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %88, !prof !0

87:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 3)
  ret i32 1

88:
  %89 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %20, i32 0, i32 3
  %90 = load i64, ptr %89, align 8
  %91 = trunc i64 %90 to i32
  %92 = lshr i64 %90, 32
  %93 = trunc i64 %92 to i32
  %94 = icmp eq i32 %91, -1
  br i1 %94, label %95, label %98, !prof !0

95:
  %96 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 0
  %97 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 1
  call void @luce_rt_raise(ptr %1, i32 14, ptr %96, i64 %97)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 4)
  ret i32 1

98:
  %99 = getelementptr inbounds i8, ptr %1, i64 96
  %100 = load ptr, ptr %99, align 8!alias.scope !1, !noalias !2
  %101 = zext i32 %91 to i64
  %102 = mul nsw i64 %101, 112
  %103 = getelementptr inbounds i8, ptr %100, i64 %102
  %104 = getelementptr inbounds i8, ptr %103, i64 96
  %105 = load i32, ptr %104, align 4, !alias.scope !1, !noalias !2
  %106 = icmp ne i32 %105, %93
  br i1 %106, label %107, label %110, !prof !0

107:
  %108 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %109 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %108, i64 %109)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 4)
  ret i32 1

110:
  %111 = and i32 %105, 1
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %116, !prof !0

113:
  %114 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %115 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %114, i64 %115)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 4)
  ret i32 1

116:
  %117 = getelementptr inbounds i8, ptr %103, i64 16
  %118 = load i64, ptr %117, align 8!alias.scope !1, !noalias !2
  %119 = getelementptr inbounds i8, ptr %103, i64 8
  %120 = load i64, ptr %119, align 8, !alias.scope !1, !noalias !2
  %121 = add nuw i64 %118, 1
  %122 = mul nuw i64 %121, 8
  %123 = icmp ule i64 %122, %120
  br i1 %123, label %124, label %127, !prof !3

124:
  %125 = load ptr, ptr %103, align 8!alias.scope !1, !noalias !2
  %126 = getelementptr inbounds i64, ptr %125, i64 %118
  store i64 %82, ptr %126, align 8, !alias.scope !2, !noalias !1
  store i64 %121, ptr %117, align 8, !alias.scope !1, !noalias !2
  br label %132

127:
  %128 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %21, i32 0, i32 3
  store i64 %90, ptr %128, align 8
  %129 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %24, i32 0, i32 3
  store i64 %82, ptr %129, align 8
  %130 = call i32 @luce_rt_append(ptr %1, ptr %21, ptr %24)
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %137, label %138, !prof !0

132:
  %133 = trunc i64 %90 to i32
  %134 = lshr i64 %90, 32
  %135 = trunc i64 %134 to i32
  %136 = icmp eq i32 %133, -1
  br i1 %136, label %139, label %142, !prof !0

137:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 4)
  ret i32 1

138:
  br label %132

139:
  %140 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 0
  %141 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 1
  call void @luce_rt_raise(ptr %1, i32 14, ptr %140, i64 %141)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 5)
  ret i32 1

142:
  %143 = getelementptr inbounds i8, ptr %1, i64 96
  %144 = load ptr, ptr %143, align 8!alias.scope !1, !noalias !2
  %145 = zext i32 %133 to i64
  %146 = mul nsw i64 %145, 112
  %147 = getelementptr inbounds i8, ptr %144, i64 %146
  %148 = getelementptr inbounds i8, ptr %147, i64 96
  %149 = load i32, ptr %148, align 4, !alias.scope !1, !noalias !2
  %150 = icmp ne i32 %149, %135
  br i1 %150, label %151, label %154, !prof !0

151:
  %152 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %153 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %152, i64 %153)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 5)
  ret i32 1

154:
  %155 = and i32 %149, 1
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %160, !prof !0

157:
  %158 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %159 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %158, i64 %159)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 5)
  ret i32 1

160:
  %161 = getelementptr inbounds i8, ptr %147, i64 16
  %162 = load i64, ptr %161, align 8!alias.scope !1, !noalias !2
  %163 = getelementptr inbounds i8, ptr %147, i64 8
  %164 = load i64, ptr %163, align 8, !alias.scope !1, !noalias !2
  %165 = add nuw i64 %162, 1
  %166 = mul nuw i64 %165, 8
  %167 = icmp ule i64 %166, %164
  br i1 %167, label %168, label %171, !prof !3

168:
  %169 = load ptr, ptr %147, align 8!alias.scope !1, !noalias !2
  %170 = getelementptr inbounds i64, ptr %169, i64 %162
  store i64 2, ptr %170, align 8, !alias.scope !2, !noalias !1
  store i64 %165, ptr %161, align 8, !alias.scope !1, !noalias !2
  br label %176

171:
  %172 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %27, i32 0, i32 3
  store i64 %90, ptr %172, align 8
  %173 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %30, i32 0, i32 3
  store i64 2, ptr %173, align 8
  %174 = call i32 @luce_rt_append(ptr %1, ptr %27, ptr %30)
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %181, label %182, !prof !0

176:
  store i64 %90, ptr %7, align 8
  %177 = load i64, ptr %7, align 8
  %178 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %33, i32 0, i32 3
  store i64 %177, ptr %178, align 8
  %179 = call i32 @luce_rt_retain(ptr %1, ptr %33)
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %183, label %184, !prof !0

181:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 5)
  ret i32 1

182:
  br label %176

183:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 8)
  ret i32 1

184:
  store i64 %177, ptr %8, align 8
  %185 = load i64, ptr %8, align 8
  %186 = trunc i64 %185 to i32
  %187 = lshr i64 %185, 32
  %188 = trunc i64 %187 to i32
  %189 = icmp eq i32 %186, -1
  br i1 %189, label %190, label %193, !prof !0

190:
  %191 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 0
  %192 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 1
  call void @luce_rt_raise(ptr %1, i32 14, ptr %191, i64 %192)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 12)
  ret i32 1

193:
  %194 = getelementptr inbounds i8, ptr %1, i64 96
  %195 = load ptr, ptr %194, align 8!alias.scope !1, !noalias !2
  %196 = zext i32 %186 to i64
  %197 = mul nsw i64 %196, 112
  %198 = getelementptr inbounds i8, ptr %195, i64 %197
  %199 = getelementptr inbounds i8, ptr %198, i64 96
  %200 = load i32, ptr %199, align 4, !alias.scope !1, !noalias !2
  %201 = icmp ne i32 %200, %188
  br i1 %201, label %202, label %205, !prof !0

202:
  %203 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %204 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %203, i64 %204)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 12)
  ret i32 1

205:
  %206 = and i32 %200, 1
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %211, !prof !0

208:
  %209 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %210 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %209, i64 %210)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 12)
  ret i32 1

211:
  %212 = getelementptr inbounds i8, ptr %198, i64 16
  %213 = load i64, ptr %212, align 8!alias.scope !1, !noalias !2
  %214 = getelementptr inbounds i8, ptr %198, i64 8
  %215 = load i64, ptr %214, align 8, !alias.scope !1, !noalias !2
  %216 = add nuw i64 %213, 1
  %217 = mul nuw i64 %216, 8
  %218 = icmp ule i64 %217, %215
  br i1 %218, label %219, label %222, !prof !3

219:
  %220 = load ptr, ptr %198, align 8!alias.scope !1, !noalias !2
  %221 = getelementptr inbounds i64, ptr %220, i64 %213
  store i64 3, ptr %221, align 8, !alias.scope !2, !noalias !1
  store i64 %216, ptr %212, align 8, !alias.scope !1, !noalias !2
  br label %227

222:
  %223 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %36, i32 0, i32 3
  store i64 %185, ptr %223, align 8
  %224 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %39, i32 0, i32 3
  store i64 3, ptr %224, align 8
  %225 = call i32 @luce_rt_append(ptr %1, ptr %36, ptr %39)
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %234, label %235, !prof !0

227:
  %228 = load i64, ptr %7, align 8
  %229 = load i64, ptr %7, align 8
  %230 = trunc i64 %229 to i32
  %231 = lshr i64 %229, 32
  %232 = trunc i64 %231 to i32
  %233 = icmp eq i32 %230, -1
  br i1 %233, label %236, label %239, !prof !0

234:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 12)
  ret i32 1

235:
  br label %227

236:
  %237 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 0
  %238 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 1
  call void @luce_rt_raise(ptr %1, i32 14, ptr %237, i64 %238)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 15)
  ret i32 1

239:
  %240 = getelementptr inbounds i8, ptr %1, i64 96
  %241 = load ptr, ptr %240, align 8!alias.scope !1, !noalias !2
  %242 = zext i32 %230 to i64
  %243 = mul nsw i64 %242, 112
  %244 = getelementptr inbounds i8, ptr %241, i64 %243
  %245 = getelementptr inbounds i8, ptr %244, i64 96
  %246 = load i32, ptr %245, align 4, !alias.scope !1, !noalias !2
  %247 = icmp ne i32 %246, %232
  br i1 %247, label %248, label %251, !prof !0

248:
  %249 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %250 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %249, i64 %250)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 15)
  ret i32 1

251:
  %252 = and i32 %246, 1
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %257, !prof !0

254:
  %255 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %256 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %255, i64 %256)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 15)
  ret i32 1

257:
  %258 = getelementptr inbounds i8, ptr %244, i64 16
  %259 = load i64, ptr %258, align 8!alias.scope !1, !noalias !2
  %260 = load ptr, ptr %244, align 8, !alias.scope !1, !noalias !2
  %261 = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %259, i64 1)
  %262 = extractvalue { i64, i1 } %261, 0
  %263 = extractvalue { i64, i1 } %261, 1
  br i1 %263, label %264, label %267, !prof !0

264:
  %265 = extractvalue { ptr, i64 } { ptr @luce.text.3, i64 16 }, 0
  %266 = extractvalue { ptr, i64 } { ptr @luce.text.3, i64 16 }, 1
  call void @luce_rt_raise(ptr %1, i32 0, ptr %265, i64 %266)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 17)
  ret i32 1

267:
  %268 = trunc i64 %228 to i32
  %269 = lshr i64 %228, 32
  %270 = trunc i64 %269 to i32
  %271 = icmp eq i32 %268, -1
  br i1 %271, label %272, label %275, !prof !0

272:
  %273 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 0
  %274 = extractvalue { ptr, i64 } { ptr @luce.text.1, i64 21 }, 1
  call void @luce_rt_raise(ptr %1, i32 14, ptr %273, i64 %274)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 18)
  ret i32 1

275:
  %276 = getelementptr inbounds i8, ptr %1, i64 96
  %277 = load ptr, ptr %276, align 8!alias.scope !1, !noalias !2
  %278 = zext i32 %268 to i64
  %279 = mul nsw i64 %278, 112
  %280 = getelementptr inbounds i8, ptr %277, i64 %279
  %281 = getelementptr inbounds i8, ptr %280, i64 96
  %282 = load i32, ptr %281, align 4, !alias.scope !1, !noalias !2
  %283 = icmp ne i32 %282, %270
  br i1 %283, label %284, label %287, !prof !0

284:
  %285 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %286 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %285, i64 %286)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 18)
  ret i32 1

287:
  %288 = and i32 %282, 1
  %289 = icmp ne i32 %288, 0
  br i1 %289, label %290, label %293, !prof !0

290:
  %291 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 0
  %292 = extractvalue { ptr, i64 } { ptr @luce.text.2, i64 22 }, 1
  call void @luce_rt_raise(ptr %1, i32 13, ptr %291, i64 %292)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 18)
  ret i32 1

293:
  %294 = getelementptr inbounds i8, ptr %280, i64 16
  %295 = load i64, ptr %294, align 8!alias.scope !1, !noalias !2
  %296 = load ptr, ptr %280, align 8, !alias.scope !1, !noalias !2
  %297 = icmp slt i64 %262, 0
  %298 = icmp sge i64 %262, %295
  %299 = or i1 %297, %298
  br i1 %299, label %300, label %303, !prof !0

300:
  %301 = extractvalue { ptr, i64 } { ptr @luce.text.4, i64 19 }, 0
  %302 = extractvalue { ptr, i64 } { ptr @luce.text.4, i64 19 }, 1
  call void @luce_rt_raise(ptr %1, i32 10, ptr %301, i64 %302)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 18)
  ret i32 1

303:
  %304 = mul nsw i64 0, %295
  %305 = add nsw i64 %304, %262
  %306 = getelementptr inbounds i64, ptr %296, i64 %305
  %307 = load i64, ptr %306, align 8!alias.scope !2, !noalias !1
  %308 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %42, i32 0, i32 3
  store i64 %307, ptr %308, align 8
  %309 = call i32 @luce_rt_str(ptr %1, ptr %42, ptr %45)
  %310 = icmp ne i32 %309, 0
  br i1 %310, label %311, label %312, !prof !0

311:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 19)
  ret i32 1

312:
  %313 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %45, i32 0, i32 3
  %314 = load i64, ptr %313, align 8
  %315 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %45, i32 0, i32 1
  %316 = load i8, ptr %315, align 1
  %317 = icmp eq i8 %316, -1
  %318 = inttoptr i64 %314 to ptr
  %319 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %45, i32 0, i32 2
  %320 = select i1 %317, ptr %318, ptr %319
  %321 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %45, i32 0, i32 4
  %322 = load i64, ptr %321, align 8
  %323 = zext i8 %316 to i64
  %324 = select i1 %317, i64 %322, i64 %323
  %325 = insertvalue { ptr, i64 } poison, ptr %320, 0
  %326 = insertvalue { ptr, i64 } %325, i64 %324, 1
  call void @llvm.memcpy.inline.p0.p0.i64(ptr align 8 %9, ptr align 8 %45, i64 24, i1 false)
  %327 = extractvalue { ptr, i64 } %326, 0
  %328 = extractvalue { ptr, i64 } %326, 1
  %329 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 1
  %330 = load ptr, ptr %329, align 8
  %331 = icmp eq ptr %330, null
  br i1 %331, label %332, label %335, !prof !0

332:
  %333 = extractvalue { ptr, i64 } { ptr @luce.text.5, i64 24 }, 0
  %334 = extractvalue { ptr, i64 } { ptr @luce.text.5, i64 24 }, 1
  call void @luce_rt_raise(ptr %1, i32 9, ptr %333, i64 %334)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 21)
  ret i32 1

335:
  %336 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 0
  %337 = load ptr, ptr %336, align 8
  %338 = call i32 %330(ptr %337, ptr %327, i64 %328)
  %339 = icmp eq i32 %338, -1
  br i1 %339, label %340, label %341, !prof !0

340:
  call void @luce_rt_exhaust(ptr %1)
  ret i32 1

341:
  %342 = icmp ne i32 %338, 0
  %343 = icmp ne i32 %338, 1
  %344 = and i1 %342, %343
  br i1 %344, label %345, label %348, !prof !0

345:
  %346 = extractvalue { ptr, i64 } { ptr @luce.text.5, i64 24 }, 0
  %347 = extractvalue { ptr, i64 } { ptr @luce.text.5, i64 24 }, 1
  call void @luce_rt_raise(ptr %1, i32 9, ptr %346, i64 %347)
  call void @luce_rt_unwound(ptr %1, i32 0, i32 21)
  ret i32 1

348:
  %349 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 3
  %350 = load i64, ptr %349, align 8
  %351 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 1
  %352 = load i8, ptr %351, align 1
  %353 = icmp eq i8 %352, -1
  %354 = inttoptr i64 %350 to ptr
  %355 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 2
  %356 = select i1 %353, ptr %354, ptr %355
  %357 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %9, i32 0, i32 4
  %358 = load i64, ptr %357, align 8
  %359 = zext i8 %352 to i64
  %360 = select i1 %353, i64 %358, i64 %359
  %361 = insertvalue { ptr, i64 } poison, ptr %356, 0
  %362 = insertvalue { ptr, i64 } %361, i64 %360, 1
  call void @luce_rt_drop_storage(ptr %1, ptr %9, ptr %46)
  %363 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %46, i32 0, i32 3
  %364 = load i64, ptr %363, align 8
  %365 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %46, i32 0, i32 1
  %366 = load i8, ptr %365, align 1
  %367 = icmp eq i8 %366, -1
  %368 = inttoptr i64 %364 to ptr
  %369 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %46, i32 0, i32 2
  %370 = select i1 %367, ptr %368, ptr %369
  %371 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %46, i32 0, i32 4
  %372 = load i64, ptr %371, align 8
  %373 = zext i8 %366 to i64
  %374 = select i1 %367, i64 %372, i64 %373
  %375 = insertvalue { ptr, i64 } poison, ptr %370, 0
  %376 = insertvalue { ptr, i64 } %375, i64 %374, 1
  call void @llvm.memcpy.inline.p0.p0.i64(ptr align 8 %9, ptr align 8 %46, i64 24, i1 false)
  %377 = load i64, ptr %8, align 8
  %378 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %47, i32 0, i32 3
  store i64 %377, ptr %378, align 8
  %379 = call i32 @luce_rt_release(ptr %1, ptr %47)
  %380 = icmp ne i32 %379, 0
  br i1 %380, label %381, label %382, !prof !0

381:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 26)
  ret i32 1

382:
  %383 = load i64, ptr %7, align 8
  %384 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %50, i32 0, i32 3
  store i64 %383, ptr %384, align 8
  %385 = call i32 @luce_rt_release(ptr %1, ptr %50)
  %386 = icmp ne i32 %385, 0
  br i1 %386, label %387, label %388, !prof !0

387:
  call void @luce_rt_unwound(ptr %1, i32 0, i32 28)
  ret i32 1

388:
  ret i32 0
}

; Function Attrs: nounwind cold willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @luce_rt_raise(ptr nocapture nonnull noundef %0, i32 %1, ptr nocapture readonly %2, i64 %3) #0

; Function Attrs: nounwind cold willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @luce_rt_unwound(ptr nocapture nonnull noundef %0, i32 %1, i32 %2) #0

; Function Attrs: nounwind willreturn memory(readwrite)
declare i32 @luce_rt_new_list(ptr nocapture nonnull noundef %0, ptr align 8 nocapture readonly nonnull dereferenceable(24) noundef %1, ptr align 8 nocapture nonnull dereferenceable(24) writeonly noundef %2) #1

; Function Attrs: nounwind willreturn memory(readwrite)
declare i32 @luce_rt_append(ptr nocapture nonnull noundef %0, ptr align 8 nocapture readonly nonnull dereferenceable(24) noundef %1, ptr align 8 nocapture readonly nonnull dereferenceable(24) noundef %2) #1

; Function Attrs: nounwind willreturn memory(readwrite)
declare i32 @luce_rt_retain(ptr nocapture nonnull noundef %0, ptr align 8 nocapture readonly nonnull dereferenceable(24) noundef %1) #1

; Function Attrs: nounwind speculatable willreturn nofree nosync nocallback memory(none)
declare { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %0, i64 %1) #2

; Function Attrs: nounwind willreturn memory(read, argmem: readwrite, inaccessiblemem: readwrite)
declare i32 @luce_rt_str(ptr nocapture nonnull noundef %0, ptr align 8 nocapture readonly nonnull dereferenceable(24) noundef %1, ptr align 8 nocapture nonnull dereferenceable(24) writeonly noundef %2) #3

; Function Attrs: nounwind willreturn nofree nocallback memory(argmem: readwrite)
declare void @llvm.memcpy.inline.p0.p0.i64(ptr noalias nocapture writeonly %0, ptr noalias nocapture readonly %1, i64 %2, i1 immarg %3) #4

; Function Attrs: nounwind cold willreturn memory(argmem: write)
declare void @luce_rt_exhaust(ptr nocapture nonnull noundef %0) #5

; Function Attrs: nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @luce_rt_drop_storage(ptr nocapture nonnull noundef %0, ptr align 8 nocapture readonly nonnull dereferenceable(24) noundef %1, ptr align 8 nocapture nonnull dereferenceable(24) writeonly noundef %2) #6

; Function Attrs: nounwind memory(readwrite)
declare i32 @luce_rt_release(ptr nocapture nonnull noundef %0, ptr align 8 nocapture readonly nonnull dereferenceable(24) noundef %1) #7

define i32 @luce_main(ptr align 8 nocapture readonly nonnull dereferenceable(472) noundef %0) {
1:
  %2 = alloca i64, align 8
  %3 = alloca i32, align 8
  store i64 256, ptr %2, align 8
  %4 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 0
  %5 = load ptr, ptr %4, align 8
  %6 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 14
  %7 = load ptr, ptr %6, align 8
  %8 = icmp eq ptr %7, null
  br i1 %8, label %11, label %9

9:
  %10 = call i64 %7(ptr %5)
  store i64 %10, ptr %2, align 8
  br label %11

11:
  %12 = load i64, ptr %2, align 8
  %13 = call ptr @luce_rt_open(ptr @luce.functions, i64 1)
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16, !prof !0

15:
  ret i32 2

16:
  %17 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 28
  %18 = load ptr, ptr %17, align 8
  %19 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 54
  %20 = load ptr, ptr %19, align 8
  %21 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 55
  %22 = load ptr, ptr %21, align 8
  %23 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 56
  %24 = load ptr, ptr %23, align 8
  %25 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 57
  %26 = load ptr, ptr %25, align 8
  %27 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 58
  %28 = load ptr, ptr %27, align 8
  %29 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 29
  %30 = load ptr, ptr %29, align 8
  %31 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 30
  %32 = load ptr, ptr %31, align 8
  %33 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 31
  %34 = load ptr, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 32
  %36 = load ptr, ptr %35, align 8
  call void @luce_rt_files_install(ptr %13, ptr %5, ptr %18, ptr %20, ptr %22, ptr %24, ptr %26, ptr %28, ptr %30, ptr %32, ptr %34, ptr %36)
  %37 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 48
  %38 = load ptr, ptr %37, align 8
  %39 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 49
  %40 = load ptr, ptr %39, align 8
  %41 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 50
  %42 = load ptr, ptr %41, align 8
  %43 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 51
  %44 = load ptr, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 52
  %46 = load ptr, ptr %45, align 8
  call void @luce_rt_sockets_install(ptr %13, ptr %5, ptr %38, ptr %40, ptr %42, ptr %44, ptr %46)
  %47 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 40
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 41
  %50 = load ptr, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 42
  %52 = load ptr, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 43
  %54 = load ptr, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 44
  %56 = load ptr, ptr %55, align 8
  %57 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 45
  %58 = load ptr, ptr %57, align 8
  %59 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 46
  %60 = load ptr, ptr %59, align 8
  %61 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 47
  %62 = load ptr, ptr %61, align 8
  call void @luce_rt_graphics_install(ptr %13, ptr %5, ptr %48, ptr %50, ptr %52, ptr %54, ptr %56, ptr %58, ptr %60, ptr %62)
  %63 = icmp slt i64 %12, 1
  br i1 %63, label %64, label %65, !prof !0

64:
  call void @luce_rt_raise(ptr %13, i32 6, ptr @luce.text.8, i64 19)
  store i32 1, ptr %3, align 8
  br label %73

65:
  %66 = alloca { i8, i8, [6 x i8], i64, i64 }, align 8
  %67 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 4
  %68 = load ptr, ptr %67, align 8
  %69 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 5
  %70 = load ptr, ptr %69, align 8
  %71 = call i32 @luce_rt_args_list(ptr %13, ptr %5, ptr %68, ptr %70, ptr %66)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %77, label %78, !prof !0

73:
  %74 = load i32, ptr %3, align 8
  %75 = icmp eq i32 %74, 1
  %76 = icmp eq i32 %74, 2
  br i1 %75, label %83, label %86, !prof !0

77:
  store i32 1, ptr %3, align 8
  br label %73

78:
  %79 = getelementptr inbounds { i8, i8, [6 x i8], i64, i64 }, ptr %66, i32 0, i32 3
  %80 = load i64, ptr %79, align 8
  %81 = call i32 @luce.0.main(ptr %0, ptr %13, i64 %12, i64 %80)
  store i32 %81, ptr %3, align 8
  %82 = call i32 @luce_rt_release(ptr %13, ptr %66)
  br label %73

83:
  %84 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8
  call void @luce_rt_report(ptr %13, ptr %5, ptr %85)
  br label %86

86:
  br i1 %76, label %87, label %90, !prof !0

87:
  %88 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 15
  %89 = load ptr, ptr %88, align 8
  call void @luce_rt_report_error(ptr %13, ptr %5, ptr %89)
  br label %90

90:
  %91 = call i32 @luce_rt_status(ptr %13, i32 %74)
  %92 = icmp eq i32 %91, 2
  %93 = getelementptr inbounds { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }, ptr %0, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8
  %95 = icmp eq ptr %94, null
  %96 = or i1 %95, %92
  br i1 %96, label %97, label %98

97:
  call void @luce_rt_close(ptr %13)
  ret i32 %91

98:
  %99 = call i64 @luce_rt_leaked(ptr %13)
  call void %94(ptr %5, i64 %99)
  br label %97
}

; Function Attrs: nounwind willreturn memory(argmem: read, inaccessiblemem: readwrite)
declare noalias ptr @luce_rt_open(ptr readonly %0, i64 %1) #8

; Function Attrs: nounwind willreturn memory(argmem: readwrite)
declare void @luce_rt_files_install(ptr nocapture nonnull noundef %0, ptr %1, ptr %2, ptr %3, ptr %4, ptr %5, ptr %6, ptr %7, ptr %8, ptr %9, ptr %10, ptr %11) #9

; Function Attrs: nounwind willreturn memory(readwrite)
declare void @luce_rt_sockets_install(ptr nocapture nonnull noundef %0, ptr %1, ptr %2, ptr %3, ptr %4, ptr %5, ptr %6) #1

; Function Attrs: nounwind willreturn memory(argmem: readwrite)
declare void @luce_rt_graphics_install(ptr nocapture nonnull noundef %0, ptr %1, ptr %2, ptr %3, ptr %4, ptr %5, ptr %6, ptr %7, ptr %8, ptr %9) #9

; Function Attrs: nounwind memory(readwrite)
declare i32 @luce_rt_args_list(ptr nocapture nonnull noundef %0, ptr %1, ptr %2, ptr %3, ptr align 8 nocapture nonnull dereferenceable(24) writeonly noundef %4) #7

; Function Attrs: cold
declare void @luce_rt_report(ptr nocapture nonnull noundef %0, ptr %1, ptr %2) #10

; Function Attrs: cold
declare void @luce_rt_report_error(ptr nocapture nonnull noundef %0, ptr %1, ptr %2) #10

; Function Attrs: nounwind willreturn memory(argmem: read)
declare i32 @luce_rt_status(ptr nocapture nonnull noundef %0, i32 %1) #11

; Function Attrs: nounwind willreturn memory(argmem: read)
declare i64 @luce_rt_leaked(ptr nocapture nonnull noundef %0) #11

; Function Attrs: nounwind memory(readwrite)
declare void @luce_rt_close(ptr nocapture nonnull noundef %0) #7

attributes #0 = { nounwind cold willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) }
attributes #1 = { nounwind willreturn memory(readwrite) }
attributes #2 = { nounwind speculatable willreturn nofree nosync nocallback memory(none) }
attributes #3 = { nounwind willreturn memory(read, argmem: readwrite, inaccessiblemem: readwrite) }
attributes #4 = { nounwind willreturn nofree nocallback memory(argmem: readwrite) }
attributes #5 = { nounwind cold willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) }
attributes #7 = { nounwind memory(readwrite) }
attributes #8 = { nounwind willreturn memory(argmem: read, inaccessiblemem: readwrite) }
attributes #9 = { nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { cold }
attributes #11 = { nounwind willreturn memory(argmem: read) }

!0 = !{!"branch_weights", i32 1, i32 2000}
!1 = !{!4}
!2 = !{!5}
!3 = !{!"branch_weights", i32 2000, i32 1}
!4 = !{!"luce.rows", !6}
!5 = !{!"luce.elements", !6}
!6 = !{!"luce.alias"}

ARM64 object code. LLVM selected these instructions, registers, calls, and branch conditions for this target.

open assembly file
ARM64 instruction guide hover, focus, or tap dotted terms

x8 is a 64-bit register; w8 is its low 32 bits. A leading # marks a constant, brackets describe a memory address, and conditional instructions read the processor flags set by the preceding arithmetic or comparison.

Hover or focus a dotted term in the file for its explanation. On a touch screen, tap a term to keep the note open and tap elsewhere to close it. The list includes the operations that appear in this file.

mov
Copies a register value or loads a small constant. Calls also use it to place arguments in the required registers.
add
Adds registers or a constant. Address setup and stack restoration frequently use this instruction.
sub
Subtracts registers or a constant. Function prologues use it to reserve stack space.
subs
Subtracts and updates the condition flags for a following branch or select.
cmp
Performs a subtraction solely to set condition flags; a following branch or select consumes those flags.
cmn
Performs an addition solely to set condition flags. The checked multiply-by-two path uses it to recognize unsafe inputs.
csel
Selects one of two registers from the current condition flags. The clamp uses it to choose the doubled value or limit.
cset
Writes 1 or 0 according to a condition, producing a Boolean value from processor flags.
ldr
Loads a register from memory using a scaled address offset.
str
Stores one register into memory using a scaled address offset.
ldp
Loads two adjacent registers, often restoring saved registers or reading neighboring fields.
stp
Stores two adjacent registers, often saving the caller's registers in a function prologue.
ldur
Loads from an unscaled byte offset, which is useful for stack slots below the frame pointer.
stur
Stores to an unscaled byte offset, which is useful for stack slots below the frame pointer.
ldrb
Loads one byte and widens it into a register.
strb
Stores the low byte of a register.
sturb
Stores one byte using an unscaled byte offset.
sturh
Stores 16 bits using an unscaled byte offset.
adrp
Loads the page address of a symbol. The linker fills in the final page-relative relocation.
bl
Calls a direct target and records the return address in x30.
blr
Calls the function address held in a register, as required for host callbacks and function values.
b
Jumps to another instruction address.
b.eq
Branches when the previous comparison reported equality.
b.ne
Branches when the previous comparison reported different values.
b.ge
Branches when the signed left operand was greater or equal.
b.hs
Branches when an unsigned comparison found higher-or-same, represented by a set carry flag.
b.lo
Branches when an unsigned comparison found lower, represented by a clear carry flag.
b.vs
Branches when the arithmetic overflow flag is set.
cbz
Compares a register with zero and branches when it is zero.
cbnz
Compares a register with zero and branches when it contains a nonzero value.
tbnz
Tests one selected bit and branches when that bit is set; packed runtime flags use this form.
lsl
Shifts bits left. A shift by one multiplies by two after the overflow check has established a safe range.
lsr
Shifts bits right and fills with zero, often extracting the upper field of a packed handle.
umaddl
Widens two 32-bit unsigned operands, multiplies them, and adds a 64-bit base address.
orr
Combines bits, commonly setting tag or flag bits in a packed value.
ret
Returns to the address in x30 and ends the current machine function.


/Users/sedov/Dev/luciaos/www/lucelang/out/traces/collections.o:	file format mach-o arm64

Disassembly of section __TEXT,__text:

0000000000000000 <ltmp0>:
; luce_main():
       0:      	stp	x28, x27, [sp, #-0x60]!
       4:      	stp	x26, x25, [sp, #0x10]
       8:      	stp	x24, x23, [sp, #0x20]
       c:      	stp	x22, x21, [sp, #0x30]
      10:      	stp	x20, x19, [sp, #0x40]
      14:      	stp	x29, x30, [sp, #0x50]
      18:      	add	x29, sp, #0x50
      1c:      	sub	sp, sp, #0x170
      20:      	mov	x19, sp
      24:      	ldr	x8, [x0, #0x70]
      28:      	ldr	x20, [x0]
      2c:      	mov	x21, x0
      30:      	cbz	x8, 0x38c <ltmp0+0x38c>
      34:      	mov	x0, x20
      38:      	blr	x8
      3c:      	cmp	x0, #0x1
      40:      	cset	w23, lt
      44:      	adrp	x0, 0x0 <ltmp0>
      48:      	add	x0, x0, #0x0
      4c:      	mov	w1, #0x1                ; =1
      50:      	bl	0x50 <ltmp0+0x50>
      54:      	cbz	x0, 0x3a4 <ltmp0+0x3a4>
      58:      	ldp	x3, x4, [x21, #0x1b0]
      5c:      	mov	x22, x0
      60:      	ldp	x5, x6, [x21, #0x1c0]
      64:      	ldr	x2, [x21, #0xe0]
      68:      	ldp	x8, x9, [x21, #0xf8]
      6c:      	ldr	x7, [x21, #0x1d0]
      70:      	ldur	q0, [x21, #0xe8]
      74:      	sub	sp, sp, #0x20
      78:      	mov	x1, x20
      7c:      	stp	x8, x9, [sp, #0x10]
      80:      	str	q0, [sp]
      84:      	bl	0x84 <ltmp0+0x84>
      88:      	add	sp, sp, #0x20
      8c:      	ldp	x2, x3, [x21, #0x180]
      90:      	mov	x0, x22
      94:      	ldp	x4, x5, [x21, #0x190]
      98:      	mov	x1, x20
      9c:      	ldr	x6, [x21, #0x1a0]
      a0:      	bl	0xa0 <ltmp0+0xa0>
      a4:      	ldp	x8, x9, [x21, #0x170]
      a8:      	ldp	x2, x3, [x21, #0x140]
      ac:      	ldp	x4, x5, [x21, #0x150]
      b0:      	ldp	x6, x7, [x21, #0x160]
      b4:      	stp	x8, x9, [sp, #-0x10]!
      b8:      	mov	x0, x22
      bc:      	mov	x1, x20
      c0:      	bl	0xc0 <ltmp0+0xc0>
      c4:      	add	sp, sp, #0x10
      c8:      	cbnz	w23, 0x404 <ltmp0+0x404>
      cc:      	sub	x23, sp, #0x20
      d0:      	mov	sp, x23
      d4:      	ldp	x2, x3, [x21, #0x20]
      d8:      	mov	x0, x22
      dc:      	mov	x1, x20
      e0:      	mov	x4, x23
      e4:      	bl	0xe4 <ltmp0+0xe4>
      e8:      	cbnz	w0, 0x628 <ltmp0+0x628>
      ec:      	mov	w8, #0xff04             ; =65284
      f0:      	mov	w9, #0x6                ; =6
      f4:      	stur	xzr, [x29, #-0x78]
      f8:      	sturh	w8, [x29, #-0x70]
      fc:      	adrp	x8, 0x0 <ltmp0>
     100:      	add	x8, x8, #0x0
     104:      	stp	x8, xzr, [x29, #-0x68]
     108:      	mov	w8, #0x2                ; =2
     10c:      	sturb	w8, [x29, #-0x88]
     110:      	sturb	w8, [x29, #-0xd0]
     114:      	strb	w8, [x19, #0xc0]
     118:      	strb	w8, [x19, #0x78]
     11c:      	strb	w8, [x19, #0x60]
     120:      	ldr	x8, [x23, #0x8]
     124:      	sturb	w9, [x29, #-0xb8]
     128:      	cmn	w8, #0x1
     12c:      	stur	xzr, [x29, #-0xa8]
     130:      	stur	xzr, [x29, #-0xc0]
     134:      	strb	w9, [x19, #0xd8]
     138:      	str	xzr, [x19, #0xe8]
     13c:      	str	xzr, [x19, #0xd0]
     140:      	strb	w9, [x19, #0xa8]
     144:      	str	xzr, [x19, #0xb8]
     148:      	strb	w9, [x19, #0x90]
     14c:      	str	xzr, [x19, #0xa0]
     150:      	str	xzr, [x19, #0x88]
     154:      	str	xzr, [x19, #0x70]
     158:      	strb	w9, [x19, #0x18]
     15c:      	str	xzr, [x19, #0x28]
     160:      	strb	w9, [x19]
     164:      	str	xzr, [x19, #0x10]
     168:      	b.eq	0x420 <ltmp0+0x420>
     16c:      	mov	w9, #0x70               ; =112
     170:      	ldr	x10, [x22, #0x60]
     174:      	umaddl	x9, w8, w9, x10
     178:      	lsr	x8, x8, #32
     17c:      	ldr	w10, [x9, #0x60]
     180:      	cmp	w10, w8
     184:      	b.ne	0x3ac <ltmp0+0x3ac>
     188:      	tbnz	w8, #0x0, 0x3ac <ltmp0+0x3ac>
     18c:      	ldr	x27, [x9, #0x10]
     190:      	sub	x1, x29, #0x88
     194:      	sub	x2, x29, #0xa0
     198:      	mov	x0, x22
     19c:      	stur	xzr, [x29, #-0x80]
     1a0:      	bl	0x1a0 <ltmp0+0x1a0>
     1a4:      	cbnz	w0, 0x448 <ltmp0+0x448>
     1a8:      	ldur	x24, [x29, #-0x98]
     1ac:      	cmn	w24, #0x1
     1b0:      	b.eq	0x458 <ltmp0+0x458>
     1b4:      	mov	w8, w24
     1b8:      	lsr	x26, x24, #32
     1bc:      	lsl	x9, x8, #7
     1c0:      	ldr	x8, [x22, #0x60]
     1c4:      	sub	x25, x9, w24, uxtw #4
     1c8:      	add	x9, x8, x25
     1cc:      	ldr	w10, [x9, #0x60]
     1d0:      	cmp	w10, w26
     1d4:      	b.ne	0x3c4 <ltmp0+0x3c4>
     1d8:      	tbnz	w26, #0x0, 0x3c4 <ltmp0+0x3c4>
     1dc:      	ldp	x12, x10, [x9, #0x8]
     1e0:      	add	x11, x10, #0x1
     1e4:      	cmp	x12, x11, lsl #3
     1e8:      	b.lo	0x480 <ltmp0+0x480>
     1ec:      	ldr	x12, [x9]
     1f0:      	str	x11, [x9, #0x10]
     1f4:      	str	x27, [x12, x10, lsl #3]
     1f8:      	add	x8, x8, x25
     1fc:      	ldp	x11, x9, [x8, #0x8]
     200:      	add	x10, x9, #0x1
     204:      	cmp	x11, x10, lsl #3
     208:      	b.lo	0x4d8 <ltmp0+0x4d8>
     20c:      	ldr	x11, [x8]
     210:      	mov	w12, #0x2               ; =2
     214:      	str	x10, [x8, #0x10]
     218:      	str	x12, [x11, x9, lsl #3]
     21c:      	add	x1, x19, #0xa8
     220:      	mov	x0, x22
     224:      	str	x24, [x19, #0xb0]
     228:      	bl	0x228 <ltmp0+0x228>
     22c:      	cbnz	w0, 0x4fc <ltmp0+0x4fc>
     230:      	ldr	x8, [x22, #0x60]
     234:      	add	x9, x8, x25
     238:      	ldr	w10, [x9, #0x60]
     23c:      	cmp	w10, w26
     240:      	b.ne	0x50c <ltmp0+0x50c>
     244:      	ldp	x12, x10, [x9, #0x8]
     248:      	add	x11, x10, #0x1
     24c:      	cmp	x12, x11, lsl #3
     250:      	b.lo	0x534 <ltmp0+0x534>
     254:      	ldr	x12, [x9]
     258:      	mov	w13, #0x3               ; =3
     25c:      	str	x11, [x9, #0x10]
     260:      	str	x13, [x12, x10, lsl #3]
     264:      	add	x8, x8, x25
     268:      	ldr	x10, [x8, #0x10]
     26c:      	subs	x9, x10, #0x1
     270:      	b.vs	0x590 <ltmp0+0x590>
     274:      	tbnz	x9, #0x3f, 0x5b8 <ltmp0+0x5b8>
     278:      	cmp	x9, x10
     27c:      	b.ge	0x5b8 <ltmp0+0x5b8>
     280:      	ldr	x8, [x8]
     284:      	add	x1, x19, #0x60
     288:      	add	x2, x19, #0x48
     28c:      	mov	x0, x22
     290:      	ldr	x8, [x8, x9, lsl #3]
     294:      	str	x8, [x19, #0x68]
     298:      	bl	0x298 <ltmp0+0x298>
     29c:      	cbnz	w0, 0x5e0 <ltmp0+0x5e0>
     2a0:      	ldp	x9, x10, [x19, #0x50]
     2a4:      	ldur	q0, [x19, #0x48]
     2a8:      	ldr	x8, [x21, #0x8]
     2ac:      	ldrb	w11, [x19, #0x49]
     2b0:      	stur	q0, [x29, #-0x70]
     2b4:      	stur	x10, [x29, #-0x60]
     2b8:      	cbz	x8, 0x3dc <ltmp0+0x3dc>
     2bc:      	add	x12, x19, #0x48
     2c0:      	cmp	w11, #0xff
     2c4:      	ldr	x0, [x21]
     2c8:      	orr	x12, x12, #0x2
     2cc:      	csel	x2, x10, x11, eq
     2d0:      	csel	x1, x9, x12, eq
     2d4:      	blr	x8
     2d8:      	cmn	w0, #0x1
     2dc:      	b.eq	0x5f0 <ltmp0+0x5f0>
     2e0:      	cmp	w0, #0x2
     2e4:      	b.hs	0x3dc <ltmp0+0x3dc>
     2e8:      	sub	x1, x29, #0x70
     2ec:      	add	x2, x19, #0x30
     2f0:      	mov	x0, x22
     2f4:      	bl	0x2f4 <ltmp0+0x2f4>
     2f8:      	add	x1, x19, #0x18
     2fc:      	mov	x0, x22
     300:      	str	x24, [x19, #0x20]
     304:      	bl	0x304 <ltmp0+0x304>
     308:      	cbnz	w0, 0x5fc <ltmp0+0x5fc>
     30c:      	add	x1, x19, #0x0
     310:      	mov	x0, x22
     314:      	str	x24, [x19, #0x8]
     318:      	bl	0x318 <ltmp0+0x318>
     31c:      	cbnz	w0, 0x60c <ltmp0+0x60c>
     320:      	mov	x0, x22
     324:      	mov	x1, x23
     328:      	bl	0x328 <ltmp0+0x328>
     32c:      	mov	w1, wzr
     330:      	mov	x0, x22
     334:      	bl	0x334 <ltmp0+0x334>
     338:      	mov	w23, w0
     33c:      	cmp	w0, #0x2
     340:      	b.eq	0x360 <ltmp0+0x360>
     344:      	ldr	x21, [x21, #0x18]
     348:      	cbz	x21, 0x360 <ltmp0+0x360>
     34c:      	mov	x0, x22
     350:      	bl	0x350 <ltmp0+0x350>
     354:      	mov	x1, x0
     358:      	mov	x0, x20
     35c:      	blr	x21
     360:      	mov	x0, x22
     364:      	bl	0x364 <ltmp0+0x364>
     368:      	mov	w0, w23
     36c:      	sub	sp, x29, #0x50
     370:      	ldp	x29, x30, [sp, #0x50]
     374:      	ldp	x20, x19, [sp, #0x40]
     378:      	ldp	x22, x21, [sp, #0x30]
     37c:      	ldp	x24, x23, [sp, #0x20]
     380:      	ldp	x26, x25, [sp, #0x10]
     384:      	ldp	x28, x27, [sp], #0x60
     388:      	ret
     38c:      	mov	w23, wzr
     390:      	adrp	x0, 0x0 <ltmp0>
     394:      	add	x0, x0, #0x0
     398:      	mov	w1, #0x1                ; =1
     39c:      	bl	0x39c <ltmp0+0x39c>
     3a0:      	cbnz	x0, 0x58 <ltmp0+0x58>
     3a4:      	mov	w23, #0x2               ; =2
     3a8:      	b	0x368 <ltmp0+0x368>
     3ac:      	adrp	x2, 0x0 <ltmp0>
     3b0:      	add	x2, x2, #0x0
     3b4:      	mov	x0, x22
     3b8:      	mov	w1, #0xd                ; =13
     3bc:      	mov	w3, #0x16               ; =22
     3c0:      	b	0x434 <ltmp0+0x434>
     3c4:      	adrp	x2, 0x0 <ltmp0>
     3c8:      	add	x2, x2, #0x0
     3cc:      	mov	x0, x22
     3d0:      	mov	w1, #0xd                ; =13
     3d4:      	mov	w3, #0x16               ; =22
     3d8:      	b	0x46c <ltmp0+0x46c>
     3dc:      	adrp	x2, 0x0 <ltmp0>
     3e0:      	add	x2, x2, #0x0
     3e4:      	mov	x0, x22
     3e8:      	mov	w1, #0x9                ; =9
     3ec:      	mov	w3, #0x18               ; =24
     3f0:      	bl	0x3f0 <ltmp0+0x3f0>
     3f4:      	mov	x0, x22
     3f8:      	mov	w1, wzr
     3fc:      	mov	w2, #0x15               ; =21
     400:      	b	0x618 <ltmp0+0x618>
     404:      	adrp	x2, 0x0 <ltmp0>
     408:      	add	x2, x2, #0x0
     40c:      	mov	x0, x22
     410:      	mov	w1, #0x6                ; =6
     414:      	mov	w3, #0x13               ; =19
     418:      	bl	0x418 <ltmp0+0x418>
     41c:      	b	0x628 <ltmp0+0x628>
     420:      	adrp	x2, 0x0 <ltmp0>
     424:      	add	x2, x2, #0x0
     428:      	mov	x0, x22
     42c:      	mov	w1, #0xe                ; =14
     430:      	mov	w3, #0x15               ; =21
     434:      	bl	0x434 <ltmp0+0x434>
     438:      	mov	x0, x22
     43c:      	mov	w1, wzr
     440:      	mov	w2, #0x1                ; =1
     444:      	b	0x618 <ltmp0+0x618>
     448:      	mov	x0, x22
     44c:      	mov	w1, wzr
     450:      	mov	w2, #0x3                ; =3
     454:      	b	0x618 <ltmp0+0x618>
     458:      	adrp	x2, 0x0 <ltmp0>
     45c:      	add	x2, x2, #0x0
     460:      	mov	x0, x22
     464:      	mov	w1, #0xe                ; =14
     468:      	mov	w3, #0x15               ; =21
     46c:      	bl	0x46c <ltmp0+0x46c>
     470:      	mov	x0, x22
     474:      	mov	w1, wzr
     478:      	mov	w2, #0x4                ; =4
     47c:      	b	0x618 <ltmp0+0x618>
     480:      	sub	x1, x29, #0xb8
     484:      	sub	x2, x29, #0xd0
     488:      	mov	x0, x22
     48c:      	stur	x24, [x29, #-0xb0]
     490:      	stur	x27, [x29, #-0xc8]
     494:      	bl	0x494 <ltmp0+0x494>
     498:      	cbnz	w0, 0x470 <ltmp0+0x470>
     49c:      	ldr	x8, [x22, #0x60]
     4a0:      	add	x9, x8, x25
     4a4:      	ldr	w9, [x9, #0x60]
     4a8:      	cmp	w9, w26
     4ac:      	b.eq	0x1f8 <ltmp0+0x1f8>
     4b0:      	adrp	x2, 0x0 <ltmp0>
     4b4:      	add	x2, x2, #0x0
     4b8:      	mov	x0, x22
     4bc:      	mov	w1, #0xd                ; =13
     4c0:      	mov	w3, #0x16               ; =22
     4c4:      	bl	0x4c4 <ltmp0+0x4c4>
     4c8:      	mov	x0, x22
     4cc:      	mov	w1, wzr
     4d0:      	mov	w2, #0x5                ; =5
     4d4:      	b	0x618 <ltmp0+0x618>
     4d8:      	mov	w8, #0x2                ; =2
     4dc:      	add	x1, x19, #0xd8
     4e0:      	add	x2, x19, #0xc0
     4e4:      	mov	x0, x22
     4e8:      	str	x24, [x19, #0xe0]
     4ec:      	str	x8, [x19, #0xc8]
     4f0:      	bl	0x4f0 <ltmp0+0x4f0>
     4f4:      	cbz	w0, 0x21c <ltmp0+0x21c>
     4f8:      	b	0x4c8 <ltmp0+0x4c8>
     4fc:      	mov	x0, x22
     500:      	mov	w1, wzr
     504:      	mov	w2, #0x8                ; =8
     508:      	b	0x618 <ltmp0+0x618>
     50c:      	adrp	x2, 0x0 <ltmp0>
     510:      	add	x2, x2, #0x0
     514:      	mov	x0, x22
     518:      	mov	w1, #0xd                ; =13
     51c:      	mov	w3, #0x16               ; =22
     520:      	bl	0x520 <ltmp0+0x520>
     524:      	mov	x0, x22
     528:      	mov	w1, wzr
     52c:      	mov	w2, #0xc                ; =12
     530:      	b	0x618 <ltmp0+0x618>
     534:      	mov	w8, #0x3                ; =3
     538:      	add	x1, x19, #0x90
     53c:      	add	x2, x19, #0x78
     540:      	mov	x0, x22
     544:      	str	x24, [x19, #0x98]
     548:      	str	x8, [x19, #0x80]
     54c:      	bl	0x54c <ltmp0+0x54c>
     550:      	cbnz	w0, 0x524 <ltmp0+0x524>
     554:      	ldr	x8, [x22, #0x60]
     558:      	add	x9, x8, x25
     55c:      	ldr	w9, [x9, #0x60]
     560:      	cmp	w9, w26
     564:      	b.eq	0x264 <ltmp0+0x264>
     568:      	adrp	x2, 0x0 <ltmp0>
     56c:      	add	x2, x2, #0x0
     570:      	mov	x0, x22
     574:      	mov	w1, #0xd                ; =13
     578:      	mov	w3, #0x16               ; =22
     57c:      	bl	0x57c <ltmp0+0x57c>
     580:      	mov	x0, x22
     584:      	mov	w1, wzr
     588:      	mov	w2, #0xf                ; =15
     58c:      	b	0x618 <ltmp0+0x618>
     590:      	adrp	x2, 0x0 <ltmp0>
     594:      	add	x2, x2, #0x0
     598:      	mov	x0, x22
     59c:      	mov	w1, wzr
     5a0:      	mov	w3, #0x10               ; =16
     5a4:      	bl	0x5a4 <ltmp0+0x5a4>
     5a8:      	mov	x0, x22
     5ac:      	mov	w1, wzr
     5b0:      	mov	w2, #0x11               ; =17
     5b4:      	b	0x618 <ltmp0+0x618>
     5b8:      	adrp	x2, 0x0 <ltmp0>
     5bc:      	add	x2, x2, #0x0
     5c0:      	mov	x0, x22
     5c4:      	mov	w1, #0xa                ; =10
     5c8:      	mov	w3, #0x13               ; =19
     5cc:      	bl	0x5cc <ltmp0+0x5cc>
     5d0:      	mov	x0, x22
     5d4:      	mov	w1, wzr
     5d8:      	mov	w2, #0x12               ; =18
     5dc:      	b	0x618 <ltmp0+0x618>
     5e0:      	mov	x0, x22
     5e4:      	mov	w1, wzr
     5e8:      	mov	w2, #0x13               ; =19
     5ec:      	b	0x618 <ltmp0+0x618>
     5f0:      	mov	x0, x22
     5f4:      	bl	0x5f4 <ltmp0+0x5f4>
     5f8:      	b	0x61c <ltmp0+0x61c>
     5fc:      	mov	x0, x22
     600:      	mov	w1, wzr
     604:      	mov	w2, #0x1a               ; =26
     608:      	b	0x618 <ltmp0+0x618>
     60c:      	mov	x0, x22
     610:      	mov	w1, wzr
     614:      	mov	w2, #0x1c               ; =28
     618:      	bl	0x618 <ltmp0+0x618>
     61c:      	mov	x0, x22
     620:      	mov	x1, x23
     624:      	bl	0x624 <ltmp0+0x624>
     628:      	ldr	x2, [x21, #0x10]
     62c:      	mov	x0, x22
     630:      	mov	x1, x20
     634:      	bl	0x634 <ltmp0+0x634>
     638:      	mov	w1, #0x1                ; =1
     63c:      	mov	x0, x22
     640:      	bl	0x640 <ltmp0+0x640>
     644:      	mov	w23, w0
     648:      	cmp	w0, #0x2
     64c:      	b.ne	0x344 <ltmp0+0x344>
     650:      	b	0x360 <ltmp0+0x360>

Four storage purposes

TypeShapePrimary operationIdentity
list[T]growable ordered sequenceappend, insert, remove, sliceshared ARC object
map[K,V]keyed mappingput, lookup, remove, keys/valuesshared ARC object
array[T,_,...]fixed-shape dense grid, rank 1–4indexed read/write, fill, whole-array mathshared ARC object
buildermutable text accumulationappend then build()shared ARC object

Outer copy, inner ownership

Assigning a collection retains the same outer identity. A list slice or map.values() creates a new outer list. Each value element copies; each reference element is retained and continues to share its referenced identity. Worker transfer provides recursive graph copying where isolation requires it.

Slicing list[Class]New sequence, shared elements

original list

A · B · C

outer identity 1

slice

new outer list

B · C

elements retained; B and C are the same class identities

Runtime storage and movement

The runtime object table owns collection metadata and backing buffers. A stable object handle lets a list grow and move its buffer while every alias continues to resolve the same list. Maps own key/value entries. Arrays keep fixed dimensions and a densely flattened element buffer; index calculation and bounds checks are centralized.

Map keys are intentionally narrow

Current keys are i64, str, or one exact enum type. Each supported key type has a defined equality and hash operation. Adding another key category would require defining both operations and their lifetime behavior.

Rank is part of the type

Each underscore in array[T, _, ...] states one rank. Construction supplies extents; the runtime stores them and flattens indexes with checked arithmetic. Rank and element type are static even though dimensions are runtime values.

Mutation retains before replacement

Storing a reference element retains it before the old slot is released. Removing an element releases its ownership. Clearing or destroying a container walks its live elements exactly once. Whole-array operations remain typed through lowering, preserving element type, trap behavior, and ownership in the runtime call.

Worker transfer builds a snapshot

Worker transfer recursively rebuilds permitted value and container graphs in another runtime, preserving aliases and cycles inside the snapshot. Separate runtime object tables require new handles for every transferred object.