clarify the purpose of this project
[nyanglibc.git] / inet / ether_ntoh.s
blobceed8296d31666f1cc93611975946f89d43ff9b1
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string "getntohost_r"
5 .text
6 .p2align 4,,15
7 .globl ether_ntohost
8 .type ether_ntohost, @function
9 ether_ntohost:
10 pushq %r15
11 pushq %r14
12 xorl %edx, %edx
13 pushq %r13
14 pushq %r12
15 movq %rsi, %r13
16 pushq %rbp
17 pushq %rbx
18 leaq .LC0(%rip), %rsi
19 subq $1096, %rsp
20 leaq 40(%rsp), %r12
21 leaq 32(%rsp), %rbp
22 movq %rdi, 24(%rsp)
23 movq %r12, %rcx
24 movq %rbp, %rdi
25 call __nss_ethers_lookup2
26 testl %eax, %eax
27 movl %eax, 20(%rsp)
28 jne .L4
29 movq __libc_errno@gottpoff(%rip), %rax
30 addq %fs:0, %rax
31 leaq 64(%rsp), %r15
32 leaq 48(%rsp), %r14
33 movq %rax, 8(%rsp)
34 .p2align 4,,10
35 .p2align 3
36 .L2:
37 movq 8(%rsp), %r8
38 movl $1024, %ecx
39 movq %r15, %rdx
40 movq %r14, %rsi
41 movq %r13, %rdi
42 call *40(%rsp)
43 leaq .LC0(%rip), %rsi
44 xorl %r9d, %r9d
45 xorl %edx, %edx
46 movl %eax, %r8d
47 movq %r12, %rcx
48 movq %rbp, %rdi
49 movl %eax, %ebx
50 call __nss_next2
51 testl %eax, %eax
52 je .L2
53 cmpl $1, %ebx
54 je .L10
55 .L4:
56 movl $-1, 20(%rsp)
57 .L1:
58 movl 20(%rsp), %eax
59 addq $1096, %rsp
60 popq %rbx
61 popq %rbp
62 popq %r12
63 popq %r13
64 popq %r14
65 popq %r15
66 ret
67 .p2align 4,,10
68 .p2align 3
69 .L10:
70 movq 48(%rsp), %rsi
71 movq 24(%rsp), %rdi
72 call strcpy
73 jmp .L1
74 .size ether_ntohost, .-ether_ntohost
75 .hidden strcpy
76 .hidden __nss_next2
77 .hidden __nss_ethers_lookup2