.file "test1.c" .text .p2align 4,,15 .globl uint64_t_to_str .type uint64_t_to_str, @function uint64_t_to_str: .LFB2: testl %esi, %esi js .L16 testq %rdi, %rdi movb $0, buffer+64(%rip) jns .L5 movq %rdi, %rax movabsq $-3689348814741910323, %rdx leal 48(%rdi), %ecx mulq %rdx movl $buffer+63, %esi shrq $3, %rdx leaq (%rdx,%rdx,4), %rax addq %rax, %rax subb %al, %cl movb %cl, buffer+63(%rip) movq %rdx, %rcx .L7: movabsq $7378697629483820647, %rdi .p2align 4,,7 .L12: movq %rcx, %rax subq $1, %rsi imulq %rdi movq %rcx, %rax addl $48, %ecx sarq $63, %rax sarq $2, %rdx subq %rax, %rdx leaq (%rdx,%rdx,4), %rax addq %rax, %rax subb %al, %cl testq %rdx, %rdx movb %cl, (%rsi) movq %rdx, %rcx jne .L12 .L10: movq %rsi, %rax ret .L16: movq %rdi, %rax movb $0, buffer+64(%rip) sarq $63, %rax movq %rax, %rcx xorq %rdi, %rcx subq %rax, %rcx .L4: testq %rcx, %rcx movl $buffer+64, %esi jne .L7 movq %rsi, %rax ret .L5: movq %rdi, %rcx jmp .L4 .LFE2: .size uint64_t_to_str, .-uint64_t_to_str .section .rodata.str1.1,"aMS",@progbits,1 .LC0: .string "Result: '%s'\n" .text .p2align 4,,15 .globl main .type main, @function main: .LFB3: subq $8, %rsp .LCFI0: movl $-10, %esi movabsq $-9223372036854775808, %rdi call uint64_t_to_str movl $.LC0, %edi movq %rax, %rsi xorl %eax, %eax call printf movl $10, %esi movabsq $-9223372036854775808, %rdi call uint64_t_to_str movl $.LC0, %edi movq %rax, %rsi xorl %eax, %eax call printf xorl %eax, %eax addq $8, %rsp ret .LFE3: .size main, .-main .local buffer .comm buffer,65,32 .section .eh_frame,"a",@progbits .Lframe1: .long .LECIE1-.LSCIE1 .LSCIE1: .long 0x0 .byte 0x1 .string "zR" .uleb128 0x1 .sleb128 -8 .byte 0x10 .uleb128 0x1 .byte 0x3 .byte 0xc .uleb128 0x7 .uleb128 0x8 .byte 0x90 .uleb128 0x1 .align 8 .LECIE1: .LSFDE1: .long .LEFDE1-.LASFDE1 .LASFDE1: .long .LASFDE1-.Lframe1 .long .LFB2 .long .LFE2-.LFB2 .uleb128 0x0 .align 8 .LEFDE1: .LSFDE3: .long .LEFDE3-.LASFDE3 .LASFDE3: .long .LASFDE3-.Lframe1 .long .LFB3 .long .LFE3-.LFB3 .uleb128 0x0 .byte 0x4 .long .LCFI0-.LFB3 .byte 0xe .uleb128 0x10 .align 8 .LEFDE3: .ident "GCC: (GNU) 4.2.1" .section .note.GNU-stack,"",@progbits