Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. struct node;
  4. typedef struct node {
  5. int data;
  6. int counter;
  7. struct node *next;
  8. } Node;
  9.  
  10.  
  11.  
  12. void phase_6(char *input_string);
  13.  
  14. void phase_6(char *input_string) {
  15.  
  16. Node node1;
  17. Node node2;
  18. Node node3;
  19. Node node4;
  20. Node node5;
  21. Node node6;
  22.  
  23. node1.data = 0x322;
  24. node1.counter = 1;
  25. node1.next = &node2;
  26.  
  27. node2.data = 0xD2;
  28. node2.counter = 2;
  29. node2.next = &node3;
  30.  
  31. node3.data = 0x302;
  32. node3.counter = 3;
  33. node3.next = &node4;
  34.  
  35. node4.data = 0x7D;
  36. node4.counter = 4;
  37. node4.next = &node5;
  38.  
  39. node4.data = 0x191;
  40. node4.counter = 5;
  41. node4.next = &node6;
  42.  
  43. node4.data = 0x171;
  44. node4.counter = 6;
  45. node4.next = NULL;
  46.  
  47. Node *pNVar1;
  48. Node **ppNVar2;
  49. Node *pNVar3;
  50. Node *node_address;
  51. int inc2;
  52. long offset;
  53. int inc1;
  54. int *address_of_mynum;
  55. Node *local_78[6];
  56. int my_numbers[6] = {6, 5, 4, 3, 2, 1};
  57.  
  58. address_of_mynum = my_numbers;
  59. inc1 = 0;
  60. while (1) {
  61. /* each number has to be between 1 and 6 inclusive */
  62. if (5 < *address_of_mynum - 1U) {
  63. printf("First explosion point\n");
  64. }
  65. inc1 = inc1 + 1;
  66. inc2 = inc1;
  67. if (inc1 == 6) break;
  68. do {
  69. /* each number must be distinct */
  70. if (*address_of_mynum == my_numbers[inc2]) {
  71. printf("Second explosion point\n");
  72. }
  73. inc2 = inc2 + 1;
  74. } while (inc2 < 6);
  75. address_of_mynum = address_of_mynum + 1;
  76. }
  77.  
  78. offset = 0;
  79. do {
  80. if (*(int *) ((long) my_numbers + offset) < 2) {
  81. node_address = &node1;
  82. } else {
  83. inc1 = 1;
  84. node_address = &node1;
  85. do {
  86. node_address = node_address->next;
  87. inc1 = inc1 + 1;
  88. } while (inc1 != *(int *) ((long) my_numbers + offset));
  89. }
  90. *(Node **) ((long) local_78 + offset * 2) = node_address;
  91.  
  92. offset = offset + 4;
  93. /* offset != 6 */
  94. } while (offset != 0x18);
  95.  
  96. ppNVar2 = local_78 + 1;
  97. pNVar3 = local_78[0];
  98. do {
  99. pNVar1 = *ppNVar2;
  100. pNVar3->next = pNVar1;
  101. ppNVar2 = ppNVar2 + 1;
  102. pNVar3 = pNVar1;
  103. } while (ppNVar2 != (Node **) my_numbers);
  104. pNVar1->next = (Node *) 0x0;
  105. inc1 = 5;
  106. do {
  107. if (local_78[0]->data < local_78[0]->next->data) {
  108. printf("Third explosion point\n");
  109. }
  110. local_78[0] = local_78[0]->next;
  111. inc1 = inc1 + -1;
  112. } while (inc1 != 0);
  113. return;
  114. }
  115.  
  116. int main() {
  117. char *input;
  118. phase_6(input);
  119. return 0;
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement