Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Nim
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
android-kotlin source #2
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
ART dex2oat aml_art_331012050 (Oct 2022)
ART dex2oat aml_art_341110060 (Nov 2023)
ART dex2oat aml_art_341311100 (Jan 2024)
ART dex2oat aml_art_341411300 (Feb 2024)
ART dex2oat aml_art_341514410 (Mar 2024)
ART dex2oat aml_art_341615020 (Apr 2024)
ART dex2oat aml_art_341711000 (May 2024)
ART dex2oat aml_art_341810020 (Jun 2024)
ART dex2oat latest
d8 8.1.56
d8 8.1.72
d8 8.2.33
d8 8.2.42
d8 8.2.47
d8 8.3.36
d8 8.3.37
d8 8.5.10
d8 8.5.27
d8 8.5.35
r8 8.2.33
r8 8.2.42
r8 8.2.47
r8 8.3.36
r8 8.3.37
r8 8.5.10
r8 8.5.27
r8 8.5.35
Options
Source code
public class Sort { fun quickSort(arr: IntArray, left: Int = 0, right: Int = arr.size - 1): IntArray { var start = left var end = right val pivot = arr[(left + right) / 2] while (start <= end) { while (arr[start] < pivot) { start++ } while (arr[end] > pivot) { end-- } if (start <= end) { val temp = arr[start] arr[start] = arr[end] arr[end] = temp start++ end-- } } if (left < end) { quickSort(arr, left, end) } if (start < right) { quickSort(arr, start, right) } return arr } }
android-kotlin source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
ART dex2oat aml_art_331012050 (Oct 2022)
ART dex2oat aml_art_341110060 (Nov 2023)
ART dex2oat aml_art_341311100 (Jan 2024)
ART dex2oat aml_art_341411300 (Feb 2024)
ART dex2oat aml_art_341514410 (Mar 2024)
ART dex2oat aml_art_341615020 (Apr 2024)
ART dex2oat aml_art_341711000 (May 2024)
ART dex2oat aml_art_341810020 (Jun 2024)
ART dex2oat latest
d8 8.1.56
d8 8.1.72
d8 8.2.33
d8 8.2.42
d8 8.2.47
d8 8.3.36
d8 8.3.37
d8 8.5.10
d8 8.5.27
d8 8.5.35
r8 8.2.33
r8 8.2.42
r8 8.2.47
r8 8.3.36
r8 8.3.37
r8 8.5.10
r8 8.5.27
r8 8.5.35
Options
Source code
HSPLSquare;-><init>()V HSPLSquare;->square(I)I LSquare;
android-kotlin source #3
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
ART dex2oat aml_art_331012050 (Oct 2022)
ART dex2oat aml_art_341110060 (Nov 2023)
ART dex2oat aml_art_341311100 (Jan 2024)
ART dex2oat aml_art_341411300 (Feb 2024)
ART dex2oat aml_art_341514410 (Mar 2024)
ART dex2oat aml_art_341615020 (Apr 2024)
ART dex2oat aml_art_341711000 (May 2024)
ART dex2oat aml_art_341810020 (Jun 2024)
ART dex2oat latest
d8 8.1.56
d8 8.1.72
d8 8.2.33
d8 8.2.42
d8 8.2.47
d8 8.3.36
d8 8.3.37
d8 8.5.10
d8 8.5.27
d8 8.5.35
r8 8.2.33
r8 8.2.42
r8 8.2.47
r8 8.3.36
r8 8.3.37
r8 8.5.10
r8 8.5.27
r8 8.5.35
Options
Source code
-keep class Sort { public *; }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
About the author
Statistics
Changelog
Version tree