// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
leal 0x1(%rdi), %eax
movq %rax, %rcx
shlq $0x8, %rcx
subq %rax, %rcx
addq $0xf, %rcx
movabsq $0x1fffffffff0, %rbx    # imm = 0x1FFFFFFFFF0
andq %rcx, %rbx
movq %rsp, %r14
movq %r14, %rdx
subq %rbx, %rdx
movq %rdx, %rsp
callq 0x11ec
negq %rbx
leaq (%r14,%rbx), %rdi
addq $0xff, %rdi
leaq 0xcbf(%rip), %rsi       # 0x2004
callq 0x10c0
movq %rax, %r13
movq %rax, %rdi
callq 0x10b0
testl %eax, %eax
je 0x1366
movq %r13, %rdi
callq 0x1080
jmp 0x14ec
xorl %ebx, %ebx
leaq -0x460(%rbp), %r14
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdx
callq 0x1090
movq %r13, %rdi
callq 0x10b0
movq %r13, %rdi
testl %eax, %eax
jne 0x13b4
callq 0x10b0
incq %rbx
testl %eax, %eax
je 0x136f
movq %r13, %rdi
callq 0x1080
movq %rsp, %r14
movq %rbx, %rax
shlq $0xa, %rax
subq %rax, %r14
movq %r14, %rsp
jmp 0x13d1
callq 0x1080
movq %rsp, %r14
movq %rbx, %rax
shlq $0xa, %rax
subq %rax, %r14
movq %r14, %rsp
testl %ebx, %ebx
je 0x14ec
movq %rbx, -0x30(%rbp)
movq %r14, %r15
leaq -0x460(%rbp), %r12
movq %r12, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdx
callq 0x1090
movq %r15, %rdi
movq %r12, %rsi
callq 0x1030
addq $0x400, %r15            # imm = 0x400
decq %rbx
jne 0x13d8
movq -0x30(%rbp), %rbx
cmpl $0x1, %ebx
jle 0x14b2
movq %r13, -0x38(%rbp)
decl %ebx
movq %rbx, -0x40(%rbp)
leaq 0x400(%r14), %r13
movl $0x1, %ebx
xorl %r12d, %r12d
leaq -0x860(%rbp), %r15
leaq 0x1(%r12), %rax
movq %rax, -0x48(%rbp)
shlq $0xa, %r12
movq %r14, -0x58(%rbp)
addq %r14, %r12
movq -0x30(%rbp), %r14
movq %r13, -0x50(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
jle 0x147f
movq %r15, %rdi
movq %r12, %rsi
callq 0x1030
movq %r12, %rdi
movq %r13, %rsi
callq 0x1030
movq %r13, %rdi
movq %r15, %rsi
callq 0x1030
addq $0x400, %r13            # imm = 0x400
decq %r14
cmpq %r14, %rbx
jne 0x144f
incq %rbx
movq -0x50(%rbp), %r13
addq $0x400, %r13            # imm = 0x400
movq -0x48(%rbp), %r12
cmpq -0x40(%rbp), %r12
movq -0x58(%rbp), %r14
jne 0x1433
movq -0x38(%rbp), %r13
movq -0x30(%rbp), %rbx
movq %r14, %rdi
callq 0x1060
decl %eax
cltq
cmpb $0xa, (%r14,%rax)
jne 0x14d8
leaq 0xb3a(%rip), %rdi       # 0x2006
movq %r14, %rsi
xorl %eax, %eax
callq 0x1070
jmp 0x14e0
movq %r14, %rdi
callq 0x1040
addq $0x400, %r14            # imm = 0x400
decq %rbx
jne 0x14b2
movq %r13, %rdi
callq 0x1050
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq