# ATMEL AVR Disassembler

Assembler code

```
.text:0000003B
.text:0000003B ; =============== S U B R O U T I N E =======================================
.text:0000003B
.text:0000003B
.text:0000003B                 ; public qsort
.text:0000003B qsort:                                  ; CODE XREF: sub_41+1DE↓p
.text:0000003B                 ldi     r26, 0xA
.text:0000003C                 ldi     r27, 0
.text:0000003D                 ldi     r30, (sub_41 & 0xFF)
.text:0000003E                 ldi     r31, (sub_41 >> 8)
.text:0000003F                 jmp     __prologue_saves__
.text:0000003F ; End of function qsort
.text:0000003F
.text:00000041
.text:00000041 ; =============== S U B R O U T I N E =======================================
.text:00000041
.text:00000041
.text:00000041 sub_41:                                 ; DATA XREF: qsort+2↑o
.text:00000041                                         ; qsort+3↑o
.text:00000041                 movw    r4, r24
.text:00000042                 movw    r8, r22
.text:00000043                 movw    r6, r20
.text:00000044                 movw    r2, r18
.text:00000045                 std     Y+5, r20
.text:00000046                 std     Y+6, r7
.text:00000047                 clr     r18
.text:00000048                 clr     r19
.text:00000049                 sub     r18, r20
.text:0000004A                 sbc     r19, r21
.text:0000004B                 std     Y+8, r19
.text:0000004C                 std     Y+7, r18
.text:0000004D
.text:0000004D loc_4D:                                 ; CODE XREF: sub_41+1EB↓j
.text:0000004D                 ldi     r19, 7
.text:0000004E                 cp      r8, r19
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/8.4/user-guide/disassembler/disassembly-gallery/atmel-avr-disassembler.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
