clarify the purpose of this project
[nyanglibc.git] / inet / deadline.shared.s
blobc246901de086edb28db29d3269cc54b1c1f9433e
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 "deadline.c"
9 .LC1:
10 .string "result.current.tv_sec >= 0"
11 #NO_APP
12 .text
13 .p2align 4,,15
14 .globl __deadline_current_time
15 .hidden __deadline_current_time
16 .type __deadline_current_time, @function
17 __deadline_current_time:
18 pushq %rbx
19 movl $1, %edi
20 subq $16, %rsp
21 movq %rsp, %rbx
22 movq %rbx, %rsi
23 call __GI___clock_gettime
24 testl %eax, %eax
25 jne .L9
26 .L2:
27 cmpq $0, (%rsp)
28 js .L10
29 movq (%rsp), %rax
30 movq 8(%rsp), %rdx
31 addq $16, %rsp
32 popq %rbx
33 ret
34 .p2align 4,,10
35 .p2align 3
36 .L9:
37 movq %rbx, %rsi
38 xorl %edi, %edi
39 call __GI___clock_gettime
40 jmp .L2
41 .L10:
42 leaq __PRETTY_FUNCTION__.4190(%rip), %rcx
43 leaq .LC0(%rip), %rsi
44 leaq .LC1(%rip), %rdi
45 movl $33, %edx
46 call __GI___assert_fail
47 .size __deadline_current_time, .-__deadline_current_time
48 .section .rodata.str1.8,"aMS",@progbits,1
49 .align 8
50 .LC2:
51 .string "__is_timeval_valid_timeout (tv)"
52 .text
53 .p2align 4,,15
54 .globl __deadline_from_timeval
55 .hidden __deadline_from_timeval
56 .type __deadline_from_timeval, @function
57 __deadline_from_timeval:
58 cmpq $999999, %rcx
59 ja .L14
60 testq %rdx, %rdx
61 jns .L31
62 .L14:
63 leaq __PRETTY_FUNCTION__.4199(%rip), %rcx
64 leaq .LC0(%rip), %rsi
65 leaq .LC2(%rip), %rdi
66 subq $8, %rsp
67 movl $49, %edx
68 call __GI___assert_fail
69 .p2align 4,,10
70 .p2align 3
71 .L31:
72 addq %rdi, %rdx
73 jc .L17
74 imull $1000, %ecx, %ecx
75 addl %ecx, %esi
76 cmpl $999999999, %esi
77 jg .L32
78 .L16:
79 testq %rdx, %rdx
80 js .L17
81 movq %rdx, %rax
82 movslq %esi, %rdx
83 ret
84 .p2align 4,,10
85 .p2align 3
86 .L32:
87 cmpq $-1, %rdx
88 jne .L33
89 .L17:
90 movq $-1, %rax
91 movq %rax, %rdx
92 ret
93 .p2align 4,,10
94 .p2align 3
95 .L33:
96 subl $1000000000, %esi
97 addq $1, %rdx
98 jmp .L16
99 .size __deadline_from_timeval, .-__deadline_from_timeval
100 .section .rodata.str1.1
101 .LC3:
102 .string "sec > 0"
103 .text
104 .p2align 4,,15
105 .globl __deadline_to_ms
106 .hidden __deadline_to_ms
107 .type __deadline_to_ms, @function
108 __deadline_to_ms:
109 testq %rcx, %rcx
110 js .L43
111 cmpq %rdx, %rdi
112 jg .L42
113 cmpq %rsi, %rcx
114 jg .L45
115 cmpq %rdx, %rdi
116 je .L42
117 .L45:
118 subq %rdi, %rdx
119 cmpq $2147483646, %rdx
120 movq %rdx, %rdi
121 jg .L43
122 subl %esi, %ecx
123 js .L52
124 .L37:
125 leal 999999(%rcx), %esi
126 cmpl $1000000000, %esi
127 jle .L39
128 leal -999000001(%rcx), %esi
129 addq $1, %rdi
130 .L39:
131 cmpq $2147483, %rdi
132 movl $2147483647, %eax
133 jg .L34
134 movl %esi, %eax
135 movl $1125899907, %edx
136 sarl $31, %esi
137 imull %edx
138 imull $1000, %edi, %edi
139 movl %edx, %eax
140 movl $2147483647, %edx
141 sarl $18, %eax
142 subl %esi, %eax
143 addl %edi, %eax
144 cmovs %edx, %eax
146 .p2align 4,,10
147 .p2align 3
148 .L42:
149 xorl %eax, %eax
151 .p2align 4,,10
152 .p2align 3
153 .L43:
154 movl $2147483647, %eax
155 .L34:
156 rep ret
157 .p2align 4,,10
158 .p2align 3
159 .L52:
160 testq %rdx, %rdx
161 je .L53
162 subq $1, %rdi
163 addl $1000000000, %ecx
164 jmp .L37
165 .L53:
166 leaq __PRETTY_FUNCTION__.4209(%rip), %rcx
167 leaq .LC0(%rip), %rsi
168 leaq .LC3(%rip), %rdi
169 subq $8, %rsp
170 movl $95, %edx
171 call __GI___assert_fail
172 .size __deadline_to_ms, .-__deadline_to_ms
173 .section .rodata.str1.16,"aMS",@progbits,1
174 .align 16
175 .type __PRETTY_FUNCTION__.4209, @object
176 .size __PRETTY_FUNCTION__.4209, 17
177 __PRETTY_FUNCTION__.4209:
178 .string "__deadline_to_ms"
179 .align 16
180 .type __PRETTY_FUNCTION__.4199, @object
181 .size __PRETTY_FUNCTION__.4199, 24
182 __PRETTY_FUNCTION__.4199:
183 .string "__deadline_from_timeval"
184 .align 16
185 .type __PRETTY_FUNCTION__.4190, @object
186 .size __PRETTY_FUNCTION__.4190, 24
187 __PRETTY_FUNCTION__.4190:
188 .string "__deadline_current_time"