mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-18 15:31:32 +03:00
d44457fc32
* bump snarkvm rev * update default gitignore * impl leo execute * bump snarkvm 0.14.5 * modify examples wip * update run.sh examples * impl env file * clippy warning * fix auction example * fix auction example env * generate new private key for new env - tests failing due to env not found err * commit error changes * Fix tests; clippy * Get examples working * leo build checks that build dir is well formed; clippy * Clean up * Update examples/README.md Co-authored-by: d0cd <pranavsaig@gmail.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * do not commit .avm files * use snarkvm commands --------- Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> Co-authored-by: Pranav Gaddamadugu <pranav@aleo.org> Co-authored-by: d0cd <pranavsaig@gmail.com>
106 lines
3.0 KiB
Plaintext
106 lines
3.0 KiB
Plaintext
program bubblesort.aleo;
|
|
|
|
|
|
|
|
function bubble_sort:
|
|
input r0 as u32.private;
|
|
input r1 as u32.private;
|
|
input r2 as u32.private;
|
|
input r3 as u32.private;
|
|
input r4 as u32.private;
|
|
input r5 as u32.private;
|
|
input r6 as u32.private;
|
|
input r7 as u32.private;
|
|
lt r1 r0 into r8;
|
|
ternary r8 r1 r0 into r9;
|
|
ternary r8 r0 r1 into r10;
|
|
lt r2 r10 into r11;
|
|
ternary r11 r2 r10 into r12;
|
|
ternary r11 r10 r2 into r13;
|
|
lt r3 r13 into r14;
|
|
ternary r14 r3 r13 into r15;
|
|
ternary r14 r13 r3 into r16;
|
|
lt r4 r16 into r17;
|
|
ternary r17 r4 r16 into r18;
|
|
ternary r17 r16 r4 into r19;
|
|
lt r5 r19 into r20;
|
|
ternary r20 r5 r19 into r21;
|
|
ternary r20 r19 r5 into r22;
|
|
lt r6 r22 into r23;
|
|
ternary r23 r6 r22 into r24;
|
|
ternary r23 r22 r6 into r25;
|
|
lt r7 r25 into r26;
|
|
ternary r26 r7 r25 into r27;
|
|
ternary r26 r25 r7 into r28;
|
|
lt r12 r9 into r29;
|
|
ternary r29 r12 r9 into r30;
|
|
ternary r29 r9 r12 into r31;
|
|
lt r15 r31 into r32;
|
|
ternary r32 r15 r31 into r33;
|
|
ternary r32 r31 r15 into r34;
|
|
lt r18 r34 into r35;
|
|
ternary r35 r18 r34 into r36;
|
|
ternary r35 r34 r18 into r37;
|
|
lt r21 r37 into r38;
|
|
ternary r38 r21 r37 into r39;
|
|
ternary r38 r37 r21 into r40;
|
|
lt r24 r40 into r41;
|
|
ternary r41 r24 r40 into r42;
|
|
ternary r41 r40 r24 into r43;
|
|
lt r27 r43 into r44;
|
|
ternary r44 r27 r43 into r45;
|
|
ternary r44 r43 r27 into r46;
|
|
lt r33 r30 into r47;
|
|
ternary r47 r33 r30 into r48;
|
|
ternary r47 r30 r33 into r49;
|
|
lt r36 r49 into r50;
|
|
ternary r50 r36 r49 into r51;
|
|
ternary r50 r49 r36 into r52;
|
|
lt r39 r52 into r53;
|
|
ternary r53 r39 r52 into r54;
|
|
ternary r53 r52 r39 into r55;
|
|
lt r42 r55 into r56;
|
|
ternary r56 r42 r55 into r57;
|
|
ternary r56 r55 r42 into r58;
|
|
lt r45 r58 into r59;
|
|
ternary r59 r45 r58 into r60;
|
|
ternary r59 r58 r45 into r61;
|
|
lt r51 r48 into r62;
|
|
ternary r62 r51 r48 into r63;
|
|
ternary r62 r48 r51 into r64;
|
|
lt r54 r64 into r65;
|
|
ternary r65 r54 r64 into r66;
|
|
ternary r65 r64 r54 into r67;
|
|
lt r57 r67 into r68;
|
|
ternary r68 r57 r67 into r69;
|
|
ternary r68 r67 r57 into r70;
|
|
lt r60 r70 into r71;
|
|
ternary r71 r60 r70 into r72;
|
|
ternary r71 r70 r60 into r73;
|
|
lt r66 r63 into r74;
|
|
ternary r74 r66 r63 into r75;
|
|
ternary r74 r63 r66 into r76;
|
|
lt r69 r76 into r77;
|
|
ternary r77 r69 r76 into r78;
|
|
ternary r77 r76 r69 into r79;
|
|
lt r72 r79 into r80;
|
|
ternary r80 r72 r79 into r81;
|
|
ternary r80 r79 r72 into r82;
|
|
lt r78 r75 into r83;
|
|
ternary r83 r78 r75 into r84;
|
|
ternary r83 r75 r78 into r85;
|
|
lt r81 r85 into r86;
|
|
ternary r86 r81 r85 into r87;
|
|
ternary r86 r85 r81 into r88;
|
|
lt r87 r84 into r89;
|
|
ternary r89 r87 r84 into r90;
|
|
ternary r89 r84 r87 into r91;
|
|
output r90 as u32.private;
|
|
output r91 as u32.private;
|
|
output r88 as u32.private;
|
|
output r82 as u32.private;
|
|
output r73 as u32.private;
|
|
output r61 as u32.private;
|
|
output r46 as u32.private;
|
|
output r28 as u32.private;
|