Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.56 KB | None | 0 0
  1. [DEBUG]: Module "function_end" is
  2. ; ModuleID = 'stdlib'
  3. source_filename = "stdlib"
  4.  
  5. %string = type <{ i32, i8* }>
  6. %internal_struct_4260204557 = type <{ i32, i64, i64, %string }>
  7.  
  8. @strbuff_3855993015 = private unnamed_addr constant [5 x i8] c"false"
  9. @gstr_3855993015 = global %string <{ i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @strbuff_3855993015, i32 0, i32 0) }>
  10. @strbuff_706834940 = private unnamed_addr constant [4 x i8] c"true"
  11. @gstr_706834940 = global %string <{ i32 4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @strbuff_706834940, i32 0, i32 0) }>
  12.  
  13. declare i32 @printf(i8*, ...)
  14.  
  15. declare void @exit(i32)
  16.  
  17. declare i8* @malloc(i64)
  18.  
  19. ; Function Attrs: nounwind readnone
  20. declare void @llvm.donothing() #0
  21.  
  22. ; Function Attrs: argmemonly nounwind
  23. declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) #1
  24.  
  25. declare void @rf_stdlib_print_int64(i64)
  26.  
  27. declare void @rf_stdlib_print_uint64(i64)
  28.  
  29. declare void @rf_stdlib_print_string(%string*)
  30.  
  31. define void @print(%internal_struct_4260204557*) {
  32. function_start:
  33. %1 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 0
  34. %2 = load i32, i32* %1
  35. %3 = icmp eq i32 %2, 0
  36. br i1 %3, label %label_0, label %label_1
  37.  
  38. label_0: ; preds = %function_start
  39. %4 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 1
  40. %5 = alloca i64
  41. %6 = load i64, i64* %4
  42. store i64 %6, i64* %5
  43. %7 = load i64, i64* %5
  44. call void @rf_stdlib_print_int64(i64 %7)
  45. br label %function_end
  46.  
  47. label_1: ; preds = %function_start
  48. %8 = icmp eq i32 %2, 1
  49. br i1 %8, label %label_2, label %label_3
  50.  
  51. label_2: ; preds = %label_1
  52. %9 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 2
  53. %10 = alloca i64
  54. %11 = load i64, i64* %9
  55. store i64 %11, i64* %10
  56. %12 = load i64, i64* %10
  57. call void @rf_stdlib_print_uint64(i64 %12)
  58. br label %function_end
  59.  
  60. label_3: ; preds = %label_1
  61. %13 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 3
  62. %14 = alloca %string
  63. %15 = getelementptr %string, %string* %13, i32 0, i32 0
  64. %loaded_str_len = load i32, i32* %15
  65. %16 = getelementptr %string, %string* %13, i32 0, i32 1
  66. %loaded_str_data = load i8*, i8** %16
  67. %17 = getelementptr %string, %string* %14, i32 0, i32 0
  68. store i32 %loaded_str_len, i32* %17
  69. %18 = getelementptr %string, %string* %14, i32 0, i32 1
  70. store i8* %loaded_str_data, i8** %18
  71. call void @rf_stdlib_print_string(%string* %14)
  72. br label %function_end
  73.  
  74. function_end: ; preds = %label_3, %label_2, %label_0
  75. ret void
  76. }
  77.  
  78. attributes #0 = { nounwind readnone }
  79. attributes #1 = { argmemonly nounwind }
  80.  
  81. [DEBUG]: Module "function_end" is
  82. ; ModuleID = 'main'
  83. source_filename = "main"
  84.  
  85. %string = type <{ i32, i8* }>
  86. %internal_struct_4260204557 = type <{ i32, i64, i64, %string }>
  87. %foo = type <{ i32, i32, %string }>
  88.  
  89. @gstr_3855993015 = global %string <{ i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @strbuff_3855993015, i32 0, i32 0) }>
  90. @strbuff_3855993015 = private unnamed_addr constant [5 x i8] c"false"
  91. @gstr_706834940 = global %string <{ i32 4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @strbuff_706834940, i32 0, i32 0) }>
  92. @strbuff_706834940 = private unnamed_addr constant [4 x i8] c"true"
  93. @strbuff_3735928559 = private unnamed_addr constant [0 x i8] zeroinitializer
  94. @gstr_3735928559 = global %string <{ i32 0, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @strbuff_3735928559, i32 0, i32 0) }>
  95. @strbuff_3855993015.1 = private unnamed_addr constant [5 x i8] c"false"
  96. @gstr_3855993015.2 = global %string <{ i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @strbuff_3855993015.1, i32 0, i32 0) }>
  97. @strbuff_885767278 = private unnamed_addr constant [5 x i8] c"hello"
  98. @gstr_885767278 = global %string <{ i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @strbuff_885767278, i32 0, i32 0) }>
  99. @strbuff_706834940.3 = private unnamed_addr constant [4 x i8] c"true"
  100. @gstr_706834940.4 = global %string <{ i32 4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @strbuff_706834940.3, i32 0, i32 0) }>
  101.  
  102. declare i32 @printf(i8*, ...)
  103.  
  104. declare void @exit(i32)
  105.  
  106. declare i8* @malloc(i64)
  107.  
  108. ; Function Attrs: nounwind readnone
  109. declare void @llvm.donothing() #0
  110.  
  111. ; Function Attrs: argmemonly nounwind
  112. declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) #1
  113.  
  114. define void @print(%internal_struct_4260204557*) {
  115. function_start:
  116. %1 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 0
  117. %2 = load i32, i32* %1
  118. %3 = icmp eq i32 %2, 0
  119. br i1 %3, label %label_0, label %label_1
  120.  
  121. label_0: ; preds = %function_start
  122. %4 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 1
  123. %5 = alloca i64
  124. %6 = load i64, i64* %4
  125. store i64 %6, i64* %5
  126. %7 = load i64, i64* %5
  127. call void @rf_stdlib_print_int64(i64 %7)
  128. br label %function_end
  129.  
  130. label_1: ; preds = %function_start
  131. %8 = icmp eq i32 %2, 1
  132. br i1 %8, label %label_2, label %label_3
  133.  
  134. label_2: ; preds = %label_1
  135. %9 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 2
  136. %10 = alloca i64
  137. %11 = load i64, i64* %9
  138. store i64 %11, i64* %10
  139. %12 = load i64, i64* %10
  140. call void @rf_stdlib_print_uint64(i64 %12)
  141. br label %function_end
  142.  
  143. label_3: ; preds = %label_1
  144. %13 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %0, i32 0, i32 3
  145. %14 = alloca %string
  146. %15 = getelementptr %string, %string* %13, i32 0, i32 0
  147. %loaded_str_len = load i32, i32* %15
  148. %16 = getelementptr %string, %string* %13, i32 0, i32 1
  149. %loaded_str_data = load i8*, i8** %16
  150. %17 = getelementptr %string, %string* %14, i32 0, i32 0
  151. store i32 %loaded_str_len, i32* %17
  152. %18 = getelementptr %string, %string* %14, i32 0, i32 1
  153. store i8* %loaded_str_data, i8** %18
  154. call void @rf_stdlib_print_string(%string* %14)
  155. br label %function_end
  156.  
  157. function_end: ; preds = %label_3, %label_2, %label_0
  158. ret void
  159. }
  160.  
  161. declare void @rf_stdlib_print_int64(i64)
  162.  
  163. declare void @rf_stdlib_print_uint64(i64)
  164.  
  165. declare void @rf_stdlib_print_string(%string*)
  166.  
  167. define i32 @main() {
  168. function_start:
  169. %0 = alloca i32
  170. %1 = call i8* @malloc(i64 4)
  171. %2 = bitcast i8* %1 to i32*
  172. %3 = alloca %foo
  173. %4 = alloca %foo
  174. %5 = alloca %string
  175. %6 = getelementptr %foo, %foo* %4, i32 0, i32 0
  176. store i32 0, i32* %6
  177. %7 = getelementptr %foo, %foo* %4, i32 0, i32 1
  178. store i32 29, i32* %7
  179. %8 = getelementptr %foo, %foo* %3, i32 0, i32 0
  180. store i32 1, i32* %8
  181. %9 = getelementptr %foo, %foo* %3, i32 0, i32 2
  182. %loaded_str_len = load i32, i32* getelementptr inbounds (%string, %string* @gstr_885767278, i32 0, i32 0)
  183. %loaded_str_data = load i8*, i8** getelementptr inbounds (%string, %string* @gstr_885767278, i32 0, i32 1)
  184. %10 = getelementptr %string, %string* %9, i32 0, i32 0
  185. store i32 %loaded_str_len, i32* %10
  186. %11 = getelementptr %string, %string* %9, i32 0, i32 1
  187. store i8* %loaded_str_data, i8** %11
  188. %12 = getelementptr %foo, %foo* %4, i32 0, i32 0
  189. %13 = load i32, i32* %12
  190. %14 = icmp eq i32 %13, 0
  191. br i1 %14, label %label_1, label %label_2
  192.  
  193. label_1: ; preds = %function_start
  194. %15 = getelementptr %foo, %foo* %4, i32 0, i32 1
  195. %16 = alloca i32
  196. %17 = load i32, i32* %15
  197. store i32 %17, i32* %16
  198. %18 = load i32, i32* %16
  199. store i32 %18, i32* %2
  200. br label %label_0
  201.  
  202. label_2: ; preds = %function_start
  203. %19 = getelementptr %foo, %foo* %4, i32 0, i32 2
  204. store i32 0, i32* %2
  205. br label %label_0
  206.  
  207. label_0: ; preds = %label_2, %label_1
  208. %20 = getelementptr %foo, %foo* %3, i32 0, i32 0
  209. %21 = load i32, i32* %20
  210. %22 = icmp eq i32 %21, 1
  211. br i1 %22, label %label_4, label %label_5
  212.  
  213. label_4: ; preds = %label_0
  214. %23 = getelementptr %foo, %foo* %3, i32 0, i32 2
  215. %24 = alloca %string
  216. %25 = getelementptr %string, %string* %23, i32 0, i32 0
  217. %loaded_str_len1 = load i32, i32* %25
  218. %26 = getelementptr %string, %string* %23, i32 0, i32 1
  219. %loaded_str_data2 = load i8*, i8** %26
  220. %27 = getelementptr %string, %string* %24, i32 0, i32 0
  221. store i32 %loaded_str_len1, i32* %27
  222. %28 = getelementptr %string, %string* %24, i32 0, i32 1
  223. store i8* %loaded_str_data2, i8** %28
  224. %29 = getelementptr %string, %string* %24, i32 0, i32 0
  225. %loaded_str_len3 = load i32, i32* %29
  226. %30 = getelementptr %string, %string* %24, i32 0, i32 1
  227. %loaded_str_data4 = load i8*, i8** %30
  228. %31 = getelementptr %string, %string* %5, i32 0, i32 0
  229. store i32 %loaded_str_len3, i32* %31
  230. %32 = getelementptr %string, %string* %5, i32 0, i32 1
  231. store i8* %loaded_str_data4, i8** %32
  232. br label %label_3
  233.  
  234. label_5: ; preds = %label_0
  235. %33 = getelementptr %foo, %foo* %3, i32 0, i32 1
  236. %loaded_str_len5 = load i32, i32* getelementptr inbounds (%string, %string* @gstr_3735928559, i32 0, i32 0)
  237. %loaded_str_data6 = load i8*, i8** getelementptr inbounds (%string, %string* @gstr_3735928559, i32 0, i32 1)
  238. %34 = getelementptr %string, %string* %5, i32 0, i32 0
  239. store i32 %loaded_str_len5, i32* %34
  240. %35 = getelementptr %string, %string* %5, i32 0, i32 1
  241. store i8* %loaded_str_data6, i8** %35
  242. br label %label_3
  243.  
  244. label_3: ; preds = %label_5, %label_4
  245. %36 = alloca %internal_struct_4260204557
  246. %37 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %36, i32 0, i32 0
  247. store i32 2, i32* %37
  248. %38 = getelementptr %internal_struct_4260204557, %internal_struct_4260204557* %36, i32 0, i32 3
  249. %39 = getelementptr %string, %string* %5, i32 0, i32 0
  250. %loaded_str_len7 = load i32, i32* %39
  251. %40 = getelementptr %string, %string* %5, i32 0, i32 1
  252. %loaded_str_data8 = load i8*, i8** %40
  253. %41 = getelementptr %string, %string* %38, i32 0, i32 0
  254. store i32 %loaded_str_len7, i32* %41
  255. %42 = getelementptr %string, %string* %38, i32 0, i32 1
  256. store i8* %loaded_str_data8, i8** %42
  257. call void @print(%internal_struct_4260204557* %36)
  258. %43 = load i32, i32* %2
  259. store i32 %43, i32* %0
  260. br label %function_end
  261.  
  262. function_end: ; preds = %label_3
  263. %44 = load i32, i32* %0
  264. ret i32 %44
  265. }
  266.  
  267. attributes #0 = { nounwind readnone }
  268. attributes #1 = { argmemonly nounwind }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement