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