SHARE
TWEET

Untitled

a guest Dec 18th, 2018 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ModuleID = 'AP_PlusPlus'
  2. source_filename = "AP_PlusPlus"
  3.  
  4. @fmt = private unnamed_addr constant [4 x i8] c"%d\0A\00"
  5. @fmt.1 = private unnamed_addr constant [4 x i8] c"%g\0A\00"
  6. @fmt.2 = private unnamed_addr constant [4 x i8] c"%s\0A\00"
  7. @fmt.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00"
  8. @fmt.4 = private unnamed_addr constant [4 x i8] c"%g\0A\00"
  9. @fmt.5 = private unnamed_addr constant [4 x i8] c"%s\0A\00"
  10.  
  11. declare i32 @printf(i8*, ...)
  12.  
  13. define i1 @list_getbool({ i32, i1* }*, i32) {
  14. entry:
  15.   %list_ptr_alloc = alloca { i32, i1* }*
  16.   store { i32, i1* }* %0, { i32, i1* }** %list_ptr_alloc
  17.   %idx_alloc = alloca i32
  18.   store i32 %1, i32* %idx_alloc
  19.   %list_load = load { i32, i1* }*, { i32, i1* }** %list_ptr_alloc
  20.   %list_array_ptr = getelementptr inbounds { i32, i1* }, { i32, i1* }* %list_load, i32 0, i32 1
  21.   %array_load = load i1*, i1** %list_array_ptr
  22.   %idx_load = load i32, i32* %idx_alloc
  23.   %list_arry_element_ptr = getelementptr i1, i1* %array_load, i32 %idx_load
  24.   %list_array_element_ptr = load i1, i1* %list_arry_element_ptr
  25.   ret i1 %list_array_element_ptr
  26. }
  27.  
  28. define i32 @list_getint({ i32, i32* }*, i32) {
  29. entry:
  30.   %list_ptr_alloc = alloca { i32, i32* }*
  31.   store { i32, i32* }* %0, { i32, i32* }** %list_ptr_alloc
  32.   %idx_alloc = alloca i32
  33.   store i32 %1, i32* %idx_alloc
  34.   %list_load = load { i32, i32* }*, { i32, i32* }** %list_ptr_alloc
  35.   %list_array_ptr = getelementptr inbounds { i32, i32* }, { i32, i32* }* %list_load, i32 0, i32 1
  36.   %array_load = load i32*, i32** %list_array_ptr
  37.   %idx_load = load i32, i32* %idx_alloc
  38.   %list_arry_element_ptr = getelementptr i32, i32* %array_load, i32 %idx_load
  39.   %list_array_element_ptr = load i32, i32* %list_arry_element_ptr
  40.   ret i32 %list_array_element_ptr
  41. }
  42.  
  43. define double @list_getfloat({ i32, double* }*, i32) {
  44. entry:
  45.   %list_ptr_alloc = alloca { i32, double* }*
  46.   store { i32, double* }* %0, { i32, double* }** %list_ptr_alloc
  47.   %idx_alloc = alloca i32
  48.   store i32 %1, i32* %idx_alloc
  49.   %list_load = load { i32, double* }*, { i32, double* }** %list_ptr_alloc
  50.   %list_array_ptr = getelementptr inbounds { i32, double* }, { i32, double* }* %list_load, i32 0, i32 1
  51.   %array_load = load double*, double** %list_array_ptr
  52.   %idx_load = load i32, i32* %idx_alloc
  53.   %list_arry_element_ptr = getelementptr double, double* %array_load, i32 %idx_load
  54.   %list_array_element_ptr = load double, double* %list_arry_element_ptr
  55.   ret double %list_array_element_ptr
  56. }
  57.  
  58. define void @list_setbool({ i32, i1* }*, i32, i1) {
  59. entry:
  60.   %list_ptr_alloc = alloca { i32, i1* }*
  61.   store { i32, i1* }* %0, { i32, i1* }** %list_ptr_alloc
  62.   %list_load = load { i32, i1* }*, { i32, i1* }** %list_ptr_alloc
  63.   %list_array_ptr = getelementptr inbounds { i32, i1* }, { i32, i1* }* %list_load, i32 0, i32 1
  64.   %list_array_load = load i1*, i1** %list_array_ptr
  65.   %list_arry_next_element_ptr = getelementptr i1, i1* %list_array_load, i32 %1
  66.   store i1 %2, i1* %list_arry_next_element_ptr
  67.   ret void
  68. }
  69.  
  70. define void @list_setint({ i32, i32* }*, i32, i32) {
  71. entry:
  72.   %list_ptr_alloc = alloca { i32, i32* }*
  73.   store { i32, i32* }* %0, { i32, i32* }** %list_ptr_alloc
  74.   %list_load = load { i32, i32* }*, { i32, i32* }** %list_ptr_alloc
  75.   %list_array_ptr = getelementptr inbounds { i32, i32* }, { i32, i32* }* %list_load, i32 0, i32 1
  76.   %list_array_load = load i32*, i32** %list_array_ptr
  77.   %list_arry_next_element_ptr = getelementptr i32, i32* %list_array_load, i32 %1
  78.   store i32 %2, i32* %list_arry_next_element_ptr
  79.   ret void
  80. }
  81.  
  82. define void @list_setfloat({ i32, double* }*, i32, double) {
  83. entry:
  84.   %list_ptr_alloc = alloca { i32, double* }*
  85.   store { i32, double* }* %0, { i32, double* }** %list_ptr_alloc
  86.   %list_load = load { i32, double* }*, { i32, double* }** %list_ptr_alloc
  87.   %list_array_ptr = getelementptr inbounds { i32, double* }, { i32, double* }* %list_load, i32 0, i32 1
  88.   %list_array_load = load double*, double** %list_array_ptr
  89.   %list_arry_next_element_ptr = getelementptr double, double* %list_array_load, i32 %1
  90.   store double %2, double* %list_arry_next_element_ptr
  91.   ret void
  92. }
  93.  
  94. define void @list_pushbool({ i32, i1* }*, i1) {
  95. entry:
  96.   %list_ptr_alloc = alloca { i32, i1* }*
  97.   store { i32, i1* }* %0, { i32, i1* }** %list_ptr_alloc
  98.   %val_alloc = alloca i1
  99.   store i1 %1, i1* %val_alloc
  100.   %list_load = load { i32, i1* }*, { i32, i1* }** %list_ptr_alloc
  101.   %list_array_ptr = getelementptr inbounds { i32, i1* }, { i32, i1* }* %list_load, i32 0, i32 1
  102.   %list_array_load = load i1*, i1** %list_array_ptr
  103.   %list_size = getelementptr inbounds { i32, i1* }, { i32, i1* }* %list_load, i32 0, i32 0
  104.   %list_size1 = load i32, i32* %list_size
  105.   %list_arry_next_element_ptr = getelementptr i1, i1* %list_array_load, i32 %list_size1
  106.   %inc_size = add i32 %list_size1, 1
  107.   store i32 %inc_size, i32* %list_size
  108.   %val = load i1, i1* %val_alloc
  109.   store i1 %val, i1* %list_arry_next_element_ptr
  110.   ret void
  111. }
  112.  
  113. define void @list_pushint({ i32, i32* }*, i32) {
  114. entry:
  115.   %list_ptr_alloc = alloca { i32, i32* }*
  116.   store { i32, i32* }* %0, { i32, i32* }** %list_ptr_alloc
  117.   %val_alloc = alloca i32
  118.   store i32 %1, i32* %val_alloc
  119.   %list_load = load { i32, i32* }*, { i32, i32* }** %list_ptr_alloc
  120.   %list_array_ptr = getelementptr inbounds { i32, i32* }, { i32, i32* }* %list_load, i32 0, i32 1
  121.   %list_array_load = load i32*, i32** %list_array_ptr
  122.   %list_size = getelementptr inbounds { i32, i32* }, { i32, i32* }* %list_load, i32 0, i32 0
  123.   %list_size1 = load i32, i32* %list_size
  124.   %list_arry_next_element_ptr = getelementptr i32, i32* %list_array_load, i32 %list_size1
  125.   %inc_size = add i32 %list_size1, 1
  126.   store i32 %inc_size, i32* %list_size
  127.   %val = load i32, i32* %val_alloc
  128.   store i32 %val, i32* %list_arry_next_element_ptr
  129.   ret void
  130. }
  131.  
  132. define void @list_pushfloat({ i32, double* }*, double) {
  133. entry:
  134.   %list_ptr_alloc = alloca { i32, double* }*
  135.   store { i32, double* }* %0, { i32, double* }** %list_ptr_alloc
  136.   %val_alloc = alloca double
  137.   store double %1, double* %val_alloc
  138.   %list_load = load { i32, double* }*, { i32, double* }** %list_ptr_alloc
  139.   %list_array_ptr = getelementptr inbounds { i32, double* }, { i32, double* }* %list_load, i32 0, i32 1
  140.   %list_array_load = load double*, double** %list_array_ptr
  141.   %list_size = getelementptr inbounds { i32, double* }, { i32, double* }* %list_load, i32 0, i32 0
  142.   %list_size1 = load i32, i32* %list_size
  143.   %list_arry_next_element_ptr = getelementptr double, double* %list_array_load, i32 %list_size1
  144.   %inc_size = add i32 %list_size1, 1
  145.   store i32 %inc_size, i32* %list_size
  146.   %val = load double, double* %val_alloc
  147.   store double %val, double* %list_arry_next_element_ptr
  148.   ret void
  149. }
  150.  
  151. define i1 @list_popbool({ i32, i1* }*) {
  152. entry:
  153.   %list_ptr_alloc = alloca { i32, i1* }*
  154.   store { i32, i1* }* %0, { i32, i1* }** %list_ptr_alloc
  155.   %list_load = load { i32, i1* }*, { i32, i1* }** %list_ptr_alloc
  156.   %list_array_ptr = getelementptr inbounds { i32, i1* }, { i32, i1* }* %list_load, i32 0, i32 1
  157.   %list_array_load = load i1*, i1** %list_array_ptr
  158.   %list_size_ptr = getelementptr inbounds { i32, i1* }, { i32, i1* }* %list_load, i32 0, i32 0
  159.   %list_size = load i32, i32* %list_size_ptr
  160.   %dec_size = sub i32 %list_size, 1
  161.   %list_arry_next_element_ptr = getelementptr i1, i1* %list_array_load, i32 %dec_size
  162.   %list_arry_next_element = load i1, i1* %list_arry_next_element_ptr
  163.   store i32 %dec_size, i32* %list_size_ptr
  164.   ret i1 %list_arry_next_element
  165. }
  166.  
  167. define i32 @list_popint({ i32, i32* }*) {
  168. entry:
  169.   %list_ptr_alloc = alloca { i32, i32* }*
  170.   store { i32, i32* }* %0, { i32, i32* }** %list_ptr_alloc
  171.   %list_load = load { i32, i32* }*, { i32, i32* }** %list_ptr_alloc
  172.   %list_array_ptr = getelementptr inbounds { i32, i32* }, { i32, i32* }* %list_load, i32 0, i32 1
  173.   %list_array_load = load i32*, i32** %list_array_ptr
  174.   %list_size_ptr = getelementptr inbounds { i32, i32* }, { i32, i32* }* %list_load, i32 0, i32 0
  175.   %list_size = load i32, i32* %list_size_ptr
  176.   %dec_size = sub i32 %list_size, 1
  177.   %list_arry_next_element_ptr = getelementptr i32, i32* %list_array_load, i32 %dec_size
  178.   %list_arry_next_element = load i32, i32* %list_arry_next_element_ptr
  179.   store i32 %dec_size, i32* %list_size_ptr
  180.   ret i32 %list_arry_next_element
  181. }
  182.  
  183. define double @list_popfloat({ i32, double* }*) {
  184. entry:
  185.   %list_ptr_alloc = alloca { i32, double* }*
  186.   store { i32, double* }* %0, { i32, double* }** %list_ptr_alloc
  187.   %list_load = load { i32, double* }*, { i32, double* }** %list_ptr_alloc
  188.   %list_array_ptr = getelementptr inbounds { i32, double* }, { i32, double* }* %list_load, i32 0, i32 1
  189.   %list_array_load = load double*, double** %list_array_ptr
  190.   %list_size_ptr = getelementptr inbounds { i32, double* }, { i32, double* }* %list_load, i32 0, i32 0
  191.   %list_size = load i32, i32* %list_size_ptr
  192.   %dec_size = sub i32 %list_size, 1
  193.   %list_arry_next_element_ptr = getelementptr double, double* %list_array_load, i32 %dec_size
  194.   %list_arry_next_element = load double, double* %list_arry_next_element_ptr
  195.   store i32 %dec_size, i32* %list_size_ptr
  196.   ret double %list_arry_next_element
  197. }
  198.  
  199. define i32 @list_sizebool({ i32, i1* }*) {
  200. entry:
  201.   %list_ptr_alloc = alloca { i32, i1* }*
  202.   store { i32, i1* }* %0, { i32, i1* }** %list_ptr_alloc
  203.   %list_load = load { i32, i1* }*, { i32, i1* }** %list_ptr_alloc
  204.   %list_size = getelementptr inbounds { i32, i1* }, { i32, i1* }* %list_load, i32 0, i32 0
  205.   %list_size1 = load i32, i32* %list_size
  206.   ret i32 %list_size1
  207. }
  208.  
  209. define i32 @list_sizeint({ i32, i32* }*) {
  210. entry:
  211.   %list_ptr_alloc = alloca { i32, i32* }*
  212.   store { i32, i32* }* %0, { i32, i32* }** %list_ptr_alloc
  213.   %list_load = load { i32, i32* }*, { i32, i32* }** %list_ptr_alloc
  214.   %list_size = getelementptr inbounds { i32, i32* }, { i32, i32* }* %list_load, i32 0, i32 0
  215.   %list_size1 = load i32, i32* %list_size
  216.   ret i32 %list_size1
  217. }
  218.  
  219. define i32 @list_sizefloat({ i32, double* }*) {
  220. entry:
  221.   %list_ptr_alloc = alloca { i32, double* }*
  222.   store { i32, double* }* %0, { i32, double* }** %list_ptr_alloc
  223.   %list_load = load { i32, double* }*, { i32, double* }** %list_ptr_alloc
  224.   %list_size = getelementptr inbounds { i32, double* }, { i32, double* }* %list_load, i32 0, i32 0
  225.   %list_size1 = load i32, i32* %list_size
  226.   ret i32 %list_size1
  227. }
  228.  
  229. define void @list_slicebool({ i32, i1* }*, { i32, i1* }*, i32, i32) {
  230. entry:
  231.   %list_ptr_alloc = alloca { i32, i1* }*
  232.   store { i32, i1* }* %0, { i32, i1* }** %list_ptr_alloc
  233.   %list_ptr_ptr = load { i32, i1* }*, { i32, i1* }** %list_ptr_alloc
  234.   %list_ptr_alloc2 = alloca { i32, i1* }*
  235.   store { i32, i1* }* %1, { i32, i1* }** %list_ptr_alloc2
  236.   %list_ptr_ptr2 = load { i32, i1* }*, { i32, i1* }** %list_ptr_alloc2
  237.   %idx_alloc = alloca i32
  238.   store i32 %2, i32* %idx_alloc
  239.   %idx_load = load i32, i32* %idx_alloc
  240.   %idx_alloc1 = alloca i32
  241.   store i32 %3, i32* %idx_alloc1
  242.   %idx_load2 = load i32, i32* %idx_alloc1
  243.   %loop_cnt = alloca i32
  244.   store i32 0, i32* %loop_cnt
  245.   %loop_upper_bound = sub i32 %idx_load2, %idx_load
  246.   br label %while
  247.  
  248. while:                                            ; preds = %while_body, %entry
  249.   %loop_cnt4 = load i32, i32* %loop_cnt
  250.   %loop_cond = icmp sle i32 %loop_cnt4, %loop_upper_bound
  251.   br i1 %loop_cond, label %while_body, label %merge
  252.  
  253. while_body:                                       ; preds = %while
  254.   %to_idx = load i32, i32* %loop_cnt
  255.   %from_idx = add i32 %to_idx, %idx_load
  256.   %list_get = call i1 @list_getbool({ i32, i1* }* %list_ptr_ptr, i32 %from_idx)
  257.   call void @list_setbool({ i32, i1* }* %list_ptr_ptr2, i32 %to_idx, i1 %list_get)
  258.   %loop_cnt3 = load i32, i32* %loop_cnt
  259.   %loop_itr = add i32 %loop_cnt3, 1
  260.   store i32 %loop_itr, i32* %loop_cnt
  261.   br label %while
  262.  
  263. merge:                                            ; preds = %while
  264.   ret void
  265. }
  266.  
  267. define void @list_sliceint({ i32, i32* }*, { i32, i32* }*, i32, i32) {
  268. entry:
  269.   %list_ptr_alloc = alloca { i32, i32* }*
  270.   store { i32, i32* }* %0, { i32, i32* }** %list_ptr_alloc
  271.   %list_ptr_ptr = load { i32, i32* }*, { i32, i32* }** %list_ptr_alloc
  272.   %list_ptr_alloc2 = alloca { i32, i32* }*
  273.   store { i32, i32* }* %1, { i32, i32* }** %list_ptr_alloc2
  274.   %list_ptr_ptr2 = load { i32, i32* }*, { i32, i32* }** %list_ptr_alloc2
  275.   %idx_alloc = alloca i32
  276.   store i32 %2, i32* %idx_alloc
  277.   %idx_load = load i32, i32* %idx_alloc
  278.   %idx_alloc1 = alloca i32
  279.   store i32 %3, i32* %idx_alloc1
  280.   %idx_load2 = load i32, i32* %idx_alloc1
  281.   %loop_cnt = alloca i32
  282.   store i32 0, i32* %loop_cnt
  283.   %loop_upper_bound = sub i32 %idx_load2, %idx_load
  284.   br label %while
  285.  
  286. while:                                            ; preds = %while_body, %entry
  287.   %loop_cnt4 = load i32, i32* %loop_cnt
  288.   %loop_cond = icmp sle i32 %loop_cnt4, %loop_upper_bound
  289.   br i1 %loop_cond, label %while_body, label %merge
  290.  
  291. while_body:                                       ; preds = %while
  292.   %to_idx = load i32, i32* %loop_cnt
  293.   %from_idx = add i32 %to_idx, %idx_load
  294.   %list_get = call i32 @list_getint({ i32, i32* }* %list_ptr_ptr, i32 %from_idx)
  295.   call void @list_setint({ i32, i32* }* %list_ptr_ptr2, i32 %to_idx, i32 %list_get)
  296.   %loop_cnt3 = load i32, i32* %loop_cnt
  297.   %loop_itr = add i32 %loop_cnt3, 1
  298.   store i32 %loop_itr, i32* %loop_cnt
  299.   br label %while
  300.  
  301. merge:                                            ; preds = %while
  302.   ret void
  303. }
  304.  
  305. define void @list_slicefloat({ i32, double* }*, { i32, double* }*, i32, i32) {
  306. entry:
  307.   %list_ptr_alloc = alloca { i32, double* }*
  308.   store { i32, double* }* %0, { i32, double* }** %list_ptr_alloc
  309.   %list_ptr_ptr = load { i32, double* }*, { i32, double* }** %list_ptr_alloc
  310.   %list_ptr_alloc2 = alloca { i32, double* }*
  311.   store { i32, double* }* %1, { i32, double* }** %list_ptr_alloc2
  312.   %list_ptr_ptr2 = load { i32, double* }*, { i32, double* }** %list_ptr_alloc2
  313.   %idx_alloc = alloca i32
  314.   store i32 %2, i32* %idx_alloc
  315.   %idx_load = load i32, i32* %idx_alloc
  316.   %idx_alloc1 = alloca i32
  317.   store i32 %3, i32* %idx_alloc1
  318.   %idx_load2 = load i32, i32* %idx_alloc1
  319.   %loop_cnt = alloca i32
  320.   store i32 0, i32* %loop_cnt
  321.   %loop_upper_bound = sub i32 %idx_load2, %idx_load
  322.   br label %while
  323.  
  324. while:                                            ; preds = %while_body, %entry
  325.   %loop_cnt4 = load i32, i32* %loop_cnt
  326.   %loop_cond = icmp sle i32 %loop_cnt4, %loop_upper_bound
  327.   br i1 %loop_cond, label %while_body, label %merge
  328.  
  329. while_body:                                       ; preds = %while
  330.   %to_idx = load i32, i32* %loop_cnt
  331.   %from_idx = add i32 %to_idx, %idx_load
  332.   %list_get = call double @list_getfloat({ i32, double* }* %list_ptr_ptr, i32 %from_idx)
  333.   call void @list_setfloat({ i32, double* }* %list_ptr_ptr2, i32 %to_idx, double %list_get)
  334.   %loop_cnt3 = load i32, i32* %loop_cnt
  335.   %loop_itr = add i32 %loop_cnt3, 1
  336.   store i32 %loop_itr, i32* %loop_cnt
  337.   br label %while
  338.  
  339. merge:                                            ; preds = %while
  340.   ret void
  341. }
  342.  
  343. define i32 @main() {
  344. entry:
  345.   %a = alloca { i32, i32* }
  346.   %list.size = getelementptr inbounds { i32, i32* }, { i32, i32* }* %a, i32 0, i32 0
  347.   %tmp = alloca i32
  348.   store i32 0, i32* %tmp
  349.   %tmp1 = load i32, i32* %tmp
  350.   store i32 %tmp1, i32* %list.size
  351.   %list.arry = getelementptr inbounds { i32, i32* }, { i32, i32* }* %a, i32 0, i32 1
  352.   %p = alloca i32, i32 1000
  353.   store i32* %p, i32** %list.arry
  354.   %b = alloca { i32, i32* }
  355.   %list.size2 = getelementptr inbounds { i32, i32* }, { i32, i32* }* %b, i32 0, i32 0
  356.   %tmp3 = alloca i32
  357.   store i32 0, i32* %tmp3
  358.   %tmp4 = load i32, i32* %tmp3
  359.   store i32 %tmp4, i32* %list.size2
  360.   %list.arry5 = getelementptr inbounds { i32, i32* }, { i32, i32* }* %b, i32 0, i32 1
  361.   %p6 = alloca i32, i32 1000
  362.   store i32* %p6, i32** %list.arry5
  363.   %i = alloca i32
  364.   store i32 0, i32* %i
  365.   br label %while
  366.  
  367. while:                                            ; preds = %while_body, %entry
  368.   %i10 = load i32, i32* %i
  369.   %tmp11 = icmp slt i32 %i10, 5
  370.   br i1 %tmp11, label %while_body, label %merge
  371.  
  372. while_body:                                       ; preds = %while
  373.   %i7 = load i32, i32* %i
  374.   call void @list_pushint({ i32, i32* }* %a, i32 %i7)
  375.   %i8 = load i32, i32* %i
  376.   %tmp9 = add i32 %i8, 1
  377.   store i32 %tmp9, i32* %i
  378.   br label %while
  379.  
  380. merge:                                            ; preds = %while
  381.   %new_list_ptr = alloca { i32, i32* }
  382.   %list.size12 = getelementptr inbounds { i32, i32* }, { i32, i32* }* %new_list_ptr, i32 0, i32 0
  383.   %tmp13 = alloca i32
  384.   store i32 0, i32* %tmp13
  385.   %tmp14 = load i32, i32* %tmp13
  386.   store i32 %tmp14, i32* %list.size12
  387.   %list.arry15 = getelementptr inbounds { i32, i32* }, { i32, i32* }* %new_list_ptr, i32 0, i32 1
  388.   %p16 = alloca i32, i32 1000
  389.   store i32* %p16, i32** %list.arry15
  390.   call void @list_sliceint({ i32, i32* }* %a, { i32, i32* }* %new_list_ptr, i32 2, i32 5)
  391.   %new_list = load { i32, i32* }, { i32, i32* }* %new_list_ptr
  392.   store { i32, i32* } %new_list, { i32, i32* }* %b
  393.   %list_get = call i32 @list_getint({ i32, i32* }* %b, i32 0)
  394.   %printf = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @fmt, i32 0, i32 0), i32 %list_get)
  395.   %list_size = call i32 @list_sizeint({ i32, i32* }* %b)
  396.   %printf17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @fmt, i32 0, i32 0), i32 %list_size)
  397.   ret i32 0
  398. }
  399.  
  400. define void @print_test({ i32, i32* } %l, i32 %idx) {
  401. entry:
  402.   %l1 = alloca { i32, i32* }
  403.   %list.size = getelementptr inbounds { i32, i32* }, { i32, i32* }* %l1, i32 0, i32 0
  404.   %tmp = alloca i32
  405.   store i32 0, i32* %tmp
  406.   %tmp2 = load i32, i32* %tmp
  407.   store i32 %tmp2, i32* %list.size
  408.   %list.arry = getelementptr inbounds { i32, i32* }, { i32, i32* }* %l1, i32 0, i32 1
  409.   %p = alloca i32, i32 1000
  410.   store i32* %p, i32** %list.arry
  411.   store { i32, i32* } %l, { i32, i32* }* %l1
  412.   %idx3 = alloca i32
  413.   store i32 %idx, i32* %idx3
  414.   %idx4 = load i32, i32* %idx3
  415.   %list_get = call i32 @list_getint({ i32, i32* }* %l1, i32 %idx4)
  416.   %printf = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @fmt.3, i32 0, i32 0), i32 %list_get)
  417.   %list_size = call i32 @list_sizeint({ i32, i32* }* %l1)
  418.   %printf5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @fmt.3, i32 0, i32 0), i32 %list_size)
  419.   ret void
  420. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top