// File: /workspace/github_c_makefile_star2_O0/CSerxzm[P]WindowstoLinuxInterface/src/SORT.c
// Function: main
int main(int argc, char** argv) 
{   
    char lines[argc+1][255];
    predealLine(argc, argv, lines);
    char* srcname = lines[1];
    FILE* src = fopen(srcname, "r");
    char fileLine[1024]; 
    int lineCnt = 0;
    while(!feof(src)) {
        fgets(fileLine, 1024, src);
        if(feof(src)) {
            break;
        }
        lineCnt++;
    }
    int i, j;
    rewind(src);
    char fileLineList[lineCnt][1024], temp[1024];
    for(i = 0; i < lineCnt; i++) {
        fgets(fileLine, 1024, src);
        strcpy(fileLineList[i], fileLine);
    }
    for(i = 0; i < lineCnt-1; ++i) {
        for(j = i+1; j < lineCnt; ++j) {
            if(strcmp(fileLineList[i], fileLineList[j])>0) {
                strcpy(temp, fileLineList[i]);
                strcpy(fileLineList[i], fileLineList[j]);
                strcpy(fileLineList[j], temp);
            }
        }
    }
    for(i = 0; i < lineCnt; i++) {
        int len = strlen(fileLineList[i]);
        if(fileLineList[i][len-1] == '\n')
            printf("%s", fileLineList[i]);
        else
            printf("%s\n", fileLineList[i]);
    }

    fclose(src);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x870, %rsp            # imm = 0x870
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %eax
incl %eax
movq %rsp, %rcx
movq %rcx, -0x18(%rbp)
movq %rax, %rcx
shlq $0x8, %rcx
subq %rax, %rcx
addq $0xf, %rcx
movabsq $0x1fffffffff0, %rdx    # imm = 0x1FFFFFFFFF0
andq %rdx, %rcx
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x860(%rbp)
movq %rdx, %rsp
movq %rax, -0x20(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x11e0
movq -0x860(%rbp), %rax
addq $0xff, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0xc08(%rip), %rsi       # 0x2004
callq 0x10c0
movq %rax, -0x30(%rbp)
movl $0x0, -0x434(%rbp)
movq -0x30(%rbp), %rdi
callq 0x10a0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1426
jmp 0x145c
leaq -0x430(%rbp), %rdi
movq -0x30(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq -0x30(%rbp), %rdi
callq 0x10a0
cmpl $0x0, %eax
je 0x144b
jmp 0x145c
movl -0x434(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x434(%rbp)
jmp 0x140f
movq -0x30(%rbp), %rdi
callq 0x1070
movl -0x434(%rbp), %eax
movq %rax, %rdx
shlq $0xa, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x868(%rbp)
movq %rcx, %rsp
movq %rax, -0x448(%rbp)
movl $0x0, -0x438(%rbp)
movl -0x438(%rbp), %eax
cmpl -0x434(%rbp), %eax
jge 0x14e8
leaq -0x430(%rbp), %rdi
movq -0x30(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x1080
movq -0x868(%rbp), %rdi
movslq -0x438(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rdi
leaq -0x430(%rbp), %rsi
callq 0x1030
movl -0x438(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x438(%rbp)
jmp 0x1493
movl $0x0, -0x438(%rbp)
movl -0x438(%rbp), %eax
movl -0x434(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x15f3
movl -0x438(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x43c(%rbp)
movl -0x43c(%rbp), %eax
cmpl -0x434(%rbp), %eax
jge 0x15dd
movq -0x868(%rbp), %rsi
movslq -0x438(%rbp), %rax
shlq $0xa, %rax
movq %rsi, %rdi
addq %rax, %rdi
movslq -0x43c(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rsi
callq 0x1090
cmpl $0x0, %eax
jle 0x15c7
movq -0x868(%rbp), %rsi
leaq -0x850(%rbp), %rdi
movslq -0x438(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rsi
callq 0x1030
movq -0x868(%rbp), %rsi
movslq -0x438(%rbp), %rax
shlq $0xa, %rax
movq %rsi, %rdi
addq %rax, %rdi
movslq -0x43c(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rsi
callq 0x1030
movq -0x868(%rbp), %rdi
movslq -0x43c(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rdi
leaq -0x850(%rbp), %rsi
callq 0x1030
jmp 0x15c9
movl -0x43c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x43c(%rbp)
jmp 0x1518
jmp 0x15df
movl -0x438(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x438(%rbp)
jmp 0x14f2
movl $0x0, -0x438(%rbp)
movl -0x438(%rbp), %eax
cmpl -0x434(%rbp), %eax
jge 0x16ba
movq -0x868(%rbp), %rdi
movslq -0x438(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rdi
callq 0x1050
movq %rax, %rcx
movq -0x868(%rbp), %rax
movl %ecx, -0x854(%rbp)
movslq -0x438(%rbp), %rcx
shlq $0xa, %rcx
addq %rcx, %rax
movl -0x854(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x1681
movq -0x868(%rbp), %rsi
movslq -0x438(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rsi
leaq 0x98e(%rip), %rdi       # 0x2006
movb $0x0, %al
callq 0x1060
jmp 0x16a4
movq -0x868(%rbp), %rsi
movslq -0x438(%rbp), %rax
shlq $0xa, %rax
addq %rax, %rsi
leaq 0x96c(%rip), %rdi       # 0x2009
movb $0x0, %al
callq 0x1060
jmp 0x16a6
movl -0x438(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x438(%rbp)
jmp 0x15fd
movq -0x30(%rbp), %rdi
callq 0x1040
movl $0x0, -0x4(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq