clarify the purpose of this project
[nyanglibc.git] / sunrpc / rpc_gethostbyname.shared.s
blob24dde4804c179ad233d29eddad20d2fc6c545101
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __libc_rpc_gethostbyname
9 .hidden __libc_rpc_gethostbyname
10 .type __libc_rpc_gethostbyname, @function
11 __libc_rpc_gethostbyname:
12 pushq %r15
13 pushq %r14
14 movl $1024, %r8d
15 pushq %r13
16 pushq %r12
17 movq %rdi, %r14
18 pushq %rbp
19 pushq %rbx
20 subq $1112, %rsp
21 leaq 64(%rsp), %rbx
22 movq %rsi, 8(%rsp)
23 movq $0, 24(%rsp)
24 movq $1024, 72(%rsp)
25 leaq 24(%rsp), %r13
26 leaq 32(%rsp), %r12
27 leaq 16(%rbx), %rcx
28 leaq 20(%rsp), %rbp
29 movq %rcx, 64(%rsp)
30 jmp .L2
31 .p2align 4,,10
32 .p2align 3
33 .L7:
34 movq 72(%rsp), %r8
35 movq 64(%rsp), %rcx
36 .L2:
37 subq $8, %rsp
38 movq %r12, %rdx
39 movq %r13, %r9
40 pushq %rbp
41 movl $2, %esi
42 movq %r14, %rdi
43 call __gethostbyname2_r
44 movl %eax, %r15d
45 testl %r15d, %r15d
46 popq %rax
47 popq %rdx
48 jne .L8
49 movq 24(%rsp), %rax
50 testq %rax, %rax
51 jne .L17
52 .L8:
53 movl 20(%rsp), %r15d
54 cmpl $-1, %r15d
55 jne .L3
56 movq __libc_errno@gottpoff(%rip), %rax
57 cmpl $34, %fs:(%rax)
58 jne .L3
59 movq %rbx, %rdi
60 call __GI___libc_scratch_buffer_grow
61 testb %al, %al
62 jne .L7
63 call __GI___rpc_thread_createerr
64 movl $12, (%rax)
65 movl $12, 16(%rax)
66 .L1:
67 addq $1112, %rsp
68 movl %r15d, %eax
69 popq %rbx
70 popq %rbp
71 popq %r12
72 popq %r13
73 popq %r14
74 popq %r15
75 ret
76 .p2align 4,,10
77 .p2align 3
78 .L3:
79 call __GI___rpc_thread_createerr
80 movq 64(%rsp), %rdi
81 addq $16, %rbx
82 movl $13, (%rax)
83 cmpq %rbx, %rdi
84 je .L15
85 call free@PLT
86 .L15:
87 movl $-1, %r15d
88 jmp .L1
89 .p2align 4,,10
90 .p2align 3
91 .L17:
92 movabsq $17179869186, %rcx
93 cmpq %rcx, 16(%rax)
94 movq 64(%rsp), %rbp
95 je .L9
96 addq $16, %rbx
97 call __GI___rpc_thread_createerr
98 cmpq %rbx, %rbp
99 movl $12, (%rax)
100 movl $97, 16(%rax)
101 je .L15
102 movq %rbp, %rdi
103 movl $-1, %r15d
104 call free@PLT
105 jmp .L1
106 .L9:
107 movq 24(%rax), %rax
108 movq 8(%rsp), %rdx
109 addq $16, %rbx
110 cmpq %rbx, %rbp
111 movq (%rax), %rax
112 movl $2, (%rdx)
113 movl (%rax), %eax
114 movl %eax, 4(%rdx)
115 je .L1
116 movq %rbp, %rdi
117 call free@PLT
118 jmp .L1
119 .size __libc_rpc_gethostbyname, .-__libc_rpc_gethostbyname
120 .hidden __gethostbyname2_r