clarify the purpose of this project
[nyanglibc.git] / posix / spawn_faction_addopen.s
blobbd4e442f7bbf87e33194f1000b3634fe8c8f6f3a
1 .text
2 .p2align 4,,15
3 .globl __posix_spawn_file_actions_addopen
4 .hidden __posix_spawn_file_actions_addopen
5 .type __posix_spawn_file_actions_addopen, @function
6 __posix_spawn_file_actions_addopen:
7 pushq %r14
8 pushq %r13
9 movq %rdx, %r14
10 pushq %r12
11 pushq %rbp
12 movl %ecx, %r13d
13 pushq %rbx
14 movq %rdi, %rbx
15 movl %esi, %edi
16 movl %esi, %ebp
17 movl %r8d, %r12d
18 call __spawn_valid_fd
19 testb %al, %al
20 movl $9, %ecx
21 je .L1
22 movq %r14, %rdi
23 call __strdup
24 testq %rax, %rax
25 movq %rax, %r14
26 je .L6
27 movl 4(%rbx), %edx
28 cmpl (%rbx), %edx
29 je .L10
30 .L3:
31 movslq %edx, %rax
32 addl $1, %edx
33 xorl %ecx, %ecx
34 salq $5, %rax
35 addq 8(%rbx), %rax
36 movl $2, (%rax)
37 movl %ebp, 8(%rax)
38 movq %r14, 16(%rax)
39 movl %r13d, 24(%rax)
40 movl %r12d, 28(%rax)
41 movl %edx, 4(%rbx)
42 .L1:
43 popq %rbx
44 movl %ecx, %eax
45 popq %rbp
46 popq %r12
47 popq %r13
48 popq %r14
49 ret
50 .p2align 4,,10
51 .p2align 3
52 .L6:
53 movl $12, %ecx
54 jmp .L1
55 .p2align 4,,10
56 .p2align 3
57 .L10:
58 movq %rbx, %rdi
59 call __posix_spawn_file_actions_realloc
60 testl %eax, %eax
61 jne .L4
62 movl 4(%rbx), %edx
63 jmp .L3
64 .p2align 4,,10
65 .p2align 3
66 .L4:
67 movq %r14, %rdi
68 call free@PLT
69 movl $12, %ecx
70 jmp .L1
71 .size __posix_spawn_file_actions_addopen, .-__posix_spawn_file_actions_addopen
72 .weak posix_spawn_file_actions_addopen
73 .set posix_spawn_file_actions_addopen,__posix_spawn_file_actions_addopen
74 .hidden __posix_spawn_file_actions_realloc
75 .hidden __strdup
76 .hidden __spawn_valid_fd