id
int64 0
45.1k
| file_name
stringlengths 4
68
| file_path
stringlengths 14
193
| content
stringlengths 32
9.62M
| size
int64 32
9.62M
| language
stringclasses 1
value | extension
stringclasses 6
values | total_lines
int64 1
136k
| avg_line_length
float64 3
903k
| max_line_length
int64 3
4.51M
| alphanum_fraction
float64 0
1
| repo_name
stringclasses 779
values | repo_stars
int64 0
882
| repo_forks
int64 0
108
| repo_open_issues
int64 0
90
| repo_license
stringclasses 8
values | repo_extraction_date
stringclasses 146
values | sha
stringlengths 64
64
| __index_level_0__
int64 0
45.1k
| exdup_ids_cmlisp_stkv2
sequencelengths 1
47
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16,224 | jvmclass.lisp | davidsun0_lateral/interpreter/jvmclass.lisp | (defun to-u2 (x)
(let (len-lo (% x 0xFF)
len-hi (// x 0xFF))
(list len-hi len-lo)))
(defun utf8-info (str)
; utf8 tag is 0x01
(concat (cons 0x01
(to-u2 (length str)))
(map char-int (to-chars str))))
(defun classref-info (num)
(cons 0x07 (to-u2 num)))
(defun string-info (num)
(cons 0x08 (to-u2 num)))
(defun fieldref-info (class nametype)
(cons 0x09
(concat (to-u2 class)
(to-u2 nametype))))
(defun methodref-info (class nametype)
(cons 0x0A
(concat (to-u2 class)
(to-u2 nametype))))
(defun nametyperef-info (name descriptor)
(cons 0x0C
(concat (to-u2 name)
(to-u2 descriptor))))
(def constant-pool
(list
(utf8-info "Hello") ; #1
(classref-info 1) ; #2 Class #1 Hello
(utf8-info "java/lang/Object") ; #3
(classref-info 3) ; #4 Class #3 java.lang.Object
(utf8-info "java/lang/System") ; #5
(classref-info 5) ; #6 Class #5 java.lang.System
(utf8-info "java/io/PrintStream") ; #7
(classref-info 7) ; #8 Class #7 java.io.PrintStream
(utf8-info "out") ; #9
(utf8-info "Ljava/io/PrintStream;") ; #10
(nametyperef-info 9 10) ; #11 member out of type PrintStream
(fieldref-info 6 11) ; #12 System.out
(utf8-info "println") ; #13
(utf8-info "(Ljava/lang/String;)V") ; #14
(nametyperef-info 13 14) ; #15 member println of type void(String)
(methodref-info 8 15) ; #16 void PrintStream.println(String)
(utf8-info "Code") ; #17
(utf8-info "main") ; #18
(utf8-info "([Ljava/lang/String;)V") ; #19
(utf8-info "Hello World!") ; #20
(string-info 20))) ; #21 String "Hello World" (#20)
(def hello-method
(list 0x00 0x09 ; public static
0x00 0x12 ; main (#18)
0x00 0x13 ; void (String[])
0x00 0x01 ; attribute size = 1
0x00 0x11 ; attribute: Code (#17)
0x00 0x00 0x00 0x15 ; code attribute size = 21
0x00 0x02 ; max stack size = 2
0x00 0x01 ; max local var size = 1
0x00 0x00 0x00 0x09 ; 9 bytes of code
0xB2 0x00 0x0c ; getstatic System.out (#12)
0x12 0x15 ; ldc "Hello World" (#21)
0xB6 0x00 0x10 ; invokevirtual PrintStream.println(String) (#16)
0xB1 ; return
0x00 0x00 ; exception table size = 0
0x00 0x00)) ; attribute size = 0
(def my-class
(reduce
concat
(list
(list 0xCA 0xFE 0xBA 0xBE ; CAFE BABE magic number
0x00 0x00 0x00 0x37) ; 0 0 . 0 55 => Java version 55.0 (Java 11)
(to-u2 (inc (length constant-pool)))
(reduce concat constant-pool)
(list 0x00 0x21) ; class access flags: extendable and public
(list 0x00 0x02) ; class Hello (#2)
(list 0x00 0x04) ; extends java.lang.Object (#4)
(list 0x00 0x00) ; zero interfaces
(list 0x00 0x00) ; zero fields
(list 0x00 0x01) ; 1 method
hello-method
(list 0x00 0x00)))) ; zero attributes
(write-bytes "Hello.class" my-class)
| 3,551 | Common Lisp | .lisp | 81 | 35.641975 | 85 | 0.509249 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | ee8bcab77982c9dce55990be0062545ee45ca20a982e870435f02a330f421e06 | 16,224 | [
-1
] |
16,225 | simple.lisp | davidsun0_lateral/interpreter/test/simple.lisp | ;; Lateral Unit Tests
;; To add a test: type the textual input followed by a new line, a semicolon,
;; and then the expected output.
;; Tests should be split with an empty line.
;; Arithmetic
12345
; 12345
(+ 1 1)
; 2
(+ 1 2 3 4 5)
; 15
(+ 1
(+ 1 1))
; 3
;; Function calls
((lambda () 321))
; 321
((lambda (x)
(+ x x x))
333)
; 999
((lambda (x)
((lambda (y) (+ y 1)) x))
10)
; 11
;; Global Environment
(def x (+ 100 200))
; 300
x
; 300
(def x 31415)
; 31415
x
; 31415
;; Special forms
(def a "text")
; "text"
a
; "text"
(quote a)
; a
| 559 | Common Lisp | .lisp | 41 | 12.02439 | 77 | 0.626984 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | a42ccd9fbb24889a1622feac57555842f1358941dadc55c879df2aaf339d4a81 | 16,225 | [
-1
] |
16,226 | jvmhello.lisp | davidsun0_lateral/interpreter/old/jvmhello.lisp | (defun to-u1 (x)
(if (< x 0xFF)
(list x)
"int too large for 1 byte"))
(defun to-u2 (x)
(if (< x 0xFFFF)
(concat (to-u1 (// x 0xFF))
(to-u1 (% x 0xFF)))
"int too large for 2 bytes"))
(defun to-u4 (x)
(concat (to-u2 (// x 0xFFFF))
(to-u2 (% x 0xFFFF))))
(defun const-to-bin (const-list)
(cond
(equal? (car const-list) :utf8)
(concat (cons 0x01 (to-u2 (length (nth 1 const-list))))
(map char-int (to-chars (nth 1 const-list))))
(equal? (car const-list) :classref)
(cons 0x07 (to-u2 (nth 1 const-list)))
(equal? (car const-list) :string)
(cons 0x08 (to-u2 (nth 1 const-list)))
(equal? (car const-list) :fieldref)
(cons 0x09
(concat (to-u2 (nth 1 const-list))
(to-u2 (nth 2 const-list))))
(equal? (car const-list) :methodref)
(cons 0x0A
(concat (to-u2 (nth 1 const-list))
(to-u2 (nth 2 const-list))))
(equal? (car const-list) :nametyperef)
(cons 0x0C
(concat (to-u2 (nth 1 const-list))
(to-u2 (nth 2 const-list))))
t (list :unknown const-list)))
(defun pool-add (poolmap attribs)
(let (tag (car attribs)
val (cdr attribs))
(cond
(equal? tag :utf8)
(hashmap-set! poolmap attribs nil)
; class-ref -> utf8 name
; string -> utf8
(or (equal? tag :classref) (equal? tag :string))
(let (string-r (list :utf8 (car val)))
(progn
(pool-add poolmap string-r)
(hashmap-set! poolmap
attribs
string-r)))
; nametype-ref -> utf8 name, utf8 type
(equal? tag :nametyperef)
(let (name-r (list :utf8 (car val))
type-r (list :utf8 (nth 1 val)))
(progn
(pool-add poolmap name-r)
(pool-add poolmap type-r)
(hashmap-set! poolmap
attribs
(list name-r type-r))))
; field-ref -> class, nametype
; method-ref -> class, nametype
(or (equal? tag :fieldref) (equal? tag :methodref))
(let (class-r (car val)
nametype-r (nth 1 val))
(progn
(pool-add poolmap class-r)
(pool-add poolmap nametype-r)
(hashmap-set! poolmap
attribs
(list class-r nametype-r))))
t (hashmap-set poolmap (cons :unknown attribs))
)))
(defun pool-resolve (poolmap parent)
(let (parent-type (car parent)
child0 (hashmap-get poolmap parent)
child-value (car child0))
(if (int? child-value)
child-value
(progn
(def pool-list
(cons
(cond
(not child-value)
parent
(or (equal? parent-type :classref)
(equal? parent-type :string))
(list (car parent)
(pool-resolve poolmap child-value))
(or (equal? parent-type :nametyperef)
(equal? parent-type :methodref)
(equal? parent-type :fieldref))
(list (car parent)
(pool-resolve poolmap (nth 0 child-value))
(pool-resolve poolmap (nth 1 child-value)))
t (list :unknown parent)
)
pool-list))
(hashmap-set! poolmap parent pool-count)
(def pool-count (inc pool-count))
(dec pool-count)
))))
(def pool (make-hashmap 32))
(def pool-count 1)
(def pool-list nil)
(pool-add pool (list :classref "Hello"))
(pool-add pool (list :classref "java/lang/Object"))
(pool-add pool (list :utf8 "Code"))
(pool-add pool (list :utf8 "main"))
(pool-add pool (list :utf8 "([Ljava/lang/String;)V"))
(pool-add pool (list :string "Hello World!"))
(pool-add pool
(list :methodref
(list :classref "java/io/PrintStream")
(list :nametyperef "println" "(Ljava/lang/String;)V")))
(pool-add pool
(list :fieldref
(list :classref "java/lang/System")
(list :nametyperef "out" "Ljava/io/PrintStream;")))
(let (presolve (lambda (k v) (pool-resolve pool k)))
(maphash presolve pool))
(def pool-list (reverse! pool-list))
(def hello-method2
(list 0x00 0x09 ; public static
; 0x00 0x12 ; main (#18)
(to-u2 (car (hashmap-get pool (list :utf8 "main"))))
; 0x00 0x13 ; void (String[]) (#19)
(to-u2 (car (hashmap-get pool (list :utf8 "([Ljava/lang/String;)V"))))
0x00 0x01 ; attribute size = 1
; 0x00 0x11 ; attribute: Code (#17)
(to-u2 (car (hashmap-get pool (list :utf8 "Code"))))
0x00 0x00 0x00 0x15 ; code attribute size = 21
0x00 0x02 ; max stack size = 2
0x00 0x01 ; max local var size = 1
0x00 0x00 0x00 0x09 ; 9 bytes of code
0xB2 ; getstatic
(to-u2 (car (hashmap-get pool (list :fieldref
(list :classref "java/lang/System")
(list :nametyperef
"out"
"Ljava/io/PrintStream;")))))
0x12 ; ldc
(to-u1 (car (hashmap-get pool (list :string "Hello World!"))))
0xB6 ; invokevirtual
(to-u2 (car (hashmap-get pool (list :methodref
(list :classref "java/io/PrintStream")
(list :nametyperef
"println"
"(Ljava/lang/String;)V")))))
0xB1 ; return
0x00 0x00 ; exception table size = 0
0x00 0x00)) ; attribute size = 0
(def hello-method3
(list
(list :public :static "main" "([Ljava/lang/String;)V")
(list :max-stack 2 :max-locals 1)
(list :getstatic "java/lang/System/out" "Ljava/io/PrintStream;")
(list :ldc "Hello World!")
(list :invokevirtual "java/io/PrintStream" "println" "(Ljava/lang/String;)V")
(list :return)))
(map print pool-list)
(def bin-pool (reduce concat (map const-to-bin pool-list)))
(list :class "Hello" :extends "java/lang/Object")
(def my-class
(reduce
concat
(list
(list 0xCA 0xFE 0xBA 0xBE ; CAFE BABE magic number
0x00 0x00 0x00 0x37) ; 0 0 . 0 55 => Java version 55.0 (Java 11)
(to-u2 (inc (length pool-list)))
bin-pool
(list 0x00 0x21) ; class access flags: extendable and public
; (list 0x00 0x02) ; class Hello (#2)
(to-u2 (car (hashmap-get pool (list :classref "Hello"))))
; (list 0x00 0x04) ; extends java.lang.Object (#4)
(to-u2 (car (hashmap-get pool (list :classref "java/lang/Object"))))
(list 0x00 0x00) ; zero interfaces
(list 0x00 0x00) ; zero fields
(list 0x00 0x01) ; 1 method
(flatten hello-method2)
(list 0x00 0x00)
))) ; zero attributes
; (write-bytes "Hello.class" my-class)
(defun ir-to-jvm (expr)
(let (cmd (car expr))
(cond
(equal? cmd :return)
(list :areturn)
(equal? cmd :push)
(cond
(equal? (nth 1 expr) :arg-num)
(list :aload (nth 2 expr)))
)))
(defun compile (name args expr)
(let (ir-list (append (ir0 expr nil) (list :return))
max-stack-size (max-stack0 ir-list 0 0 nil)
bytecode (map ir-to-jvm (resolve-syms ir-list args)))
(progn
(print max-stack-size)
(map print bytecode))))
(compile "identity" (quote (a)) (quote a))
| 7,973 | Common Lisp | .lisp | 200 | 28.835 | 85 | 0.512744 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 27ecc63a47242e7e7b92284b3a660984c807da3aa4e16d47a9cbb4a8e68fd345 | 16,226 | [
-1
] |
16,227 | core.lisp | davidsun0_lateral/interpreter/old/core.lisp | (def defmacro
(macro (name args expr)
`(def ~name (macro ~args ~expr))))
(defmacro quote (x))
(defmacro defn (a b c)
`(def ~a (fn ~b ~c)))
(defn inc (n)
(+ n 1))
(defn mult (a b)
(loop (acc 0 n 0)
(if (= n b)
acc
(recur (+ acc a) (+ n 1)))))
| 274 | Common Lisp | .lisp | 13 | 17.615385 | 38 | 0.51751 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | bb29fbe0bf8b776686dcc270444c74e577087b8ecde7a8a6e58bfbc416a5b902 | 16,227 | [
-1
] |
16,228 | hello.lisp | davidsun0_lateral/interpreter/old/jvm/hello.lisp | (defun main ()
(pprint0 "hello world!\n"))
;; basic utilities
(defun not (p)
(if p nil t))
| 97 | Common Lisp | .lisp | 5 | 17.2 | 29 | 0.633333 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 1edcbe13dc58b311903865e252e96ca09b25c09eb1b7ad537bd25d061dc2fe69 | 16,228 | [
-1
] |
16,229 | lc.lisp | davidsun0_lateral/interpreter/old/jvm/lc.lisp | (include "ir.lisp")
(include "jvmtable.lisp")
(defun u1 (x)
(if (< x 0x100)
(list x)
(throw "int too large for 1 byte")))
(defun u2 (x)
(if (or (< x 0xFFFF) (= x 0xFFFF))
(list (bit-and (bit-asr x 8) 0xFF)
(bit-and x 0xFF))
(throw "int too large for 2 bytes")))
(defun u4 (x)
(concat (u2 (// x 0x10000))
(u2 (bit-and x 0xFFFF))))
(defun len1-attribs (const-list)
(u2 (nth 1 const-list)))
(defun len2-attribs (const-list)
(concat (u2 (nth 1 const-list))
(u2 (nth 2 const-list))))
(defun const-to-bin (const-list)
(case (first const-list)
:utf8 (concat (cons 0x01 (u2 (length (second const-list))))
(map integer (to-chars (second const-list))))
:classref (cons 0x07 (len1-attribs const-list))
:string (cons 0x08 (len1-attribs const-list))
:fieldref (cons 0x09 (len2-attribs const-list))
:methodref (cons 0x0A (len2-attribs const-list))
:nametyperef (cons 0x0C (len2-attribs const-list))
(list :unknown const-list)))
(defun pool-search! (constpool expr)
(if (contains? constpool expr)
(first (get constpool expr))
(let (pool-count (get constpool :count 1))
(progn
(insert! constpool expr pool-count)
(insert! constpool :count (inc pool-count))
pool-count))))
(defun pool-get! (constpool expr)
(let (expr (if (string? expr) (list :utf8 expr) expr)
tag (first expr))
(case tag
:utf8 (pool-search! constpool expr)
(:classref :string)
(pool-search!
constpool
(list tag (pool-get! constpool (string (second expr)))))
(:nametyperef :methodref :fieldref)
(pool-search!
constpool
(list tag
(pool-get! constpool (second expr))
(pool-get! constpool (third expr))))
:getstatic
(pool-search!
constpool
(list tag
(pool-get! constpool (second expr))
(pool-get! constpool (third expr))
(pool-get! constpool (fourth expr))))
(throw "can't pool-get" expr tag "test"))))
; generates code to store stack onto local args for tail recursion
(defun set-locals (n i acc)
(if (< n i)
acc
(set-locals n (inc i) (cons (list :astore i) acc))))
(defun ir-to-jvm (expr)
(case (first expr)
:return (list :areturn)
:push
(case (nth 1 expr)
:arg-num (list :aload (nth 2 expr))
:nil (list :aconst_null)
:true (list :getstatic
"java/lang/Boolean"
"TRUE"
"Ljava/lang/Boolean;")
:int-const
(list (list :iconst (nth 2 expr))
(list :invokestatic "java/lang/Integer"
"valueOf" "(I)Ljava/lang/Integer;"))
:char-const
(list (list :iconst (integer (nth 2 expr)))
(list :invokestatic "java/lang/Character"
"valueOf" "(C)Ljava/lang/Character;"))
:str-const
(list :ldc (list :string (nth 2 expr)))
:symbol
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Symbol" "makeSymbol"
"(Ljava/lang/String;)LSymbol;"))
:keyword
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Keyword" "makeKeyword"
"(Ljava/lang/String;)LKeyword;"))
(progn (print "ir-to-jvm: can't push" expr) (throw "error")))
:store (list :astore (second expr))
:jump-if-nil (cons :ifnull (rest expr))
:jump-not-nil (cons :ifnonnull (rest expr))
:tail-recur (set-locals (dec (nth 2 expr)) 0 (list (list :goto :start)))
;TODO: figure out how to call function objects
;:dynamcall (funcall-resolve (cons :funcall "invoke" (rest expr)))
expr))
;; prepends start label to ir if there are tail recursive calls
(defun check-tco0 (in curr)
(cond
(nil? curr) in
(equal? (first (first curr)) :tail-recur) (cons (list :label :start) in)
t (check-tco0 in (rest curr))))
(defun check-tco (in)
(check-tco0 in in))
(defun funcall-resolve (method-list expr)
(if (equal? (first expr) :funcall)
(let (call (->> (second expr)
(string)
(get method-list)
(first)))
(cond
(nil? call) (print "funcall-resolve can't resolve " call expr)
(lambda? call) (call method-list (fourth expr))
(list? call) (cons :invokestatic call)
t (list :invokestatic call)))
expr))
;; converts a single item of the form (:jvmcode args) into a list of bytes
(defun jvm-assemble (in)
(case (first in)
;; simple bytecode ops
(:aconst_null :pop :dup :areturn :return :nop)
(list (get *bytecodes* (first in) nil))
:aload
(if (< (second in) 4)
(list (+ 0x2A (second in)))
(list 0x19 (second in)))
:astore
(if (< (second in) 4)
(list (+ 0x4B (second in)))
(list 0x3A (second in)))
:iconst
; iconst_<> -> bipush -> sipush -> ldc
(let (val (second in))
(cond
; iconst literal
(and (< (- 2) val) (< val 6)) (list (+ val 3))
; bipush
(and (< (- 129) val) (< val 128)) (list 0x10 val)
t (print "can't iconst value:" val)))
:checkcast
(->> (second in)
(list :classref)
(pool-get! pool)
(u2)
(cons 0xC0))
in))
(defun pool-resolve! (pool in)
(case (first in)
(:invokestatic :invokevirtual)
(->> (list :methodref
(list :classref
(second in))
(list :nametyperef
(third in)
(fourth in)))
;(print-iden)
(pool-get! pool)
(u2)
(cons (first (get *bytecodes* (first in)))))
:getstatic
(->> (nth 3 in)
(list :nametyperef (third in))
(list :fieldref
(list :classref (second in)))
(pool-get! pool)
(u2)
(cons 0xB2))
:ldc
(let (idx (pool-get! pool (second in)))
(if (< idx 0x100)
(cons 0x12 (u1 idx))
(cons 0x13 (u2 idx))))
in))
;; calculates label byte offsets
(defun label-resolve0! (a b)
(let (labelmap (first a)
offset (second a))
(if (index (first b) (list :label :local-count :let-pop))
(list (insert! labelmap (second b) offset)
offset)
(list labelmap
(+ offset
(cond
(int? (first b)) (length b)
(index (first b) (list :ifnull :ifnonnull :goto)) 3
t (print "unknown label: " b)))))))
(defun label-resolve (bytes)
(first (foldl label-resolve0! (list (hashmap) 0) bytes)))
;; resolves jumps, associates labels with byte offsets
(defun jump-resolve0 (in acc offset labelmap)
(let (expr (first in)
cmd (first expr))
(cond
(nil? in) (reverse acc)
(index cmd (list :ifnull :ifnonnull :goto))
(jump-resolve0 (rest in)
(cons (cons
(get *bytecodes* cmd nil)
(u2 (- (get labelmap (second expr) nil) offset)))
acc)
(+ offset 3)
labelmap)
t (jump-resolve0 (rest in)
(cons expr acc)
(+ offset
(if (int? cmd) (length expr) 0))
labelmap))))
(defun jump-resolve (jvm-asm)
(->> (label-resolve jvm-asm)
(jump-resolve0 jvm-asm nil 0)
(filter (lambda (x) (int? (first x))))))
;; quick and dirty way to get argc from type string
;; should count number of matches for this regex
;; "\([ILFDC(L.*;)]*\)"
(defun count-semi (str idx acc)
(let (c (char-at str idx))
;; do not convert to case. there is a bug with nil
(cond
(index c (list nil (to-char ")"))) acc
(index c (list (to-char "I") (to-char ";"))) (count-semi str (inc idx) (inc acc))
t (count-semi str (inc idx) acc))))
(defun local-info0 (acc expr)
(let (mloc (first acc)
lablist (second acc))
(case (first expr)
;; set based on local tag info
(:local-count :let-pop)
;(list (if (< mloc (third expr))
; (third expr)
(list (third expr)
(insert! lablist (second expr) (third expr)))
(:ifnull :ifnonnull :goto)
(list mloc
(if (equal? (second expr) :start)
lablist
(insert! lablist (second expr) mloc)))
(list mloc lablist))))
(defun local-info (argc jvm-asm)
(insert!
(second (foldl local-info0 (list argc (hashmap)) jvm-asm))
:start argc))
(defun stack-info0 (acc expr)
(let (cstack (second acc)
mstack (if (< (first acc) cstack)
cstack
(first acc))
lablist (third acc)
;_ (print cstack)
;_ (print expr)
)
(case (first expr)
;; stack +1
(:aload :aconst_null :iconst :dup :getstatic :ldc)
(list mstack (inc cstack) lablist)
;; stack -1
;; gotos decrease the stack when jumping to another branch
;; gotos to start keep the stack the same
(:areturn :pop :astore :ifnull :ifnonnull :goto)
(list mstack
(if (equal? expr (quote (:goto :start)))
cstack
(dec cstack))
(cond
(equal? (first expr) :goto)
(insert! lablist (second expr) cstack)
(index (first expr) (list :goto :ifnull :ifnonnull))
(insert! lablist (second expr) (dec cstack))
t lablist))
;; stack +- 0
(:label :return :let-pop :local-count)
(list mstack cstack
(if (equal? (first expr) :goto)
(insert! lablist (second expr) cstack)
lablist))
;; stack - argc + 1
:invokestatic
(list mstack
(- cstack (dec (count-semi (nth 3 expr) 0 0)))
lablist)
(progn
(print "stack-info0 can't handle " expr)
(list mstack cstack lablist)))))
;; stack frame object entry of class Object
(defun objvar-info (pool)
(->> "java/lang/Object"
(list :classref)
(pool-get! pool)
(u2)
(cons 0x07)))
(defun sframe1 (offset last-local l-count s-count)
(let (obj (objvar-info pool))
(cond
; same frame
(and (= last-local l-count) (= s-count 0) (< offset 64))
(list offset)
;; these work in theory but not in practice
; same locals 1 stack item
;(and (= last-local l-count) (= s-count 1) (< offset 64))
;(list (+ offset 64) objvar-info)
; same locals 1 stack item extended
;(and (= last-local l-count) (= s-count 1))
;(list 247 (to-u2 offset) objvar-info)
; chop frame
;(and (= s-count 0) (< (- last-local l-count)
; full frame
t (list 0xFF (u2 offset)
(if (= l-count 0)
(list (u2 0))
(list (u2 l-count) (repeat obj l-count)))
(if (= s-count 0)
(list (u2 0))
(list (u2 s-count) (repeat obj s-count)))))))
(defun sframe-resolve0 (poff ploc acc lstat)
(progn ;(print poff ploc acc lstat)
(let (item (first lstat)
offset (first item)
stacks (second item)
locals (third item))
(if (nil? lstat)
(reverse acc)
(sframe-resolve0
offset
locals
(cons (sframe1 (dec (- offset poff)) ploc locals stacks) acc)
(rest lstat))))))
(defun sframe-resolve (argc offsets stack-i local-i)
(->> (keyvals offsets)
(msort (lambda (a b) (< (second a) (second b))))
(print-iden)
(map (lambda (x)
(list (second x)
(get stack-i (first x) nil)
(get local-i (first x) nil))))
(filter (lambda (x) (second x)))
(sframe-resolve0 (- 1) argc nil)))
(defun arg-count (args)
(if (index :rest args)
(inc (index :rest args))
(length args)))
(defun compile0! (pool method-list name args jvm-asm signature)
(let (_ (pprint)
_ (print name)
_ (print "asm:")
_ (map print jvm-asm)
; human readable jvm bytecode
_ (print "====")
bytecode (->> jvm-asm
(map jvm-assemble)
(map (lambda (x) (pool-resolve! pool x)))
(jump-resolve)
(flatten))
_ (print "bytecode: " bytecode)
label-i (->> jvm-asm
(map jvm-assemble)
(map (lambda (x) (pool-resolve! pool x)))
(label-resolve))
_ (print "label info: " label-i)
local-i (local-info (arg-count args) jvm-asm)
_ (print "local info: " local-i)
stack-i (foldl stack-info0 (list 0 0 (hashmap)) jvm-asm)
_ (print "stack info: " stack-i)
sframes (sframe-resolve (arg-count args) label-i (third stack-i) local-i)
_ (print "stack frames: " sframes)
)
(list
0x00 0x09 ; public static
; name of function
(u2 (pool-get! pool (string name)))
; type signature
(u2 (pool-get! pool signature))
0x00 0x01 ; attribute size of 1
(u2 (pool-get! pool "Code"))
(u4 (+ 12 (length bytecode)
(if sframes
(+ 8 (length (flatten sframes)))
0)))
(u2 (first stack-i)) ; max stack height
(u2 (let (maxloc (apply max (map second (keyvals local-i))))
(if maxloc
maxloc
(arg-count args))))
(u4 (length bytecode))
bytecode
0x00 0x00 ; 0 exceptions
(if sframes
(list 0x00 0x01 ; one attribute (StackMapTable)
(u2 (pool-get! pool (list :utf8 "StackMapTable")))
; length in bytes = size(number of frames) + length of binary
(u4 (+ 2 (length (flatten sframes))))
(u2 (length sframes)) ; number of frames
sframes)
; no attributes if StackMapTable is empty
(list 0x00 0x00)))))
(defun compile1! (cpool method-list defnexpr)
(let (name (second defnexpr)
args (third defnexpr)
expr (fourth defnexpr))
(compile0!
cpool
method-list
name
args
(->> (ir name (filter symbol? args) expr)
(check-tco)
(map ir-to-jvm)
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
(method-type (arg-count args)))))
(defun compile-special! (cpool method-list name args body signature)
(compile0!
cpool
method-list
name
args
(->> (ir nil args body)
(map ir-to-jvm)
((lambda (x) (append x (list :return))))
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
signature))
(defun class-headers (pool name parent methods)
(let (; add class and parent to constant pool
class-idx (pool-get! pool (list :classref name))
parent-idx (pool-get! pool (list :classref parent))
const-pool-size (get pool :count nil)
;_ (map print (keyvals pool))
)
(list
0xCA 0xFE 0xBA 0xBE ; java magic number
0x00 0x00 0x00 0x37 ; java version 55.0 (Java 11)
(u2 const-pool-size)
(->> (keyvals pool)
(filter (lambda (x) (list? (first x))))
(msort (lambda (a b) (< (second a) (second b))))
(map first)
(map const-to-bin)
(flatten))
0x00 0x21 ; extendable (not final) and public
(u2 class-idx)
(u2 parent-idx)
0x00 0x00 ; zero interfaces
0x00 0x00 ; zero fields
(u2 (length methods))
methods
0x00 0x00))) ; zero attributes
(include "read.lisp")
(defun call-split (in funs macros etc)
(cond
(nil? in) (list (reverse funs)
(reverse macros)
(reverse etc))
(equal? (first (first in)) (quote defun))
(call-split (rest in) (cons (first in) funs) macros etc)
(equal? (first (first in)) (quote defmacro))
(call-split (rest in) funs (cons (first in) macros) etc)
t
(call-split (rest in) funs macros (cons (first in) etc))))
(defun read-funs (path)
(first (call-split (read-all path) nil nil nil)))
(defun compile2 (path classname)
(let (exprs (read-all path)
_ (print "done reading")
splits (call-split exprs nil nil nil)
_ (print "funs====")
;_ (map print funs)
macros (second splits)
_ (print "macros===")
;_ (map print macros)
etc (third splits)
_ (print "other===")
;_ (map print etc)
; how to expand macros within macros?
macro-list (hashmap)
_ (map
(lambda (x)
(progn
(insert! macro-list (second x)
(eval (list (quote lambda) (third x) (nth 3 x))))
))
macros)
_ (print macro-list)
;; macroexpand
funs (first splits)
funs (map (lambda (x) (comp-expand x macro-list)) funs)
_ (print "expanded funs====")
_ (map print funs)
cpool (hashmap)
;; insert all functions into method-list
_ (map (lambda (x) (insert-lambda! method-list classname x)) funs)
cinitbin (compile-special! cpool method-list "<clinit>" nil
(cons (quote progn) etc)
"()V")
mainbin
;(if (get method-list "main" nil)
(compile-special! cpool method-list "main" (quote (0))
(quote (main))
"([Ljava/lang/String;)V");)
;x (throw asdf)
)
(write-bytes
(string classname ".class") ;"MyClass.class"
(flatten
(class-headers
cpool
classname
"java/lang/Object"
(cons cinitbin mainbin
(map
(lambda (x) (compile1! cpool method-list x))
funs)))))))
(defun comp-expand (in macros)
(if (list? in)
(comp-expand0 in nil macros)
in))
(defun comp-expand0 (in acc macros)
(cond
(nil? in) (reverse acc)
(and (nil? acc) (equal? (first in) (quote quote)))
in
(and (nil? acc) (get macros (first in) nil))
(comp-expand
(apply (get (user-envir) (first in) nil) (rest in))
macros)
t (comp-expand0 (rest in)
(cons
(comp-expand (first in) macros)
acc)
macros)))
;; method adding for :rest params
;(lambda (n)
;(cons (funcall-resolve (list :funcall (quote list) :argc (- l n)))
;(list :funcall (quote name-symbol) :argc l)))
;(eval
;`(lambda (n)
;(cons (funcall-resolve (:funcall list :argc (- ,l n)))
;(:funcall ,name :argc ,l))))
(defun make-params (class name n-params)
(eval
(list (quote lambda)
(quote (ml n))
(list (quote append)
(list (quote funcall-resolve)
(quote ml)
(list (quote list)
:funcall
"list"
:argc
(list (quote -)
(quote n)
n-params)))
(list (quote list)
:invokestatic
class
name
(method-type (inc n-params)))))))
(defun insert-lambda! (method-list classname lamb)
(let (string-name (string (second lamb)))
(if (index :rest (third lamb))
(->> (third lamb)
(index :rest)
(make-params classname string-name)
(insert! method-list string-name))
(->> (third lamb)
(length)
(method-type)
(list classname string-name)
(insert! method-list string-name)))))
(defun reload ()
(progn
(def mlist method-list)
(map (lambda (x) (insert-lambda! mlist "MyClass" x)) funs)))
| 20,256 | Common Lisp | .lisp | 579 | 25.735751 | 87 | 0.533589 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | dbc8e33be3433eaf6f4dc8fed08c3ddcfc554cb2c15803cca1b8b17ae8851adf | 16,229 | [
-1
] |
16,230 | lateral.lisp | davidsun0_lateral/interpreter/old/jvm/lateral.lisp | (defun not (p)
(if p nil t))
(defun second (list)
(first (rest list)))
(defun nth (n list)
(if (= n 0)
(first list)
(nth (dec n) (rest list))))
(defun length0 (list acc)
(if list
(length0 (rest list) (inc acc))
acc))
(defun length (list)
(length0 list 0))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
(defun interleave0 (lista listb acc)
(cond
(equal? :rest (first lista))
(reverse (cons listb (cons (second lista) acc)))
(and lista listb)
(interleave0 (rest lista) (rest listb)
(cons (first listb) (cons (first lista) acc)))
(or lista listb)
(progn (print lista) (print listb) (print acc)
(print "error: unmatched interleave arguments"))
t (reverse acc)))
(defun interleave (lista listb)
(interleave0 lista listb nil))
(defun make-token (in-string start end acc)
(if (equal? start end)
acc
(cons (substr in-string start end) acc)))
(print "tokenize")
(defun tokenize (in-string tok-start idx acc state)
(if (char-at in-string idx)
(cond
; detect end of comment
(and (equal? state "comment") (equal? (char-at in-string idx) "\n"))
(tokenize in-string (inc idx) (inc idx) acc nil)
; ignore all characters in comment
(equal? state "comment")
(tokenize in-string (inc idx) (inc idx) acc state)
; detect start of comment
(and (equal? (char-at in-string idx) ";")
(not (equal? state "quote")))
(tokenize in-string (inc idx) (inc idx) acc "comment")
; end of comment
(and (equal? state "quote")
(equal? (char-at in-string idx) "\""))
(tokenize in-string (inc idx) (inc idx)
(make-token in-string tok-start (inc idx) acc) nil)
; continue quote
(equal? state "quote")
(if (and (equal? (char-at in-string idx) "\\")
(or (equal? (char-at in-string (inc idx)) "n")
(equal? (char-at in-string (inc idx)) "\\")
(equal? (char-at in-string (inc idx)) "\"")))
(tokenize in-string tok-start (inc (inc idx)) acc "quote")
(tokenize in-string tok-start (inc idx) acc "quote"))
; start of comment
(equal? (char-at in-string idx) "\"")
(tokenize in-string tok-start (inc idx) acc "quote")
; ignore whitespace
(whitespace? (char-at in-string idx))
(tokenize in-string (inc idx) (inc idx)
(make-token in-string tok-start idx acc) state)
; left paren
(equal? (char-at in-string idx) "(")
(tokenize in-string (inc idx) (inc idx)
(cons "(" (make-token in-string tok-start idx acc)) state)
; right paren
(equal? (char-at in-string idx) ")")
(tokenize in-string (inc idx) (inc idx)
(cons ")" (make-token in-string tok-start idx acc)) state)
t (tokenize in-string tok-start (inc idx) acc state))
(reverse acc)))
;; hacky way of forward defining functions for mutual recursion
(insert-method "read-list" "Lateral" "read-list" 2)
(defun read-form (token-list)
(if token-list
(if (equal? (first token-list) "(")
(read-list (rest token-list) nil)
(list (read-atom (first token-list))
(rest token-list)))))
(defun readForm (token-list)
(read-form token-list))
(defun read-list (token-list acc)
(if (equal? (first token-list) ")")
(list (reverse acc) (rest token-list))
(let (res-and-tokens (read-form token-list)
result (first res-and-tokens)
new-tokens-list (second res-and-tokens))
(if res-and-tokens
(read-list new-tokens-list
(cons result acc))
(list acc nil)))))
(defun read ()
(let (_ (pprint "user> ")
form (read-form (tokenize (readline) 0 0 nil nil)))
(first form)))
(insert-method "apply" "Lateral" "apply" 2)
(defun apply-progn (exprs env)
(if (rest exprs)
(progn
(apply (first exprs) env)
(apply-progn (rest exprs) env))
(apply (first exprs) env)))
;; TODO: check for even number of val/bindings
(defun let-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (apply (second exprs) env))
(let-bind (rest (rest exprs)) env))
env))
;; TODO: check for even number of val/bindings
(defun apply-cond (exprs env)
(cond
(not exprs) nil
(apply (first exprs) env) (apply (second exprs) env)
t (apply-cond (rest (rest exprs)) env)))
(defun apply-and (exprs env)
(cond
(not exprs) t
(apply (first exprs) env) (apply-and (rest exprs) env)
t nil))
(defun apply-or (exprs env)
(cond
(not exprs) nil
(apply (first exprs) env) t
t (apply-or (rest exprs) env)))
;; TODO: check for even number of val/bindings
(defun lambda-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (second exprs))
(lambda-bind (rest (rest exprs)) env));)
env))
(defun lambda-apply (func args env)
(let (;_ (print func)
;_ (print args)
sym-binds (interleave (get-args func) args)
bind-envir (lambda-bind sym-binds (make-envir env)))
(apply (get-expr func) bind-envir)))
(defun macro-call? (ast env)
(and (list? ast)
(contains? env (first ast))
(macro? (first (get env (first ast))))))
(defun macro-expand (ast env)
(if (macro-call? ast env)
(macro-expand
(lambda-apply (first (get env (first ast))) (rest ast) env)
env)
ast))
(defun eval (ast env acc)
(cond
(not ast) (reverse acc)
(symbol? ast) (first (get env ast))
(not (list? ast)) ast
t (eval (rest ast) env (cons (apply (first ast) env) acc))))
(defun apply (ast env)
(cond
(not ast) nil
(macro-call? ast env)
(apply (macro-expand ast env) env)
(not (list? ast)) (eval ast env nil)
;; TODO: throw instead of print errors
;; if
(equal? (first ast) (quote if))
(cond
(apply (second ast) env) (apply (nth 2 ast) env)
(= (length ast) 4) (apply (nth 3 ast) env)
(= (length ast) 3) nil
t (print "if expects two or three arguments"))
;; quote
(equal? (first ast) (quote quote))
(if (= (length ast) 2)
(second ast)
(print "quote expects one argument"))
;; def
(equal? (first ast) (quote def))
(if (= (length ast) 3)
(let (val (apply (nth 2 ast) env))
(progn
(insert! (user-envir) (second ast) val)
val))
(print "def expects two arguments"))
;; progn
(equal? (first ast) (quote progn))
(apply-progn (rest ast) env)
;; let
(equal? (first ast) (quote let))
(let (bind-envir (let-bind (second ast) (make-envir env)))
(if (= (length ast) 3)
(apply (nth 2 ast) bind-envir)
(print "let expects two arguments")))
;; defmacro
(equal? (first ast) (quote defmacro))
(if (= (length ast) 4)
(let (val (make-macro (nth 2 ast) (nth 3 ast)))
(progn
(insert! env (second ast) val)
val))
(print "defmacro expects four arguments"))
;; lambda
(equal? (first ast) (quote lambda))
(if (= (length ast) 3)
(make-lambda (second ast) (nth 2 ast))
(print "lambda expects two arguments"))
;; cond
(equal? (first ast) (quote cond))
(apply-cond (rest ast) env)
;; and
(equal? (first ast) (quote and))
(apply-and (rest ast) env)
;; or
(equal? (first ast) (quote or))
(apply-or (rest ast) env)
t
(let (eval-list (eval ast env nil)
func (first eval-list))
(cond
(native-fn? func) (native-invoke func (rest eval-list))
(lambda? func) (lambda-apply func (rest eval-list) env)
t (progn (print "error: ") (print func) (print "isn't function"))))))
(defun main ()
(progn
(print (apply (read) (user-envir)))
(main)))
| 7,933 | Common Lisp | .lisp | 233 | 27.987124 | 77 | 0.596434 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | ec8c640c838d2029a172e5fc4735b3799cf982be6c08e44cc419ef64b9dad351 | 16,230 | [
-1
] |
16,231 | jvmtable.lisp | davidsun0_lateral/interpreter/old/jvm/jvmtable.lisp | (def *bytecodes* (hashmap))
(insert! *bytecodes* :aconst_null 0x01)
(insert! *bytecodes* :ldc 0x12)
(insert! *bytecodes* :ldc_w 0x13)
(insert! *bytecodes* :aload 0x19)
(insert! *bytecodes* :astore 0x3A)
(insert! *bytecodes* :pop 0x57)
(insert! *bytecodes* :dup 0x59)
(insert! *bytecodes* :goto 0xA7)
(insert! *bytecodes* :areturn 0xB0)
(insert! *bytecodes* :return 0xB1)
(insert! *bytecodes* :getstatic 0xB2)
(insert! *bytecodes* :invokevirtual 0xB6)
(insert! *bytecodes* :invokestatic 0xB8)
(insert! *bytecodes* :checkcast 0xC0)
(insert! *bytecodes* :ifnull 0xC6)
(insert! *bytecodes* :ifnonnull 0xC7)
;; core method list
(def method-list (hashmap))
(defun method-type (argc)
(->> (list ")Ljava/lang/Object;")
(repeat0 "Ljava/lang/Object;" argc)
(cons "(")
(apply string)))
(defun insert-method (sym class name argc)
(insert! method-list sym
(list class name (method-type argc))))
;(defmacro reduce-method (sym)
; `(lambda (ml n)
; (repeat (dec n)
; (funcall-resolve
; ml
; (list :funcall ,sym :argc 2)))))
(insert-method "first" "Lang" "car" 1)
(insert-method "rest" "Lang" "cdr" 1)
(insert-method "cons0" "Lang" "cons0" 2)
(insert! method-list "cons"
(lambda (ml n)
(repeat (funcall-resolve
ml
(list :funcall (quote cons0) :argc 2))
(dec n))))
(insert! method-list "list"
(lambda (ml n)
(cons (list :aconst_null)
(funcall-resolve
ml
(list :funcall (quote cons) :argc (inc n))))))
(insert-method "add0" "Lang" "add0" 2)
(insert! method-list "+"
(lambda (ml n)
(repeat (funcall-resolve
ml
(list :funcall (quote add0) :argc 2))
(dec n))))
(insert-method "subtract0" "Lang" "subtract0" 2)
(insert! method-list "-"
(lambda (ml n)
(repeat (funcall-resolve
ml
(list :funcall (quote subtract0) :argc 2))
(dec n))))
(insert-method "contains?" "Lang" "contains_p" 2)
(insert-method "equal?" "Lang" "equal_p" 2)
(insert-method "char" "Lang" "to_char" 1)
(insert-method "char-at" "Lang" "char_at" 2)
(insert-method "substr" "Lang" "substr" 3)
(insert-method "whitespace?" "Lang" "whitespace_p" 1)
(insert-method "pprint0" "Lang" "pprint0" 1)
(insert-method "print0" "Lang" "print0" 1)
(insert-method "=" "Lang" "isNumericallyEqual" 2)
(insert-method "<" "Lang" "less_than0" 2)
(insert-method "//" "Lang" "divide" 2)
(insert-method "slurp" "Lang" "slurp" 1)
(insert-method "readline" "Lang" "readLine" 0)
(insert-method "read-atom0" "Helper" "readAtom" 1)
(insert-method "make-lambda" "Lang" "lambda" 2)
(insert-method "make-macro" "Lang" "macro" 2)
(insert-method "make-envir" "Lang" "make_envir" 1)
(insert-method "user-envir" "Runtime" "getUserEnvir" 0)
(insert-method "envir-set" "Runtime" "envir_set" 2)
(insert-method "envir-get" "Runtime" "envir_get" 1)
(insert-method "native-invoke" "Lang" "nativeInvoke" 2)
(insert-method "list?" "Lang" "list_p" 1)
(insert-method "symbol?" "Lang" "symbol_p" 1)
(insert-method "lambda?" "Lang" "lambda_p" 1)
(insert-method "native-fn?" "Lang" "native_p" 1)
(insert-method "macro?" "Lang" "macro_p" 1)
; TODO: convert java functions to variadic args
(insert-method "string0" "Lang" "string0" 1)
(insert-method "symbol" "Lang" "symbol" 1)
(insert-method "insert!" "Lang" "insert_b" 3)
(insert-method "get0" "Lang" "get0" 2)
(insert-method "get-args" "Lang" "get_args" 1)
(insert-method "get-expr" "Lang" "get_expr" 1)
| 3,680 | Common Lisp | .lisp | 95 | 33.673684 | 65 | 0.620428 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 642272176909e946144777d0056fb07a4a31fbf01eea445ff625e3e658841288 | 16,231 | [
-1
] |
16,232 | ir.lisp | davidsun0_lateral/interpreter/old/jvm/ir.lisp | ;; expands macros, part1
(defun ast-analysis0 (in)
(if (list? in)
(ast-analysis1 in nil)
in))
;; expands macros, part2
(defun ast-analysis1 (in acc)
(cond
(nil? in) (reverse acc)
(and (nil? acc) (contains? macros (first in)))
(ast-analysis0 (macro-expand (get macros nil) in))
t (ast-analysis1 (rest in) (cons (ast-analysis0 (first in)) acc))))
;; extracts lambdas
(defun lambda-extr0 (in lambdas)
(if (list? in)
(lambda-extr1 in nil nil)
(list in nil)))
;; extracts lambdas, part2
(defun lambda-extr1 (in acc lambdas)
(cond
(nil? in) (cons (reverse acc) lambdas)
(and (nil? acc) (equal? (quote quote) (first in))) (list in)
(and (nil? acc) (equal? (quote lambda) (first in)))
(let (l-name (gensym "lambda"))
;; TODO: handle nested lambdas
(cons l-name (cons l-name (rest in)) lambdas))
t
(let (e-l (lambda-extr0 (first in) nil)
expr (first e-l)
lamb (second e-l))
(lambda-extr1 (rest in)
(cons expr acc)
(if (nil? lamb)
lambdas
(cons lamb lambdas))))))
;;; reduces a tree to a list of lists
(defun semi-flatten0 (in acc)
(cond
(nil? in) acc
(and (list? (first in)) (list? (first (first in))))
(semi-flatten0 (rest in) (semi-flatten0 (first in) acc))
t (semi-flatten0 (rest in) (cons (first in) acc))))
(defun semi-flatten (in)
(reverse (semi-flatten0 in nil)))
;; macro for x-deflate
;`(defun ,fname (name args largs expr acc ,@(vars))
; (if expr
; (,fname name args largs
; ,expr-mod
; ,acc-mod
; ,@(vars-mod))
; (cons ,acc-add acc)))
(defun progn-deflate (name args largs expr acc)
(if expr
(progn-deflate
name args largs
(rest expr)
(cons
(list
(if (rest expr)
(list :pop)
(cons nil nil))
(ir0 (if (rest expr) nil name)
args largs
(first expr) nil))
acc))
acc))
(defun or-deflate (name args largs end-lab expr acc)
(if expr
(or-deflate name args largs end-lab
(rest expr)
(cons
(list (list :pop)
(list :jump-not-nil end-lab)
(list :dup)
(ir0 nil args largs (first expr) nil))
acc))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil))
acc)))
(defun and-deflate (name args largs false-lab expr acc)
(if expr
(and-deflate name args largs
false-lab
(rest expr)
(cons (list (if (rest expr)
(list :jump-if-nil false-lab)
(cons nil nil))
(ir0 nil args largs (first expr) nil))
acc))
(let (end-lab (gensym "and-e"))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil)
(list :label false-lab)
(list :goto end-lab))
acc))))
(defun cond-deflate (name args largs expr test-lab end-lab acc)
(if expr
(let (test (first expr)
branch (second expr)
next-lab (gensym "cond-"))
(cond-deflate name args largs
(rest (rest expr)) next-lab end-lab
(cons (list (if name
(cons nil nil)
(list :goto end-lab))
(ir0 name args largs branch nil)
(list :jump-if-nil next-lab)
(ir0 nil args largs test nil)
(if test-lab
(list :label test-lab)
(cons nil nil)))
acc)))
(cons (list (if name
(list :return)
(list nil))
(list :label end-lab)
(list :push :nil)
(list :label test-lab))
acc)))
(defun let-deflate0 (args largs bind-list acc)
(if bind-list
(let (largs (if (list-contains? largs (first bind-list))
largs
(append largs (first bind-list))))
(let-deflate0 args
largs
(rest (rest bind-list))
(cons (list :store (+ (length args) (index (first bind-list) largs)))
(ir0 nil args largs (second bind-list) nil)
acc)))
(list largs acc)))
(defun let-deflate (name args largs expr)
(let (x (let-deflate0 args largs (first expr) nil)
largs (first x)
bind-ir (second x))
(list
(list :let-pop (gensym "letp") (length args))
(ir0 name args largs (second expr) nil)
(list :local-count (gensym "letc") (+ (length args) (length largs)))
bind-ir)))
;; iterates along list, resolving nested lists with ir0
(defun ir1 (args largs ast acc)
(cond
(nil? ast) acc
(list? (first ast))
(ir1 args largs (rest ast)
(concat (ir0 nil args largs (first ast) nil) acc))
t
(ir1 args largs (rest ast)
(cons
(if (symbol? (first ast))
(cond
(equal? (first ast) (quote nil)) (list :push :nil)
(equal? (first ast) (quote t)) (list :push :true)
(index (first ast) largs)
(list :push :arg-num (+ (length args) (index (first ast) largs)))
(index (first ast) args)
(list :push :arg-num (index (first ast) args))
t
(list (list :funcall :envir-get :argc 1)
(list :push :symbol (first ast))))
(list
:push
(cond
(int? (first ast)) :int-const
(string? (first ast)) :str-const
(keyword? (first ast)) :keyword
(equal? (first ast) (quote t)) :true
(equal? (first ast) (quote nil)) :nil
t :unknown)
(first ast)))
acc))))
;; first step in code processing
;; turns a tree of lisp code into a stack-based intermediate representation
;; name doubles as a flag for if the expression is in the tail position
(defun ir0 (name args largs ast acc)
(cond
(nil? ast) (reverse acc)
(not (list? ast))
(list (if name (list :return) (list nil))
(ir1 args largs (list ast) nil))
(equal? (first ast) (quote if))
(let (false-label (gensym "if-f")
end-label (gensym "if-e"))
(list
(if (not name) (list :label end-label) (cons nil nil))
(if (= (length ast) 4)
;; has an else branch
(ir0 name args largs (nth 3 ast) nil)
;; no else branch
(list (if name
(list :return)
(cons nil nil))
(list :push :nil)))
(list :label false-label)
(if (nil? name)
(list :goto end-label)
(list nil))
(ir0 name args largs (third ast) nil)
(list :jump-if-nil false-label)
(ir0 nil args largs (second ast) nil)))
(equal? (first ast) (quote and))
(and-deflate name args largs (gensym "and-f") (rest ast) nil)
(equal? (first ast) (quote or))
(or-deflate name args largs (gensym "or-e") (rest ast) nil)
(equal? (first ast) (quote cond))
(cond-deflate name args largs (rest ast) nil (gensym "cond-e") nil)
(equal? (first ast) (quote progn))
(progn-deflate name args largs (rest ast) nil)
(equal? (first ast) (quote let))
(let-deflate name (concat args largs) nil (rest ast))
(equal? (first ast) (quote quote))
;(list (list :push :quote (second ast)))
(list (if name (list :return) (list nil))
(list :push :symbol (second ast)))
(equal? (first ast) (quote lambda))
(list (list :lambda ast))
;; TODO: check arg is symbol
(equal? (first ast) (quote def))
(list (if name (list :return) (list nil))
(list :funcall :envir-set :argc 2)
(ir0 nil args largs (third ast) nil)
(list :push :symbol (second ast)))
(equal? (first ast) name)
(cons (list :tail-recur :argc (dec (length ast)))
(ir1 args largs (rest ast) nil))
name (cons (list :return) (ir0 nil args largs ast acc))
(or (index (first ast) args)
(index (first ast) largs))
(cons (list :dynamcall :argc (length ast))
(ir1 args largs ast nil))
t
(cons (list :funcall (first ast) :argc (dec (length ast)))
(ir1 args largs (rest ast) nil))))
(defun ir (name args ast)
; remove '(nil) generated in ir0
(filter first
(reverse (semi-flatten (ir0 name args nil ast nil)))))
| 9,016 | Common Lisp | .lisp | 245 | 26.457143 | 87 | 0.515978 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 78df30517042f897502dd6d0aeb383d6c70ca084975d1b32cc4646878f5b1b19 | 16,232 | [
-1
] |
16,233 | omni.lisp | davidsun0_lateral/interpreter/old/jvm/omni.lisp | (def *gensym-count* 0)
(defun gensym (:rest prefix)
(->> (inc *gensym-count*)
(def *gensym-count*)
(string (if prefix
(first prefix)
"gsym"))
(symbol)))
;; clojure threading macros
(defun ->0 (exprs acc)
(if exprs
(->0 (rest exprs)
(cons (first (first exprs))
acc
(rest (first exprs))))
acc))
(defun ->>0 (exprs acc)
(if exprs
(->>0 (rest exprs) (append (first exprs) acc))
acc))
(defmacro -> (:rest exprs)
(->0 (rest exprs) (first exprs)))
(defmacro ->> (:rest exprs)
(->>0 (rest exprs) (first exprs)))
;; convinience macros
(defun case0 (term exprs acc)
(cond
(not exprs) (reverse acc)
(nil? (rest exprs)) (reverse (cons (first exprs) t acc))
t (case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote equal?) (first exprs) term)
acc)))))
(defun case0 (term exprs acc)
(cond
(not exprs) (reverse acc)
;; append else clause
(nil? (rest exprs)) (reverse (cons (first exprs) t acc))
;; list to match
(list? (first exprs))
(case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote index)
(list (quote quote) (first exprs))
term)
acc)))
;; single term
t (case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote equal?) (first exprs) term)
acc)))))
;; TODO: wrap in let and only eval term once
(defun case1 (terms)
(let (val (gensym))
(list (quote let)
(list val (first terms))
(cons (quote cond)
(case0 val
(rest terms)
nil)))))
(defmacro case (:rest terms)
(case1 terms))
;; basic utilities
(defun not (p)
(if p nil t))
(defun nil? (p)
(if p nil t))
(defun inc (n)
(+ n 1))
(defun dec (n)
(- n 1))
(defun print1 (objs)
(if objs
(progn
(print0 (first objs))
(pprint0 " ")
(print1 (rest objs)))))
(defun print (:rest args)
(progn
(print1 args)
(pprint0 "\n")))
(defun pprint1 (objs)
(if objs
(progn
(pprint0 (first objs))
(pprint0 " ")
(print1 (rest objs)))))
(defun pprint (:rest args)
(progn
(pprint1 args)
(pprint0 "\n")))
;(defun print (:rest args)
; (progn
; (map (lambda (x) (progn (print0 x) (pprint0 " "))) args)
; (pprint0 "\n")))
;(defun pprint (:rest args)
; (progn
; (map (lambda (x) (progn (pprint0 x) (pprint0 " "))) args)
; (pprint0 "\n")))
(defun get (hmap key :rest missing)
(cond
(nil? missing) (get0 hmap key)
(second (get0 hmap key)) (first (get0 hmap key))
t (first missing)))
(defun map0 (fn in acc)
(if in
(map0 fn
(rest in)
(cons (fn (first in)) acc))
acc))
(defun map (fn in)
(reverse (map0 fn in nil)))
;(defun apply (fun args)
; (eval (cons fun (map (lambda (x) (list (quote quote) x)) args))))
(defun reduce0 (fn in acc)
(if in
(reduce0 fn
(rest in)
(fn acc (first in)))
acc))
(defun reduce (fn in)
(reduce0 fn
(rest (rest in))
(fn (first in) (nth 1 in))))
(defun filter0 (pred in acc)
(cond
(not in) acc
(pred (first in)) (filter0 pred (rest in) (cons (first in) acc))
t (filter0 pred (rest in) acc)))
(defun filter (pred in)
(reverse (filter0 pred in nil)))
;; list functions
(defun second (in)
(first (rest in)))
(defun third (in)
(first (rest (rest in))))
(defun length0 (in acc)
(if in
(length0 (rest in) (inc acc))
acc))
;(defun length (in)
; (if (string? in)
; (length0 (to-chars in) 0)
; (length0 in 0)))
(defun length (in)
(length0 in nil))
(defun append0 (in obj acc)
(if in
(append0 (rest in) obj (cons (first in) acc))
(cons obj acc)))
(defun append (in obj)
(reverse (append0 in obj nil)))
(defun nth (n in)
(if (= n 0)
(first in)
(nth (dec n) (rest in))))
(defun last (in)
(if (rest in)
(last (rest in))
(first in)))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons0 (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
(defun concat (a b)
(reverse0 (reverse a) b))
(defun index0 (needle haystack acc)
(if haystack
(if (equal? needle (first haystack))
acc
(index0 needle (rest haystack) (inc acc)))))
(defun index (needle haystack)
(index0 needle haystack 0))
(defun repeat0 (key times acc)
(if (< times 1)
acc
(repeat0 key (dec times) (cons key acc))))
(defun repeat (key times)
(repeat0 key times nil))
;; use native flatten instead
(defun flatten0 (tree acc)
(cond
(nil? tree) acc
(not (list? tree)) tree
(list? (first tree)) (flatten0 (rest tree) (flatten0 (first tree) acc))
t (flatten0 (rest tree) (cons (first tree) acc))))
(defun flatten (tree)
(reverse (flatten0 tree nil)))
(defun split0 (lst n acc)
(if (> n 0)
(split0 (rest lst) (dec n) (cons (first lst) acc))
(list (reverse acc) lst)))
(defun msort0 (comp a b acc)
(cond
(and (nil? a) (nil? b)) (reverse acc)
(nil? b) (msort0 comp (rest a) b (cons (first a) acc))
(nil? a) (msort0 comp a (rest b) (cons (first b) acc))
(comp (first a) (first b)) (msort0 comp (rest a) b (cons (first a) acc))
t (msort0 comp a (rest b) (cons (first b) acc))))
(defun msort (comp in)
(let (len (length in)
halves (split0 in (// len 2) nil))
(if (<= len 1)
in
(msort0 comp
(msort comp (first halves))
(msort comp (second halves))
nil))))
(defun > (a b) (not (or (= a b) (< a b))))
(defun <= (a b) (or (< a b) (= a b)))
(defun >= (a b) (or (> a b) (= a b)))
(defun to-chars0 (s i acc)
(if (char-at s i)
(to-chars0 s (inc i) (cons (char-at s i) acc))
(reverse acc)))
(defun to-chars (s)
(to-chars0 s 0 nil))
(defun string (:rest l)
(string0 l))
(def *read-pos* 0)
(def *read-tail* 0)
(def *read-str* nil)
(defun r-peek (off)
(if *read-str*
(char-at *read-str* (+ *read-pos* off))))
(defun r-next! ()
(let (x (r-peek 0))
(progn
(def *read-pos* (inc *read-pos*))
x)))
(defun r-get ()
(substr *read-str* *read-tail* *read-pos*))
(defun wait-for (ch)
(let (x (r-peek 0))
(cond
(nil? x) nil
(equal? x ch) ch
t (progn (r-next!) (wait-for ch)))))
(defun read-atom1 (state)
(let (ch (r-peek 0))
(cond
(equal? state :string)
(cond
(nil? ch) (print "unexpected EOF in string")
(and (equal? ch "\\")
(or (equal? (r-peek 1) "\"")
(equal? (r-peek 1) "n")
(equal? (r-peek 1) "\\")))
(progn (r-next!) (r-next!) (read-atom1 state))
(equal? ch "\"")
(progn (r-next!) (read-atom0 (r-get)))
t (progn (r-next!) (read-atom1 state)))
(or (nil? ch) (equal? ch ")") (whitespace? ch) (equal? ch "\n"))
(read-atom0 (r-get))
t (progn (r-next!) (read-atom1 state)))))
(defun read-atom ()
(let (ch (r-peek 0))
(cond
(equal? ch "\"") (progn (r-next!) (read-atom1 :string))
t (read-atom1 nil))))
(defun read-form ()
(let (ch (r-peek 0))
(cond
(nil? ch) nil
(whitespace? ch) (progn (r-next!) (read-form))
(equal? ch ";") (progn (wait-for "\n") (read-form))
(equal? ch "'") (progn (r-next!) (list (quote quote) (read-form)))
(equal? ch "(") (progn (r-next!) (read-list nil))
(equal? ch ")") (print "unexpected )")
t (progn (def *read-tail* *read-pos*) (read-atom)))))
(defun read-list (acc)
(let (ch (r-peek 0))
(cond
(nil? ch) (print "unexpected eof")
(equal? ch ")") (progn (r-next!) (reverse acc))
t (read-list (cons (read-form) acc)))))
(defun read (str)
(progn
(if str
(progn
(def *read-str* str)
(def *read-pos* 0)))
(read-form)))
(defun read-all0 (acc)
(let (sexpr (read nil))
(if sexpr
(read-all0 (cons sexpr acc))
(reverse acc))))
(defun read-all (path)
(read-all0 (list (read (slurp path)))))
(defun interleave0 (lista listb acc)
(cond
(equal? :rest (first lista))
(reverse (cons listb (cons (second lista) acc)))
(and lista listb)
(interleave0 (rest lista) (rest listb)
(cons (first listb) (cons (first lista) acc)))
(or lista listb)
(progn (print lista) (print listb) (print acc)
(print "error: unmatched interleave arguments"))
t (reverse acc)))
(defun interleave (lista listb)
(interleave0 lista listb nil))
(defun apply-progn (exprs env)
(if (rest exprs)
(progn
(apply (first exprs) env)
(apply-progn (rest exprs) env))
(apply (first exprs) env)))
;; TODO: check for even number of val/bindings
(defun let-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (apply (second exprs) env))
(let-bind (rest (rest exprs)) env))
env))
;; TODO: check for even number of val/bindings
(defun apply-cond (exprs env)
(cond
(not exprs) nil
(apply (first exprs) env) (apply (second exprs) env)
t (apply-cond (rest (rest exprs)) env)))
(defun apply-and (exprs env)
(cond
(not exprs) t
(apply (first exprs) env) (apply-and (rest exprs) env)
t nil))
(defun apply-or (exprs env)
(cond
(not exprs) nil
(apply (first exprs) env) t
t (apply-or (rest exprs) env)))
;; TODO: check for even number of val/bindings
(defun lambda-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (second exprs))
(lambda-bind (rest (rest exprs)) env));)
env))
(defun lambda-apply (func args env)
(let (;_ (print func)
;_ (print args)
sym-binds (interleave (get-args func) args)
bind-envir (lambda-bind sym-binds (make-envir env)))
(apply (get-expr func) bind-envir)))
(defun macro-call? (ast env)
(and (list? ast)
(contains? env (first ast))
(macro? (first (get env (first ast))))))
(defun macro-expand (ast env)
(if (macro-call? ast env)
(macro-expand
(lambda-apply (first (get env (first ast))) (rest ast) env)
env)
ast))
(defun eval (ast env acc)
(cond
(not ast) (reverse acc)
(symbol? ast) (first (get env ast))
(not (list? ast)) ast
t (eval (rest ast) env (cons (apply (first ast) env) acc))))
(defun apply (ast env)
(cond
(not ast) nil
(macro-call? ast env)
(apply (macro-expand ast env) env)
(not (list? ast)) (eval ast env nil)
;; TODO: throw instead of print errors
;; if
(equal? (first ast) (quote if))
(cond
(apply (second ast) env) (apply (nth 2 ast) env)
(= (length ast) 4) (apply (nth 3 ast) env)
(= (length ast) 3) nil
t (print "if expects two or three arguments"))
;; quote
(equal? (first ast) (quote quote))
(if (= (length ast) 2)
(second ast)
(print "quote expects one argument"))
;; def
(equal? (first ast) (quote def))
(if (= (length ast) 3)
(let (val (apply (nth 2 ast) env))
(progn
(insert! (user-envir) (second ast) val)
val))
(print "def expects two arguments"))
;; progn
(equal? (first ast) (quote progn))
(apply-progn (rest ast) env)
;; let
(equal? (first ast) (quote let))
(let (bind-envir (let-bind (second ast) (make-envir env)))
(if (= (length ast) 3)
(apply (nth 2 ast) bind-envir)
(print "let expects two arguments")))
;; defmacro
(equal? (first ast) (quote defmacro))
(if (= (length ast) 4)
(let (val (make-macro (nth 2 ast) (nth 3 ast)))
(progn
(insert! env (second ast) val)
val))
(print "defmacro expects four arguments"))
;; lambda
(equal? (first ast) (quote lambda))
(if (= (length ast) 3)
(make-lambda (second ast) (nth 2 ast))
(print "lambda expects two arguments"))
;; cond
(equal? (first ast) (quote cond))
(apply-cond (rest ast) env)
;; and
(equal? (first ast) (quote and))
(apply-and (rest ast) env)
;; or
(equal? (first ast) (quote or))
(apply-or (rest ast) env)
t
(let (eval-list (eval ast env nil))
(cond
(native-fn? func) (native-invoke func args)
(lambda? func) (lambda-apply func args env)
t (print "error: " func " is not a function")))))
(defun invoke (func args)
(cond
(native-fn? func) (native-invoke func args)
(lambda? func) (lambda-apply func args (user-envir))
t (print "error: " func " is not a function")))
(defun main ()
(progn
(pprint "user>> ")
(print (apply (read (readline)) (user-envir)))
(main)))
| 12,872 | Common Lisp | .lisp | 440 | 23.793182 | 76 | 0.566068 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 0677badb065e9cc1241d10864e618de8be49ebcb0490be0e42f55fc29c44bed3 | 16,233 | [
-1
] |
16,234 | read.lisp | davidsun0_lateral/interpreter/old/jvm/read.lisp | (def *read-pos* 0)
(def *read-tail* 0)
(def *read-str* nil)
(defun r-peek (off)
(if *read-str*
(->> (+ *read-pos* off)
(char-at *read-str*))))
;(defun r-peek (off)
; (if *read-str*
; (char-at *read-str* (+ *read-pos* off))))
(defun r-next! ()
(let (x (r-peek 0))
(progn
(def *read-pos* (inc *read-pos*))
x)))
(defun r-get ()
(substr *read-str* *read-tail* *read-pos*))
(defun wait-for (ch)
(let (x (r-peek 0))
(cond
(nil? x) nil
(equal? x ch) ch
t (progn (r-next!) (wait-for ch)))))
(defun read-atom1 (state)
(let (ch (r-peek 0))
(cond
(equal? state :string)
(cond
(nil? ch) (print "unexpected EOF in string")
(and (equal? ch "\\")
(or (equal? (r-peek 1) "\"")
(equal? (r-peek 1) "n")
(equal? (r-peek 1) "\\")))
(progn (r-next!) (r-next!) (read-atom1 state))
(equal? ch "\"")
(progn (r-next!) (read-atom0 (r-get)))
t (progn (r-next!) (read-atom1 state)))
(or (nil? ch) (equal? ch ")") (whitespace? ch) (equal? ch "\n"))
(read-atom0 (r-get))
t (progn (r-next!) (read-atom1 state)))))
(defun read-atom ()
(let (ch (r-peek 0))
(cond
(equal? ch "\"") (progn (r-next!) (read-atom1 :string))
t (read-atom1 nil))))
(defun read-form ()
(let (ch (r-peek 0))
(cond
(nil? ch) nil
(whitespace? ch) (progn (r-next!) (read-form))
(equal? ch ";") (progn (wait-for "\n") (read-form))
(equal? ch "'") (progn (r-next!) (list (quote quote) (read-form)))
(equal? ch "(") (progn (r-next!) (read-list nil))
(equal? ch ")") (print "unexpected )")
t (progn (def *read-tail* *read-pos*) (read-atom)))))
(defun read-list (acc)
(let (ch (r-peek 0))
(cond
(nil? ch) (print "unexpected eof")
(whitespace? ch) (progn (r-next!) (read-list acc))
(equal? ch ")") (progn (r-next!) (reverse acc))
t (read-list (cons (read-form) acc)))))
(defun read (str)
(progn
(if str
(progn
(def *read-str* str)
(def *read-pos* 0)))
(read-form)))
(defun read-all0 (acc)
(let (sexpr (read nil))
(if sexpr
(read-all0 (cons sexpr acc))
(reverse acc))))
(defun read-all (path)
(read-all0 (list (read (slurp path)))))
(defun nil? (p)
(if p nil t))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons0 (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
| 2,485 | Common Lisp | .lisp | 84 | 24.22619 | 70 | 0.528047 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | afd71734dec872c4827d173b90f200b31de943d359460fb76fb0113163e7f32c | 16,234 | [
-1
] |
16,235 | lateral2.lisp | davidsun0_lateral/interpreter/old/jvm/lateral2.lisp | (defun not (p)
(if p nil t))
(defun nil? (p)
(if p nil t))
(defun inc (n)
(+ 1 n))
(defun dec (n)
(- n 1))
(defun second (lst)
(first (rest lst)))
(defun third (lst)
(first (rest (rest lst))))
(defun fourth (lst)
(first (rest (rest (rest lst)))))
(defun nth (n list)
(if (= n 0)
(first list)
(nth (dec n) (rest list))))
(defun length0 (list acc)
(if list
(length0 (rest list) (inc acc))
acc))
(defun length (list)
(length0 list 0))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons0 (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
;(defun cons (:rest l)
; (let (rl (reverse l))
; (reverse0 (rest rl) (first rl))))
(defun print1 (in)
(if in
(progn (print0 (first in))
(pprint0 " ")
(print1 (rest in)))
(pprint0 "\n")))
(defun print (:rest args)
(print1 args))
(defun pprint1 (in)
(if in
(progn (pprint0 (first in))
(pprint0 " ")
(print1 (rest in)))
(pprint0 "\n")))
(defun pprint (:rest args)
(pprint1 args))
(defun get (hmap key :rest missing)
(let (res (get0 hmap key))
(cond
(nil? missing) res
(second res) (first res)
t (first missing))))
(def *read-pos* 0)
(def *read-tail* 0)
(def *read-str* nil)
(defun r-peek (off)
(if *read-str*
(char-at *read-str* (+ *read-pos* off))))
(defun r-next! ()
(let (x (r-peek 0))
(progn
(def *read-pos* (inc *read-pos*))
x)))
(defun r-get ()
(substr *read-str* *read-tail* *read-pos*))
(defun wait-for (ch)
(let (x (r-peek 0))
(cond
(nil? x) nil
(equal? x ch) ch
t (progn (r-next!) (wait-for ch)))))
(defun read-atom1 (state)
(let (ch (r-peek 0))
(cond
(equal? state :string)
(cond
(nil? ch) (print "unexpected EOF in string")
(and (equal? ch "\\")
(or (equal? (r-peek 1) "\"")
(equal? (r-peek 1) "n")
(equal? (r-peek 1) "\\")))
(progn (r-next!) (r-next!) (read-atom1 state))
(equal? ch "\"")
(progn (r-next!) (read-atom0 (r-get)))
t (progn (r-next!) (read-atom1 state)))
(or (nil? ch) (equal? ch ")") (whitespace? ch) (equal? ch "\n"))
(read-atom0 (r-get))
t (progn (r-next!) (read-atom1 state)))))
(defun read-atom ()
(let (ch (r-peek 0))
(cond
(equal? ch "\"") (progn (r-next!) (read-atom1 :string))
t (read-atom1 nil))))
(defun read-form ()
(let (ch (r-peek 0))
(cond
(nil? ch) nil
(whitespace? ch) (progn (r-next!) (read-form))
(equal? ch ";") (progn (wait-for "\n") (read-form))
(equal? ch "'") (progn (r-next!) (list (quote quote) (read-form)))
(equal? ch "(") (progn (r-next!) (read-list nil))
(equal? ch ")") (print "unexpected )")
t (progn (def *read-tail* *read-pos*) (read-atom)))))
(defun read-list (acc)
(let (ch (r-peek 0))
(cond
(nil? ch) (print "unexpected EOF")
(whitespace? ch) (progn (r-next!) (read-list acc))
(equal? ch ";") (progn (wait-for "\n") (read-list acc))
(equal? ch ")") (progn (r-next!) (reverse acc))
t (read-list (cons (read-form) acc)))))
(defun read (str)
(progn
(if str
(progn
(def *read-str* str)
(def *read-pos* 0)))
(read-form)))
(defun read-all0 (acc)
(let (sexpr (read nil))
(if sexpr
(read-all0 (cons sexpr acc))
(reverse acc))))
(defun read-all (path)
(read-all0 (list (read (slurp path)))))
(defun interleave0 (lista listb acc)
(cond
(equal? :rest (first lista))
(reverse (cons listb (cons (second lista) acc)))
(and lista listb)
(interleave0 (rest lista) (rest listb)
(cons (first listb) (cons (first lista) acc)))
(or lista listb)
(progn (print lista) (print listb) (print acc)
(print "error: unmatched interleave arguments"))
t (reverse acc)))
(defun interleave (lista listb)
(interleave0 lista listb nil))
(defun apply-progn (exprs env)
(if (rest exprs)
(progn
(apply0 (first exprs) env)
(apply-progn (rest exprs) env))
(apply0 (first exprs) env)))
;; TODO: check for even number of val/bindings
(defun let-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (apply0 (second exprs) env))
(let-bind (rest (rest exprs)) env))
env))
;; TODO: check for even number of val/bindings
(defun apply-cond (exprs env)
(cond
(not exprs) nil
(apply0 (first exprs) env) (apply0 (second exprs) env)
t (apply-cond (rest (rest exprs)) env)))
(defun apply-and (exprs env)
(cond
(not exprs) t
(apply0 (first exprs) env) (apply-and (rest exprs) env)
t nil))
(defun apply-or (exprs env)
(cond
(not exprs) nil
(apply0 (first exprs) env) t
t (apply-or (rest exprs) env)))
;; TODO: check for even number of val/bindings
(defun lambda-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (second exprs))
(lambda-bind (rest (rest exprs)) env))
env))
(defun lambda-apply (func args env)
(let (sym-binds (interleave (get-args func) args)
bind-envir (lambda-bind sym-binds (make-envir env)))
(apply0 (get-expr func) bind-envir)))
(defun macro-call? (ast env)
(and (list? ast)
(contains? env (first ast))
(macro? (first (get env (first ast))))))
(defun macro-expand (ast env)
(if (macro-call? ast env)
(macro-expand
(lambda-apply (first (get env (first ast))) (rest ast) env)
env)
ast))
(defun eval0 (ast env acc)
(cond
(not ast) (reverse acc)
(symbol? ast) (first (get env ast))
(not (list? ast)) ast
t (eval0 (rest ast) env (cons (apply0 (first ast) env) acc))))
(defun apply0 (ast env)
(cond
(not ast) nil
(macro-call? ast env)
(apply0 (macro-expand ast env) env)
(not (list? ast)) (eval0 ast env nil)
;; TODO: throw instead of print errors
;; if
(equal? (first ast) (quote if))
(cond
(apply0 (second ast) env) (apply0 (third ast) env)
(= (length ast) 4) (apply0 (fourth ast) env)
(= (length ast) 3) nil
t (print "if expects two or three arguments"))
;; quote
(equal? (first ast) (quote quote))
(if (= (length ast) 2)
(second ast)
(print "quote expects one argument"))
;; def
(equal? (first ast) (quote def))
(if (= (length ast) 3)
(let (val (apply0 (third ast) env))
(progn
(insert! (user-envir) (second ast) val)
val))
(print "def expects two arguments"))
;; progn
(equal? (first ast) (quote progn))
(apply-progn (rest ast) env)
;; let
(equal? (first ast) (quote let))
(let (bind-envir (let-bind (second ast) (make-envir env)))
(if (= (length ast) 3)
(apply0 (third ast) bind-envir)
(print "let expects two arguments")))
;; defmacro
(equal? (first ast) (quote defmacro))
(if (= (length ast) 4)
(let (val (make-macro (third ast) (fourth ast)))
(progn
(insert! env (second ast) val)
val))
(print "defmacro expects four arguments"))
;; lambda
(equal? (first ast) (quote lambda))
(if (= (length ast) 3)
(make-lambda (second ast) (third ast))
(print "lambda expects two arguments"))
;; cond
(equal? (first ast) (quote cond))
(apply-cond (rest ast) env)
;; and
(equal? (first ast) (quote and))
(apply-and (rest ast) env)
;; or
(equal? (first ast) (quote or))
(apply-or (rest ast) env)
t
(let (eval-list (eval0 ast env nil)
func (first eval-list))
(cond
(native-fn? func) (native-invoke func (rest eval-list))
(lambda? func) (lambda-apply func (rest eval-list) env)
t (progn (print "error: ") (print func) (print "isn't function"))))))
(defun eval (ast)
(apply0 ast (user-envir)))
(defun include (path)
(eval (cons (quote progn) (read-all path))))
;(defun apply (fn args)
; (->> args
; (map (lambda (x) (list 'quote x)))
; (cons fun)
; (eval)))
(defun main ()
(progn
(pprint0 "user>> ")
(print (apply0 (read (readline)) (user-envir)))
(main)))
| 8,261 | Common Lisp | .lisp | 276 | 24.862319 | 77 | 0.571429 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 71613e7c7a96e17ab9aa549636ecef0e1f8c0c07a2bc4afcdfae96d224d498c2 | 16,235 | [
-1
] |
16,236 | compiler.lisp | davidsun0_lateral/interpreter/old/jvm/compiler.lisp | ;;; reduces a tree to a list of lists
(defun semi-flatten0 (in acc)
(if in
(if (and (list? (first in))
(list? (first (first in))))
(semi-flatten0 (rest in) (semi-flatten0 (first in) acc))
(semi-flatten0 (rest in) (cons (first in) acc)))
acc))
(defun semi-flatten (in)
(reverse (semi-flatten0 in nil)))
(defun progn-deflate (name expr acc)
(if expr
(progn-deflate
name
(rest expr)
(cons
(list
(if (rest expr)
(list :pop)
(cons nil nil))
(ir0 (if (rest expr) nil name)
(first expr) nil))
acc))
acc))
(defun or-deflate (name end-lab expr acc)
(if expr
(or-deflate name
end-lab
(rest expr)
(cons
(list (list :pop)
(list :jump-not-nil end-lab)
(list :dup)
(ir0 nil (first expr) nil))
acc))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push nil))
acc)))
(defun and-deflate (name false-lab expr acc)
(if expr
(and-deflate name
false-lab
(rest expr)
(cons (list (if (rest expr)
(list :jump-if-nil false-lab)
(cons nil nil))
(ir0 nil (first expr) nil))
acc))
(let (end-lab (gensym "and-e"))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push nil)
(list :label false-lab)
(list :goto end-lab))
acc))))
(defun cond-deflate (name expr test-lab end-lab acc)
(if expr
(let (test (first expr)
branch (second expr)
next-lab (gensym "cond-"))
(cond-deflate name (rest (rest expr)) next-lab end-lab
(cons (list (if name
(cons nil nil)
(list :goto end-lab))
(ir0 name branch nil)
(list :jump-if-nil next-lab)
(ir0 nil test nil)
(if test-lab
(list :label test-lab)
(cons nil nil)))
acc)))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push nil)
(list :label test-lab))
acc)))
(defun let-deflate0 (bind-list acc)
(if bind-list
(let-deflate0 (rest (rest bind-list))
(cons (list (list :let-set (first bind-list))
(ir0 nil (second bind-list) nil))
acc))
acc))
(defun let-deflate (name expr)
(list
(list :let-pop)
(ir0 name (second expr) nil)
(list :let-body)
(let-deflate0 (first expr) nil)
(list :let-bind)))
;; iterates along list, resolving nested lists with ir0
(defun ir1 (ast acc)
(if ast
(if (list? (first ast))
(ir1 (rest ast)
(concat (ir0 nil (first ast) nil) acc))
(ir1 (rest ast)
(cons (list :push (first ast)) acc)))
acc))
(defun ir (name ast)
(filter first
(reverse (semi-flatten (ir0 name ast nil)))))
;; first step in code processing
;; turns a tree of lisp code into a stack-based intermediate representation
;; name doubles as a flag for if the expression is in the tail position
(defun ir0 (name ast acc)
(cond
(nil? ast) (reverse acc)
(and (not (list? ast)) name) (list (list :return) (list :push ast))
(not (list? ast)) (list (list :push ast))
(equal? (first ast) (quote if))
(let (false-label (gensym "if-f")
end-label (if name (gensym "if-e")))
(list
(if (not name) (list :label end-label) (cons nil nil))
(if (= (length ast) 4)
;; has an else branch
(list (ir0 name (nth 3 ast) nil)
(if (not name)
(list :goto end-label)
(cons nil nil)))
;; no else branch
(list (if name
(list :return)
(cons nil nil))
(list :push nil)))
(list :label false-label)
(ir0 name (nth 2 ast) nil)
(list :jump-if-nil false-label)
(ir0 nil (nth 1 ast) nil)))
(equal? (first ast) (quote and))
(and-deflate name (gensym "and-f") (rest ast) nil)
(equal? (first ast) (quote or))
(or-deflate name (gensym "or-e") (rest ast) nil)
(equal? (first ast) (quote cond))
(cond-deflate name (rest ast) nil (gensym "cond-e") nil)
(equal? (first ast) (quote progn))
(progn-deflate name (rest ast) nil)
(equal? (first ast) (quote let))
(let-deflate name (rest ast))
(equal? (first ast) (quote quote))
;(list (list :push :quote (second ast)))
(list (list :push :symbol (second ast)))
(equal? (first ast) (quote def))
(progn (print "def deflate")
(cons (list :evir-store (second ast))
(ir0 nil (nth 2 ast) nil)))
(equal? (first ast) name)
(cons (list :tail-recur :argc (dec (length ast)))
(ir1 (rest ast) nil))
name (cons (list :return) (ir0 nil ast acc))
t
(cons (list :funcall (first ast) :argc (dec (length ast)))
(ir1 (rest ast) nil))))
;; arglist is local variables of the environment just outside the let expression
;; letlist is the local variables of the let expression
(defun resolve-syms0 (ir-list arglist letlist acc)
(if ir-list
(let (expr (first ir-list))
(cond
;; resolve symbols in inner let symbol
(equal? (first expr) :let-bind)
(let (ir-and-acc (resolve-syms0 (rest ir-list)
(concat arglist letlist)
nil
(cons (list :let-push) acc)))
(resolve-syms0 (first ir-and-acc) arglist nil (second ir-and-acc)))
;; storing a local variable in a let binding
(equal? (first expr) :let-set)
;; update letlist and get local var's index
(let (inlet? (index (nth 1 expr) letlist)
letlist (if inlet? letlist (append letlist (nth 1 expr)))
argidx (+ (length arglist)
(if inlet? inlet? (dec (length letlist)))))
(resolve-syms0
(rest ir-list)
arglist
letlist
;; store marker for number of local variables at current position
(cons (list :local-count
(gensym "letc")
(+ (length letlist) (length arglist)))
(cons (list :store :arg-num argidx) acc))))
;; ignore let-body
(equal? (first expr) :let-body)
(resolve-syms0 (rest ir-list) arglist letlist acc)
;; return (unprocessed-syms, processed-syms)
(equal? (first expr) :let-pop)
(list (rest ir-list) (cons (list :let-pop
(gensym "letp")
(length arglist))
acc))
t
(resolve-syms0
(rest ir-list)
arglist
letlist
(cons
(cond
(not (equal? :push (first expr))) expr
(or (equal? (nth 1 expr) (quote nil))
(nil? (nth 1 expr)))
(list :push :nil)
(equal? (nth 1 expr) (quote t)) (list :push :true)
(int? (nth 1 expr)) (list :push :int-const (nth 1 expr))
(char? (nth 1 expr)) (list :push :char-const (nth 1 expr))
(string? (nth 1 expr)) (list :push :str-const (nth 1 expr))
; be sure not to capture quoted symbols
(and (keyword? (nth 1 expr)) (= (length expr) 2))
(progn
(print "push keyword") (print expr)
(list :push :keyword (nth 1 expr)))
(symbol? (nth 1 expr))
(let (letidx (index (nth 1 expr) letlist)
idx (if letidx
(+ (length arglist) letidx)
(index (nth 1 expr) arglist)))
(if idx
(list :push :arg-num idx)
(list :push :envir-sym (nth 1 expr))))
t expr)
acc))))
(list :asdfasdf acc)))
(defun resolve-syms (ir-list arglist)
(let (a (resolve-syms0 ir-list arglist nil nil))
(reverse (second a))))
(defun resolve-syms2 (arglist ir-list)
(let (a (resolve-syms0 ir-list arglist nil nil))
(reverse (second a))))
| 8,991 | Common Lisp | .lisp | 236 | 25.771186 | 80 | 0.490239 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | d021069788399a9b74ddb7f766930f955230682a109a47602a0a9f042e6c99f1 | 16,236 | [
-1
] |
16,237 | jvmclass.lisp | davidsun0_lateral/interpreter/old/jvm/jvmclass.lisp | (include "compiler.lisp")
(def pool (hashmap))
(def pool-count 1)
(def pool-list nil)
(def method-list (hashmap))
(defun to-u1 (x)
(if (< x 0x100)
(list x)
(asdf "int too large for 1 byte")))
(defun to-u2 (x)
(if (or (< x 0xFFFF) (= x 0xFFFF))
(list (bit-and (bit-asr x 8) 0xFF)
(bit-and x 0xFF))
"int too large for 2 bytes"))
(defun to-u4 (x)
(concat (to-u2 (// x 0x10000))
(to-u2 (bit-and x 0xFFFF))))
(defun len1-attribs (const-list)
(to-u2 (nth 1 const-list)))
(defun len2-attribs (const-list)
(concat (to-u2 (nth 1 const-list))
(to-u2 (nth 2 const-list))))
(defun method-type (argc)
(apply string (cons "(" (repeat0 "Ljava/lang/Object;" argc
(list ")Ljava/lang/Object;")))))
; converts a human readable item in the constant pool to list of bytes
(defun const-to-bin (const-list)
(let (tag (first const-list))
(cond
(equal? tag :utf8)
(concat (cons 0x01 (to-u2 (length (nth 1 const-list))))
(map integer (to-chars (nth 1 const-list))))
(equal? tag :classref) (cons 0x07 (len1-attribs const-list))
(equal? tag :string) (cons 0x08 (len1-attribs const-list))
(equal? tag :fieldref) (cons 0x09 (len2-attribs const-list))
(equal? tag :methodref) (cons 0x0A (len2-attribs const-list))
(equal? tag :nametyperef) (cons 0x0C (len2-attribs const-list))
t (list :unknown const-list))))
(defun pool-search (constpool expr)
(let (temp (get constpool expr)
idx (first temp)
exists? (second temp))
(if exists?
idx
(progn
(insert! constpool expr pool-count)
(def pool-list (cons expr pool-list))
(def pool-count (inc pool-count))
(dec pool-count)))))
(defun pool-get (constpool expr)
(let (expr (if (string? expr) (list :utf8 expr) expr)
tag (first expr)
_ (print expr)
)
(cond
(equal? tag :utf8)
(pool-search constpool expr)
(or (equal? tag :classref) (equal? tag :string))
(pool-search
constpool
(list tag (pool-get constpool (second expr))))
(or (equal? tag :nametyperef)
(equal? tag :methodref)
(equal? tag :fieldref))
(pool-search
constpool
(list tag (pool-get constpool (second expr))
(pool-get constpool (nth 2 expr))))
t (progn (print "can't pool-get") (print expr)))))
(def method-list (hashmap))
(defun insert-method (sym class name argc)
(insert! method-list sym
(list class name (method-type argc))))
;(insert-method "first" "Lang" "first" 1)
(insert-method "first" "Lang" "car" 1)
;(insert-method "rest" "Lang" "rest" 1)
(insert-method "rest" "Lang" "cdr" 1)
(insert-method "cons" "Lang" "cons" 2)
;(insert! method-list "cons"
; (list "Lang" "cons" "(Ljava/lang/Object;Ljava/lang/Object;)LConsCell;"))
(insert-method "contains?" "Lang" "contains_p" 2)
(insert-method "equal?" "Lang" "equal_p" 2)
(insert-method "char" "Lang" "to_char" 1)
(insert-method "char-at" "Lang" "char_at" 2)
(insert-method "substr" "Lang" "substr" 3)
(insert-method "whitespace?" "Lang" "whitespace_p" 1)
(insert-method "pprint" "Lang" "pprint" 1)
(insert-method "println" "Lang" "println" 1)
(insert-method "print" "Lang" "println" 1)
(insert-method "dec" "Lang" "dec" 1)
(insert-method "inc" "Lang" "inc" 1)
(insert-method "=" "Lang" "isNumericallyEqual" 2)
(insert-method "readline" "Lang" "readLine" 0)
;(insert! method-list "readline" (list "Lang" "readLine" "()Ljava/lang/String;"))
;(insert-method "read-atom" "Lang" "readAtom" 1)
(insert-method "read-atom" "Helper" "readAtom" 1)
(insert-method "make-lambda" "Lang" "lambda" 2)
(insert-method "make-macro" "Lang" "macro" 2)
(insert-method "make-envir" "Lang" "make_envir" 1)
(insert-method "user-envir" "Runtime" "getUserEnvir" 0)
(insert-method "native-invoke" "Lang" "nativeInvoke" 2)
(insert-method "list?" "Lang" "list_p" 1)
(insert-method "symbol?" "Lang" "symbol_p" 1)
(insert-method "lambda?" "Lang" "lambda_p" 1)
(insert-method "native-fn?" "Lang" "native_p" 1)
(insert-method "macro?" "Lang" "macro_p" 1)
(insert-method "insert!" "Lang" "insert_b" 3)
(insert-method "get" "Lang" "get" 2)
(insert-method "get-args" "Lang" "get_args" 1)
(insert-method "get-expr" "Lang" "get_expr" 1)
(defun funcall-resolve (expr)
(let (name (string (second expr)) ; function name
ctype (get method-list name) ; call and exists
exists? (second ctype)
call (first ctype)
;_ (print (cons :asdf call))
;_ (if (equal? "println" name) (print (cons :asdf call)))
)
(cond
(equal? name "list") ;(print "ADFASDFASDF")
(cons (list :aconst_null)
(repeat0 (funcall-resolve (list :funcall (quote cons) :argc 2))
(nth 3 expr) nil))
exists? (cons :invokestatic call)
t (progn (print "can't find function:") (print name)))))
; generates code to store stack onto local args for tail recursion
(defun set-locals (n i acc)
(if (< n i)
acc
(set-locals n (inc i) (cons (list :astore i) acc))))
(defun ir-to-jvm (expr)
(let (cmd (first expr))
(cond
(equal? cmd :return)
(list :areturn)
(equal? cmd :push)
(cond
(equal? (nth 1 expr) :arg-num) (list :aload (nth 2 expr))
(equal? (nth 1 expr) :nil) (list :aconst_null)
(equal? (nth 1 expr) :true) (list :getstatic
"java/lang/Boolean"
"TRUE"
"Ljava/lang/Boolean;")
(equal? (nth 1 expr) :int-const)
(list (list :iconst (nth 2 expr))
(list :invokestatic "java/lang/Integer"
"valueOf" "(I)Ljava/lang/Integer;"))
(equal? (nth 1 expr) :char-const)
(list (list :iconst (integer (nth 2 expr)))
(list :invokestatic "java/lang/Character"
"valueOf" "(C)Ljava/lang/Character;"))
(equal? (nth 1 expr) :str-const)
(list :ldc (list :string (nth 2 expr)))
(equal? (nth 1 expr) :symbol)
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Symbol" "makeSymbol"
"(Ljava/lang/String;)LSymbol;"))
(equal? (nth 1 expr) :keyword)
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Keyword" "makeKeyword"
"(Ljava/lang/String;)LKeyword;"))
t (progn (print "can't push: ") (print expr)))
(equal? cmd :store)
(list :astore (nth 2 expr))
(equal? cmd :jump-if-nil)
(cons :ifnull (rest expr))
(equal? cmd :jump-not-nil)
(cons :ifnonnull (rest expr))
; defer to jump resolution
(equal? cmd :label) expr
(equal? cmd :goto) expr
(equal? cmd :funcall)
(funcall-resolve expr)
(equal? cmd :tail-recur)
(set-locals (dec (nth 2 expr)) 0 (list (list :goto :start)))
t expr)))
; calculates max stack size and size of stack at jump targets
(defun max-stack2 (in argc s-max s-curr l-max l-curr lablist)
(if in
(let (expr (first in)
cmd (first expr)
;_ (print s-curr)
;_ (print expr)
;_ (print lablist)
s-max (if (< s-max s-curr) s-curr s-max)
l-max (if (< l-max l-curr) l-curr l-max))
(cond
(equal? cmd :local-count)
(max-stack2 (rest in) argc s-max s-curr l-max (nth 2 expr)
(insert! lablist (second expr)
(list s-curr (nth 2 expr))))
; pops the let environment, ir contains new number of locals
(equal? cmd :let-pop)
(max-stack2 (rest in) argc s-max s-curr l-max (nth 2 expr) lablist)
;(progn (print "") (print expr)
;(max-stack2 (rest in) s-max s-curr l-max (nth 2 expr)
; (insert! lablist (second expr)
; (list s-curr (nth 2 expr)))))
(or (equal? cmd :push) (equal? cmd :dup))
(max-stack2 (rest in) argc s-max (inc s-curr) l-max l-curr lablist)
(or (equal? cmd :pop)
(equal? cmd :store)
(equal? cmd :return))
(max-stack2 (rest in) argc s-max (dec s-curr) l-max l-curr lablist)
(equal? cmd :funcall)
(if (and (equal? (nth 1 expr) (quote list)) (= s-max s-curr))
(max-stack2 (rest in) argc (inc s-max) (inc (- s-curr (nth 3 expr)))
l-max l-curr lablist)
(max-stack2 (rest in) argc s-max (inc (- s-curr (nth 3 expr)))
l-max l-curr lablist))
(equal? cmd :jump-if-nil)
(max-stack2 (rest in) argc s-max (dec s-curr) l-max l-curr
(insert! lablist (nth 1 expr)
(list (dec s-curr) l-curr)))
(equal? cmd :jump-not-nil)
(max-stack2 (rest in) argc s-max (dec s-curr) l-max l-curr
(insert! lablist (nth 1 expr)
(list (dec s-curr) l-curr)))
(equal? cmd :goto)
(max-stack2 (rest in) argc s-max (dec s-curr) l-max l-curr
(insert! lablist (nth 1 expr)
(list s-curr l-curr)))
(equal? cmd :tail-recur)
(max-stack2 (rest in) argc s-max (- s-curr (nth 2 expr)) l-max l-curr
(insert! lablist :start (list 0 argc)))
t (max-stack2 (rest in) argc s-max s-curr l-max l-curr lablist)))
(list s-max l-max lablist)
))
;; converts a single item of the form (:jvmcode args) into a list of bytes
(defun jvm-assemble0 (in)
(let (cmd (first in))
(cond
(equal? cmd :aconst_null) (list 0x01)
(equal? cmd :aload) (cons 0x19 (to-u1 (nth 1 expr)))
(equal? cmd :astore) (cons 0x3A (to-u1 (nth 1 expr)))
(equal? cmd :ldc)
(let (idx (pool-get pool (nth 1 expr)))
(if (< idx 0x100)
(cons 0x12 (to-u1 idx))
(cons 0x13 (to-u2 idx))))
(equal? cmd :iconst)
; iconst_<> -> bipush -> sipush -> ldc
(let (val (nth 1 in))
(cond
(and (< (- 2) val) (< val 6))
(list (+ val 3)) ; direct constant value
(and (< (- 129) val) (< val 128))
(list 0x10 val) ;bipush
t (print "can't iconst value:" val)))
(equal? cmd :pop) (list 0x57)
(equal? cmd :dup) (list 0x59)
(equal? cmd :areturn) (list 0xB0)
(equal? cmd :return) (list 0xB1)
(equal? cmd :getstatic)
(cons 0xB2 (to-u2 (pool-get pool (list :fieldref
(list :classref (nth 1 expr))
(list :nametyperef (nth 2 expr)
(nth 3 expr))))))
(equal? cmd :invokevirtual)
(cons 0xB6 (to-u2 (pool-get pool (list :methodref
(list :classref (nth 1 expr))
(list :nametyperef (nth 2 expr)
(nth 3 expr))))))
(equal? cmd :invokestatic)
(cons 0xB8 (to-u2 (pool-get pool (list :methodref
(list :classref (nth 1 expr))
(list :nametyperef (nth 2 expr)
(nth 3 expr))))))
(equal? cmd :checkcast)
(cons 0xC0 (to-u2 (pool-get pool (list :classref (nth 1 expr)))))
t expr)))
;; resolves labels and compiles to byte lists whenever possible
(defun jvm-assemble1 (in acc offset labelmap)
(if in
(let (expr (first in)
;_ (print "expr:")
;_ (print expr)
binexpr (jvm-assemble0 expr)
;_ (print "binexpr:")
;_ (print binexpr)
; length of command in bytes
binexprlen (cond
; non-jump related code was compiled to bytes
(int? (first binexpr)) (length binexpr)
; 1 byte for command + 2 bytes for offset
(equal? (first expr) :ifnull) 3
(equal? (first expr) :ifnonnull) 3
(equal? (first expr) :goto) 3)
;_ (print "bin len:")
;_ (print binexprlen)
;_ (print "offset:")
;_ (print offset))
)
(cond
(equal? (first expr) :label)
; offset does not change, but add offset to labelmap
(jvm-assemble1 (rest in) acc offset
(insert! labelmap (nth 1 expr) offset))
(equal? (first expr) :local-count)
(jvm-assemble1 (rest in) acc offset
(insert! labelmap (nth 1 expr) offset))
(equal? (first expr) :let-pop)
(jvm-assemble1 (rest in) acc offset
(insert! labelmap (nth 1 expr) offset))
t
(jvm-assemble1 (rest in)
(cons binexpr acc)
(+ offset binexprlen)
labelmap)))
(list (reverse acc) labelmap)))
;; resolves jumps
(defun jvm-assemble2 (in acc offset labelmap)
(if in
(let (expr (first in)
cmd (first expr))
(cond
(equal? cmd :ifnull)
(jvm-assemble2 (rest in)
(cons (cons
0xC6
(to-u2 (- (first (get labelmap (nth 1 expr)))
offset)))
acc)
(+ offset 3)
labelmap)
(equal? cmd :ifnonnull)
(jvm-assemble2 (rest in)
(cons (cons
0xC7
(to-u2 (- (first (get labelmap (nth 1 expr)))
offset)))
acc)
(+ offset 3)
labelmap)
(equal? cmd :goto-0)
(progn (print (to-u2 (- offset)))
(jvm-assemble2 (rest in)
(cons (cons 0xA7 (to-u2 (- offset))) acc)
(+ offset 3)
labelmap))
(equal? cmd :goto)
(jvm-assemble2 (rest in)
(cons (cons
0xA7
(to-u2 (- (first (get labelmap (nth 1 expr)))
offset)))
acc)
(+ offset 3)
labelmap)
t (jvm-assemble2 (rest in)
(cons expr acc)
(+ offset (length expr))
labelmap)))
(reverse acc)))
(defun jvm-assemble (in)
(let (bin-and-labels (jvm-assemble1 in nil 0 (hashmap))
bin-list (first bin-and-labels)
labelmap (nth 1 bin-and-labels))
(jvm-assemble2 bin-list nil 0 labelmap)))
;; stack frame object entry of class Object
(def objvar-info
(list 0x07 (to-u2 (pool-get pool (list :classref "java/lang/Object")))))
(defun sframe1 (offset l-count s-count last-local)
(cond
; same frame
(and (= last-local l-count) (= s-count 0) (< offset 64))
(list offset)
; same locals 1 stack item
;(and (= last-local l-count) (= s-count 1) (< offset 64))
;(list (+ offset 64) objvar-info)
; same locals 1 stack item extended
;(and (= last-local l-count) (= s-count 1))
;(list 247 (to-u2 offset) objvar-info)
; chop frame
;(and (= s-count 0) (< (- last-local l-count)
t (list 0xFF (to-u2 offset)
(if (= l-count 0)
(list (to-u2 0))
(list (to-u2 l-count) (repeat objvar-info l-count)))
(if (= s-count 0)
(list (to-u2 0))
(list (to-u2 s-count) (repeat objvar-info s-count))))))
(defun sframe-resolve0 (argc offsets stacklabs bytepos acc)
(if offsets
(let (frameoff (second (first offsets)))
;_ (print (dec (- frameoff bytepos)))
;_ (print frameoff))
(if (second (get stacklabs (first (first offsets))))
(sframe-resolve0
argc (rest offsets) stacklabs frameoff
(cons (sframe (dec (- frameoff bytepos)) argc
(first (get stacklabs (first (first offsets)))))
acc))
(sframe-resolve0 argc (rest offsets) stacklabs bytepos acc)))
(reverse acc)))
(defun sframe-resolve1 (offsets stacklabs bytepos last-locals acc)
(if offsets
(let (lab (first (first offsets))
;_ (print "hi ('u' )/")
off (second (first offsets))
stack-and-local (get stacklabs lab)
exists? (second stack-and-local)
f-stack (first (first stack-and-local))
f-local (second (first stack-and-local)))
(if exists?
(sframe-resolve1
(rest offsets) stacklabs off f-local
(cons (sframe1 (dec (- off bytepos)) f-local f-stack last-locals) acc))
(sframe-resolve1 (rest offsets) stacklabs bytepos last-locals acc)))
(reverse acc)))
(defun sframe-resolve2 (argc labels label-offsets)
(let (offsets (keyvals label-offsets))
;_ (print "hi")
;_ (print labels))
(sframe-resolve1
(qsort (lambda (a b) (- (second a) (second b))) offsets)
labels
(- 1)
argc
nil)))
(defun sframe-resolve (argc labels label-offsets)
(let (offsets (keyvals label-offsets))
(sframe-resolve0 argc
(qsort
(lambda (a b) (- (second a) (second b))) offsets)
labels (- 1) nil)))
;; prepends start label to ir if there are tail recursive calls
(defun check-tco0 (in curr)
(if curr
(if (equal? (first (first curr)) :tail-recur)
(cons (list :label :start) in)
(check-tco0 in (rest curr)))
in))
(defun compile1 (name args expr)
(let (_ (pprint "")
_ (print name)
argc (length args)
_ (print "raw ir")
raw-ir (ir (symbol name) expr)
;; allow for infinite tail recursion
;raw-ir (if (equal? (first (last raw-ir)) :tail-recur)
; raw-ir (append raw-ir (list :return)))
;_ (map print raw-ir)
;_ (pprint "")
;ir-list (check-tco0 raw-ir nil)
ir-list (check-tco0 raw-ir raw-ir)
;_ (map print (resolve-syms ir-list args))
ir-list (resolve-syms ir-list args)
_ (print "jvm asm")
; human readable jvm bytecode
;jvm-asm (semi-flatten (map ir-to-jvm (resolve-syms ir-list args)))
;jvm-asm (semi-flatten (map ir-to-jvm ir-list))
jvm-asm (map ir-to-jvm ir-list)
jvm-asm (semi-flatten jvm-asm)
;_ (print "asdf")
jvm-asm (filter (lambda (x)
(not (or (equal? (first x) :let-push))))
jvm-asm)
;_ (map print jvm-asm)
;_ (print "=====")
; unresolved jump binary + label -> offset map
_ (print "jvm assemble")
bin-and-labels (jvm-assemble1 jvm-asm nil 0 (hashmap))
;_ (print "!")
; binary with resolved jumps
labelmap (nth 1 bin-and-labels)
_ (print labelmap)
;_ (map print bin-and-labels)
_ (print "jvm bin")
jvm-bin (jvm-assemble2 (first bin-and-labels) nil 0 labelmap)
;_ (print "?")
bytecode (flatten jvm-bin) ; bytecode
code-size (length bytecode)
; stack-info (max-stack ir-list 0 0 nil)
;_ (print "?")
;_ (map print ir-list)
stack-info (max-stack2 ir-list argc 0 0 0 argc (hashmap))
_ (print "stack info:")
_ (print stack-info)
;_ (print (nth 2 stack-info))
stack-size (first stack-info)
max-locals (second stack-info)
;_ (print max-locals)
;max-locals argc
_ (print "stack frames")
stack-frames (sframe-resolve2 argc (nth 2 stack-info) labelmap)
;_ (print (sframe-resolve2 argc (nth 2 stack-info2) labelmap))
;_ (progn (print "stack height") (print (nth 1 stack-info)))
;_ (progn (print "label pos") (print labelmap))
;_ (print "===")
;_ (print stack-frames)
flat-stack-map (flatten stack-frames)
stack-map-frames-size (length flat-stack-map)
_ (print "end")
_ (insert! method-list (string name)
(list "Lateral" (string name) (method-type argc)))
)
(list
0x00 0x09 ; public static
; name of function
(to-u2 (pool-get pool (list :utf8 name)))
; type signature
(to-u2 (pool-get pool (list :utf8 (method-type argc))))
0x00 0x01 ; attribute size of 1
(to-u2 (pool-get pool (list :utf8 "Code")))
(if stack-frames
(to-u4 (+ 12 code-size 8 stack-map-frames-size))
(to-u4 (+ 12 code-size)))
(to-u2 stack-size)
(to-u2 max-locals)
(to-u4 code-size)
bytecode
0x00 0x00 ; 0 exceptions
(if stack-frames
(list 0x00 0x01 ; one StackMapTable attribute
(to-u2 (pool-get pool (list :utf8 "StackMapTable")))
; length in bytes = number of frames (u2) + length of binary
(to-u4 (+ 2 (length flat-stack-map)))
(to-u2 (length stack-frames)) ; number of frames
stack-frames)
; no attributes if StackMapTable is empty
(list 0x00 0x00)))))
(defun constbin-dbg (in acc)
(if in
(progn
(print (first in))
(constbin-dbg (rest in) (cons (const-to-bin (first in)) acc)))
acc))
(defun class-headers (name parent methods)
(progn
; add class and parent to constant pool
(pool-get pool (list :classref name))
(pool-get pool (list :classref parent))
(map print (reverse pool-list))
(print pool)
(list
0xCA 0xFE 0xBA 0xBE ; java magic number
0x00 0x00 0x00 0x37 ; java version 55.0 (Java 11)
(to-u2 (inc (length pool-list)))
(flatten (map const-to-bin (reverse pool-list)))
;(flatten (constbin-dbg (reverse pool-list) nil))
0x00 0x21 ; extendable (not final) and public
(to-u2 (pool-get pool (list :classref name)))
(to-u2 (pool-get pool (list :classref parent)))
0x00 0x00 ; zero interfaces
0x00 0x00 ; zero fields
(to-u2 (length methods))
methods
0x00 0x00))) ; zero attributes
(def funlist nil)
(defun compile-function0 (name args expr)
(def funlist (cons (compile1 (string name) args expr) funlist)))
(defmacro defun (name args expr)
(list (quote compile-function0)
(list (quote quote) name)
(list (quote quote) args)
(list (quote quote) expr)))
(include "lateral.lisp")
;(print "writing binary...")
(write-bytes
"LateralB.class"
(flatten
(class-headers
"Lateral"
"java/lang/Object"
(reverse funlist))))
| 22,990 | Common Lisp | .lisp | 566 | 30.660777 | 82 | 0.543558 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | e4e164af74e46ebf8df7310d11333fb602274fbf3b31177cc26030b113a0416d | 16,237 | [
-1
] |
16,238 | core.lisp | davidsun0_lateral/interpreter/old/jvm/core.lisp | ; runtime list
; TODO: move to Runtime.java
(def list (lambda (:rest l) l))
(defmacro defun (name args expr)
(list (quote def)
name
(list (quote lambda) args expr)))
;(defmacro defun (name args expr)
; `(def ,name (lambda ,args ,expr))
; TODO: move to Runtime.java
(defun cons1 (in acc)
(if in
(cons1 (rest in) (cons0 (first in) acc))
acc))
; TODO: move to Runtime.java
(defun cons (:rest l)
(let (rl (reverse l))
(cons1 (rest rl) (first rl))))
(def *gensym-count* 0)
(defun gensym (:rest prefix)
(->> (inc *gensym-count*)
(def *gensym-count*)
(string (if prefix
(first prefix)
"gsym"))
(symbol)))
;; clojure threading macros
(defun ->0 (exprs acc)
(if exprs
(->0 (rest exprs)
(cons (first (first exprs))
acc
(rest (first exprs))))
acc))
(defun ->>0 (exprs acc)
(if exprs
(->>0 (rest exprs) (append (first exprs) acc))
acc))
(defmacro -> (:rest exprs)
(->0 (rest exprs) (first exprs)))
(defmacro ->> (:rest exprs)
(->>0 (rest exprs) (first exprs)))
;; convinience macros
(defun case0 (term exprs acc)
(cond
(not exprs) (reverse acc)
(nil? (rest exprs)) (reverse (cons (first exprs) t acc))
t (case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote equal?) (first exprs) term)
acc)))))
;; bug in case when nil in a case list
(defun case0 (term exprs acc)
(cond
(not exprs) (reverse acc)
;; append else clause
(nil? (rest exprs)) (reverse (cons (first exprs) t acc))
;; list to match
(list? (first exprs))
(case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote list-contains?)
(list (quote quote) (first exprs))
term)
acc)))
;; single term
t (case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote equal?) (first exprs) term)
acc)))))
;; TODO: wrap in let and only eval term once
(defun case1 (terms)
(let (val (gensym))
(list (quote let)
(list val (first terms))
(cons (quote cond)
(case0 val
(rest terms)
nil)))))
(defmacro case (:rest terms)
(case1 terms))
;; basic utilities
(defun not (p)
(if p nil t))
(def nil? not)
(defun inc (n)
(+ n 1))
(defun dec (n)
(- n 1))
(defun print (:rest args)
(progn
(map (lambda (x) (progn (print0 x) (pprint0 " "))) args)
(pprint0 "\n")))
(defun pprint (:rest args)
(progn
(map (lambda (x) (progn (pprint0 x) (pprint0 " "))) args)
(pprint0 "\n")))
(defun print-iden (x)
(progn
(print x)
x))
; optional arguments?
(defun get (hmap key :rest missing)
(cond
(nil? missing) (get0 hmap key)
(second (get0 hmap key)) (first (get0 hmap key))
t (first missing)))
;(defun write-bytes (path bytes)
; (print
; (string "write " (length bytes) "bytes to " path)))
;(defun type (a)
; (cond
; (list? a) :list
; (int? a) :int
; (keyword? a) :keyword
; (string? a) :string
; (char? a) :char
; (symbol? a) :symbol
; t :unkown))
(defun list? (o) (equal? (type o) :list))
(defun int? (o) (equal? (type o) :int))
(defun keyword? (o) (equal? (type o) :keyword))
(defun string? (o) (equal? (type o) :string))
(defun symbol? (o) (equal? (type o) :symbol))
(defun char? (o) (equal? (type o) :char))
;; functional favorites
(defun map0 (fn in acc)
(if in
(map0 fn (rest in) (cons (fn (first in)) acc))
acc))
(defun map (fn in)
(reverse (map0 fn in nil)))
(defun apply (fun args)
(eval (cons fun (map (lambda (x) (list (quote quote) x)) args))))
(defun reduce0 (fn in acc)
(if in
(reduce0 fn (rest in) (fn acc (first in)))
acc))
(defun reduce (fn in)
(reduce0 fn
(rest (rest in))
(fn (first in) (nth 1 in))))
(defun filter0 (pred in acc)
(cond
(not in) acc
(pred (first in)) (filter0 pred (rest in) (cons (first in) acc))
t (filter0 pred (rest in) acc)))
(defun filter (pred in)
(reverse (filter0 pred in nil)))
(defun foldl (fun acc in)
(if in
(foldl fun (fun acc (first in)) (rest in))
acc))
(defun max (:rest in)
(if (rest in)
(reduce (lambda (a b) (if (< a b) b a)) in)
(first in)))
;; list functions
(defun second (in)
(first (rest in)))
(defun third (in)
(first (rest (rest in))))
(defun fourth (in)
(first (rest (rest (rest in)))))
(defun length0 (in acc)
(if in
(length0 (rest in) (inc acc))
acc))
(defun length (in)
(if (string? in)
(length0 (to-chars in) 0)
(length0 in 0)))
(defun append (in obj)
(reverse (cons obj (reverse in))))
(defun nth (n in)
(if (= n 0)
(first in)
(nth (dec n) (rest in))))
(defun last (in)
(if (rest in)
(last (rest in))
(first in)))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons0 (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
(defun concat (a b)
(reverse0 (reverse a) b))
(defun index0 (needle haystack acc)
(if haystack
(if (equal? needle (first haystack))
acc
(index0 needle (rest haystack) (inc acc)))))
(defun index (needle haystack)
(index0 needle haystack 0))
(defun repeat0 (key times acc)
(if (< times 1)
acc
(repeat0 key (dec times) (cons key acc))))
(defun repeat (key times)
(repeat0 key times nil))
;; use native flatten instead
(defun xflatten0 (tree acc)
(cond
(nil? tree) acc
(not (list? tree)) tree
(list? (first tree)) (flatten0 (rest tree) (flatten0 (first tree) acc))
t (flatten0 (rest tree) (cons (first tree) acc))))
(defun xflatten (tree)
(reverse (flatten0 tree nil)))
(defun list-contains? (hay needle)
(cond
(nil? hay) nil
(equal? (first hay) needle) (first hay)
t (list-contains? (rest hay) needle)))
;; other functions, they might be useful
(defun qsort0 (comp in pivot less same greater)
(if in
(let (term (first in)
c (comp term pivot))
(cond
(= c 0) (qsort0 comp (rest in) pivot less (cons term same) greater)
(< c 0) (qsort0 comp (rest in) pivot (cons term less) same greater)
(> c 0) (qsort0 comp (rest in) pivot less same (cons term greater))))
(list less same greater)))
(defun qsort (comp in)
(if in
(let (pivot (first in)
asdf (rest in)
terms (qsort0 comp asdf pivot nil nil nil)
lesser (first terms)
same (cons pivot (second terms))
greater (nth 2 terms))
(if (nil? asdf)
(list pivot)
(concat (qsort comp lesser) (concat same (qsort comp greater)))))))
(defun split0 (lst n acc)
(if (> n 0)
(split0 (rest lst) (dec n) (cons (first lst) acc))
(list (reverse acc) lst)))
(defun msort0 (comp a b acc)
(cond
(and (nil? a) (nil? b)) (reverse acc)
(nil? b) (msort0 comp (rest a) b (cons (first a) acc))
(nil? a) (msort0 comp a (rest b) (cons (first b) acc))
(comp (first a) (first b)) (msort0 comp (rest a) b (cons (first a) acc))
t (msort0 comp a (rest b) (cons (first b) acc))))
(defun msort (comp in)
(let (len (length in)
halves (split0 in (// len 2) nil))
(if (<= len 1)
in
(msort0 comp
(msort comp (first halves))
(msort comp (second halves))
nil))))
(defun > (a b) (not (or (= a b) (< a b))))
(defun <= (a b) (or (< a b) (= a b)))
(defun >= (a b) (or (> a b) (= a b)))
(defun to-chars0 (s i acc)
(if (char-at s i)
(to-chars0 s (inc i) (cons (char-at s i) acc))
(reverse acc)))
(defun to-chars (s)
(to-chars0 s 0 nil))
| 7,838 | Common Lisp | .lisp | 270 | 23.92963 | 77 | 0.572761 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | a2c63ba1a15bdafade722cb44547d8283e83efee86e2fbbc75ea9a0071fd6b2c | 16,238 | [
-1
] |
16,239 | lc.lisp | davidsun0_lateral/interpreter/jvm/lc.lisp | (include "jvmtable.lisp")
(defun stack-info0 (acc expr)
(let (cstack (second acc)
mstack (if (< (first acc) cstack)
cstack
(first acc))
lablist (third acc))
(case (first expr)
;; stack +1
(:aload :aconst_null :iconst :dup :getstatic :ldc)
(list mstack (inc cstack) lablist)
;; stack -1
;; goto decrements the stack when jumping to another branch
;; except goto to start keeps the stack the same
(:areturn :pop :astore :ifnull :ifnonnull :goto)
(list mstack
(if (equal? expr (quote (:goto :start)))
cstack
(dec cstack))
(cond
(equal? (first expr) :goto)
(insert! lablist (second expr) cstack)
(index (first expr) (list :goto :ifnull :ifnonnull))
(insert! lablist (second expr) (dec cstack))
t lablist))
;; stack +- 0
(:label :return :let-pop :local-count)
(list mstack cstack
(if (equal? (first expr) :goto)
(insert! lablist (second expr) cstack)
lablist))
;; stack - argc + 1
:invokestatic
(list mstack
(- cstack (dec (count-semi (nth 3 expr) 0 0)))
lablist)
(progn
(print "stack-info0 can't handle " expr)
(list mstack cstack lablist)))))
(defun sframe1 (offset last-local l-count s-count)
;; https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.7.4
(let (obj (objvar-info pool))
(cond
;; same frame
(and (= s-count 0) (= last-local l-count) (< offset 64))
(list offset)
;; same frame extended
(and (= s-count 0) (= last-local l-count))
(list 251 (u2 offset))
;; same locals 1 stack item
(and (= s-count 1) (= last-local l-count) (< offset 64))
(list (+ offset 64) obj)
;; same locals 1 stack item extended
(and (= s-count 1) (= last-local l-count))
(list 247 (u2 offset) obj)
;; chop frame
(and (= s-count 0) (< l-count last-local) (< (- last-local l-count) 4))
(list (- 251 (- last-local l-count)) (u2 offset))
;; append frame
(and (= s-count 0) (< last-local l-count) (< (- l-count last-local) 4))
(list (+ 251 (- l-count last-local))
(u2 offset)
(repeat obj (- l-count last-local)))
;; full frame
t (list 0xFF (u2 offset)
(if (= l-count 0)
(list (u2 0))
(list (u2 l-count) (repeat obj l-count)))
(if (= s-count 0)
(list (u2 0))
(list (u2 s-count) (repeat obj s-count)))))))
(defun sframe-resolve0 (poff ploc acc lstat)
(let (item (first lstat)
offset (first item)
stacks (second item)
locals (third item))
(if (nil? lstat)
(reverse acc)
(sframe-resolve0
offset
locals
(cons (sframe1 (dec (- offset poff)) ploc locals stacks) acc)
(rest lstat)))))
(defun sframe-resolve (argc offsets stack-i local-i)
(->> (keyvals offsets)
(msort (lambda (a b) (< (second a) (second b))))
(print-iden)
(map (lambda (x)
(list (second x)
(get stack-i (first x) nil)
(get local-i (first x) nil))))
(filter (lambda (x) (second x)))
(sframe-resolve0 (- 1) argc nil)))
(defun arg-count (args)
(if (index :rest args)
(inc (index :rest args))
(length args)))
(defun compile0! (pool method-list name args jvm-asm signature)
(let (_ (pprint)
_ (print name)
;_ (print "asm:")
;_ (map print jvm-asm)
; human readable jvm bytecode
_ (print "====")
basebytes (->> jvm-asm
(map jvm-assemble)
(map (lambda (x) (pool-resolve! pool x))))
bytecode (flatten (jump-resolve basebytes))
_ (print "bytecode: " bytecode)
label-i (label-resolve basebytes)
_ (print "label info: " label-i)
local-i (local-info (arg-count args) jvm-asm)
_ (print "local info: " local-i)
stack-i (foldl stack-info0 (list 0 0 (hashmap)) jvm-asm)
_ (print "stack info: " stack-i)
sframes (sframe-resolve (arg-count args) label-i (third stack-i) local-i)
_ (print "stack frames: " sframes)
)
(list
0x00 0x09 ; public static
; name of function
(u2 (pool-get! pool name))
; type signature
(u2 (pool-get! pool signature))
0x00 0x01 ; attribute size of 1
(u2 (pool-get! pool "Code"))
(u4 (+ 12 (length bytecode)
(if sframes
(+ 8 (length (flatten sframes)))
0)))
(u2 (first stack-i)) ; max stack height
(u2 (let (maxloc (apply max (map second (keyvals local-i))))
(if maxloc
maxloc
(arg-count args))))
(u4 (length bytecode))
bytecode
0x00 0x00 ; 0 exceptions
(if sframes
(list 0x00 0x01 ; one attribute (StackMapTable)
(u2 (pool-get! pool (list :utf8 "StackMapTable")))
; length in bytes = size(number of frames) + length of binary
(u4 (+ 2 (length (flatten sframes))))
(u2 (length sframes)) ; number of frames
sframes)
; no attributes if StackMapTable is empty
(list 0x00 0x00)))))
(defun compile1! (cpool method-list defnexpr)
(let (name (second defnexpr)
args (third defnexpr)
expr (fourth defnexpr))
(compile0!
cpool
method-list
(java-name (string name))
args
(->> (ir name (filter symbol? args) expr)
(check-tco)
(map print-iden)
(map ir-to-jvm)
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
(method-type (arg-count args)))))
(defun compile-special! (cpool method-list name args body signature)
(compile0!
cpool
method-list
name
args
(->> (ir nil args body)
(map ir-to-jvm)
((lambda (x) (append x (list :return))))
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
signature))
(defun class-headers (pool name parent methods)
(let (; add class and parent to constant pool
class-idx (pool-get! pool (list :classref name))
parent-idx (pool-get! pool (list :classref parent))
const-pool-size (get pool :count nil)
;_ (map print (keyvals pool))
)
(list
0xCA 0xFE 0xBA 0xBE ; java magic number
0x00 0x00 0x00 0x37 ; java version 55.0 (Java 11)
(u2 const-pool-size)
(->> (keyvals pool)
(filter (lambda (x) (list? (first x))))
(msort (lambda (a b) (< (second a) (second b))))
(map first)
(map const-to-bin)
(flatten))
0x00 0x21 ; extendable (not final) and public
(u2 class-idx)
(u2 parent-idx)
0x00 0x00 ; zero interfaces
0x00 0x00 ; zero fields
(u2 (length methods))
methods
0x00 0x00))) ; zero attributes
;(include "read.lisp")
(defun call-split (in funs macros etc)
(cond
(nil? in) (list funs
(reverse macros)
(reverse etc))
(equal? (first (first in)) (quote defun))
(call-split (rest in) (cons (first in) funs) macros etc)
(equal? (first (first in)) (quote defmacro))
(call-split (rest in) funs (cons (first in) macros) etc)
t
(call-split (rest in) funs macros (cons (first in) etc))))
(defun read-funs (path)
(first (call-split (read-all path) nil nil nil)))
(defun compile2 (path classname)
(let (exprs (read-all path)
splits (call-split exprs nil nil nil)
;; TODO: filter out etc after macro expansion
macros (second splits)
etc (third splits)
;_ (print "hi")
_ (print macros)
; how to expand macros within macros?
macro-list (hashmap)
_ (map
(lambda (x)
;(progn
;(print (list (quote lambda) (third x) (fourth x)))
;(print macro-list)
(insert! macro-list (second x)
(eval (list (quote lambda) (third x) (fourth x))))
;)
)
macros)
_ (print macro-list)
;; macroexpand
funs (first splits)
_ (print "macro expansion...")
funs (map (lambda (x) (comp-expand x macro-list)) funs)
_ (print "expanded funs====")
_ (map print funs)
cpool (hashmap)
;; insert all functions into method-list
;; TODO: make a copy of base method-list
method-list *method-list*
_ (map (lambda (x) (insert-lambda! method-list classname x)) funs)
_ (print "cinitbin")
cinitbin (compile0!
cpool
method-list
"<clinit>"
nil
(->> (cons 'progn etc)
(ir nil nil)
(map ir-to-jvm)
(concat
;(map (lambda (x)
; (gen-insert classname (second x) (third x) t))
; macros)
(map (lambda (x)
(gen-insert classname (second x) (third x) nil))
funs))
((lambda (x) (append x (list :return))))
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
"()V")
_ (print "mainbin")
mainbin (if (get method-list "main" nil)
(compile-special!
cpool
method-list
"main"
(quote (0))
(quote (main))
"([Ljava/lang/String;)V"))
_ (print "Ready")
)
(->> funs
(map (lambda (x) (compile1! cpool method-list x)))
((lambda (x) (if mainbin (cons mainbin x) x)))
(cons cinitbin)
(class-headers cpool classname "java/lang/Object")
(flatten)
(write-bytes (string classname ".class")))))
(defun comp-expand (in macros)
(if (list? in)
(comp-expand0 in nil macros)
in))
(defun comp-expand0 (in acc macros)
(cond
(nil? in) (reverse acc)
(and (nil? acc) (equal? (first in) (quote quote)))
in
(and (nil? acc) (get macros (first in) nil))
(comp-expand
;(apply (get (user-envir) (first in) nil) (rest in))
(apply (get macros (first in) nil) (rest in))
macros)
t (comp-expand0 (rest in)
(cons
(comp-expand (first in) macros)
acc)
macros)))
;; method adding for :rest params
;(defun make-params (class name n-params)
; (lambda (ml n)
; (append (funcall-resolve ml `(:funcall list :argc (- n ,n-params)))
; `(:invokestatic ,class ,name (method-type ,(inc n-params))))))
(defun make-params (class name n-params)
(eval
(list (quote lambda)
(quote (ml n))
(list (quote append)
(list (quote funcall-resolve)
(quote ml)
(list (quote list)
:funcall
"list"
:argc
(list (quote -)
(quote n)
n-params)))
(list (quote list)
:invokestatic
class
name
(method-type (inc n-params)))))))
(defun insert-lambda! (method-list classname lamb)
(let (string-name (java-name (string (second lamb))))
(if (index :rest (third lamb))
(->> (third lamb)
(index :rest)
(make-params classname string-name)
(insert! method-list string-name))
(->> (third lamb)
(length)
(method-type)
(list classname string-name)
(insert! method-list string-name)))))
;(defun gen-insert (class)
; (lambda (x)
; (map ir-to-jvm
; `((:ldc (:classref ,(string class)))
; (:push :str-const ,(java-name (string (second x))))
; (:push :str-const ,name)
; (:push :int-const ,(length (third x)))
; (:invokestatic "Runtime" "insertMethod" ,(method-type 4))))))
(defun gen-insert (class name args macro?)
(->> (list
(list :ldc (list :classref (string class)))
(list :push :str-const (java-name (string name)))
(list :push :str-const (string name))
(list :push :int-const (arg-count args))
(list :push (if (index :rest args) :true :nil))
(list :push (if macro? :true :nil))
(->> '(")V")
(concat '("(") (repeat "Ljava/lang/Object;" 6))
(apply string)
(list :invokestatic "Runtime" "insertMethod")))
(map ir-to-jvm)))
| 13,288 | Common Lisp | .lisp | 363 | 26.253444 | 81 | 0.514239 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 288c59127b97dbe24f8729a4d73a777f8668d4c7ff2a6ace74da70f744ea5f69 | 16,239 | [
-1
] |
16,240 | lateral.lisp | davidsun0_lateral/interpreter/jvm/lateral.lisp | (defun not (p)
(if p nil t))
(defun nil? (p)
(if p nil t))
(defun inc (n)
(add0 1 n))
(defun dec (n)
(add0 n (negate 1)))
(defun add1 (nums acc)
(if nums
(add1 (rest nums) (add0 (first nums) acc))
acc))
(defun + (:rest nums)
(add1 nums 0))
(defun - (:rest nums)
(if (rest nums)
(add0 (first nums) (negate (add1 (rest nums) 0)))
(negate (first nums))))
(defun second (lst)
(first (rest lst)))
(defun third (lst)
(first (rest (rest lst))))
(defun fourth (lst)
(first (rest (rest (rest lst)))))
(defun nth (n list)
(if (= n 0)
(first list)
(nth (dec n) (rest list))))
(defun length0 (lst acc)
(if lst
(length0 (rest lst) (inc acc))
acc))
(defun length (lst)
(length0 lst 0))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons0 (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
(defun concat (a b)
(reverse0 (reverse a) b))
(defun index0 (needle haystack acc)
(cond
(nil? haystack) nil
(equal? needle (first haystack)) acc
t (index0 needle (rest haystack) (inc acc))))
(defun index (needle haystack)
(index0 needle haystack 0))
(defun last-index0 (needle haystack curr idx)
(cond
(nil? haystack) idx
(equal? needle (first haystack))
(last-index0 needle (rest haystack) (inc curr) curr)
t (last-index0 needle (rest haystack) (inc curr) idx)))
(defun last-index (needle haystack)
(last-index0 needle haystack 0 nil))
(defun append (in obj)
(reverse (cons obj (reverse in))))
(defun repeat0 (key times acc)
(if (< times 1)
acc
(repeat0 key (dec times) (cons key acc))))
(defun repeat (key times)
(repeat0 key times nil))
(defun map0 (fn in acc)
(if in
(map0 fn (rest in) (cons (fn (first in)) acc))
acc))
(defun map (fn in)
(reverse (map0 fn in nil)))
(defun filter0 (pred in acc)
(if in
(filter0 pred (rest in)
(if (pred (first in))
(cons (first in) acc)
acc))
acc))
(defun filter (pred in)
(reverse (filter0 pred in nil)))
(defun foldl (fun acc in)
(if in
(foldl fun (fun acc (first in)) (rest in))
acc))
(defun flatten0 (tree acc)
(cond
(nil? tree) acc
(not (list? tree)) tree
(list? (first tree)) (flatten0 (rest tree) (flatten0 (first tree) acc))
t (flatten0 (rest tree) (cons (first tree) acc))))
(defun flatten (tree)
(reverse (flatten0 tree nil)))
(defun print1 (in)
(if in
(progn (print0 (first in))
(pprint0 " ")
(print1 (rest in)))
(pprint0 "\n")))
(defun print (:rest args)
(print1 args))
(defun pprint1 (in)
(if in
(progn (pprint0 (first in))
(pprint0 " ")
(print1 (rest in)))
(pprint0 "\n")))
(defun pprint (:rest args)
(pprint1 args))
(defun to-chars0 (s i acc)
(if (char-at s i)
(to-chars0 s (inc i) (cons (char-at s i) acc))
(reverse acc)))
(defun to-chars (s)
(to-chars0 s 0 nil))
(defun string (:rest s)
(string0 s))
(defun get (hmap key :rest missing)
(let (res (get0 hmap key))
(cond
(nil? missing) res
(second res) (first res)
t (first missing))))
(defun > (a b) (not (or (= a b) (< a b))))
(defun <= (a b) (or (< a b) (= a b)))
(defun >= (a b) (or (> a b) (= a b)))
(defun split0 (lst n acc)
(if (> n 0)
(split0 (rest lst) (dec n) (cons (first lst) acc))
(list (reverse acc) lst)))
(defun msort0 (comp a b acc)
(cond
(and (nil? a) (nil? b)) (reverse acc)
(nil? b) (msort0 comp (rest a) b (cons (first a) acc))
(nil? a) (msort0 comp a (rest b) (cons (first b) acc))
(comp (first a) (first b)) (msort0 comp (rest a) b (cons (first a) acc))
t (msort0 comp a (rest b) (cons (first b) acc))))
(defun msort (comp in)
(let (len (length in)
halves (split0 in (// len 2) nil))
(if (<= len 1)
in
(msort0 comp
(msort comp (first halves))
(msort comp (second halves))
nil))))
(def *gensym-count* 0)
(defun gensym (:rest prefix)
(symbol
(string0
(list (if prefix (first prefix) "gsym")
(def *gensym-count*
(inc *gensym-count*))))))
(defun ->>0 (exprs acc)
(if exprs
(->>0 (rest exprs) (append (first exprs) acc))
acc))
(defmacro ->> (:rest exprs)
(->>0 (rest exprs) (first exprs)))
;; bug when nil in a case list
(defun case0 (term exprs acc)
(cond
(nil? exprs) (reverse acc)
;; append else clause
(nil? (rest exprs)) (reverse (cons (first exprs) 't acc))
;; list to match
(list? (first exprs))
(case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote index)
term
(list (quote quote) (first exprs)))
acc)))
;; single term
t (case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote equal?) (first exprs) term)
acc)))))
;(defun case1 (terms)
; (let (val (gensym "case-"))
; `(let (,val ,(first terms))
; ,(cons 'cond (case0 val (rest terms) nil)))))
;; TODO: wrap in let and only eval term once
(defun case1 (terms)
(let (val (gensym))
(list (quote let)
(list val (first terms))
(cons (quote cond)
(case0 val
(rest terms)
nil)))))
(defmacro case (:rest terms)
(case1 terms))
;;=============================================================================
;; READ FUNCTIONS
;;=============================================================================
(def *read-pos* 0)
(def *read-tail* 0)
(def *read-str* nil)
(defun r-peek (off)
(if *read-str*
(char-at *read-str* (+ *read-pos* off))))
(defun r-next! ()
(let (x (r-peek 0))
(progn
(def *read-pos* (inc *read-pos*))
x)))
(defun r-get ()
(substr *read-str* *read-tail* *read-pos*))
(defun wait-for (ch)
(let (x (r-peek 0))
(cond
(nil? x) nil
(equal? x ch) ch
t (progn (r-next!) (wait-for ch)))))
(defun read-atom1 (state)
(let (ch (r-peek 0))
(cond
(equal? state :string)
(cond
(nil? ch) (print "unexpected EOF in string")
(and (equal? ch "\\")
(or (equal? (r-peek 1) "\"")
(equal? (r-peek 1) "n")
(equal? (r-peek 1) "\\")))
(progn (r-next!) (r-next!) (read-atom1 state))
(equal? ch "\"")
(progn (r-next!) (read-atom0 (r-get)))
t (progn (r-next!) (read-atom1 state)))
(or (nil? ch) (equal? ch ")") (whitespace? ch) (equal? ch "\n"))
(read-atom0 (r-get))
t (progn (r-next!) (read-atom1 state)))))
(defun read-atom ()
(let (ch (r-peek 0))
(cond
(equal? ch "\"") (progn (r-next!) (read-atom1 :string))
t (read-atom1 nil))))
(defun read-form ()
(let (ch (r-peek 0))
(cond
(nil? ch) nil
(whitespace? ch) (progn (r-next!) (read-form))
(equal? ch ";") (progn (wait-for "\n") (read-form))
(equal? ch "'") (progn (r-next!) (list (quote quote) (read-form)))
(equal? ch "(") (progn (r-next!) (read-list nil))
(equal? ch ")") (print "unexpected )")
t (progn (def *read-tail* *read-pos*) (read-atom)))))
(defun read-list (acc)
(let (ch (r-peek 0))
(cond
(nil? ch) (print "unexpected EOF")
(whitespace? ch) (progn (r-next!) (read-list acc))
(equal? ch ";") (progn (wait-for "\n") (read-list acc))
(equal? ch ")") (progn (r-next!) (reverse acc))
t (read-list (cons (read-form) acc)))))
(defun read (str)
(progn
(if str
(progn
(def *read-str* str)
(def *read-pos* 0)))
(read-form)))
(defun read-all0 (acc)
(let (sexpr (read nil))
(if sexpr
(read-all0 (cons sexpr acc))
(reverse acc))))
(defun read-all (path)
(read-all0 (list (read (slurp path)))))
;;=============================================================================
;; INTERPRETER
;;=============================================================================
(defun interleave0 (lista listb acc)
(cond
(equal? :rest (first lista))
(reverse (cons listb (second lista) acc))
(and lista listb)
(interleave0 (rest lista) (rest listb)
(cons (first listb) (cons (first lista) acc)))
(or lista listb)
(progn (print lista) (print listb) (print acc)
(print "error: unmatched interleave arguments"))
t (reverse acc)))
(defun interleave (lista listb)
(interleave0 lista listb nil))
(defun apply-progn (exprs env)
(if (rest exprs)
(progn
(apply0 (first exprs) env)
(apply-progn (rest exprs) env))
(apply0 (first exprs) env)))
;; TODO: check for even number of val/bindings
(defun let-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (apply0 (second exprs) env))
(let-bind (rest (rest exprs)) env))
env))
;; TODO: check for even number of val/bindings
(defun apply-cond (exprs env)
(cond
(not exprs) nil
(apply0 (first exprs) env) (apply0 (second exprs) env)
t (apply-cond (rest (rest exprs)) env)))
(defun apply-and (exprs env)
(cond
(not exprs) t
(apply0 (first exprs) env) (apply-and (rest exprs) env)
t nil))
(defun apply-or (exprs env)
(cond
(not exprs) nil
(apply0 (first exprs) env) t
t (apply-or (rest exprs) env)))
;; TODO: check for even number of val/bindings
(defun lambda-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (second exprs))
(lambda-bind (rest (rest exprs)) env))
env))
(defun lambda-apply (func args env)
(let (sym-binds (interleave (get-args func) args)
bind-envir (lambda-bind sym-binds (make-envir env)))
(apply0 (get-expr func) bind-envir)))
(defun macro-call? (ast env)
(and (list? ast)
(contains? env (first ast))
(macro? (first (get env (first ast))))))
(defun macro-expand (ast env)
(if (macro-call? ast env)
(macro-expand
(lambda-apply (first (get env (first ast))) (rest ast) env)
env)
ast))
(defun eval0 (ast env acc)
(cond
(not ast) (reverse acc)
(symbol? ast) (first (get env ast))
(not (list? ast)) ast
t (eval0 (rest ast) env (cons (apply0 (first ast) env) acc))))
(defun apply0 (ast env)
(cond
(not ast) nil
(macro-call? ast env)
(apply0 (macro-expand ast env) env)
(not (list? ast)) (eval0 ast env nil)
;; TODO: throw instead of print errors
;; if
(equal? (first ast) (quote if))
(cond
(apply0 (second ast) env) (apply0 (third ast) env)
(= (length ast) 4) (apply0 (fourth ast) env)
(= (length ast) 3) nil
t (print "if expects two or three arguments"))
;; quote
(equal? (first ast) (quote quote))
(if (= (length ast) 2)
(second ast)
(print "quote expects one argument"))
;; def
(equal? (first ast) (quote def))
(if (= (length ast) 3)
(let (val (apply0 (third ast) env))
(progn
(insert! (user-envir) (second ast) val)
val))
(print "def expects two arguments"))
;; progn
(equal? (first ast) (quote progn))
(apply-progn (rest ast) env)
;; let
(equal? (first ast) (quote let))
(let (bind-envir (let-bind (second ast) (make-envir env)))
(if (= (length ast) 3)
(apply0 (third ast) bind-envir)
(print "let expects two arguments")))
;; defmacro
(equal? (first ast) (quote defmacro))
(if (= (length ast) 4)
(let (val (make-macro (third ast) (fourth ast)))
(progn
(insert! env (second ast) val)
val))
(print "defmacro expects four arguments"))
;; lambda
(equal? (first ast) (quote lambda))
(if (= (length ast) 3)
(make-lambda (second ast) (third ast))
(print "lambda expects two arguments"))
;; cond
(equal? (first ast) (quote cond))
(apply-cond (rest ast) env)
;; and
(equal? (first ast) (quote and))
(apply-and (rest ast) env)
;; or
(equal? (first ast) (quote or))
(apply-or (rest ast) env)
t
(let (eval-list (eval0 ast env nil)
func (first eval-list))
(cond
(native-fn? func) (native-invoke func (rest eval-list))
(lambda? func) (lambda-apply func (rest eval-list) env)
t (print "error: " func " isn't a function")))))
(defun lambda-invoke (fn args)
(cond
(native-fn? fn) (native-invoke fn args)
(lambda? fn) (lambda-apply fn args (user-envir))
t (print "can't invoke " fn " as lambda")))
(defun eval (ast)
(apply0 ast (user-envir)))
(defun include (path)
(eval (cons (quote progn) (read-all path))))
;(defun apply (fn args)
; (->> args
; (map (lambda (x) (list 'quote x)))
; (cons fun)
; (eval)))
(include "core.lisp")
(defun main ()
(progn
(pprint0 "user> ")
(print (apply0 (read (readline)) (user-envir)))
(main)))
;;=============================================================================
;; COMPILER
;;=============================================================================
(defun quote-flatten0 (ast acc)
(cond
(nil? ast) (reverse acc)
(list? ast)
(quote-flatten0 (rest ast)
(concat (quote-flatten (first ast)) acc))
t (list (list :push
(cond
(symbol? ast) :symbol
(keyword? ast) :keyword
(string? ast) :str-const
(int? ast) :int-const
t (print "can't quote flatten " ast))
ast))))
(defun quote-flatten (ast)
(semi-flatten
(if (list? ast)
(concat (quote-flatten0 ast nil)
(list (list :funcall 'list :argc (length ast))))
(quote-flatten0 ast nil))))
(defun closure-flatten0 (args locals ast acc)
(cond
(nil? ast) (reverse acc)
(list? ast)
(closure-flatten0
args
locals
(rest ast)
(cons (closure-flatten1 args locals (first ast)) acc))
(index ast args) (list (list :push :symbol ast))
(index ast locals) (list (list :push :arg-num (index ast locals)))
(int? ast) (list (list :push :int-const ast))
(string? ast) (list (list :push :str-const))
(keyword? ast) (list (list :push keyword-const))
(symbol? ast)
(list (list :push :symbol 'quote)
(list :push :symbol ast)
(list :funcall 'envir-get :argc 1)
(list :funcall 'list :argc 2))
t (print "closure-flatten0 can't handle " ast)))
(defun closure-flatten1 (args locals ast)
(if (list? ast)
(list (closure-flatten0 args locals ast nil)
(list :funcall 'list :argc (length ast)))
(closure-flatten0 args locals ast nil)))
(defun closure-flatten (args locals ast)
(list (list :funcall 'make-lambda :argc 2)
(reverse (semi-flatten (closure-flatten1 args locals ast)))
(reverse (quote-flatten args))))
;;; reduces a tree to a list of lists
(defun semi-flatten0 (in acc)
(cond
(nil? in) acc
(and (list? (first in)) (list? (first (first in))))
(semi-flatten0 (rest in) (semi-flatten0 (first in) acc))
t (semi-flatten0 (rest in) (cons (first in) acc))))
(defun semi-flatten (in)
(reverse (semi-flatten0 in nil)))
;; macro for x-deflate
;`(defun ,fname (name args expr acc ,@(vars))
; (if expr
; (,fname name args
; ,expr-mod
; ,acc-mod
; ,@(vars-mod))
; (cons ,acc-add acc)))
(defun progn-deflate (name args expr acc)
(if expr
(progn-deflate
name args
(rest expr)
(cons
(list
(if (rest expr)
(list :pop)
(cons nil nil))
(ir0 (if (rest expr) nil name)
args
(first expr) nil))
acc))
acc))
(defun or-deflate (name args end-lab expr acc)
(if expr
(or-deflate name args end-lab
(rest expr)
(cons
(list (list :pop)
(list :jump-not-nil end-lab)
(list :dup)
(ir0 nil args (first expr) nil))
acc))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil))
acc)))
(defun and-deflate (name args false-lab expr acc)
(if expr
(and-deflate name args
false-lab
(rest expr)
(cons (list (if (rest expr)
(list :jump-if-nil false-lab)
(cons nil nil))
(ir0 nil args (first expr) nil))
acc))
(let (end-lab (gensym "and-e"))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil)
(list :label false-lab)
(list :goto end-lab))
acc))))
(defun cond-deflate (name args expr test-lab end-lab acc)
(if expr
(let (test (first expr)
branch (second expr)
next-lab (gensym "cond-"))
(cond-deflate name args
(rest (rest expr)) next-lab end-lab
(cons (list (if name
(cons nil nil)
(list :goto end-lab))
(ir0 name args branch nil)
(list :jump-if-nil next-lab)
(ir0 nil args test nil)
(if test-lab
(list :label test-lab)
(cons nil nil)))
acc)))
(cons (list (if name
(list :return)
(list nil))
(list :label end-lab)
(list :push :nil)
(list :label test-lab))
acc)))
(defun let-deflate0 (args largs bind-list acc)
(if bind-list
(let (largs-new (if (index (first bind-list) largs)
largs
(append largs (first bind-list))))
(let-deflate0 args
largs-new
(rest (rest bind-list))
(cons (list :store (+ (length args)
(index (first bind-list) largs-new)))
(ir0 nil (concat args largs) (second bind-list) nil)
acc)))
(list (concat args largs) acc)))
(defun let-deflate (name args expr)
(let (x (let-deflate0 args nil (first expr) nil)
largs (first x)
bind-ir (second x))
(list
(list :let-pop (gensym "letp") (length args))
(ir0 name largs (second expr) nil)
(list :local-count (gensym "letc") (length largs))
bind-ir)))
;; iterates along list, resolving nested lists with ir0
(defun ir1 (args ast acc)
(cond
(nil? ast) acc
(list? (first ast))
(ir1 args (rest ast)
(concat (ir0 nil args (first ast) nil) acc))
t
(ir1 args (rest ast)
(cons
(if (symbol? (first ast))
(cond
(equal? (first ast) (quote nil)) (list :push :nil)
(equal? (first ast) (quote t)) (list :push :true)
(last-index (first ast) args)
(list :push :arg-num (last-index (first ast) args))
t
(list (list :funcall :envir-get :argc 1)
(list :push :symbol (first ast))))
(list
:push
(cond
(int? (first ast)) :int-const
(string? (first ast)) :str-const
(keyword? (first ast)) :keyword
(equal? (first ast) (quote t)) :true
;; TODO fix bug in compile-time macro expansion that generates t
(equal? (first ast) t) :true
(equal? (first ast) (quote nil)) :nil
t :unknown)
(first ast)))
acc))))
;; first step in code processing
;; turns a tree of lisp code into a stack-based intermediate representation
;; name doubles as a flag for if the expression is in the tail position
(defun ir0 (name args ast acc)
(cond
(nil? ast) (reverse acc)
(not (list? ast))
(list (if name (list :return) (list nil))
(ir1 args (list ast) nil))
(equal? (first ast) (quote if))
(let (false-label (gensym "if-f")
end-label (gensym "if-e"))
(list
(if (not name) (list :label end-label) (cons nil nil))
(if (= (length ast) 4)
;; has an else branch
(ir0 name args (nth 3 ast) nil)
;; no else branch
(list (if name
(list :return)
(cons nil nil))
(list :push :nil)))
(list :label false-label)
(if (nil? name)
(list :goto end-label)
(list nil))
(ir0 name args (third ast) nil)
(list :jump-if-nil false-label)
(ir0 nil args (second ast) nil)))
(equal? (first ast) (quote and))
(and-deflate name args (gensym "and-f") (rest ast) nil)
(equal? (first ast) (quote or))
(or-deflate name args (gensym "or-e") (rest ast) nil)
(equal? (first ast) (quote cond))
(cond-deflate name args (rest ast) nil (gensym "cond-e") nil)
(equal? (first ast) (quote progn))
(progn-deflate name args (rest ast) nil)
(equal? (first ast) (quote let))
(let-deflate name args (rest ast))
(equal? (first ast) (quote quote))
(list (if name (list :return) (list nil))
(reverse (quote-flatten (second ast))))
(equal? (first ast) (quote lambda))
(list (if name (list :return) (list nil))
(closure-flatten (second ast) args (third ast)))
;; TODO: check arg is symbol
(equal? (first ast) (quote def))
(list (if name (list :return) (list nil))
(list :funcall 'envir-set :argc 2)
(ir0 nil args (third ast) nil)
(list :push :symbol (second ast)))
(equal? (first ast) name)
(cons (list :tail-recur :argc (dec (length ast)))
(ir1 args (rest ast) nil))
name (cons (list :return) (ir0 nil args ast acc))
(last-index (first ast) args)
(cons (list :dynamcall :argc (length ast))
(ir1 args ast nil))
t
(cons (list :funcall (first ast) :argc (dec (length ast)))
(ir1 args (rest ast) nil))))
(defun ir (name args ast)
(->> (ir0 name args ast nil)
(semi-flatten)
(reverse)
(filter first)))
(defun u1 (x)
(if (< x 0x100)
(list x)))
(defun u2 (x)
(if (or (< x 0xFFFF) (= x 0xFFFF))
(list (bit-and (bit-asr x 8) 0xFF)
(bit-and x 0xFF))))
(defun u4 (x)
(concat (u2 (// x 0x10000))
(u2 (bit-and x 0xFFFF))))
(defun len1-attribs (const-list)
(u2 (second const-list)))
(defun len2-attribs (const-list)
(concat (u2 (second const-list))
(u2 (third const-list))))
;const-to-bin
(defun const-to-bin (const-list)
(case (first const-list)
:utf8 (cons 0x01 (u2 (length (to-chars (second const-list))))
(string-bytes (second const-list)))
:integer (cons 0x03 (u4 (second const-list)))
:classref (cons 0x07 (len1-attribs const-list))
:string (cons 0x08 (len1-attribs const-list))
:fieldref (cons 0x09 (len2-attribs const-list))
:methodref (cons 0x0A (len2-attribs const-list))
:nametyperef (cons 0x0C (len2-attribs const-list))
(list :unknown const-list)))
(defun pool-search! (constpool expr)
(if (contains? constpool expr)
(first (get constpool expr))
(let (pool-count (get constpool :count 1))
(progn
(insert! constpool expr pool-count)
(insert! constpool :count (inc pool-count))
pool-count))))
(defun pool-get! (constpool expr)
(let (expr (if (string? expr) (list :utf8 expr) expr)
tag (first expr))
(case tag
(:utf8 :integer)
(pool-search! constpool expr)
(:classref :string)
(pool-search!
constpool
(list tag (pool-get! constpool (string (second expr)))))
(:nametyperef :methodref :fieldref)
(pool-search!
constpool
(list tag
(pool-get! constpool (second expr))
(pool-get! constpool (third expr))))
:getstatic
(pool-search!
constpool
(list tag
(pool-get! constpool (second expr))
(pool-get! constpool (third expr))
(pool-get! constpool (fourth expr))))
(print "can't pool-get" expr tag "test"))))
; generates code to store stack onto local args for tail recursion
(defun set-locals (n i acc)
(if (< n i)
acc
(set-locals n (inc i) (cons (list :astore i) acc))))
(defun ir-to-jvm (expr)
(case (first expr)
:return (list :areturn)
:push
(case (nth 1 expr)
:arg-num (list :aload (nth 2 expr))
:nil (list :aconst_null)
:true (list :getstatic
"java/lang/Boolean"
"TRUE"
"Ljava/lang/Boolean;")
:int-const
(list (list :iconst (nth 2 expr))
(list :invokestatic "java/lang/Integer"
"valueOf" "(I)Ljava/lang/Integer;"))
:char-const
(list (list :iconst (integer (nth 2 expr)))
(list :invokestatic "java/lang/Character"
"valueOf" "(C)Ljava/lang/Character;"))
:str-const
(list :ldc (list :string (nth 2 expr)))
:symbol
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Symbol" "makeSymbol"
"(Ljava/lang/String;)LSymbol;"))
:keyword
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Keyword" "makeKeyword"
"(Ljava/lang/String;)LKeyword;"))
(print "ir-to-jvm: can't push" expr))
:store (list :astore (second expr))
:jump-if-nil (cons :ifnull (rest expr))
:jump-not-nil (cons :ifnonnull (rest expr))
:tail-recur (set-locals (dec (nth 2 expr)) 0 (list (list :goto :start)))
:dynamcall (list (list :funcall 'list :argc (dec (third expr)))
(cons :funcall 'invoke :argc (rest expr)))
expr))
;; prepends start label to ir if there are tail recursive calls
(defun check-tco0 (in curr)
(cond
(nil? curr) in
(equal? (first (first curr)) :tail-recur) (cons (list :label :start) in)
t (check-tco0 in (rest curr))))
(defun check-tco (in)
(check-tco0 in in))
(defun funcall-resolve (method-list expr)
(if (equal? (first expr) :funcall)
(let (call (->> (second expr)
(string)
(get method-list)
(first)))
(cond
(nil? call) (print "funcall-resolve can't resolve " call expr)
(lambda? call) (call method-list (fourth expr))
(list? call) (cons :invokestatic call)
t (list :invokestatic call)))
expr))
;; converts a single item of the form (:jvmcode args) into a list of bytes
(defun jvm-assemble (in)
(case (first in)
;; simple bytecode ops
(:aconst_null :pop :dup :areturn :return :nop)
(list (get *bytecodes* (first in) nil))
:aload
(if (< (second in) 4)
(list (+ 0x2A (second in)))
(list 0x19 (second in)))
:astore
(if (< (second in) 4)
(list (+ 0x4B (second in)))
(list 0x3A (second in)))
:iconst
; iconst_<> -> bipush -> sipush -> ldc
(let (val (second in))
(cond
; iconst literal
(and (< (- 2) val) (< val 6)) (list (+ val 3))
; bipush
(and (< (- 129) val) (< val 128)) (list 0x10 val)
t (list :ldc (list :integer val))))
in))
(defun pool-resolve! (pool in)
(case (first in)
(:invokestatic :invokevirtual)
(->> (list :methodref
(list :classref
(second in))
(list :nametyperef
(third in)
(fourth in)))
(pool-get! pool)
(u2)
(cons (first (get *bytecodes* (first in)))))
:getstatic
(->> (nth 3 in)
(list :nametyperef (third in))
(list :fieldref
(list :classref (second in)))
(pool-get! pool)
(u2)
(cons 0xB2))
:ldc
(let (idx (pool-get! pool (second in)))
(if (< idx 0x100)
(cons 0x12 (u1 idx))
(cons 0x13 (u2 idx))))
:checkcast
(->> (second in)
(list :classref)
(pool-get! pool)
(u2)
(cons 0xC0))
in))
;; calculates label byte offsets
(defun label-resolve0! (a b)
(let (labelmap (first a)
offset (second a))
(if (index (first b) (list :label :local-count :let-pop))
(list (insert! labelmap (second b) offset)
offset)
(list labelmap
(+ offset
(cond
(int? (first b)) (length b)
(index (first b) (list :ifnull :ifnonnull :goto)) 3
t (print "unknown label: " b)))))))
(defun label-resolve (bytes)
(first (foldl label-resolve0! (list (hashmap) 0) bytes)))
;; resolves jumps, associates labels with byte offsets
(defun jump-resolve0 (in acc offset labelmap)
(let (expr (first in)
cmd (first expr))
(cond
(nil? in) (reverse acc)
(index cmd (list :ifnull :ifnonnull :goto))
(jump-resolve0 (rest in)
(cons (cons
(get *bytecodes* cmd nil)
(u2 (- (get labelmap (second expr) nil) offset)))
acc)
(+ offset 3)
labelmap)
t (jump-resolve0 (rest in)
(cons expr acc)
(+ offset
(if (int? cmd) (length expr) 0))
labelmap))))
(defun jump-resolve (jvm-asm)
(->> (label-resolve jvm-asm)
(jump-resolve0 jvm-asm nil 0)
(filter (lambda (x) (int? (first x))))))
;; quick and dirty way to get argc from type string
;; should count number of matches for this regex
;; "\([ILFDC(L.*;)]*\)"
(defun count-semi (str idx acc)
(let (c (char-at str idx))
;; do not convert to case. there is a bug with nil
(cond
(index c (list nil (to-char ")"))) acc
(index c (list (to-char "I") (to-char ";"))) (count-semi str (inc idx) (inc acc))
t (count-semi str (inc idx) acc))))
(defun local-info0 (acc expr)
(let (mloc (first acc)
lablist (second acc))
(case (first expr)
;; set based on local tag info
(:local-count :let-pop)
(list (third expr)
(insert! lablist (second expr) (third expr)))
(:ifnull :ifnonnull :goto)
(list mloc
(if (equal? (second expr) :start)
lablist
(insert! lablist (second expr) mloc)))
(list mloc lablist))))
(defun local-info (argc jvm-asm)
(insert!
(second (foldl local-info0 (list argc (hashmap)) jvm-asm))
:start argc))
;stack-info0
;; stack frame object entry of class Object
(defun objvar-info (pool)
(->> "java/lang/Object"
(list :classref)
(pool-get! pool)
(u2)
(cons 0x07)))
(defun sframe1 (offset last-local l-count s-count)
;; https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.7.4
(let (obj (objvar-info pool))
(cond
;; same frame
(and (= s-count 0) (= last-local l-count) (< offset 64))
(list offset)
;; same frame extended
(and (= s-count 0) (= last-local l-count))
(list 251 (u2 offset))
;; same locals 1 stack item
(and (= s-count 1) (= last-local l-count) (< offset 64))
(list (+ offset 64) obj)
;; same locals 1 stack item extended
(and (= s-count 1) (= last-local l-count))
(list 247 (u2 offset) obj)
;; chop frame
(and (= s-count 0) (< l-count last-local) (< (- last-local l-count) 4))
(list (- 251 (- last-local l-count)) (u2 offset))
;; append frame
(and (= s-count 0) (< last-local l-count) (< (- l-count last-local) 4))
(list (+ 251 (- l-count last-local))
(u2 offset)
(repeat obj (- l-count last-local)))
;; full frame
t (list 0xFF (u2 offset)
(if (= l-count 0)
(list (u2 0))
(list (u2 l-count) (repeat obj l-count)))
(if (= s-count 0)
(list (u2 0))
(list (u2 s-count) (repeat obj s-count)))))))
(defun sframe-resolve0 (poff ploc acc lstat)
(progn ;(print poff ploc acc lstat)
(let (item (first lstat)
offset (first item)
stacks (second item)
locals (third item))
(if (nil? lstat)
(reverse acc)
(sframe-resolve0
offset
locals
(cons (sframe1 (dec (- offset poff)) ploc locals stacks) acc)
(rest lstat))))))
(defun sframe-resolve (argc offsets stack-i local-i)
(->> (keyvals offsets)
(msort (lambda (a b) (< (second a) (second b))))
;(print-iden)
(map (lambda (x)
(list (second x)
(get stack-i (first x) nil)
(get local-i (first x) nil))))
(filter (lambda (x) (second x)))
(sframe-resolve0 (- 1) argc nil)))
(defun arg-count (args)
(if (index :rest args)
(inc (index :rest args))
(length args)))
| 33,753 | Common Lisp | .lisp | 1,000 | 26.108 | 87 | 0.537026 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 24881f6c846cdf7e61187ca049145cee88198edd0b192dbb163b82565c6a76fc | 16,240 | [
-1
] |
16,241 | jvmtable.lisp | davidsun0_lateral/interpreter/jvm/jvmtable.lisp | (def *bytecodes* (hashmap))
(insert! *bytecodes* :aconst_null 0x01)
(insert! *bytecodes* :ldc 0x12)
(insert! *bytecodes* :ldc_w 0x13)
(insert! *bytecodes* :aload 0x19)
(insert! *bytecodes* :astore 0x3A)
(insert! *bytecodes* :pop 0x57)
(insert! *bytecodes* :dup 0x59)
(insert! *bytecodes* :goto 0xA7)
(insert! *bytecodes* :areturn 0xB0)
(insert! *bytecodes* :return 0xB1)
(insert! *bytecodes* :getstatic 0xB2)
(insert! *bytecodes* :invokevirtual 0xB6)
(insert! *bytecodes* :invokestatic 0xB8)
(insert! *bytecodes* :checkcast 0xC0)
(insert! *bytecodes* :ifnull 0xC6)
(insert! *bytecodes* :ifnonnull 0xC7)
;; core method list
(def *method-list* (hashmap))
(defun method-type (argc)
(->> (list ")Ljava/lang/Object;")
(repeat0 "Ljava/lang/Object;" argc)
(cons "(")
(apply string)))
(defun insert-method (sym class name argc)
(insert! *method-list* sym
(list class name (method-type argc))))
;(defmacro reduce-method (sym)
; `(lambda (ml n)
; (repeat (dec n)
; (funcall-resolve
; ml
; (list :funcall ,sym :argc 2)))))
(insert-method "first" "Lang" "car" 1)
(insert-method "rest" "Lang" "cdr" 1)
(insert-method "cons0" "Lang" "cons0" 2)
(insert! *method-list* "cons"
(lambda (ml n)
(repeat (funcall-resolve
ml
(list :funcall (quote cons0) :argc 2))
(dec n))))
(insert! *method-list* "list"
(lambda (ml n)
(cons (list :aconst_null)
(funcall-resolve
ml
(list :funcall (quote cons) :argc (inc n))))))
;(insert! *method-list* "+"
; (lambda (ml n)
; (repeat (funcall-resolve
; ml
; (list :funcall (quote add0) :argc 2))
; (dec n))))
;(insert-method "subtract0" "Lang" "subtract0" 2)
;(insert! *method-list* "-"
; (lambda (ml n)
; (repeat (funcall-resolve
; ml
; (list :funcall (quote subtract0) :argc 2))
; (dec n))))
(insert-method "contains?" "Lang" "contains_p" 2)
(insert-method "equal?" "Lang" "equal_p" 2)
(insert-method "char" "Lang" "to_char" 1)
(insert-method "char-at" "Lang" "char_at" 2)
(insert-method "substr" "Lang" "substr" 3)
(insert-method "string-bytes" "Lang" "string_bytes" 1)
(insert-method "whitespace?" "Lang" "whitespace_p" 1)
(insert-method "pprint0" "Lang" "pprint0" 1)
(insert-method "print0" "Lang" "print0" 1)
(insert-method "=" "Lang" "isNumericallyEqual" 2)
(insert-method "<" "Lang" "less_than0" 2)
(insert-method "//" "Lang" "divide" 2)
(insert-method "add0" "Lang" "add0" 2)
(insert-method "negate" "Lang" "negate" 1)
(insert-method "bit-asr" "Lang" "bit_asr" 2)
(insert-method "bit-and" "Lang" "bit_and" 2)
(insert-method "slurp" "Lang" "slurp" 1)
(insert-method "readline" "Lang" "readLine" 0)
(insert-method "read-atom0" "Helper" "readAtom" 1)
(insert-method "make-lambda" "Lang" "lambda" 2)
(insert-method "make-macro" "Lang" "macro" 2)
(insert-method "make-envir" "Lang" "make_envir" 1)
(insert-method "user-envir" "Runtime" "getUserEnvir" 0)
(insert-method "envir-set" "Runtime" "envir_set" 2)
(insert-method "envir-get" "Runtime" "envir_get" 1)
(insert-method "native-invoke" "Lang" "nativeInvoke" 2)
(insert-method "invoke" "Lateral" "lambda-invoke" 2)
(insert-method "int?" "Lang" "int_p" 1)
(insert-method "string?" "Lang" "string_p" 1)
(insert-method "keyword?" "Lang" "keyword_p" 1)
(insert-method "symbol?" "Lang" "symbol_p" 1)
(insert-method "list?" "Lang" "list_p" 1)
(insert-method "lambda?" "Lang" "lambda_p" 1)
(insert-method "native-fn?" "Lang" "native_p" 1)
(insert-method "macro?" "Lang" "macro_p" 1)
; TODO: convert java functions to variadic args
(insert-method "string0" "Lang" "string0" 1)
(insert-method "integer" "Lang" "integer" 1)
(insert-method "symbol" "Lang" "symbol" 1)
(insert-method "hashmap" "Lang" "hashmap" 0)
(insert-method "to-char" "Lang" "to_char" 1)
(insert-method "insert!" "Lang" "insert_b" 3)
(insert-method "get0" "Lang" "get0" 2)
(insert-method "keyvals" "Lang" "keyvals" 1)
(insert-method "get-args" "Lang" "get_args" 1)
(insert-method "get-expr" "Lang" "get_expr" 1)
| 4,261 | Common Lisp | .lisp | 107 | 36.719626 | 65 | 0.625182 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 79d2c38fa70e6fba770a36bc3fb2814751ca55041b94a1f46d62da59b43f2491 | 16,241 | [
-1
] |
16,242 | ir.lisp | davidsun0_lateral/interpreter/jvm/ir.lisp | ;; expands macros, part1
(defun ast-analysis0 (in)
(if (list? in)
(ast-analysis1 in nil)
in))
;; expands macros, part2
(defun ast-analysis1 (in acc)
(cond
(nil? in) (reverse acc)
(and (nil? acc) (contains? macros (first in)))
(ast-analysis0 (macro-expand (get macros nil) in))
t (ast-analysis1 (rest in) (cons (ast-analysis0 (first in)) acc))))
;; extracts lambdas
(defun lambda-extr0 (in lambdas)
(if (list? in)
(lambda-extr1 in nil nil)
(list in nil)))
;; extracts lambdas, part2
(defun lambda-extr1 (in acc lambdas)
(cond
(nil? in) (cons (reverse acc) lambdas)
(and (nil? acc) (equal? (quote quote) (first in))) (list in)
(and (nil? acc) (equal? (quote lambda) (first in)))
(let (l-name (gensym "lambda"))
;; TODO: handle nested lambdas
(cons l-name (cons l-name (rest in)) lambdas))
t
(let (e-l (lambda-extr0 (first in) nil)
expr (first e-l)
lamb (second e-l))
(lambda-extr1 (rest in)
(cons expr acc)
(if (nil? lamb)
lambdas
(cons lamb lambdas))))))
;;; reduces a tree to a list of lists
(defun semi-flatten0 (in acc)
(cond
(nil? in) acc
(and (list? (first in)) (list? (first (first in))))
(semi-flatten0 (rest in) (semi-flatten0 (first in) acc))
t (semi-flatten0 (rest in) (cons (first in) acc))))
(defun semi-flatten (in)
(reverse (semi-flatten0 in nil)))
;; macro for x-deflate
;`(defun ,fname (name args largs expr acc ,@(vars))
; (if expr
; (,fname name args largs
; ,expr-mod
; ,acc-mod
; ,@(vars-mod))
; (cons ,acc-add acc)))
(defun progn-deflate (name args largs expr acc)
(if expr
(progn-deflate
name args largs
(rest expr)
(cons
(list
(if (rest expr)
(list :pop)
(cons nil nil))
(ir0 (if (rest expr) nil name)
args largs
(first expr) nil))
acc))
acc))
(defun or-deflate (name args largs end-lab expr acc)
(if expr
(or-deflate name args largs end-lab
(rest expr)
(cons
(list (list :pop)
(list :jump-not-nil end-lab)
(list :dup)
(ir0 nil args largs (first expr) nil))
acc))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil))
acc)))
(defun and-deflate (name args largs false-lab expr acc)
(if expr
(and-deflate name args largs
false-lab
(rest expr)
(cons (list (if (rest expr)
(list :jump-if-nil false-lab)
(cons nil nil))
(ir0 nil args largs (first expr) nil))
acc))
(let (end-lab (gensym "and-e"))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil)
(list :label false-lab)
(list :goto end-lab))
acc))))
(defun cond-deflate (name args largs expr test-lab end-lab acc)
(if expr
(let (test (first expr)
branch (second expr)
next-lab (gensym "cond-"))
(cond-deflate name args largs
(rest (rest expr)) next-lab end-lab
(cons (list (if name
(cons nil nil)
(list :goto end-lab))
(ir0 name args largs branch nil)
(list :jump-if-nil next-lab)
(ir0 nil args largs test nil)
(if test-lab
(list :label test-lab)
(cons nil nil)))
acc)))
(cons (list (if name
(list :return)
(list nil))
(list :label end-lab)
(list :push :nil)
(list :label test-lab))
acc)))
(defun let-deflate0 (args largs bind-list acc)
(if bind-list
(let (largs-new (if (index (first bind-list) largs)
largs
(append largs (first bind-list))))
(let-deflate0 args
largs-new
(rest (rest bind-list))
;; store expression into local var
(cons (list :store (+ (length args)
(index (first bind-list) largs-new)))
;; ir0 uses old largs because current bind var hasn't
;; been assigned yet
;; ir for expression
(ir0 nil args largs (second bind-list) nil)
acc)))
(list largs acc)))
(defun let-deflate (name args largs expr)
(let (x (let-deflate0 args largs (first expr) nil)
largs (first x)
bind-ir (second x))
(list
(list :let-pop (gensym "letp") (length args))
(ir0 name args largs (second expr) nil)
(list :local-count (gensym "letc") (+ (length args) (length largs)))
bind-ir)))
;; iterates along list, resolving nested lists with ir0
(defun ir1 (args largs ast acc)
(cond
(nil? ast) acc
(list? (first ast))
(ir1 args largs (rest ast)
(concat (ir0 nil args largs (first ast) nil) acc))
t
(ir1 args largs (rest ast)
(cons
(if (symbol? (first ast))
(cond
(equal? (first ast) (quote nil)) (list :push :nil)
(equal? (first ast) (quote t)) (list :push :true)
(index (first ast) largs)
(list :push :arg-num (+ (length args) (index (first ast) largs)))
(index (first ast) args)
(list :push :arg-num (index (first ast) args))
t
(list (list :funcall :envir-get :argc 1)
(list :push :symbol (first ast))))
(list
:push
(cond
(int? (first ast)) :int-const
(string? (first ast)) :str-const
(keyword? (first ast)) :keyword
(equal? (first ast) (quote t)) :true
(equal? (first ast) (quote nil)) :nil
t :unknown)
(first ast)))
acc))))
;; first step in code processing
;; turns a tree of lisp code into a stack-based intermediate representation
;; name doubles as a flag for if the expression is in the tail position
(defun ir0 (name args largs ast acc)
(cond
(nil? ast) (reverse acc)
(not (list? ast))
(list (if name (list :return) (list nil))
(ir1 args largs (list ast) nil))
(equal? (first ast) (quote if))
(let (false-label (gensym "if-f")
end-label (gensym "if-e"))
(list
(if (not name) (list :label end-label) (cons nil nil))
(if (= (length ast) 4)
;; has an else branch
(ir0 name args largs (nth 3 ast) nil)
;; no else branch
(list (if name
(list :return)
(cons nil nil))
(list :push :nil)))
(list :label false-label)
(if (nil? name)
(list :goto end-label)
(list nil))
(ir0 name args largs (third ast) nil)
(list :jump-if-nil false-label)
(ir0 nil args largs (second ast) nil)))
(equal? (first ast) (quote and))
(and-deflate name args largs (gensym "and-f") (rest ast) nil)
(equal? (first ast) (quote or))
(or-deflate name args largs (gensym "or-e") (rest ast) nil)
(equal? (first ast) (quote cond))
(cond-deflate name args largs (rest ast) nil (gensym "cond-e") nil)
(equal? (first ast) (quote progn))
(progn-deflate name args largs (rest ast) nil)
(equal? (first ast) (quote let))
(let-deflate name (concat args largs) nil (rest ast))
(equal? (first ast) (quote quote))
;(list (list :push :quote (second ast)))
(list (if name (list :return) (list nil))
(list :push :symbol (second ast)))
(equal? (first ast) (quote lambda))
(list (list :lambda ast))
;; TODO: check arg is symbol
(equal? (first ast) (quote def))
(list (if name (list :return) (list nil))
(list :funcall :envir-set :argc 2)
(ir0 nil args largs (third ast) nil)
(list :push :symbol (second ast)))
(equal? (first ast) name)
(cons (list :tail-recur :argc (dec (length ast)))
(ir1 args largs (rest ast) nil))
name (cons (list :return) (ir0 nil args largs ast acc))
(or (index (first ast) args)
(index (first ast) largs))
(cons (list :dynamcall :argc (length ast))
(ir1 args largs ast nil))
t
(cons (list :funcall (first ast) :argc (dec (length ast)))
(ir1 args largs (rest ast) nil))))
(defun ir (name args ast)
; remove '(nil) generated in ir0
(filter first
(reverse (semi-flatten (ir0 name args nil ast nil)))))
| 9,310 | Common Lisp | .lisp | 250 | 26.444 | 80 | 0.510532 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 911c846681a016690642950a2ec6a14e588ba126f12380a65f1cb0c5e088f804 | 16,242 | [
-1
] |
16,243 | read.lisp | davidsun0_lateral/interpreter/jvm/read.lisp | (def *read-pos* 0)
(def *read-tail* 0)
(def *read-str* nil)
(defun r-peek (off)
(if *read-str*
(->> (+ *read-pos* off)
(char-at *read-str*))))
;(defun r-peek (off)
; (if *read-str*
; (char-at *read-str* (+ *read-pos* off))))
(defun r-next! ()
(let (x (r-peek 0))
(progn
(def *read-pos* (inc *read-pos*))
x)))
(defun r-get ()
(substr *read-str* *read-tail* *read-pos*))
(defun wait-for (ch)
(let (x (r-peek 0))
(cond
(nil? x) nil
(equal? x ch) ch
t (progn (r-next!) (wait-for ch)))))
(defun read-atom1 (state)
(let (ch (r-peek 0))
(cond
(equal? state :string)
(cond
(nil? ch) (print "unexpected EOF in string")
(and (equal? ch "\\")
(or (equal? (r-peek 1) "\"")
(equal? (r-peek 1) "n")
(equal? (r-peek 1) "\\")))
(progn (r-next!) (r-next!) (read-atom1 state))
(equal? ch "\"")
(progn (r-next!) (read-atom0 (r-get)))
t (progn (r-next!) (read-atom1 state)))
(or (nil? ch) (equal? ch ")") (whitespace? ch) (equal? ch "\n"))
(read-atom0 (r-get))
t (progn (r-next!) (read-atom1 state)))))
(defun read-atom ()
(let (ch (r-peek 0))
(cond
(equal? ch "\"") (progn (r-next!) (read-atom1 :string))
t (read-atom1 nil))))
(defun read-form ()
(let (ch (r-peek 0))
(cond
(nil? ch) nil
(whitespace? ch) (progn (r-next!) (read-form))
(equal? ch ";") (progn (wait-for "\n") (read-form))
(equal? ch "'") (progn (r-next!) (list (quote quote) (read-form)))
(equal? ch "`") (progn (r-next!) (read-quasi))
(equal? ch "(") (progn (r-next!) (read-list nil))
(equal? ch ")") (print "unexpected )")
t (progn (def *read-tail* *read-pos*) (read-atom)))))
(defun read-list (acc)
(let (ch (r-peek 0))
(cond
(nil? ch) (print "unexpected eof")
(whitespace? ch) (progn (r-next!) (read-list acc))
(equal? ch ")") (progn (r-next!) (reverse acc))
t (read-list (cons (read-form) acc)))))
(defun read-quasi ()
(progn (print "next:" (r-peek 0))
(cond
(equal? (r-peek 0) ",")
(if (equal? (r-peek 1) "@")
(print "can't uquote splicing")
(progn (r-next!) (read-form)))
(equal? (r-peek 0) "`") (progn (r-next!) (read-quasi))
(equal? (r-peek 0) "(") (progn (r-next!) (read-quasi-list nil))
t (list 'quote (read-form)))))
(defun read-quasi-list (acc)
(progn (print "rl next: " (r-peek 0))
(cond
(equal? (r-peek 0) ")") (cons 'concat (reverse acc))
(whitespace? (r-peek 0)) (progn (r-next!) (read-quasi-list acc))
(equal? (r-peek 0) ",")
(progn
(r-next!)
(read-quasi-list
(cons
(if (equal? (r-peek 0) "@")
(progn (r-next!) (read-form))
(list 'list (read-form)))
acc)))
(equal? (r-peek 0) "`")
(progn (r-next!) (read-quasi-list (cons (list 'list (read-quasi)) acc)))
t (read-quasi-list (cons (list 'list (list 'quote (read-form))) acc))
)))
(defun read (str)
(progn
(if str
(progn
(def *read-str* str)
(def *read-pos* 0)))
(read-form)))
(defun read-all0 (acc)
(let (sexpr (read nil))
(if sexpr
(read-all0 (cons sexpr acc))
(reverse acc))))
(defun read-all (path)
(read-all0 (list (read (slurp path)))))
(defun nil? (p)
(if p nil t))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons0 (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
| 3,516 | Common Lisp | .lisp | 113 | 25.628319 | 76 | 0.527753 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | aeeb0ab92275e16107f1a5339d1bd6bffe68667d755aa0cdf6b58e3b76c03120 | 16,243 | [
-1
] |
16,244 | core.lisp | davidsun0_lateral/interpreter/jvm/core.lisp | ; runtime list
; TODO: move to Runtime.java
(def list (lambda (:rest l) l))
(defmacro defun (name args expr)
(list (quote def)
name
(list (quote lambda) args expr)))
;(defmacro defun (name args expr)
; `(def ,name (lambda ,args ,expr))
; TODO: move to Runtime.java
(defun cons1 (in acc)
(if in
(cons1 (rest in) (cons0 (first in) acc))
acc))
; TODO: move to Runtime.java
(defun cons (:rest l)
(let (rl (reverse l))
(cons1 (rest rl) (first rl))))
;; clojure threading macros
(defun ->0 (exprs acc)
(if exprs
(->0 (rest exprs)
(cons (first (first exprs))
acc
(rest (first exprs))))
acc))
(defun ->>0 (exprs acc)
(if exprs
(->>0 (rest exprs) (append (first exprs) acc))
acc))
(defmacro -> (:rest exprs)
(->0 (rest exprs) (first exprs)))
(defmacro ->> (:rest exprs)
(->>0 (rest exprs) (first exprs)))
;; convinience macros
(defun case0 (term exprs acc)
(cond
(not exprs) (reverse acc)
(nil? (rest exprs)) (reverse (cons (first exprs) 't acc))
t (case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote equal?) (first exprs) term)
acc)))))
;; bug when nil in a case list
(defun case0 (term exprs acc)
(cond
(not exprs) (reverse acc)
;; append else clause
(nil? (rest exprs)) (reverse (cons (first exprs) t acc))
;; list to match
(list? (first exprs))
(case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote index)
term
(list (quote quote) (first exprs)))
acc)))
;; single term
t (case0 term
(rest (rest exprs))
(cons (second exprs)
(cons (list (quote equal?) (first exprs) term)
acc)))))
;(defun case1 (terms)
; (let (val (gensym "case-"))
; `(let (,val ,(first terms))
; ,(cons 'cond (case0 val (rest terms) nil)))))
;; TODO: wrap in let and only eval term once
(defun case1 (terms)
(let (val (gensym))
(list (quote let)
(list val (first terms))
(cons (quote cond)
(case0 val
(rest terms)
nil)))))
(defmacro case (:rest terms)
(case1 terms))
(defun print (:rest args)
(print1 args))
(defun pprint (:rest args)
(pprint1 args))
(defun string (:rest args)
(string0 args))
(defun print-iden (x)
(progn
(print x)
x))
; optional arguments?
(defun get (hmap key :rest missing)
(cond
(nil? missing) (get0 hmap key)
(second (get0 hmap key)) (first (get0 hmap key))
t (first missing)))
(defun char? (o) (equal? (type o) :char))
;; functional favorites
(defun map0 (fn in acc)
(if in
(map0 fn (rest in) (cons (fn (first in)) acc))
acc))
(defun map (fn in)
(reverse (map0 fn in nil)))
(defun apply (fun args)
(eval (cons fun (map (lambda (x) (list (quote quote) x)) args))))
(defun reduce0 (fn in acc)
(if in
(reduce0 fn (rest in) (fn acc (first in)))
acc))
(defun reduce (fn in)
(reduce0 fn
(rest (rest in))
(fn (first in) (nth 1 in))))
(defun filter0 (pred in acc)
(cond
(not in) acc
(pred (first in)) (filter0 pred (rest in) (cons (first in) acc))
t (filter0 pred (rest in) acc)))
(defun filter (pred in)
(reverse (filter0 pred in nil)))
(defun foldl (fun acc in)
(if in
(foldl fun (fun acc (first in)) (rest in))
acc))
(defun max (:rest in)
(if (rest in)
(reduce (lambda (a b) (if (< a b) b a)) in)
(first in)))
;; list functions
(defun concat0 (head llist acc)
(cond
(and (nil? head) (nil? llist)) (reverse acc)
(nil? head) (concat0 (first llist) (rest llist) acc)
t (concat0 (rest head) llist (cons (first head) acc))))
(defun concat (:rest args)
(concat0 (first args) (rest args) nil))
(defun last (in)
(if (rest in)
(last (rest in))
(first in)))
;(defun reverse0 (in acc)
; (if in
; (reverse0 (rest in) (cons0 (first in) acc))
; acc))
(defun repeat0 (key times acc)
(if (< times 1)
acc
(repeat0 key (dec times) (cons key acc))))
(defun repeat (key times)
(repeat0 key times nil))
;; other functions, they might be useful
(defun split0 (lst n acc)
(if (> n 0)
(split0 (rest lst) (dec n) (cons (first lst) acc))
(list (reverse acc) lst)))
(defun msort0 (comp a b acc)
(cond
(and (nil? a) (nil? b)) (reverse acc)
(nil? b) (msort0 comp (rest a) b (cons (first a) acc))
(nil? a) (msort0 comp a (rest b) (cons (first b) acc))
(comp (first a) (first b)) (msort0 comp (rest a) b (cons (first a) acc))
t (msort0 comp a (rest b) (cons (first b) acc))))
(defun msort (comp in)
(let (len (length in)
halves (split0 in (// len 2) nil))
(if (<= len 1)
in
(msort0 comp
(msort comp (first halves))
(msort comp (second halves))
nil))))
(defun > (a b) (not (or (= a b) (< a b))))
(defun <= (a b) (or (< a b) (= a b)))
(defun >= (a b) (or (> a b) (= a b)))
(defun to-chars0 (s i acc)
(if (char-at s i)
(to-chars0 s (inc i) (cons (char-at s i) acc))
(reverse acc)))
(defun to-chars (s)
(to-chars0 s 0 nil))
(defun *0 (a b acc)
(if (< 0 a)
(*0 (dec a) b (+ b acc))
acc))
| 5,394 | Common Lisp | .lisp | 185 | 23.810811 | 76 | 0.564788 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | a804f40d1a6821d5d036c2b53549746436961c0c63585f85f13bd9b358fa90a6 | 16,244 | [
-1
] |
16,245 | test.lisp | davidsun0_lateral/interpreter/jvm/test.lisp | (defun addn (n)
(lambda (x) (+ n x)))
(defun print1 (plist)
(if plist
(progn (print0 (first plist))
(pprint0 " ")
(print1 (rest plist)))
(pprint0 "\n")))
(defun print (:rest x)
(print1 x))
(defun main ()
(let (f (addn 5))
(progn
(print addn)
(print 1 2 3 4 5)
(print (map (lambda (x) (+ x 100))
(list 1 2 3 4 5)))
(print (f 100))
(print (f 0))
(print (map f (list 10 9 8 7 6))))))
(defun test ()
(->> '(int? (first x) (a (b c)))
(closure-flatten1 '(x) nil)
(semi-flatten)
;(reverse)
(map print)
))
(defun closure-flatten0 (args locals ast acc)
(cond
(nil? ast) (reverse acc)
(list? ast) (closure-flatten0
args
locals
(rest ast)
(cons (closure-flatten1 args locals (first ast)) acc))
(index ast args) (list :push :symbol ast)
(index ast locals) (list :push :arg-num (index ast locals))
(int? ast) (list :push :int-const ast)
(string? ast) (list :push :str-const ast)
(keyword? ast) (list :push :keyword ast)
(symbol? ast)
(list
(list :push :symbol 'quote)
(list :push :symbol ast)
(list :funcall 'envir-get :argc 1)
(list :funcall 'list :argc 2)
)
t (print "closure-flatten0 can't handle" ast)))
(defun closure-flatten1 (args locals ast)
(if (list? ast)
(list (closure-flatten0 args locals ast nil)
(list :funcall 'list :argc (length ast)))
(closure-flatten0 args locals ast nil)))
| 1,585 | Common Lisp | .lisp | 53 | 23.169811 | 72 | 0.548917 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 55d3f666d1a66c3e8c46366bd27b7bdc1d39ca545efb22255a5a093264233302 | 16,245 | [
-1
] |
16,246 | lc2.lisp | davidsun0_lateral/interpreter/jvm/lc2.lisp | (include "jvmtable.lisp")
(defun ir (name args ast)
(->> (ir0 name args ast nil)
(semi-flatten)
(reverse)
(filter first)))
(defun u1 (x)
(if (< x 0x100)
(list x)
(throw "int too large for 1 byte")))
(defun u2 (x)
(if (or (< x 0xFFFF) (= x 0xFFFF))
(list (bit-and (bit-asr x 8) 0xFF)
(bit-and x 0xFF))
(throw "int too large for 2 bytes")))
(defun u4 (x)
(concat (u2 (// x 0x10000))
(u2 (bit-and x 0xFFFF))))
(defun len1-attribs (const-list)
(u2 (nth 1 const-list)))
(defun len2-attribs (const-list)
(concat (u2 (nth 1 const-list))
(u2 (nth 2 const-list))))
(defun const-to-bin (const-list)
(case (first const-list)
:utf8 (cons 0x01 (u2 (length (to-chars (second const-list))))
(string-bytes (second const-list)))
:integer (cons 0x03 (u4 (second const-list)))
:classref (cons 0x07 (len1-attribs const-list))
:string (cons 0x08 (len1-attribs const-list))
:fieldref (cons 0x09 (len2-attribs const-list))
:methodref (cons 0x0A (len2-attribs const-list))
:nametyperef (cons 0x0C (len2-attribs const-list))
(list :unknown const-list)))
(defun pool-search! (constpool expr)
(if (contains? constpool expr)
(first (get constpool expr))
(let (pool-count (get constpool :count 1))
(progn
(insert! constpool expr pool-count)
(insert! constpool :count (inc pool-count))
pool-count))))
(defun pool-get! (constpool expr)
(let (expr (if (string? expr) (list :utf8 expr) expr)
tag (first expr))
(case tag
(:utf8 :integer)
(pool-search! constpool expr)
(:classref :string)
(pool-search!
constpool
(list tag (pool-get! constpool (string (second expr)))))
(:nametyperef :methodref :fieldref)
(pool-search!
constpool
(list tag
(pool-get! constpool (second expr))
(pool-get! constpool (third expr))))
:getstatic
(pool-search!
constpool
(list tag
(pool-get! constpool (second expr))
(pool-get! constpool (third expr))
(pool-get! constpool (fourth expr))))
(throw "can't pool-get" expr tag "test"))))
; generates code to store stack onto local args for tail recursion
(defun set-locals (n i acc)
(if (< n i)
acc
(set-locals n (inc i) (cons (list :astore i) acc))))
(defun ir-to-jvm (expr)
(case (first expr)
:return (list :areturn)
:push
(case (nth 1 expr)
:arg-num (list :aload (nth 2 expr))
:nil (list :aconst_null)
:true (list :getstatic
"java/lang/Boolean"
"TRUE"
"Ljava/lang/Boolean;")
:int-const
(list (list :iconst (nth 2 expr))
(list :invokestatic "java/lang/Integer"
"valueOf" "(I)Ljava/lang/Integer;"))
:char-const
(list (list :iconst (integer (nth 2 expr)))
(list :invokestatic "java/lang/Character"
"valueOf" "(C)Ljava/lang/Character;"))
:str-const
(list :ldc (list :string (nth 2 expr)))
:symbol
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Symbol" "makeSymbol"
"(Ljava/lang/String;)LSymbol;"))
:keyword
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Keyword" "makeKeyword"
"(Ljava/lang/String;)LKeyword;"))
(progn (print "ir-to-jvm: can't push" expr) (throw "error")))
:store (list :astore (second expr))
:jump-if-nil (cons :ifnull (rest expr))
:jump-not-nil (cons :ifnonnull (rest expr))
:tail-recur (set-locals (dec (nth 2 expr)) 0 (list (list :goto :start)))
:dynamcall (list (list :funcall 'list :argc (dec (third expr)))
(cons :funcall 'invoke :argc (rest expr)))
expr))
;; prepends start label to ir if there are tail recursive calls
(defun check-tco0 (in curr)
(cond
(nil? curr) in
(equal? (first (first curr)) :tail-recur) (cons (list :label :start) in)
t (check-tco0 in (rest curr))))
(defun check-tco (in)
(check-tco0 in in))
(defun funcall-resolve (method-list expr)
(if (equal? (first expr) :funcall)
(let (call (->> (second expr)
(string)
(get method-list)
(first)))
(cond
(nil? call) (print "funcall-resolve can't resolve " call expr)
(lambda? call) (call method-list (fourth expr))
(list? call) (cons :invokestatic call)
t (list :invokestatic call)))
expr))
;; converts a single item of the form (:jvmcode args) into a list of bytes
(defun jvm-assemble (in)
(case (first in)
;; simple bytecode ops
(:aconst_null :pop :dup :areturn :return :nop)
(list (get *bytecodes* (first in) nil))
:aload
(if (< (second in) 4)
(list (+ 0x2A (second in)))
(list 0x19 (second in)))
:astore
(if (< (second in) 4)
(list (+ 0x4B (second in)))
(list 0x3A (second in)))
:iconst
; iconst_<> -> bipush -> sipush -> ldc
(let (val (second in))
(cond
; iconst literal
(and (< (- 2) val) (< val 6)) (list (+ val 3))
; bipush
(and (< (- 129) val) (< val 128)) (list 0x10 val)
t (list :ldc (list :integer val))))
in))
(defun pool-resolve! (pool in)
(case (first in)
(:invokestatic :invokevirtual)
(->> (list :methodref
(list :classref
(second in))
(list :nametyperef
(third in)
(fourth in)))
(pool-get! pool)
(u2)
(cons (first (get *bytecodes* (first in)))))
:getstatic
(->> (nth 3 in)
(list :nametyperef (third in))
(list :fieldref
(list :classref (second in)))
(pool-get! pool)
(u2)
(cons 0xB2))
:ldc
(let (idx (pool-get! pool (second in)))
(if (< idx 0x100)
(cons 0x12 (u1 idx))
(cons 0x13 (u2 idx))))
in))
;; calculates label byte offsets
(defun label-resolve0! (a b)
(let (labelmap (first a)
offset (second a)
;_ (print b)
)
(if (index (first b) (list :label :local-count :let-pop))
(list (insert! labelmap (second b) offset)
offset)
(list labelmap
(+ offset
(cond
(int? (first b)) (length b)
(index (first b) (list :ifnull :ifnonnull :goto)) 3
t (print "unknown label: " b)))))))
(defun label-resolve (bytes)
(first (foldl label-resolve0! (list (hashmap) 0) bytes)))
;; resolves jumps, associates labels with byte offsets
(defun jump-resolve0 (in acc offset labelmap)
(let (expr (first in)
cmd (first expr))
(cond
(nil? in) (reverse acc)
(index cmd (list :ifnull :ifnonnull :goto))
(jump-resolve0 (rest in)
(cons (cons
(get *bytecodes* cmd nil)
(u2 (- (get labelmap (second expr) nil) offset)))
acc)
(+ offset 3)
labelmap)
t (jump-resolve0 (rest in)
(cons expr acc)
(+ offset
(if (int? cmd) (length expr) 0))
labelmap))))
(defun jump-resolve (jvm-asm)
(->> (label-resolve jvm-asm)
(jump-resolve0 jvm-asm nil 0)
(filter (lambda (x) (int? (first x))))))
;; quick and dirty way to get argc from type string
;; should count number of matches for this regex
;; "\([ILFDC(L.*;)]*\)"
(defun count-semi (str idx acc)
(let (c (char-at str idx))
;; do not convert to case. there is a bug with nil
(cond
(index c (list nil (to-char ")"))) acc
(index c (list (to-char "I") (to-char ";"))) (count-semi str (inc idx) (inc acc))
t (count-semi str (inc idx) acc))))
(defun local-info0 (acc expr)
(let (mloc (first acc)
lablist (second acc))
(case (first expr)
;; set based on local tag info
(:local-count :let-pop)
(list (third expr)
(insert! lablist (second expr) (third expr)))
(:ifnull :ifnonnull :goto)
(list mloc
(if (equal? (second expr) :start)
lablist
(insert! lablist (second expr) mloc)))
(list mloc lablist))))
(defun local-info (argc jvm-asm)
(insert!
(second (foldl local-info0 (list argc (hashmap)) jvm-asm))
:start argc))
(defun stack-info0 (acc expr)
(let (cstack (second acc)
mstack (if (< (first acc) cstack)
cstack
(first acc))
lablist (third acc))
(case (first expr)
;; stack +1
(:aload :aconst_null :iconst :dup :getstatic :ldc)
(list mstack (inc cstack) lablist)
;; stack -1
;; goto decrements the stack when jumping to another branch
;; except goto to start keeps the stack the same
(:areturn :pop :astore :ifnull :ifnonnull :goto)
(list mstack
(if (equal? expr (quote (:goto :start)))
cstack
(dec cstack))
(cond
(equal? (first expr) :goto)
(insert! lablist (second expr) cstack)
(index (first expr) (list :goto :ifnull :ifnonnull))
(insert! lablist (second expr) (dec cstack))
t lablist))
;; stack +- 0
(:label :return :let-pop :local-count)
(list mstack cstack
(if (equal? (first expr) :goto)
(insert! lablist (second expr) cstack)
lablist))
;; stack - argc + 1
:invokestatic
(list mstack
(- cstack (dec (count-semi (nth 3 expr) 0 0)))
lablist)
(progn
(print "stack-info0 can't handle " expr)
(list mstack cstack lablist)))))
;; stack frame object entry of class Object
(defun objvar-info (pool)
(->> "java/lang/Object"
(list :classref)
(pool-get! pool)
(u2)
(cons 0x07)))
(defun sframe1 (offset last-local l-count s-count)
;; https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.7.4
(let (obj (objvar-info pool))
(cond
;; same frame
(and (= s-count 0) (= last-local l-count) (< offset 64))
(list offset)
;; same frame extended
(and (= s-count 0) (= last-local l-count))
(list 251 (u2 offset))
;; same locals 1 stack item
(and (= s-count 1) (= last-local l-count) (< offset 64))
(list (+ offset 64) obj)
;; same locals 1 stack item extended
(and (= s-count 1) (= last-local l-count))
(list 247 (u2 offset) obj)
;; chop frame
(and (= s-count 0) (< l-count last-local) (< (- last-local l-count) 4))
(list (- 251 (- last-local l-count)) (u2 offset))
;; append frame
(and (= s-count 0) (< last-local l-count) (< (- l-count last-local) 4))
(list (+ 251 (- l-count last-local))
(u2 offset)
(repeat obj (- l-count last-local)))
;; full frame
t (list 0xFF (u2 offset)
(if (= l-count 0)
(list (u2 0))
(list (u2 l-count) (repeat obj l-count)))
(if (= s-count 0)
(list (u2 0))
(list (u2 s-count) (repeat obj s-count)))))))
(defun sframe-resolve0 (poff ploc acc lstat)
(progn ;(print poff ploc acc lstat)
(let (item (first lstat)
offset (first item)
stacks (second item)
locals (third item))
(if (nil? lstat)
(reverse acc)
(sframe-resolve0
offset
locals
(cons (sframe1 (dec (- offset poff)) ploc locals stacks) acc)
(rest lstat))))))
(defun sframe-resolve (argc offsets stack-i local-i)
(->> (keyvals offsets)
(msort (lambda (a b) (< (second a) (second b))))
(print-iden)
(map (lambda (x)
(list (second x)
(get stack-i (first x) nil)
(get local-i (first x) nil))))
(filter (lambda (x) (second x)))
(sframe-resolve0 (- 1) argc nil)))
(defun arg-count (args)
(if (index :rest args)
(inc (index :rest args))
(length args)))
(defun compile0! (pool method-list name args jvm-asm signature)
(let (_ (pprint)
_ (print name)
_ (print "asm:")
_ (map print jvm-asm)
; human readable jvm bytecode
_ (print "====")
;_ (map print (map jvm-assemble jvm-asm))
bytecode (->> jvm-asm
(map jvm-assemble)
(map (lambda (x) (pool-resolve! pool x)))
(jump-resolve)
(flatten))
_ (print "bytecode: " bytecode)
label-i (->> jvm-asm
(map jvm-assemble)
(map (lambda (x) (pool-resolve! pool x)))
(label-resolve))
_ (print "label info: " label-i)
local-i (local-info (arg-count args) jvm-asm)
_ (print "local info: " local-i)
stack-i (foldl stack-info0 (list 0 0 (hashmap)) jvm-asm)
_ (print "stack info: " stack-i)
sframes (sframe-resolve (arg-count args) label-i (third stack-i) local-i)
_ (print "stack frames: " sframes)
)
(list
0x00 0x09 ; public static
; name of function
(u2 (pool-get! pool name))
; type signature
(u2 (pool-get! pool signature))
0x00 0x01 ; attribute size of 1
(u2 (pool-get! pool "Code"))
(u4 (+ 12 (length bytecode)
(if sframes
(+ 8 (length (flatten sframes)))
0)))
(u2 (first stack-i)) ; max stack height
(u2 (let (maxloc (apply max (map second (keyvals local-i))))
(if maxloc
maxloc
(arg-count args))))
(u4 (length bytecode))
bytecode
0x00 0x00 ; 0 exceptions
(if sframes
(list 0x00 0x01 ; one attribute (StackMapTable)
(u2 (pool-get! pool (list :utf8 "StackMapTable")))
; length in bytes = size(number of frames) + length of binary
(u4 (+ 2 (length (flatten sframes))))
(u2 (length sframes)) ; number of frames
sframes)
; no attributes if StackMapTable is empty
(list 0x00 0x00)))))
(defun compile1! (cpool method-list defnexpr)
(let (name (second defnexpr)
args (third defnexpr)
expr (fourth defnexpr))
(compile0!
cpool
method-list
(java-name (string name))
args
(->> (ir name (filter symbol? args) expr)
(check-tco)
(map print-iden)
(map ir-to-jvm)
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
(method-type (arg-count args)))))
(defun compile-special! (cpool method-list name args body signature)
(compile0!
cpool
method-list
name
args
(->> (ir nil args body)
(map ir-to-jvm)
((lambda (x) (append x (list :return))))
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
signature))
(defun class-headers (pool name parent methods)
(let (; add class and parent to constant pool
class-idx (pool-get! pool (list :classref name))
parent-idx (pool-get! pool (list :classref parent))
const-pool-size (get pool :count nil)
;_ (map print (keyvals pool))
)
(list
0xCA 0xFE 0xBA 0xBE ; java magic number
0x00 0x00 0x00 0x37 ; java version 55.0 (Java 11)
(u2 const-pool-size)
(->> (keyvals pool)
(filter (lambda (x) (list? (first x))))
(msort (lambda (a b) (< (second a) (second b))))
(map first)
(map const-to-bin)
(flatten))
0x00 0x21 ; extendable (not final) and public
(u2 class-idx)
(u2 parent-idx)
0x00 0x00 ; zero interfaces
0x00 0x00 ; zero fields
(u2 (length methods))
methods
0x00 0x00))) ; zero attributes
;(include "read.lisp")
(defun call-split (in funs macros etc)
(cond
(nil? in) (list funs
(reverse macros)
(reverse etc))
(equal? (first (first in)) (quote defun))
(call-split (rest in) (cons (first in) funs) macros etc)
(equal? (first (first in)) (quote defmacro))
(call-split (rest in) funs (cons (first in) macros) etc)
t
(call-split (rest in) funs macros (cons (first in) etc))))
(defun read-funs (path)
(first (call-split (read-all path) nil nil nil)))
(defun compile2 (path classname)
(let (exprs (read-all path)
splits (call-split exprs nil nil nil)
;; TODO: filter out etc after macro expansion
macros (second splits)
etc (third splits)
;_ (print macros)
; how to expand macros within macros?
macro-list (hashmap)
_ (map
(lambda (x)
(progn
(insert! macro-list (second x)
(eval (list (quote lambda) (third x) (fourth x))))
))
macros)
;_ (print macro-list)
;; macroexpand
funs (first splits)
;_ (map print funs)
_ (print "macro expansion...")
funs (map (lambda (x) (comp-expand x macro-list)) funs)
;_ (map print funs)
_ (print "expanded funs====")
;_ (map print funs)
cpool (hashmap)
;; insert all functions into method-list
;; TODO: make a copy of base method-list
method-list *method-list*
_ (map (lambda (x) (insert-lambda! method-list classname x)) funs)
_ (print "cinitbin")
cinitbin (compile0!
cpool
method-list
"<clinit>"
nil
(->> (cons 'progn etc)
(ir nil nil)
(map ir-to-jvm)
(concat
;(map (lambda (x)
; (gen-insert classname (second x) (third x) t))
; macros)
(map (lambda (x)
(gen-insert classname (second x) (third x) nil))
funs))
((lambda (x) (append x (list :return))))
(semi-flatten)
(map (lambda (x) (funcall-resolve method-list x)))
(semi-flatten))
"()V")
_ (print "mainbin")
mainbin (if (get method-list "main" nil)
(compile-special!
cpool
method-list
"main"
(quote (0))
(quote (main))
"([Ljava/lang/String;)V"))
_ (print "Ready")
)
(->> funs
(map (lambda (x) (compile1! cpool method-list x)))
((lambda (x) (if mainbin (cons mainbin x) x)))
(cons cinitbin)
(class-headers cpool classname "java/lang/Object")
(flatten)
(write-bytes (string classname ".class")))))
(defun comp-expand (in macros)
(if (list? in)
(comp-expand0 in nil macros)
in))
(defun comp-expand0 (in acc macros)
(cond
(nil? in) (reverse acc)
(and (nil? acc) (equal? (first in) (quote quote)))
in
(and (nil? acc) (get macros (first in) nil))
(comp-expand
;(apply (get (user-envir) (first in) nil) (rest in))
(apply (get macros (first in) nil) (rest in))
macros)
t (comp-expand0 (rest in)
(cons
(comp-expand (first in) macros)
acc)
macros)))
;; method adding for :rest params
;(defun make-params (class name n-params)
; (lambda (ml n)
; (append (funcall-resolve ml `(:funcall list :argc (- n ,n-params)))
; `(:invokestatic ,class ,name (method-type ,(inc n-params))))))
(defun make-params (class name n-params)
(eval
(list (quote lambda)
(quote (ml n))
(list (quote append)
(list (quote funcall-resolve)
(quote ml)
(list (quote list)
:funcall
"list"
:argc
(list (quote -)
(quote n)
n-params)))
(list (quote list)
:invokestatic
class
name
(method-type (inc n-params)))))))
(defun insert-lambda! (method-list classname lamb)
(let (string-name (java-name (string (second lamb))))
(if (index :rest (third lamb))
(->> (third lamb)
(index :rest)
(make-params classname string-name)
(insert! method-list string-name))
(->> (third lamb)
(length)
(method-type)
(list classname string-name)
(insert! method-list string-name)))))
;(defun gen-insert (class)
; (lambda (x)
; (map ir-to-jvm
; `((:ldc (:classref ,(string class)))
; (:push :str-const ,(java-name (string (second x))))
; (:push :str-const ,name)
; (:push :int-const ,(length (third x)))
; (:invokestatic "Runtime" "insertMethod" ,(method-type 4))))))
(defun gen-insert (class name args macro?)
(->> (list
(list :ldc (list :classref (string class)))
(list :push :str-const (java-name (string name)))
(list :push :str-const (string name))
(list :push :int-const (arg-count args))
(list :push (if (index :rest args) :true :nil))
(list :push (if macro? :true :nil))
(->> '(")V")
(concat '("(") (repeat "Ljava/lang/Object;" 6))
(apply string)
(list :invokestatic "Runtime" "insertMethod")))
(map ir-to-jvm)))
| 22,357 | Common Lisp | .lisp | 619 | 26.466882 | 87 | 0.525706 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | fe82877c8fa9254487d4a69745913139f10debd1ce021432b1119c8a047d5006 | 16,246 | [
-1
] |
16,247 | lateral.lisp | davidsun0_lateral/interpreter/bootstrap/lateral.lisp | (defun not (p)
(if p nil t))
(defun second (list)
(first (rest list)))
(defun nth (n list)
(if (= n 0)
(first list)
(nth (dec n) (rest list))))
(defun length0 (list acc)
(if list
(length0 (rest list) (inc acc))
acc))
(defun length (list)
(length0 list 0))
(defun reverse0 (in acc)
(if in
(reverse0 (rest in) (cons (first in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
(defun interleave0 (lista listb acc)
(cond
(and lista listb)
(interleave0 (rest lista) (rest listb)
(cons (first listb) (cons (first lista) acc)))
(or lista listb)
(print "error: unmatched interleave arguments")
t (reverse acc)))
(defun interleave (lista listb)
(interleave0 lista listb nil))
(defun make-token (in-string start end acc)
(if (equal? start end)
acc
(cons (substr in-string start end) acc)))
(print "tokenize")
(defun tokenize (in-string tok-start idx acc state)
(if (char-at in-string idx)
(cond
; detect end of comment
(and (equal? state "comment") (equal? (char-at in-string idx) "\n"))
(tokenize in-string (inc idx) (inc idx) acc nil)
; ignore all characters in comment
(equal? state "comment")
(tokenize in-string (inc idx) (inc idx) acc state)
; detect start of comment
(and (equal? (char-at in-string idx) ";")
(not (equal? state "quote")))
(tokenize in-string (inc idx) (inc idx) acc "comment")
(equal? state "quote")
(cond
(and (equal? (char-at in-string idx) "\\")
(or (equal? (char-at in-string (inc idx)) "n")
(equal? (char-at in-string (inc idx)) "\\")
(equal? (char-at in-string (inc idx)) "\"")))
(tokenize in-string tok-start (inc (inc idx)) acc "quote")
(equal? (char-at in-string idx) "\"")
(tokenize in-string (inc idx) (inc idx)
(make-token in-string tok-start (inc idx) acc) nil)
t
(tokenize in-string tok-start (inc idx) acc "quote"))
; start of comment
(equal? (char-at in-string idx) "\"")
(tokenize in-string tok-start (inc idx) acc "quote")
; ignore whitespace
(whitespace? (char-at in-string idx))
(tokenize in-string (inc idx) (inc idx)
(make-token in-string tok-start idx acc) state)
; left paren
(equal? (char-at in-string idx) "(")
(tokenize in-string (inc idx) (inc idx)
(cons "(" (make-token in-string tok-start idx acc)) state)
; right paren
(equal? (char-at in-string idx) ")")
(tokenize in-string (inc idx) (inc idx)
(cons ")" (make-token in-string tok-start idx acc)) state)
t (tokenize in-string tok-start (inc idx) acc state))
(reverse acc)))
;; hacky way of forward defining functions for mutual recursion
(hashmap-set! method-list "read-list" (list "Lateral" "read-list" (method-type 2)))
(defun read-form (token-list)
(if token-list
(if (equal? (first token-list) "(")
(read-list (rest token-list) nil)
(list (read-atom (first token-list))
(rest token-list)))))
(defun readForm (token-list)
(read-form token-list))
(defun read-list (token-list acc)
(if (equal? (first token-list) ")")
(list (reverse acc) (rest token-list))
(let (;_ (print "read-list let")
res-and-tokens (read-form token-list)
result (first res-and-tokens)
;_ (print result)
new-tokens-list (second res-and-tokens))
;_ (print (first res-and-tokens))
;_ (print "read-list"))
(if res-and-tokens
(read-list new-tokens-list (cons result acc))
(progn ;(print "read-list end?")
;(print acc)
(list acc nil))))))
(defun read ()
(let (_ (pprint "user> ")
form (read-form (tokenize (readline) 0 0 nil nil)))
(first form)))
(hashmap-set! method-list "apply" (list "Lateral" "apply" (method-type 2)))
(defun apply-progn (exprs env)
(if (rest exprs)
(progn
(apply (first exprs) env)
(apply-progn (rest exprs) env))
(apply (first exprs) env)))
;; TODO: check for even number of val/bindings
(defun apply-bind (exprs env)
(if exprs
(progn
(insert! env (first exprs) (apply (second exprs) env))
(apply-bind (rest (rest exprs)) env))
env))
;; TODO: check for even number of val/bindings
(defun apply-cond (exprs env)
(cond
(not exprs) nil
(apply (first exprs) env) (apply (second exprs) env)
t (apply-cond (rest (rest exprs)) env)))
(defun apply-and (exprs env)
(cond
(not exprs) t
(apply (first exprs) env) (apply-and (rest exprs) env)
t nil))
(defun apply-or (exprs env)
(cond
(not exprs) nil
(apply (first exprs) env) t
t (apply-or (rest exprs) env)))
;; TODO: check for even number of val/bindings
(defun apply-bind-macro (exprs env)
(if exprs
(progn
(insert! env (first exprs) (second exprs))
(apply-bind-macro (rest (rest exprs)) env))
env))
(defun lambda-apply (func args env)
(let (sym-binds (interleave (get-args func) args)
bind-envir (apply-bind-macro sym-binds (make-envir env)))
(apply (get-expr func) bind-envir)))
(defun macro-call? (ast env)
(and (list? ast)
(contains? env (first ast))
(macro? (first (get env (first ast))))))
(defun macro-expand (ast env)
(if (macro-call? ast env)
(macro-expand
(lambda-apply (first (get env (first ast))) (rest ast) env)
env)
ast))
(defun eval (ast env acc)
(cond
(not ast) (reverse acc)
(symbol? ast) (first (get env ast))
(not (list? ast)) ast
t (eval (rest ast) env (cons (apply (first ast) env) acc))))
(defun apply (ast env)
(cond
;(print ast) nil
(not ast) nil
(macro-call? ast env)
(apply (macro-expand ast env) env)
(not (list? ast)) (eval ast env nil)
;; TODO: throw instead of print errors
;; if
(equal? (first ast) (quote if))
(cond
(apply (second ast) env) (apply (nth 2 ast) env)
(= (length ast) 4) (apply (nth 3 ast) env)
(= (length ast) 3) nil
t (print "if expects two or three arguments"))
;; quote
(equal? (first ast) (quote quote))
(if (= (length ast) 2)
(second ast)
(print "quote expects one argument"))
;; def
(equal? (first ast) (quote def))
(if (= (length ast) 3)
(let (val (apply (nth 2 ast) env))
(progn
(insert! (user-envir) (second ast) (apply (nth 2 ast) env))
val))
(print "def expects two arguments"))
;; progn
(equal? (first ast) (quote progn))
(apply-progn (rest ast) env)
;; let
(equal? (first ast) (quote let))
(let (bind-envir (apply-bind (second ast) (make-envir env)))
(if (= (length ast) 3)
(apply (nth 2 ast) bind-envir)
(print "let expects two arguments")))
;; defmacro
(equal? (first ast) (quote defmacro))
(if (= (length ast) 4)
(let (val (make-macro (nth 2 ast) (nth 3 ast)))
(progn
(insert! env (second ast) val)
val))
(print "defmacro expects four arguments"))
;; lambda
(equal? (first ast) (quote lambda))
(if (= (length ast) 3)
(make-lambda (second ast) (nth 2 ast))
(print "lambda expects two arguments"))
;; cond
(equal? (first ast) (quote cond))
(apply-cond (rest ast) env)
;; and
(equal? (first ast) (quote and))
(apply-and (rest ast) env)
;; or
(equal? (first ast) (quote or))
(apply-or (rest ast) env)
t
(let (eval-list (eval ast env nil)
func (first eval-list))
(cond
(native-fn? func) (native-invoke func (rest eval-list))
(lambda? func)
(lambda-apply func (rest eval-list) env)
;(let (x (interleave (get-args func) (rest eval-list))
; bind-envir (apply-bind x (make-envir env)))
; (apply (get-expr func) bind-envir))
t (progn (print "error: ") (print func) (print "isn't function"))
))))
(defun main ()
(progn
(print (apply (read) (user-envir)))
(main)))
| 8,189 | Common Lisp | .lisp | 238 | 28.214286 | 83 | 0.593901 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 3aa6e4ea788d9b1843b46c2e19e8c69a6b127d0a656b3d6d00856e0d0555d322 | 16,247 | [
-1
] |
16,248 | compiler.lisp | davidsun0_lateral/interpreter/bootstrap/compiler.lisp | ;;; reduces a tree to a list of lists
(defun semi-flatten0 (in acc)
(if in
(if (and (list? (first in))
(list? (first (first in))))
(semi-flatten0 (rest in) (semi-flatten0 (first in) acc))
(semi-flatten0 (rest in) (cons (first in) acc)))
acc))
(defun semi-flatten (in)
(reverse (semi-flatten0 in nil)))
(def *gensym-count* 0)
(defun gensym (prefix)
; (keyword (string prefix (def *gensym-count* (inc *gensym-count*)))))
(keyword (str-cat prefix (string (def *gensym-count* (inc *gensym-count*))))))
(defun progn-deflate (name expr acc)
(if expr
(progn-deflate name
(rest expr)
(cons (list (if (rest expr)
(list :pop)
(cons nil nil))
(ir0 (if (rest expr) nil name) (first expr) nil))
acc))
acc))
(defun or-deflate (name end-lab expr acc)
(if expr
(progn (print (ir0 nil (first expr) nil))
(or-deflate name
end-lab
(rest expr)
(cons
(list (list :pop)
(list :jump-not-nil end-lab)
(list :dup)
(ir0 nil (first expr) nil))
acc)))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil))
acc)))
(defun and-deflate (name false-lab expr acc)
(if expr
(and-deflate name
false-lab
(rest expr)
(cons (list (if (rest expr)
(list :jump-if-nil false-lab)
(cons nil nil))
(ir0 nil (first expr) nil))
acc))
(let (end-lab (gensym "and-e"))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil)
(list :label false-lab)
(list :goto end-lab))
acc))))
(defun cond-deflate0 (name expr test-lab end-lab acc)
(if expr
(let (test (first expr)
branch (second expr)
next-lab (gensym "cond-"))
(cond-deflate0 name (rest (rest expr)) next-lab end-lab
(cons (list (if name
(cons nil nil)
(list :goto end-lab))
(ir0 name branch nil)
(list :jump-if-nil next-lab)
(ir0 nil test nil)
(if test-lab
(list :label test-lab)
(cons nil nil)))
acc)))
(cons (list (if name
(list :return)
(cons nil nil))
(list :label end-lab)
(list :push :nil)
(list :label test-lab))
acc)))
(defun let-deflate0 (bind-list acc)
(if bind-list
(let-deflate0 (rest (rest bind-list))
(cons (list (list :let-set (first bind-list))
(ir0 nil (second bind-list) nil))
acc))
acc))
(defun let-deflate (name expr)
(list
(list :let-pop)
(ir0 name (second expr) nil)
(list :let-body)
(let-deflate0 (first expr) nil)
(list :let-bind)))
;; iterates along list, resolving nested lists with ir0
(defun ir1 (ast acc)
(if ast
(if (list? (first ast))
(ir1 (rest ast)
(concat (ir0 nil (first ast) nil) acc))
(ir1 (rest ast)
(cons (list :push (first ast)) acc)))
acc))
(defun ir (name ast)
(reverse (semi-flatten (ir0 name ast nil))))
;; first step in code processing
;; turns a tree of lisp code into a stack-based intermediate representation
;; name doubles as a flag for if the expression is in the tail position
(defun ir0 (name ast acc)
(cond
(nil? ast) (reverse acc)
(and (not (list? ast)) name) (list (list :return) (list :push ast))
(not (list? ast)) (list (list :push ast))
(equal? (first ast) (quote if))
(let (false-label (gensym "if-f")
end-label (if name (gensym "if-e")))
(list
(if (not name) (list :label end-label) (cons nil nil))
(if (= (length ast) 4)
;; has an else branch
(list (ir0 name (nth 3 ast) nil)
(if (not name)
(list :goto end-label)
(cons nil nil)))
;; no else branch
(list (if name
(list :return)
(cons nil nil))
(list :push :nil)))
(list :label false-label)
(ir0 name (nth 2 ast) nil)
(list :jump-if-nil false-label)
(ir0 nil (nth 1 ast) nil)))
(equal? (first ast) (quote and))
(and-deflate name (gensym "and-f") (rest ast) nil)
(equal? (first ast) (quote or))
(or-deflate name (gensym "or-e") (rest ast) nil)
(equal? (first ast) (quote cond))
(cond-deflate0 name (rest ast) nil (gensym "cond-e") nil)
(equal? (first ast) (quote progn))
(progn-deflate name (rest ast) nil)
(equal? (first ast) (quote let))
(let-deflate name (rest ast))
(equal? (first ast) (quote quote))
(list (list :push :symbol (second ast)))
(equal? (first ast) name)
(cons (list :tail-recur :argc (dec (length ast)))
(ir1 (rest ast) nil))
name (cons (list :return) (ir0 nil ast acc))
t
(cons (list :funcall (first ast) :argc (dec (length ast)))
(ir1 (rest ast) nil))))
;; arglist is local variables of the environment just outside the let expression
;; letlist is the local variables of the let expression
(defun resolve-syms0 (ir-list arglist letlist acc)
(if ir-list
(let (expr (first ir-list))
(cond
;; resolve symbols in inner let symbol
(equal? (first expr) :let-bind)
(let (ir-and-acc (resolve-syms0 (rest ir-list)
(concat arglist letlist)
nil
(cons (list :let-push) acc)))
(resolve-syms0 (first ir-and-acc) arglist nil (second ir-and-acc)))
;; storing a local variable in a let binding
(equal? (first expr) :let-set)
;; update letlist and get local var's index
(let (inlet? (index (nth 1 expr) letlist)
letlist (if inlet? letlist (append letlist (nth 1 expr)))
argidx (+ (length arglist)
(if inlet? inlet? (dec (length letlist)))))
(resolve-syms0
(rest ir-list)
arglist
letlist
;; store marker for number of local variables at current position
(cons (list :local-count
(gensym "letc")
(+ (length letlist) (length arglist)))
(cons (list :store :arg-num argidx) acc))))
;; ignore let-body
(equal? (first expr) :let-body)
(resolve-syms0 (rest ir-list) arglist letlist acc)
;; return (unprocessed-syms, processed-syms)
(equal? (first expr) :let-pop)
(list (rest ir-list) (cons (list :let-pop
(gensym "letp")
(length arglist))
acc))
t
(resolve-syms0
(rest ir-list)
arglist
letlist
(cons
(cond
(not (equal? :push (first expr))) expr
(equal? (nth 1 expr) (quote nil)) (list :push :nil)
(equal? (nth 1 expr) (quote t)) (list :push :true)
(int? (nth 1 expr)) (list :push :int-const (nth 1 expr))
(char? (nth 1 expr)) (list :push :char-const (nth 1 expr))
(string? (nth 1 expr)) (list :push :str-const (nth 1 expr))
(symbol? (nth 1 expr))
(let (letidx (index (nth 1 expr) letlist)
idx (if letidx
(+ (length arglist) letidx)
(index (nth 1 expr) arglist)))
(if idx
(list :push :arg-num idx)
(list :push :envir-sym (nth 1 expr))))
t expr)
acc))))
(list :asdfasdf acc)))
(defun resolve-syms (ir-list arglist)
(let (a (resolve-syms0 ir-list arglist nil nil))
(reverse (second a))))
| 8,670 | Common Lisp | .lisp | 221 | 26.493213 | 81 | 0.487767 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | feaf301aedb7b83ea7bca4850573b9a8ad4cb5336397a0ffbd19cbd549baee11 | 16,248 | [
-1
] |
16,249 | jvmclass.lisp | davidsun0_lateral/interpreter/bootstrap/jvmclass.lisp | (include "compiler.lisp")
(def pool (make-hashmap 32))
(def pool-count 1)
(def pool-list nil)
(def method-list (make-hashmap 32))
(defun to-u1 (x)
(if (< x 0x100)
(list x)
(asdf "int too large for 1 byte")))
(defun to-u2 (x)
(if (or (< x 0xFFFF) (= x 0xFFFF))
(list (bit-and (bit-asr x 8) 0xFF)
(bit-and x 0xFF))
"int too large for 2 bytes"))
(defun to-u4 (x)
(concat (to-u2 (// x 0x10000))
(to-u2 (bit-and x 0xFFFF))))
(defun len1-attribs (const-list)
(to-u2 (nth 1 const-list)))
(defun len2-attribs (const-list)
(concat (to-u2 (nth 1 const-list))
(to-u2 (nth 2 const-list))))
(defun method-type (argc)
(reduce str-cat (cons "(" (repeat0 "Ljava/lang/Object;" argc
(list ")Ljava/lang/Object;")))))
; converts a human readable item in the constant pool to list of bytes
(defun const-to-bin (const-list)
(let (tag (car const-list))
(cond
(equal? tag :utf8)
(concat (cons 0x01 (to-u2 (length (nth 1 const-list))))
(map char-int (to-chars (nth 1 const-list))))
(equal? tag :classref) (cons 0x07 (len1-attribs const-list))
(equal? tag :string) (cons 0x08 (len1-attribs const-list))
(equal? tag :fieldref) (cons 0x09 (len2-attribs const-list))
(equal? tag :methodref) (cons 0x0A (len2-attribs const-list))
(equal? tag :nametyperef) (cons 0x0C (len2-attribs const-list))
t (list :unknown const-list))))
(defun pool-search (constpool expr)
(let (temp (hashmap-get constpool expr)
idx (first temp)
exists? (second temp))
(if exists?
idx
(progn
(hashmap-set! constpool expr pool-count)
(def pool-list (cons expr pool-list))
(def pool-count (inc pool-count))
(dec pool-count)))))
(defun pool-get (constpool expr)
(let (expr (if (string? expr) (list :utf8 expr) expr)
tag (car expr)
;_ (print expr))
)
(cond
(equal? tag :utf8)
(pool-search constpool expr)
(or (equal? tag :classref) (equal? tag :string))
(pool-search
constpool
(list tag (pool-get constpool (second expr))))
(or (equal? tag :nametyperef)
(equal? tag :methodref)
(equal? tag :fieldref))
(pool-search
constpool
(list tag (pool-get constpool (second expr))
(pool-get constpool (nth 2 expr))))
t (progn (print "can't pool-get") (print expr)))))
(def method-list
{
"rest" (list "Lang" "cdr"
"(Ljava/lang/Object;)Ljava/lang/Object;")
"cons" (list "Lang" "cons"
"(Ljava/lang/Object;Ljava/lang/Object;)LConsCell;")
"equal?" (list "Lang" "equal_p"
"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;")
"inc" (list "Lang" "inc"
"(Ljava/lang/Object;)Ljava/lang/Object;")
"char-at" (list "Lang" "char_at"
"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;")
"readline" (list "Lang" "readLine"
"()Ljava/lang/Object;")
"print" (list "Lang" "println"
"(Ljava/lang/Object;)Ljava/lang/Object;")
"println" ("Lang" "println"
"(Ljava/lang/Object;)Ljava/lang/Object;")
})
(defun insert-method (sym class name argc)
(hashmap-set! method-list sym
(list class name (method-type argc))))
(insert-method "println" "Lang" "println" 1)
(insert-method "char" "Lang" "to_char" 1)
(insert-method "substr" "Lang" "substr" 3)
(insert-method "whitespace?" "Lang" "whitespace_p" 1)
(hashmap-set! method-list
"pprint"
(list "Lang" "pprint" "(Ljava/lang/Object;)Ljava/lang/Object;"))
(hashmap-set! method-list
"first"
(list "Lang" "car" "(Ljava/lang/Object;)Ljava/lang/Object;"))
(hashmap-set! method-list
"dec"
(list "Lang" "dec" "(Ljava/lang/Object;)Ljava/lang/Object;"))
(hashmap-set! method-list
"read-atom"
(list "Helper" "readAtom" "(Ljava/lang/Object;)Ljava/lang/Object;"))
(hashmap-set! method-list
"symbol?"
(list "Lang" "symbol_p" "(Ljava/lang/Object;)Ljava/lang/Object;"))
(hashmap-set! method-list
"get"
(list "Lang" "get"
"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"))
(insert-method "list?" "Lang" "list_p" 1)
(insert-method "user-envir" "Runtime" "getUserEnvir" 0)
(insert-method "native-invoke" "Lang" "nativeInvoke" 2)
(insert-method "=" "Lang" "isNumericallyEqual" 2)
(insert-method "insert!" "Lang" "insert_b" 3)
(insert-method "get" "Lang" "get" 2)
(insert-method "make-envir" "Lang" "make_envir" 1)
(insert-method "get-args" "Lang" "getArgs" 1)
(insert-method "get-expr" "Lang" "getExpr" 1)
(insert-method "make-lambda" "Lang" "lambda" 2)
(insert-method "lambda?" "Lang" "lambda_p" 1)
(insert-method "native-fn?" "Lang" "native_p" 1)
(insert-method "make-macro" "Lang" "macro" 2)
(insert-method "macro?" "Lang" "macro_p" 1)
(insert-method "contains?" "Lang" "contains_p" 2)
;(print method-list)
(defun funcall-resolve (expr)
(let (name (string (second expr)) ; function name
ctype (hashmap-get method-list name) ; call and exists
exists? (second ctype)
call (first ctype)
;_ (print (cons :asdf call))
;_ (if (equal? "println" name) (print (cons :asdf call)))
)
(cond
(equal? name "list") ;(print "ADFASDFASDF")
(cons (list :aconst_null)
(repeat0 (funcall-resolve (list :funcall (quote cons) :argc 2))
(nth 3 expr) nil))
exists? (cons :invokestatic call)
t (progn (print "can't find function:") (print name)))))
; generates code to store stack onto local args for tail recursion
(defun set-locals (n i acc)
(if (< n i)
acc
(set-locals n (inc i) (cons (list :astore i) acc))))
(defun ir-to-jvm (expr)
(let (cmd (car expr))
(cond
(equal? cmd :return)
(list :areturn)
(equal? cmd :push)
(cond
(equal? (nth 1 expr) :arg-num) (list :aload (nth 2 expr))
(equal? (nth 1 expr) :nil) (list :aconst_null)
(equal? (nth 1 expr) :true) (list :getstatic
"java/lang/Boolean"
"TRUE"
"Ljava/lang/Boolean;")
(equal? (nth 1 expr) :int-const)
(list (list :iconst (nth 2 expr))
(list :invokestatic "java/lang/Integer"
"valueOf" "(I)Ljava/lang/Integer;"))
(equal? (nth 1 expr) :char-const)
(list (list :iconst (char-int (nth 2 expr)))
(list :invokestatic "java/lang/Character"
"valueOf" "(C)Ljava/lang/Character;"))
(equal? (nth 1 expr) :str-const)
(list :ldc (list :string (nth 2 expr)))
(equal? (nth 1 expr) :symbol)
(list (list :ldc (list :string (string (nth 2 expr))))
(list :invokestatic "Symbol" "makeSymbol"
"(Ljava/lang/String;)LSymbol;"))
t (progn (print "can't push: ") (print expr)))
(equal? cmd :store)
(list :astore (nth 2 expr))
(equal? cmd :jump-if-nil)
(cons :ifnull (cdr expr))
(equal? cmd :jump-not-nil)
(cons :ifnonnull (cdr expr))
; defer to jump resolution
(equal? cmd :label) expr
(equal? cmd :goto) expr
(equal? cmd :funcall)
(funcall-resolve expr)
(equal? cmd :tail-recur)
;(cons (list :goto :start) (set-locals (dec (nth 2 expr)) nil))
(set-locals (dec (nth 2 expr)) 0 (list (list :goto :start)))
; t (progn (print "ir-to-jvm can't compile") (print expr) expr)
t expr
)))
; calculates max stack size and size of stack at jump targets
(defun max-stack2 (in argc s-max s-curr l-max l-curr lablist)
(if in
(let (expr (car in)
cmd (car expr)
;_ (print s-curr)
;_ (print expr)
;_ (print lablist)
s-max (if (< s-max s-curr) s-curr s-max)
l-max (if (< l-max l-curr) l-curr l-max))
(cond
(equal? cmd :local-count)
(max-stack2 (cdr in) argc s-max s-curr l-max (nth 2 expr)
(hashmap-set! lablist (second expr)
(list s-curr (nth 2 expr))))
; pops the let environment, ir contains new number of locals
(equal? cmd :let-pop)
(max-stack2 (cdr in) argc s-max s-curr l-max (nth 2 expr) lablist)
;(progn (print "") (print expr)
;(max-stack2 (cdr in) s-max s-curr l-max (nth 2 expr)
; (hashmap-set! lablist (second expr)
; (list s-curr (nth 2 expr)))))
(or (equal? cmd :push) (equal? cmd :dup))
(max-stack2 (cdr in) argc s-max (inc s-curr) l-max l-curr lablist)
(or (equal? cmd :pop)
(equal? cmd :store)
(equal? cmd :return))
(max-stack2 (cdr in) argc s-max (dec s-curr) l-max l-curr lablist)
(equal? cmd :funcall)
(if (and (equal? (nth 1 expr) (quote list)) (= s-max s-curr))
(max-stack2 (cdr in) argc (inc s-max) (inc (- s-curr (nth 3 expr)))
l-max l-curr lablist)
(max-stack2 (cdr in) argc s-max (inc (- s-curr (nth 3 expr)))
l-max l-curr lablist))
(equal? cmd :jump-if-nil)
(max-stack2 (cdr in) argc s-max (dec s-curr) l-max l-curr
(hashmap-set! lablist (nth 1 expr)
(list (dec s-curr) l-curr)))
(equal? cmd :jump-not-nil)
(max-stack2 (cdr in) argc s-max (dec s-curr) l-max l-curr
(hashmap-set! lablist (nth 1 expr)
(list (dec s-curr) l-curr)))
(equal? cmd :goto)
(max-stack2 (cdr in) argc s-max (dec s-curr) l-max l-curr
(hashmap-set! lablist (nth 1 expr)
(list s-curr l-curr)))
(equal? cmd :tail-recur)
(max-stack2 (cdr in) argc s-max (- s-curr (nth 2 expr)) l-max l-curr
(hashmap-set! lablist :start (list 0 argc)))
t (max-stack2 (cdr in) argc s-max s-curr l-max l-curr lablist)))
(list s-max l-max lablist)
))
;; converts a single item of the form (:jvmcode args) into a list of bytes
(defun jvm-assemble0 (in)
(let (cmd (car in))
(cond
(equal? cmd :aconst_null)
(list 0x01)
(equal? cmd :aload)
(cons 0x19 (to-u1 (nth 1 expr)))
(equal? cmd :astore)
(cons 0x3A (to-u1 (nth 1 expr)))
(equal? cmd :ldc)
(let (idx (pool-get pool (nth 1 expr)))
(if (< idx 0x100)
(cons 0x12 (to-u1 idx))
(cons 0x13 (to-u2 idx))))
(equal? cmd :iconst)
; iconst_<> -> bipush -> sipush -> ldc
(let (val (nth 1 in))
(cond
(and (< (- 2) val) (< val 6))
(list (+ val 3)) ; direct constant value
(and (< (- 129) val) (< val 128))
(list 0x10 val) ;bipush
t (print "can't iconst value:" val)))
(equal? cmd :pop)
(list 0x57)
(equal? cmd :dup)
(list 0x59)
(equal? cmd :areturn)
(list 0xB0)
(equal? cmd :return)
(list 0xB1)
(equal? cmd :getstatic)
(cons 0xB2
(to-u2
(pool-get pool
(list :fieldref
(list :classref (nth 1 expr))
(list :nametyperef (nth 2 expr)
(nth 3 expr))))))
(equal? cmd :invokevirtual)
(cons 0xB6
(to-u2
(pool-get pool
(list :methodref
(list :classref (nth 1 expr))
(list :nametyperef (nth 2 expr)
(nth 3 expr))))))
(equal? cmd :invokestatic)
(cons 0xB8
(to-u2
(pool-get pool
(list :methodref
(list :classref (nth 1 expr))
(list :nametyperef (nth 2 expr)
(nth 3 expr))))))
(equal? cmd :checkcast)
(cons 0xC0
(to-u2
(pool-get pool (list :classref (nth 1 expr)))))
;t (progn (print "jvm-assmble can't assemble") (print expr) expr)
t expr
)))
;; resolves labels and compiles to byte lists whenever possible
(defun jvm-assemble1 (in acc offset labelmap)
(if in
(let (expr (car in)
_ (print expr)
binexpr (jvm-assemble0 expr)
; length of command in bytes
binexprlen (cond
; non-jump related code was compiled to bytes
(int? (car binexpr)) (length binexpr)
; 1 byte for command + 2 bytes for offset
(equal? (car expr) :ifnull) 3
(equal? (car expr) :ifnonnull) 3
(equal? (car expr) :goto) 3))
(cond
(equal? (car expr) :label)
; offset does not change, but add offset to labelmap
(jvm-assemble1 (cdr in) acc offset
(hashmap-set! labelmap (nth 1 expr) offset))
(equal? (car expr) :local-count)
(jvm-assemble1 (cdr in) acc offset
(hashmap-set! labelmap (nth 1 expr) offset))
(equal? (car expr) :let-pop)
(jvm-assemble1 (cdr in) acc offset
(hashmap-set! labelmap (nth 1 expr) offset))
t
(jvm-assemble1 (cdr in)
(cons binexpr acc)
(+ offset binexprlen)
labelmap)))
(list (reverse acc) labelmap)))
;; resolves jumps
(defun jvm-assemble2 (in acc offset labelmap)
(if in
(let (expr (car in)
cmd (car expr))
(cond
(equal? cmd :ifnull)
(jvm-assemble2 (cdr in)
(cons (cons
0xC6
(to-u2 (- (car (hashmap-get labelmap (nth 1 expr)))
offset)))
acc)
(+ offset 3)
labelmap)
(equal? cmd :ifnonnull)
(jvm-assemble2 (cdr in)
(cons (cons
0xC7
(to-u2 (- (car (hashmap-get labelmap (nth 1 expr)))
offset)))
acc)
(+ offset 3)
labelmap)
(equal? cmd :goto-0)
(progn (print (to-u2 (- offset)))
(jvm-assemble2 (cdr in)
(cons (cons 0xA7 (to-u2 (- offset))) acc)
(+ offset 3)
labelmap))
(equal? cmd :goto)
(jvm-assemble2 (cdr in)
(cons (cons
0xA7
(to-u2 (- (car (hashmap-get labelmap (nth 1 expr)))
offset)))
acc)
(+ offset 3)
labelmap)
t (jvm-assemble2 (cdr in)
(cons expr acc)
(+ offset (length expr))
labelmap)))
(reverse acc)))
(defun jvm-assemble (in)
(let (bin-and-labels (jvm-assemble1 in nil 0 (make-hashmap 32))
bin-list (car bin-and-labels)
labelmap (nth 1 bin-and-labels))
(jvm-assemble2 bin-list nil 0 labelmap)))
;; stack frame object entry of class Object
(def objvar-info
(list 0x07 (to-u2 (pool-get pool (list :classref "java/lang/Object")))))
(defun sframe (offset localcount stackcount)
(if (= stackcount 0)
(progn
;(print "same frame") (print offset)
(list offset) ; same frame type (same locals, zero on stack)
)
(progn
;(print "full frame") (print localcount) (print stackcount)
(list 0xFF ; full frame type
(to-u2 offset)
(if (= localcount 0)
(quote ())
(list (to-u2 localcount) (repeat objvar-info localcount)))
(to-u2 stackcount)
(repeat objvar-info stackcount)))))
(defun sframe1 (offset l-count s-count last-local)
(cond
; same frame
(and (= last-local l-count) (= s-count 0) (< offset 64))
(list offset)
; same locals 1 stack item
;(and (= last-local l-count) (= s-count 1) (< offset 64))
;(list (+ offset 64) objvar-info)
; same locals 1 stack item extended
;(and (= last-local l-count) (= s-count 1))
;(list 247 (to-u2 offset) objvar-info)
; chop frame
;(and (= s-count 0) (< (- last-local l-count)
t (list 0xFF (to-u2 offset)
(if (= l-count 0)
(list (to-u2 0))
(list (to-u2 l-count) (repeat objvar-info l-count)))
(if (= s-count 0)
(list (to-u2 0))
(list (to-u2 s-count) (repeat objvar-info s-count))))))
(defun sframe-resolve0 (argc offsets stacklabs bytepos acc)
(if offsets
(let (frameoff (second (first offsets)))
;_ (print (dec (- frameoff bytepos)))
;_ (print frameoff))
(if (second (hashmap-get stacklabs (first (first offsets))))
(sframe-resolve0
argc (cdr offsets) stacklabs frameoff
(cons (sframe (dec (- frameoff bytepos)) argc
(first (hashmap-get stacklabs (first (first offsets)))))
acc))
(sframe-resolve0 argc (cdr offsets) stacklabs bytepos acc)))
(reverse acc)))
(defun sframe-resolve1 (offsets stacklabs bytepos last-locals acc)
(if offsets
(let (lab (first (first offsets))
;_ (print "hi ('u' )/")
off (second (first offsets))
stack-and-local (hashmap-get stacklabs lab)
exists? (second stack-and-local)
f-stack (first (first stack-and-local))
f-local (second (first stack-and-local)))
(if exists?
(sframe-resolve1
(cdr offsets) stacklabs off f-local
(cons (sframe1 (dec (- off bytepos)) f-local f-stack last-locals) acc))
(sframe-resolve1 (cdr offsets) stacklabs bytepos last-locals acc)))
(reverse acc)))
(defun sframe-resolve2 (argc labels label-offsets)
(let (offsets (keyvals label-offsets))
;_ (print "hi")
;_ (print labels))
(sframe-resolve1
(qsort (lambda (a b) (- (second a) (second b))) offsets)
labels
(- 1)
argc
nil)))
(defun sframe-resolve (argc labels label-offsets)
(let (offsets (keyvals label-offsets))
(sframe-resolve0 argc
(qsort
(lambda (a b) (- (second a) (second b))) offsets)
labels (- 1) nil)))
;; prepends start label to ir if there are tail recursive calls
(defun check-tco0 (in curr)
(if curr
(if (equal? (car (car curr)) :tail-recur)
(cons (list :label :start) in)
(check-tco0 in (cdr curr)))
in))
(defun compile1 (name args expr)
(let (_ (pprint "")
_ (print name)
argc (length args)
_ (print "raw ir")
raw-ir (ir (symbol name) expr)
;; allow for infinite tail recursion
;raw-ir (if (equal? (first (last raw-ir)) :tail-recur)
; raw-ir (append raw-ir (list :return)))
_ (map print raw-ir)
;_ (pprint "")
;ir-list (check-tco0 raw-ir nil)
ir-list (check-tco0 raw-ir raw-ir)
;_ (map print (resolve-syms ir-list args))
ir-list (resolve-syms ir-list args)
;_ (map print ir-list)
_ (print "jvm asm")
; human readable jvm bytecode
;jvm-asm (semi-flatten (map ir-to-jvm (resolve-syms ir-list args)))
jvm-asm (semi-flatten (map ir-to-jvm ir-list))
jvm-asm (filter (lambda (x)
(not (or ;(equal? (car x) :local-count)
(equal? (car x) :let-push))))
jvm-asm)
;_ (map print jvm-asm)
;_ (print "=====")
; unresolved jump binary + label -> offset map
_ (print "jvm assemble")
bin-and-labels (jvm-assemble1 jvm-asm nil 0 (make-hashmap 32))
;_ (print "!")
; binary with resolved jumps
labelmap (nth 1 bin-and-labels)
_ (print labelmap)
;_ (map print bin-and-labels)
_ (print "jvm bin")
jvm-bin (jvm-assemble2 (car bin-and-labels) nil 0 labelmap)
;_ (print "?")
bytecode (flatten jvm-bin) ; bytecode
code-size (length bytecode)
; stack-info (max-stack ir-list 0 0 nil)
;_ (print "?")
;_ (map print ir-list)
;stack-info (max-stack ir-list 0 0 (make-hashmap 16))
;stack-info2 (max-stack2 ir-list argc 0 0 0 argc (make-hashmap 16))
stack-info (max-stack2 ir-list argc 0 0 0 argc (make-hashmap 16))
_ (print "stack info:")
_ (print stack-info)
;_ (print (nth 2 stack-info))
stack-size (first stack-info)
max-locals (second stack-info)
;_ (print max-locals)
;max-locals argc
_ (print "stack frames")
stack-frames (sframe-resolve2 argc (nth 2 stack-info) labelmap)
;_ (print (sframe-resolve2 argc (nth 2 stack-info2) labelmap))
;_ (progn (print "stack height") (print (nth 1 stack-info)))
;_ (progn (print "label pos") (print labelmap))
;_ (print "===")
_ (print stack-frames)
flat-stack-map (flatten stack-frames)
stack-map-frames-size (length flat-stack-map)
_ (print "end")
_ (hashmap-set! method-list (string name)
(list "Lateral" (string name) (method-type argc)))
)
(list
0x00 0x09 ; public static
; name of function
(to-u2 (pool-get pool (list :utf8 name)))
; type signature
(to-u2 (pool-get pool (list :utf8 (method-type argc))))
0x00 0x01 ; attribute size of 1
(to-u2 (pool-get pool (list :utf8 "Code")))
(if stack-frames
(to-u4 (+ 12 code-size 8 stack-map-frames-size))
(to-u4 (+ 12 code-size)))
(to-u2 stack-size)
(to-u2 max-locals)
(to-u4 code-size)
bytecode
0x00 0x00 ; 0 exceptions
(if stack-frames
(list 0x00 0x01 ; one StackMapTable attribute
(to-u2 (pool-get pool (list :utf8 "StackMapTable")))
; length in bytes = number of frames (u2) + length of binary
(to-u4 (+ 2 (length flat-stack-map)))
(to-u2 (length stack-frames)) ; number of frames
stack-frames)
; no attributes if StackMapTable is empty
(list 0x00 0x00)))))
(defun constbin-dbg (in acc)
(if in
(progn
(print (car in))
(constbin-dbg (cdr in) (cons (const-to-bin (car in)) acc)))
acc))
(defun class-headers (name parent methods)
(progn
; add class and parent to constant pool
(pool-get pool (list :classref name))
(pool-get pool (list :classref parent))
; (map print (reverse pool-list))
(list
0xCA 0xFE 0xBA 0xBE ; java magic number
0x00 0x00 0x00 0x37 ; java version 55.0 (Java 11)
(to-u2 (inc (length pool-list)))
(flatten (map const-to-bin (reverse pool-list)))
;(flatten (constbin-dbg (reverse pool-list) nil))
0x00 0x21 ; extendable (not final) and public
(to-u2 (pool-get pool (list :classref name)))
(to-u2 (pool-get pool (list :classref parent)))
0x00 0x00 ; zero interfaces
0x00 0x00 ; zero fields
(to-u2 (length methods))
methods
0x00 0x00))) ; zero attributes
(def funlist nil)
(defun compile-function0 (name args expr)
(def funlist (cons (compile1 (string name) args expr) funlist)))
(defmacro defun (name args expr)
(list (quote compile-function0)
(list (quote quote) name)
(list (quote quote) args)
(list (quote quote) expr)))
;(print "start")
(include "lateral.lisp")
;(print "end")
;(map print funlist)
(write-bytes
"Lateral.class"
(flatten
(class-headers
"Lateral"
"java/lang/Object"
(reverse funlist))))
| 24,410 | Common Lisp | .lisp | 614 | 29.654723 | 82 | 0.540051 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 313ccc35ae83e509afa2553ca407fe1ce5bf339118ec8dc4841df9b46b22ac98 | 16,249 | [
-1
] |
16,250 | core.lisp | davidsun0_lateral/interpreter/bootstrap/core.lisp | (defmacro defun (name args expr)
(list (quote def)
name
(list (quote lambda) args expr)))
(def first car)
(def rest cdr)
;; tail recursive map helper function
(defun map0 (fn in acc)
(if in
(map0 fn
(cdr in)
(cons (fn (car in)) acc))
acc))
(defun map (fn in)
(reverse! (map0 fn in nil)))
;; tail recursive filter helper function
(defun filter0 (pred in acc)
(if in
(if (pred (car in))
(filter0 pred
(cdr in)
(cons (car in) acc))
(filter0 pred
(cdr in)
acc))
acc))
(defun filter (pred in)
(reverse! (filter0 pred in nil)))
;; tail recursive reduce helper function
(defun reduce0 (fn in acc)
(if in
(reduce0 fn
(cdr in)
(fn acc (car in)))
acc))
(defun reduce (fn in)
(reduce0 fn
(cdr (cdr in))
(fn (car in) (nth 1 in))))
(defun nil? (p)
(if p nil t))
(def not nil?)
(defun inc (n)
(+ n 1))
(defun dec (n)
(- n 1))
(defun length0 (in acc)
(if in
(length0 (cdr in) (inc acc))
acc))
(defun length (in)
(if (string? in)
(length0 (to-chars in) 0)
(length0 in 0)))
;; using native flatten now for performance reasons
;(defun flatten0 (tree acc)
; (if tree
; (if (list? tree)
; (if (list? (car tree))
; (flatten0 (cdr tree)
; (cons (flatten0 (car tree) nil) acc))
; (flatten0 (cdr tree) (cons (car tree) acc)))
; tree)
; acc))
;(defun flatten (tree)
; (reverse! (flatten0 tree nil)))
(defun concat0 (a b acc)
(if a
(concat0 (cdr a) b (cons (car a) acc))
(if b
(concat0 nil (cdr b) (cons (car b) acc))
acc)))
(defun concat (a b)
(reverse! (concat0 a b nil)))
(defun append0 (in obj acc)
(if in
(append0 (cdr in) obj (cons (car in) acc))
(cons obj acc)))
(defun append (in obj)
(reverse! (append0 in obj nil)))
(defun nth (n in)
(if (= n 0)
(car in)
(nth (dec n) (cdr in))))
(defun last (in)
(if (cdr in)
(last (cdr in))
(car in)))
(defun first (in)
(nth 0 in))
(defun second (in)
(nth 1 in))
(defun reverse0 (in acc)
(if in
(reverse0 (cdr in) (cons (car in) acc))
acc))
(defun reverse (in)
(reverse0 in nil))
(defun range0 (curr max acc)
(if (< curr max)
(range0 (inc curr) max (cons curr acc))
acc))
(defun range1 (min max)
(reverse! (range0 min max nil)))
(defun range (max)
(range1 0 max))
(defun to-chars0 (str idx acc)
(if (char-at idx str)
(to-chars0 str (inc idx) (cons (char-at idx str) acc))
acc))
(defun to-chars (str)
(reverse! (to-chars0 str 0 nil)))
(defun rev-str (str)
(reduce str-cat (reverse! (to-chars str))))
(defun max0 (in acc)
(if in
(if (< acc (car in))
(max0 (cdr in) (car in))
(max0 (cdr in) acc))
acc))
(defun max (in)
(max0 (cdr in) (car in)))
(defun equal? (a b)
(cond (and (nil? a) (nil? b)) t,
(or (nil? a) (nil? b)) nil,
(not (equal?0 (type a) (type b))) nil,
(and (equal?0 (type a) :list) (equal?0 (car a) (car b)))
(equal? (cdr a) (cdr b)),
t (equal?0 a b)))
(defun list? (a)
(equal? :list (type a)))
(defun int? (a)
(equal? :int (type a)))
(defun keyword? (a)
(equal? :keyword (type a)))
(defun string? (a)
(equal? :string (type a)))
(defun char? (a)
(equal? :char (type a)))
(defun symbol? (a)
(equal? :symbol (type a)))
(defun itoa0 (n acc)
(if (= n 0)
acc
(let (digit (% n 10)
dchar (cond
(= digit 0) "0",
(= digit 1) "1",
(= digit 2) "2",
(= digit 3) "3",
(= digit 4) "4",
(= digit 5) "5",
(= digit 6) "6",
(= digit 7) "7",
(= digit 8) "8",
(= digit 9) "9"))
(itoa0 (// n 10) (cons dchar acc)))))
(defun itoa (n)
(if (= n 0)
"0"
(eval (cons (quote str-cat) (itoa0 n nil)))))
(defun atoi0 (in acc)
(if in
(let (dchar (car in)
digit (cond
(equal? dchar "0") 0
(equal? dchar "1") 1
(equal? dchar "2") 2
(equal? dchar "3") 3
(equal? dchar "4") 4
(equal? dchar "5") 5
(equal? dchar "6") 6
(equal? dchar "7") 7
(equal? dchar "8") 8
(equal? dchar "9") 9))
(atoi0 (cdr in) (+ digit (* 10 acc))))
acc))
(defun atoi (int-str)
(atoi0 (to-chars int-str) 0))
(defun string (x)
(if (int? x)
(itoa x)
(string0 x)))
(defun hashmap-contains? (hashmap key)
(nth 1 (hashmap-get hashmap key)))
(defun index0 (needle haystack acc)
(if haystack
(if (equal? needle (car haystack))
acc
(index0 needle (cdr haystack) (inc acc)))))
(defun index (needle haystack)
(index0 needle haystack 0))
(defun repeat0 (key times acc)
(if (< times 1)
acc
(repeat0 key (dec times) (cons key acc))))
(defun repeat (key times)
(repeat0 key times nil))
(defun qsort0 (comp in pivot less same greater)
(if in
(let (term (car in)
c (comp term pivot))
(cond
(= c 0) (qsort0 comp (cdr in) pivot less (cons term same) greater)
(< c 0) (qsort0 comp (cdr in) pivot (cons term less) same greater)
(> c 0) (qsort0 comp (cdr in) pivot less same (cons term greater))))
(list less same greater)))
(defun qsort (comp in)
(if in
(let (pivot (car in)
asdf (cdr in)
terms (qsort0 comp asdf pivot nil nil nil)
lesser (first terms)
same (cons pivot (second terms))
greater (nth 2 terms))
(if (nil? asdf)
(list pivot)
(concat (qsort comp lesser) (concat same (qsort comp greater)))))))
(defun > (a b) (not (or (= a b) (< a b))))
| 5,900 | Common Lisp | .lisp | 219 | 21.146119 | 76 | 0.531272 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 26e8499e53e17139c651c9e3a25bd43b07e4586163fd9852a05f2c9f05aa2a36 | 16,250 | [
-1
] |
16,255 | lateral.iml | davidsun0_lateral/jvm/lateral.iml | <?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/lisp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="org.ow2.asm:asm:7.3.1" level="project" />
<orderEntry type="library" name="org.ow2.asm:asm-util:7.3.1" level="project" />
<orderEntry type="module-library" scope="TEST">
<library name="JUnit5.4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter/5.4.2/junit-jupiter-5.4.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.4.2/junit-jupiter-api-5.4.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.4.2/junit-platform-commons-1.4.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-params/5.4.2/junit-jupiter-params-5.4.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.4.2/junit-jupiter-engine-5.4.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.4.2/junit-platform-engine-1.4.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module> | 1,917 | Common Lisp | .l | 31 | 55 | 132 | 0.654478 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 9a849aa1f6983b7f1306fd84cef8f1129008a4a526f61d3a3d0a6097f36e0f23 | 16,255 | [
-1
] |
16,260 | FileWatcher.java | davidsun0_lateral/jvm/src/java/lateral/interactive/FileWatcher.java | package lateral.interactive;
import java.io.IOException;
import java.nio.file.*;
import static java.nio.file.StandardWatchEventKinds.*;
public class FileWatcher {
WatchService watchService;
WatchKey key;
FileWatcher(Path dir) throws IOException {
watchService = FileSystems.getDefault().newWatchService();
key = dir.register(watchService, ENTRY_MODIFY, ENTRY_CREATE);
}
void processEvents() {
while(true) {
WatchKey key;
try {
key = watchService.take();
} catch (InterruptedException e) {
return;
}
for(WatchEvent<?> event : key.pollEvents()) {
WatchEvent.Kind<?> kind = event.kind();
if(kind == OVERFLOW)
continue;
Path name = ((WatchEvent<Path>)event).context();
System.out.printf("%s: %s\n", event.kind().name(), name);
}
key.reset();
}
}
public static void main(String[] args) throws IOException{
new FileWatcher(Paths.get("src/lisp/")).processEvents();
}
}
| 1,140 | Common Lisp | .l | 33 | 25.121212 | 73 | 0.577657 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 3a83580740760b657373c0a6c29fe4591162d67d54c519fa0ecfa4863b8a807a | 16,260 | [
-1
] |
16,261 | Repl.java | davidsun0_lateral/jvm/src/java/lateral/interactive/Repl.java | package lateral.interactive;
import lateral.lang.Compiler;
import lateral.lang.LispReader;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Repl {
public static void main(String[] args) {
Compiler.load("./src/lisp/core.lisp");
Scanner scanner = new Scanner(System.in);
String next;
System.out.println("Lateral Repl");
while(true) {
System.out.print("> ");
try {
next = scanner.nextLine();
} catch (NoSuchElementException e) {
// Ctrl+D
break;
}
if(next.isEmpty())
continue;
System.out.print("=> ");
try {
System.out.println(Compiler.eval(LispReader.read(next)));
} catch (Exception | Error e) {
e.printStackTrace();
}
}
System.out.println("Goodbye! (^_^ ) /");
}
}
| 967 | Common Lisp | .l | 31 | 21.451613 | 73 | 0.536977 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 9120a2f5f0ff5fa4e8a1b9b0a82f904a1a66b0bd545bdae3c255160fc50a73a2 | 16,261 | [
-1
] |
16,262 | ClassDefiner.java | davidsun0_lateral/jvm/src/java/lateral/lang/ClassDefiner.java | package lateral.lang;
public class ClassDefiner extends ClassLoader {
private ClassDefiner() { ; }
private Class<?> loadClass(byte[] classBytes) {
return super.defineClass(null, classBytes, 0, classBytes.length);
}
/**
* Lateral's hook to define new classes at runtime.
* No manager is needed to keep track of cousin classes because all references
* are resolved via invokedyamic and Environment's bootstrap method.
* When there are no more references to the loaded class and its ClassDefiner, both will
* be garbage collected.
*
* All classes will be loaded by the same ClassDefiner, allowing these sibling classes
* to reference each other directly. The class represented by the first byte array will be returned.
* @param classBytes An array of byte arrays containing a valid representation of a JVM class
* @return The class object created from classBytes
*/
public static Class<?> hotloadClasses(byte[] ... classBytes) {
ClassDefiner classDefiner = new ClassDefiner();
Class<?> topLevel = classDefiner.loadClass(classBytes[0]);
for(int i = 1; i < classBytes.length; i ++) {
classDefiner.loadClass(classBytes[i]);
}
return topLevel;
}
}
| 1,283 | Common Lisp | .l | 27 | 41.259259 | 104 | 0.701516 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 62072cc316dad26c385c981328affbf0e697461986132b996faf915295946c0a | 16,262 | [
-1
] |
16,263 | Assembler.java | davidsun0_lateral/jvm/src/java/lateral/lang/Assembler.java | package lateral.lang;
import org.objectweb.asm.*;
import java.util.HashMap;
import java.util.Map;
public class Assembler {
static final private int JAVA_VERSION = 55; // 55.0 = Java 11
static Keyword LABEL = Keyword.makeKeyword("label");
static Keyword ICONST = Keyword.makeKeyword("iconst");
static Keyword LDC = Keyword.makeKeyword("ldc");
static Keyword ARETURN = Keyword.makeKeyword("areturn");
static Keyword RETURN = Keyword.makeKeyword("return");
static Keyword IRETURN = Keyword.makeKeyword("ireturn");
static Keyword ALOAD = Keyword.makeKeyword("aload");
static Keyword ASTORE = Keyword.makeKeyword("astore");
static Keyword AALOAD = Keyword.makeKeyword("aaload");
static Keyword AASTORE = Keyword.makeKeyword("aastore");
static Keyword ARRAYLENGTH = Keyword.makeKeyword("arraylength");
static Keyword ATHROW = Keyword.makeKeyword("athrow");
static Keyword DUP = Keyword.makeKeyword("dup");
static Keyword CHECKCAST = Keyword.makeKeyword("checkcast");
static Keyword NEW = Keyword.makeKeyword("new");
static Keyword ANEWARRAY = Keyword.makeKeyword("anewarray");
static Keyword INSTANCEOF = Keyword.makeKeyword("instanceof");
static Keyword INVOKESTATIC = Keyword.makeKeyword("invokestatic");
static Keyword INVOKEVIRTUAL = Keyword.makeKeyword("invokevirtual");
static Keyword INVOKESPECIAL = Keyword.makeKeyword("invokespecial");
static Keyword INVOKEINTERFACE = Keyword.makeKeyword("invokeinterface");
static Keyword INVOKEDYNAMIC = Keyword.makeKeyword("invokedynamic");
static Keyword IF_ICMPNE = Keyword.makeKeyword("if_icmpne");
static Keyword IF_ICMPLT = Keyword.makeKeyword("if_icmplt");
static Keyword IFNULL = Keyword.makeKeyword("ifnull");
static Keyword GOTO = Keyword.makeKeyword("goto");
static Keyword LOOKUPSWITCH = Keyword.makeKeyword("lookupswitch");
static Keyword GETSTATIC = Keyword.makeKeyword("getstatic");
static Keyword PUTSTATIC = Keyword.makeKeyword("putstatic");
static Keyword GETFIELD = Keyword.makeKeyword("getfield");
static Keyword PUTFIELD = Keyword.makeKeyword("putfield");
// assembler directives
static lateral.lang.Symbol DEFMETHOD = lateral.lang.Symbol.makeSymbol("defmethod");
static lateral.lang.Symbol DEFCLASS = lateral.lang.Symbol.makeSymbol("defclass");
static lateral.lang.Symbol DEFFIELD = lateral.lang.Symbol.makeSymbol("deffield");
private static Map<Keyword, Integer> simpleOpMap;
private static Map<Keyword, Integer> jumpOpMap;
private static Map<Keyword, Integer> opMap;
static {
simpleOpMap = Map.ofEntries(
Map.entry(ARETURN, Opcodes.ARETURN),
Map.entry(RETURN, Opcodes.RETURN),
Map.entry(IRETURN, Opcodes.IRETURN),
Map.entry(DUP, Opcodes.DUP),
Map.entry(AALOAD, Opcodes.AALOAD),
Map.entry(AASTORE, Opcodes.AASTORE),
Map.entry(ARRAYLENGTH, Opcodes.ARRAYLENGTH),
Map.entry(ATHROW, Opcodes.ATHROW),
Map.entry(Keyword.makeKeyword("aconst_null"), Opcodes.ACONST_NULL),
Map.entry(Keyword.makeKeyword("dup2"), Opcodes.DUP2),
Map.entry(Keyword.makeKeyword("dup_x1"), Opcodes.DUP_X1),
Map.entry(Keyword.makeKeyword("dup_x2"), Opcodes.DUP_X2),
Map.entry(Keyword.makeKeyword("pop"), Opcodes.POP),
Map.entry(Keyword.makeKeyword("swap"), Opcodes.SWAP),
Map.entry(Keyword.makeKeyword("isub"), Opcodes.ISUB),
Map.entry(Keyword.makeKeyword("iadd"), Opcodes.IADD),
Map.entry(Keyword.makeKeyword("iand"), Opcodes.IAND),
Map.entry(Keyword.makeKeyword("lsub"), Opcodes.LSUB),
Map.entry(Keyword.makeKeyword("lneg"), Opcodes.LNEG)
);
jumpOpMap = Map.ofEntries(
Map.entry(IFNULL, Opcodes.IFNULL),
Map.entry(Keyword.makeKeyword("ifnonnull"), Opcodes.IFNULL),
Map.entry(Keyword.makeKeyword("ifne"), Opcodes.IFNE),
Map.entry(Keyword.makeKeyword("ifeq"), Opcodes.IFEQ),
Map.entry(Keyword.makeKeyword("ifgt"), Opcodes.IFGT),
Map.entry(Keyword.makeKeyword("ifge"), Opcodes.IFGE),
Map.entry(Keyword.makeKeyword("iflt"), Opcodes.IFLT),
Map.entry(Keyword.makeKeyword("ifle"), Opcodes.IFLE),
Map.entry(Keyword.makeKeyword("if_icmpgt"), Opcodes.IF_ICMPGT),
Map.entry(Keyword.makeKeyword("if_icmpge"), Opcodes.IF_ICMPGE),
Map.entry(Keyword.makeKeyword("if_icmple"), Opcodes.IF_ICMPLE),
Map.entry(IF_ICMPLT, Opcodes.IF_ICMPLT),
Map.entry(IF_ICMPNE, Opcodes.IF_ICMPNE),
Map.entry(GOTO, Opcodes.GOTO)
);
opMap = Map.ofEntries(
Map.entry(INVOKESTATIC, Opcodes.INVOKESTATIC),
Map.entry(INVOKEVIRTUAL, Opcodes.INVOKEVIRTUAL),
Map.entry(INVOKESPECIAL, Opcodes.INVOKESPECIAL),
Map.entry(INVOKEINTERFACE, Opcodes.INVOKEINTERFACE),
Map.entry(PUTSTATIC, Opcodes.PUTSTATIC),
Map.entry(PUTFIELD, Opcodes.PUTFIELD),
Map.entry(GETSTATIC, Opcodes.GETSTATIC),
Map.entry(GETFIELD, Opcodes.GETFIELD),
Map.entry(CHECKCAST, Opcodes.CHECKCAST),
Map.entry(ANEWARRAY, Opcodes.ANEWARRAY),
Map.entry(NEW, Opcodes.NEW),
Map.entry(INSTANCEOF, Opcodes.INSTANCEOF)
);
}
static Class<?>[] getParameterClasses(int count) {
Class<?>[] classes = new Class[count];
for(int i = 0; i < count; i ++) {
classes[i] = Object.class;
}
return classes;
}
static String getMethodDescriptor(Class<?> ... classes) {
if(classes == null || classes.length < 1)
throw new RuntimeException("malformed method descriptor");
StringBuilder sb = new StringBuilder();
sb.append('(');
for(int i = 0; i < classes.length - 1; i ++) {
sb.append(Type.getDescriptor(classes[i]));
}
sb.append(')');
sb.append(Type.getDescriptor(classes[classes.length - 1]));
return sb.toString();
}
static String getMethodDescriptor(Class<?> returnType, int count) {
StringBuilder sb = new StringBuilder();
sb.append('(');
for(int i = 0; i < count; i ++) {
sb.append(Type.getDescriptor(Object.class));
}
sb.append(')');
sb.append(Type.getDescriptor(returnType));
return sb.toString();
}
private static void visitOpCodes(MethodVisitor mv, Iterable<Object> opcodes) {
HashMap<lateral.lang.Symbol, Label> labelMap = new HashMap<>();
for(Object opcode : opcodes) {
// System.out.println(opcode);
if(opcode instanceof Sequence) {
Keyword head = (Keyword) ((Sequence) opcode).first();
Sequence body = ((Sequence) opcode).rest();
if(jumpOpMap.containsKey(head)) {
int opcodeValue = jumpOpMap.get(head);
lateral.lang.Symbol labelName = (lateral.lang.Symbol) body.first();
if(labelMap.containsKey(labelName)) {
mv.visitJumpInsn(opcodeValue, labelMap.get(labelName));
} else {
Label label = new Label();
mv.visitJumpInsn(opcodeValue, label);
labelMap.put(labelName, label);
}
} else if(head.equals(LABEL)) {
lateral.lang.Symbol labelName = (lateral.lang.Symbol) body.first();
if(labelMap.containsKey(labelName)) {
mv.visitLabel(labelMap.get(labelName));
} else {
Label label = new Label();
mv.visitLabel(label);
labelMap.put(labelName, label);
}
} else if(head.equals(LDC)) {
// TODO: better LDC dynamic syntax
if(body.first() instanceof Sequence) {
// assuming all LDC sequences are dynamic constants
// it would be illegal otherwise
Sequence dynamicConstant = (Sequence) body.first();
String name = (String) dynamicConstant.first();
String descriptor = (String) dynamicConstant.second();
Sequence handleArgs = (Sequence) dynamicConstant.third();
Handle dynamicHandle = new Handle(
Opcodes.H_INVOKESTATIC,
(String) handleArgs.first(),
(String) handleArgs.second(),
(String) handleArgs.third(),
false);
mv.visitLdcInsn(new ConstantDynamic(
name, descriptor, dynamicHandle));
} else {
mv.visitLdcInsn(((Sequence) opcode).second());
}
} else if(INVOKESTATIC.equals(head) || INVOKEVIRTUAL.equals(head)
|| INVOKESPECIAL.equals(head) || INVOKEINTERFACE.equals(head)) {
mv.visitMethodInsn(opMap.get(head),
(String) body.first(),
(String) body.second(),
(String) body.third(),
INVOKEINTERFACE.equals(head));
} else if(INVOKEDYNAMIC.equals(head)) {
// (:invokedynamic (handle-class handle-name handle-type) dyn-name dyn-type bsma ...)
Sequence handleArgs = (Sequence) body.first();
Handle dynamicHandle = new Handle(
Opcodes.H_INVOKESTATIC,
(String) handleArgs.first(),
(String) handleArgs.second(),
(String) handleArgs.third(),
false);
Object[] bootstrapArgs = new Object[body.size() - 3];
for(int i = 0; i < bootstrapArgs.length; i ++) {
bootstrapArgs[i] = body.nth(i + 3);
}
mv.visitInvokeDynamicInsn(
(String) body.second(),
(String) body.third(),
dynamicHandle,
bootstrapArgs
);
} else if(head.equals(GETSTATIC) || head.equals(GETFIELD) ||
head.equals(PUTSTATIC) || head.equals(PUTFIELD)) {
mv.visitFieldInsn(opMap.get(head),
(String) body.first(),
(String) body.second(),
(String) body.third());
} else if(head.equals(ALOAD)) {
int value = (Integer) body.first();
mv.visitVarInsn(Opcodes.ALOAD, value);
} else if(head.equals(ASTORE)) {
int value = (Integer) body.first();
mv.visitVarInsn(Opcodes.ASTORE, value);
} else if(head.equals(ICONST)) {
int value = (Integer) body.first();
if (-1 <= value && value <= 5) {
mv.visitInsn(Opcodes.ICONST_0 + value);
} else {
mv.visitLdcInsn(value);
}
} else if(head.equals(CHECKCAST) || head.equals(NEW)
|| head.equals(ANEWARRAY) || head.equals(INSTANCEOF)) {
// checkcast, new, anewarray, instanceof
mv.visitTypeInsn(opMap.get(head), (String) body.first());
} else if(head.equals(LOOKUPSWITCH)) {
Label defaultLabel = new Label();
labelMap.put((lateral.lang.Symbol) body.first(), defaultLabel);
Sequence indexList = (Sequence) body.second();
int labelCount = indexList.size();
int[] indicies = new int[labelCount];
for(int i = 0; i < labelCount; i ++, indexList = indexList.rest()) {
indicies[i] = (Integer) indexList.first();
}
Sequence labelList = (Sequence) body.third();
Label[] labels = new Label[labelCount];
for(int i = 0; i < labelCount; i ++, labelList = labelList.rest()) {
lateral.lang.Symbol labSym = (lateral.lang.Symbol) labelList.first();
Label label = new Label();
labelMap.put(labSym, label);
labels[i] = label;
}
mv.visitLookupSwitchInsn(defaultLabel, indicies, labels);
} else {
throw new RuntimeException(head.toString());
}
} else {
if(opcode instanceof Keyword && simpleOpMap.containsKey(opcode)) {
mv.visitInsn(simpleOpMap.get(opcode));
} else {
throw new RuntimeException(opcode.toString());
}
}
}
}
/**
* Converts a tree representing a JVM class into the byte array representation of the class
* @param asmTree Sequence based tree
* @return byte array representation of the asmTree class
*/
static byte[] buildClass(Sequence asmTree) {
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES + ClassWriter.COMPUTE_MAXS);
// TODO: assert first arguments match expected
// first is defclass
String name = (String) asmTree.second();
// TODO: get meta
Sequence meta = (Sequence) asmTree.third();
classWriter.visit(JAVA_VERSION, Opcodes.ACC_PUBLIC, name, null,
Type.getInternalName(Function.class), null);
for(int i = 0; i < 3; i ++) {
asmTree = asmTree.rest();
}
for(Object obj : asmTree) {
if(obj instanceof Sequence) {
Sequence member = (Sequence) obj;
Object head = member.first();
if(DEFMETHOD.equals(head)) {
//System.out.println(member);
String mname = (String) member.second();
String descriptor = (String) member.third();
// TODO: get meta
Sequence mmeta = (Sequence) member.fourth();
MethodVisitor mv = classWriter.visitMethod(Opcodes.ACC_PUBLIC, mname, descriptor,
null, null);
for (int i = 0; i < 4; i++) {
member = member.rest();
}
//System.out.println(member);
mv.visitCode();
visitOpCodes(mv, member);
mv.visitMaxs(-1, -1);
mv.visitEnd();
} else if(DEFFIELD.equals(head)) {
classWriter.visitField(Opcodes.ACC_PUBLIC,
(String) member.second(),
(String) member.third(),
null, null);
} else {
// TODO subclass
throw new SyntaxException();
}
} else {
throw new SyntaxException();
}
}
byte[] classBytes = classWriter.toByteArray();
/*
PrintWriter printWriter = new PrintWriter(System.out);
CheckClassAdapter.verify(new ClassReader(classBytes), true, printWriter);
try (FileOutputStream fos = new FileOutputStream("Test.class")){
fos.write(classBytes);
} catch (IOException e) {
e.printStackTrace();
}
// */
return classBytes;
}
}
| 16,133 | Common Lisp | .l | 314 | 36.089172 | 105 | 0.551748 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 9fa7d807860679933a3c4a40d363c53c420262224ec88834813f390f36bf14d6 | 16,263 | [
-1
] |
16,264 | Symbol.java | davidsun0_lateral/jvm/src/java/lateral/lang/Symbol.java | package lateral.lang;
public final class Symbol {
private final String value;
private final int hash;
private Symbol(String value){
this.value = value;
hash = value.hashCode();
}
public static Symbol makeSymbol(String value) {
// TODO: Symbol interning
return new Symbol(value);
}
static private int gensymCount = -1;
public static Symbol gensym(String prefix) {
gensymCount ++;
// TODO: check if symbol exists already
return Symbol.makeSymbol(prefix + gensymCount);
}
public int hashCode() {
return hash;
}
public boolean equals(Object obj) {
if(obj == this)
return true;
return obj instanceof Symbol
&& hash == ((Symbol) obj).hash
&& value.equals(((Symbol) obj).value);
}
public String toString() {
return value;
}
}
| 931 | Common Lisp | .l | 32 | 21.46875 | 58 | 0.59596 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | a43a8b3e0b87c91c353209930c7a1e0ac2218786194653c8287dfbdd13d87779 | 16,264 | [
-1
] |
16,265 | CompClass.java | davidsun0_lateral/jvm/src/java/lateral/lang/CompClass.java | package lateral.lang;
import org.objectweb.asm.Type;
import java.lang.invoke.MethodType;
import java.util.ArrayList;
import java.util.Collections;
/**
* Compilation unit representing a JVM Class
*/
class CompClass {
static int CLASS_NUM = 0;
String name;
Symbol functionName;
ArrayList<Object> members;
private ArrayList<Symbol> captured;
boolean isMacro = false;
// arities is the list containing argument counts of non-varargs invokes
ArrayList<Integer> arities = new ArrayList<>();
/*
Each function can only have one vararg arity (otherwise it would be ambiguous)
varargsCount is the number of non-vararg arguments the vararg arity has
if varargsCount is -1, this function does not have a vararg arity
*/
int varargsCount = -1;
CompClass() {
this(null);
}
CompClass(Symbol functionName) {
members = new ArrayList<>();
captured = new ArrayList<>();
this.name = "AnonFunc" + (CLASS_NUM ++);
this.functionName = functionName;
}
String getClassName() {
return this.name;
}
Symbol getFunctionName() {
return functionName;
}
String getConstructor() {
return Assembler.getMethodDescriptor(void.class, captured.size());
}
void addCaptured(Symbol symbol) {
for(Symbol capture : captured) {
if(symbol.equals(capture))
return;
}
captured.add(symbol);
}
ArrayList<Symbol> getCaptured() {
return captured;
}
void generateConstructor() {
ArrayList<Object> opcodes = new ArrayList<>();
opcodes.add(Sequence.makeList(Assembler.ALOAD, 0));
opcodes.add(Sequence.makeList(
Assembler.INVOKESPECIAL,
Type.getInternalName(Function.class),
"<init>",
"()V"));
opcodes.add(Sequence.makeList(Assembler.ALOAD, 0));
int localSlotNum = 1;
for(Symbol sym : captured) {
// generate byecode to set fields
opcodes.add(Assembler.DUP);
opcodes.add(Sequence.makeList(Assembler.ALOAD, localSlotNum));
opcodes.add(Sequence.makeList(
Assembler.PUTFIELD,
name, sym.toString(), Type.getDescriptor(Object.class)
));
// also generate fields
members.add(Sequence.makeList(Assembler.DEFFIELD, sym.toString(), Type.getDescriptor(Object.class)));
localSlotNum ++;
}
opcodes.add(Assembler.RETURN);
// bundle into method
Sequence header = Sequence.makeList(
Assembler.DEFMETHOD, "<init>",
getConstructor(), EmptySequence.EMPTY_SEQUENCE
);
Sequence body = Sequence.makeList(opcodes.toArray());
members.add(Sequence.concat(new ArraySequence(header, body)));
}
void generateInvoker(int paramCount, boolean isVarargs, ArrayList<Object> opcodes) {
if(isVarargs) {
if(varargsCount == -1)
varargsCount = paramCount - 1;
else
throw new RuntimeException();
} else {
// TODO: check arity doesn't already exist
arities.add(paramCount);
}
Class<?>[] params = Assembler.getParameterClasses(paramCount);
if(isVarargs)
params[params.length - 1] = Sequence.class;
/*
TODO: use java.util.function interfaces
or make my own
In compiler, avoid expensive (?) calls through varargs apply
0: Supplier get()
1: Function/UnaryOperator apply(A)
2: BiFunction/BinaryOperator apply(A, B)
*/
Sequence header = Sequence.makeList(
Assembler.DEFMETHOD, "invoke",
MethodType.methodType(Object.class, params).toMethodDescriptorString(),
EmptySequence.EMPTY_SEQUENCE);
Sequence body = new ArraySequence(opcodes.toArray());
members.add(Sequence.concat(new ArraySequence(header, body)));
}
void addInvokerCase(ArrayList<Object> opcodes, int argc) {
// load function itself
opcodes.add(Sequence.makeList(Assembler.ALOAD, 0));
for(int i = 0; i < argc; i ++) {
// load args[i] onto stack
opcodes.add(Sequence.makeList(Assembler.ALOAD, 1));
opcodes.add(Sequence.makeList(Assembler.ICONST, i));
opcodes.add(Assembler.AALOAD);
}
// call appropriate invoke
String descriptor = Assembler.getMethodDescriptor(Object.class, argc);
opcodes.add(Sequence.makeList(Assembler.INVOKEVIRTUAL, this.name, "invoke", descriptor));
opcodes.add(Assembler.ARETURN);
}
void addVarargsInvokerCase(ArrayList<Object> opcodes, Symbol errLabel) {
// only one varargs arity
opcodes.add(Sequence.makeList(Assembler.ICONST, varargsCount));
opcodes.add(Sequence.makeList(Assembler.IF_ICMPLT, errLabel));
opcodes.add(Sequence.makeList(Assembler.ALOAD, 0));
for(int i = 0; i < varargsCount; i ++) {
// load args[i] onto stack
opcodes.add(Sequence.makeList(Assembler.ALOAD, 1));
opcodes.add(Sequence.makeList(Assembler.ICONST, i));
opcodes.add(Assembler.AALOAD);
}
opcodes.add(Sequence.makeList(Assembler.ALOAD, 1));
opcodes.add(Sequence.makeList(Assembler.ICONST, varargsCount));
opcodes.add(Sequence.makeList(Assembler.INVOKESTATIC,
Type.getInternalName(Sequence.class), "makeList",
MethodType.methodType(Sequence.class, Object[].class, int.class).toMethodDescriptorString()));
// call appropriate invoke
Class<?>[] paramTypes = Assembler.getParameterClasses(varargsCount + 1);
paramTypes[varargsCount] = Sequence.class;
String descriptor = MethodType.methodType(Object.class, paramTypes).toMethodDescriptorString();
// String descriptor = Assembler.getMethodDescriptor(Object.class, argc);
opcodes.add(Sequence.makeList(Assembler.INVOKEVIRTUAL, this.name, "invoke", descriptor));
opcodes.add(Assembler.ARETURN);
}
void generateInherits(boolean isMacro) {
this.isMacro = isMacro;
members.add(Sequence.makeList(
Assembler.DEFMETHOD, "isMacro", "()Z", EmptySequence.EMPTY_SEQUENCE,
Sequence.makeList(Assembler.ICONST, isMacro ? 1 : 0),
Assembler.IRETURN));
// APPLY GENERATOR IS NOT FUN TO WRITE IN JAVA
/*
Object apply(Object ... args) {
switch(args.length) {
case 0:
return this.invoke();
case 1:
return this.invoke(args[0]);
...
default:
if(args.length > varargsCount)
return this.invoke(args[0] ... args[varargsCount -1],
new ArraySequence(args, varargsCount));
else
throw new RuntimeError();
}
}
*/
ArrayList<Object> applyOps = new ArrayList<>();
// header
applyOps.add(Assembler.DEFMETHOD);
applyOps.add("apply");
applyOps.add("([Ljava/lang/Object;)Ljava/lang/Object;");
applyOps.add(EmptySequence.EMPTY_SEQUENCE);
// body
applyOps.add(Sequence.makeList(Assembler.ALOAD, 1));
applyOps.add(Assembler.ARRAYLENGTH);
Symbol errLabel = Symbol.gensym("error");
// TODO: optimize for seamless varargs (no holes, every apply call is valid) to not throw error
if(arities.size() == 1) {
// simple if statement for single arity functions
applyOps.add(Sequence.makeList(Assembler.ICONST, arities.get(0)));
applyOps.add(Sequence.makeList(Assembler.IF_ICMPNE, errLabel));
addInvokerCase(applyOps, arities.get(0));
// single arity cannot be seamless
} else if(arities.size() == 0 && varargsCount != -1) {
addVarargsInvokerCase(applyOps, errLabel);
// varargs is seamless if varargsCount == 0
} else if(arities.size() > 1) {
// sort arities
Collections.sort(arities);
// seamless if arities start at 0 and varargsCount is equal to smallest hole
Symbol[] arityLabels = new Symbol[arities.size()];
for (int i = 0; i < arities.size(); i++) {
arityLabels[i] = Symbol.gensym("table");
}
Symbol defaultLabel = Symbol.gensym("default");
applyOps.add(Sequence.makeList(Assembler.LOOKUPSWITCH,
defaultLabel, new ArraySequence(arities.toArray()),
new ArraySequence((Object[]) arityLabels)));
for (int i = 0; i < arities.size(); i++) {
// lookupswitch label
applyOps.add(Sequence.makeList(Assembler.LABEL, arityLabels[i]));
addInvokerCase(applyOps, arities.get(i));
}
applyOps.add(Sequence.makeList(Assembler.LABEL, defaultLabel));
if(varargsCount != -1)
addVarargsInvokerCase(applyOps, errLabel);
} else {
throw new RuntimeException();
}
applyOps.add(Sequence.makeList(Assembler.LABEL, errLabel));
applyOps.add(Sequence.makeList(Assembler.NEW, Type.getInternalName(RuntimeException.class)));
applyOps.add(Assembler.DUP);
/*
// display debug info about the array
applyOps.add(ArraySequence.makeList(Assembler.ALOAD, 1));
applyOps.add(ArraySequence.makeList(Assembler.INVOKESTATIC, Type.getInternalName(Arrays.class),
"deepToString", "([Ljava/lang/Object;)Ljava/lang/String;"));
applyOps.add(ArraySequence.makeList(Assembler.INVOKESPECIAL,
Type.getInternalName(RuntimeException.class),
"<init>", "(Ljava/lang/String;)V"));
*/
applyOps.add(Sequence.makeList(Assembler.INVOKESPECIAL,
Type.getInternalName(RuntimeException.class),
"<init>", "()V"));
applyOps.add(Assembler.ATHROW);
members.add(Sequence.makeList(applyOps.toArray()));
}
Sequence toTree() {
Sequence header = Sequence.makeList(
Assembler.DEFCLASS,
getClassName(),
// meta?
EmptySequence.EMPTY_SEQUENCE);
Sequence body = new ArraySequence(members.toArray());
// TODO: better concat
return Sequence.concat(new ArraySequence(header, body));
}
void generateToString(String name) {
String value = String.format("#<%s %s>", isMacro ? "macro" : "function", name);
members.add(Sequence.makeList(
Assembler.DEFMETHOD, "toString", "()Ljava/lang/String;", EmptySequence.EMPTY_SEQUENCE,
Sequence.makeList(Assembler.LDC, value),
Assembler.ARETURN
));
}
}
| 11,124 | Common Lisp | .l | 252 | 33.496032 | 113 | 0.611823 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | c92f4af33c7e2daf695359494d4508863aad62488e59783577c35879a7d5d76e | 16,265 | [
-1
] |
16,266 | Compiler.java | davidsun0_lateral/jvm/src/java/lateral/lang/Compiler.java | package lateral.lang;
import org.objectweb.asm.Type;
import java.io.IOException;
import java.lang.invoke.CallSite;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayDeque;
import java.util.ArrayList;
public class Compiler {
static Symbol LAMBDA = Symbol.makeSymbol("function");
static Symbol DEFMACRO = Symbol.makeSymbol("defmacro");
static Symbol DEFUN = Symbol.makeSymbol("defun");
static Symbol DEFINE = Symbol.makeSymbol("def");
static Symbol ASM = Symbol.makeSymbol("asm-quote");
static Symbol DEASM = Symbol.makeSymbol("asm-unquote");
static Symbol LET = Symbol.makeSymbol("let");
static Symbol IF = Symbol.makeSymbol("if");
static Symbol QUOTE = Symbol.makeSymbol("quote");
static Symbol LIST = Symbol.makeSymbol("list");
static Symbol RECUR = Symbol.makeSymbol("recur");
static Keyword REST = Keyword.makeKeyword("rest");
static Sequence PARSE_INT = new ArraySequence(
Assembler.INVOKESTATIC, Type.getInternalName(Integer.class),
"valueOf", Assembler.getMethodDescriptor(int.class, Integer.class)
);
// TODO: convert to dynamic LDC
static Sequence MAKE_SYM = new ArraySequence(
Assembler.INVOKESTATIC, Type.getInternalName(Symbol.class),
"makeSymbol", Assembler.getMethodDescriptor(String.class, Symbol.class)
);
static Sequence KEY_HANDLE = Sequence.makeList(
Type.getInternalName(Bootstrapper.class), "keywordConstant",
MethodType.methodType(Keyword.class, MethodHandles.Lookup.class,
String.class, Class.class).toMethodDescriptorString());
// Environment.dynamicObject
// TODO: convert to dynamic LDC
static Sequence ENVIR_OBJECT = new ArraySequence(
Type.getInternalName(Environment.class), "dynamicObject",
MethodType.methodType(CallSite.class, MethodHandles.Lookup.class, String.class,
MethodType.class, String.class).toMethodDescriptorString()
);
// Environment.dynamicFunction
static Sequence ENVIR_FUNCTION = new ArraySequence(
Type.getInternalName(Environment.class), "dynamicFunction",
MethodType.methodType(CallSite.class, MethodHandles.Lookup.class, String.class,
MethodType.class, String.class).toMethodDescriptorString()
);
// Bootstrapper.sequenceBuilder
static Sequence SEQUENCE_BOOTSTRAP = new ArraySequence(
Type.getInternalName(Bootstrapper.class), "sequenceBuilder",
MethodType.methodType(CallSite.class, MethodHandles.Lookup.class, String.class,
MethodType.class).toMethodDescriptorString()
);
ArrayList<CompClass> classes = new ArrayList<>();
public static Object macroExpand(Object expr) {
while(true) {
if(!(expr instanceof Sequence)) {
return expr;
}
Object head = ((Sequence) expr).first();
if(!(head instanceof Symbol)) {
return expr;
}
Object resource = Environment.getIfExists((Symbol) head);
if(resource instanceof Function && ((Function) resource).isMacro()) {
Function macro = (Function) resource;
Object[] args = new Object[((Sequence) expr).rest().size()];
// ignore the first arg, which is the macro name
Sequence argSeq = ((Sequence) expr).rest();
for(int i = 0; i < args.length; i ++) {
args[i] = argSeq.first();
argSeq = argSeq.rest();
}
expr = macro.apply(args);
} else {
return expr;
}
}
}
static class CompilationContext {
ArrayList<Object> bytecode;
CompEnvir envir;
CompClass compClass;
boolean isVarargs;
int paramCount;
CompilationContext(CompEnvir envir, CompClass compClass, int paramCount, boolean isVarargs) {
bytecode = new ArrayList<>();
this.envir = envir;
this.compClass = compClass;
this.paramCount = paramCount;
this.isVarargs = isVarargs;
}
void add(Object ... objects) {
if(objects == null || objects.length == 0) {
bytecode.add(EmptySequence.EMPTY_SEQUENCE);
} else if(objects.length == 1) {
bytecode.add(objects[0]);
} else {
bytecode.add(new ArraySequence(objects));
}
}
}
void compileQuote(Object ast, CompilationContext context) {
if(ast instanceof Symbol) {
context.add(Assembler.LDC, ast.toString());
context.add(MAKE_SYM);
} else if(ast instanceof Keyword) {
context.add(Assembler.LDC,
Sequence.makeList(
((Keyword) ast).getValue(),
Type.getDescriptor(Keyword.class),
KEY_HANDLE));
} else if(ast instanceof Integer) {
context.add(Assembler.ICONST, ast);
context.add(PARSE_INT);
} else if(ast instanceof String) {
context.add(Assembler.LDC, ast);
} else if(ast instanceof Sequence) {
Sequence body = (Sequence) ast;
for(Object obj : body) {
compileQuote(obj, context);
}
context.add(Assembler.INVOKEDYNAMIC, SEQUENCE_BOOTSTRAP,
"makeSequence", Assembler.getMethodDescriptor(Sequence.class, body.size()));
} else {
throw new RuntimeException("can't quote " + ast);
}
}
CompClass compileLambda(Sequence expr, CompEnvir parentEnvir) {
Object head = expr.first();
Sequence forms = expr.rest();
boolean isMacro = false;
Symbol name = null;
if(DEFUN.equals(head)) {
name = (Symbol) expr.second();
forms = forms.rest();
} else if(DEFMACRO.equals(head)) {
name = (Symbol) expr.second();
isMacro = true;
forms = forms.rest();
}
CompClass lambdaClass = new CompClass(name);
classes.add(lambdaClass);
// TODO: assert that there are a matched number of params / body
for(; !forms.isEmpty(); forms = forms.rest().rest()) {
CompEnvir lambdaEnvir = new CompEnvir(parentEnvir, lambdaClass);
Sequence params = (Sequence) forms.first();
int paramCount = params.size();
boolean isVarargs = false;
// TODO: destructuring
Sequence destruct = params;
while (!destruct.isEmpty()) {
if (REST.equals(destruct.first()) && destruct.rest().rest().isEmpty()) {
lambdaEnvir.insert((Symbol) destruct.second());
isVarargs = true;
paramCount--;
break;
} else {
lambdaEnvir.insert((Symbol) destruct.first());
}
destruct = destruct.rest();
}
CompilationContext context = new CompilationContext(lambdaEnvir, lambdaClass, paramCount, isVarargs);
// compile invoke method
compile(forms.second(), context, true);
lambdaClass.generateInvoker(paramCount, isVarargs, context.bytecode);
}
// then generate class methods (depends on body compilation)
lambdaClass.generateConstructor();
// lambdaClass.generateInherits(isMacro, isVarargs, paramCount);
lambdaClass.generateInherits(isMacro);
if(name != null)
lambdaClass.generateToString(name.toString());
return lambdaClass;
}
void compile(Object ast, CompilationContext context, boolean isTail) {
ast = macroExpand(ast);
if(ast instanceof Sequence) {
Sequence astSequence = (Sequence) ast;
Object head = astSequence.first();
Sequence body = astSequence.rest();
if (LAMBDA.equals(head)) {
// compile body
// need: constructor args
// need: constructor
CompClass lambdaClass = compileLambda((Sequence) ast, context.envir);
context.add(Assembler.NEW, lambdaClass.getClassName());
context.add(Assembler.DUP);
for(Symbol sym : lambdaClass.getCaptured()) {
compile(sym, context, false);
}
context.add(Assembler.INVOKESPECIAL, lambdaClass.getClassName(), "<init>",
lambdaClass.getConstructor());
} else if (LET.equals(head)) {
CompEnvir parentEnvir = context.envir;
context.envir = new CompEnvir(context.envir);
Sequence bindings = (Sequence) body.first();
while (!bindings.isEmpty()) {
compile(bindings.second(), context, false);
int index = context.envir.insert((Symbol) bindings.first());
context.add(Sequence.makeList(Assembler.ASTORE, index));
bindings = bindings.rest().rest();
}
compile(body.second(), context, isTail);
context.envir = parentEnvir;
return;
} else if (RECUR.equals(head)) {
/*
assert that
- in tail position
- args applicable to current function
- inside function construct
pseudocode:
if first of bytecodes is not label:
gensym label
compile and store each argument
goto label
*/
if(!isTail || (context.isVarargs && body.size() < context.paramCount - 1)
|| (!context.isVarargs && body.size() != context.paramCount)) {
throw new RuntimeException("wrong arity for recur");
}
Symbol label;
Object firstBytecode = context.bytecode.get(0);
if(firstBytecode instanceof Sequence &&
Assembler.LABEL.equals(((Sequence) firstBytecode).first())) {
label = (Symbol) ((Sequence) firstBytecode).second();
} else {
label = Symbol.gensym("start");
context.bytecode.add(0, Sequence.makeList(Assembler.LABEL, label));
}
for(Object obj : body) {
compile(obj, context, false);
}
// first slot is 'this', locals begin at 1
for(int i = body.size(); i > 0; i --) {
context.add(Assembler.ASTORE, i);
}
// TODO: repack rest arguments if function is varargs
context.add(Assembler.GOTO, label);
return;
} else if (QUOTE.equals(head)) {
compileQuote(body.first(), context);
} else if (LIST.equals(head)) {
for (Object arg : astSequence.rest()) {
compile(arg, context, false);
}
context.add(Assembler.INVOKEDYNAMIC, SEQUENCE_BOOTSTRAP,
"makeSequence", Assembler.getMethodDescriptor(Sequence.class, body.size()));
} else if (IF.equals(head)) {
// TODO: assert arglen = 3
Symbol targetLabel = Symbol.gensym("if");
Symbol endLabel = null;
// test clause
compile(body.first(), context, false);
context.add(Assembler.IFNULL, targetLabel);
// then clause
compile(body.second(), context, isTail);
if (!isTail) {
endLabel = Symbol.gensym("end");
context.add(Assembler.GOTO, endLabel);
}
context.add(Assembler.LABEL, targetLabel);
// else clause
compile(body.third(), context, isTail);
if (!isTail) {
context.add(Assembler.LABEL, endLabel);
}
// skip end of method's isTail test
return;
} else if (ASM.equals(head)) {
for (Object obj : astSequence.rest()) {
if (obj instanceof Sequence && DEASM.equals(((Sequence) obj).first()))
compile(((Sequence) obj).second(), context, false);
else
context.add(obj);
}
} else if (head instanceof Symbol && !context.envir.contains((Symbol) head)) {
if(head.equals(context.compClass.getFunctionName())) {
/*
Optimization: if the function calls itself with a different arity,
bypass the apply function and directly call invoke
TODO: extend to lambdas calling parent function
*/
context.add(Assembler.ALOAD, 0);
for (Object arg : body) {
compile(arg, context, false);
}
context.add(Assembler.INVOKEVIRTUAL, context.compClass.getClassName(),
"invoke", Assembler.getMethodDescriptor(Object.class, body.size()));
} else {
// optimization via invokedynamic on function name
for (Object arg : body) {
compile(arg, context, false);
}
context.add(Assembler.INVOKEDYNAMIC, ENVIR_FUNCTION, "futureUse",
Assembler.getMethodDescriptor(Object.class, body.size()),
head.toString());
}
} else {
// dynamically load function object and call Function.apply
compile(head, context, false);
// pack arguments into array
int argc = body.size();
context.add(Assembler.CHECKCAST, Type.getInternalName(Function.class));
context.add(Assembler.ICONST, argc);
context.add(Assembler.ANEWARRAY, Type.getInternalName(Object.class));
for (int i = 0; i < argc; i++) {
context.add(Assembler.DUP);
context.add(Assembler.ICONST, i);
compile(body.first(), context, false);
context.add(Assembler.AASTORE);
body = body.rest();
}
// call apply
context.add(Assembler.INVOKEVIRTUAL, Type.getInternalName(Function.class),
"apply", "([Ljava/lang/Object;)Ljava/lang/Object;");
}
} else if(ast instanceof Symbol) {
/*
resolve a symbol: determine if it is
- local field (argument or let variable): aload
- closed-over variable: get field
- global variable: invokedynamic for object from envir
*/
Symbol symAst = (Symbol) ast;
CompEnvir compEnvir = context.envir;
boolean closureSeen = false;
boolean closedVariable = false;
ArrayDeque<CompEnvir> envirChain = new ArrayDeque<>();
while (compEnvir != null) {
if (closureSeen)
closedVariable = true;
if (compEnvir.closure != null)
closureSeen = true;
envirChain.push(compEnvir);
if (compEnvir.bindings.containsKey(symAst))
break;
else
compEnvir = compEnvir.parent;
}
// searched through all parent envirs and did not find symbol
if (compEnvir == null) {
// if not in parents, invokedynamic to bind to global
context.add(Assembler.INVOKEDYNAMIC, ENVIR_OBJECT, ast.toString(),
Assembler.getMethodDescriptor(Object.class, 0), "test");
} else {
CompEnvir top = envirChain.pop();
if (closedVariable) {
// pull the closed variable through all of the closures
while (!envirChain.isEmpty()) {
compEnvir = envirChain.pop();
if (compEnvir.closure != null) {
compEnvir.closure.addCaptured(symAst);
// compEnvir.closure.captured.add(symAst);
}
}
// load the function object onto the stack
context.add(Assembler.ALOAD, 0);
// get the closed variable from the closed field
context.add(Assembler.GETFIELD, context.compClass.name, symAst.toString(),
Type.getDescriptor(Object.class));
// System.out.println("closed over var " + symAst.toString());
} else {
int localSlot = top.bindings.get(symAst);
// System.out.println(symAst.toString() + " is localvar@" + localSlot);
context.add(Assembler.ALOAD, localSlot);
}
}
} else if (ast instanceof Integer) {
context.add(Assembler.ICONST, ast);
context.add(PARSE_INT);
} else if (ast instanceof String) {
context.add(Assembler.LDC, ast);
} else if (ast instanceof Keyword) {
context.add(Assembler.LDC,
Sequence.makeList(
((Keyword) ast).getValue(),
Type.getDescriptor(Keyword.class),
KEY_HANDLE));
} else {
throw new RuntimeException(ast.toString());
}
if(isTail)
context.add(Assembler.ARETURN);
}
public static Object eval(Object ast) {
ast = macroExpand(ast);
Compiler compiler = new Compiler();
if(ast instanceof Sequence) {
Object head = ((Sequence) ast).first();
if(DEFINE.equals(head)) {
Symbol name = (Symbol) ((Sequence) ast).second();
Object value = eval(((Sequence) ast).third());
return Environment.insert(name, value);
} else if(DEFMACRO.equals(head) || DEFUN.equals(head)) {
Symbol name = (Symbol) ((Sequence) ast).second();
compiler.compileLambda((Sequence) ast, null);
byte[][] classBytes = new byte[compiler.classes.size()][];
for(int i = 0; i < compiler.classes.size(); i ++) {
classBytes[i] = Assembler.buildClass(compiler.classes.get(i).toTree());
}
try {
Class<?> mainClass = ClassDefiner.hotloadClasses(classBytes);
Constructor<?> constructor = mainClass.getConstructor();
return Environment.insert(name, constructor.newInstance());
} catch (NoSuchMethodException | InstantiationException |
IllegalAccessException | InvocationTargetException e) {
System.err.println("internal compiler error:");
e.printStackTrace();
}
}
}
CompClass main = new CompClass();
compiler.classes.add(main);
CompilationContext context = new CompilationContext(new CompEnvir(null), main, 0, false);
compiler.compile(ast, context, true);
main.generateInvoker(0, false, context.bytecode);
main.generateInherits(false);
main.generateConstructor();
byte[][] classBytes = new byte[compiler.classes.size()][];
for(int i = 0; i < compiler.classes.size(); i ++) {
classBytes[i] = Assembler.buildClass(compiler.classes.get(i).toTree());
}
try {
Class<?> mainClass = ClassDefiner.hotloadClasses(classBytes);
Constructor<?> constructor = mainClass.getConstructor();
Object object = constructor.newInstance();
return ((Function) object).apply();
} catch (NoSuchMethodException | InstantiationException |
IllegalAccessException | InvocationTargetException e) {
System.err.println("internal compiler error:");
e.printStackTrace();
}
return null;
}
public static Object load(String filename) {
try {
LispReader lispReader = LispReader.fileReader(filename);
Object form;
while((form = lispReader.readForm()) != null) {
eval(form);
}
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static void main(String[] args) throws IOException {
load("./src/lisp/core.lisp");
LispReader lispReader = LispReader.fileReader("./src/lisp/compiler.lisp");
Object form;
while((form = lispReader.readForm()) != null) {
try {
System.out.println("=> " + eval(form));
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
| 21,672 | Common Lisp | .l | 463 | 32.390929 | 113 | 0.548489 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | e89d83556887f98ffd9e491259b20fcb7237f2ecff594984c30120d2ed7bf276 | 16,266 | [
-1
] |
16,274 | callgrind.out.23095 | davidsun0_lateral/interpreter/old/callgrind.out.23095 | # callgrind format
version: 1
creator: callgrind-3.13.0
pid: 23095
cmd: ./a.out jvmclass.lisp
part: 1
desc: I1 cache:
desc: D1 cache:
desc: LL cache:
desc: Timerange: Basic block 0 - 7658001757
desc: Trigger: Program termination
positions: line
events: Ir
summary: 48779787292
ob=(4) /usr/lib/valgrind/vgpreload_core-amd64-linux.so
fl=(81) ???
fn=(758) 0x0000000000000600
0 8
cob=(2) ???
cfi=(18) ???
cfn=(764) 0x0000000004a2a560
calls=1 0
0 75
0 1
cfn=(768) 0x0000000000000570
calls=1 0
0 8
0 3
fn=(768)
0 8
fn=(302) 0x0000000000000640
0 17
ob=(7) /home/david/Lateral/src/a.out
fl=(92) ???
fn=(750) 0x0000000000000c40
0 8
fn=(736) 0x0000000000000cd0
0 8
cob=(2)
cfi=(18)
cfn=(742) 0x0000000000108c00
calls=1 0
0 75
0 1
cfn=(750)
calls=1 0
0 8
0 3
fn=(352) _start
0 11
cob=(3) /lib/x86_64-linux-gnu/libc-2.27.so
cfi=(93) /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c
cfn=(354) (below main)
calls=1 137
0 48779336950
fn=(360) __libc_csu_init
0 15
cob=(2)
cfi=(18)
cfn=(362) 0x0000000000108a90
calls=1 0
0 6
0 8
cfn=(366) 0x0000000000000d10
calls=1 0
0 17
0 11
fn=(366)
0 17
fl=(111) /home/david/Lateral/src/core.c
fn=(620) la_list
245 4120
+1 1030
+1 2060
+1 1030
+1 8352
cfi=(110) /home/david/Lateral/src/object.c
cfn=(566) list_append
calls=1392 -41
* 12656427
* 1392
+1 2784
+1 2060
+2 3090
-5 3090
+5 1086
-5 4176
+7 1030
+1 2060
fn=(648) la_equal
154 15660
+1 9396
+1 12528
+2 9396
+4 18792
+4 3132
+1 37552
+1 9396
cfi=(110)
cfn=(456) obj_string
calls=3132 11
* 40716
* 12528
cfi=(110)
cfn=(456)
calls=3132 11
* 40716
* 9396
cob=(3)
cfi=(114) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/../strcmp.S
cfn=(470) __strcmp_ssse3
calls=3132 -24
* 83763
* 3132
* 15660
+10 10606
+1 12528
fn=(658) la_sum
40 5047
+1 721
+1 721
+1 4326
+1 5768
+1 5768
+4 4326
-7 6489
+9 2884
+1 4326
cfi=(110)
cfn=(428) obj_init
calls=721 -16
* 5930208
+1 3605
fn=(666) la_print
456 12
+1 15
cfi=(110)
cfn=(668) obj_print
calls=3 247
* 3835
+1 6
cob=(3)
cfi=(137) /build/glibc-OTsEL5/glibc-2.27/libio/putchar.c
cfn=(696) putchar
calls=3 25
* 609
* 3
+1 3
+1 6
fn=(710) la_char_int
411 1498
+1 642
+1 856
+3 1070
cfi=(110)
cfn=(456)
calls=214 11
* 2782
* 642
+1 1284
cfi=(110)
cfn=(428)
calls=214 36
* 1598290
+1 1070
fn=(718) la_write_bytes
473 7
+1 3
+1 4
+1 4
+3 3
cfi=(110)
cfn=(456)
calls=1 11
* 13
* 3
cob=(3)
cfi=(116) /build/glibc-OTsEL5/glibc-2.27/libio/iofopen.c
cfn=(484) fopen@@GLIBC_2.2.5
calls=1 88
* 392
* 1
* 1
+1 2
+1 1
+1 2005
+3 1604
+1 2807
cob=(3)
cfi=(140) /build/glibc-OTsEL5/glibc-2.27/libio/iofwrite.c
cfn=(722) fwrite
calls=401 31
* 112321
* 401
+1 1203
-6 1206
+8 2
+4 5
fn=(634) la_maphash
339 4
+1 3
+1 4
+1 3
+1 2
+1 320
+1 192
-2 164
+23 1
+1 2
fn=(662) la_divide
98 441
+1 189
+1 252
+1 504
+3 189
+1 189
+1 378
+1 378
cfi=(110)
cfn=(428)
calls=63 -71
* 566737
+1 315
fn=(664) la_modulo
110 441
+1 189
+1 252
+1 504
+3 189
+1 189
+1 441
+1 378
cfi=(110)
cfn=(428)
calls=63 -83
* 522704
+1 315
fn=(462) insert_function
495 264
+1 132
+1 198
cfi=(110)
cfn=(428)
calls=33 36
* 34305
* 33
+2 132
cfi=(110)
cfn=(440) obj_init_str
calls=33 71
* 38382
* 33
+1 198
cfi=(110)
cfn=(464) envir_set
calls=33 604
* 104553
+1 198
fn=(630) la_hashmap_init
302 4
+1 3
+1 4
+1 4
cfi=(110)
cfn=(632) obj_hashmap_init
calls=1 79
* 2421
* 1
+4 2
fn=(642) la_eq
134 1360
+1 1020
+1 1360
+1 2720
+2 2040
+1 330
+2 175
+2 680
fn=(646) la_type
181 15908
+1 11931
+1 15908
+1 45
cfi=(110)
cfn=(440)
calls=15 71
* 98957
* 15
+1 15848
+1 45
cfi=(110)
cfn=(440)
calls=15 71
* 120948
* 15
+1 15788
+1 9360
cfi=(110)
cfn=(440)
calls=3120 71
* 31604645
* 3120
+1 3308
+2 3308
+1 2196
cfi=(110)
cfn=(440)
calls=732 71
* 7745668
* 732
+1 380
+2 380
+1 285
cfi=(110)
cfn=(440)
calls=95 71
* 1070264
* 95
+12 7954
fn=(640) la_car
258 250072
+1 312590
+1 250072
+5 125036
fn=(644) la_diff
55 1414
+2 606
+1 808
+1 606
+5 1212
+4 606
+1 202
+1 606
+1 808
+1 808
+4 606
-7 1212
+9 808
+1 1212
cfi=(110)
cfn=(428)
calls=202 -43
* 1835061
+2 1010
fn=(654) la_hashmap_set
328 216
+1 162
+1 216
+3 216
+1 270
+1 378
cfi=(110)
cfn=(452) hashmap_set
calls=54 458
* 853790
+1 54
+1 108
fn=(638) la_cdr
267 250732
+1 313415
+1 250732
+5 125366
fn=(436) lang_init
503 6
+1 2
+1 6
cfi=(110)
cfn=(428)
calls=1 36
* 80
* 1
+1 5
cfi=(110)
cfn=(438) envir_set_str
calls=1 608
* 473
+1 5
cfi=(110)
cfn=(438)
calls=1 608
* 579
+2 3
cfn=(462)
calls=1 -14
* 939
+1 3
cfn=(462)
calls=1 -15
* 1006
+1 3
cfn=(462)
calls=1 -16
* 1165
+2 3
cfn=(462)
calls=1 -18
* 1210
+1 3
cfn=(462)
calls=1 -19
* 1345
+1 3
cfn=(462)
calls=1 -20
* 1480
+1 3
cfn=(462)
calls=1 -21
* 1615
+1 3
cfn=(462)
calls=1 -22
* 1772
+1 3
cfn=(462)
calls=1 -23
* 1885
+1 3
cfn=(462)
calls=1 -24
* 2020
+1 3
cfn=(462)
calls=1 -25
* 2205
+1 3
cfn=(462)
calls=1 -26
* 2428
+1 3
cfn=(462)
calls=1 -27
* 2495
+2 3
cfn=(462)
calls=1 -29
* 3634
+3 3
cfn=(462)
calls=1 -32
* 3848
+1 3
cfn=(462)
calls=1 -33
* 2990
+3 3
cfn=(462)
calls=1 -36
* 4218
+1 3
cfn=(462)
calls=1 -37
* 3289
+1 3
cfn=(462)
calls=1 -38
* 3416
+1 3
cfn=(462)
calls=1 -39
* 3571
+1 3
cfn=(462)
calls=1 -40
* 5081
+3 3
cfn=(462)
calls=1 -43
* 47890
+1 3
cfn=(462)
calls=1 -44
* 5292
+1 3
cfn=(462)
calls=1 -45
* 7386
+1 3
cfn=(462)
calls=1 -46
* 5537
+3 3
cfn=(462)
calls=1 -49
* 7595
+1 3
cfn=(462)
calls=1 -50
* 5844
+1 3
cfn=(462)
calls=1 -51
* 5994
+1 3
cfn=(462)
calls=1 -52
* 6114
+2 3
cfn=(462)
calls=1 -54
* 8444
+2 3
cfn=(462)
calls=1 -56
* 8686
+1 3
cfn=(462)
calls=1 -57
* 8828
+1 3
cfn=(462)
calls=1 -58
* 9206
+1 6
fn=(656) la_cons
276 247668
+1 123834
cfi=(110)
cfn=(460) cell_init
calls=61917 44
* 898246753
* 61917
+1 247668
+1 309585
+1 61917
+1 123834
fn=(660) la_lt
122 724
+1 543
+1 724
+1 1448
+2 1086
+1 360
+2 1
+2 362
fn=(708) la_char_at
386 3544
+1 2658
+1 3544
+1 3544
+4 3544
+5 3544
+3 2658
cfi=(110)
cfn=(456)
calls=886 11
* 10826
* 886
+1 1772
+1 66206
+1 60
-2 50684
+5 7704
cfi=(110)
cfn=(446) obj_init_str_len
calls=856 49
* 7138156
+2 1772
fn=(628) la_read_file
33 4
+1 3
+1 3
cfi=(110)
cfn=(456)
calls=1 -24
* 13
* 1
+1 3
cfi=(115) /home/david/Lateral/src/reader.c
cfn=(481) read_file'2
calls=1 243
* 24576414
+1 1
+1 2
fn=(636) la_reverse_mut
283 2775
+1 1850
+1 1850
+1 2775
+2 925
+1 185490
+1 185490
+1 123660
+1 123660
-4 188265
+6 925
+1 1850
fn=(652) la_hashmap_get
311 192
+1 144
+1 192
+1 288
cfi=(110)
cfn=(604) hashmap_get
calls=48 495
* 46070
* 48
+2 96
cfi=(110)
cfn=(460)
calls=48 44
* 386792
* 48
+1 96
cfi=(110)
cfn=(460)
calls=48 44
* 387512
* 144
+1 96
+1 27
+1 45
+2 117
+1 156
+2 39
+1 78
-1 9
+1 18
fl=(98) /home/david/Lateral/src/lateral.c
fn=(378) main
13 8
+1 2
cfi=(99) /home/david/Lateral/src/garbage.c
cfn=(380) garbage_init
calls=1 +12
* 99746
+3 2
+1 6
cfi=(110)
cfn=(428)
calls=1 +18
* 65
* 1
+1 3
+1 3
+2 2
cfi=(110)
cfn=(432) envir_init
calls=1 587
* 1866
* 1
+1 2
+1 2
cfi=(111)
cfn=(436)
calls=1 503
* 179690
+2 2
cfi=(115)
cfn=(480) read_file
calls=1 243
* 50154130
+1 2
+1 5
cfi=(115)
cfn=(480)
calls=1 243
* 48728898997
+1 2
+2 2
cob=(3)
cfi=(141) /build/glibc-OTsEL5/glibc-2.27/stdlib/exit.c
cfn=(728) exit
calls=1 139
* 2206
* 1
fl=(133) /home/david/Lateral/src/eval.c
fn=(598) is_macro
109 4862210
+1 3889768
+1 1049319
+1 1399092
+1 1748865
cfi=(110)
cfn=(600) envir_search
calls=349773 617
* 19635999437
* 349773
+1 1788638
+1 122
+3 972381
+1 1944884
fn=(614) envir_push2
69 366560
+1 219936
cfi=(110)
cfn=(616) list_length
calls=73312 191
* 3334055
* 73312
+1 219936
cfi=(110)
cfn=(616)
calls=73312 191
* 3334055
* 73312
+2 513184
+9 293248
cfi=(110)
cfn=(432)
calls=73312 587
* 57450375
* 73312
+1 146624
+1 1625000
cfi=(110)
cfn=(464)
calls=203125 604
* 2936195023
+1 609375
+1 609375
-3 1032436
+6 219936
+1 219936
+1 146624
+1 73312
+1 146624
fn=(596) macro_expand
121 4859160
+1 971832
+1 366
cfi=(110)
cfn=(600)
calls=61 617
* 19470
* 61
+1 183
+2 183
+1 305
cfn=(614)
calls=61 -58
* 1531830
* 61
+1 183
+1 305
cfn=(595) evaluate'2
calls=61 +46
* 7463289
* 61
+2 122
cfn=(622) envir_pop2
calls=61 -29
* 15677
-9 4859465
cfn=(598)
calls=971893 -13
* 19653871984
* 1943786
+11 971832
+1 1943664
fn=(597) macro_expand'2
121 2745
+1 3294
cfn=(598)
calls=549 -13
* 132505
* 1098
+11 549
+1 1098
fn=(618) eval_ast
136 2370
+1 1580
+1 840
cfi=(110)
cfn=(600)
calls=168 617
* 104290
* 168
+1 336
+4 336
+1 908
+1 225
+1 450
+1 225
+1 4404
cfn=(595)
calls=734 +27
* 48325040898
* 734
+1 2936
+4 3670
cfi=(110)
cfn=(566)
calls=734 +55
* 7317553
* 734
+1 1468
+1 450
+2 675
-10 675
+10 1527
-10 2202
+12 450
+1 8
+11 2
+2 1580
fn=(619) eval_ast'2
136 5366916
+1 3577944
+1 3092535
cfi=(110)
cfn=(600)
calls=618507 617
* 13819308906
* 618507
+1 1237014
+4 1237014
+1 1103916
+1 271987
+1 543974
+1 271987
+1 4448436
cfn=(595)
calls=741406 +27
* 281300768312
* 741406
+1 2965624
+4 3707030
cfi=(110)
cfn=(566)
calls=741406 +55
* 10521043692
* 741406
+1 1482812
+1 543974
+2 815961
-10 815961
+10 1408257
-10 2224218
+12 543974
+1 15968
+11 3992
+2 3577944
fn=(594) evaluate
175 552
+1 621
+4 345
cfn=(596)
calls=69 -59
* 7903047
* 69
+2 276
+1 345
cfi=(110)
cfn=(606) obj_eq_sym
calls=69 +55
* 6774
* 138
+1 248
+1 496
cfn=(595)
calls=62 -10
* 48331772242
* 62
+1 372
cfi=(110)
cfn=(464)
calls=62 604
* 2120711
+1 124
+1 35
cfi=(110)
cfn=(606)
calls=7 +50
* 427
* 14
+1 4
+1 5
+1 6
+1 4
+4 4
+1 6
cfi=(110)
cfn=(428)
calls=1 36
* 8716
* 1
+1 6
cfi=(110)
cfn=(464)
calls=1 604
* 8972
+1 2
+1 30
cfi=(110)
cfn=(606)
calls=6 +38
* 366
* 12
+8 30
cfi=(110)
cfn=(606)
calls=6 +30
* 366
* 12
+15 30
cfi=(110)
cfn=(606)
calls=6 +15
* 366
* 12
+13 30
cfi=(110)
cfn=(606)
calls=6 +2
* 366
* 12
+11 30
cfi=(110)
cfn=(606)
calls=6 -9
* 366
* 12
+6 30
cfi=(110)
cfn=(606)
calls=6 -15
* 366
* 12
+2 30
cfi=(110)
cfn=(606)
calls=6 -17
* 366
* 12
+7 30
cfi=(110)
cfn=(606)
calls=6 -24
* 480
* 12
+1 4
+1 5
+1 3
cfi=(110)
cfn=(616)
calls=1 -74
* 37
* 1
+2 4
+4 4
cfi=(110)
cfn=(432)
calls=1 587
* 636
* 1
+1 3
+1 3
+1 2
+1 1
+1 3
+1 4
+1 5
cfn=(595)
calls=1 175
* 2289
* 1
+1 6
cfi=(110)
cfn=(464)
calls=1 604
* 1835
+1 4
-5 6
+7 5
cfn=(595)
calls=1 175
* 9005
* 1
+1 3
+2 3
cfi=(110)
cfn=(624) envir_free
calls=1 599
* 241
+1 2
+3 25
cfn=(618)
calls=5 136
* 107080
* 5
+1 20
+4 15
+1 20
+1 30
cfi=(111)
cfn=(718)
calls=1 473
* 121988
cfi=(111)
cfn=(666)
calls=3 456
* 4489
cfi=(111)
cfn=(628)
calls=1 33
* 24576444
* 5
+40 345
fn=(595)
175 7778496
+1 5637463
+4 4861560
cfn=(596)
calls=971763 -59
* 19670550772
cfn=(597)
calls=549 -59
* 141289
* 972312
+2 3889248
+1 1748215
cfi=(110)
cfn=(606)
calls=349643 +55
* 27623120
* 699286
+1 252
+1 504
cfn=(595)
calls=63 -10
* 52047410
* 63
+1 378
cfi=(110)
cfn=(464)
calls=63 604
* 145111
+1 126
+1 1747900
cfi=(110)
cfn=(606)
calls=349580 +50
* 23078626
* 699160
+12 1747900
cfi=(110)
cfn=(606)
calls=349580 +38
* 23078626
* 699160
+1 248
+1 310
+3 310
+1 248
+1 372
cfi=(110)
cfn=(428)
calls=62 36
* 501102
* 62
+1 1747590
cfi=(110)
cfn=(606)
calls=349518 +30
* 22670018
* 699036
+1 509145
cfn=(595)
calls=72735 -34
* 1149460181
* 72735
+1 290940
+1 625720
+1 22630
+1 22630
+2 12
+3 31640
cfn=(595)
calls=4520 -43
* 46968987554
* 4520
+3 409254
cfn=(595)
calls=68209 -46
* 15691297859048
* 68209
+2 1383915
cfi=(110)
cfn=(606)
calls=276783 +15
* 18210590
* 553566
+1 3420
+1 1140
+1 32562
+3 32562
cfn=(595)
calls=5427 -54
* 908537898
* 5427
+1 16281
+1 7980
cfn=(595)
calls=1140 -56
* 587071869
* 1140
+2 17148
-8 16281
+11 1378215
cfi=(110)
cfn=(606)
calls=275643 +2
* 18537659
* 551286
+1 6267
+1 20890
cfn=(595)
calls=2089 -63
* 256326440
* 8356
+4 6267
+3 4178
+2 1367770
cfi=(110)
cfn=(606)
calls=273554 -9
* 18383086
* 547108
+1 3231
+1 1077
+1 6360
-1 22437
cfn=(595)
calls=2141 -74
* 221654121
* 8564
+3 3231
+1 1362385
cfi=(110)
cfn=(606)
calls=272477 -15
* 18317389
* 544954
+1 508
+1 1361750
cfi=(110)
cfn=(606)
calls=272350 -17
* 17917517
* 544700
+1 165
+1 55
+1 696
cfn=(595)
calls=116 -83
* 118805923
+1 348
-2 855
+4 330
cfn=(595)
calls=55 -86
* 3340098403
* 55
+1 1361475
cfi=(110)
cfn=(606)
calls=272295 -24
* 23029143
* 544590
+1 352
+1 440
+1 264
cfi=(110)
cfn=(616)
calls=88 -74
* 5808
* 88
+2 352
+4 352
cfi=(110)
cfn=(432)
calls=88 587
* 51711
* 88
+1 264
+1 264
+1 176
+1 88
+1 612
+1 816
+1 1020
cfn=(595)
calls=204 175
* 155649988
* 204
+1 1224
cfi=(110)
cfn=(464)
calls=204 604
* 1727876
+1 816
-5 876
+7 440
cfn=(595)
calls=88 175
* 273117894
* 88
+1 264
+2 264
cfi=(110)
cfn=(624)
calls=88 599
* 24234
+1 176
+3 1361035
cfn=(619)
calls=271987 136
* 291848234777
cfn=(618)
calls=220 136
* 48332276246
* 272207
+1 1088828
+4 816621
+1 1088828
+1 1193736
cfi=(111)
cfn=(710)
calls=214 411
* 1608134
cfi=(111)
cfn=(708)
calls=886 +90
* 7301102
cfi=(111)
cfn=(664)
calls=63 110
* 525602
cfi=(111)
cfn=(662)
calls=63 98
* 569572
cfi=(111)
cfn=(660)
calls=181 122
* 5248
cfi=(111)
cfn=(658)
calls=721 40
* 5974189
cfi=(111)
cfn=(656)
calls=61917 -20
* 899423176
cfi=(111)
cfn=(654)
calls=54 +32
* 855410
cfi=(111)
cfn=(652)
calls=48 +15
* 822207
cfi=(111)
cfn=(648)
calls=3132 154
* 344897
cfi=(111)
cfn=(646)
calls=3977 181
* 40747103
cfi=(111)
cfn=(644)
calls=202 55
* 1847585
cfi=(111)
cfn=(642)
calls=340 134
* 9685
cfi=(111)
cfn=(640)
calls=62518 -38
* 937770
cfi=(111)
cfn=(638)
calls=62683 -29
* 940245
cfi=(111)
cfn=(636)
calls=925 -13
* 819515
cfi=(111)
cfn=(634)
calls=1 +43
* 695
cfi=(111)
cfn=(630)
calls=1 +6
* 2439
cfi=(111)
cfn=(620)
calls=1030 -51
* 12693787
* 198956
+1 293004
+1 219753
+1 219753
+1 366255
cfn=(614)
calls=73251 69
* 3005443720
* 73251
+1 146502
+11 439506
cfn=(595)
calls=73251 175
* 15750089474752
* 73251
+2 146502
cfn=(622)
calls=73251 102
* 23839478
+1 146502
+19 3113345
cfn=(618)
calls=170 136
* 108368
cfn=(619)
calls=622499 136
* 13834244890
+2 4861560
fn=(622)
102 219936
+1 219936
+1 146624
+1 219936
cfi=(110)
cfn=(624)
calls=73312 599
* 22682163
+1 146624
+1 219936
fl=(110)
fn=(446)
49 88785
+1 19730
+3 68859
cob=(3)
cfi=(113) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcpy-ssse3.S
cfn=(450) __strncpy_ssse3
calls=9837 -21
* 295375
* 9837
+1 29511
+1 59022
cfn=(428)
calls=9837 -19
* 85507380
* 9837
+1 59022
+1 19674
+2 140
cob=(3)
cfi=(100) /build/glibc-OTsEL5/glibc-2.27/malloc/malloc.c
cfn=(386) malloc
calls=28 3028
* 4197
* 28
* 28
+1 56
+4 196
cob=(3)
cfi=(113)
cfn=(450)
calls=28 -32
* 2624
* 28
+1 140
+1 112
+1 168
cfn=(428)
calls=28 -31
* 250805
+2 49325
fn=(452)
458 1221288
+1 2035480
+1 12
cfn=(472) hashmap_resize
calls=4 -27
* 1882196
+3 610644
cfn=(454) obj_hash
calls=203548 131
* 16000602
* 1628384
+1 2442576
+1 402502
cfn=(460)
calls=201251 44
* 2859650167
* 201251
+1 603753
+1 603753
+2 2012510
+1 1207506
+2 20673
+1 2297
+1 16555
cfn=(466) obj_equals
calls=2365 153
* 240259
* 4730
+2 328
+1 82
+1 11415
+2 4430
cfn=(460)
calls=2215 44
* 23278626
* 2215
+1 6645
+1 6645
+2 4430
cfn=(460)
calls=2215 44
* 23382901
* 2215
+1 6645
+1 6645
+1 11075
+1 2215
+2 204
-17 7095
+20 407096
fn=(453) hashmap_set'2
458 1074
+1 1790
+4 537
cfn=(454)
calls=179 131
* 40139
* 1432
+1 2148
+1 294
cfn=(460)
calls=147 44
* 1196558
* 147
+1 441
+1 441
+2 1470
+1 882
+2 288
+1 32
+1 287
cfn=(466)
calls=41 153
* 4897
* 82
+4 205
+2 64
cfn=(460)
calls=32 44
* 296065
* 32
+1 96
+1 96
+2 64
cfn=(460)
calls=32 44
* 296545
* 32
+1 96
+1 96
+1 160
+1 32
+2 27
-17 123
+20 358
fn=(472)
433 16
+1 20
cfn=(434) hashmap_init
calls=4 -30
* 22756
* 4
+1 8
+1 2560
+1 256
+1 930
+1 930
+1 930
+1 930
+1 1074
cfn=(453)
calls=179 +16
* 1847030
+2 930
-7 1698
-2 1296
+12 16
+3 12
+1 16
+1 12
+3 12
cfn=(474) hashmap_free
calls=4 -27
* 748
+1 12
fn=(612) obj_release
86 4095000
+1 13241846
+1 8122984
+1 56
cob=(3)
cfi=(100)
cfn=(478) free
calls=14 3086
* 1167
* 14
+4 14
-3 4094944
+3 3071250
fn=(434)
404 293628
+1 146814
+1 73320
+1 146640
cob=(3)
cfi=(100)
cfn=(386)
calls=73320 3028
* 12336386
* 73320
* 174
cob=(3)
cfi=(100)
cfn=(386)
calls=87 3028
* 4897
* 87
* 73407
+1 146814
+4 220221
+1 146814
+2 587256
cob=(3)
cfi=(100)
cfn=(386)
calls=73407 3028
* 8650671
* 73407
* 220221
+1 293628
+4 146814
+1 5879360
+1 6467296
+1 6467296
-3 2571965
+5 73407
+1 146814
fn=(466)
153 262562874
+1 131281437
+1 114
+2 262562532
+1 2
+3 175041684
+1 81
+1 135
+1 135
-2 315
cfn=(467) obj_equals'2
calls=45 -9
* 3399
* 567
cfn=(467)
calls=81 -9
* 8596
* 558
+4 279
+1 138
+2 24
+4 525124080
+6 131281020
cfn=(456)
calls=43760340 11
* 568884309
* 175041360
cfn=(456)
calls=43760340 11
* 568884409
* 131281020
cob=(3)
cfi=(114)
cfn=(470)
calls=43760340 -35
* 1058864488
* 43760340
* 175041360
+10 175041916
fn=(467)
153 756
+1 378
+1 28
+2 672
+4 448
+12 1344
+6 336
cfn=(456)
calls=112 11
* 1444
* 448
cfn=(456)
calls=112 11
* 1439
* 336
cob=(3)
cfi=(114)
cfn=(470)
calls=112 -35
* 3302
* 112
* 448
+10 504
fn=(474)
428 293620
+1 293620
cob=(3)
cfi=(100)
cfn=(478)
calls=73405 3086
* 7994584
* 73405
+1 220215
cob=(3)
cfi=(100)
cfn=(478)
calls=73405 3086
* 6209894
* 73405
+1 220215
fn=(616)
191 440139
+1 586852
+4 146713
+1 146713
+1 1626640
+3 406660
+1 1219980
-5 1660119
+8 146713
+1 293426
fn=(458) str_hash
121 472161201
+1 157387067
+1 157387067
+1 157387067
+1 6272861310
+1 627286131
-2 5492712386
+4 157387067
+1 314774134
fn=(632)
79 7
+1 3
cfn=(434)
calls=1 404
* 1275
* 1
+1 4
+1 6
cfn=(428)
calls=1 -46
* 1120
+1 5
fn=(432)
587 293608
+1 146804
cob=(3)
cfi=(100)
cfn=(386)
calls=73402 3028
* 10599716
* 73402
* 73402
+1 146804
+4 220206
cfn=(434)
calls=73402 404
* 45216626
* 220206
+1 146804
+1 146804
+1 73402
+1 146804
fn=(456)
11 743898786
+1 1239831310
+1 743895810
+2 1984
+2 495932524
fn=(602) envir_get
613 785915460
+1 943098552
cfn=(604)
calls=157183092 495
* 29364332675
+1 314366184
fn=(604)
495 785915700
+1 471549420
cfn=(454)
calls=157183140 131
* 18829700718
* 1257465120
+1 1414648260
+1 785915700
+1 250442078
+3 131274210
+2 262548420
cfn=(466)
calls=43758070 153
* 4384421971
* 87516140
+1 2673144
+1 1782096
+2 128601066
-7 224487369
+10 31071053
+3 314366280
fn=(606)
238 15207735
+1 12166188
+4 9124641
cfn=(456)
calls=3041547 11
* 39540111
* 3041547
+1 15207735
cob=(3)
cfi=(114)
cfn=(470)
calls=3041547 144
* 98318778
* 3041547
* 9124641
+1 6083094
fn=(624)
599 293604
+1 293604
cfn=(474)
calls=73401 428
* 15378210
+1 220203
cob=(3)
cfi=(100)
cfn=(478)
calls=73401 3086
* 6227413
* 73401
+1 220203
fn=(428)
36 9258147
+1 2057366
cfi=(99)
cfn=(430) garbage_alloc
calls=1028683 -7
* 14424220342
* 1028683
+1 3086049
+1 5143415
+1 2057366
+1 1028683
+1 2057366
fn=(454)
131 629547480
+1 472160610
+2 629548512
+1 500
+1 472160235
cfn=(456)
calls=157386745 11
* 2046027681
* 314773490
cfn=(458)
calls=157386745 -15
* 13809274828
* 157386745
+1 500
+1 125
+1 125
+1 1108
cfn=(455) obj_hash'2
calls=277 -9
* 82930
* 1385
+1 831
-2 1206
+4 250
+8 314773740
fn=(455)
131 1408
+1 1056
+2 3556
+1 120
+1 966
cfn=(456)
calls=322 11
* 4097
* 644
cfn=(458)
calls=322 -15
* 68602
* 322
+1 120
+1 30
+1 30
+1 300
cfn=(455)
calls=75 -9
* 21725
* 375
+1 225
-2 315
+4 60
+8 704
fn=(460)
44 6103884
+1 4069256
+1 6103884
cfn=(428)
calls=1017314 -10
* 14352002621
+1 5086570
fn=(438)
608 12
+1 8
cfn=(440)
calls=2 71
* 418
* 2
+1 14
cfn=(452)
calls=2 458
* 592
+1 6
fn=(440)
71 27860
+1 16716
cob=(3)
cfi=(112) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strlen-avx2.S
cfn=(444) __strlen_avx2
calls=5572 -20
* 112040
* 5572
* 33432
cfn=(446)
calls=5572 -23
* 53439881
+1 11144
fn=(464)
604 1220952
+1 1424444
cfn=(452)
calls=203492 458
* 2937073663
+1 610476
fn=(610) obj_mark
95 104960
+1 131200
+3 34620
+1 23080
+1 23080
cfn=(611) obj_mark'2
calls=5770 -6
* 1458057
+1 23080
cfn=(611)
calls=5770 -7
* 10476497
* 5770
-5 20470
+22 52480
fn=(611)
95 1586656
+1 1983320
+3 2200392
+1 1466928
+1 754368
cfn=(611)
calls=188592 -6
* 15763081
+1 754368
cfn=(611)
calls=188592 -7
* 4617015082
* 188592
+1 1413532
+1 11912
cfn=(611)
calls=2978 -9
* 379464
+1 11912
cfn=(611)
calls=2978 -10
* 3785139
* 2978
+1 700648
+1 60
+1 40
+1 9280
+1 928
+1 2976
+1 2976
+1 2976
cfn=(611)
calls=992 -18
* 30237
+1 2976
cfn=(611)
calls=992 -19
* 22068
+1 2976
-5 5760
-2 4740
-11 29932
+22 793328
fn=(600)
617 4842545
+2 968509
+1 468876249
+1 312584166
+1 155000
-3 785915460
cfn=(602)
calls=157183092 -6
* 31407712871
* 471549276
+6 891009
+1 1937018
fn=(668)
247 15
+1 9
+3 9
+5 36
+2 6
+3 9
cfn=(456)
calls=3 11
* 39
* 12
cob=(3)
cfi=(134) /build/glibc-OTsEL5/glibc-2.27/stdio-common/printf.c
cfn=(672) printf
calls=3 28
* 3688
* 3
+2 3
+51 6
fn=(566)
208 3747045
+1 1498818
+1 548128
cfn=(460)
calls=274064 44
* 3861935298
* 274064
+1 822192
+1 822192
+1 548128
+3 1901380
+5 1426035
+5 2376725
+6 950690
cfn=(460)
calls=475345 44
* 6704308998
* 475345
+1 1426035
+1 1426035
+1 475345
+1 1498818
fn=(626) hashmap_rem
516 15
+1 9
cfn=(454)
calls=3 131
* 822
* 24
+1 27
+1 15
+3 6
+1 3
+1 9
+2 18
cfn=(466)
calls=3 153
* 45
* 6
+1 9
+1 15
+1 18
+4 6
-10 9
+18 6
fl=(115)
fn=(564) read_token
18 16950
+1 10170
+3 3390
+1 78232
+2 6138
-1 63432
-1 1810
+4 13752
+1 51
+1 1601
-1 13216
-6 21007
+10 3387
+4 6774
+1 13548
-1 6
+1 24312
+1 3276
+1 7008
+2 50
+1 50
+1 398
+1 1592
-2 1792
+7 100
+3 7794
-1 336388
+5 10170
+1 16935
+1 16935
cfi=(110)
cfn=(446)
calls=3387 -9
* 25331333
* 10161
+1 10161
+1 6774
+3 3
+2 6780
fn=(590) read_list
150 624
+1 156
+1 234
+2 78
+1 78
+1 1460
cfn=(589) read_form'2
calls=292 -24
* 33197196
+1 1460
cfi=(110)
cfn=(566)
calls=292 +51
* 2495934
* 292
+1 1168
+1 234
-4 3700
cfi=(110)
cfn=(456)
calls=370 11
* 4809
* 1110
cob=(3)
cfi=(114)
cfn=(470)
calls=370 -11
* 10002
* 370
* 740
+8 390
+5 312
+5 390
+1 78
+1 390
fn=(591) read_list'2
150 5928
+1 1482
+1 2223
+2 741
+1 741
+1 10990
cfn=(589)
calls=2198 -24
* 102848105
+1 10990
cfi=(110)
cfn=(566)
calls=2198 +51
* 17860608
* 2198
+1 8792
+1 2223
-4 29390
cfi=(110)
cfn=(456)
calls=2939 11
* 38194
* 8817
cob=(3)
cfi=(114)
cfn=(470)
calls=2939 -11
* 78566
* 2939
* 5878
+8 3705
+5 2964
+5 3705
+1 741
+1 3705
fn=(480)
243 14
+2 8
cob=(3)
cfi=(116)
cfn=(484)
calls=2 88
* 935
* 2
* 2
+1 2
+2 4
+1 10
cob=(3)
cfi=(121) /build/glibc-OTsEL5/glibc-2.27/libio/fseek.c
cfn=(504) fseek
calls=2 32
* 1283
* 2
+1 6
cob=(3)
cfi=(128) /build/glibc-OTsEL5/glibc-2.27/libio/ioftell.c
cfn=(538) ftell
calls=2 34
* 212
* 2
* 2
+1 10
cob=(3)
cfi=(121)
cfn=(504)
calls=2 32
* 424
* 2
+1 10
cob=(3)
cfi=(100)
cfn=(386)
calls=2 3028
* 454
* 2
* 2
+1 4
+4 14
cob=(3)
cfi=(129) /build/glibc-OTsEL5/glibc-2.27/libio/iofread.c
cfn=(544) fread
calls=2 31
* 797
* 2
+1 10
+6 2
+1 4
+1 2
+1 4
+1 2
+1 13375
cfi=(110)
cfn=(566)
calls=2675 -61
* 19433822
* 2675
+1 5350
+1 4
-3 10
cfn=(564)
calls=2 18
* 5322
* 13375
cfn=(564)
calls=2675 18
* 20183182
* 5354
+6 6
cob=(3)
cfi=(131) /build/glibc-OTsEL5/glibc-2.27/libio/iofclose.c
cfn=(570) fclose@@GLIBC_2.2.5
calls=2 34
* 1016
* 2
+1 6
cob=(3)
cfi=(100)
cfn=(478)
calls=2 3086
* 260
* 2
+11 8
cfi=(110)
cfn=(440)
calls=2 71
* 13412
* 2
+1 12
cfi=(110)
cfn=(464)
calls=2 604
* 13940
+2 2
+1 4
+1 2
+1 345
cfn=(588) read_form
calls=69 132
* 28813146
+1 345
cfi=(133)
cfn=(594)
calls=69 175
* 48366652585
+1 138
cfi=(99)
cfn=(608) garbage_run
calls=69 52
* 292827271
-3 284
+5 12
cfi=(110)
cfn=(626)
calls=2 516
* 696
* 4
+3 4
cfi=(99)
cfn=(608)
calls=2 52
* 51062915
+1 10
fn=(481)
243 7
+2 4
cob=(3)
cfi=(116)
cfn=(484)
calls=1 88
* 382
* 1
* 1
+1 1
+2 2
+1 5
cob=(3)
cfi=(121)
cfn=(504)
calls=1 32
* 603
* 1
+1 3
cob=(3)
cfi=(128)
cfn=(538)
calls=1 34
* 106
* 1
* 1
+1 5
cob=(3)
cfi=(121)
cfn=(504)
calls=1 32
* 212
* 1
+1 5
cob=(3)
cfi=(100)
cfn=(386)
calls=1 3028
* 368
* 1
* 1
+1 2
+4 7
cob=(3)
cfi=(129)
cfn=(544)
calls=1 31
* 349
* 1
+1 5
+6 1
+1 2
+1 1
+1 2
+1 1
+1 3560
cfi=(110)
cfn=(566)
calls=712 -61
* 5653235
* 712
+1 1424
+1 2
-3 5
cfn=(564)
calls=1 18
* 5499
* 3560
cfn=(564)
calls=712 18
* 5851473
* 1426
+6 3
cob=(3)
cfi=(131)
cfn=(570)
calls=1 34
* 508
* 1
+1 3
cob=(3)
cfi=(100)
cfn=(478)
calls=1 3086
* 145
* 1
+11 4
cfi=(110)
cfn=(440)
calls=1 71
* 11236
* 1
+1 6
cfi=(110)
cfn=(464)
calls=1 604
* 11514
+2 1
+1 2
+1 1
+1 45
cfn=(588)
calls=9 132
* 6914377
+1 45
cfi=(133)
cfn=(595)
calls=9 175
* 1359564
+1 18
cfi=(99)
cfn=(608)
calls=9 52
* 4201957
-3 40
+5 6
cfi=(110)
cfn=(626)
calls=1 516
* 366
* 2
+3 2
cfi=(99)
cfn=(608)
calls=1 52
* 553583
+1 5
fn=(588)
132 390
+1 858
+2 390
cfi=(110)
cfn=(456)
calls=78 11
* 1014
* 234
cob=(3)
cfi=(114)
cfn=(470)
calls=78 +9
* 2184
* 78
* 156
+2 390
+1 390
cfn=(590)
calls=78 +12
* 35721205
* 78
+10 156
fn=(589)
132 12450
+1 27390
+2 12450
cfi=(110)
cfn=(456)
calls=2490 11
* 32356
* 7470
cob=(3)
cfi=(114)
cfn=(470)
calls=2490 +9
* 76270
* 2490
* 4980
+2 3705
+1 3705
cfn=(591)
calls=741 +12
* 120933625
* 741
+1 8745
cfi=(110)
cfn=(456)
calls=1749 11
* 22723
* 5247
cob=(3)
cfi=(114)
cfn=(470)
calls=1749 +5
* 53702
* 1749
* 3498
+5 8745
cfn=(592) read_atom
calls=1749 -77
* 14802539
* 5247
+1 8745
+1 1749
+2 4980
fn=(592)
67 12243
+1 6996
+6 5247
cfi=(110)
cfn=(456)
calls=1749 -63
* 22723
* 1749
+1 7331
+2 52
+1 52
+1 52
+1 110
+1 1540
+1 684
+1 476
+1 306
+7 110
-12 1134
+14 208
+1 312
cfi=(110)
cfn=(428)
calls=52 -58
* 450428
* 52
+1 13324
+2 90
+1 90
+1 90
+1 360
+4 1344
+4 576
+1 768
+1 96
-7 1302
+9 180
+3 360
+1 540
cfi=(110)
cfn=(428)
calls=90 -80
* 727795
* 90
+1 6428
+2 150
cob=(3)
cfi=(112)
cfn=(444)
calls=50 -67
* 854
* 50
* 350
cfi=(110)
cfn=(446)
calls=50 -70
* 565509
* 50
+1 6228
+2 6228
+1 485
cfi=(110)
cfn=(440)
calls=97 -52
* 767894
* 97
+2 5840
cfi=(110)
cfn=(440)
calls=1460 -54
* 12174821
+2 8745
fl=(99)
fn=(382) bank_init
9 2952
+1 1968
cob=(3)
cfi=(100)
cfn=(386)
calls=984 3028
* 8307479
* 984
* 984
+1 1968
+5 1968
+1 1968
+1 10076160
+1 22167552
-2 3024816
+5 1968
+1 984
+1 1968
fn=(380)
26 2
+1 2
cfn=(382)
calls=1 -18
* 99738
* 1
+1 3
fn=(608)
52 243
+2 243
+1 162
+1 157440
cfi=(110)
cfn=(610)
calls=13120 +39
* 10490209
+1 157440
cfi=(110)
cfn=(610)
calls=13120 +38
* 1863085
-2 65924
+6 162
+1 81
+1 10702
+1 132465548
+1 11261250
cfi=(110)
cfn=(612)
calls=1023750 +21
* 32627275
+1 10237500
+1 10237500
+1 2047500
+2 22522500
-7 3071250
+7 98024828
-7 13377724
+9 16053
-10 10864
+12 243
fn=(430)
30 3086049
+1 2057366
+1 1028683
+1 1983182680
+1 2059596
+1 6338421480
+1 10286830
-2 1583578917
+5 2230
+3 1979067948
+1 1966
cfn=(382)
calls=983 -34
* 43493981
* 2949
+2 2949
-13 1966
+13 1484298012
-13 991589374
+18 2057366
ob=(1) /lib/x86_64-linux-gnu/ld-2.27.so
fl=(1) ???
fn=(0) 0x0000000000001090
0 2
cfi=(2) /build/glibc-OTsEL5/glibc-2.27/elf/rtld.c
cfn=(2) _dl_start
calls=1 444
0 447973
0 14
cfi=(80) /build/glibc-OTsEL5/glibc-2.27/elf/dl-init.c
cfn=(296) _dl_init
calls=1 79
0 2339
0 3
cob=(7)
cfi=(92)
cfn=(352)
calls=1 0
0 48779336961
fl=(19) /build/glibc-OTsEL5/glibc-2.27/elf/dl-minimal.c
fn=(80) strsep
265 4
+2 2
+1 4
+4 33
+7 84
-2 56
+13 1
+4 2
-7 14
-15 44
fn=(90) free
111 4
fn=(42) calloc
92 12
+8 12
-1 24
-3 12
+4 24
+3 12
cfn=(46) malloc
calls=12 -53
* 282
* 12
fn=(46)
50 127
+11 62
+3 31
-3 31
+3 62
-3 2
+3 1
-3 1
+3 122
-15 6
+20 8
+1 4
+2 2
+1 16
cfi=(42) /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/mmap64.c
cfn=(132) mmap
calls=2 -29
* 70
+2 4
+2 6
+2 2
+3 2
-3 4
+4 2
+2 10
-2 30
-1 30
+3 60
-29 1
-1 1
+1 1
+1 2
-2 4
fl=(36) /build/glibc-OTsEL5/glibc-2.27/elf/dl-misc.c
fn=(116) _dl_name_match_p
282 1590
+1 636
cfi=(21) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/strcmp.S
cfn=(56) strcmp
calls=318 144
* 13910
* 318
+1 318
-1 318
+3 318
+2 636
+6 310
+1 1550
-3 318
-4 636
+1 978
cfi=(21)
cfn=(56)
calls=326 144
* 15531
* 652
+6 8
-11 8
+11 32
fn=(156) _dl_sysdep_read_whole_file
44 2
+3 1
-3 3
+3 1
-3 3
+3 1
cfi=(37) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/lxstat.c
cfn=(120) open
calls=1 -8
* 16
+1 2
+2 5
cfi=(41) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/fxstat.c
cfn=(130) _fxstat
calls=1 -16
* 10
* 2
+2 1
+3 1
-3 1
+3 1
+13 2
cfi=(46) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/close.c
cfn=(142) close
calls=1 -41
* 5
+3 7
-14 6
cfi=(42)
cfn=(132)
calls=1 -13
* 35
* 2
fl=(23) /build/glibc-OTsEL5/glibc-2.27/posix/../sysdeps/unix/syscall-template.S
fn=(64) uname
78 4
+1 1
fl=(34) /build/glibc-OTsEL5/glibc-2.27/elf/dl-error-skeleton.c
fn=(108) _dl_catch_exception
175 14
+15 7
-3 14
+4 7
-3 7
-13 7
+19 7
-3 7
+3 7
-19 7
+13 7
+2 7
+4 7
cfi=(35) /build/glibc-OTsEL5/glibc-2.27/setjmp/../sysdeps/x86_64/setjmp.S
cfn=(110) __sigsetjmp
calls=7 26
* 140
* 21
+2 21
cfi=(48) /build/glibc-OTsEL5/glibc-2.27/elf/dl-deps.c
cfn=(148) openaux
calls=6 60
* 16540
cfi=(2)
cfn=(112) map_doit
calls=1 588
* 2127
+2 7
-1 7
+1 14
-1 7
+1 7
+9 28
fn=(104) _dl_catch_error
213 6
+2 2
-2 1
+2 2
cfn=(108)
calls=1 -40
* 2178
* 1
+1 2
+1 1
+1 1
-1 1
+1 1
+2 5
fn=(166) _dl_receive_error
226 3
+1 1
+1 1
+3 1
+1 1
+2 2
cfi=(2)
cfn=(168) version_check_doit
calls=1 621
* 8287
+2 1
+1 1
+1 4
fl=(44) /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/syscall-template.S
fn=(136) mprotect
78 40
+1 10
fn=(292) munmap
78 4
+1 1
fl=(9) /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.c
fn=(16) __GI___tunables_init
289 8
-9 3
150 4
-82 185
+6 60
-3 60
+3 5340
+4 120
+5 60
297 60
83 60
297 60
fi=(10) /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.h
121 120
-1 60
+1 24
-1 8
+1 32
-1 40
fe=(9)
330 240
-12 6600
fi=(10)
120 2160
+1 2283
-1 162
fe=(9)
312 5340
68 120
364 8
fn=(26) __tunable_get_val
373 114
+4 19
-4 74
+9 3
+1 3
-6 16
+22 95
+2 19
fl=(48)
fn=(146) _dl_map_object_deps
159 1
-1 1
+1 1
-1 5
+1 1
-1 2
+1 1
-1 2
+1 1
-1 1
+1 1
-8 1
+8 2
-8 1
-6 1
+14 1
-8 1
+24 1
-32 1
+1 1
+1 1
+6 1
+24 2
-28 2
-2 1
+31 1
-33 3
+2 2
-1 1
+1 2
+6 3
+24 1
-24 1
+24 7
+4 1
+19 1
+2 2
-14 1
-1 1
+13 5
+11 1
+4 4
-4 5
+4 20
+12 18
+2 4
+8 4
-8 4
+6 4
-6 4
+6 4
+1 4
+4 4
-3 4
-3 4
+2 4
+4 16
+66 4
-98 4
+98 4
-66 8
+7 30
cfi=(29) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/../strchr.S
cfn=(84) index
calls=6 24
* 186
* 12
+4 18
-2 6
+2 6
cfi=(34)
cfn=(108)
calls=6 -74
* 16846
* 6
+1 12
+9 6
+2 12
+5 4
+6 4
+2 4
-8 8
+3 4
+1 4
+1 4
+1 4
+4 20
+4 12
+1 12
-43 420
+1 210
+44 297
434 8
+2 12
+3 8
-1 4
cfi=(19)
cfn=(46)
calls=4 50
* 72
* 4
+2 4
-2 4
+2 4
+3 4
+1 16
-1 4
+1 4
cfi=(20) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
cfn=(48) memcpy
calls=4 129
* 40
+1 20
cfi=(20)
cfn=(48)
calls=4 129
* 40
+4 4
-1 4
+5 44
+7 6
+4 4
+11 3
-1 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+3 1
-3 1
+3 4
+5 1
+1 1
-1 1
+3 2
-3 4
+9 2
+4 3
-10 3
-3 5
+9 10
+4 15
-10 15
+13 2
+51 2
+2 1
-1 1
+1 2
+35 7
cfi=(20)
cfn=(48)
calls=1 129
* 18
+4 5
cfi=(52) /build/glibc-OTsEL5/glibc-2.27/elf/dl-sort-maps.c
cfn=(164) _dl_sort_maps
calls=1 28
* 600
+3 1
+3 1
-1 1
+2 4
+7 3
+3 2
+3 8
225 8
-19 2
434 5
+27 2
214 39
+2 4
+2 16
+2 39
456 15
-1 6
+1 14
199 3
573 10
fn=(148)
60 12
+7 6
-4 18
+1 6
-1 6
+1 6
-1 30
cfi=(24) /build/glibc-OTsEL5/glibc-2.27/elf/dl-load.c
cfn=(114) _dl_map_object
calls=6 2080
* 16438
* 6
+5 12
fl=(80)
fn=(296)
79 11
+5 1
-4 1
+1 1
+3 2
+8 2
+25 2
+1 12
+1 18
-89 18
+9 5
-3 10
+3 15
+5 12
+5 6
+9 18
cob=(2)
cfi=(18)
cfn=(340) 0x0000000004c3f1e8
calls=1 -58
* 6
cob=(2)
cfi=(18)
cfn=(330) 0x0000000005272630
calls=1 -58
* 6
cob=(3)
cfi=(82) /build/glibc-OTsEL5/glibc-2.27/csu/../csu/init-first.c
cfn=(308) _init
calls=1 -6
* 225
* 3
+4 6
+6 6
+2 6
-2 3
+3 3
-1 3
+1 15
+1 12
cob=(6) /lib/x86_64-linux-gnu/libreadline.so.7.0
cfi=(91) ???
cfn=(344) 0x0000000000013990
calls=1 -72
* 17
cob=(5) /lib/x86_64-linux-gnu/libtinfo.so.5.9
cfi=(90) ???
cfn=(334) 0x000000000000caf0
calls=1 -72
* 17
cob=(3)
cfi=(88) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86/cacheinfo.c
cfn=(322) init_cacheinfo
calls=1 488
* 1773
* 3
-1 6
+47 9
+7 8
-80 3
-5 3
-10 3
+57 2
-48 1
-3 2
+3 3
+5 3
+5 2
+9 7
cob=(2)
cfi=(18)
cfn=(298) 0x0000000004a2a520
calls=1 -58
* 6
* 1
+3 1
+1 2
+6 1
+2 2
-2 2
+3 8
+1 4
cob=(4)
cfi=(81)
cfn=(302)
calls=1 -72
* 17
-1 5
fl=(41)
fn=(130)
34 5
-1 5
+1 5
+1 30
+4 5
fl=(12) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/x86_64/brk.c
fn=(22) brk
31 7
+8 1
-6 2
+7 1
fl=(13) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/../strlen.S
fn=(28) strlen
79 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+2 24
+2 24
+31 24
+1 24
+1 24
+1 24
+1 24
+1 10
+2 10
+4 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+5 112
fl=(2)
fn=(174) init_tls
687 1
-6 1
+2 2
+4 1
+10 4
cfi=(19)
cfn=(42)
calls=1 92
* 27
* 1
+11 1
-15 1
+3 1
+6 1
+2 1
-11 1
+15 1
+2 1
-1 1
+1 21
+2 12
+4 1
+2 1
-2 1
-5 12
+9 2
+3 1
cfi=(32) /build/glibc-OTsEL5/glibc-2.27/elf/../elf/dl-tls.c
cfn=(176) _dl_determine_tlsoffset
calls=1 141
* 66
+7 1
cfi=(32)
cfn=(178) _dl_allocate_tls_storage
calls=1 332
* 437
+1 1
-1 1
+1 1
+6 1
+3 1
-3 1
+3 6
+3 1
+2 1
+1 3
fn=(52) rtld_lock_default_lock_recursive
784 7
+1 7
fn=(168)
621 2
+2 4
cfi=(53) /build/glibc-OTsEL5/glibc-2.27/elf/dl-version.c
cfn=(170) _dl_check_all_versions
calls=1 362
* 8277
* 2
+4 2
fn=(54) rtld_lock_default_unlock_recursive
790 7
+1 7
fn=(2)
444 9
+19 4
fi=(3) /build/glibc-OTsEL5/glibc-2.27/elf/get-dynamic-info.h
48 1
fe=(2)
463 1
fi=(5) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86_64/dl-machine.h
59 3
fi=(3)
-11 1
fe=(2)
489 1
-3 1
fi=(3)
48 1
+25 2
-3 1
-7 1
+5 1
+3 1
+2 1
-6 1
+3 1
-3 2
-3 16
+10 4
-26 12
+16 13
+10 13
-26 39
+26 1
-26 3
+2 36
+13 20
+2 4
+16 2
+20 4
+1 4
+1 4
+1 4
+2 4
+5 4
+1 4
+1 4
+6 3
+5 2
+7 3
+1 3
+8 3
+3 3
+4 2
+1 2
fe=(2)
500 2
393 1
507 1
393 1
cfi=(6) /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c
cfn=(10) _dl_setup_hash
calls=1 939
* 23
+1 2
+1 2
+1 2
+1 2
+8 1
+9 1
-9 3
+9 1
-6 1
-3 1
+9 1
cfi=(7) /build/glibc-OTsEL5/glibc-2.27/elf/../elf/dl-sysdep.c
cfn=(12) _dl_sysdep_start
calls=1 88
* 446941
* 1
+9 4
+3 1
+4 1
-4 1
+4 1
532 9
-27 27
fi=(4) /build/glibc-OTsEL5/glibc-2.27/elf/do-rel.h
84 1
+27 1
-28 1
+28 2
+1 2
fi=(5)
540 2
fi=(4)
112 76
fi=(5)
540 76
+1 39
fi=(4)
111 39
fi=(5)
541 39
fi=(4)
111 39
fi=(5)
541 39
fi=(4)
111 39
+5 2
+8 1
fi=(5)
335 1
+87 1
fi=(4)
124 2
+12 1
+3 1
-3 1
+3 1
-3 1
fi=(5)
301 1
fi=(4)
137 1
fi=(5)
301 1
fi=(4)
137 1
fi=(5)
301 1
fi=(4)
136 8
+3 8
-3 8
+3 8
-3 8
fi=(5)
301 8
fi=(4)
137 8
fi=(5)
301 8
fi=(4)
137 8
fi=(5)
301 8
+9 27
+3 9
-3 18
+3 27
+22 54
fi=(3)
68 4
fi=(4)
+56 28
fi=(5)
354 27
fi=(3)
71 4
+1 1
+1 2
fe=(2)
fn=(32) dl_main
870 1
+17 1
-17 10
+17 1
+4 1
-21 1
2471 1
891 1
+1 1
2466 1
892 1
+5 1
2471 1
897 1
2464 2
+7 3
-4 1
+4 3
+2 2
cfi=(15) /build/glibc-OTsEL5/glibc-2.27/elf/dl-environ.c
cfn=(34) _dl_next_ld_env_entry
calls=1 29
* 58
* 4
cfi=(15)
cfn=(34)
calls=2 29
* 334
* 9
+4 6
-2 2
+2 42
+1 19
-1 57
+3 4
+6 14
+76 3
+1 4
cfi=(16) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/memcmp.S
cfn=(36) bcmp
calls=1 24
* 31
* 2
-56 2
+7 4
cfi=(16)
cfn=(36)
calls=1 24
* 36
* 2
+2 3
2635 3
+32 3
907 3
1108 7
cfi=(17) /build/glibc-OTsEL5/glibc-2.27/elf/dl-object.c
cfn=(38) _dl_new_object
calls=1 59
* 230
+2 1
-2 1
+2 1
+1 1
+1 1
+5 2
-5 1
+1 2
+4 1
cfi=(17)
cfn=(50) _dl_add_to_namespace_list
calls=1 31
* 33
+1 2
879 1
1147 1
-3 1
-5 1
+1 1
+2 1
+5 5
+56 2
876 1
1166 1
+22 1
+15 2
-55 24
-1 27
+1 47
1250 3
+3 2
+2 2
+2 3
+13 3
+3 2
-2 1
+2 1
-2 3
cfi=(21)
cfn=(56)
calls=1 144
* 50
* 2
+7 1
+3 1
-5 1
+3 1
-3 1
+5 1
+1 2
+4 2
+2 2
fi=(3)
33 1
+9 2
+6 1
-2 1
+2 2
+15 1
+5 1
+3 1
+2 1
-3 1
-3 1
-3 1
-14 54
+13 24
+1 20
+10 5
-26 15
+16 21
+10 21
-26 63
+26 1
-26 3
+33 3
+20 3
+1 4
+1 4
+1 4
+2 4
+5 4
+1 4
+1 4
+6 3
+5 2
+7 2
+1 3
+18 3
+5 1
+2 1
-2 1
+2 1
+2 2
+2 2
+1 1
+2 3
+10 1
-8 3
+8 1
+5 2
+1 2
+2 2
fe=(2)
1293 2
cfi=(6)
cfn=(10)
calls=1 939
* 23
+3 2
fi=(22) /build/glibc-OTsEL5/glibc-2.27/elf/setup-vdso.h
24 2
fe=(2)
1318 1
cfi=(11) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/dl-sysdep.c
cfn=(62) _dl_discover_osversion
calls=1 45
* 87
* 9
-6 5
1167 2
+9 1
-7 1
-3 1
+10 1
+18 2
-37 3
+1 1
-6 3
+1 1
fi=(3)
65 4
+3 4
fe=(2)
1203 2
-1 2
+1 4
-1 2
+2 4
+1 1
+3 2
+1 2
-1 2
+1 2
+1 2
+1 6
+1 2
+31 2
+1 2
+1 1
-6 2
+1 1
fi=(3)
71 4
+1 1
+1 3
fe=(2)
1323 2
cfi=(24)
cfn=(66) _dl_init_paths
calls=1 623
* 1740
+3 3
cfi=(31) /build/glibc-OTsEL5/glibc-2.27/elf/dl-debug.c
cfn=(92) _dl_debug_initialize
calls=1 49
* 17
+7 1
-7 1
+2 1
+5 1
+3 3
+1 1
+3 1
-3 3
+1 2
+3 1
+5 1
-7 1
+7 1
+1 5
+17 2
+1 2
+5 1
-3 3
+2 1
+1 2
+5 2
+1 5
-1 2
+3 2
+1 2
+5 2
+6 4
+1 1
-2 1
885 1
1391 1
1570 1
cfi=(32)
cfn=(94) _dl_count_modids
calls=1 113
* 4
* 1
+8 3
+3 2
+4 3
+5 2
+1 1
cfi=(31)
cfn=(96) _dl_debug_state
calls=1 74
* 1
+1 1
+4 2
+15 3
+4 1
-2 1
+2 2
+2 3
+1 1
-1 2
+1 1
cfn=(98) handle_ld_preload
calls=1 837
* 2506
* 1
+1 4
+2 2
+10 3
cfi=(47) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/access.c
cfn=(144) access
calls=1 27
* 8
* 2
+77 1
-96 1
+96 3
+17 3
+1 1
-1 1
+1 2
-1 1
+1 5
cfi=(48)
cfn=(146)
calls=1 159
* 19563
+1 4
+5 1
-3 2
+3 2
+1 7
-1 2
+1 15
-1 10
+4 3
+1 3
+1 1
+2 2
+1 5
-1 6
+1 12
-1 12
+47 2
+2 2
-1 1
-1 2
+2 4
cfi=(34)
cfn=(166)
calls=1 226
* 8302
+10 1
+1 1
-1 1
+1 1
+1 1
cfn=(174)
calls=1 687
* 618
* 1
+2 2
799 1
fi=(147) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/dl-osinfo.h
64 2
fe=(2)
801 1
fi=(147)
77 1
fe=(2)
810 1
+7 1
-5 1
1808 2
2038 3
2161 3
+7 1
+2 3
+1 1
-1 2
+2 14
+2 6
-2 12
+2 6
+5 12
+2 12
+6 6
+2 12
+1 40
cfi=(54) /build/glibc-OTsEL5/glibc-2.27/elf/dl-reloc.c
cfn=(180) _dl_relocate_object
calls=5 148
* 381065
+4 14
+1 2
cfi=(32)
cfn=(278) _dl_add_to_slotinfo
calls=1 887
* 20
* 1
-12 1
+1 1
-3 2
+29 4
+2 1
+7 3
cfi=(32)
cfn=(286) _dl_allocate_tls_init
calls=1 437
* 149
+3 2
-25 4
+2 2
+6 1
-6 1
+6 1
+26 3
+2 4
+15 1
+2 1
-2 2
+3 1
-3 1
+3 1
-3 1
+3 3
cfi=(54)
cfn=(180)
calls=1 148
* 6722
+1 4
+2 2
+8 1
cfi=(7)
cfn=(288) _dl_sysdep_start_cleanup
calls=1 260
* 1
+4 2
+20 3
cfi=(31)
cfn=(92)
calls=1 49
* 8
+1 1
-1 1
+2 1
cfi=(31)
cfn=(96)
calls=1 74
* 1
+1 1
+4 1
cfi=(50) /build/glibc-OTsEL5/glibc-2.27/elf/dl-cache.c
cfn=(290) _dl_unload_cache
calls=1 326
* 15
+5 8
2094 1
+13 1
-9 1
-4 1
+10 1
-6 1
+6 1
+3 1
1753 1
+1 1
-1 2
+1 1
+2 1
+2 3
+2 1
-4 1
+4 2
+14 4
+1 2
+1 3
-64 5
+1 1
-1 3
+4 3
+1 1
+1 2
+1 2
+32 2
2565 3
fn=(98)
837 8
+1 1
-1 1
-75 1
+86 1
-86 4
+80 2
+3 3
cfi=(33) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/strcspn.S
cfn=(100) strcspn
calls=1 30
* 218
* 1
+1 3
+9 1
121 1
857 2
121 2
859 2
-97 5
-10 1
+4 1
+1 1
+1 1
+2 1
+2 1
cfi=(34)
cfn=(104)
calls=1 213
* 2201
* 1
+1 3
+8 4
+71 2
+21 9
-15 4
cfi=(20)
cfn=(48)
calls=1 129
* 18
+1 2
fn=(112)
588 1
+2 1
-2 1
+3 2
-1 3
+1 3
cfi=(24)
cfn=(114)
calls=1 2080
* 2113
* 1
+2 2
fl=(14) /build/glibc-OTsEL5/glibc-2.27/elf/../misc/sbrk.c
fn=(30) sbrk
32 4
+8 6
+4 2
+16 5
fl=(8) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86/cpu-features.c
fn=(24) get_common_indeces.constprop.1
34 2
+4 4
+3 3
+4 1
-4 1
+4 1
-4 1
+3 1
+1 2
+1 4
+1 4
+1 3
+1 2
+7 2
+1 7
+7 3
+4 2
+2 4
+40 2
+4 4
+1 2
+3 1
+7 1
-8 1
+4 1
+2 1
-2 1
+4 2
+3 2
+50 3
74 2
+3 3
+3 1
-3 1
+3 1
+2 3
+2 2
+7 3
-5 3
fl=(24)
fn=(118) open_verify.constprop.7
1598 154
+39 14
-39 42
+39 54
+31 56
cfi=(37)
cfn=(120)
calls=14 39
* 254
+2 14
-2 14
+2 18
+10 4
+1 8
+5 24
cfi=(39) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/read.c
cfn=(124) read
calls=4 27
* 20
+2 8
+2 4
+2 4
-2 4
+2 4
+6 8
+16 64
+74 8
+5 8
+2 16
+6 8
+11 8
+6 4
+1 4
+1 4
-2 12
+1 12
+21 176
+2 78
+13 12
+3 16
+1 4
+12 24
-3 30
+15 2
+3 1
+1 3
+1 1
-1 1
-1 1
+3 3
+1 3
1650 10
1918 126
1714 2
1871 24
+3 4
-4 4
+4 8
+5 1
+1 2
-55 6
fn=(66)
623 1
+13 2
-13 8
+13 3
cfi=(25) /build/glibc-OTsEL5/glibc-2.27/elf/dl-hwcaps.c
cfn=(68) _dl_important_hwcaps
calls=1 42
* 711
+5 1
-5 1
+5 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+1 1
-2 1
+2 2
+8 1
-1 1
+1 4
-1 3
+4 4
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+2 1
-2 2
+2 1
+7 1
+10 1
-11 1
+12 1
+3 1
+1 1
-5 1
+3 1
+1 1
-1 1
+9 1
-20 1
+17 1
+3 1
-3 17
cfi=(28) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
cfn=(76) memset
calls=4 109
* 48
+3 27
-12 3
-2 3
+10 3
-7 3
-1 3
+4 3
-1 3
+1 3
+1 3
+3 3
+1 3
-4 3
+4 3
+14 1
-11 1
+6 1
+1 1
+5 2
+2 4
+2 3
+38 5
-19 1
-2 2
+2 2
+21 3
cfi=(13)
cfn=(28)
calls=1 79
* 16
* 8
cfi=(20)
cfn=(48)
calls=1 129
* 10
* 1
+5 4
-1 2
+2 56
-1 57
+5 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+1 1
-2 1
+2 1
+6 7
cfn=(78) fillin_rpath
calls=1 389
* 584
+3 3
+6 1
+4 8
-37 2
fn=(78)
389 7
+2 1
-2 9
+4 3
cfi=(19)
cfn=(80)
calls=1 265
* 238
* 3
cfi=(19)
cfn=(80)
calls=1 265
* 6
* 6
+7 2
+2 3
cfn=(82) expand_dynamic_string_token
calls=1 -82
* 104
+4 1
-4 1
+4 1
+5 2
cfi=(13)
cfn=(28)
calls=1 79
* 16
+1 2
+7 6
+9 17
+1 8
+57 2
cob=(2)
cfi=(18)
cfn=(88) 0x0000000004000f00
calls=1 0
* 5
* 1
-39 2
+4 7
-1 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+3 3
+5 1
+1 2
-2 2
+2 1
cfi=(20)
cfn=(74) mempcpy
calls=1 116
* 12
+3 1
-2 1
-1 1
+1 1
+2 1
+6 4
+1 17
+1 1
-1 3
+1 1
-1 14
+1 8
-1 1
+1 1
-1 3
+1 1
-1 2
+4 1
-1 1
+1 1
-1 1
+1 1
+8 1
-1 1
+4 3
-37 2
-28 1
+5 4
+66 1
+3 9
-15 2
fn=(82)
320 12
+10 4
-10 2
+10 2
cfi=(29)
cfn=(84)
calls=2 24
* 70
* 4
+15 2
-11 2
+11 8
-11 2
cfi=(30) /build/glibc-OTsEL5/glibc-2.27/string/strdup.c
cfn=(86) strdup
calls=2 40
* 150
fn=(150) open_path
1932 24
+1 3
+6 3
-6 3
+6 3
+5 33
-7 3
-1 3
+8 21
+3 9
+9 12
+7 9
+1 3
-13 9
+12 3
cfi=(20)
cfn=(74)
calls=3 116
* 36
* 3
+55 6
-22 18
-32 6
+32 30
-32 20
+3 48
+4 60
cfi=(20)
cfn=(74)
calls=10 116
* 127
* 40
cfi=(20)
cfn=(74)
calls=10 116
* 120
+3 20
+3 30
+3 90
cfn=(118)
calls=10 1598
* 550
* 10
+2 50
+2 16
+89 27
-45 28
-64 28
+85 21
+7 3
-2 3
+2 9
+3 9
-13 6
-38 8
+2 4
-46 4
+25 16
+1 64
+6 16
+2 16
-2 16
+2 16
cfi=(49) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/xstat.c
cfn=(152) _xstat
calls=8 34
* 101
* 8
+3 8
-3 8
+1 1
+2 1
-2 1
+2 7
-37 2
+37 7
-37 14
fn=(114)
2080 49
+8 7
-8 14
+8 7
+1 28
+3 125
+5 182
+2 78
cfi=(36)
cfn=(116)
calls=26 282
* 3069
* 52
+4 46
+1 69
+3 11
+1 11
+1 11
-1 11
+1 11
cfi=(21)
cfn=(56)
calls=11 144
* 396
* 22
2391 63
2125 12
+10 12
-53 4
+89 8
-2 4
+2 4
cfi=(29)
cfn=(84)
calls=4 24
* 116
* 8
2322 5
cfn=(82)
calls=1 320
* 154
* 1
-2 1
+3 5
+4 9
cfn=(118)
calls=1 1598
* 208
+3 2
-3 1
+3 3
+12 3
+46 1
+1 3
-1 1
+1 9
cfn=(126) _dl_map_object_from_fd
calls=1 808
* 1347
-1 3
+1 9
-1 3
+1 27
cfn=(126)
calls=3 808
* 4990
* 12
2171 3
+4 6
cfi=(13)
cfn=(28)
calls=3 79
* 66
* 3
+2 3
-2 3
+2 3
+7 12
+36 36
cfn=(150)
calls=3 1932
* 1873
+6 6
-6 3
+6 9
601 9
+3 1
2227 1
604 1
2314 6
+28 12
+2 6
610 1
2249 1
-14 1
+14 3
-14 2
+14 2
+2 9
+4 6
cfi=(50)
cfn=(154) _dl_load_cache_lookup
calls=3 187
* 4385
+2 3
-2 3
+2 3
+4 6
+8 9
+23 30
cfn=(118)
calls=3 1598
* 640
+4 6
-4 3
+4 9
+1 6
-88 21
601 9
2219 6
+1 6
-32 3
+1 6
-1 9
+8 21
-3 12
601 12
+3 1
2194 1
604 1
+3 3
+3 11
2208 9
607 3
fn=(126)
808 44
+10 4
-10 4
+10 4
-10 12
+10 4
cfi=(31)
cfn=(92)
calls=4 49
* 32
fi=(40) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/posix/dl-fileid.h
37 12
fe=(24)
818 4
fi=(40)
37 4
cfi=(41)
cfn=(130)
calls=4 -3
* 40
* 8
+4 4
fe=(24)
834 4
fi=(40)
40 4
+1 4
fe=(24)
834 66
+1 28
fi=(40)
49 46
fe=(24)
1346 36
852 8
+24 16
+10 8
+22 16
+32 8
819 4
943 28
cfi=(17)
cfn=(38)
calls=4 59
* 1424
+1 4
-1 4
+1 4
+11 8
+5 4
-5 4
+1 4
+5 4
-5 4
+1 4
+2 4
-2 4
+2 8
+1 12
+20 4
-2 4
+10 4
-8 24
+8 4
-8 12
+8 4
+97 4
982 4
-6 4
1085 4
981 4
-5 8
1085 12
-96 58
-1 186
+1 175
+6 8
+5 8
+1 16
+11 40
+5 64
+9 24
-1 24
+1 8
+1 16
+2 8
-2 8
+1 8
-1 8
+3 8
+4 8
-7 8
+3 8
-1 8
+5 8
+1 16
+5 8
-1 4
-14 4
+14 4
+1 24
+10 4
-10 8
-1 4
-14 4
+14 4
+1 24
+10 4
-44 2
+1 1
+46 3
+4 1
+1 1
+2 1
-1 1
-1 2
+1 1
+3 3
+1 1
+3 1
-3 1
+7 4
+6 1
cfi=(32)
cfn=(162) _dl_next_tls_modid
calls=1 51
* 6
* 2
+1 1
+19 8
+1 8
+1 4
-6 8
+1 4
+8 16
956 4
1110 4
956 4
1110 4
+10 12
fi=(43) /build/glibc-OTsEL5/glibc-2.27/elf/./dl-map-segments.h
50 4
+6 4
fe=(24)
1120 16
fi=(43)
56 12
fe=(24)
1120 4
fi=(43)
50 4
fe=(24)
1120 8
fi=(43)
56 8
cfi=(42)
cfn=(132)
calls=4 -12
* 148
+4 4
-4 4
+4 8
+3 8
+1 4
+2 4
-2 4
-1 4
+3 4
+14 8
fi=(45) /build/glibc-OTsEL5/glibc-2.27/elf/./dl-load.h
+10 16
+1 12
+2 16
fi=(43)
+11 32
+45 8
-59 40
+2 24
+2 32
cfi=(42)
cfn=(132)
calls=4 -50
* 132
* 8
+16 4
+2 4
-2 4
+1 4
+2 4
-1 4
+1 4
-1 12
+8 8
+3 8
+8 28
cfi=(28)
cfn=(76)
calls=4 -22
* 763
* 8
+6 8
+4 16
cfi=(42)
cfn=(132)
calls=2 -97
* 66
+3 4
-71 40
cfi=(44)
cfn=(136)
calls=4 +5
* 20
* 8
fi=(45)
+21 15
+2 3
-1 9
+1 3
-1 3
+1 6
-1 6
+3 12
fe=(24)
1132 16
+9 8
fi=(3)
42 4
fe=(24)
1141 4
fi=(3)
42 4
+6 4
-2 4
+2 8
+15 4
+5 4
+3 4
-1 4
-3 4
-3 84
+10 19
-26 57
+16 75
+10 75
-26 225
+26 4
-26 12
+2 196
+13 92
+2 16
+16 8
+20 13
+1 16
+1 16
+1 16
+2 16
+5 16
+1 15
+1 16
+6 12
+5 8
+7 8
+1 12
+18 12
+5 2
+2 2
-2 2
+2 2
+2 4
+2 4
+3 12
+10 2
-8 8
+8 2
+5 4
+3 8
fe=(24)
1148 8
+15 12
+19 8
+2 20
+54 12
+1 2
+3 2
cfi=(46)
cfn=(142)
calls=1 27
* 5
* 6
cfi=(46)
cfn=(142)
calls=3 27
* 15
* 8
+9 8
+2 12
+2 4
-2 4
+2 4
+16 8
cfi=(6)
cfn=(10)
calls=4 939
* 92
+4 8
+1 8
+17 8
+1 1
+8 1
-5 3
+5 4
-5 9
+5 3
+10 8
+10 12
cfi=(17)
cfn=(50)
calls=4 31
* 180
+4 12
fi=(3)
68 16
+3 16
+1 4
+1 16
180 3
-18 2
fe=(24)
369 4
fl=(143) /build/glibc-OTsEL5/glibc-2.27/elf/dl-fini.c
fn=(734) _dl_fini
30 8
+20 3
-3 6
+3 4
+3 2
cfi=(2)
cfn=(52)
calls=1 784
* 2
+2 1
+3 2
+2 8
+8 1
-3 1
+8 1
-5 6
+7 12
+2 12
+2 12
+1 6
+1 6
+4 6
-12 18
+14 6
+1 4
+6 3
cfi=(52)
cfn=(164)
calls=1 -66
* 657
+10 2
cfi=(2)
cfn=(54)
calls=1 790
* 2
+5 6
+2 1
+2 3
-2 5
+2 15
+3 12
+3 18
+4 8
+11 4
+1 4
-1 4
+2 4
-2 4
+2 4
+1 28
+1 4
cob=(5)
cfi=(90)
cfn=(794) 0x000000000000cab0
calls=1 0
* 95
cob=(6)
cfi=(91)
cfn=(776) 0x0000000000013950
calls=1 0
* 95
cob=(4)
cfi=(81)
cfn=(758)
calls=1 0
* 95
cob=(7)
cfi=(92)
cfn=(736)
calls=1 0
* 95
* 4
-1 12
+5 8
+1 12
cob=(2)
cfi=(18)
cfn=(810) 0x000000000527ea18
calls=1 0
* 3
cob=(2)
cfi=(18)
cfn=(792) 0x0000000004c63848
calls=1 0
* 3
cob=(2)
cfi=(18)
cfn=(774) 0x0000000004a2a7a8
calls=1 0
* 3
cob=(2)
cfi=(18)
cfn=(756) 0x000000000010e5b4
calls=1 0
* 3
+6 36
+16 12
-56 14
+62 6
+6 2
+7 8
-90 7
+26 6
fl=(6)
fn=(10)
939 18
+4 6
+4 12
+2 6
-1 6
+3 18
+1 6
+1 6
+3 6
-3 6
+7 6
-4 6
-1 6
+3 6
+2 6
-7 6
+7 6
+1 6
fn=(188) _dl_lookup_symbol_x
790 4630
555 463
790 1852
555 1389
-1 926
+2 463
-1 463
+1 1389
-1 1389
+1 7053
-1 7053
+1 21159
-1 21622
793 463
-1 463
+4 463
+4 463
-8 463
+1 463
+7 1292
+5 1389
+6 1389
-7 5093
+15 56
-8 84
+2 6019
cfn=(190) do_lookup_x
calls=463 338
* 182558
+3 2287
+25 926
+24 3143
+31 449
+9 1796
+14 1347
+3 1796
+5 449
+2 4195
-86 84
+17 14
+1 28
+59 2
fn=(190)
338 3241
+1 463
-1 2778
+6 926
+12 463
+30 463
-41 463
+41 463
+35 926
-65 2315
+14 4935
+8 3290
+1 4935
+3 1645
+1 3290
+4 3290
+3 3290
-5 1645
+5 4935
+3 11515
-99 1196
540 5866
+1 807
cfi=(36)
cfn=(116)
calls=269 282
* 32707
* 1076
+3 3591
349 3292
+3 3292
+4 3300
+4 3290
+4 3290
fi=(55) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/generic/ldsodefs.h
102 1347
fe=(6)
503 898
+3 3480
-60 92
+64 84
+12 2694
+2 449
+24 3704
-1 28
397 1491
-1 994
+2 994
+2 495
90 1485
375 495
90 495
374 495
90 495
400 990
90 990
413 1425
-10 4620
+2 1796
+2 898
-1 1347
78 3143
+12 2245
+3 1398
cfi=(21)
cfn=(56)
calls=100 +51
* 3862
* 300
+5 449
-1 449
+1 449
+2 366
+19 183
+1 1647
452 4490
148 532
+2 1330
+30 322
-59 915
cfi=(21)
cfn=(56)
calls=183 +23
* 10304
* 915
fl=(106) /build/glibc-OTsEL5/glibc-2.27/elf/dl-open.c
fn=(406) _dl_find_dso_for_object
176 5
+4 6
+1 4
+1 16
+1 2
-2 9
+5 2
+4 7
fl=(30)
fn=(86)
40 20
+1 5
cfi=(13)
cfn=(28)
calls=5 +38
* 152
* 5
+1 10
cfi=(19)
cfn=(46)
calls=5 +8
* 90
* 5
+2 10
+4 5
-1 10
+1 10
-1 10
cfi=(20)
cfn=(48)
calls=5 +82
* 74
fl=(54)
fn=(180)
148 60
+15 6
-15 12
+15 6
+1 30
+6 18
+6 24
+1 12
-19 8
+22 8
+7 6
-32 6
+32 6
+44 6
fi=(5)
76 6
fe=(54)
231 12
fi=(5)
76 18
fe=(54)
258 219
-99 3
fi=(5)
481 9
fe=(54)
159 6
+99 3
fi=(4)
48 3
fe=(54)
258 3
fi=(4)
47 3
+11 3
-11 3
+11 3
-11 3
+11 3
fe=(54)
258 3
-99 3
fi=(5)
481 9
fe=(54)
159 6
+99 3
fi=(4)
48 3
fe=(54)
258 3
fi=(4)
47 3
+11 3
-11 3
+11 3
-11 3
+11 3
fe=(54)
258 6
fi=(4)
48 6
fe=(54)
258 6
fi=(4)
47 6
+11 6
-11 6
+11 6
-11 6
+11 6
+26 9
+14 18
-15 18
+3 36
+12 9
+10 14
+10 27
+6 8
-3 16
+3 8
fi=(5)
491 5
fi=(4)
51 5
fi=(5)
491 5
fi=(4)
50 10
+77 1924
+12 962
-3 1443
fi=(5)
276 481
fi=(4)
139 481
-2 481
-1 481
+1 481
+1 481
-1 962
fi=(5)
276 481
+21 962
+4 962
+7 1924
fi=(55)
102 1392
fi=(5)
308 8557
fi=(4)
138 455
fi=(5)
308 910
fi=(4)
138 455
fi=(5)
308 455
fi=(4)
138 455
fi=(5)
308 910
fi=(4)
138 1
fi=(5)
308 2
fi=(4)
138 1
fi=(5)
308 1
fi=(4)
138 1
fi=(5)
308 5474
cfi=(6)
cfn=(188)
calls=456 790
* 281823
* 2736
+2 1392
+25 2886
fi=(4)
74 6
+1 7
+1 78
fi=(5)
551 39
+24 78
+2 39
cob=(3)
cfi=(77) /build/glibc-OTsEL5/glibc-2.27/time/../sysdeps/unix/sysv/linux/x86/gettimeofday.c
cfn=(274) gettimeofday
calls=1 42
* 77
cob=(3)
cfi=(58) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-strcasecmp.h
cfn=(270) strncasecmp_l
calls=1 32
* 6
cob=(3)
cfi=(60) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-avx2.h
cfn=(268) strchrnul
calls=1 32
* 8
cob=(3)
cfi=(57) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-unaligned-ssse3.h
cfn=(266) stpcpy
calls=1 33
* 9
cob=(3)
cfi=(57)
cfn=(264) stpncpy
calls=1 33
* 9
cob=(3)
cfi=(70) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-sse4_2.h
cfn=(262) strspn
calls=1 30
* 6
cob=(3)
cfi=(64) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/ifunc-avx2.h
cfn=(260) wcslen
calls=1 32
* 8
cob=(3)
cfi=(60)
cfn=(258) memchr
calls=1 32
* 8
cob=(3)
cfi=(58)
cfn=(254) strcasecmp_l
calls=1 32
* 6
cob=(3)
cfi=(60)
cfn=(252) memrchr
calls=1 32
* 8
cob=(3)
cfi=(60)
cfn=(250) strlen
calls=1 32
* 8
cob=(3)
cfi=(74) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strchr.c
cfn=(248) index
calls=1 40
* 8
cob=(3)
cfi=(70)
cfn=(246) strpbrk
calls=1 30
* 6
cob=(3)
cfi=(73) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/ifunc-wmemset.h
cfn=(244) wmemset
calls=2 32
* 26
cob=(3)
cfi=(72) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wcsnlen.c
cfn=(242) wcsnlen
calls=1 40
* 7
cob=(3)
cfi=(56) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-memmove.h
cfn=(240) memcpy@@GLIBC_2.14
calls=1 44
* 16
cob=(3)
cfi=(57)
cfn=(238) strcpy
calls=1 33
* 9
cob=(3)
cfi=(58)
cfn=(234) strncasecmp
calls=1 32
* 6
cob=(3)
cfi=(70)
cfn=(232) strcspn
calls=1 30
* 6
cob=(3)
cfi=(60)
cfn=(230) strnlen
calls=2 32
* 16
cob=(3)
cfi=(64)
cfn=(228) wcschr
calls=2 32
* 16
cob=(3)
cfi=(69) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-memset.h
cfn=(226) memset
calls=1 42
* 18
cob=(3)
cfi=(68) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcmp.c
cfn=(224) strcmp
calls=1 38
* 9
cob=(3)
cfi=(67) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncmp.c
cfn=(222) strncmp
calls=1 38
* 8
cob=(3)
cfi=(65) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-memcmp.h
cfn=(218) bcmp
calls=1 33
* 13
cob=(3)
cfi=(56)
cfn=(216) mempcpy
calls=1 44
* 16
cob=(3)
cfi=(64)
cfn=(214) wmemchr
calls=2 32
* 16
cob=(3)
cfi=(60)
cfn=(212) rawmemchr
calls=1 32
* 8
cob=(3)
cfi=(61) /build/glibc-OTsEL5/glibc-2.27/time/../sysdeps/unix/sysv/linux/x86/time.c
cfn=(206) time
calls=1 43
* 77
cob=(3)
cfi=(60)
cfn=(204) rindex
calls=1 32
* 8
cob=(3)
cfi=(57)
cfn=(202) strcat
calls=1 33
* 9
cob=(3)
cfi=(58)
cfn=(198) strcasecmp
calls=1 32
* 6
cob=(3)
cfi=(57)
cfn=(196) strncpy
calls=1 33
* 9
cob=(3)
cfi=(56)
cfn=(194) memmove
calls=2 44
* 32
-26 39
+27 39
fi=(4)
75 121
fe=(54)
258 2
fi=(4)
75 22
fe=(54)
258 22
+3 24
+24 6
+3 12
+17 18
+8 30
+3 6
-3 6
+3 6
+4 12
+1 18
cfi=(44)
cfn=(136)
calls=6 78
* 30
* 12
-14 48
fi=(5)
131 9
458 1852
fi=(4)
124 1443
+19 25
fi=(5)
430 51
+4 68
+5 17
+9 17
-9 34
+9 34
+49 3
+4 6
cfi=(20)
cfn=(48)
calls=1 129
* 10
+2 3
+1 1
308 34
+5 17
-3 34
+3 505
-3 908
+3 1362
+3 85
+3 34
+1 51
+1 34
+4 17
+7 17
cob=(3)
cfi=(79) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strstr.c
cfn=(284) strstr
calls=1 44
* 6
cob=(3)
cfi=(61)
cfn=(206)
calls=1 43
* 77
cob=(3)
cfi=(56)
cfn=(240)
calls=1 44
* 16
cob=(3)
cfi=(78) /build/glibc-OTsEL5/glibc-2.27/debug/../sysdeps/x86_64/multiarch/ifunc-memmove.h
cfn=(282) __memcpy_chk
calls=1 44
* 16
cob=(3)
cfi=(68)
cfn=(224)
calls=2 38
* 18
cob=(3)
cfi=(57)
cfn=(280) strncat
calls=1 33
* 9
cob=(3)
cfi=(69)
cfn=(226)
calls=1 42
* 18
cob=(3)
cfi=(77)
cfn=(274)
calls=1 42
* 77
cob=(3)
cfi=(60)
cfn=(204)
calls=1 32
* 8
cob=(3)
cfi=(74)
cfn=(248)
calls=1 40
* 8
cob=(3)
cfi=(60)
cfn=(250)
calls=2 32
* 16
cob=(3)
cfi=(57)
cfn=(238)
calls=1 33
* 9
cob=(3)
cfi=(67)
cfn=(222)
calls=1 38
* 8
cob=(3)
cfi=(57)
cfn=(196)
calls=2 33
* 18
* 51
-24 234
fi=(4)
61 6
-10 3
-1 6
fi=(5)
551 222
+4 222
+2 333
+1 111
fi=(4)
61 450
+2 600
+2 119
+46 16
fi=(5)
541 3932
fi=(4)
111 3932
fi=(5)
541 3932
fi=(4)
111 3932
fi=(5)
541 3932
fi=(4)
111 3932
fi=(5)
535 3932
fi=(4)
112 7864
fi=(5)
535 7864
+5 7864
fi=(4)
50 1
160 1
51 1
160 4
+2 20
+9 10
-1 5
+1 5
-1 10
fi=(5)
276 5
fi=(4)
170 15
fi=(5)
276 5
+21 10
+4 10
+7 20
fi=(55)
102 15
fi=(5)
308 170
cfi=(6)
cfn=(188)
calls=5 790
* 2835
* 35
+2 15
+25 30
fe=(54)
-77 15
fi=(5)
82 6
+4 9
+14 3
-8 3
+8 6
+20 6
+4 12
-2 6
458 20
fi=(4)
160 17
+14 2
fi=(5)
313 1
-3 2
+3 3
-5 1528
fe=(54)
180 6
fi=(5)
308 28
fe=(54)
fl=(20)
fn=(74)
116 34
+1 34
+1 34
+13 34
+1 34
+1 14
+1 14
+5 11
+1 11
+1 11
+1 11
+5 11
267 20
+1 20
+1 10
+1 10
+1 5
+1 5
+1 3
+4 3
+22 10
+1 10
+1 10
+1 10
+1 10
+3 5
+1 5
+1 5
+1 5
+1 5
+3 2
+1 2
+1 2
+1 2
+1 2
+10 3
+1 3
+1 3
+1 3
+22 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+2 3
fn=(48)
129 29
+2 29
+1 29
+1 17
+1 17
+5 9
+1 9
+1 9
+1 9
+5 9
267 12
+1 12
+1 3
+1 3
+1 3
+1 3
+1 1
+1 1
+1 1
+2 1
+22 9
+1 9
+1 9
+1 9
+1 9
+10 2
+1 2
+1 2
+1 2
+1 2
+10 8
+1 8
+1 8
+1 8
+22 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+2 8
fl=(53)
fn=(172) _dl_check_map_versions
156 42
+15 18
+2 30
+2 6
+1 6
+2 6
-3 6
+1 6
+2 6
+3 12
-16 4
-8 8
+28 4
-4 4
+4 8
+16 4
37 8
201 4
37 20
201 1
37 2
201 1
37 5
+1 18
-1 36
+2 69
cfi=(36)
cfn=(116)
calls=23 282
* 2291
* 46
209 15
+5 5
-71 15
+71 10
-71 15
+79 5
-2 5
-2 10
+4 5
-4 35
+4 13
-2 13
-2 26
+4 13
-4 101
57 6
+8 6
-8 48
+8 48
+6 54
+16 18
+1 36
+2 18
+5 108
+14 336
+12 450
+4 150
-30 300
225 72
+3 54
+5 13
-11 13
111 18
+3 72
cfi=(21)
cfn=(56)
calls=18 +30
* 960
* 82
237 20
+5 3
-43 1
+52 12
+3 12
+3 18
+3 12
+4 3
-7 12
+3 9
+4 56
-7 224
+3 171
+8 15
+89 54
-83 20
cfi=(19)
cfn=(42)
calls=5 92
* 135
* 5
+1 5
-2 5
+2 5
+13 5
+2 5
-5 5
+3 5
+2 5
-2 5
+2 5
+3 16
+4 15
+18 13
-15 39
+2 39
-2 15
+2 15
+2 18
+1 18
-1 36
+1 18
-1 18
+1 18
+1 18
-2 18
+2 36
+1 54
+3 54
+8 15
+5 1
-28 1
+33 15
+3 12
+4 59
+6 59
+1 59
+1 59
-1 177
+1 59
-1 59
+1 59
+1 59
+3 177
+4 59
-14 124
+10 9
-96 2
-86 2
-8 2
+94 3
fn=(170)
362 5
+2 1
-2 3
+4 3
+2 36
cfn=(172)
calls=6 156
* 8180
-2 6
+2 24
-2 12
+5 7
fl=(17)
fn=(50)
31 10
+2 5
-2 15
+2 10
cfi=(2)
cfn=(52)
calls=5 784
* 10
+2 41
+3 42
+2 4
+2 4
+4 4
+4 4
-4 8
+1 4
+4 8
-4 4
+1 4
+3 4
-3 4
+2 4
cfi=(2)
cfn=(54)
calls=4 790
* 8
-4 1
+4 1
-4 2
+1 1
+4 2
-4 1
+1 1
+3 1
-3 1
+2 1
cfi=(2)
cfn=(54)
calls=1 790
* 2
-5 2
fn=(38)
59 60
+1 5
-1 5
+1 10
cfi=(13)
cfn=(28)
calls=5 +19
* 116
+6 5
-6 10
+6 5
+7 5
-7 5
-6 5
+6 15
+2 10
+5 15
cfi=(19)
cfn=(42)
calls=5 +19
* 201
* 5
+3 5
-3 5
+3 5
+4 5
+5 5
-6 5
+6 5
-5 5
+5 5
-5 5
+4 5
+1 10
-1 5
+1 5
cfi=(20)
cfn=(48)
calls=5 +44
* 61
+10 5
-10 5
+10 5
-10 5
+10 5
-8 5
+8 10
+1 5
-1 5
+1 15
+3 5
-3 5
+3 5
+9 5
-7 5
+4 5
+3 10
+2 2
-2 2
+2 30
-2 30
+18 10
-6 5
+1 5
+5 5
-6 5
+6 15
+2 4
+3 4
-3 8
+3 5
+4 15
+4 9
+8 1
+3 1
+3 2
-3 1
+3 1
-3 4
+3 8
-3 4
+3 4
+2 4
+21 4
-21 4
cfi=(13)
cfn=(28)
calls=4 -76
* 136
+4 4
-4 8
+17 4
-13 12
+64 4
+4 45
100 14
+39 12
+70 12
cfi=(20)
cfn=(74)
calls=4 -93
* 72
* 75
+6 71
-1 71
+1 75
-1 4
+1 12
+5 8
-96 1
+7 4
+32 8
cfi=(19)
cfn=(46)
calls=4 50
* 72
* 4
+1 4
-1 8
+1 4
fl=(105) /build/glibc-OTsEL5/glibc-2.27/elf/../elf/dl-runtime.c
fn=(402) _dl_fixup
66 4
+6 4
-6 2
+3 4
+3 6
-4 2
+5 2
+2 2
-2 10
+2 2
-2 2
+2 2
+5 4
+4 4
+4 2
+7 2
-7 4
+4 4
+1 8
+2 8
+7 4
-1 2
+1 2
+10 18
cfi=(6)
cfn=(188)
calls=2 790
* 2367
* 2
+4 10
+10 14
+16 2
-8 2
+8 6
+4 6
fi=(5)
+96 2
fe=(105)
-92 6
fl=(32)
fn=(178)
332 1
+2 1
-2 2
+13 1
+1 2
cfi=(19)
cfn=(46)
calls=1 50
* 80
* 1
+1 3
+8 2
-69 1
+69 2
+1 1
+4 297
+19 1
-94 2
+1 2
cfi=(19)
cfn=(42)
calls=1 92
* 27
* 1
+1 2
+3 1
+6 2
+89 5
fn=(286)
437 8
+1 1
-1 1
+1 1
+4 1
+6 2
-6 1
+6 1
+12 1
-15 1
+39 1
-24 1
-16 2
+21 9
+6 15
+3 1
+1 2
+6 3
+3 1
-2 1
+6 1
-6 1
+2 1
+4 1
-4 2
+3 1
-3 1
+1 1
+2 1
+4 2
+1 4
+2 2
+1 2
+12 1
-3 1
+3 2
cfi=(20)
cfn=(74)
calls=1 116
* 12
* 5
cfi=(28)
cfn=(76)
calls=1 109
* 33
* 7
-42 2
+52 1
+4 3
+3 8
fn=(94)
113 2
+1 2
fn=(162)
51 4
+48 1
+4 1
fn=(176)
141 1
-6 5
+6 2
+3 2
+36 3
+2 4
-2 1
-2 1
-40 1
-1 1
-1 2
+69 2
+3 2
-3 5
+2 2
+10 1
-37 2
+25 1
-25 2
+5 1
-1 1
+5 2
-4 1
-1 2
+3 2
+2 3
-9 5
+93 1
-53 1
+1 1
+52 1
-1 1
+1 4
fn=(278)
887 4
+9 1
-3 2
+8 7
+41 1
+1 1
+1 4
fl=(31)
fn=(92)
49 12
+5 10
+5 2
-1 1
+1 2
+1 2
-1 1
+5 1
-14 6
+4 12
+4 1
-1 1
+1 6
fn=(96)
74 2
fl=(37)
fn=(120)
39 15
fi=(38) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/open64.c
-3 15
+3 90
+8 105
+2 5
-2 30
+2 10
fe=(37)
fl=(7)
fn=(12)
88 8
+25 1
-1 1
+1 190
+6 1
-3 1
+1 1
-4 1
+3 1
+3 4
+1 2
-1 12
-29 1
-1 10
+30 2
+1 108
+3 1
-4 74
+62 1
-62 1
+63 1
-1 1
-62 3
+34 1
-34 2
+35 1
-35 2
+46 1
-46 1
+47 1
-1 1
-46 3
+40 1
-40 1
+41 1
-1 1
-40 3
+37 1
-37 2
+38 1
-38 3
+13 1
-13 2
+14 1
-14 2
+10 1
-10 2
+11 1
-11 2
+7 1
-7 4
224 1
cfi=(9)
cfn=(16)
calls=1 +65
* 23217
fi=(11)
35 2
cfi=(12)
cfn=(22)
calls=1 -4
* 11
fi=(8)
196 1
-12 1
+1 1
+11 1
+3 1
-3 1
+3 5
366 3
+1 1
+3 2
+1 1
+6 1
+5 2
-3 1
+3 1
-4 1
+4 1
cfi=(9)
cfn=(26)
calls=1 -9
* 16
+2 4
cfi=(9)
cfn=(26)
calls=1 -11
* 18
* 1
+2 3
-2 1
+2 1
cfi=(9)
cfn=(26)
calls=1 -13
* 18
* 1
+2 3
-2 1
+2 1
cfi=(9)
cfn=(26)
calls=1 -15
* 18
+12 1
-12 1
+11 1
-11 1
+12 1
fe=(7)
236 1
cfi=(13)
cfn=(28)
calls=1 79
* 16
* 1
+2 2
cfi=(14)
cfn=(30)
calls=1 32
* 17
* 3
+12 3
+3 5
cfi=(2)
cfn=(32)
calls=1 870
* 422923
+1 1
+1 8
fi=(8)
404 3
+28 2
-9 3
+2 4
+3 4
+1 2
205 6
cfn=(24)
calls=1 34
* 87
+3 3
+97 4
+7 4
203 1
312 4
210 5
+1 7
+85 3
-79 2
fe=(7)
fn=(288)
260 1
fl=(39)
fn=(124)
27 16
+1 4
fl=(104) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86_64/dl-trampoline.h
fn=(400) _dl_runtime_resolve_xsave
71 2
+3 2
+2 2
+10 2
+6 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+4 2
+1 2
+3 2
+1 2
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+2 2
+7 2
+1 2
+1 2
cfi=(105)
cfn=(402)
calls=2 -59
* 2521
+1 2
+5 2
+1 2
+1 2
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+2 2
+2 2
+4 2
+3 2
fl=(49)
fn=(152)
34 8
-1 8
+1 8
+1 48
+4 1
-4 28
fl=(52)
fn=(164)
28 16
+2 2
-2 2
+2 2
+92 10
-88 10
+1 4
-1 2
-1 2
+1 8
+1 2
cfi=(28)
cfn=(76)
calls=2 +74
* 26
* 32
+4 4
+3 2
-3 4
+1 6
+2 2
-7 10
+4 20
+3 10
-3 20
+1 30
+2 10
+12 84
+2 30
+1 20
-1 42
+1 42
+2 126
+1 90
+6 4
-1 2
+1 2
-1 16
cfi=(20)
cfn=(48)
calls=2 +64
* 20
+2 2
+2 14
+5 2
+3 12
+41 48
cfi=(28)
cfn=(76)
calls=8 -9
* 120
* 32
-28 88
-36 44
+61 52
-31 14
cfi=(20)
cfn=(48)
calls=2 +45
* 28
+1 6
+2 2
-2 2
+2 2
+3 33
-44 24
+69 2
+7 16
fl=(16)
fn=(36)
24 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 2
+1 2
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+2 2
+1 2
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+29 2
+1 2
+15 2
+1 2
fl=(15)
fn=(34)
29 3
+3 10
+13 58
-13 174
+2 120
+1 18
+5 2
-3 2
+3 2
+2 2
+7 1
fl=(50)
fn=(290)
326 4
-1 1
+3 2
cfi=(44)
cfn=(292)
calls=1 78
* 5
+1 1
+2 2
fn=(154)
187 27
+8 6
+3 9
+45 10
+6 4
-6 1
+6 2
+11 3
-2 3
fi=(51) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86/dl-procinfo.h
39 3
fe=(50)
258 6
fi=(51)
39 9
+3 9
cfi=(21)
cfn=(56)
calls=3 144
* 72
* 6
fe=(50)
264 12
cfi=(9)
cfn=(26)
calls=3 373
* 54
* 3
fi=(26) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/not-errno.h
28 6
fe=(50)
264 3
fi=(26)
28 6
fe=(50)
266 6
fi=(26)
32 9
fe=(50)
270 6
+15 3
-15 3
+15 440
cfn=(160) _dl_cache_libcmp
calls=28 141
* 2333
* 180
cfn=(160)
calls=3 141
* 227
* 21
-84 4
cfi=(36)
cfn=(156)
calls=1 44
* 107
+8 1
-8 1
+8 4
+1 7
+7 1
-3 1
+3 3
+3 1
+1 2
-1 1
+1 1
+1 8
+63 9
+16 6
+4 6
+8 9
cfi=(13)
cfn=(28)
calls=3 79
* 102
* 6
+1 3
-1 12
+1 6
cfi=(20)
cfn=(48)
calls=3 129
* 46
+1 6
cfi=(30)
cfn=(86)
calls=3 40
* 256
+1 24
-19 6
-27 12
+1 9
-1 21
+15 19
cfn=(160)
calls=1 141
* 144
* 47
fi=(51)
42 9
fe=(50)
297 3
fn=(160)
141 64
+1 72
+2 744
+20 364
+2 672
+4 154
+1 154
-29 308
+32 12
-28 8
+6 4
+2 4
-1 4
-1 8
+1 4
-1 4
+2 12
+2 12
-3 4
+3 4
+2 8
+9 84
fl=(33)
fn=(100)
30 1
+7 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 33
+3 2
+7 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+9 3
+12 1
+2 1
+1 1
+1 1
-4 11
+2 11
+1 11
+1 11
+2 12
+1 12
+1 12
+2 12
+1 12
+1 12
+2 12
+1 12
+1 12
+2 1
+1 1
+1 1
+2 1
+7 1
+4 1
fl=(28)
fn=(76)
109 95
+2 19
+1 19
+1 8
+1 8
+2 4
+1 4
+2 4
+55 4
+1 4
+10 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+2 97
+1 97
+1 97
+1 97
+1 97
+1 97
+1 97
+1 4
+15 11
+1 11
+1 11
+1 6
+1 6
+1 2
+1 2
+24 5
+1 5
+2 5
+3 4
+1 4
+2 4
+3 2
+1 2
+2 2
fl=(42)
fn=(132)
44 26
+3 13
-6 156
+6 13
+5 130
+2 91
-7 22
fl=(35)
fn=(110)
26 7
+9 7
+1 14
+1 7
+4 7
+1 7
+1 7
+1 7
+1 7
+2 14
+2 7
+1 7
+1 7
+2 14
+2 7
+4 7
+1 7
fl=(25)
fn=(68)
42 4
+1 1
-1 8
+1 4
-1 1
+1 1
cfi=(9)
cfn=(26)
calls=1 373
* 18
* 1
+3 3
-3 1
+12 6
+1 3
+1 1
-2 1
+2 1
-2 5
+1 3
+1 1
-2 1
+2 1
-2 5
+10 3
fi=(26)
-37 4
fe=(25)
131 4
-2 1
+17 6
+3 2
329 9
69 3
+77 1
+20 1
-19 1
+36 10
+1 3
-1 2
+1 3
fi=(27) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86/dl-hwcap.h
57 6
fe=(25)
186 1
+1 1
cfi=(13)
cfn=(28)
calls=1 79
* 16
+1 1
-1 1
+1 3
-5 1
+5 1
-5 1
+5 2
-5 5
+8 3
+2 1
+1 6
+4 1
+4 1
-3 1
-1 1
+4 2
+3 4
+4 3
+1 1
-1 5
+1 3
+2 3
+2 2
-1 1
+1 1
-1 1
+2 2
+7 2
+6 11
+1 4
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+1 1
-1 1
+1 3
+29 13
+3 4
+7 1
+10 12
-4 2
-3 1
+3 1
cfi=(20)
cfn=(74)
calls=1 116
* 16
* 2
-3 1
+3 1
cfi=(20)
cfn=(74)
calls=1 116
* 16
* 6
+3 7
+1 12
+1 4
cfi=(20)
cfn=(74)
calls=1 116
* 14
-2 1
+2 2
-2 1
+5 6
cfi=(20)
cfn=(74)
calls=2 116
* 28
+2 2
-2 4
+2 5
-7 3
+12 1
+1 2
-1 9
+1 14
-1 18
+5 10
+4 3
-4 12
+4 33
+1 12
-1 12
+1 24
-2 12
+1 24
-1 39
+4 6
+5 1
-2 1
+2 1
-1 1
-1 2
+2 1
-1 1
+1 4
+2 6
+1 2
+3 2
-6 5
+13 8
+1 1
-1 2
+3 2
-3 3
+1 3
-1 6
+3 6
+3 3
+2 2
-15 2
-6 3
-42 2
fl=(46)
fn=(142)
27 20
+1 5
fl=(47)
fn=(144)
27 7
+4 1
fl=(21)
fn=(56)
144 960
+1 960
+2 960
+1 960
+21 960
+1 960
+1 799
+1 799
+1 270
+1 270
+1 270
+1 270
+21 270
+1 270
+1 270
+1 270
+1 270
+1 270
+1 270
+5 29
+1 29
+9 29
+1 29
+1 29
+1 29
+1 29
+1 29
+1 29
+1 29
-7 690
+1 690
+1 690
+1 690
+1 690
+1 690
+1 690
+1 690
+1 630
+1 579
+1 579
+1 579
+2 579
+1 579
+1 579
+1 579
+1 579
+1 579
-5 51
+1 51
+1 51
+1 51
+1 51
+1 51
+10 89
+1 89
+1 89
+2 89
+6 89
+1 89
+1 89
+1 89
+1 89
+5 89
+2 64
+1 64
+1 128
+8 64
+1 64
+3 64
+1 64
+1 64
+1 64
+1 64
+1 64
+31 1
+1 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 2
+4 1
+1 1
+3 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
571 331
+1 331
+1 331
+1 331
+1 331
+2 331
+1 331
+1 331
+1 331
+1 331
+1 331
+1 331
+1 59
+4 59
+1 59
+1 59
+6 59
+1 59
+1 118
+4 59
+1 59
+3 59
+1 59
+1 59
+3 59
+1 59
+1 59
+6 59
+1 59
+1 59
+1 59
+1 59
+1 59
+72 6
+1 6
+1 6
+1 6
+1 6
+2 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 4
+4 4
+1 4
+1 4
+6 4
+1 4
+1 8
+4 4
+1 4
+3 4
+1 4
+1 4
+3 4
+1 4
+1 4
+6 4
+1 4
+1 4
+1 4
+1 4
+1 4
+72 1
+1 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+4 1
+1 1
+1 1
+6 1
+1 1
+1 2
+4 1
+1 1
+3 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
+72 5
+1 5
+1 5
+1 5
+1 5
+2 5
+1 5
+1 5
+1 5
+1 5
+1 5
+1 5
+1 3
+4 3
+1 3
+1 3
+6 3
+1 3
+1 6
+4 3
+1 3
+3 3
+1 3
+1 3
+3 3
+1 3
+1 3
+6 3
+1 3
+1 3
+1 3
+1 3
+1 3
+72 4
+1 4
+1 4
+1 4
+1 4
+2 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 1
+4 1
+1 1
+1 1
+6 1
+1 1
+1 2
+4 1
+1 1
+3 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
+72 32
+1 32
+1 32
+1 32
+1 32
+2 32
+1 32
+1 32
+1 32
+1 32
+1 32
+1 32
+1 29
+4 29
+1 29
+1 29
+6 29
+1 29
+1 58
+4 29
+1 29
+3 29
+1 29
+1 29
+3 29
+1 29
+1 29
+6 29
+1 29
+1 29
+1 29
+1 29
+1 29
+7 4
+1 4
+2 4
+1 4
+2 4
+1 4
+1 4
+3 4
+1 4
+1 4
+6 4
+1 4
+1 4
+1 4
+1 4
+1 4
+41 10
+1 10
+1 10
+1 10
+1 10
+2 10
+1 10
+1 10
+1 10
+1 10
+1 10
+1 10
+1 3
+4 3
+1 3
+1 3
+6 3
+1 3
+1 6
+4 3
+1 3
+3 3
+1 3
+1 3
+3 3
+1 3
+1 3
+6 3
+1 3
+1 3
+1 3
+1 3
+1 3
+72 7
+1 7
+1 7
+1 7
+1 7
+2 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 5
+4 5
+1 5
+1 5
+6 5
+1 5
+1 10
+4 5
+1 5
+3 5
+1 5
+1 5
+3 5
+1 5
+1 5
+6 5
+1 5
+1 5
+1 5
+1 5
+1 5
+72 53
+1 53
+1 53
+1 53
+1 53
+2 53
+1 53
+1 53
+1 53
+1 53
+1 53
+1 53
+1 51
+4 51
+1 51
+1 51
+6 51
+1 51
+1 102
+4 51
+1 51
+3 51
+1 51
+1 51
+3 51
+1 51
+1 51
+6 51
+1 51
+1 51
+1 51
+1 51
+1 51
+72 3
+1 3
+1 3
+1 3
+1 3
+2 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 2
+4 2
+1 2
+1 2
+6 2
+1 2
+1 4
+4 2
+1 2
+3 2
+1 2
+1 2
+3 2
+1 2
+1 2
+6 2
+1 2
+1 2
+1 2
+1 2
+1 2
+7 1
+1 1
+2 1
+1 1
+2 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
+41 11
+1 11
+1 11
+1 11
+1 11
+2 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 7
+4 7
+1 7
+1 7
+6 7
+1 7
+1 14
+4 7
+1 7
+3 7
+1 7
+1 7
+3 7
+1 7
+1 7
+6 7
+1 7
+1 7
+1 7
+1 7
+1 7
+72 150
+1 150
+1 150
+1 150
+1 150
+2 150
+1 150
+1 150
+1 150
+1 150
+1 150
+1 150
+1 3
+4 3
+1 3
+1 3
+6 3
+1 3
+1 6
+4 3
+1 3
+3 3
+1 3
+1 3
+3 3
+1 3
+1 3
+6 3
+1 3
+1 3
+1 3
+1 3
+1 3
+72 16
+1 16
+1 16
+1 16
+1 16
+2 16
+1 16
+1 16
+1 16
+1 16
+1 16
+1 16
+2 6
+4 6
+1 6
+1 6
+6 6
+1 6
+2 12
+4 6
+1 6
+3 6
+1 6
+1 6
+3 6
+1 6
+1 6
+6 6
+1 6
+1 6
+1 6
+1 6
+1 6
+74 239
+2 239
+1 239
+1 239
+1 239
-3 480
+1 480
+1 480
+1 480
+1 1737
+5 579
+6 579
+1 579
+8 579
+1 579
-16 381
+6 381
+1 381
+8 381
+1 381
fl=(29)
fn=(84)
24 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 8
+4 8
+1 8
+1 8
+1 8
+2 8
+4 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+52 4
+4 4
+1 4
+1 4
+1 4
+2 4
fl=(11)
fn=(62)
45 4
+2 3
+85 5
-45 3
cfi=(23)
cfn=(64)
calls=1 -9
* 5
* 1
+15 1
-15 1
+20 1
-1 1
+3 12
+4 3
-2 6
+2 10
+2 1
+1 2
-3 4
+7 3
-1 3
+4 3
-2 3
+2 10
+5 2
ob=(2)
fl=(18)
fn=(522) 0x0000000004e962c8
0 12
cob=(3)
cfi=(100)
cfn=(478)
calls=12 3086
0 735
fn=(742)
0 1
cob=(3)
cfi=(144) /build/glibc-OTsEL5/glibc-2.27/stdlib/cxa_finalize.c
cfn=(744) __cxa_finalize
calls=1 30
0 74
fn=(756)
0 3
fn=(800) 0x0000000005272980
0 1
cob=(3)
cfi=(144)
cfn=(744)
calls=1 30
0 74
fn=(810)
0 3
fn=(362)
0 6
fn=(486) 0x0000000004e962c0
0 9
cob=(3)
cfi=(100)
cfn=(386)
calls=9 3028
0 59175
fn=(88)
0 1
cob=(1)
cfi=(19)
cfn=(90)
calls=1 111
0 4
fn=(330)
0 6
fn=(782) 0x0000000004c3f880
0 1
cob=(3)
cfi=(144)
cfn=(744)
calls=1 30
0 74
fn=(792)
0 3
fn=(340)
0 6
fn=(764)
0 1
cob=(3)
cfi=(144)
cfn=(744)
calls=1 30
0 74
fn=(774)
0 3
fn=(298)
0 6
ob=(3)
fl=(93)
fn=(354)
137 8
+4 1
-4 2
+4 2
+98 1
-98 1
+98 1
+1 4
cfi=(94) /build/glibc-OTsEL5/glibc-2.27/stdlib/cxa_atexit.c
cfn=(356) __cxa_atexit
calls=1 65
* 65
+22 4
+3 2
+1 5
cob=(7)
cfi=(92)
cfn=(360)
calls=1 0
* 57
+4 4
+15 2
+12 2
cfi=(95) /build/glibc-OTsEL5/glibc-2.27/setjmp/../sysdeps/x86_64/bsd-_setjmp.S
cfn=(372) _setjmp
calls=1 30
* 29
+1 2
+5 2
+1 2
+3 2
+3 6
cob=(7)
cfi=(98)
cfn=(378)
calls=1 13
* 48779336746
fl=(72)
fn=(242)
40 1
-2 1
+2 2
-2 2
+11 1
fl=(70)
fn=(232)
30 5
fi=(148) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcspn.c
-1 1
fe=(70)
fn=(262)
30 5
fi=(149) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strspn.c
-1 1
fe=(70)
fn=(246)
30 5
fi=(150) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strpbrk.c
-1 1
fe=(70)
fl=(130) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
fn=(560) __memcpy_avx_unaligned_erms
217 3
+2 3
+1 3
+1 3
+1 3
+99 3
+1 3
+5 3
+1 3
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+15 2
+1 2
+58 2
+1 2
+1 2
+1 2
+1 2
+2 2
+3 2
+1 2
+1 2
+1 2
+2 2
+2 2
+2 2
+3 2
+1 2
+4 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+2 2
+1 2
+1 2
+1 2
+2 2
+1 2
+1 2
fn=(692) __mempcpy_avx_unaligned_erms
204 408
+1 408
+1 408
+13 408
+1 408
+44 408
+1 408
+2 408
+1 408
+1 408
+1 408
+1 408
+1 408
+1 405
+1 405
+1 405
+2 405
+36 3
+1 3
+1 3
+1 3
+1 3
fl=(57)
fn=(196)
33 12
+3 12
fi=(151) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncpy.c
-7 3
fe=(57)
fn=(266)
33 4
+3 4
fi=(152) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/stpcpy.c
-3 1
fe=(57)
fn=(280)
33 4
+3 4
fi=(153) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncat.c
-7 1
fe=(57)
fn=(264)
33 4
+3 4
fi=(154) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/stpncpy.c
-5 1
fe=(57)
fn=(238)
33 8
+3 8
fi=(155) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcpy.c
-7 2
fe=(57)
fn=(202)
33 4
+3 4
fi=(156) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcat.c
-7 1
fe=(57)
fl=(95)
fn=(372)
30 1
+2 1
cfi=(96) /build/glibc-OTsEL5/glibc-2.27/setjmp/../sysdeps/x86_64/setjmp.S
cfn=(374) __sigsetjmp
calls=1 -6
* 27
fl=(103) /build/glibc-OTsEL5/glibc-2.27/elf/dl-addr.c
fn=(392) _dl_addr
126 9
+2 1
-2 1
+5 1
-5 1
+5 2
cob=(1)
cfi=(2)
cfn=(52)
calls=1 784
* 2
+2 2
cob=(1)
cfi=(104)
cfn=(400)
calls=1 -62
* 1384
* 5
+2 3
30 1
+1 1
-1 1
+1 1
+3 2
+5 1
+6 1
-7 1
+2 3
+2 3
+3 1
+5 7
-6 2
+6 4043
+2 1010
+1 2020
-1 1
+1 2
+2 3664
+9 2052
+7 28
-2 28
+2 2353
-2 2297
+2 6003
-10 11625
+2 9300
+1 14806
+36 2
+1 1
+1 3
+3 2
+36 2
cob=(1)
cfi=(2)
cfn=(54)
calls=1 790
* 2
+3 9
-27 1
+1 1
+20 2
fl=(123) /build/glibc-OTsEL5/glibc-2.27/libio/filedoalloc.c
fn=(512) _IO_file_doallocate
78 40
+6 20
fi=(127) /build/glibc-OTsEL5/glibc-2.27/libio/libioP.h
870 15
+2 10
+1 10
fe=(123)
84 15
cfi=(118) /build/glibc-OTsEL5/glibc-2.27/libio/fileops.c
cfn=(514) _IO_file_stat
calls=5 1169
* 70
* 10
+2 20
+11 20
+4 10
cob=(2)
cfi=(18)
cfn=(486)
calls=5 0
* 58845
* 5
+2 5
-1 10
+2 20
cfi=(117) /build/glibc-OTsEL5/glibc-2.27/libio/genops.c
cfn=(518) _IO_setb
calls=5 347
* 90
+1 5
+1 40
-15 1
fi=(157) /build/glibc-OTsEL5/glibc-2.27/libio/../misc/sys/sysmacros.h
-12 6
fe=(123)
+12 1
-2 2
+5 2
fl=(114)
fn=(470)
144 46812757
+1 46812757
+2 46812757
+1 46812757
+21 46812757
+1 46812757
+1 46034016
+1 46034016
+1 45151258
+1 45151258
+1 45151258
+1 45151258
+21 45151258
+1 45151258
+1 45151258
+1 45151258
+1 45151258
+1 45151258
+1 45151258
+5 3
+1 3
+9 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
-7 1661499
+1 1661499
+1 1661499
+1 1661499
+1 1661499
+1 1661499
+1 1661499
+1 1661499
+1 1388326
+1 790919
+1 790919
+1 790919
+2 790919
+1 790919
+1 790919
+1 790919
+1 790919
+1 790919
-5 597407
+1 597407
+1 597407
+1 597407
+1 597407
+1 597407
+10 273176
+1 273176
+1 273176
+2 273176
+6 273176
+1 273176
+1 273176
+1 273176
+1 273176
+5 273176
+2 193
+1 193
+1 386
+8 193
+1 193
+3 193
+1 193
+1 193
+1 193
+1 193
+1 193
571 25194
+1 25194
+1 25194
+1 25194
+1 25194
+2 25194
+1 25194
+1 25194
+1 25194
+1 25194
+1 25194
+1 25194
+1 70
+4 70
+1 70
+1 70
+6 70
+1 70
+1 140
+4 70
+1 70
+3 70
+1 70
+1 70
+7 70
+4 70
+1 70
+1 70
+1 70
+1 70
+1 70
1196 300825
+1 300825
+1 300825
+1 300825
+1 300825
+2 300825
+1 300825
+1 300825
+1 300825
+1 300825
+1 300825
+1 300825
+1 906
+4 906
+1 906
+1 906
+6 906
+1 906
+1 1812
+4 906
+1 906
+3 891
+1 891
+1 891
+7 891
+4 891
+1 891
+1 891
+1 891
+1 891
+1 891
+44 15
+1 15
+1 15
+1 15
+13 15
+1 15
+1 15
+1 15
+9 67471
+1 67471
+1 67471
+1 67471
+1 67471
+2 67471
+1 67471
+1 67471
+1 67471
+1 67471
+1 67471
+1 67471
1446 66313
+1 66313
+1 66313
+1 66313
+1 66313
+2 66313
+1 66313
+1 66313
+1 66313
+1 66313
+1 66313
+1 66313
+1 27
+4 27
+1 27
+1 27
+6 27
+1 27
+1 54
+4 27
+1 27
+3 27
+1 27
+1 27
+7 27
+4 27
+1 27
+1 27
+1 27
+1 27
+1 27
+72 642672
+1 642672
+1 642672
+1 642672
+1 642672
+2 642672
+1 642672
+1 642672
+1 642672
+1 642672
+1 642672
+1 642672
+1 83
+4 83
+1 83
+1 83
+6 83
+1 83
+1 166
+4 83
+1 83
+3 83
+1 83
+1 83
+7 83
+4 83
+1 83
+1 83
+1 83
+1 83
+1 83
+72 133360
+1 133360
+1 133360
+1 133360
+1 133360
+2 133360
+1 133360
+1 133360
+1 133360
+1 133360
+1 133360
+1 133360
1821 86798
+1 86798
+1 86798
+1 86798
+1 86798
+2 86798
+1 86798
+1 86798
+1 86798
+1 86798
+1 86798
+1 86798
1946 451
+1 451
+1 451
+1 451
+1 451
+2 451
+1 451
+1 451
+1 451
+1 451
+1 451
+1 451
2071 65242
+1 65242
+1 65242
+1 65242
+1 65242
+2 65242
+1 65242
+1 65242
+1 65242
+1 65242
+1 65242
+1 65242
2193 15
+1 15
+1 15
+1 30
+4 15
+2 15
+1 15
+1 15
+1 15
-5 1264
+2 1264
+1 1264
+1 1264
+1 1264
-3 1660223
+1 1660223
+1 1660223
+1 1660223
+1 2372757
+5 790919
+6 790919
+1 790919
+8 790919
+1 790919
-16 46021838
+6 46021838
+1 46021838
+8 46021838
+1 46021838
fl=(117)
fn=(494) _IO_link_in
87 48
+1 24
+4 4
-2 12
+2 8
+1 44
+2 4
-1 4
-1 4
+2 4
-2 4
+2 52
+2 4
-2 4
+5 4
-2 4
-1 4
+3 56
+2 4
-1 4
+1 32
+1 8
+3 56
-14 16
fn=(552) __underflow
288 12
-1 12
+6 15
+3 6
+2 6
+6 6
+7 3
fi=(127)
870 9
+2 6
+1 6
fe=(117)
311 3
+1 3
-1 3
+1 6
-1 3
cfi=(118)
cfn=(554) _IO_file_underflow@@GLIBC_2.2.5
calls=3 478
* 273
-2 9
fn=(556) _IO_switch_to_get_mode
164 12
+1 9
+3 9
+5 3
-1 6
+1 3
+7 3
-4 3
+2 6
+2 3
+1 3
+1 12
fn=(546) _IO_sgetn
427 3
fi=(127)
870 6
fe=(117)
427 3
+2 3
fi=(127)
870 3
+2 6
+1 6
fe=(117)
429 3
+1 6
-1 3
cfi=(118)
cfn=(548) _IO_file_xsgetn
calls=3 1295
* 942
fn=(586) _IO_default_finish
628 12
+2 3
-2 9
+2 6
+6 9
+3 9
54 6
651 21
fn=(488) _IO_no_init
590 36
+1 4
cfn=(490) _IO_old_init
calls=4 -30
* 108
+2 4
-1 4
+1 4
+2 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+2 4
+6 4
+1 24
fn=(510) _IO_doallocbuf
362 10
-1 15
+3 20
+4 20
-3 5
fi=(127)
870 15
+2 10
+1 10
fe=(117)
365 10
cfi=(123)
cfn=(512)
calls=5 78
* 59272
* 10
fn=(814) _IO_flush_all_lockp
749 11
+5 4
+1 11
+3 1
-8 1
+5 1
+3 1
-3 1
+3 1
fi=(127)
870 2
fe=(117)
762 1
fi=(127)
870 2
fe=(117)
769 1
fi=(127)
872 2
+1 2
fe=(117)
769 3
cfi=(118)
cfn=(682) _IO_file_overflow@@GLIBC_2.2.5
calls=1 -22
* 130
+1 3
+2 8
-14 4
+16 4
-16 8
+3 4
-1 4
+1 4
+3 28
+14 9
+1 3
+4 12
-29 4
fn=(518)
347 24
+1 38
+3 8
+2 32
-3 8
+3 16
+3 33
-7 3
cob=(2)
cfi=(18)
cfn=(522)
calls=3 0
* 360
* 15
fn=(812) _IO_cleanup
918 2
+3 1
-3 8
+3 1
cfn=(814)
calls=1 749
* 270
-72 1
+72 1
-72 2
+1 11
+3 1
-3 1
+3 1
-3 1
+3 1
fi=(127)
+17 2
fe=(117)
-7 1
fi=(127)
+7 2
fe=(117)
+23 4
-40 12
+2 12
+2 9
+6 24
+8 4
+9 2
fi=(127)
-8 4
+1 4
fe=(117)
+7 8
cfi=(118)
cfn=(820) _IO_file_setbuf@@GLIBC_2.2.5
calls=2 389
* 166
+2 6
+4 10
+1 17
+10 9
+1 2
+35 12
-62 6
+2 4
+2 2
+1 2
-1 2
+2 6
-28 4
+14 8
fn=(576) _IO_unsave_markers
1019 6
+19 9
189 3
fn=(822) _IO_default_setbuf
479 4
fi=(127)
870 2
fe=(117)
479 6
fi=(127)
870 2
fe=(117)
479 6
+1 2
fi=(127)
870 2
+2 4
+1 4
fe=(117)
480 4
cfi=(118)
cfn=(824) _IO_file_sync@@GLIBC_2.2.5
calls=2 807
* 34
* 6
+2 4
+7 2
-7 2
+10 4
+2 2
-2 2
+1 6
+2 12
-11 2
348 2
485 2
-1 2
+1 2
348 6
+7 2
-5 2
+1 2
+4 4
fn=(520) _IO_free_backup_area
187 6
+1 6
-1 6
+1 6
+2 12
cob=(2)
cfi=(18)
cfn=(522)
calls=6 0
* 174
+1 6
+1 6
+1 6
+1 12
fn=(686) _IO_default_xsputn
392 4
-3 10
fi=(127)
870 2
fe=(117)
389 2
fi=(127)
870 2
fe=(117)
389 10
fi=(127)
870 4
fe=(117)
407 2
+8 1
+2 7
fi=(127)
872 2
+1 2
fe=(117)
417 4
cfi=(118)
cfn=(682)
calls=1 747
* 33
* 2
+2 2
-22 12
+2 3
+3 2
+20 2
-29 2
+29 14
-15 1
+5 3
-1 2
+2 4
fn=(698) __overflow
217 6
+2 9
+2 3
fi=(127)
870 9
+2 6
+1 6
fe=(117)
221 3
+1 6
-1 3
cfi=(118)
cfn=(682)
calls=3 747
* 438
fn=(490)
561 4
-2 4
+1 4
-1 4
+2 8
+16 4
-14 4
+1 4
+13 4
+5 4
-17 4
+1 4
+1 4
+1 4
+14 4
-13 4
+1 4
+1 4
+2 4
+1 4
+1 4
+1 4
+6 4
+1 8
+2 4
fn=(572) _IO_un_link
53 36
+1 12
+4 12
+1 30
+2 3
-2 3
+1 3
+1 3
-2 3
+2 3
-2 3
+2 45
+2 3
-2 3
+2 6
+2 6
+9 3
+2 3
-2 3
+2 24
+2 3
-1 3
+1 24
+1 6
+3 42
-6 21
-18 12
+8 9
fl=(94)
fn=(356)
65 7
-26 2
+26 1
-26 5
+1 2
cfn=(358) __new_exitfn
calls=1 +44
* 29
+2 2
+7 2
+3 1
-1 1
+2 1
+1 1
+1 4
+1 1
+11 6
fn=(358)
84 2
-6 2
+1 2
-1 1
+11 5
+2 3
-2 1
+10 2
-10 2
+45 1
+1 1
+4 4
-19 1
+1 2
fl=(96)
fn=(374)
26 1
+9 1
+1 2
+1 1
+4 1
+1 1
+1 1
+1 1
+1 1
+2 2
+2 1
+1 1
+1 1
+2 2
+2 1
+8 1
cfi=(97) /build/glibc-OTsEL5/glibc-2.27/setjmp/sigjmp.c
cfn=(376) __sigjmp_save
calls=1 -34
* 8
fl=(68)
fn=(224)
38 12
+3 12
+6 3
fl=(102) /build/glibc-OTsEL5/glibc-2.27/malloc/arena.c
fn=(390) ptmalloc_init.part.0
289 2
+5 1
-5 3
+13 2
+6 1
fi=(100)
1816 2
fe=(102)
308 12
fi=(100)
1816 13
+1 1
-1 3
+1 11
-1 390
+1 30
-1 90
+1 331
fe=(102)
313 1
fi=(100)
1825 1
fe=(102)
313 4
fi=(100)
1817 7
+11 1
-11 4
+9 1
fe=(102)
313 1
fi=(100)
1828 1
fe=(102)
313 1
cob=(1)
cfi=(104)
cfn=(400)
calls=1 71
* 1287
* 5
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +59
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +58
* 19
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +57
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +56
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +55
* 19
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +54
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +53
* 18
* 1
+2 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +51
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +50
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +49
* 18
* 1
+71 2
+1 2
+4 2
-1 1
+1 4
-97 5
cfi=(103)
cfn=(392)
calls=1 126
* 60693
* 2
+1 4
fl=(113)
fn=(450)
32 9865
+2 9865
+2 9865
+2 9865
+1 9865
+1 9865
+1 9865
+2 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+1 357
+2 357
+1 357
+2 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+1 28
+2 28
+1 28
+2 25
+1 25
+4 25
+1 25
+1 25
+4 25
+2 25
+1 25
+1 25
+1 25
+1 25
+1 25
+1 25
+1 25
+4 25
+1 25
+3 25
+1 25
+2 7
+1 7
+2 7
+1 7
+1 7
+1 7
+3 7
+1 7
+1 7
+1 7
+1 7
+5 7
+1 7
+1 7
+1 7
+4 7
+2 7
+1 7
+1 3
+1 3
+1 1
+1 1
+12 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 2
323 2
+1 2
+2 2
+1 2
+1 2
+2 2
+1 2
440 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
1848 2
+1 2
+2 2
+1 2
+1 2
+2 2
+1 2
1965 2
+1 2
+2 2
+1 2
+1 2
+2 2
+1 2
+2 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+2 1
+1 1
2111 2
+1 2
+4 2
+3 2
+1 2
+1 2
+6 2
+21 4
+1 4
+1 4
+1 4
+4 4
+3 4
+1 4
+1 4
+6 4
+6 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+2 9
+1 9
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 6
+1 6
+1 6
+1 6
+1 5
+1 5
+1 5
+1 5
+1 5
+1 5
+1 5
+1 5
+1 3
+1 3
+1 3
+1 3
+7 2
+1 2
+1 1
+1 1
+1 1
+1 1
+26 18
+1 36
+4 9
+1 9
+1 9
+2 9
+1 9
-5 5
+1 5
+1 5
+2 5
+1 5
+1 13
+1 13
+1 11
+1 6
+1 6
+1 6
+1 1
+1 1
+1 1
+1 1
+2 5
+1 5
+1 5
+1 2
+1 2
+1 1
+1 1
+2 5
+1 5
+1 4
+1 2
+2 3
+1 3
+1 2
+6 2829
+1 2829
+4 2829
+3 2829
+1 2829
+1 2829
+6 2829
+4 299
+1 299
+4 299
+3 299
+1 299
+1 299
+6 299
+4 1500
+1 1500
+1 1500
+1 1500
+4 1500
+3 1500
+1 1500
+1 1500
+6 1500
+4 653
+1 653
+4 653
+3 653
+1 653
+1 653
+6 653
+4 387
+1 387
+1 387
+1 387
+4 387
+3 387
+1 387
+1 387
+6 387
+4 322
+1 322
+1 322
+1 322
+4 322
+3 322
+1 322
+1 322
+6 322
+4 3373
+1 3373
+1 3373
+1 3373
+4 3373
+3 3373
+1 3373
+1 3373
+6 3373
+4 91
+1 91
+1 91
+1 91
+4 91
+3 91
+1 91
+1 91
+6 91
+4 86
+1 86
+1 86
+1 86
+4 86
+3 86
+1 86
+1 86
+6 86
+4 51
+1 51
+1 51
+1 51
+4 51
+3 51
+1 51
+1 51
+6 51
+4 59
+1 59
+1 59
+1 59
+4 59
+3 59
+1 59
+1 59
+6 59
+4 42
+1 42
+1 42
+1 42
+4 42
+3 42
+1 42
+1 42
+6 42
+4 3
+1 3
+1 3
+1 3
+4 3
+3 3
+1 3
+1 3
+6 3
+4 1
+1 1
+1 1
+1 1
+4 1
+3 1
+1 1
+1 1
+6 1
2777 329
+1 329
+1 240
+1 240
+1 240
+1 240
+1 157
+1 157
+1 157
+1 157
+1 106
+1 106
+1 106
+1 106
+1 47
+1 47
+1 47
+1 47
+1 6
+1 6
+1 6
+1 6
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+6 3
+2 3
+4 9508
+1 9508
+1 6680
+1 6680
+1 6680
+1 6680
+1 6381
+1 6381
+1 6381
+1 6381
+1 4884
+1 4884
+1 4884
+1 4884
+1 4232
+1 4232
+1 4232
+1 4232
+1 3846
+1 3846
+1 3846
+1 3846
+1 3528
+1 3528
+1 3528
+1 3528
+1 160
+1 160
+1 160
+1 160
+6 160
+2 160
+63 2
+1 2
+1 2
+1 2
+1 2
+5 1
+1 1
+1 1
+1 1
+1 1
+1 1
3037 2
+1 2
+1 2
+1 2
+1 2
+1 2
+4 2
+1 2
+1 2
+1 2
+1 2
+1 2
fl=(145) /build/glibc-OTsEL5/glibc-2.27/nptl/unregister-atfork.c
fn=(746) __unregister_atfork
28 16
+8 4
-8 12
+11 8
+82 24
fl=(139) /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/mmap64.c
fn=(714) mmap
44 32
+3 16
-6 192
+6 16
+5 160
+2 112
-7 32
fl=(101) /build/glibc-OTsEL5/glibc-2.27/malloc/hooks.c
fn=(388) malloc_hook_ini
29 5
fi=(102)
291 1
fe=(101)
30 1
fi=(102)
291 1
fe=(101)
30 1
fi=(102)
291 1
fi=(100)
3039 7
+3 1
-2 2
+2 3
+13 4
+2 3
cfn=(418) _int_malloc
calls=1 3521
* 158
+1 1
-1 1
+1 6
-19 4
-56 5
cfn=(416) tcache_init.part.4
calls=1 +3
* 496
+62 3
fe=(101)
33 6
cfi=(102)
cfn=(390)
calls=1 289
* 63153
* 1
fi=(100)
3034 2
fe=(101)
fl=(108) /build/glibc-OTsEL5/glibc-2.27/misc/sbrk.c
fn=(424) sbrk
32 73
+8 73
-8 219
+8 435
+1 2
cfi=(109) /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/brk.c
cfn=(426) brk
calls=1 -10
* 12
* 3
+3 146
+4 432
+5 16
+7 85
-4 144
cfi=(109)
cfn=(426)
calls=72 -25
* 912
* 144
+4 280
fl=(126) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/read.c
fn=(530) read
27 72
+1 9
fl=(109)
fn=(426)
31 584
+8 73
-6 146
+7 57
-5 32
+1 16
+4 16
fl=(112)
fn=(444)
52 5625
+1 5625
+1 5625
+3 5625
+1 5625
+1 5625
+3 1669
+1 1669
+1 1669
+8 1669
+4 2
+1 2
+1 2
+9 2
+4 3956
+1 3956
+1 3956
+1 3956
+2 3956
+1 3956
+1 3956
+1 774
+6 774
+1 774
+1 774
+4 774
+1 774
+16 3182
+10 3182
+1 3182
+1 3182
+1 3182
-3 2
+1 2
+1 2
+1 2
332 4851
+1 4851
+1 4851
+4 4851
+1 4851
fl=(140)
fn=(722)
31 2005
+1 401
-1 401
+1 401
-1 401
+4 802
+2 7218
+1 2006
+1 1
fi=(127)
870 3
+2 2
+1 2
fe=(140)
39 400
fi=(127)
870 1200
+2 800
+1 800
fe=(140)
39 1604
cfi=(118)
cfn=(680) _IO_file_xsputn@@GLIBC_2.2.5
calls=401 1220
* 82648
* 1203
fi=(127)
796 802
+1 1604
fe=(140)
38 800
fi=(127)
797 2005
fe=(140)
45 802
+1 401
+3 3609
fl=(138) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/write.c
fn=(704) write
27 32
+1 4
fl=(134)
fn=(672)
28 33
+4 3
+1 6
-1 15
+1 9
cfi=(135) /build/glibc-OTsEL5/glibc-2.27/stdio-common/vfprintf.c
cfn=(674) vfprintf
calls=3 1244
* 3607
+4 15
fl=(79)
fn=(284)
44 6
fl=(132) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/close.c
fn=(580) __close_nocancel
37 12
+1 3
fl=(146) /build/glibc-OTsEL5/glibc-2.27/posix/../sysdeps/unix/sysv/linux/_exit.c
fn=(826) _Exit
27 2
+4 1
+2 2
fl=(60)
fn=(252)
32 1
-2 1
+2 2
-2 3
fi=(158) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memrchr.c
-1 1
fe=(60)
fn=(230)
32 2
-2 2
+2 4
-2 6
fi=(159) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strnlen.c
+1 2
fe=(60)
fn=(258)
32 1
-2 1
+2 2
-2 3
fi=(160) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memchr.c
-1 1
fe=(60)
fn=(204)
32 2
-2 2
+2 4
-2 6
fi=(161) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strrchr.c
-2 2
fe=(60)
fn=(212)
32 1
-2 1
+2 2
-2 3
fi=(162) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/rawmemchr.c
+1 1
fe=(60)
fn=(268)
32 1
-2 1
+2 2
-2 3
fi=(163) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strchrnul.c
+1 1
fe=(60)
fn=(250)
32 3
-2 3
+2 6
-2 9
fi=(164) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strlen.c
-1 3
fe=(60)
fl=(131)
fn=(570)
34 9
+14 3
-14 3
+14 6
fi=(127)
796 6
+1 9
fe=(131)
57 3
fi=(127)
870 9
+2 6
+1 6
fe=(131)
57 9
cfi=(118)
cfn=(584) _IO_file_finish@@GLIBC_2.2.5
calls=3 169
* 111
+1 9
+13 6
+3 18
+3 6
cob=(2)
cfi=(18)
cfn=(522)
calls=3 -77
* 213
+4 15
-32 3
cfi=(117)
cfn=(572)
calls=3 +4
* 282
+2 57
+1 6
+1 6
cfi=(118)
cfn=(574) _IO_file_close_it@@GLIBC_2.2.5
calls=3 +76
* 693
* 12
fi=(127)
797 18
fe=(131)
fl=(63) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/dl-vdso.c
fn=(210) _dl_vdso_vsym
25 30
+1 12
+4 12
+18 36
-21 6
+20 6
fl=(136) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strchr-avx2.S
fn=(678) __strchrnul_avx2
45 6
+2 6
+1 6
+1 6
+2 6
+1 6
+1 6
+4 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
184 6
+2 6
+7 6
+1 6
fl=(82)
fn=(308)
52 8
+3 3
+14 1
fi=(83) /build/glibc-OTsEL5/glibc-2.27/csu/../sysdeps/generic/dl-hash.h
-25 1
fe=(82)
+23 1
+1 1
fi=(83)
-23 1
fe=(82)
+24 1
fi=(84) /build/glibc-OTsEL5/glibc-2.27/csu/../sysdeps/unix/sysv/linux/x86_64/init-first.c
-33 4
fi=(83)
+7 1
+5 3
+14 4
-17 3
+3 9
+14 12
-17 9
+22 1
fi=(84)
-31 2
+2 2
-2 1
+2 2
cfi=(63)
cfn=(210)
calls=1 -13
* 17
+2 1
+4 1
-4 1
+4 1
-4 1
+1 2
+1 1
+2 1
cfi=(63)
cfn=(210)
calls=1 -19
* 17
fe=(82)
+37 3
fi=(84)
-36 2
+1 1
fe=(82)
+35 1
cfi=(85) /build/glibc-OTsEL5/glibc-2.27/misc/init-misc.c
cfn=(314) __init_misc
calls=1 -50
* 76
+3 1
cfi=(87) /build/glibc-OTsEL5/glibc-2.27/ctype/ctype-info.c
cfn=(320) __ctype_init
calls=1 -53
* 16
+5 6
-27 1
-7 1
+7 4
fl=(100)
fn=(712) systrim.isra.1.constprop.11
2760 10
+11 6
+2 2
+1 4
-4 2
+8 6
+2 6
+44 2
-49 2
+49 10
fn=(716) _int_free
4139 160
+10 48
+6 64
+1 48
+4 64
+9 80
-2 32
+3 32
4390 176
4184 32
+75 32
+6 80
+7 16
-4 16
+4 32
+3 32
+5 48
+3 32
+1 32
+1 32
1894 48
4291 32
+7 32
+5 48
+4 32
+9 16
-1 16
+2 48
+4 16
-2 16
+1 16
+1 16
+2 16
+1 16
+2 16
+1 16
+2 48
+1 16
+30 32
+20 32
fn=(416)
2986 1
-9 1
+9 9
+1 3
cfn=(418)
calls=1 3521
* 389
+1 1
-1 1
+1 1
+8 4
+7 2
+2 1
+1 2
-1 1
+1 78
+3 2
fn=(420) sysmalloc
2274 576
+20 72
+11 72
-11 72
+11 72
+1 288
fi=(102)
535 72
fe=(100)
2321 144
fi=(102)
535 72
fe=(100)
2321 144
+66 72
+1 216
+10 72
-9 72
+9 571
+6 288
+3 216
2724 144
+1 72
+5 144
+3 144
+5 72
-3 72
+3 72
-2 72
+2 216
+1 72
-1 72
-1 72
+4 72
-3 144
+1 72
+2 72
+6 648
2460 216
+19 144
-11 72
+11 72
-11 72
+11 30
+8 15
-8 15
+8 15
+2 288
cfi=(107) /build/glibc-OTsEL5/glibc-2.27/malloc/morecore.c
cfn=(422) __default_morecore
calls=72 46
* 3462
* 72
+1 72
+3 216
+3 224
+1 112
+46 144
+2 144
+6 72
-6 72
+6 210
+1 275
-83 57
+10 114
+8 57
-8 57
+8 57
+26 8
+7 3
-7 45
+7 93
+34 36
+34 2
+6 3
+22 2
+1 5
+2 1
-2 1
+2 1
+1 4
cfi=(107)
cfn=(422)
calls=1 46
* 25
+12 3
+45 16
-96 16
+99 16
+1 16
-2 16
+1 32
+12 16
-12 16
+1 16
+11 16
-12 1
+1 1
-2 1
+1 2
+12 1
-12 1
+1 1
+11 1
+7 32
+1 32
+14 16
-14 16
+8 16
+2 16
+4 16
+2 64
cfn=(716)
calls=16 4139
* 1616
* 16
2512 63
+32 2
2651 32
+19 32
2522 112
cfi=(139)
cfn=(714)
calls=16 44
* 560
+2 16
-2 16
+2 32
+12 16
+5 83
+99 2
+1 4
292 32
fn=(650) malloc_consolidate
4403 466
+19 466
-19 466
+30 466
-30 932
+29 466
-29 466
+32 466
-15 466
+15 932
+1 932
-1 8388
+1 8388
+3 283284
+1 377712
+8 94428
-3 94428
+3 94428
+1 94428
+1 283284
+2 188856
+1 53376
+2 53376
-1 53376
+2 820243
+3 188856
+1 94428
+2 188856
+1 9650
+1 115800
+4 94428
+4 94428
-3 94428
+1 94428
+2 94428
+1 5897
+1 5897
+3 5897
+1 5897
+1 5897
-2 11794
+3 5897
+9 17691
-12 88531
+1 88531
+1 88531
-2 177062
+3 88531
+9 266413
+3 18640
+1 2796
-27 254334
-2 743
-8 55
fn=(386)
3028 663720
+5 442480
+1 442480
+5 1548673
+3 221239
-2 663717
+2 663717
+3 442478
+10 456432
+2 342324
cfn=(418)
calls=114108 3521
* 29691562
+1 114108
-1 114108
+1 684648
-19 884956
+8 220245
+1 660735
2941 214262
+2 214262
+1 107131
3081 1106195
-46 1
+46 3
-46 1
cfi=(101)
cfn=(388)
calls=1 29
* 63866
fn=(418)
3521 684660
+32 114110
-32 114110
+32 1026990
+4 684660
+24 228220
+2 268476
+3 89492
+2 178984
+2 4725
-6 9450
+6 14175
+1 4725
+5 14175
+1 9450
+7 18900
-1 9450
+1 9450
+5 14175
+1 18334
+2 111832
+1 27958
2929 55916
+1 27958
-2 55916
+2 55916
-2 27958
+4 83874
3609 83874
+1 72817
1887 355
3682 355
1887 12743
3682 12033
1887 24066
4131 1026990
3639 50232
+62 37788
+1 2988
+20 101722
-1 203444
+1 101722
-1 101722
+1 203444
-2 508605
+6 305163
+66 101721
-40 203442
3879 101721
3731 101721
+1 101721
+20 203442
+40 203442
-60 203442
-12 1
+6 3
+66 1
-40 2
3879 1
3731 1
+1 1
+20 2
+40 2
-60 265002
+3 465570
+1 310380
+3 155190
+10 155190
-15 155190
+15 309468
+34 133952
-5 133952
+1 133952
+4 133952
+29 193890
+8 5881
+1 2847
+1 949
-1 949
+4 949
-3 949
+3 949
-4 852
+1 284
-1 284
+4 284
-3 284
+3 284
+5 1612
-2 403
+3 806
+6 64
+1 64
-1 64
+1 64
+1 192
+29 128
+9 64
-9 256
+10 64
-9 64
+1 64
+1 64
+1 64
+6 64
-10 193762
+9 96881
-9 387524
+10 96881
-9 96881
+1 96881
+1 96881
+1 96881
+6 96881
+1 708
+8 194952
3642 325167
+2 108389
-2 108389
+2 216778
+2 7663
+1 15326
+6 7663
-4 7663
+1 7663
+1 7663
+2 15326
+7 30652
-1 15326
+1 22989
+5 147123
+3 69422
-2 78386
3814 191424
+1 382848
+1 191424
3703 930
cfn=(650)
calls=465 4403
* 4715239
* 2014985
-62 1309438
3786 37007
-1 37007
+1 74014
+5 111021
+1 148024
1887 4356
3887 289773
+17 108820
+2 3980
+3 995
-3 995
+3 1990
+1 2
+67 108818
+1 108818
+1 108818
+1 108818
+1 108818
+5 277280
+14 337066
+2 98701
+2 197402
3820 1508
2929 71110
3751 63838
-1 127676
+1 126868
+4 21238
+1 21238
-1 21238
+2 42476
+3 21238
-2 21238
+1 42476
+1 21238
+2 6665
+1 6665
+3 39990
+6 6665
-6 19995
+2 19995
1887 6665
3769 6665
1887 13330
3766 87438
+6 14573
-6 43719
+2 43719
1887 14573
3769 14573
1887 29146
3720 2
3865 3320
-45 444
2930 35555
+2 35555
-2 71110
+1 35555
3796 35555
2932 35555
3795 35555
+1 35555
+47 1695
+1 740
+2 31
+1 93
3670 34711
+1 34711
+1 69422
+1 34711
2929 34711
3674 34711
+1 34711
2929 34711
+1 34711
-2 34711
+2 34711
-2 34711
3670 34711
2932 69422
3893 158064
2941 73866
-1 73866
+2 49244
+1 49244
+1 24622
3895 24622
+95 12396
+3 12508
-3 4395
+3 5824
-3 1264
+3 1845
+97 1544
+3 1544
-2 3088
+2 3160
+17 216
4008 69832
+3 139664
+2 16967
+1 16967
+1 16967
-2 67868
-27 17306
3850 339
+7 91
-1 182
+1 91
+1 91
+1 182
+2 678
-8 496
3993 2486
+2 9944
+1 4972
-1 408
+1 204
+24 158595
+3 105730
+5 52865
-3 105730
+3 637689
+3 105730
+3 9657
-1 9657
+1 19314
1887 54338
4103 54338
1887 108676
3993 204
4125 216
cfn=(420)
calls=72 2274
* 14938
+1 72
-1 72
+1 72
1887 216
4046 43208
-5 43208
+6 86416
+8 43208
-6 43208
+1 43208
+1 43208
+1 43208
+3 43208
+1 43202
+1 86416
+2 884
+1 884
+2 7956
+2 2652
+1 1768
-3 380916
+2 126972
+1 84648
+30 1472
+3 2944
-3 1472
+1 1472
+2 4416
+2 1472
-2 2944
-1 1472
+1 2944
+2 2944
3913 1
+1 6
+6 2
+6 1
-1 2
+1 17
+3 2
+13 1
+1 2
-5 1
+11 1
-4 1
+1 1
+1 1
+1 1
+1 1
+5 9
+2 3
+1 2
+71 9691
3926 11
fn=(478)
3086 2422640
+5 440480
+1 440480
+6 440480
+5 220234
-2 220234
+2 440468
+18 660702
+2 660702
4149 440468
+6 880936
+1 440468
+4 880936
+9 660702
-2 440468
+3 440468
+1 880904
+13 373338
+11 508488
+2 381366
1894 381366
4218 127122
+7 127122
-6 254244
+6 254244
-2 127122
+2 254244
+4 254244
+2 127122
+1 254244
3125 2422640
4259 119094
+3 59547
+1 59547
-1 178641
+10 59547
-4 59547
+4 119094
+3 119094
+5 178641
+3 119094
+1 119094
+1 119094
1894 178641
4291 119094
+1 450
+2 450
-1 450
+2 6795
+3 119094
+5 178551
+1 19739
+1 1375
+11 1375
-1 1375
+2 2750
-1 58142
-1 58142
+2 116284
+4 59517
-2 59517
+1 59517
+1 59517
+2 231
+1 231
+2 231
+1 231
+2 693
+1 231
+30 462
-34 59286
+1 59286
+2 177858
+1 59286
+30 118632
+20 119094
2929 100695
+3 33565
-2 67130
+1 33565
+1 67130
4277 50085
-2 33390
+32 174426
+34 30
+1 90
+1 60
+18 6
+1 2
cfn=(650)
calls=1 +41
* 8044
+2 6
+2 10
+2 4
cfn=(712)
calls=2 2760
* 50
* 2
-73 77
+9 594
fl=(122) /build/glibc-OTsEL5/glibc-2.27/libio/ioseekoff.c
fn=(506) _IO_seekoff_unlocked
34 18
-1 36
+10 36
+1 6
+15 9
fi=(165) /build/glibc-OTsEL5/glibc-2.27/libio/../libio/libioP.h
870 27
+2 18
+1 18
fe=(122)
59 9
+1 9
-1 9
+1 18
-1 9
cfi=(118)
cfn=(508) _IO_file_seekoff@@GLIBC_2.2.5
calls=9 923
* 2255
fl=(77)
fn=(274)
42 4
fi=(62) /build/glibc-OTsEL5/glibc-2.27/time/../sysdeps/generic/dl-hash.h
+2 2
+1 2
fe=(77)
-3 6
fi=(62)
+1 2
+5 6
+14 8
-17 6
+3 18
+14 24
-17 18
+22 2
fe=(77)
-25 12
cfi=(63)
cfn=(210)
calls=2 -17
* 34
* 10
fl=(87)
fn=(320)
31 5
+2 1
+2 1
-4 1
+4 1
-4 1
+2 3
+2 2
+1 1
fl=(142) /build/glibc-OTsEL5/glibc-2.27/stdlib/cxa_thread_atexit_impl.c
fn=(732) __call_tls_dtors
145 3
+1 4
+18 4
fl=(118)
fn=(528) _IO_file_read
1153 18
+3 27
cfi=(126)
cfn=(530)
calls=9 27
* 81
fn=(492) _IO_new_file_init_internal
107 8
+4 4
-4 8
+5 4
-1 4
+3 4
cfi=(117)
cfn=(494)
calls=4 -27
* 344
+1 4
+1 16
fn=(508)
923 99
+8 18
+6 45
+3 6
+25 18
+23 3
fi=(127)
870 9
+2 6
+1 6
fe=(118)
988 9
cfn=(514)
calls=3 1169
* 42
* 6
+89 99
937 12
+3 12
+12 12
+3 9
+5 6
cfi=(117)
cfn=(510)
calls=3 362
* 1046
+1 3
+4 3
-4 9
+1 9
+3 3
+26 3
+7 6
cfi=(117)
cfn=(520)
calls=3 187
* 120
* 6
cfi=(117)
cfn=(520)
calls=3 187
* 120
+5 30
+1 6
+3 9
-1 3
+2 24
+12 12
+4 12
+1 6
-1 12
+2 6
-2 6
+1 6
+1 12
+5 6
fi=(127)
872 12
+1 12
fe=(118)
1031 18
cfn=(524) _IO_file_seek
calls=6 1163
* 42
+1 6
-1 6
+1 6
+2 12
+4 3
fi=(127)
872 6
+1 6
fe=(118)
1038 24
cfn=(528)
calls=3 1153
* 42
+3 6
869 6
+2 6
+2 6
+5 6
+11 6
+13 6
+10 6
+76 12
+2 6
888 9
+19 3
1049 3
+4 3
-1 3
-3 15
+2 9
+3 6
-5 3
+4 3
-1 3
-3 15
+2 9
+3 6
fi=(127)
876 9
fe=(118)
fn=(548)
1295 30
+7 6
+11 6
+2 6
+1 3
-1 3
+1 6
fi=(127)
870 12
fe=(118)
1332 12
+9 18
+1 24
+18 3
-8 9
+1 9
+7 3
+1 18
+3 3
fi=(127)
872 9
+1 6
fe=(118)
1364 9
cfn=(528)
calls=3 1153
* 42
+1 6
+12 3
-2 3
+1 3
+1 6
+1 6
-65 12
+2 18
+1 12
+8 12
+59 27
-39 6
cfi=(117)
cfn=(552)
calls=3 288
* 381
* 6
-26 9
cfi=(130)
cfn=(560)
calls=3 217
* 186
* 3
+1 6
fn=(554)
478 9
+6 9
-14 15
+17 18
+13 6
+20 6
cfi=(117)
cfn=(556)
calls=3 164
* 72
+11 3
-5 3
fi=(127)
872 3
fe=(118)
526 6
fi=(127)
872 3
fe=(118)
527 3
+2 3
fi=(127)
873 3
fe=(118)
528 6
fi=(127)
873 3
fe=(118)
531 12
cfn=(528)
calls=3 1153
* 42
+2 6
+16 3
-9 3
+9 6
+1 6
+1 3
+1 6
-1 3
+1 12
fn=(824)
807 8
+5 8
+2 2
+1 4
+15 4
+4 8
fn=(524)
1163 12
cfi=(125) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/lseek64.c
cfn=(526) lseek
calls=6 35
* 30
fn=(496) _IO_file_fopen@@GLIBC_2.2.5
214 40
+9 8
+2 18
364 40
234 1
-2 1
+1 1
+15 52
+33 3
-96 3
+1 6
-1 3
+96 1
-96 1
+1 2
-1 1
+4 4
cfi=(119) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/open64.c
cfn=(498) open
calls=4 36
* 114
* 4
+1 8
+3 4
-1 4
+1 8
+3 8
-3 4
+3 4
+10 8
cfi=(117)
cfn=(494)
calls=4 87
* 64
+81 12
cfi=(120) /build/glibc-OTsEL5/glibc-2.27/string/../string/strstr.c
cfn=(500) __GI_strstr
calls=4 53
* 100
+1 4
-1 4
+1 4
-40 11
-19 3
-1 3
-13 6
+73 8
fn=(574)
129 9
+2 9
+4 3
+3 6
-3 3
-1 6
+6 3
+3 3
-3 3
cfi=(117)
cfn=(576)
calls=3 1019
* 18
+3 9
fi=(127)
870 9
+2 6
+1 6
fe=(118)
143 6
cfn=(578) _IO_file_close
calls=3 1190
* 21
* 3
+3 9
+8 15
cfi=(117)
cfn=(518)
calls=3 347
* 447
+1 6
+3 3
-3 3
+1 9
+2 3
cfi=(117)
cfn=(572)
calls=3 53
* 45
+5 3
-4 3
+1 3
+1 3
+2 3
+1 15
fn=(682)
747 21
+7 7
-8 42
+8 22
+35 12
+3 8
+3 12
+1 12
+1 20
+5 16
-45 4
+12 4
+9 8
+8 2
-4 2
+3 4
-2 4
-3 2
+1 4
+5 2
-1 2
+1 6
+3 1
-2 1
+2 1
+1 3
+1 3
+11 9
-12 3
cfn=(684) _IO_do_write@@GLIBC_2.2.5
calls=3 433
* 116
+9 6
-1 3
+1 3
-1 3
cfn=(684)
calls=3 433
* 318
* 6
-39 4
cfi=(117)
cfn=(510)
calls=2 362
* 58351
+1 12
fn=(820)
389 4
+1 2
cfi=(117)
cfn=(822)
calls=2 +89
* 136
* 4
+4 4
-1 4
+2 6
+2 2
+1 4
fn=(514)
1169 8
+1 24
cfi=(124) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/fxstat.c
cfn=(516) _fxstat
calls=8 34
* 80
fn=(584)
169 12
+1 6
+7 3
-1 6
+1 6
-1 3
cfi=(117)
cfn=(586)
calls=3 628
* 75
fn=(680)
1220 1640
+7 410
-7 1230
+6 2050
+7 2050
+17 1206
+1 400
+3 1616
+4 408
+2 1224
-1 408
+1 408
-2 408
cfi=(130)
cfn=(692)
calls=408 204
* 6939
* 408
* 408
+4 816
+18 816
+10 3690
-40 2
+16 2
fi=(127)
870 6
+2 4
+1 4
fe=(118)
1266 6
cfn=(682)
calls=2 747
* 58458
* 4
+6 4
+1 14
+2 4
+11 6
+1 8
cfi=(117)
cfn=(686)
calls=2 392
* 134
* 6
-52 16
+1 16
+3 24
+2 42
-2 36
fn=(684)
433 18
+1 2
-3 64
+11 8
+7 16
fi=(127)
873 8
fe=(118)
457 16
cfn=(702) _IO_file_write@@GLIBC_2.2.5
calls=4 1196
* 180
* 4
+1 20
+6 4
-4 4
+4 4
-4 12
+1 8
+3 5
-2 1
-29 4
+1 8
+28 3
-29 12
+1 24
+29 9
fn=(702)
1196 24
+2 24
+5 4
cfi=(138)
cfn=(704)
calls=4 27
* 36
+1 8
+5 4
+1 4
-12 8
+5 20
+10 12
+3 36
fn=(578)
1190 6
cfi=(132)
cfn=(580)
calls=3 37
* 15
fl=(120)
fn=(500)
53 28
+10 16
+26 36
-23 20
fl=(119)
fn=(498)
36 4
+3 4
-3 12
+3 4
-3 4
+3 16
+8 40
+2 20
-7 2
+1 1
-1 3
+5 4
fl=(107)
fn=(422)
46 73
+1 73
cfi=(108)
cfn=(424)
calls=73 -15
* 2976
+2 219
+3 146
fl=(135)
fn=(674)
1244 42
+31 9
+8 10
+4 15
+11 12
+11 3
fi=(166) /build/glibc-OTsEL5/glibc-2.27/stdio-common/printf-parse.h
108 6
fe=(135)
1309 9
fi=(166)
108 3
cfi=(136)
cfn=(678)
calls=3 -63
* 54
* 3
fe=(135)
1324 3
fi=(166)
108 3
fe=(135)
1324 18
+1 39
+3 3
fi=(167) /build/glibc-OTsEL5/glibc-2.27/stdio-common/../libio/libioP.h
870 9
+2 3
-2 3
+2 3
-2 3
+3 6
fe=(135)
1328 18
cfi=(118)
cfn=(680)
calls=3 1220
* 2218
* 6
1696 15
+1 9
+3 36
1283 4
+45 6
+4 9
+4 24
-57 3
+34 3
-8 3
-59 6
1378 45
-3 3
-5 3
-4 3
-1 3
-1 3
-1 3
-1 3
-1 3
-1 3
+15 3
-16 3
-1 3
-1 3
+14 3
-4 3
+8 3
-1 6
1696 18
-36 3
+2 6
+8 3
fi=(166)
108 12
cfi=(136)
cfn=(678)
calls=3 -63
* 54
* 3
fe=(135)
1674 3
fi=(166)
108 3
fe=(135)
1674 9
fi=(167)
872 9
+1 6
fe=(135)
1674 21
cfi=(118)
cfn=(680)
calls=3 1220
* 216
* 21
+2 3
-2 3
+2 9
-33 75
1324 12
1643 9
fi=(167)
872 9
+1 6
fe=(135)
1643 21
cfi=(118)
cfn=(680)
calls=3 1220
* 249
* 51
cfi=(112)
cfn=(444)
calls=3 52
* 49
* 3
* 3
fl=(58)
fn=(198)
32 5
fi=(59) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcasecmp.c
-1 1
fe=(58)
fn=(270)
32 5
fi=(76) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncase_l.c
-1 1
fe=(58)
fn=(234)
32 5
fi=(71) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncase.c
-1 1
fe=(58)
fn=(254)
32 5
fi=(75) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcasecmp_l.c
-1 1
fe=(58)
fl=(124)
fn=(516)
34 8
-1 8
+1 8
+1 48
+4 8
fl=(78)
fn=(282)
44 5
+4 2
-1 2
+12 2
+2 5
fl=(73)
fn=(244)
32 4
-2 2
+2 4
-2 4
+5 2
-1 8
fi=(168) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wmemset.c
-3 2
fe=(73)
fl=(64)
fn=(214)
32 2
-2 2
+2 4
-2 6
fi=(169) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wmemchr.c
+1 2
fe=(64)
fn=(260)
32 1
-2 1
+2 2
-2 3
fi=(170) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wcslen.c
-1 1
fe=(64)
fn=(228)
32 2
-2 2
+2 4
-2 6
fi=(171) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wcschr.c
+1 2
fe=(64)
fl=(67)
fn=(222)
38 8
+1 6
+9 2
fl=(74)
fn=(248)
40 4
-2 2
+2 4
-2 4
+11 2
fl=(141)
fn=(730) __run_exit_handlers
40 9
+5 1
-5 1
+5 2
+11 14
+3 2
+2 5
+16 2
+35 6
+2 2
-44 6
+2 1
+1 1
-1 1
+4 4
+1 6
+29 1
-3 1
+5 1
-2 2
+2 2
cob=(1)
cfi=(143)
cfn=(734)
calls=1 -78
* 1434
+1 1
+11 1
+1 1
-1 1
+1 1
+5 4
-73 1
+12 1
+1 4
+63 2
+1 11
cfi=(117)
cfn=(812)
calls=1 918
* 646
* 3
+2 2
cfi=(146)
cfn=(826)
calls=1 27
* 5
-86 1
cfi=(142)
cfn=(732)
calls=1 +99
* 11
* 1
fn=(728)
139 1
-1 1
+1 3
cfn=(730)
calls=1 -99
* 2201
fl=(69)
fn=(226)
42 10
+4 4
-1 8
+12 4
+2 10
fl=(144)
fn=(744)
30 8
+3 4
-3 20
+3 4
-3 4
+3 20
+3 12
+4 28
-4 12
+58 20
+4 24
-4 12
+12 8
+1 8
cfi=(145)
cfn=(746)
calls=4 -79
* 64
+2 16
+1 32
fl=(88)
fn=(322)
488 7
+14 6
758 2
+2 1
+1 1
+2 1
-3 1
+5 1
-5 1
+4 3
+4 2
+3 2
+2 1
+1 1
+2 1
-3 1
+5 1
-5 1
+4 3
+9 1
+2 8
-2 1
+3 8
500 1
+4 1
-4 1
+4 1
cfn=(324) handle_intel.constprop.1
calls=1 259
* 469
+2 1
-2 1
+2 1
cfn=(324)
calls=1 259
* 515
+5 1
-5 1
+5 1
cfn=(324)
calls=1 259
* 542
+8 1
-8 1
+8 1
+11 1
-20 1
+25 3
+4 2
+8 6
+3 2
+9 6
+14 2
+4 1
+3 1
+1 1
-4 1
+3 1
-3 1
+3 1
+6 8
-39 3
+3 9
+6 6
-6 3
+6 2
+3 20
+5 2
+4 1
+1 1
-1 3
691 4
+1 5
+4 2
+59 2
592 2
+8 1
+2 1
-2 6
+2 4
-2 1
+4 1
+23 2
-25 2
+2 6
+2 6
+3 2
+1 8
+2 4
+3 2
+5 1
+2 2
+1 1
-1 1
+2 1
-2 1
+1 2
+27 2
+1 1
+1 2
+2 1
-1 1
+1 1
-24 3
+4 2
+3 1
+2 4
+1 1
+5 2
fn=(326) intel_check_word.isra.0
132 12
+6 6
-10 18
+10 6
-10 6
+10 6
-10 6
+10 12
-10 6
+10 6
+2 6
-2 6
+2 18
250 12
140 24
+2 15
+2 30
+8 30
+51 24
+22 12
fi=(89) /build/glibc-OTsEL5/glibc-2.27/string/../bits/stdlib-bsearch.h
28 12
-1 24
+4 24
+1 12
fe=(88)
+87 24
fi=(89)
-88 138
+1 69
fe=(88)
+87 138
+3 81
fi=(89)
-93 252
+8 15
-8 36
fe=(88)
134 3
255 36
-91 9
+3 9
-6 13
+3 4
+9 4
+5 14
+1 10
+17 5
-32 15
+3 15
+4 14
+2 28
+2 14
+2 8
+4 3
+2 6
+2 3
+2 3
-2 3
+2 6
-2 3
+3 9
-2 12
+2 6
-24 2
+7 2
+2 4
fn=(324)
259 21
+2 3
-2 9
+5 9
+8 3
+1 3
-3 3
+5 12
+6 6
+5 3
-5 9
+5 3
+2 3
+1 3
-1 3
+5 18
cfn=(326)
calls=3 132
* 1035
+2 6
+3 21
cfn=(326)
calls=3 132
* 314
+2 6
+19 33
fl=(121)
fn=(504)
32 6
+3 6
-3 12
+3 84
+1 24
cfi=(122)
cfn=(506)
calls=6 -2
* 2288
* 24
fi=(127)
796 12
+1 48
fe=(121)
39 18
fl=(137)
fn=(696)
25 3
+2 3
-2 3
+2 51
+1 12
fi=(127)
796 6
+1 24
fe=(137)
31 9
-3 3
cfi=(117)
cfn=(698)
calls=3 217
* 489
* 6
fl=(128)
fn=(538)
34 3
+3 3
-3 3
+3 42
+1 15
cfi=(122)
cfn=(506)
calls=3 -4
* 189
* 3
+1 15
+18 9
fi=(127)
796 6
+1 24
fe=(128)
45 6
fl=(129)
fn=(544)
31 12
+1 6
-1 3
+4 6
+2 24
+1 9
cfi=(117)
cfn=(546)
calls=3 427
* 984
fi=(127)
796 3
fe=(129)
38 3
fi=(127)
796 3
+1 24
fe=(129)
40 6
-3 39
+4 3
-1 3
+1 18
fl=(61)
fn=(206)
43 4
fi=(62)
+1 2
+1 2
fe=(61)
-2 8
fi=(62)
+5 6
+14 8
-17 6
+3 18
+14 24
-17 18
+22 2
fe=(61)
-24 12
cfi=(63)
cfn=(210)
calls=2 -18
* 34
* 10
fl=(65)
fn=(218)
33 5
-1 2
+2 2
+1 3
fi=(66) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memcmp.c
-6 1
fe=(65)
fl=(86) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strrchr-avx2.S
fn=(318) __strrchr_avx2
43 1
+1 1
+2 1
+1 1
+3 1
+1 1
+1 1
+33 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+3 1
+1 1
+9 1
+1 1
+3 1
+1 2
+4 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+32 1
+1 1
+2 1
+1 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+5 1
+1 1
+1 1
+15 1
+1 1
+1 1
+1 1
+1 1
+2 1
fl=(56)
fn=(240)
44 10
+4 4
-1 4
+12 4
+2 10
fn=(194)
44 10
+4 4
-1 4
+12 4
+2 10
fn=(216)
44 5
+4 2
-1 2
+12 2
+2 5
fl=(116)
fn=(484)
88 20
-23 4
+23 8
-23 4
cob=(2)
cfi=(18)
cfn=(486)
calls=4 -65
* 339
+2 12
+3 4
+2 16
-2 4
+2 12
cfi=(117)
cfn=(488)
calls=4 590
* 240
+1 4
+1 4
-1 4
+1 4
cfi=(118)
cfn=(492)
calls=4 +33
* 396
+4 20
cfi=(118)
cfn=(496)
calls=4 214
* 570
* 8
-41 8
+53 28
fl=(97)
fn=(376)
29 1
-1 2
+1 2
+5 3
fl=(125)
fn=(526)
35 24
+2 6
fl=(85)
fn=(314)
31 2
-1 3
+1 4
+2 3
cfi=(86)
cfn=(318)
calls=1 +10
* 51
* 1
+4 5
+1 3
+2 4
ob=(5)
fl=(90)
fn=(334)
0 17
fn=(794)
0 8
cob=(2)
cfi=(18)
cfn=(800)
calls=1 0
0 75
0 1
cfn=(804) 0x000000000000ca20
calls=1 0
0 8
0 3
fn=(804)
0 8
ob=(6)
fl=(91)
fn=(776)
0 8
cob=(2)
cfi=(18)
cfn=(782)
calls=1 0
0 75
0 1
cfn=(786) 0x00000000000138c0
calls=1 0
0 8
0 3
fn=(786)
0 8
fn=(344)
0 17
totals: 48779787292
| 101,810 | Common Lisp | .l | 11,877 | 7.485897 | 103 | 0.671808 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | cf583a872743e2735a2c7f3b7d7f272bdfb0075dfb2107c484217237985dced8 | 16,274 | [
-1
] |
16,275 | Makefile | davidsun0_lateral/interpreter/old/Makefile | CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -pedantic -ggdb
LDFLAGS = -lreadline
source = $(wildcard *.c)
objects = $(source:.c=.o)
all: lateral
.PHONY: clean
clean:
rm lateral *.o
lateral: $(objects)
$(CC) $(CFLAGS) -o lateral $^ $(LDFLAGS)
| 245 | Common Lisp | .l | 11 | 20.727273 | 47 | 0.682609 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 0e7b270e4ce06dd6ee67bc67f8309148cd1aaa88ac84c6786d30ad11fb0505bc | 16,275 | [
-1
] |
16,276 | lateral.c | davidsun0_lateral/interpreter/old/lateral.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <readline/readline.h>
#include <readline/history.h>
#include "object.h"
#include "garbage.h"
#include "env.h"
#include "reader.h"
#include "eval.h"
#include "lang.h"
static void lat_repl() {
while(1) {
char* input_str = readline("user> ");
if(input_str == NULL){
break;
} else if(strcmp(input_str, "") == 0) {
continue;
}
// READ
struct Object* input = read_string(input_str);
free(input_str);
// error parsing; read again
if(input == NULL || input->type == error_type) {
continue;
}
// EVALUATE
struct Object* output = lat_evaluate(user_env, input);
// PRINT
printf("=> ");
object_print_string(output);
printf("\n");
}
}
static void initialize_readline(){
// turn off tab completion
rl_bind_key('\t', rl_insert);
}
int main(){
initialize_readline();
gc_init();
env_init();
lat_repl();
printf("\ngoodbye! ('u' )/\n");
}
| 1,097 | Common Lisp | .l | 45 | 18.733333 | 62 | 0.5628 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 839a4cd86d04d1b9e860a157fce681133b85f0b171ac307e66b3b19699a22911 | 16,276 | [
-1
] |
16,277 | eval.c | davidsun0_lateral/interpreter/old/eval.c | #include <stdlib.h>
#include <stdio.h>
#include "lang.h"
#include "list.h"
#include "env.h"
#include "error.h"
#include "eval.h"
struct StackFrame* stack;
struct Envir* curr_env;
/**
* Pushes an S expression to the stack and sets the evaluation mode.
* A new stack frame is allocated and must be deallocated with stack_pop.
*
* @param ast the abstract syntax tree to be evaluated
* @param exe_mode how the ast will be evaluated (i.e. apply, eval)
*/
static void stack_push(struct Object* ast, int exe_mode) {
struct StackFrame* new_frame = malloc(sizeof(struct StackFrame));
new_frame->prev = stack;
new_frame->fn = NULL;
new_frame->expr = ast;
new_frame->working = NULL;
new_frame->ret = NULL;
new_frame->exe_mode = exe_mode;
// for debugging
new_frame->eval_index = -1;
stack = new_frame;
}
/**
* Pops the current stack frame and passes on the current return value.
* Frees the stack frame.
*/
static void stack_pop() {
if(stack == NULL) {
printf("error: attempting to pop null stack\n");
return;
}
if(stack->prev != NULL) {
stack->prev->ret = stack->ret;
}
struct StackFrame* old_frame = stack;
stack = stack->prev;
free(old_frame);
}
/**
* Destroys the entire program stack.
* Used only for debugging.
* Causes undefined behavior.
*/
static void stack_destroy() {
while(stack->prev != NULL) {
stack_pop();
}
stack->expr = NULL;
}
/**
* Prints debug information for all stack frames and all pointers on the stack.
*/
void stack_print() {
struct StackFrame* frame = stack;
printf("=== STACK ===\n");
while(frame != NULL) {
printf("=== STACK FRAME ===\n");
printf("exe: %d\n", frame->exe_mode);
printf("fn: ");
object_print_string(frame->fn);
printf("\nexpr: ");
object_print_string(frame->expr);
printf("\nret: ");
object_print_string(frame->ret);
printf("\nnext frame: %p\n\n", (void*) frame->prev);
frame = frame->prev;
}
printf("=== END STACK ===\n\n\n");
}
/**
* Non destructively creates an enironment and pushes it to the enivronment
* list. Does not perform any error checking.
*
* @param syms list of symbols to bind
* @param vals list of matching values for the symbols
*/
static void envir_push_bindings(struct List* syms, struct List* vals) {
int size = list_bare_length(syms);
struct Envir* local = envir_init(size * 2);
local->outer = curr_env;
curr_env->inner = local;
for(int i = 0; i < size; i ++) {
envir_set(local, syms->obj->data.ptr, vals->obj);
syms = syms->next;
vals = vals->next;
}
curr_env = local;
}
/**
* Non destructively creates an environment and pushes it to the environment
* list. Does not perform any error checking.
*
* @param binds list of alternating symbols and values to insert into the new
* enrironment
*/
static void envir_push_binding_list(struct List* binds) {
int size = list_bare_length(binds) / 2;
struct Envir* local = envir_init(size * 2);
local->outer = curr_env;
curr_env->inner = local;
for(int i = 0; i < size; i ++) {
envir_set(local, binds->obj->data.ptr, binds->next->obj);
binds = binds->next->next;
}
curr_env = local;
}
/**
* Sets the current environment to curr_env->outer and frees the old
* environment.
*/
static void envir_pop() {
struct Envir* old = curr_env;
curr_env = old->outer;
curr_env->inner = NULL;
envir_free(old);
}
/**
* Evaluates special forms on the stack.
*
* @return 0 if the stack's current expression is not a special form or if an
* error occurs. 1 if otherwise, skipping the effects of apply()
*/
static int special_form() {
// printf("evaluating special form\n");
struct List* expr = stack->expr->data.ptr;
struct Object* form = expr->obj;
expr = expr->next;
// or, and
// fn, macro
// def
// if, cond
// let
// do, loop / recur
// quasiquote
if (object_equals_symbol(form, "def")) {
// push object to environment
// TODO: error checking on args
if(stack->ret == NULL) {
stack_push(expr->next->obj, apply_exe);
} else {
struct Object* sym = expr->obj;
struct Object* val = stack->ret;
envir_set(curr_env, sym->data.ptr, val);
stack_pop();
}
} else if(object_equals_symbol(form, "do")) {
if(list_bare_length(expr) == stack->eval_index && stack->ret != NULL) {
stack_pop();
} else {
if(stack->eval_index < 0) {
stack->eval_index = 0;
}
stack->eval_index ++;
stack_push(list_get(stack->expr, stack->eval_index), apply_exe);
}
} else if(object_equals_symbol(form, "fn") ||
object_equals_symbol(form, "macro")) {
// create a fn/macro object with the given args / ast
struct Object* output;
if(object_equals_symbol(form, "fn")) {
output = object_init_type(func_type);
} else {
output = object_init_type(macro_type);
}
stack->ret = output;
struct Func* fn = malloc(sizeof(struct Func));
output->data.ptr = fn;
// TODO: error checking on args
fn->args = object_copy(expr->obj);
fn->expr = object_copy(expr->next->obj);
stack_pop();
} else if(object_equals_symbol(form, "if")) {
if(stack->ret == NULL) {
stack_push(expr->obj, apply_exe);
} else {
// TODO: error checking on args
if(stack->ret != nil_obj) {
stack->expr = expr->next->obj;
} else {
stack->expr = expr->next->next->obj;
}
stack->exe_mode = apply_exe;
stack->ret = NULL;
}
} else if(object_equals_symbol(form, "let")) {
// TODO: evaluate values, insert bindings one at a time
// push bindings
// evaludate body
if(stack->ret == NULL) {
// error checking
if(expr->obj->type != list_type) {
printf("let expects a list of bindings\n");
stack->ret = error_init_bare();
return 0;
} else if(list_length(expr->obj) % 2 != 0) {
printf("let expects an even number of bindings\n");
stack->ret = error_init_bare();
return 0;
} else if(expr->next->next != NULL) {
printf("let expects only one body expression\n");
stack->ret = error_init_bare();
return 0;
}
// TODO: check that bindings are symbols
envir_push_binding_list(expr->obj->data.ptr);
// object_debug(expr->next->obj);
stack_push(expr->next->obj, apply_exe);
} else {
// pop bindings
envir_pop();
stack_pop();
}
} else if(object_equals_symbol(form, "loop")) {
// store loop body on stack
} else if(object_equals_symbol(form, "quasiquote")) {
} else if(object_equals_symbol(form, "recur")) {
// scan stack until loop or result frame
// rebind and execute loop body
} else {
return 0;
}
return 1;
}
static void eval() {
if(stack->working == NULL) {
if(list_is_empty(stack->expr->data.ptr)) {
// empty list evaluates to nil
stack->ret = nil_obj;
stack_pop();
// pop underlying apply stack frame
stack_pop();
} else {
// create a evaluated version of stack->expr
stack->working = list_init();
stack->eval_index = 1;
// push first item in the list
struct Object* obj = list_get(stack->expr, 0);
stack_push(obj, apply_exe);
}
} else {
if(stack->eval_index == 1) {
stack->fn = stack->ret;
}
if(stack->fn != NULL && stack->fn->type == macro_type) {
struct List* syms = ((struct Func*) stack->ret->data.ptr)->args->data.ptr;
struct List* vals = ((struct List*) stack->expr->data.ptr)->next;
envir_push_bindings(syms, vals);
stack->exe_mode = macro_exe;
stack_push(((struct Func*) stack->fn->data.ptr)->expr, eval_exe);
return;
}
// append ret onto working
list_append_object(stack->working, stack->ret);
// push next object onto stack
struct Object* obj = list_get(stack->expr, stack->eval_index);
stack->eval_index ++;
// if end of list, pop result
if(obj == NULL) {
stack->ret = stack->working;
stack_pop();
} else {
stack_push(obj, apply_exe);
}
}
}
static void apply() {
if(special_form()) {
return;
}
if(stack->ret == NULL) {
stack_push(stack->expr, eval_exe);
} else {
if(stack->ret->type != list_type) {
printf("warning: apply expected list type, but got ");
object_print_type(stack->ret->type);
printf("\n");
stack_pop();
return;
}
struct List* args = (struct List*) stack->ret->data.ptr;
struct Object* func = args->obj;
if(func->type == c_fn) {
stack->ret = func->data.fn_ptr(args->next);
stack_pop();
} else if(func->type == func_type) {
if(stack->working == NULL) {
// TODO: check number of arguments
// check for &rest and construct list
struct List* syms = ((struct Func*) func->data.ptr)->args->data.ptr;
struct List* vals = args->next;
envir_push_bindings(syms, vals);
stack_push(((struct Func*) func->data.ptr)->expr, eval_exe);
} else {
stack->ret = stack->working;
envir_pop();
stack_pop();
}
} else {
printf("error: symbol ");
object_print_string(func);
printf(" is not a function\n");
stack->ret = error_init(type_err, "symbol is not a function");
}
}
}
struct Object* lat_evaluate(struct Envir* envir, struct Object* ast) {
curr_env = envir;
// stack frame to collect the result
stack_push(NULL, result_exe);
// stack frame with starting expression
stack_push(ast, apply_exe);
while(!(stack->exe_mode == result_exe && stack->ret != NULL)) {
if(stack->expr->type == symbol) {
if(stack->ret != NULL) {
printf("warning: stack result is non null while evaluating sym\n");
}
stack->ret = envir_search(curr_env, stack->expr->data.ptr);
if(stack->ret == NULL) {
stack->ret = error_init(name_err, "symbol not found in environment");
}
stack_pop();
} else if(stack->expr->type != list_type) {
if(stack->ret != NULL) {
printf("warning: stack result is non null while evaluating obj\n");
}
stack->ret = stack->expr;
stack_pop();
} else {
if(stack->exe_mode == eval_exe) {
eval();
} else if(stack->exe_mode == apply_exe) {
apply();
} else if(stack->exe_mode == macro_exe) {
// macro execution begins in eval
// pop macro's temporary environment
envir_pop();
// pop eval turned macro stack frame
stack_pop();
// pop underlying apply stack frame
stack_pop();
} else {
printf("fatal: unknown execution mode %d\n", stack->exe_mode);
stack_print();
stack_destroy();
break;
}
}
}
struct Object* output = stack->ret;
stack_pop();
return output;
}
| 12,177 | Common Lisp | .l | 358 | 25.659218 | 86 | 0.547136 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 48f480582f0c1524d93f65e534da9a2ddcc8988d0fe2dc26cf62e372a3c08e28 | 16,277 | [
-1
] |
16,278 | eval_old | davidsun0_lateral/interpreter/old/eval_old | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "object.h"
#include "list.h"
#include "hash.h"
#include "env.h"
#include "lang.h"
#include "garbage.h"
#include "eval.h"
struct Object* eval_quasi(struct Object* tree) {
if(tree->type == list_type &&
((struct List*)tree->data.ptr)->obj != NULL) {
// tree: ((atom ...) ...)
struct List* args = tree->data.ptr;
if(object_equals_symbol(args->obj, "quasiquote")) {
return eval_quasi(args->next->obj);
} else if(object_equals_symbol(args->obj, "unquote")) {
return args->next->obj;
} else if(args->obj->type == list_type &&
object_equals_symbol(
((struct List* )args->obj->data.ptr)->obj,
"unquote-splicing")) {
struct Object* output = list_init();
struct Object* concat = object_symbol_init("concat");
list_append_object(output, concat);
struct Object* head = eval_quasi(
((struct List*) args->obj->data.ptr)->next->obj);
list_append_object(output, head);
args = args->next;
struct Object* list = list_init();
struct Object* list_tok = object_symbol_init("list");
list_append_object(list, list_tok);
while(args != NULL) {
struct Object* result = eval_quasi(args->obj);
list_append_object(output, result);
// list_append_object(list, args->obj);
args = args->next;
}
// list = eval_quasi(list);
list_append_object(output, list);
return output;
} else {
struct Object* output = list_init();
struct Object* cons = object_symbol_init("cons");
list_append_object(output, cons);
struct Object* head = eval_quasi(args->obj);
list_append_object(output, head);
args = args->next;
struct Object* list = list_init();
struct Object* list_tok = object_symbol_init("list");
list_append_object(list, list_tok);
while(args != NULL) {
struct Object* result = eval_quasi(args->obj);
list_append_object(list, result);
// list_append_object(list, args->obj);
args = args->next;
}
// list = eval_quasi(list);
list_append_object(output, list);
return output;
}
} else {
// atom
struct Object* output = list_init();
struct Object* quote = object_symbol_init("quote");
list_append_object(output, quote);
list_append_object(output, tree);
return output;
}
}
void eval_quasi2(struct Object* input, struct Object* output) {
// case: atom
// append (quote atom)
if(!object_is_nonempty_list(input)) {
struct Object* list = list_init();
struct Object* quote = object_symbol_init("quote");
list_append_object(list, quote);
list_append_object(list, input);
list_append_object(output, list);
return;
}
struct List* args = (struct List*) input->data.ptr;
// case: (unquote ?)
// append ?
if(object_equals_symbol(args->obj, "unquote")) {
if(args->next == NULL || args->next->next != NULL) {
printf("error: unquote expects one argument\n");
return;
}
list_append_object(output, args->next->obj);
}
// case: (splice ?)
// append contents of ?
else if (object_equals_symbol(args->obj, "unquote-splicing")) {
if(args->next == NULL || args->next->next != NULL) {
printf("error: unquote-splicing expects on argument\n");
return;
}
struct List* contents = (struct List*)args->next->obj->data.ptr;
while(contents != NULL) {
list_append_object(output, contents->obj);
contents = contents->next;
}
return;
}
// case: (? ? ?)
// append (map eval_quasi (? ? ?)) I think
else {
struct Object* list = list_init();
struct Object* list_tok = object_symbol_init("list");
list_append_object(list, list_tok);
// struct List* contents = (struct List*) args->obj->data.ptr;
struct List* contents = args;
while(contents != NULL) {
struct Object* obj = contents->obj;
eval_quasi2(obj, list);
contents = contents->next;
}
list_append_object(output, list);
return;
}
}
int eval_is_macro(struct Envir* env, struct Object* obj) {
if(obj != NULL && obj->type == list_type) {
struct List* list = obj->data.ptr;
if(list->obj->type == symbol) {
struct Object* head = envir_search(env, list->obj->data.ptr);
if(head != NULL && head->type == macro_type)
return 1;
}
}
return 0;
}
struct Object* eval_macroexpand(struct Envir* env, struct Object* obj) {
while(eval_is_macro(env, obj)) {
struct List* list = obj->data.ptr;
struct Object* macro = envir_search(env, list->obj->data.ptr);
struct List* m_args = ((struct Func*) macro->data.ptr)->args;
struct Object* m_expr = ((struct Func*) macro->data.ptr)->expr;
// printf("margs:\n");
// list_print(m_args, 0);
int argc = list_length(list->next);
struct Envir* local = envir_init(argc * 2);
list = list->next;
while(list != NULL && m_args != NULL) {
if(m_args->obj->type != symbol) {
printf("error: argument is not symbol\n");
object_print_type(m_args->obj->type);
printf("\n");
envir_free(local);
return NULL;
}
envir_set(local, (char*) m_args->obj->data.ptr, list->obj);
list = list->next;
m_args = m_args->next;
}
if(list != NULL || m_args != NULL) {
printf("error: mismatched arguments\n");
envir_free(local);
return NULL;
}
local->outer = env;
obj = eval_apply(local, m_expr);
envir_free(local);
}
return obj;
}
struct Object* eval_eval(struct Envir* env, struct Object* obj) {
if(obj->type == list_type) {
struct List* list = obj->data.ptr;
// call eval on every member, returning new list
struct Object* output = list_init();
struct Object* elem;
while(list != NULL) {
elem = eval_apply(env, list->obj);
list_append_object(output, elem);
list = list->next;
}
return output;
} else if(obj->type == symbol) {
// look up symbol in environment
struct Object* val = envir_search(env, obj->data.ptr);
if(val == NULL) {
// TODO: error handling
printf("error: symbol %s not found\n", (char*) obj->data.ptr);
return NULL;
} else {
return val;
}
} else {
// objects evaluate to themselves
return obj;
}
}
struct Object* eval_apply(struct Envir* env, struct Object* obj) {
if(eval_is_macro(env, obj)) {
obj = eval_macroexpand(env, obj);
// object_print_string(obj);
if(obj == NULL) {
printf("expansion failed\n");
return NULL;
}
}
if(obj->type == list_type) {
// special forms
struct List* sp = obj->data.ptr;
// TODO: compare all special forms at once
if(sp->obj == NULL) {
// empty list evaluates to nil
return nil_obj;
} else if(object_equals_symbol(sp->obj, "quote")) {
return sp->next->obj;
} else if(object_equals_symbol(sp->obj, "or")) {
sp = sp->next;
if(sp == NULL) {
printf("error: or expects at least one argument\n");
return NULL;
}
struct Object* val;
while(sp != NULL) {
val = eval_apply(env, sp->obj);
if(val == NULL)
return NULL;
if(val != nil_obj)
return true_obj;
sp = sp->next;
}
return nil_obj;
} else if(object_equals_symbol(sp->obj, "and")) {
sp = sp->next;
if(sp == NULL) {
printf("error: and expects at least one argument\n");
return NULL;
}
struct Object* val;
while(sp != NULL) {
val = eval_apply(env, sp->obj);
if(val == NULL)
return NULL;
if(val == nil_obj)
return nil_obj;
sp = sp->next;
}
return true_obj;
} else if(object_equals_symbol(sp->obj, "fn")
|| object_equals_symbol(sp->obj, "macro")) {
// TODO: evaluate non-argument values for lexial binding
struct List* args = sp->next;
if(args->obj->type != list_type
|| args->next->next != NULL) {
// TODO: error checking
printf("wrong number of arguments to fn\n");
printf("expected 2, got %d\n", list_length(args));
return NULL;
}
struct Object* fargs = args->obj;
struct Object* fexpr = args->next->obj;
struct Object* output;
if(object_equals_symbol(sp->obj, "fn")) {
output = object_init_type(func_type);
} else {
output = object_init_type(macro_type);
}
struct Func* fn = malloc(sizeof(struct Func));
fn->expr = NULL;
fn->args = NULL;
output->data.ptr = fn;
fn->args = list_bare_copy(fargs);
// struct Object* arg_copy = object_copy(args->obj);
// fn->args = arg_copy->data.ptr;
fn->expr = object_copy(fexpr);
// printf("args: \n");
// list_print(fn->args, 0);
/*
if(object_equals_symbol(sp->obj, "fn")) {
return object_init(func_type, data);
} else {
return object_init(macro_type, data);
}
*/
return output;
} else if(object_equals_symbol(sp->obj, "def")) {
if(list_length(sp) != 3 || sp->next->obj->type != symbol) {
printf("error: wrong type / number of args to def\n");
printf("%d args\nname type: ", list_length(sp) - 1);
object_print_type(sp->next->obj->type);
printf("\n");
return NULL;
}
struct Object* sym = sp->next->obj;
struct Object* val = sp->next->next->obj;
val = eval_apply(env, val);
envir_set(env, sym->data.ptr, val);
return val;
} else if(object_equals_symbol(sp->obj, "if")) {
int argc = list_length(sp) - 1;
if(argc == 2 || argc == 3) {
struct Object* pred = sp->next->obj;
struct Object* tclause = sp->next->next->obj;
if(!object_equals_value(nil_obj, eval_apply(env, pred))) {
return eval_eval(env, tclause);
} else {
if(argc == 3) {
struct Object* fclause = sp->next->next->next->obj;
return eval_apply(env, fclause);
} else {
return nil_obj;
}
}
} else {
printf("error: wrong number of args to if (expects 2 or 3)\n");
return NULL;
}
} else if(object_equals_symbol(sp->obj, "cond")) {
sp = sp->next;
int argc = list_length(sp);
if(argc == 0 || argc % 2 != 0) {
printf("error: cond expects an even number of arguments\n");
return NULL;
}
struct Object* pred;
int argnum = 0;
while(sp != NULL) {
if(object_equals_symbol(sp->obj, ":else")) {
if(argnum != argc - 2) {
printf("%d / %d\n", argnum, argc);
printf("unexpected :else symbol\n");
return NULL;
} else {
return eval_apply(env, sp->next->obj);
}
}
pred = eval_apply(env, sp->obj);
if(pred == NULL)
return NULL;
if(pred != nil_obj)
return eval_apply(env, sp->next->obj);
argnum += 2;
sp = sp->next->next;
}
return nil_obj;
} else if(object_equals_symbol(sp->obj, "let")) {
sp = sp->next;
// get bindings
if(sp->obj->type != list_type
|| list_length(sp->obj->data.ptr) % 2 != 0) {
printf("error: let expects an even number of bindings\n");
return NULL;
}
struct List* bindings = sp->obj->data.ptr;
struct Envir* local = envir_init(list_length(bindings) * 2);
// map bindings to environment
while(bindings != NULL) {
if(bindings->obj->type != symbol) {
printf("error: binding is not symbol\n");
envir_free(local);
return NULL;
}
envir_set(local, (char*) bindings->obj->data.ptr,
eval_apply(local, bindings->next->obj));
bindings = bindings->next->next;
}
// push environment
local->outer = env;
// evaluate like 'do'
sp = sp->next;
while(sp->next != NULL) {
eval_apply(local, sp->obj);
sp = sp->next;
}
struct Object* result = eval_apply(local, sp->obj);
envir_free(local);
return result;
} else if(object_equals_symbol(sp->obj, "do")) {
sp = sp->next;
while(sp->next != NULL) {
eval_apply(env, sp->obj);
sp = sp->next;
}
return eval_apply(env, sp->obj);
} else if(object_equals_symbol(sp->obj, "loop")) {
sp = sp->next;
if(sp->obj->type != list_type ||
list_length(sp->obj->data.ptr) % 2 != 0) {
printf("error: loop expects an even number of bindings\n");
return NULL;
}
struct List* bind_list = sp->obj->data.ptr;
int argc = list_length(bind_list);
struct Envir* local = envir_init(argc * 4);
local->outer = env;
struct List* bindings = bind_list;
while(bindings != NULL) {
if(bindings->obj->type != symbol) {
printf("error: binding is not a symbol\n");
envir_free(local);
return NULL;
}
envir_set(local, (char*) bindings->obj->data.ptr,
eval_apply(local, bindings->next->obj));
bindings = bindings->next->next;
}
envir_set(local, "recur", true_obj);
struct List* expr_list = sp->next;
struct List* expr = expr_list;
struct Object* value;
int will_recurse;
do {
// list_print(expr);
will_recurse = 0;
while(expr != NULL) {
value = eval_apply(local, expr->obj);
if(value->type == list_type &&
object_equals_symbol(
((struct List*) value->data.ptr)->obj, "recur"
)
) {
if(expr->next != NULL) {
printf("error: recursion must be in the tail"
" position\n");
envir_free(local);
return NULL;
} else {
will_recurse = 1;
}
}
expr = expr->next;
}
if(will_recurse) {
// reset expressions in the loop
expr = expr_list;
// rebind variables
bindings = bind_list;
struct List* new_vals = value->data.ptr;
// ignore 'recur' token
new_vals = new_vals->next;
while(bindings != NULL) {
if(new_vals == NULL) {
printf("error: recursion must have the same number"
" of arguments as loop bindings");
envir_free(local);
return NULL;
}
envir_set(local, (char*) bindings->obj->data.ptr,
new_vals->obj);
bindings = bindings->next->next;
new_vals = new_vals->next;
}
if(new_vals != NULL) {
printf("error: recursion must have the same number of"
" arguments as loop bindings");
envir_free(local);
return NULL;
}
}
} while(will_recurse);
envir_free(local);
return value;
} else if(object_equals_symbol(sp->obj, "recur")) {
// find recur obj in env
if(envir_get(env, "recur") == NULL) {
printf("error: no matching loop for recur\n");
return NULL;
}
// return working list with other parts evaluated
struct Object* recur_list = list_init();
list_append_object(recur_list, sp->obj);
sp = sp->next;
while(sp != NULL) {
list_append_object(recur_list, eval_apply(env, sp->obj));
sp = sp->next;
}
return recur_list;
} else if(object_equals_symbol(sp->obj, "quasiquote")) {
struct Object* output = eval_quasi(sp->next->obj);
// printf("after quasi expansion:\n");
// object_print_string(output);
// printf("\n");
return eval_apply(env, output);
}
struct Object* list = eval_eval(env, obj);
// if the expression evaluated to non-list type
// i.e. evaluated by a special form
if(list->type != list_type) {
return list;
}
struct List* arg_list = (struct List*)list->data.ptr;
struct Object* func = arg_list->obj;
arg_list = arg_list->next;
if(func == NULL) {
return NULL;
} else if(func->type == c_fn) {
return func->data.fn_ptr(arg_list);
} else if(func->type == func_type) {
struct Func* fn_struct = (struct Func*) func->data.ptr;
// create local environment for function evaluation
int argc = list_length(arg_list);
struct Envir* local = envir_init(argc * 2);
// map function symbols to given arguments
struct List* arg_val = arg_list;
struct List* arg_sym = fn_struct->args;
while(arg_sym != NULL && arg_val != NULL) {
if(arg_sym->obj->type != symbol) {
printf("error: argument is not symbol\n");
envir_free(local);
return NULL;
}
envir_set(local, (char*) arg_sym->obj->data.ptr, arg_val->obj);
arg_sym = arg_sym->next;
arg_val = arg_val->next;
}
if(arg_sym != NULL || arg_val != NULL) {
printf("error: mismatched arguments\n");
envir_free(local);
return NULL;
}
// evaluate function expression
local->outer = env;
struct Object* result = eval_apply(local, fn_struct->expr);
// clean up temporary environment
envir_free(local);
return result;
} else {
printf("error: symbol ");
object_print_string(func);
printf(" is not a function\n");
return NULL;
}
} else {
return eval_eval(env, obj);
}
}
| 21,048 | Common Lisp | .l | 533 | 25.945591 | 79 | 0.472096 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | b3a3194f4bd053b5dc91f484e242d0b37c3031f362d3fd02888cd27a17fe7730 | 16,278 | [
-1
] |
16,279 | eval.h | davidsun0_lateral/interpreter/old/eval.h | #ifndef LATERAL_EVAL_H
#define LATERAL_EVAL_H
#include "object.h"
#include "hash.h"
#include "env.h"
enum mode {
eval_exe,
apply_exe,
macro_exe,
result_exe,
unknown
};
struct StackFrame {
struct StackFrame* prev;
struct Object* fn;
struct Object* expr;
struct Object* working;
struct Object* ret;
enum mode exe_mode;
int eval_index;
};
extern struct StackFrame* stack;
struct Envir* test;
void stack_print();
struct Object* lat_evaluate(struct Envir*, struct Object*);
#endif
| 530 | Common Lisp | .l | 26 | 17.307692 | 59 | 0.710843 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | e6c9127d5d7a67a6d5c0b962429134f742d6aacebdbf869d36a03483c3e336ca | 16,279 | [
-1
] |
16,281 | callgrind.out.25338 | davidsun0_lateral/interpreter/old/callgrind.out.25338 | # callgrind format
version: 1
creator: callgrind-3.13.0
pid: 25338
cmd: ./a.out jvmclass.lisp
part: 1
desc: I1 cache:
desc: D1 cache:
desc: LL cache:
desc: Timerange: Basic block 0 - 337710463
desc: Trigger: Program termination
positions: line
events: Ir
summary: 2322287546
ob=(6) /lib/x86_64-linux-gnu/libreadline.so.7.0
fl=(91) ???
fn=(742) 0x0000000000013950
0 8
cob=(2) ???
cfi=(18) ???
cfn=(748) 0x0000000004c3f880
calls=1 0
0 75
0 1
cfn=(752) 0x00000000000138c0
calls=1 0
0 8
0 3
fn=(752)
0 8
fn=(344) 0x0000000000013990
0 17
ob=(1) /lib/x86_64-linux-gnu/ld-2.27.so
fl=(105) /build/glibc-OTsEL5/glibc-2.27/elf/../elf/dl-runtime.c
fn=(402) _dl_fixup
66 4
+6 4
-6 2
+3 4
+3 6
-4 2
+5 2
+2 2
-2 10
+2 2
-2 2
+2 2
+5 4
+4 4
+4 2
+7 2
-7 4
+4 4
+1 8
+2 8
+7 4
-1 2
+1 2
+10 18
cfi=(6) /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c
cfn=(188) _dl_lookup_symbol_x
calls=2 790
* 2367
* 2
+4 10
+10 14
+16 2
-8 2
+8 6
+4 6
fi=(5) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86_64/dl-machine.h
+96 2
fe=(105)
-92 6
fl=(6)
fn=(10) _dl_setup_hash
939 18
+4 6
+4 12
+2 6
-1 6
+3 18
+1 6
+1 6
+3 6
-3 6
+7 6
-4 6
-1 6
+3 6
+2 6
-7 6
+7 6
+1 6
fn=(188)
790 4630
555 463
790 1852
555 1389
-1 926
+2 463
-1 463
+1 1389
-1 1389
+1 7053
-1 7053
+1 21159
-1 21622
793 463
-1 463
+4 463
+4 463
-8 463
+1 463
+7 1292
+5 1389
+6 1389
-7 5093
+15 56
-8 84
+2 6019
cfn=(190) do_lookup_x
calls=463 338
* 182558
+3 2287
+25 926
+24 3143
+31 449
+9 1796
+14 1347
+3 1796
+5 449
+2 4195
-86 84
+17 14
+1 28
+59 2
fn=(190)
338 3241
+1 463
-1 2778
+6 926
+12 463
+30 463
-41 463
+41 463
+35 926
-65 2315
+14 4935
+8 3290
+1 4935
+3 1645
+1 3290
+4 3290
+3 3290
-5 1645
+5 4935
+3 11515
-99 1196
540 5866
+1 807
cfi=(36) /build/glibc-OTsEL5/glibc-2.27/elf/dl-misc.c
cfn=(116) _dl_name_match_p
calls=269 282
* 32707
* 1076
+3 3591
349 3292
+3 3292
+4 3300
+4 3290
+4 3290
fi=(55) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/generic/ldsodefs.h
102 1347
fe=(6)
503 898
+3 3480
-60 92
+64 84
+12 2694
+2 449
+24 3704
-1 28
397 1491
-1 994
+2 994
+2 495
90 1485
375 495
90 495
374 495
90 495
400 990
90 990
413 1425
-10 4620
+2 1796
+2 898
-1 1347
78 3143
+12 2245
+3 1398
cfi=(21) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/strcmp.S
cfn=(56) strcmp
calls=100 +51
* 3862
* 300
+5 449
-1 449
+1 449
+2 366
+19 183
+1 1647
452 4490
148 532
+2 1330
+30 322
-59 915
cfi=(21)
cfn=(56)
calls=183 +23
* 10304
* 915
fl=(104) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86_64/dl-trampoline.h
fn=(400) _dl_runtime_resolve_xsave
71 2
+3 2
+2 2
+10 2
+6 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+4 2
+1 2
+3 2
+1 2
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+2 2
+7 2
+1 2
+1 2
cfi=(105)
cfn=(402)
calls=2 -59
* 2521
+1 2
+5 2
+1 2
+1 2
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+2 2
+2 2
+4 2
+3 2
fl=(30) /build/glibc-OTsEL5/glibc-2.27/string/strdup.c
fn=(86) strdup
40 20
+1 5
cfi=(13) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/../strlen.S
cfn=(28) strlen
calls=5 +38
* 152
* 5
+1 10
cfi=(19) /build/glibc-OTsEL5/glibc-2.27/elf/dl-minimal.c
cfn=(46) malloc
calls=5 +8
* 90
* 5
+2 10
+4 5
-1 10
+1 10
-1 10
cfi=(20) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
cfn=(48) memcpy
calls=5 +82
* 74
fl=(54) /build/glibc-OTsEL5/glibc-2.27/elf/dl-reloc.c
fn=(180) _dl_relocate_object
148 60
+15 6
-15 12
+15 6
+1 30
+6 18
+6 24
+1 12
-19 8
+22 8
+7 6
-32 6
+32 6
+44 6
fi=(5)
76 6
fe=(54)
231 12
fi=(5)
76 18
fe=(54)
258 219
-99 3
fi=(5)
481 9
fe=(54)
159 6
+99 3
fi=(4) /build/glibc-OTsEL5/glibc-2.27/elf/do-rel.h
48 3
fe=(54)
258 3
fi=(4)
47 3
+11 3
-11 3
+11 3
-11 3
+11 3
fe=(54)
258 3
-99 3
fi=(5)
481 9
fe=(54)
159 6
+99 3
fi=(4)
48 3
fe=(54)
258 3
fi=(4)
47 3
+11 3
-11 3
+11 3
-11 3
+11 3
fe=(54)
258 6
fi=(4)
48 6
fe=(54)
258 6
fi=(4)
47 6
+11 6
-11 6
+11 6
-11 6
+11 6
+26 9
+14 18
-15 18
+3 36
+12 9
+10 14
+10 27
+6 8
-3 16
+3 8
fi=(5)
491 5
fi=(4)
51 5
fi=(5)
491 5
fi=(4)
50 10
+77 1924
+12 962
-3 1443
fi=(5)
276 481
fi=(4)
139 481
-2 481
-1 481
+1 481
+1 481
-1 962
fi=(5)
276 481
+21 962
+4 962
+7 1924
fi=(55)
102 1392
fi=(5)
308 8557
fi=(4)
138 455
fi=(5)
308 910
fi=(4)
138 455
fi=(5)
308 455
fi=(4)
138 455
fi=(5)
308 910
fi=(4)
138 1
fi=(5)
308 2
fi=(4)
138 1
fi=(5)
308 1
fi=(4)
138 1
fi=(5)
308 5474
cfi=(6)
cfn=(188)
calls=456 790
* 281823
* 2736
+2 1392
+25 2886
fi=(4)
74 6
+1 7
+1 78
fi=(5)
551 39
+24 78
+2 39
cob=(3) /lib/x86_64-linux-gnu/libc-2.27.so
cfi=(77) /build/glibc-OTsEL5/glibc-2.27/time/../sysdeps/unix/sysv/linux/x86/gettimeofday.c
cfn=(274) gettimeofday
calls=1 42
* 77
cob=(3)
cfi=(58) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-strcasecmp.h
cfn=(270) strncasecmp_l
calls=1 32
* 6
cob=(3)
cfi=(60) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-avx2.h
cfn=(268) strchrnul
calls=1 32
* 8
cob=(3)
cfi=(57) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-unaligned-ssse3.h
cfn=(266) stpcpy
calls=1 33
* 9
cob=(3)
cfi=(57)
cfn=(264) stpncpy
calls=1 33
* 9
cob=(3)
cfi=(70) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-sse4_2.h
cfn=(262) strspn
calls=1 30
* 6
cob=(3)
cfi=(64) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/ifunc-avx2.h
cfn=(260) wcslen
calls=1 32
* 8
cob=(3)
cfi=(60)
cfn=(258) memchr
calls=1 32
* 8
cob=(3)
cfi=(58)
cfn=(254) strcasecmp_l
calls=1 32
* 6
cob=(3)
cfi=(60)
cfn=(252) memrchr
calls=1 32
* 8
cob=(3)
cfi=(60)
cfn=(250) strlen
calls=1 32
* 8
cob=(3)
cfi=(74) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strchr.c
cfn=(248) index
calls=1 40
* 8
cob=(3)
cfi=(70)
cfn=(246) strpbrk
calls=1 30
* 6
cob=(3)
cfi=(73) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/ifunc-wmemset.h
cfn=(244) wmemset
calls=2 32
* 26
cob=(3)
cfi=(72) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wcsnlen.c
cfn=(242) wcsnlen
calls=1 40
* 7
cob=(3)
cfi=(56) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-memmove.h
cfn=(240) memcpy@@GLIBC_2.14
calls=1 44
* 16
cob=(3)
cfi=(57)
cfn=(238) strcpy
calls=1 33
* 9
cob=(3)
cfi=(58)
cfn=(234) strncasecmp
calls=1 32
* 6
cob=(3)
cfi=(70)
cfn=(232) strcspn
calls=1 30
* 6
cob=(3)
cfi=(60)
cfn=(230) strnlen
calls=2 32
* 16
cob=(3)
cfi=(64)
cfn=(228) wcschr
calls=2 32
* 16
cob=(3)
cfi=(69) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-memset.h
cfn=(226) memset
calls=1 42
* 18
cob=(3)
cfi=(68) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcmp.c
cfn=(224) strcmp
calls=1 38
* 9
cob=(3)
cfi=(67) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncmp.c
cfn=(222) strncmp
calls=1 38
* 8
cob=(3)
cfi=(65) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/ifunc-memcmp.h
cfn=(218) bcmp
calls=1 33
* 13
cob=(3)
cfi=(56)
cfn=(216) mempcpy
calls=1 44
* 16
cob=(3)
cfi=(64)
cfn=(214) wmemchr
calls=2 32
* 16
cob=(3)
cfi=(60)
cfn=(212) rawmemchr
calls=1 32
* 8
cob=(3)
cfi=(61) /build/glibc-OTsEL5/glibc-2.27/time/../sysdeps/unix/sysv/linux/x86/time.c
cfn=(206) time
calls=1 43
* 77
cob=(3)
cfi=(60)
cfn=(204) rindex
calls=1 32
* 8
cob=(3)
cfi=(57)
cfn=(202) strcat
calls=1 33
* 9
cob=(3)
cfi=(58)
cfn=(198) strcasecmp
calls=1 32
* 6
cob=(3)
cfi=(57)
cfn=(196) strncpy
calls=1 33
* 9
cob=(3)
cfi=(56)
cfn=(194) memmove
calls=2 44
* 32
-26 39
+27 39
fi=(4)
75 121
fe=(54)
258 2
fi=(4)
75 22
fe=(54)
258 22
+3 24
+24 6
+3 12
+17 18
+8 30
+3 6
-3 6
+3 6
+4 12
+1 18
cfi=(44) /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/syscall-template.S
cfn=(136) mprotect
calls=6 78
* 30
* 12
-14 48
fi=(5)
131 9
458 1852
fi=(4)
124 1443
+19 25
fi=(5)
430 51
+4 68
+5 17
+9 17
-9 34
+9 34
+49 3
+4 6
cfi=(20)
cfn=(48)
calls=1 129
* 10
+2 3
+1 1
308 34
+5 17
-3 34
+3 505
-3 908
+3 1362
+3 85
+3 34
+1 51
+1 34
+4 17
+7 17
cob=(3)
cfi=(79) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strstr.c
cfn=(284) strstr
calls=1 44
* 6
cob=(3)
cfi=(61)
cfn=(206)
calls=1 43
* 77
cob=(3)
cfi=(56)
cfn=(240)
calls=1 44
* 16
cob=(3)
cfi=(78) /build/glibc-OTsEL5/glibc-2.27/debug/../sysdeps/x86_64/multiarch/ifunc-memmove.h
cfn=(282) __memcpy_chk
calls=1 44
* 16
cob=(3)
cfi=(68)
cfn=(224)
calls=2 38
* 18
cob=(3)
cfi=(57)
cfn=(280) strncat
calls=1 33
* 9
cob=(3)
cfi=(69)
cfn=(226)
calls=1 42
* 18
cob=(3)
cfi=(77)
cfn=(274)
calls=1 42
* 77
cob=(3)
cfi=(60)
cfn=(204)
calls=1 32
* 8
cob=(3)
cfi=(74)
cfn=(248)
calls=1 40
* 8
cob=(3)
cfi=(60)
cfn=(250)
calls=2 32
* 16
cob=(3)
cfi=(57)
cfn=(238)
calls=1 33
* 9
cob=(3)
cfi=(67)
cfn=(222)
calls=1 38
* 8
cob=(3)
cfi=(57)
cfn=(196)
calls=2 33
* 18
* 51
-24 234
fi=(4)
61 6
-10 3
-1 6
fi=(5)
551 222
+4 222
+2 333
+1 111
fi=(4)
61 450
+2 600
+2 119
+46 16
fi=(5)
541 3932
fi=(4)
111 3932
fi=(5)
541 3932
fi=(4)
111 3932
fi=(5)
541 3932
fi=(4)
111 3932
fi=(5)
535 3932
fi=(4)
112 7864
fi=(5)
535 7864
+5 7864
fi=(4)
50 1
160 1
51 1
160 4
+2 20
+9 10
-1 5
+1 5
-1 10
fi=(5)
276 5
fi=(4)
170 15
fi=(5)
276 5
+21 10
+4 10
+7 20
fi=(55)
102 15
fi=(5)
308 170
cfi=(6)
cfn=(188)
calls=5 790
* 2835
* 35
+2 15
+25 30
fe=(54)
-77 15
fi=(5)
82 6
+4 9
+14 3
-8 3
+8 6
+20 6
+4 12
-2 6
458 20
fi=(4)
160 17
+14 2
fi=(5)
313 1
-3 2
+3 3
-5 1528
fe=(54)
180 6
fi=(5)
308 28
fe=(54)
fl=(137) /build/glibc-OTsEL5/glibc-2.27/elf/dl-fini.c
fn=(700) _dl_fini
30 8
+20 3
-3 6
+3 4
+3 2
cfi=(2) /build/glibc-OTsEL5/glibc-2.27/elf/rtld.c
cfn=(52) rtld_lock_default_lock_recursive
calls=1 784
* 2
+2 1
+3 2
+2 8
+8 1
-3 1
+8 1
-5 6
+7 12
+2 12
+2 12
+1 6
+1 6
+4 6
-12 18
+14 6
+1 4
+6 3
cfi=(52) /build/glibc-OTsEL5/glibc-2.27/elf/dl-sort-maps.c
cfn=(164) _dl_sort_maps
calls=1 -66
* 657
+10 2
cfi=(2)
cfn=(54) rtld_lock_default_unlock_recursive
calls=1 790
* 2
+5 6
+2 1
+2 3
-2 5
+2 15
+3 12
+3 18
+4 8
+11 4
+1 4
-1 4
+2 4
-2 4
+2 4
+1 28
+1 4
cob=(5) /lib/x86_64-linux-gnu/libtinfo.so.5.9
cfi=(90) ???
cfn=(760) 0x000000000000cab0
calls=1 0
* 95
cob=(6)
cfi=(91)
cfn=(742)
calls=1 0
* 95
cob=(4) /usr/lib/valgrind/vgpreload_core-amd64-linux.so
cfi=(81) ???
cfn=(724) 0x0000000000000600
calls=1 0
* 95
cob=(7) /home/david/Lateral/src/a.out
cfi=(92) ???
cfn=(702) 0x0000000000000cd0
calls=1 0
* 95
* 4
-1 12
+5 8
+1 12
cob=(2)
cfi=(18)
cfn=(776) 0x000000000527ea18
calls=1 0
* 3
cob=(2)
cfi=(18)
cfn=(758) 0x0000000004c63848
calls=1 0
* 3
cob=(2)
cfi=(18)
cfn=(740) 0x0000000004a2a7a8
calls=1 0
* 3
cob=(2)
cfi=(18)
cfn=(722) 0x000000000010e454
calls=1 0
* 3
+6 36
+16 12
-56 14
+62 6
+6 2
+7 8
-90 7
+26 6
fl=(20)
fn=(74) mempcpy
116 34
+1 34
+1 34
+13 34
+1 34
+1 14
+1 14
+5 11
+1 11
+1 11
+1 11
+5 11
267 20
+1 20
+1 10
+1 10
+1 5
+1 5
+1 3
+4 3
+22 10
+1 10
+1 10
+1 10
+1 10
+3 5
+1 5
+1 5
+1 5
+1 5
+3 2
+1 2
+1 2
+1 2
+1 2
+10 3
+1 3
+1 3
+1 3
+22 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+2 3
fn=(48)
129 29
+2 29
+1 29
+1 17
+1 17
+5 9
+1 9
+1 9
+1 9
+5 9
267 12
+1 12
+1 3
+1 3
+1 3
+1 3
+1 1
+1 1
+1 1
+2 1
+22 9
+1 9
+1 9
+1 9
+1 9
+10 2
+1 2
+1 2
+1 2
+1 2
+10 8
+1 8
+1 8
+1 8
+22 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+2 8
fl=(53) /build/glibc-OTsEL5/glibc-2.27/elf/dl-version.c
fn=(172) _dl_check_map_versions
156 42
+15 18
+2 30
+2 6
+1 6
+2 6
-3 6
+1 6
+2 6
+3 12
-16 4
-8 8
+28 4
-4 4
+4 8
+16 4
37 8
201 4
37 20
201 1
37 2
201 1
37 5
+1 18
-1 36
+2 69
cfi=(36)
cfn=(116)
calls=23 282
* 2291
* 46
209 15
+5 5
-71 15
+71 10
-71 15
+79 5
-2 5
-2 10
+4 5
-4 35
+4 13
-2 13
-2 26
+4 13
-4 101
57 6
+8 6
-8 48
+8 48
+6 54
+16 18
+1 36
+2 18
+5 108
+14 336
+12 450
+4 150
-30 300
225 72
+3 54
+5 13
-11 13
111 18
+3 72
cfi=(21)
cfn=(56)
calls=18 +30
* 960
* 82
237 20
+5 3
-43 1
+52 12
+3 12
+3 18
+3 12
+4 3
-7 12
+3 9
+4 56
-7 224
+3 171
+8 15
+89 54
-83 20
cfi=(19)
cfn=(42) calloc
calls=5 92
* 135
* 5
+1 5
-2 5
+2 5
+13 5
+2 5
-5 5
+3 5
+2 5
-2 5
+2 5
+3 16
+4 15
+18 13
-15 39
+2 39
-2 15
+2 15
+2 18
+1 18
-1 36
+1 18
-1 18
+1 18
+1 18
-2 18
+2 36
+1 54
+3 54
+8 15
+5 1
-28 1
+33 15
+3 12
+4 59
+6 59
+1 59
+1 59
-1 177
+1 59
-1 59
+1 59
+1 59
+3 177
+4 59
-14 124
+10 9
-96 2
-86 2
-8 2
+94 3
fn=(170) _dl_check_all_versions
362 5
+2 1
-2 3
+4 3
+2 36
cfn=(172)
calls=6 156
* 8180
-2 6
+2 24
-2 12
+5 7
fl=(17) /build/glibc-OTsEL5/glibc-2.27/elf/dl-object.c
fn=(50) _dl_add_to_namespace_list
31 10
+2 5
-2 15
+2 10
cfi=(2)
cfn=(52)
calls=5 784
* 10
+2 41
+3 42
+2 4
+2 4
+4 4
+4 4
-4 8
+1 4
+4 8
-4 4
+1 4
+3 4
-3 4
+2 4
cfi=(2)
cfn=(54)
calls=4 790
* 8
-4 1
+4 1
-4 2
+1 1
+4 2
-4 1
+1 1
+3 1
-3 1
+2 1
cfi=(2)
cfn=(54)
calls=1 790
* 2
-5 2
fn=(38) _dl_new_object
59 60
+1 5
-1 5
+1 10
cfi=(13)
cfn=(28)
calls=5 +19
* 116
+6 5
-6 10
+6 5
+7 5
-7 5
-6 5
+6 15
+2 10
+5 15
cfi=(19)
cfn=(42)
calls=5 +19
* 201
* 5
+3 5
-3 5
+3 5
+4 5
+5 5
-6 5
+6 5
-5 5
+5 5
-5 5
+4 5
+1 10
-1 5
+1 5
cfi=(20)
cfn=(48)
calls=5 +44
* 61
+10 5
-10 5
+10 5
-10 5
+10 5
-8 5
+8 10
+1 5
-1 5
+1 15
+3 5
-3 5
+3 5
+9 5
-7 5
+4 5
+3 10
+2 2
-2 2
+2 30
-2 30
+18 10
-6 5
+1 5
+5 5
-6 5
+6 15
+2 4
+3 4
-3 8
+3 5
+4 15
+4 9
+8 1
+3 1
+3 2
-3 1
+3 1
-3 4
+3 8
-3 4
+3 4
+2 4
+21 4
-21 4
cfi=(13)
cfn=(28)
calls=4 -76
* 136
+4 4
-4 8
+17 4
-13 12
+64 4
+4 45
100 14
+39 12
+70 12
cfi=(20)
cfn=(74)
calls=4 -93
* 72
* 75
+6 71
-1 71
+1 75
-1 4
+1 12
+5 8
-96 1
+7 4
+32 8
cfi=(19)
cfn=(46)
calls=4 50
* 72
* 4
+1 4
-1 8
+1 4
fl=(32) /build/glibc-OTsEL5/glibc-2.27/elf/../elf/dl-tls.c
fn=(178) _dl_allocate_tls_storage
332 1
+2 1
-2 2
+13 1
+1 2
cfi=(19)
cfn=(46)
calls=1 50
* 80
* 1
+1 3
+8 2
-69 1
+69 2
+1 1
+4 297
+19 1
-94 2
+1 2
cfi=(19)
cfn=(42)
calls=1 92
* 27
* 1
+1 2
+3 1
+6 2
+89 5
fn=(286) _dl_allocate_tls_init
437 8
+1 1
-1 1
+1 1
+4 1
+6 2
-6 1
+6 1
+12 1
-15 1
+39 1
-24 1
-16 2
+21 9
+6 15
+3 1
+1 2
+6 3
+3 1
-2 1
+6 1
-6 1
+2 1
+4 1
-4 2
+3 1
-3 1
+1 1
+2 1
+4 2
+1 4
+2 2
+1 2
+12 1
-3 1
+3 2
cfi=(20)
cfn=(74)
calls=1 116
* 12
* 5
cfi=(28) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
cfn=(76) memset
calls=1 109
* 33
* 7
-42 2
+52 1
+4 3
+3 8
fn=(94) _dl_count_modids
113 2
+1 2
fn=(162) _dl_next_tls_modid
51 4
+48 1
+4 1
fn=(176) _dl_determine_tlsoffset
141 1
-6 5
+6 2
+3 2
+36 3
+2 4
-2 1
-2 1
-40 1
-1 1
-1 2
+69 2
+3 2
-3 5
+2 2
+10 1
-37 2
+25 1
-25 2
+5 1
-1 1
+5 2
-4 1
-1 2
+3 2
+2 3
-9 5
+93 1
-53 1
+1 1
+52 1
-1 1
+1 4
fn=(278) _dl_add_to_slotinfo
887 4
+9 1
-3 2
+8 7
+41 1
+1 1
+1 4
fl=(31) /build/glibc-OTsEL5/glibc-2.27/elf/dl-debug.c
fn=(92) _dl_debug_initialize
49 12
+5 10
+5 2
-1 1
+1 2
+1 2
-1 1
+5 1
-14 6
+4 12
+4 1
-1 1
+1 6
fn=(96) _dl_debug_state
74 2
fl=(37) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/lxstat.c
fn=(120) open
39 15
fi=(38) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/open64.c
-3 15
+3 90
+8 105
+2 5
-2 30
+2 10
fe=(37)
fl=(7) /build/glibc-OTsEL5/glibc-2.27/elf/../elf/dl-sysdep.c
fn=(12) _dl_sysdep_start
88 8
+25 1
-1 1
+1 190
+6 1
-3 1
+1 1
-4 1
+3 1
+3 4
+1 2
-1 12
-29 1
-1 10
+30 2
+1 108
+3 1
-4 74
+62 1
-62 1
+63 1
-1 1
-62 3
+34 1
-34 2
+35 1
-35 2
+46 1
-46 1
+47 1
-1 1
-46 3
+40 1
-40 1
+41 1
-1 1
-40 3
+37 1
-37 2
+38 1
-38 3
+13 1
-13 2
+14 1
-14 2
+10 1
-10 2
+11 1
-11 2
+7 1
-7 4
224 1
cfi=(9) /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.c
cfn=(16) __GI___tunables_init
calls=1 +65
* 23217
fi=(11) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/dl-sysdep.c
35 2
cfi=(12) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/x86_64/brk.c
cfn=(22) brk
calls=1 -4
* 11
fi=(8) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86/cpu-features.c
196 1
-12 1
+1 1
+11 1
+3 1
-3 1
+3 5
366 3
+1 1
+3 2
+1 1
+6 1
+5 2
-3 1
+3 1
-4 1
+4 1
cfi=(9)
cfn=(26) __tunable_get_val
calls=1 -9
* 16
+2 4
cfi=(9)
cfn=(26)
calls=1 -11
* 18
* 1
+2 3
-2 1
+2 1
cfi=(9)
cfn=(26)
calls=1 -13
* 18
* 1
+2 3
-2 1
+2 1
cfi=(9)
cfn=(26)
calls=1 -15
* 18
+12 1
-12 1
+11 1
-11 1
+12 1
fe=(7)
236 1
cfi=(13)
cfn=(28)
calls=1 79
* 16
* 1
+2 2
cfi=(14) /build/glibc-OTsEL5/glibc-2.27/elf/../misc/sbrk.c
cfn=(30) sbrk
calls=1 32
* 17
* 3
+12 3
+3 5
cfi=(2)
cfn=(32) dl_main
calls=1 870
* 422923
+1 1
+1 8
fi=(8)
404 3
+28 2
-9 3
+2 4
+3 4
+1 2
205 6
cfn=(24) get_common_indeces.constprop.1
calls=1 34
* 87
+3 3
+97 4
+7 4
203 1
312 4
210 5
+1 7
+85 3
-79 2
fe=(7)
fn=(288) _dl_sysdep_start_cleanup
260 1
fl=(39) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/read.c
fn=(124) read
27 16
+1 4
fl=(49) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/xstat.c
fn=(152) _xstat
34 8
-1 8
+1 8
+1 48
+4 1
-4 28
fl=(52)
fn=(164)
28 16
+2 2
-2 2
+2 2
+92 10
-88 10
+1 4
-1 2
-1 2
+1 8
+1 2
cfi=(28)
cfn=(76)
calls=2 +74
* 26
* 32
+4 4
+3 2
-3 4
+1 6
+2 2
-7 10
+4 20
+3 10
-3 20
+1 30
+2 10
+12 84
+2 30
+1 20
-1 42
+1 42
+2 126
+1 90
+6 4
-1 2
+1 2
-1 16
cfi=(20)
cfn=(48)
calls=2 +64
* 20
+2 2
+2 14
+5 2
+3 12
+41 48
cfi=(28)
cfn=(76)
calls=8 -9
* 120
* 32
-28 88
-36 44
+61 52
-31 14
cfi=(20)
cfn=(48)
calls=2 +45
* 28
+1 6
+2 2
-2 2
+2 2
+3 33
-44 24
+69 2
+7 16
fl=(16) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/memcmp.S
fn=(36) bcmp
24 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 2
+1 2
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+2 2
+1 2
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+29 2
+1 2
+15 2
+1 2
fl=(15) /build/glibc-OTsEL5/glibc-2.27/elf/dl-environ.c
fn=(34) _dl_next_ld_env_entry
29 3
+3 10
+13 58
-13 174
+2 120
+1 18
+5 2
-3 2
+3 2
+2 2
+7 1
fl=(50) /build/glibc-OTsEL5/glibc-2.27/elf/dl-cache.c
fn=(154) _dl_load_cache_lookup
187 27
+8 6
+3 9
+45 10
+6 4
-6 1
+6 2
+11 3
-2 3
fi=(51) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86/dl-procinfo.h
39 3
fe=(50)
258 6
fi=(51)
39 9
+3 9
cfi=(21)
cfn=(56)
calls=3 144
* 72
* 6
fe=(50)
264 12
cfi=(9)
cfn=(26)
calls=3 373
* 54
* 3
fi=(26) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/not-errno.h
28 6
fe=(50)
264 3
fi=(26)
28 6
fe=(50)
266 6
fi=(26)
32 9
fe=(50)
270 6
+15 3
-15 3
+15 440
cfn=(160) _dl_cache_libcmp
calls=28 141
* 2333
* 180
cfn=(160)
calls=3 141
* 227
* 21
-84 4
cfi=(36)
cfn=(156) _dl_sysdep_read_whole_file
calls=1 44
* 107
+8 1
-8 1
+8 4
+1 7
+7 1
-3 1
+3 3
+3 1
+1 2
-1 1
+1 1
+1 8
+63 9
+16 6
+4 6
+8 9
cfi=(13)
cfn=(28)
calls=3 79
* 102
* 6
+1 3
-1 12
+1 6
cfi=(20)
cfn=(48)
calls=3 129
* 46
+1 6
cfi=(30)
cfn=(86)
calls=3 40
* 256
+1 24
-19 6
-27 12
+1 9
-1 21
+15 19
cfn=(160)
calls=1 141
* 144
* 47
fi=(51)
42 9
fe=(50)
297 3
fn=(160)
141 64
+1 72
+2 744
+20 364
+2 672
+4 154
+1 154
-29 308
+32 12
-28 8
ob=(7)
fl=(99) /home/david/Lateral/src/garbage.c
fn=(382) bank_init
9 195
+1 130
cob=(3)
cfi=(100) /build/glibc-OTsEL5/glibc-2.27/malloc/malloc.c
cfn=(386) malloc
calls=65 3028
* 358245
* 65
* 65
+1 130
+5 130
+1 130
+1 665600
+1 1464320
-2 199810
+5 130
+1 65
+1 130
fn=(608) garbage_run
52 198
+2 198
+1 132
+1 93696
cfi=(110) /home/david/Lateral/src/object.c
cfn=(610) obj_mark
calls=7808 +39
* 6064387
+1 93696
cfi=(110)
cfn=(610)
calls=7808 +38
* 1432681
-2 39304
+6 132
+1 66
+1 1022
+1 10320520
+1 1307460
cfi=(110)
cfn=(612) obj_release
calls=118860 +21
* 3747588
+1 1188600
+1 1188600
+1 237720
+2 2614920
-7 356580
+7 8896888
-7 1214234
+9 1533
-10 1154
+12 198
fn=(380) garbage_init
26 2
+1 2
cfn=(382)
calls=1 -18
* 99738
* 1
+1 3
fn=(430) garbage_alloc
30 366090
+1 244060
+1 122030
+1 13963504
+1 244412
+1 743738160
+1 1220300
-2 185812862
+5 352
+3 13475384
+1 128
cfn=(382)
calls=64 -34
* 2589407
* 192
+2 192
-13 128
+13 10106346
-13 6981624
+18 244060
fl=(92)
fn=(366) 0x0000000000000d10
0 17
fn=(716) 0x0000000000000c40
0 8
fn=(352) _start
0 11
cob=(3)
cfi=(93) /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c
cfn=(354) (below main)
calls=1 137
0 2321837228
fn=(702)
0 8
cob=(2)
cfi=(18)
cfn=(708) 0x0000000000108c00
calls=1 0
0 75
0 1
cfn=(716)
calls=1 0
0 8
0 3
fn=(360) __libc_csu_init
0 15
cob=(2)
cfi=(18)
cfn=(362) 0x0000000000108a90
calls=1 0
0 6
0 8
cfn=(366)
calls=1 0
0 17
0 11
fl=(115) /home/david/Lateral/src/reader.c
fn=(588) read_form
132 320
+1 704
+2 320
cfi=(110)
cfn=(456) obj_string
calls=64 11
* 832
* 192
cob=(3)
cfi=(114) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/../strcmp.S
cfn=(470) __strcmp_ssse3
calls=64 +9
* 1536
* 64
* 128
+2 320
+1 320
cfn=(590) read_list
calls=64 +12
* 18379443
* 64
+10 128
fn=(589) read_form'2
132 7890
+1 17358
+2 7890
cfi=(110)
cfn=(456)
calls=1578 11
* 20499
* 4734
cob=(3)
cfi=(114)
cfn=(470)
calls=1578 +9
* 37872
* 1578
* 3156
+2 2245
+1 2245
cfn=(591) read_list'2
calls=449 +12
* 54412027
* 449
+1 5645
cfi=(110)
cfn=(456)
calls=1129 11
* 14662
* 3387
cob=(3)
cfi=(114)
cfn=(470)
calls=1129 +5
* 27096
* 1129
* 2258
+5 5645
cfn=(592) read_atom
calls=1129 -77
* 7895089
* 3387
+1 5645
+1 1129
+2 3156
fn=(592)
67 7903
+1 4516
+6 3387
cfi=(110)
cfn=(456)
calls=1129 -63
* 14662
* 1129
+1 4831
+2 52
+1 52
+1 52
+1 106
+1 1484
+1 747
+1 322
+1 207
+7 106
-12 1106
+14 208
+1 312
cfi=(110)
cfn=(428) obj_init
calls=52 -58
* 150094
* 52
+1 8392
+2 51
+1 51
+1 51
+1 204
+4 770
+4 330
+1 440
+1 55
-7 742
+9 102
+3 204
+1 306
cfi=(110)
cfn=(428)
calls=51 -80
* 392582
* 51
+1 4104
+2 144
cob=(3)
cfi=(112) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strlen-avx2.S
cfn=(444) __strlen_avx2
calls=48 -67
* 764
* 48
* 336
cfi=(110)
cfn=(446) obj_init_str_len
calls=48 -70
* 255002
* 48
+1 3912
+2 3912
+1 260
cfi=(110)
cfn=(440) obj_init_str
calls=52 -52
* 263956
* 52
+2 3704
cfi=(110)
cfn=(440)
calls=926 -54
* 6757543
+2 5645
fn=(564) read_token
18 10785
+1 6471
+3 2157
+1 49792
+2 4065
-1 41284
-1 1165
+4 8748
+1 32
+1 848
-1 7040
-6 13418
+10 2155
+4 4310
+1 8620
-1 4
+1 15632
+1 2052
+1 4524
+2 48
+1 48
+1 381
+1 1524
-2 1716
+7 96
+3 4840
-1 208836
+5 6471
+1 10775
+1 10775
cfi=(110)
cfn=(446)
calls=2155 -9
* 16657234
* 6465
+1 6465
+1 4310
+3 2
+2 4314
fn=(480) read_file
243 14
+2 8
cob=(3)
cfi=(116) /build/glibc-OTsEL5/glibc-2.27/libio/iofopen.c
cfn=(484) fopen@@GLIBC_2.2.5
calls=2 88
* 935
* 2
* 2
+1 2
+2 4
+1 10
cob=(3)
cfi=(121) /build/glibc-OTsEL5/glibc-2.27/libio/fseek.c
cfn=(504) fseek
calls=2 32
* 1276
* 2
+1 6
cob=(3)
cfi=(128) /build/glibc-OTsEL5/glibc-2.27/libio/ioftell.c
cfn=(538) ftell
calls=2 34
* 212
* 2
* 2
+1 10
cob=(3)
cfi=(121)
cfn=(504)
calls=2 32
* 424
* 2
+1 10
cob=(3)
cfi=(100)
cfn=(386)
calls=2 3028
* 484
* 2
* 2
+1 4
+4 14
cob=(3)
cfi=(129) /build/glibc-OTsEL5/glibc-2.27/libio/iofread.c
cfn=(544) fread
calls=2 31
* 988
* 2
+1 10
+6 2
+1 4
+1 2
+1 4
+1 2
+1 10775
cfi=(110)
cfn=(566) list_append
calls=2155 -61
* 16729948
* 2155
+1 4310
+1 4
-3 10
cfn=(564)
calls=2 18
* 5142
* 10775
cfn=(564)
calls=2155 18
* 17102260
* 4314
+6 6
cob=(3)
cfi=(131) /build/glibc-OTsEL5/glibc-2.27/libio/iofclose.c
cfn=(570) fclose@@GLIBC_2.2.5
calls=2 34
* 1016
* 2
+1 6
cob=(3)
cfi=(100)
cfn=(478) free
calls=2 3086
* 244
* 2
+10 6
cfi=(110)
cfn=(440)
calls=2 71
* 7696
* 2
+1 12
cfi=(110)
cfn=(464) envir_set
calls=2 586
* 8028
+2 2
+1 4
+1 2
+1 320
cfn=(588)
calls=64 132
* 18384371
+1 320
cfi=(133) /home/david/Lateral/src/eval.c
cfn=(594) evaluate
calls=64 175
* 2230481719
+1 128
cfi=(99)
cfn=(608)
calls=64 52
* 34905033
-3 264
+5 12
cfi=(110)
cfn=(626) hashmap_rem
calls=2 498
* 480
* 4
+3 4
cfi=(99)
cfn=(608)
calls=2 52
* 3896474
+1 10
fn=(590)
150 512
+1 128
+1 192
+2 64
+1 64
+1 1190
cfn=(589)
calls=238 -24
* 17268802
+1 1190
cfi=(110)
cfn=(566)
calls=238 +51
* 1088634
* 238
+1 952
+1 192
-4 3020
cfi=(110)
cfn=(456)
calls=302 11
* 3925
* 906
cob=(3)
cfi=(114)
cfn=(470)
calls=302 -11
* 7248
* 302
* 604
+8 320
+5 256
+5 320
+1 64
+1 320
fn=(591)
150 3592
+1 898
+1 1347
+2 449
+1 449
+1 6700
cfn=(589)
calls=1340 -24
* 45217369
+1 6700
cfi=(110)
cfn=(566)
calls=1340 +51
* 9062693
* 1340
+1 5360
+1 1347
-4 17890
cfi=(110)
cfn=(456)
calls=1789 11
* 23243
* 5367
cob=(3)
cfi=(114)
cfn=(470)
calls=1789 -11
* 42936
* 1789
* 3578
+8 2245
+5 1796
+5 2245
+1 449
+1 2245
fl=(111) /home/david/Lateral/src/core.c
fn=(436) lang_init
496 6
+1 2
+1 6
cfi=(110)
cfn=(428)
calls=1 36
* 80
* 1
+1 5
cfi=(110)
cfn=(438) envir_set_str
calls=1 +91
* 469
+1 5
cfi=(110)
cfn=(438)
calls=1 +90
* 575
+2 3
cfn=(462) insert_function
calls=1 -14
* 871
+1 3
cfn=(462)
calls=1 -15
* 1034
+2 3
cfn=(462)
calls=1 -17
* 1079
+1 3
cfn=(462)
calls=1 -18
* 1214
+1 3
cfn=(462)
calls=1 -19
* 1349
+1 3
cfn=(462)
calls=1 -20
* 1484
+1 3
cfn=(462)
calls=1 -21
* 1641
+1 3
cfn=(462)
calls=1 -22
* 1754
+1 3
cfn=(462)
calls=1 -23
* 1889
+1 3
cfn=(462)
calls=1 -24
* 2070
+1 3
cfn=(462)
calls=1 -25
* 2297
+1 3
cfn=(462)
calls=1 -26
* 2356
+2 3
cfn=(462)
calls=1 -28
* 3446
+3 3
cfn=(462)
calls=1 -31
* 2717
+1 3
cfn=(462)
calls=1 -32
* 2806
+3 3
cfn=(462)
calls=1 -35
* 3982
+1 3
cfn=(462)
calls=1 -36
* 3101
+1 3
cfn=(462)
calls=1 -37
* 3236
+1 3
cfn=(462)
calls=1 -38
* 3391
+1 3
cfn=(462)
calls=1 -39
* 4845
+3 3
cfn=(462)
calls=1 -42
* 5175
+1 3
cfn=(462)
calls=1 -43
* 47975
+1 3
cfn=(462)
calls=1 -44
* 7202
+1 3
cfn=(462)
calls=1 -45
* 5394
+3 3
cfn=(462)
calls=1 -48
* 7406
+1 3
cfn=(462)
calls=1 -49
* 5713
+1 3
cfn=(462)
calls=1 -50
* 5863
+1 3
cfn=(462)
calls=1 -51
* 5983
+2 3
cfn=(462)
calls=1 -53
* 8268
+2 3
cfn=(462)
calls=1 -55
* 8511
+1 3
cfn=(462)
calls=1 -56
* 8644
+1 3
cfn=(462)
calls=1 -57
* 8982
+1 6
fn=(632) la_car
251 24620
+1 30775
+1 24620
+5 12310
fn=(636) la_type
174 2692
+1 2019
+1 2692
+2 2692
+1 36
cfi=(110)
cfn=(440)
calls=12 71
* 80933
* 12
+1 2644
+1 1755
cfi=(110)
cfn=(440)
calls=585 71
* 4461918
* 585
+1 304
+2 304
+1 144
cfi=(110)
cfn=(440)
calls=48 71
* 374929
* 48
+1 112
+2 112
+1 84
cfi=(110)
cfn=(440)
calls=28 71
* 218625
* 28
+12 1346
fn=(642) la_eq
127 456
+1 342
+1 456
+1 912
+2 684
+1 114
+2 57
+2 228
fn=(664) la_divide
91 231
+1 99
+1 132
+1 264
+3 99
+1 99
+1 198
+1 198
cfi=(110)
cfn=(428)
calls=33 -64
* 258930
+1 165
fn=(628) la_hashmap_init
295 4
+1 3
+1 4
+1 4
cfi=(110)
cfn=(630) obj_hashmap_init
calls=1 79
* 2153
* 1
+4 2
fn=(646) la_maphash
332 4
+1 3
+1 4
+1 3
+1 2
+1 320
+1 32
+1 84
+1 84
+2 42
cfi=(110)
cfn=(460) cell_init
calls=21 44
* 153029
* 21
+1 63
+1 42
cfi=(110)
cfn=(460)
calls=21 44
* 153344
* 21
+1 63
+1 63
+8 105
cfi=(133)
cfn=(648) funcall2
calls=21 24
* 34023316
+2 63
-18 265
-2 164
+23 1
+1 2
fn=(658) la_reverse_mut
276 372
+1 248
+1 248
+1 372
+2 124
+1 18588
+1 18588
+1 12392
+1 12392
-4 18960
+6 124
+1 248
fn=(660) la_lt
115 136
+1 102
+1 136
+1 272
+2 204
+1 68
+4 68
fn=(666) la_char_at
379 2496
+1 1872
+1 2496
+1 2496
+4 2496
+5 2496
+3 1872
cfi=(110)
cfn=(456)
calls=624 11
* 7640
* 624
+1 1248
+1 39340
+1 48
-2 30476
+5 5400
cfi=(110)
cfn=(446)
calls=600 49
* 4861900
+2 1248
fn=(668) la_char_int
404 1050
+1 450
+1 600
+3 750
cfi=(110)
cfn=(456)
calls=150 11
* 1950
* 450
+1 900
cfi=(110)
cfn=(428)
calls=150 36
* 1307923
+1 750
fn=(620) la_list
238 840
+1 210
+1 420
+1 210
+1 3168
cfi=(110)
cfn=(566)
calls=528 -34
* 3903010
* 528
+1 1056
ob=(1)
fl=(50)
fn=(160)
152 4
+2 4
-1 4
-1 8
+1 4
-1 4
+2 12
+2 12
-3 4
+3 4
+2 8
+9 84
fn=(290) _dl_unload_cache
326 4
-1 1
+3 2
cfi=(44)
cfn=(292) munmap
calls=1 78
* 5
+1 1
+2 2
fl=(33) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/strcspn.S
fn=(100) strcspn
30 1
+7 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 33
+3 2
+7 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+9 3
+12 1
+2 1
+1 1
+1 1
-4 11
+2 11
+1 11
+1 11
+2 12
+1 12
+1 12
+2 12
+1 12
+1 12
+2 12
+1 12
+1 12
+2 1
+1 1
+1 1
+2 1
+7 1
+4 1
fl=(28)
fn=(76)
109 95
+2 19
+1 19
+1 8
+1 8
+2 4
+1 4
+2 4
+55 4
+1 4
+10 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+2 97
+1 97
+1 97
+1 97
+1 97
+1 97
+1 97
+1 4
+15 11
+1 11
+1 11
+1 6
+1 6
+1 2
+1 2
+24 5
+1 5
+2 5
+3 4
+1 4
+2 4
+3 2
+1 2
+2 2
fl=(42) /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/mmap64.c
fn=(132) mmap
44 26
+3 13
-6 156
+6 13
+5 130
+2 91
-7 22
fl=(35) /build/glibc-OTsEL5/glibc-2.27/setjmp/../sysdeps/x86_64/setjmp.S
fn=(110) __sigsetjmp
26 7
+9 7
+1 14
+1 7
+4 7
+1 7
+1 7
+1 7
+1 7
+2 14
+2 7
+1 7
+1 7
+2 14
+2 7
+4 7
+1 7
fl=(25) /build/glibc-OTsEL5/glibc-2.27/elf/dl-hwcaps.c
fn=(68) _dl_important_hwcaps
42 4
+1 1
-1 8
+1 4
-1 1
+1 1
cfi=(9)
cfn=(26)
calls=1 373
* 18
* 1
+3 3
-3 1
+12 6
+1 3
+1 1
-2 1
+2 1
-2 5
+1 3
+1 1
-2 1
+2 1
-2 5
+10 3
fi=(26)
-37 4
fe=(25)
131 4
-2 1
+17 6
+3 2
329 9
69 3
+77 1
+20 1
-19 1
+36 10
+1 3
-1 2
+1 3
fi=(27) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86/dl-hwcap.h
57 6
fe=(25)
186 1
+1 1
cfi=(13)
cfn=(28)
calls=1 79
* 16
+1 1
-1 1
+1 3
-5 1
+5 1
-5 1
+5 2
-5 5
+8 3
+2 1
+1 6
+4 1
+4 1
-3 1
-1 1
+4 2
+3 4
+4 3
+1 1
-1 5
+1 3
+2 3
+2 2
-1 1
+1 1
-1 1
+2 2
+7 2
+6 11
+1 4
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+1 1
-1 1
+1 3
+29 13
+3 4
+7 1
+10 12
-4 2
-3 1
+3 1
cfi=(20)
cfn=(74)
calls=1 116
* 16
* 2
-3 1
+3 1
cfi=(20)
cfn=(74)
calls=1 116
* 16
* 6
+3 7
+1 12
+1 4
cfi=(20)
cfn=(74)
calls=1 116
* 14
-2 1
+2 2
-2 1
+5 6
cfi=(20)
cfn=(74)
calls=2 116
* 28
+2 2
-2 4
+2 5
-7 3
+12 1
+1 2
-1 9
+1 14
-1 18
+5 10
+4 3
-4 12
+4 33
+1 12
-1 12
+1 24
-2 12
+1 24
-1 39
+4 6
+5 1
-2 1
+2 1
-1 1
-1 2
+2 1
-1 1
+1 4
+2 6
+1 2
+3 2
-6 5
+13 8
+1 1
-1 2
+3 2
-3 3
+1 3
-1 6
+3 6
+3 3
+2 2
-15 2
-6 3
-42 2
fl=(46) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/close.c
fn=(142) close
27 20
+1 5
fl=(47) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/access.c
fn=(144) access
27 7
+4 1
fl=(21)
fn=(56)
144 960
+1 960
+2 960
+1 960
+21 960
+1 960
+1 799
+1 799
+1 270
+1 270
+1 270
+1 270
+21 270
+1 270
+1 270
+1 270
+1 270
+1 270
+1 270
+5 29
+1 29
+9 29
+1 29
+1 29
+1 29
+1 29
+1 29
+1 29
+1 29
-7 690
+1 690
+1 690
+1 690
+1 690
+1 690
+1 690
+1 690
+1 630
+1 579
+1 579
+1 579
+2 579
+1 579
+1 579
+1 579
+1 579
+1 579
-5 51
+1 51
+1 51
+1 51
+1 51
+1 51
+10 89
+1 89
+1 89
+2 89
+6 89
+1 89
+1 89
+1 89
+1 89
+5 89
+2 64
+1 64
+1 128
+8 64
+1 64
+3 64
+1 64
+1 64
+1 64
+1 64
+1 64
+31 1
+1 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 2
+4 1
+1 1
+3 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
571 331
+1 331
+1 331
+1 331
+1 331
+2 331
+1 331
+1 331
+1 331
+1 331
+1 331
+1 331
+1 59
+4 59
+1 59
+1 59
+6 59
+1 59
+1 118
+4 59
+1 59
+3 59
+1 59
+1 59
+3 59
+1 59
+1 59
+6 59
+1 59
+1 59
+1 59
+1 59
+1 59
+72 6
+1 6
+1 6
+1 6
+1 6
+2 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 4
+4 4
+1 4
+1 4
+6 4
+1 4
+1 8
+4 4
+1 4
+3 4
+1 4
+1 4
+3 4
+1 4
+1 4
+6 4
+1 4
+1 4
+1 4
+1 4
+1 4
+72 1
+1 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+4 1
+1 1
+1 1
+6 1
+1 1
+1 2
+4 1
+1 1
+3 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
+72 5
+1 5
+1 5
+1 5
+1 5
+2 5
+1 5
+1 5
+1 5
+1 5
+1 5
+1 5
+1 3
+4 3
+1 3
+1 3
+6 3
+1 3
+1 6
+4 3
+1 3
+3 3
+1 3
+1 3
+3 3
+1 3
+1 3
+6 3
+1 3
+1 3
+1 3
+1 3
+1 3
+72 4
+1 4
+1 4
+1 4
+1 4
+2 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 1
+4 1
+1 1
+1 1
+6 1
+1 1
+1 2
+4 1
+1 1
+3 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
+72 32
+1 32
+1 32
+1 32
+1 32
+2 32
+1 32
+1 32
+1 32
+1 32
+1 32
+1 32
+1 29
+4 29
+1 29
+1 29
+6 29
+1 29
+1 58
+4 29
+1 29
+3 29
+1 29
+1 29
+3 29
+1 29
+1 29
+6 29
+1 29
+1 29
+1 29
+1 29
+1 29
+7 4
+1 4
+2 4
+1 4
+2 4
+1 4
+1 4
+3 4
+1 4
+1 4
+6 4
+1 4
+1 4
+1 4
+1 4
+1 4
+41 10
+1 10
+1 10
+1 10
+1 10
+2 10
+1 10
+1 10
+1 10
+1 10
+1 10
+1 10
+1 3
+4 3
+1 3
+1 3
+6 3
+1 3
+1 6
+4 3
+1 3
+3 3
+1 3
+1 3
+3 3
+1 3
+1 3
+6 3
+1 3
+1 3
+1 3
+1 3
+1 3
+72 7
+1 7
+1 7
+1 7
+1 7
+2 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 7
+1 5
+4 5
+1 5
+1 5
+6 5
+1 5
+1 10
+4 5
+1 5
+3 5
+1 5
+1 5
+3 5
+1 5
+1 5
+6 5
+1 5
+1 5
+1 5
+1 5
+1 5
+72 53
+1 53
+1 53
+1 53
+1 53
+2 53
+1 53
+1 53
+1 53
+1 53
+1 53
+1 53
+1 51
+4 51
+1 51
+1 51
+6 51
+1 51
+1 102
+4 51
+1 51
+3 51
+1 51
+1 51
+3 51
+1 51
+1 51
+6 51
+1 51
+1 51
+1 51
+1 51
+1 51
+72 3
+1 3
+1 3
+1 3
+1 3
+2 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 2
+4 2
+1 2
+1 2
+6 2
+1 2
+1 4
+4 2
+1 2
+3 2
+1 2
+1 2
+3 2
+1 2
+1 2
+6 2
+1 2
+1 2
+1 2
+1 2
+1 2
+7 1
+1 1
+2 1
+1 1
+2 1
+1 1
+1 1
+3 1
+1 1
+1 1
+6 1
+1 1
+1 1
+1 1
+1 1
+1 1
+41 11
+1 11
+1 11
+1 11
+1 11
+2 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 7
+4 7
+1 7
+1 7
+6 7
+1 7
+1 14
+4 7
+1 7
+3 7
+1 7
+1 7
+3 7
+1 7
+1 7
+6 7
+1 7
+1 7
+1 7
+1 7
+1 7
+72 150
+1 150
+1 150
+1 150
+1 150
+2 150
+1 150
+1 150
+1 150
+1 150
+1 150
+1 150
+1 3
+4 3
+1 3
+1 3
+6 3
+1 3
+1 6
+4 3
+1 3
+3 3
+1 3
+1 3
+3 3
+1 3
+1 3
+6 3
+1 3
+1 3
+1 3
+1 3
+1 3
+72 16
+1 16
+1 16
+1 16
+1 16
+2 16
+1 16
+1 16
+1 16
+1 16
+1 16
+1 16
+2 6
+4 6
+1 6
+1 6
+6 6
+1 6
+2 12
+4 6
+1 6
+3 6
+1 6
+1 6
+3 6
+1 6
+1 6
+6 6
+1 6
+1 6
+1 6
+1 6
+1 6
+74 239
+2 239
+1 239
+1 239
+1 239
-3 480
+1 480
+1 480
+1 480
+1 1737
+5 579
+6 579
+1 579
+8 579
+1 579
-16 381
+6 381
+1 381
+8 381
+1 381
fl=(29) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/../strchr.S
fn=(84) index
24 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 8
+4 8
+1 8
+1 8
+1 8
+2 8
+4 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+52 4
+4 4
+1 4
+1 4
+1 4
+2 4
fl=(11)
fn=(62) _dl_discover_osversion
45 4
+2 3
+85 5
-45 3
cfi=(23) /build/glibc-OTsEL5/glibc-2.27/posix/../sysdeps/unix/syscall-template.S
cfn=(64) uname
calls=1 -9
* 5
* 1
+15 1
-15 1
+20 1
-1 1
+3 12
+4 3
-2 6
+2 10
+2 1
+1 2
-3 4
+7 3
-1 3
+4 3
-2 3
+2 10
+5 2
fl=(1) ???
fn=(0) 0x0000000000001090
0 2
cfi=(2)
cfn=(2) _dl_start
calls=1 444
0 447973
0 14
cfi=(80) /build/glibc-OTsEL5/glibc-2.27/elf/dl-init.c
cfn=(296) _dl_init
calls=1 79
0 2315
0 3
cob=(7)
cfi=(92)
cfn=(352)
calls=1 0
0 2321837239
fl=(19)
fn=(46)
50 127
+11 62
+3 31
-3 31
+3 62
-3 2
+3 1
-3 1
+3 122
-15 6
+20 8
+1 4
+2 2
+1 16
cfi=(42)
cfn=(132)
calls=2 -29
* 70
+2 4
+2 6
+2 2
+3 2
-3 4
+4 2
+2 10
-2 30
-1 30
+3 60
-29 1
-1 1
+1 1
+1 2
-2 4
fn=(80) strsep
265 4
+2 2
+1 4
+4 33
+7 84
-2 56
+13 1
+4 2
-7 14
-15 44
fn=(90) free
111 4
fn=(42)
92 12
+8 12
-1 24
-3 12
+4 24
+3 12
cfn=(46)
calls=12 -53
* 282
* 12
fl=(36)
fn=(116)
282 1590
+1 636
cfi=(21)
cfn=(56)
calls=318 144
* 13910
* 318
+1 318
-1 318
+3 318
+2 636
+6 310
+1 1550
-3 318
-4 636
+1 978
cfi=(21)
cfn=(56)
calls=326 144
* 15531
* 652
+6 8
-11 8
+11 32
fn=(156)
44 2
+3 1
-3 3
+3 1
-3 3
+3 1
cfi=(37)
cfn=(120)
calls=1 -8
* 16
+1 2
+2 5
cfi=(41) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/fxstat.c
cfn=(130) _fxstat
calls=1 -16
* 10
* 2
+2 1
+3 1
-3 1
+3 1
+13 2
cfi=(46)
cfn=(142)
calls=1 -41
* 5
+3 7
-14 6
cfi=(42)
cfn=(132)
calls=1 -13
* 35
* 2
fl=(23)
fn=(64)
78 4
+1 1
fl=(34) /build/glibc-OTsEL5/glibc-2.27/elf/dl-error-skeleton.c
fn=(108) _dl_catch_exception
175 14
+15 7
-3 14
+4 7
-3 7
-13 7
+19 7
-3 7
+3 7
-19 7
+13 7
+2 7
+4 7
cfi=(35)
cfn=(110)
calls=7 26
* 140
* 21
+2 21
cfi=(48) /build/glibc-OTsEL5/glibc-2.27/elf/dl-deps.c
cfn=(148) openaux
calls=6 60
* 16540
cfi=(2)
cfn=(112) map_doit
calls=1 588
* 2127
+2 7
-1 7
+1 14
-1 7
+1 7
+9 28
fn=(104) _dl_catch_error
213 6
+2 2
-2 1
+2 2
cfn=(108)
calls=1 -40
* 2178
* 1
+1 2
+1 1
+1 1
-1 1
+1 1
+2 5
fn=(166) _dl_receive_error
226 3
+1 1
+1 1
+3 1
+1 1
+2 2
cfi=(2)
cfn=(168) version_check_doit
calls=1 621
* 8287
+2 1
+1 1
+1 4
fl=(44)
fn=(136)
78 40
+1 10
fn=(292)
78 4
+1 1
fl=(9)
fn=(16)
289 8
-9 3
150 4
-82 185
+6 60
-3 60
+3 5340
+4 120
+5 60
297 60
83 60
297 60
fi=(10) /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.h
121 120
-1 60
+1 24
-1 8
+1 32
-1 40
fe=(9)
330 240
-12 6600
fi=(10)
120 2160
+1 2283
-1 162
fe=(9)
312 5340
68 120
364 8
fn=(26)
373 114
+4 19
-4 74
+9 3
+1 3
-6 16
+22 95
+2 19
fl=(48)
fn=(146) _dl_map_object_deps
159 1
-1 1
+1 1
-1 5
+1 1
-1 2
+1 1
-1 2
+1 1
-1 1
+1 1
-8 1
+8 2
-8 1
-6 1
+14 1
-8 1
+24 1
-32 1
+1 1
+1 1
+6 1
+24 2
-28 2
-2 1
+31 1
-33 3
+2 2
-1 1
+1 2
+6 3
+24 1
-24 1
+24 7
+4 1
+19 1
+2 2
-14 1
-1 1
+13 5
+11 1
+4 4
-4 5
+4 20
+12 18
+2 4
+8 4
-8 4
+6 4
-6 4
+6 4
+1 4
+4 4
-3 4
-3 4
+2 4
+4 16
+66 4
-98 4
+98 4
-66 8
+7 30
cfi=(29)
cfn=(84)
calls=6 24
* 186
* 12
+4 18
-2 6
+2 6
cfi=(34)
cfn=(108)
calls=6 -74
* 16846
* 6
+1 12
+9 6
+2 12
+5 4
+6 4
+2 4
-8 8
+3 4
+1 4
+1 4
+1 4
+4 20
+4 12
+1 12
-43 420
+1 210
+44 297
434 8
+2 12
+3 8
-1 4
cfi=(19)
cfn=(46)
calls=4 50
* 72
* 4
+2 4
-2 4
+2 4
+3 4
+1 16
-1 4
+1 4
cfi=(20)
cfn=(48)
calls=4 129
* 40
+1 20
cfi=(20)
cfn=(48)
calls=4 129
* 40
+4 4
-1 4
+5 44
+7 6
+4 4
+11 3
-1 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+3 1
-3 1
+3 4
+5 1
+1 1
-1 1
+3 2
-3 4
+9 2
+4 3
-10 3
-3 5
+9 10
+4 15
-10 15
+13 2
+51 2
+2 1
-1 1
+1 2
+35 7
cfi=(20)
cfn=(48)
calls=1 129
* 18
+4 5
cfi=(52)
cfn=(164)
calls=1 28
* 600
+3 1
+3 1
-1 1
+2 4
+7 3
+3 2
+3 8
225 8
-19 2
434 5
+27 2
214 39
+2 4
+2 16
+2 39
456 15
-1 6
+1 14
199 3
573 10
fn=(148)
60 12
+7 6
-4 18
+1 6
-1 6
+1 6
-1 30
cfi=(24) /build/glibc-OTsEL5/glibc-2.27/elf/dl-load.c
cfn=(114) _dl_map_object
calls=6 2080
* 16438
* 6
+5 12
fl=(80)
fn=(296)
79 11
+5 1
-4 1
+1 1
+3 2
+8 2
+25 2
+1 12
+1 18
-89 18
+9 5
-3 10
+3 15
+5 12
+5 6
+9 18
cob=(2)
cfi=(18)
cfn=(340) 0x0000000004c3f1e8
calls=1 -58
* 6
cob=(2)
cfi=(18)
cfn=(330) 0x0000000005272630
calls=1 -58
* 6
cob=(3)
cfi=(82) /build/glibc-OTsEL5/glibc-2.27/csu/../csu/init-first.c
cfn=(308) _init
calls=1 -6
* 201
* 3
+4 6
+6 6
+2 6
-2 3
+3 3
-1 3
+1 15
+1 12
cob=(6)
cfi=(91)
cfn=(344)
calls=1 -72
* 17
cob=(5)
cfi=(90)
cfn=(334) 0x000000000000caf0
calls=1 -72
* 17
cob=(3)
cfi=(88) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86/cacheinfo.c
cfn=(322) init_cacheinfo
calls=1 488
* 1773
* 3
-1 6
+47 9
+7 8
-80 3
-5 3
-10 3
+57 2
-48 1
-3 2
+3 3
+5 3
+5 2
+9 7
cob=(2)
cfi=(18)
cfn=(298) 0x0000000004a2a520
calls=1 -58
* 6
* 1
+3 1
+1 2
+6 1
+2 2
-2 2
+3 8
+1 4
cob=(4)
cfi=(81)
cfn=(302) 0x0000000000000640
calls=1 -72
* 17
-1 5
fl=(41)
fn=(130)
34 5
-1 5
+1 5
+1 30
+4 5
fl=(12)
fn=(22)
31 7
+8 1
-6 2
+7 1
fl=(106) /build/glibc-OTsEL5/glibc-2.27/elf/dl-open.c
fn=(406) _dl_find_dso_for_object
176 5
+4 6
+1 4
+1 16
+1 2
-2 9
+5 2
+4 7
fl=(13)
fn=(28)
79 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+2 24
+2 24
+31 24
+1 24
+1 24
+1 24
+1 24
+1 10
+2 10
+4 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+1 14
+5 112
fl=(2)
fn=(174) init_tls
687 1
-6 1
+2 2
+4 1
+10 4
cfi=(19)
cfn=(42)
calls=1 92
* 27
* 1
+11 1
-15 1
+3 1
+6 1
+2 1
-11 1
+15 1
+2 1
-1 1
+1 21
+2 12
+4 1
+2 1
-2 1
-5 12
+9 2
+3 1
cfi=(32)
cfn=(176)
calls=1 141
* 66
+7 1
cfi=(32)
cfn=(178)
calls=1 332
* 437
+1 1
-1 1
+1 1
+6 1
+3 1
-3 1
+3 6
+3 1
+2 1
+1 3
fn=(52)
784 7
+1 7
fn=(168)
621 2
+2 4
cfi=(53)
cfn=(170)
calls=1 362
* 8277
* 2
+4 2
fn=(54)
790 7
+1 7
fn=(2)
444 9
+19 4
fi=(3) /build/glibc-OTsEL5/glibc-2.27/elf/get-dynamic-info.h
48 1
fe=(2)
463 1
fi=(5)
59 3
fi=(3)
-11 1
fe=(2)
489 1
-3 1
fi=(3)
48 1
+25 2
-3 1
-7 1
+5 1
+3 1
+2 1
-6 1
+3 1
-3 2
-3 16
+10 4
-26 12
+16 13
+10 13
-26 39
+26 1
-26 3
+2 36
+13 20
+2 4
+16 2
+20 4
+1 4
+1 4
+1 4
+2 4
+5 4
+1 4
+1 4
+6 3
+5 2
+7 3
+1 3
+8 3
+3 3
+4 2
+1 2
fe=(2)
500 2
393 1
507 1
393 1
cfi=(6)
cfn=(10)
calls=1 939
* 23
+1 2
+1 2
+1 2
+1 2
+8 1
+9 1
-9 3
+9 1
-6 1
-3 1
+9 1
cfi=(7)
cfn=(12)
calls=1 88
* 446941
* 1
+9 4
+3 1
+4 1
-4 1
+4 1
532 9
-27 27
fi=(4)
84 1
+27 1
-28 1
+28 2
+1 2
fi=(5)
540 2
fi=(4)
112 76
fi=(5)
540 76
+1 39
fi=(4)
111 39
fi=(5)
541 39
fi=(4)
111 39
fi=(5)
541 39
fi=(4)
111 39
+5 2
+8 1
fi=(5)
335 1
+87 1
fi=(4)
124 2
+12 1
+3 1
-3 1
+3 1
-3 1
fi=(5)
301 1
fi=(4)
137 1
fi=(5)
301 1
fi=(4)
137 1
fi=(5)
301 1
fi=(4)
136 8
+3 8
-3 8
+3 8
-3 8
fi=(5)
301 8
fi=(4)
137 8
fi=(5)
301 8
fi=(4)
137 8
fi=(5)
301 8
+9 27
+3 9
-3 18
+3 27
+22 54
fi=(3)
68 4
fi=(4)
+56 28
fi=(5)
354 27
fi=(3)
71 4
+1 1
+1 2
fe=(2)
fn=(32)
870 1
+17 1
-17 10
+17 1
+4 1
-21 1
2471 1
891 1
+1 1
2466 1
892 1
+5 1
2471 1
897 1
2464 2
+7 3
-4 1
+4 3
+2 2
cfi=(15)
cfn=(34)
calls=1 29
* 58
* 4
cfi=(15)
cfn=(34)
calls=2 29
* 334
* 9
+4 6
-2 2
+2 42
+1 19
-1 57
+3 4
+6 14
+76 3
+1 4
cfi=(16)
cfn=(36)
calls=1 24
* 31
* 2
-56 2
+7 4
cfi=(16)
cfn=(36)
calls=1 24
* 36
* 2
+2 3
2635 3
+32 3
907 3
1108 7
cfi=(17)
cfn=(38)
calls=1 59
* 230
+2 1
-2 1
+2 1
+1 1
+1 1
+5 2
-5 1
+1 2
+4 1
cfi=(17)
cfn=(50)
calls=1 31
* 33
+1 2
879 1
1147 1
-3 1
-5 1
+1 1
+2 1
+5 5
+56 2
876 1
1166 1
+22 1
+15 2
-55 24
-1 27
+1 47
1250 3
+3 2
+2 2
+2 3
+13 3
+3 2
-2 1
+2 1
-2 3
cfi=(21)
cfn=(56)
calls=1 144
* 50
* 2
+7 1
+3 1
-5 1
+3 1
-3 1
+5 1
+1 2
+4 2
+2 2
fi=(3)
33 1
+9 2
+6 1
-2 1
+2 2
+15 1
+5 1
+3 1
+2 1
-3 1
-3 1
-3 1
-14 54
+13 24
+1 20
+10 5
-26 15
+16 21
+10 21
-26 63
+26 1
-26 3
+33 3
+20 3
+1 4
+1 4
+1 4
+2 4
+5 4
+1 4
+1 4
+6 3
+5 2
+7 2
+1 3
+18 3
+5 1
+2 1
-2 1
+2 1
+2 2
+2 2
+1 1
+2 3
+10 1
-8 3
+8 1
+5 2
+1 2
+2 2
fe=(2)
1293 2
cfi=(6)
cfn=(10)
calls=1 939
* 23
+3 2
fi=(22) /build/glibc-OTsEL5/glibc-2.27/elf/setup-vdso.h
24 2
fe=(2)
1318 1
cfi=(11)
cfn=(62)
calls=1 45
* 87
* 9
-6 5
1167 2
+9 1
-7 1
-3 1
+10 1
+18 2
-37 3
+1 1
-6 3
+1 1
fi=(3)
65 4
+3 4
fe=(2)
1203 2
-1 2
+1 4
-1 2
+2 4
+1 1
+3 2
+1 2
-1 2
+1 2
+1 2
+1 6
+1 2
+31 2
+1 2
+1 1
-6 2
+1 1
fi=(3)
71 4
+1 1
+1 3
fe=(2)
1323 2
cfi=(24)
cfn=(66) _dl_init_paths
calls=1 623
* 1740
+3 3
cfi=(31)
cfn=(92)
calls=1 49
* 17
+7 1
-7 1
+2 1
+5 1
+3 3
+1 1
+3 1
-3 3
+1 2
+3 1
+5 1
-7 1
+7 1
+1 5
+17 2
+1 2
+5 1
-3 3
+2 1
+1 2
+5 2
+1 5
-1 2
+3 2
+1 2
+5 2
+6 4
+1 1
-2 1
885 1
1391 1
1570 1
cfi=(32)
cfn=(94)
calls=1 113
* 4
* 1
+8 3
+3 2
+4 3
+5 2
+1 1
cfi=(31)
cfn=(96)
calls=1 74
* 1
+1 1
+4 2
+15 3
+4 1
-2 1
+2 2
+2 3
+1 1
-1 2
+1 1
cfn=(98) handle_ld_preload
calls=1 837
* 2506
* 1
+1 4
+2 2
+10 3
cfi=(47)
cfn=(144)
calls=1 27
* 8
* 2
+77 1
-96 1
+96 3
+17 3
+1 1
-1 1
+1 2
-1 1
+1 5
cfi=(48)
cfn=(146)
calls=1 159
* 19563
+1 4
+5 1
-3 2
+3 2
+1 7
-1 2
+1 15
-1 10
+4 3
+1 3
+1 1
+2 2
+1 5
-1 6
+1 12
-1 12
+47 2
+2 2
-1 1
-1 2
+2 4
cfi=(34)
cfn=(166)
calls=1 226
* 8302
+10 1
+1 1
-1 1
+1 1
+1 1
cfn=(174)
calls=1 687
* 618
* 1
+2 2
799 1
fi=(142) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/dl-osinfo.h
64 2
fe=(2)
801 1
fi=(142)
77 1
fe=(2)
810 1
+7 1
-5 1
1808 2
2038 3
2161 3
+7 1
+2 3
+1 1
-1 2
+2 14
+2 6
-2 12
+2 6
+5 12
+2 12
+6 6
+2 12
+1 40
cfi=(54)
cfn=(180)
calls=5 148
* 381065
+4 14
+1 2
cfi=(32)
cfn=(278)
calls=1 887
* 20
* 1
-12 1
+1 1
-3 2
+29 4
+2 1
+7 3
cfi=(32)
cfn=(286)
calls=1 437
* 149
+3 2
-25 4
+2 2
+6 1
-6 1
+6 1
+26 3
+2 4
+15 1
+2 1
-2 2
+3 1
-3 1
+3 1
-3 1
+3 3
cfi=(54)
cfn=(180)
calls=1 148
* 6722
+1 4
+2 2
+8 1
cfi=(7)
cfn=(288)
calls=1 260
* 1
+4 2
+20 3
cfi=(31)
cfn=(92)
calls=1 49
* 8
+1 1
-1 1
+2 1
cfi=(31)
cfn=(96)
calls=1 74
* 1
+1 1
+4 1
cfi=(50)
cfn=(290)
calls=1 326
* 15
+5 8
2094 1
+13 1
-9 1
-4 1
+10 1
-6 1
+6 1
+3 1
1753 1
+1 1
-1 2
+1 1
+2 1
+2 3
+2 1
-4 1
+4 2
+14 4
+1 2
+1 3
-64 5
+1 1
-1 3
+4 3
+1 1
+1 2
+1 2
+32 2
2565 3
fn=(98)
837 8
+1 1
-1 1
-75 1
+86 1
-86 4
+80 2
+3 3
cfi=(33)
cfn=(100)
calls=1 30
* 218
* 1
+1 3
+9 1
121 1
857 2
121 2
859 2
-97 5
-10 1
+4 1
+1 1
+1 1
+2 1
+2 1
cfi=(34)
cfn=(104)
calls=1 213
* 2201
* 1
+1 3
+8 4
+71 2
+21 9
-15 4
cfi=(20)
cfn=(48)
calls=1 129
* 18
+1 2
fn=(112)
588 1
+2 1
-2 1
+3 2
-1 3
+1 3
cfi=(24)
cfn=(114)
calls=1 2080
* 2113
* 1
+2 2
fl=(14)
fn=(30)
32 4
+8 6
+4 2
+16 5
fl=(8)
fn=(24)
34 2
+4 4
+3 3
+4 1
-4 1
+4 1
-4 1
+3 1
+1 2
+1 4
+1 4
+1 3
+1 2
+7 2
+1 7
+7 3
+4 2
+2 4
+40 2
+4 4
+1 2
+3 1
+7 1
-8 1
+4 1
+2 1
-2 1
+4 2
+3 2
+50 3
74 2
+3 3
+3 1
-3 1
+3 1
+2 3
+2 2
+7 3
-5 3
fl=(24)
fn=(150) open_path
1932 24
+1 3
+6 3
-6 3
+6 3
+5 33
-7 3
-1 3
+8 21
+3 9
+9 12
+7 9
+1 3
-13 9
+12 3
cfi=(20)
cfn=(74)
calls=3 116
* 36
* 3
+55 6
-22 18
-32 6
+32 30
-32 20
+3 48
+4 60
cfi=(20)
cfn=(74)
calls=10 116
* 127
* 40
cfi=(20)
cfn=(74)
calls=10 116
* 120
+3 20
+3 30
+3 90
cfn=(118) open_verify.constprop.7
calls=10 1598
* 550
* 10
+2 50
+2 16
+89 27
-45 28
-64 28
+85 21
+7 3
-2 3
+2 9
+3 9
-13 6
-38 8
+2 4
-46 4
+25 16
+1 64
+6 16
+2 16
-2 16
+2 16
cfi=(49)
cfn=(152)
calls=8 34
* 101
* 8
+3 8
-3 8
+1 1
+2 1
-2 1
+2 7
-37 2
+37 7
-37 14
fn=(114)
2080 49
+8 7
-8 14
+8 7
+1 28
+3 56
ob=(7)
fl=(111)
fn=(620)
244 420
+2 630
-5 630
+5 954
-5 1584
+7 210
+1 420
fn=(634) la_cdr
260 24784
+1 30980
+1 24784
+5 12392
fn=(672) la_write_bytes
466 7
+1 3
+1 4
+1 4
+3 3
cfi=(110)
cfn=(456)
calls=1 11
* 13
* 3
cob=(3)
cfi=(116)
cfn=(484)
calls=1 88
* 392
* 1
* 1
+1 2
+1 1
+1 1400
+3 1120
+1 1960
cob=(3)
cfi=(134) /build/glibc-OTsEL5/glibc-2.27/libio/iofwrite.c
cfn=(676) fwrite
calls=280 31
* 77375
* 280
+1 840
-6 843
+8 2
+4 5
fn=(640) la_hashmap_set
321 168
+1 126
+1 168
+3 168
+1 210
+1 294
cfi=(110)
cfn=(452) hashmap_set
calls=42 440
* 262086
+1 42
+1 84
fn=(654) la_sum
33 3451
+1 493
+1 493
+1 2958
+1 3944
+1 3944
+4 2958
-7 4437
+9 1972
+1 2958
cfi=(110)
cfn=(428)
calls=493 -9
* 3845843
+1 2465
fn=(644) la_diff
48 546
+2 234
+1 312
+1 234
+5 468
+4 234
+1 78
+1 234
+1 312
+1 312
+4 234
-7 468
+9 312
+1 468
cfi=(110)
cfn=(428)
calls=78 -36
* 584286
+2 390
fn=(650) la_hashmap_get
304 168
+1 126
+1 168
+1 252
cfi=(110)
cfn=(604) hashmap_get
calls=42 477
* 38459
* 42
+2 84
cfi=(110)
cfn=(460)
calls=42 44
* 316524
* 42
+1 84
cfi=(110)
cfn=(460)
calls=42 44
* 317154
* 126
+1 84
+4 126
+1 168
+2 42
+1 84
fn=(462)
488 256
+1 128
+1 192
cfi=(110)
cfn=(428)
calls=32 36
* 32230
* 32
+2 128
cfi=(110)
cfn=(440)
calls=32 71
* 36188
* 32
+1 192
cfi=(110)
cfn=(464)
calls=32 +93
* 102108
+1 192
fn=(652) la_cons
269 24868
+1 12434
cfi=(110)
cfn=(460)
calls=6217 44
* 51341314
* 6217
+1 24868
+1 31085
+1 6217
+1 12434
fn=(662) la_modulo
103 231
+1 99
+1 132
+1 264
+3 99
+1 99
+1 231
+1 198
cfi=(110)
cfn=(428)
calls=33 -76
* 256425
+1 165
fn=(638) la_equal
147 2925
+1 1755
+1 2340
+2 1755
+4 3510
+4 585
+1 7020
+1 1755
cfi=(110)
cfn=(456)
calls=585 11
* 7605
* 2340
cfi=(110)
cfn=(456)
calls=585 11
* 7605
* 1755
cob=(3)
cfi=(114)
cfn=(470)
calls=585 -17
* 15062
* 585
* 2925
+10 2032
+1 2340
fl=(98) /home/david/Lateral/src/lateral.c
fn=(378) main
13 8
+1 2
cfi=(99)
cfn=(380)
calls=1 +12
* 99746
+3 2
+1 6
cfi=(110)
cfn=(428)
calls=1 +18
* 65
* 1
+1 3
+1 3
+2 2
cfi=(110)
cfn=(432) envir_init
calls=1 569
* 1866
* 1
+1 2
+1 2
cfi=(111)
cfn=(436)
calls=1 496
* 172929
+2 2
cfi=(115)
cfn=(480)
calls=1 243
* 46927760
+1 2
+1 5
cfi=(115)
cfn=(480)
calls=1 243
* 2274632543
+1 2
+2 2
cob=(3)
cfi=(135) /build/glibc-OTsEL5/glibc-2.27/stdlib/exit.c
cfn=(694) exit
calls=1 139
* 2069
* 1
fl=(133)
fn=(622) envir_pop2
102 26025
+1 26025
+1 17350
+1 26025
cfi=(110)
cfn=(624) envir_free
calls=8675 581
* 2662971
+1 17350
+1 26025
fn=(618) eval_ast
136 8610
+1 5740
+1 3030
cfi=(110)
cfn=(600) envir_search
calls=606 599
* 512832
* 606
+1 1212
+4 1212
+1 3316
+1 828
+1 1656
+1 828
+1 13368
cfn=(595) evaluate'2
calls=2228 +27
* 2200125025
* 2228
+1 8912
+4 11140
cfi=(110)
cfn=(566)
calls=2228 +55
* 15139995
* 2228
+1 4456
+1 1656
+2 2484
-10 2484
+10 4200
-10 6684
+12 1656
+1 4
+11 1
+2 5740
fn=(619) eval_ast'2
136 600042
+1 400028
+1 345140
cfi=(110)
cfn=(600)
calls=69028 599
* 537344310
* 69028
+1 138056
+4 138056
+1 123916
+1 29588
+1 59176
+1 29588
+1 483840
cfn=(595)
calls=80640 +27
* 5751530918
* 80640
+1 322560
+4 403200
cfi=(110)
cfn=(566)
calls=80640 +55
* 661180980
* 80640
+1 161280
+1 59176
+2 88764
-10 88764
+10 153156
-10 241920
+12 59176
+1 5564
+11 1391
+2 400028
fn=(598) is_macro
109 555410
+1 444328
+1 120168
+1 160224
+1 200280
cfi=(110)
cfn=(600)
calls=40056 599
* 704884759
* 40056
+1 201952
+1 88
+3 111038
+1 222164
fn=(614) envir_push2
69 43375
+1 26025
cfi=(110)
cfn=(616) list_length
calls=8675 191
* 373918
* 8675
+1 26025
cfi=(110)
cfn=(616)
calls=8675 191
* 373918
* 8675
+2 60725
+9 34700
cfi=(110)
cfn=(432)
calls=8675 569
* 5897200
* 8675
+1 17350
+1 177304
cfi=(110)
cfn=(464)
calls=22163 586
* 187363785
+1 66489
+1 66489
-3 114677
+6 26025
+1 26025
+1 17350
+1 8675
+1 17350
fn=(596) macro_expand
121 553210
+1 110642
+1 264
cfi=(110)
cfn=(600)
calls=44 599
* 14036
* 44
+1 132
+2 132
+1 220
cfn=(614)
calls=44 -58
* 1043685
* 44
+1 132
+1 220
cfn=(595)
calls=44 +46
* 4898851
* 44
+2 88
cfn=(622)
calls=44 -29
* 11308
-9 553430
cfn=(598)
calls=110686 -13
* 706842705
* 221372
+11 110642
+1 221284
fn=(597) macro_expand'2
121 1980
+1 2376
cfn=(598)
calls=396 -13
* 97762
* 792
+11 396
+1 792
fn=(648)
24 105
+1 84
+2 84
+1 63
+1 105
cfn=(614)
calls=21 +40
* 327076
* 21
+1 42
+7 126
cfn=(595)
calls=21 175
* 33689352
* 21
+1 42
cfn=(622)
calls=21 +64
* 6111
+1 42
+4 42
fn=(594)
175 512
+1 576
+4 320
cfn=(596)
calls=64 -59
* 6001103
* 64
+2 256
+1 320
cfi=(110)
cfn=(606) obj_eq_sym
calls=64 +55
* 3904
* 128
+1 208
+1 416
cfn=(595)
calls=52 -10
* 2172882443
* 52
+1 312
cfi=(110)
cfn=(464)
calls=52 586
* 1201624
+1 104
+1 60
cfi=(110)
cfn=(606)
calls=12 +50
* 732
* 24
+1 8
+1 10
+1 12
+1 8
+4 8
+1 12
cfi=(110)
cfn=(428)
calls=2 36
* 7881
* 2
+1 12
cfi=(110)
cfn=(464)
calls=2 586
* 9222
+1 4
+1 50
cfi=(110)
cfn=(606)
calls=10 +38
* 610
* 20
+8 50
cfi=(110)
cfn=(606)
calls=10 +30
* 610
* 20
+15 50
cfi=(110)
cfn=(606)
calls=10 +15
* 610
* 20
+13 50
cfi=(110)
cfn=(606)
calls=10 +2
* 610
* 20
+11 50
cfi=(110)
cfn=(606)
calls=10 -9
* 610
* 20
+6 50
cfi=(110)
cfn=(606)
calls=10 -15
* 610
* 20
+2 50
cfi=(110)
cfn=(606)
calls=10 -17
* 610
* 20
+7 50
cfi=(110)
cfn=(606)
calls=10 -24
* 610
* 20
+1 4
+1 5
+1 3
cfi=(110)
cfn=(616)
calls=1 -74
* 37
* 1
+2 4
+4 4
cfi=(110)
cfn=(432)
calls=1 569
* 476
* 1
+1 3
+1 3
+1 2
+1 1
+1 3
+1 4
+1 5
cfn=(595)
calls=1 175
* 2708
* 1
+1 6
cfi=(110)
cfn=(464)
calls=1 586
* 2287
+1 4
-5 6
+7 5
cfn=(595)
calls=1 175
* 34340738
* 1
+1 3
+2 3
cfi=(110)
cfn=(624)
calls=1 581
* 326
+1 2
+3 45
cfn=(618)
calls=9 136
* 184326
* 9
+1 36
+4 27
+1 36
+1 6
cfi=(111)
cfn=(672)
calls=1 466
* 84259
* 1
+1 32
+1 24
+1 24
+1 40
cfn=(614)
calls=8 69
* 33763
* 8
+1 16
+11 48
cfn=(595)
calls=8 175
* 15713806
* 8
+2 16
cfn=(622)
calls=8 102
* 2430
+1 16
+21 320
fn=(595)
175 887792
+1 643636
+4 554870
cfn=(596)
calls=110578 -59
* 708581382
cfn=(597)
calls=396 -59
* 104098
* 110974
+2 443896
+1 199740
cfi=(110)
cfn=(606)
calls=39948 +55
* 2466708
* 79896
+1 168
+1 336
cfn=(595)
calls=42 -10
* 25052583
* 42
+1 252
cfi=(110)
cfn=(464)
calls=42 586
* 19824
+1 84
+1 199530
cfi=(110)
cfn=(606)
calls=39906 +50
* 2473110
* 79812
+12 199530
cfi=(110)
cfn=(606)
calls=39906 +38
* 2473110
* 79812
+1 180
+1 225
+3 225
+1 180
+1 270
cfi=(110)
cfn=(428)
calls=45 36
* 332667
* 45
+1 199305
cfi=(110)
cfn=(606)
calls=39861 +30
* 2461401
* 79722
+1 58604
cfn=(595)
calls=8372 -34
* 64269081
* 8372
+1 33488
+1 69163
+1 5090
+1 5090
+5 7126
cfn=(595)
calls=1018 -43
* 14307185853
* 1018
+3 44124
cfn=(595)
calls=7354 -46
* 248436896246
* 7354
+2 157445
cfi=(110)
cfn=(606)
calls=31489 +15
* 1963562
* 62978
+1 774
+1 258
+1 6534
+3 6534
cfn=(595)
calls=1089 -54
* 102337463
* 1089
+1 3267
+1 1806
cfn=(595)
calls=258 -56
* 249392787
* 258
+2 3324
-8 3267
+11 156155
cfi=(110)
cfn=(606)
calls=31231 +2
* 1942271
* 62462
+1 1170
+1 3900
cfn=(595)
calls=390 -63
* 19382091
* 1560
+4 1170
+3 780
+2 154205
cfi=(110)
cfn=(606)
calls=30841 -9
* 1918481
* 61682
+1 657
+1 219
+1 1236
-1 4461
cfn=(595)
calls=428 -74
* 26475014
* 1712
+3 657
+1 153110
cfi=(110)
cfn=(606)
calls=30622 -15
* 1904784
* 61244
+1 352
+1 152670
cfi=(110)
cfn=(606)
calls=30534 -17
* 1890914
* 61068
+1 90
+1 30
+1 456
cfn=(595)
calls=76 -83
* 41197005
+1 228
-2 530
+4 180
cfn=(595)
calls=30 -86
* 2174276
* 30
+1 152520
cfi=(110)
cfn=(606)
calls=30504 -24
* 1897586
* 61008
+1 388
+1 485
+1 291
cfi=(110)
cfn=(616)
calls=97 -74
* 6361
* 97
+2 388
+4 388
cfi=(110)
cfn=(432)
calls=97 569
* 54280
* 97
+1 291
+1 291
+1 194
+1 97
+1 669
+1 892
+1 1115
cfn=(595)
calls=223 175
* 7347493
* 223
+1 1338
cfi=(110)
cfn=(464)
calls=223 586
* 1641337
+1 892
-5 960
+7 485
cfn=(595)
calls=97 175
* 88274460
* 97
+1 291
+2 291
cfi=(110)
cfn=(624)
calls=97 581
* 25366
+1 194
+3 152035
cfn=(619)
calls=29588 136
* 6415585950
cfn=(618)
calls=819 136
* 2215160406
* 30407
+1 121628
+4 91221
+1 121628
+1 130830
cfi=(111)
cfn=(668)
calls=150 404
* 1314823
cfi=(111)
cfn=(666)
calls=624 +83
* 4964148
cfi=(111)
cfn=(664)
calls=33 91
* 260415
cfi=(111)
cfn=(662)
calls=33 103
* 257943
cfi=(111)
cfn=(660)
calls=34 115
* 986
cfi=(111)
cfn=(658)
calls=124 -20
* 82656
cfi=(111)
cfn=(654)
calls=493 33
* 3875916
cfi=(111)
cfn=(652)
calls=6217 -27
* 51459437
cfi=(111)
cfn=(650)
calls=42 +8
* 673733
cfi=(111)
cfn=(646)
calls=1 +36
* 34331140
cfi=(111)
cfn=(644)
calls=78 48
* 589122
cfi=(111)
cfn=(642)
calls=114 127
* 3249
cfi=(111)
cfn=(640)
calls=42 +25
* 263346
cfi=(111)
cfn=(638)
calls=585 147
* 63894
cfi=(111)
cfn=(636)
calls=673 174
* 5154014
cfi=(111)
cfn=(634)
calls=6196 -36
* 92940
cfi=(111)
cfn=(632)
calls=6155 -45
* 92325
cfi=(111)
cfn=(628)
calls=1 -1
* 2171
cfi=(111)
cfn=(620)
calls=210 -58
* 3914290
* 21805
+1 34408
+1 25806
+1 25806
+1 43010
cfn=(614)
calls=8602 69
* 193358906
* 8602
+1 17204
+11 51612
cfn=(595)
calls=8602 175
* 253142622106
* 8602
+2 17204
cfn=(622)
calls=8602 102
* 2781922
+1 17204
+19 355130
cfn=(618)
calls=607 136
* 527399
cfn=(619)
calls=70419 136
* 539032975
+2 554870
fl=(110)
fn=(432)
569 35096
+1 17548
cob=(3)
cfi=(100)
cfn=(386)
calls=8774 3028
* 766272
* 8774
* 8774
+1 17548
+4 26322
cfn=(434) hashmap_init
calls=8774 386
* 4985748
* 26322
+1 17548
+1 17548
+1 8774
+1 17548
fn=(454) obj_hash
131 22689788
+1 17017341
+2 22690480
+1 336
+1 17017089
cfn=(456)
calls=5672363 11
* 73740718
* 11344726
cfn=(458) str_hash
calls=5672363 -15
* 492863372
* 5672363
+1 336
+1 84
+1 84
+1 736
cfn=(455) obj_hash'2
calls=184 -9
* 49772
* 920
+1 552
-2 804
+4 168
+8 11344894
fn=(455)
131 896
+1 672
+2 2256
+1 64
+1 624
cfn=(456)
calls=208 11
* 2644
* 416
cfn=(458)
calls=208 -15
* 40768
* 208
+1 64
+1 16
+1 16
+1 160
cfn=(455)
calls=40 -9
* 11128
* 200
+1 120
-2 168
+4 32
+8 448
fn=(460)
44 699408
+1 466272
+1 699408
cfn=(428)
calls=116568 -10
* 941381509
+1 582840
fn=(610)
95 62464
+1 78080
+3 24318
+1 16212
+1 16212
cfn=(611) obj_mark'2
calls=4053 -6
* 939695
+1 16212
cfn=(611)
calls=4053 -7
* 6297027
* 4053
-5 11563
+22 31232
fn=(611)
95 959152
+1 1198940
+3 1335396
+1 890264
+1 452972
cfn=(611)
calls=113243 -6
* 7791212
+1 452972
cfn=(611)
calls=113243 -7
* 2528121622
* 113243
+1 867272
+1 7836
cfn=(611)
calls=1959 -9
* 243504
+1 7836
cfn=(611)
calls=1959 -10
* 1973589
* 1959
+1 429456
+1 54
+1 36
+1 5760
+1 576
+1 1917
+1 1917
+1 1917
cfn=(611)
calls=639 -18
* 23502
+1 1917
cfn=(611)
calls=639 -19
* 20142
+1 1917
-5 3645
-2 2970
-11 17222
+22 479576
fn=(616)
191 52344
+1 69792
+4 17448
+1 17448
+1 179096
+3 44774
+1 134322
-5 186666
+8 17448
+1 34896
fn=(428)
36 1098270
+1 244060
cfi=(99)
cfn=(430)
calls=122030 -7
* 979109231
* 122030
+1 366090
+1 610150
+1 244060
+1 122030
+1 244060
fn=(566)
208 435645
+1 174258
+1 62282
cfn=(460)
calls=31141 44
* 251925955
* 31141
+1 93423
+1 93423
+1 62282
+3 223952
+5 167964
+5 279940
+6 111976
cfn=(460)
calls=55988 44
* 452820857
* 55988
+1 167964
+1 167964
+1 55988
+1 174258
fn=(602) envir_get
595 28248870
+1 33898644
cfn=(604)
calls=5649774 477
* 1095365301
+1 11299548
fn=(604)
477 28249080
+1 16949448
cfn=(454)
calls=5649816 131
* 672571444
* 45198528
+1 50848344
+1 28249080
+1 7655732
+3 5812449
+2 11624898
cfn=(466) obj_equals
calls=1937483 153
* 194357821
* 3874966
+1 300540
+1 200360
+2 5511909
-7 10977759
+10 1721770
+3 11299632
fn=(606)
238 1724990
+1 1379992
+4 1034994
cfn=(456)
calls=344998 11
* 4484974
* 344998
+1 1724990
cob=(3)
cfi=(114)
cfn=(470)
calls=344998 144
* 8636517
* 344998
* 1034994
+1 689996
fn=(626)
498 10
+1 6
cfn=(454)
calls=2 131
* 320
* 16
+1 18
+1 10
+3 4
+1 2
+1 6
+2 12
cfn=(466)
calls=2 153
* 30
* 4
+1 6
+1 10
+1 12
+4 4
-10 6
+18 4
fn=(438)
590 12
+1 8
cfn=(440)
calls=2 71
* 410
* 2
+1 14
cfn=(452)
calls=2 440
* 592
+1 6
fn=(440)
71 8435
+1 5061
cob=(3)
cfi=(112)
cfn=(444)
calls=1687 -20
* 26713
* 1687
* 10122
cfn=(446)
calls=1687 -23
* 12146806
+1 3374
fn=(630)
79 7
+1 3
cfn=(434)
calls=1 386
* 1275
* 1
+1 4
+1 6
cfn=(428)
calls=1 -46
* 852
+1 5
fn=(446)
49 40410
+1 8980
+3 31220
cob=(3)
cfi=(113) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcpy-ssse3.S
cfn=(450) __strncpy_ssse3
calls=4460 -21
* 117188
* 4460
+1 13380
+1 26760
cfn=(428)
calls=4460 -19
* 33427066
* 4460
+1 26760
+1 8920
+2 150
cob=(3)
cfi=(100)
cfn=(386)
calls=30 3028
* 3667
* 30
* 30
+1 60
+4 210
cob=(3)
cfi=(113)
cfn=(450)
calls=30 -32
* 2713
* 30
+1 150
+1 120
+1 180
cfn=(428)
calls=30 -31
* 181548
+2 22450
fn=(452)
440 135366
+1 225610
+1 6
cfn=(472) hashmap_resize
calls=2 -27
* 657161
+3 67683
cfn=(454)
calls=22561 131
* 1853843
* 180488
+1 270732
+1 43952
cfn=(460)
calls=21976 44
* 177986176
* 21976
+1 65928
+1 65928
+2 219760
+1 131856
+2 5265
+1 585
+1 4466
cfn=(466)
calls=638 153
* 64397
* 1276
+2 256
+1 64
+1 2870
+2 1042
cfn=(460)
calls=521 44
* 4088394
* 521
+1 1563
+1 1563
+2 1042
cfn=(460)
calls=521 44
* 4096884
* 521
+1 1563
+1 1563
+1 2605
+1 521
+2 159
-17 1914
+20 45122
fn=(453) hashmap_set'2
440 408
+1 680
+4 204
cfn=(454)
calls=68 131
* 8956
* 544
+1 816
+1 116
cfn=(460)
calls=58 44
* 445420
* 58
+1 174
+1 174
+2 580
+1 348
+2 90
+1 10
+1 77
cfn=(466)
calls=11 153
* 1127
* 22
+4 55
+2 20
cfn=(460)
calls=10 44
* 92118
* 10
+1 30
+1 30
+2 20
cfn=(460)
calls=10 44
* 92268
* 10
+1 30
+1 30
+1 50
+1 10
+2 3
-17 33
+20 136
fn=(600)
599 548670
+2 109734
+1 16648908
+1 11099272
+1 19192
-3 28248870
cfn=(602)
calls=5649774 -6
* 1168812363
* 16949322
+6 100138
+1 219468
fn=(466)
153 11628804
+1 5814402
+1 114
ob=(1)
fl=(24)
fn=(114)
2092 69
+5 182
+2 78
cfi=(36)
cfn=(116)
calls=26 282
* 3069
* 52
+4 46
+1 69
+3 11
+1 11
+1 11
-1 11
+1 11
cfi=(21)
cfn=(56)
calls=11 144
* 396
* 22
2391 63
2125 12
+10 12
-53 4
+89 8
-2 4
+2 4
cfi=(29)
cfn=(84)
calls=4 24
* 116
* 8
2322 5
cfn=(82) expand_dynamic_string_token
calls=1 320
* 154
* 1
-2 1
+3 5
+4 9
cfn=(118)
calls=1 1598
* 208
+3 2
-3 1
+3 3
+12 3
+46 1
+1 3
-1 1
+1 9
cfn=(126) _dl_map_object_from_fd
calls=1 808
* 1347
-1 3
+1 9
-1 3
+1 27
cfn=(126)
calls=3 808
* 4990
* 12
2171 3
+4 6
cfi=(13)
cfn=(28)
calls=3 79
* 66
* 3
+2 3
-2 3
+2 3
+7 12
+36 36
cfn=(150)
calls=3 1932
* 1873
+6 6
-6 3
+6 9
601 9
+3 1
2227 1
604 1
2314 6
+28 12
+2 6
610 1
2249 1
-14 1
+14 3
-14 2
+14 2
+2 9
+4 6
cfi=(50)
cfn=(154)
calls=3 187
* 4385
+2 3
-2 3
+2 3
+4 6
+8 9
+23 30
cfn=(118)
calls=3 1598
* 640
+4 6
-4 3
+4 9
+1 6
-88 21
601 9
2219 6
+1 6
-32 3
+1 6
-1 9
+8 21
-3 12
601 12
+3 1
2194 1
604 1
+3 3
+3 11
2208 9
607 3
fn=(126)
808 44
+10 4
-10 4
+10 4
-10 12
+10 4
cfi=(31)
cfn=(92)
calls=4 49
* 32
fi=(40) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/posix/dl-fileid.h
37 12
fe=(24)
818 4
fi=(40)
37 4
cfi=(41)
cfn=(130)
calls=4 -3
* 40
* 8
+4 4
fe=(24)
834 4
fi=(40)
40 4
+1 4
fe=(24)
834 66
+1 28
fi=(40)
49 46
fe=(24)
1346 36
852 8
+24 16
+10 8
+22 16
+32 8
819 4
943 28
cfi=(17)
cfn=(38)
calls=4 59
* 1424
+1 4
-1 4
+1 4
+11 8
+5 4
-5 4
+1 4
+5 4
-5 4
+1 4
+2 4
-2 4
+2 8
+1 12
+20 4
-2 4
+10 4
-8 24
+8 4
-8 12
+8 4
+97 4
982 4
-6 4
1085 4
981 4
-5 8
1085 12
-96 58
-1 186
+1 175
+6 8
+5 8
+1 16
+11 40
+5 64
+9 24
-1 24
+1 8
+1 16
+2 8
-2 8
+1 8
-1 8
+3 8
+4 8
-7 8
+3 8
-1 8
+5 8
+1 16
+5 8
-1 4
-14 4
+14 4
+1 24
+10 4
-10 8
-1 4
-14 4
+14 4
+1 24
+10 4
-44 2
+1 1
+46 3
+4 1
+1 1
+2 1
-1 1
-1 2
+1 1
+3 3
+1 1
+3 1
-3 1
+7 4
+6 1
cfi=(32)
cfn=(162)
calls=1 51
* 6
* 2
+1 1
+19 8
+1 8
+1 4
-6 8
+1 4
+8 16
956 4
1110 4
956 4
1110 4
+10 12
fi=(43) /build/glibc-OTsEL5/glibc-2.27/elf/./dl-map-segments.h
50 4
+6 4
fe=(24)
1120 16
fi=(43)
56 12
fe=(24)
1120 4
fi=(43)
50 4
fe=(24)
1120 8
fi=(43)
56 8
cfi=(42)
cfn=(132)
calls=4 -12
* 148
+4 4
-4 4
+4 8
+3 8
+1 4
+2 4
-2 4
-1 4
+3 4
+14 8
fi=(45) /build/glibc-OTsEL5/glibc-2.27/elf/./dl-load.h
+10 16
+1 12
+2 16
fi=(43)
+11 32
+45 8
-59 40
+2 24
+2 32
cfi=(42)
cfn=(132)
calls=4 -50
* 132
* 8
+16 4
+2 4
-2 4
+1 4
+2 4
-1 4
+1 4
-1 12
+8 8
+3 8
+8 28
cfi=(28)
cfn=(76)
calls=4 -22
* 763
* 8
+6 8
+4 16
cfi=(42)
cfn=(132)
calls=2 -97
* 66
+3 4
-71 40
cfi=(44)
cfn=(136)
calls=4 +5
* 20
* 8
fi=(45)
+21 15
+2 3
-1 9
+1 3
-1 3
+1 6
-1 6
+3 12
fe=(24)
1132 16
+9 8
fi=(3)
42 4
fe=(24)
1141 4
fi=(3)
42 4
+6 4
-2 4
+2 8
+15 4
+5 4
+3 4
-1 4
-3 4
-3 84
+10 19
-26 57
+16 75
+10 75
-26 225
+26 4
-26 12
+2 196
+13 92
+2 16
+16 8
+20 13
+1 16
+1 16
+1 16
+2 16
+5 16
+1 15
+1 16
+6 12
+5 8
+7 8
+1 12
+18 12
+5 2
+2 2
-2 2
+2 2
+2 4
+2 4
+3 12
+10 2
-8 8
+8 2
+5 4
+3 8
fe=(24)
1148 8
+15 12
+19 8
+2 20
+54 12
+1 2
+3 2
cfi=(46)
cfn=(142)
calls=1 27
* 5
* 6
cfi=(46)
cfn=(142)
calls=3 27
* 15
* 8
+9 8
+2 12
+2 4
-2 4
+2 4
+16 8
cfi=(6)
cfn=(10)
calls=4 939
* 92
+4 8
+1 8
+17 8
+1 1
+8 1
-5 3
+5 4
-5 9
+5 3
+10 8
+10 12
cfi=(17)
cfn=(50)
calls=4 31
* 180
+4 12
fi=(3)
68 16
+3 16
+1 4
+1 16
180 3
-18 2
fe=(24)
369 4
fn=(118)
1598 154
+39 14
-39 42
+39 54
+31 56
cfi=(37)
cfn=(120)
calls=14 39
* 254
+2 14
-2 14
+2 18
+10 4
+1 8
+5 24
cfi=(39)
cfn=(124)
calls=4 27
* 20
+2 8
+2 4
+2 4
-2 4
+2 4
+6 8
+16 64
+74 8
+5 8
+2 16
+6 8
+11 8
+6 4
+1 4
+1 4
-2 12
+1 12
+21 176
+2 78
+13 12
+3 16
+1 4
+12 24
-3 30
+15 2
+3 1
+1 3
+1 1
-1 1
-1 1
+3 3
+1 3
1650 10
1918 126
1714 2
1871 24
+3 4
-4 4
+4 8
+5 1
+1 2
-55 6
fn=(66)
623 1
+13 2
-13 8
+13 3
cfi=(25)
cfn=(68)
calls=1 42
* 711
+5 1
-5 1
+5 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+1 1
-2 1
+2 2
+8 1
-1 1
+1 4
-1 3
+4 4
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+2 1
-2 2
+2 1
+7 1
+10 1
-11 1
+12 1
+3 1
+1 1
-5 1
+3 1
+1 1
-1 1
+9 1
-20 1
+17 1
+3 1
-3 17
cfi=(28)
cfn=(76)
calls=4 109
* 48
+3 27
-12 3
-2 3
+10 3
-7 3
-1 3
+4 3
-1 3
+1 3
+1 3
+3 3
+1 3
-4 3
+4 3
+14 1
-11 1
+6 1
+1 1
+5 2
+2 4
+2 3
+38 5
-19 1
-2 2
+2 2
+21 3
cfi=(13)
cfn=(28)
calls=1 79
* 16
* 8
cfi=(20)
cfn=(48)
calls=1 129
* 10
* 1
+5 4
-1 2
+2 56
-1 57
+5 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+1 1
-2 1
+2 1
+6 7
cfn=(78) fillin_rpath
calls=1 389
* 584
+3 3
+6 1
+4 8
-37 2
fn=(78)
389 7
+2 1
-2 9
+4 3
cfi=(19)
cfn=(80)
calls=1 265
* 238
* 3
cfi=(19)
cfn=(80)
calls=1 265
* 6
* 6
ob=(7)
fl=(110)
fn=(466)
157 11628462
+4 7752308
+1 48
+1 102
+1 102
-2 238
cfn=(467) obj_equals'2
calls=34 -9
* 3898
* 336
cfn=(467)
calls=48 -9
* 4923
* 392
+4 168
+1 80
+2 16
+4 23256348
+6 5814087
cfn=(456)
calls=1938029 11
* 25194377
* 7752116
cfn=(456)
calls=1938029 11
* 25194372
* 5814087
cob=(3)
cfi=(114)
cfn=(470)
calls=1938029 -35
* 47120914
* 1938029
* 7752116
+10 7752536
fn=(467)
153 576
+1 288
+1 24
+2 504
+4 336
+1 4
+1 30
+1 30
-2 70
cfn=(467)
calls=10 -9
* 748
* 28
cfn=(467)
calls=4 -9
* 400
* 100
+4 24
+3 8
+4 960
+6 240
cfn=(456)
calls=80 11
* 1030
* 320
cfn=(456)
calls=80 11
* 1018
* 240
cob=(3)
cfi=(114)
cfn=(470)
calls=80 -35
* 2207
* 80
* 320
+10 384
fn=(472)
415 8
+1 10
cfn=(434)
calls=2 -30
* 7805
* 2
+1 4
+1 960
+1 96
+1 339
+1 339
+1 339
+1 339
+1 408
cfn=(453)
calls=68 +16
* 644657
+2 339
-7 627
-2 488
+12 8
+3 6
+1 8
+1 6
+3 6
cfn=(474) hashmap_free
calls=2 -27
* 361
+1 6
fn=(612)
86 475440
+1 1516372
+1 921904
+1 84
cob=(3)
cfi=(100)
cfn=(478)
calls=21 3086
* 1810
* 21
+4 21
-3 475356
+3 356580
fn=(464)
586 135102
+1 157619
cfn=(452)
calls=22517 440
* 189987943
+1 67551
fn=(434)
386 35108
+1 17554
+1 8681
+1 17362
cob=(3)
cfi=(100)
cfn=(386)
calls=8681 3028
* 1044741
* 8681
* 192
cob=(3)
cfi=(100)
cfn=(386)
calls=96 3028
* 5004
* 96
* 8777
+1 17554
+4 26331
+1 17554
+2 70216
cob=(3)
cfi=(100)
cfn=(386)
calls=8777 3028
* 1035809
* 8777
* 26331
+1 35108
+4 17554
+1 705760
+1 776336
+1 776336
-3 308635
+5 8777
+1 17554
fn=(458)
121 17017713
+1 5672571
+1 5672571
+1 5672571
+1 223412780
+1 22341278
-2 196096943
+4 5672571
+1 11345142
fn=(474)
410 35100
+1 35100
cob=(3)
cfi=(100)
cfn=(478)
calls=8775 3086
* 961141
* 8775
+1 26325
cob=(3)
cfi=(100)
cfn=(478)
calls=8775 3086
* 726858
* 8775
+1 26325
fn=(456)
11 29705169
+1 49508615
+1 29703279
+2 1260
+2 19803446
fn=(624)
581 35092
+1 35092
cfn=(474)
calls=8773 410
* 1828038
+1 26319
cob=(3)
cfi=(100)
cfn=(478)
calls=8773 3086
* 729030
* 8773
+1 26319
ob=(1)
fl=(24)
fn=(78)
400 2
+2 3
cfn=(82)
calls=1 -82
* 104
+4 1
-4 1
+4 1
+5 2
cfi=(13)
cfn=(28)
calls=1 79
* 16
+1 2
+7 6
+9 17
+1 8
+57 2
cob=(2)
cfi=(18)
cfn=(88) 0x0000000004000f00
calls=1 0
* 5
* 1
-39 2
+4 7
-1 1
cfi=(19)
cfn=(46)
calls=1 50
* 18
* 1
+3 3
+5 1
+1 2
-2 2
+2 1
cfi=(20)
cfn=(74)
calls=1 116
* 12
+3 1
-2 1
-1 1
+1 1
+2 1
+6 4
+1 17
+1 1
-1 3
+1 1
-1 14
+1 8
-1 1
+1 1
-1 3
+1 1
-1 2
+4 1
-1 1
+1 1
-1 1
+1 1
+8 1
-1 1
+4 3
-37 2
-28 1
+5 4
+66 1
+3 9
-15 2
fn=(82)
320 12
+10 4
-10 2
+10 2
cfi=(29)
cfn=(84)
calls=2 24
* 70
* 4
+15 2
-11 2
+11 8
-11 2
cfi=(30)
cfn=(86)
calls=2 40
* 150
ob=(2)
fl=(18)
fn=(722)
0 3
fn=(766) 0x0000000005272980
0 1
cob=(3)
cfi=(138) /build/glibc-OTsEL5/glibc-2.27/stdlib/cxa_finalize.c
cfn=(710) __cxa_finalize
calls=1 30
0 74
fn=(776)
0 3
fn=(340)
0 6
fn=(298)
0 6
fn=(748)
0 1
cob=(3)
cfi=(138)
cfn=(710)
calls=1 30
0 74
fn=(758)
0 3
fn=(522) 0x0000000004e962c8
0 8
cob=(3)
cfi=(100)
cfn=(478)
calls=8 3086
0 490
fn=(730) 0x0000000004a2a560
0 1
cob=(3)
cfi=(138)
cfn=(710)
calls=1 30
0 74
fn=(740)
0 3
fn=(88)
0 1
cob=(1)
cfi=(19)
cfn=(90)
calls=1 111
0 4
fn=(486) 0x0000000004e962c0
0 6
cob=(3)
cfi=(100)
cfn=(386)
calls=6 3028
0 39036
fn=(708)
0 1
cob=(3)
cfi=(138)
cfn=(710)
calls=1 30
0 74
fn=(362)
0 6
fn=(330)
0 6
ob=(3)
fl=(121)
fn=(504)
32 4
+3 4
-3 8
+3 56
+1 16
cfi=(122) /build/glibc-OTsEL5/glibc-2.27/libio/ioseekoff.c
cfn=(506) _IO_seekoff_unlocked
calls=4 -2
* 1544
* 16
fi=(127) /build/glibc-OTsEL5/glibc-2.27/libio/libioP.h
796 8
+1 32
fe=(121)
39 12
fl=(87) /build/glibc-OTsEL5/glibc-2.27/ctype/ctype-info.c
fn=(320) __ctype_init
31 5
+2 1
+2 1
-4 1
+4 1
-4 1
+2 3
+2 2
+1 1
fl=(96) /build/glibc-OTsEL5/glibc-2.27/setjmp/../sysdeps/x86_64/setjmp.S
fn=(374) __sigsetjmp
26 1
+9 1
+1 2
+1 1
+4 1
+1 1
+1 1
+1 1
+1 1
+2 2
+2 1
+1 1
+1 1
+2 2
+2 1
+8 1
cfi=(97) /build/glibc-OTsEL5/glibc-2.27/setjmp/sigjmp.c
cfn=(376) __sigjmp_save
calls=1 -34
* 8
fl=(102) /build/glibc-OTsEL5/glibc-2.27/malloc/arena.c
fn=(390) ptmalloc_init.part.0
289 2
+5 1
-5 3
+13 2
+6 1
fi=(100)
1816 2
fe=(102)
308 12
fi=(100)
1816 13
+1 1
-1 3
+1 11
-1 390
+1 30
-1 90
+1 331
fe=(102)
313 1
fi=(100)
1825 1
fe=(102)
313 4
fi=(100)
1817 7
+11 1
-11 4
+9 1
fe=(102)
313 1
fi=(100)
1828 1
fe=(102)
313 1
cob=(1)
cfi=(104)
cfn=(400)
calls=1 71
* 1287
* 5
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +59
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +58
* 19
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +57
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +56
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +55
* 19
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +54
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +53
* 18
* 1
+2 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +51
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +50
* 18
* 1
+1 4
cob=(1)
cfi=(9)
cfn=(26)
calls=1 +49
* 18
* 1
+71 2
+1 2
+4 2
-1 1
+1 4
-97 5
cfi=(103) /build/glibc-OTsEL5/glibc-2.27/elf/dl-addr.c
cfn=(392) _dl_addr
calls=1 126
* 60693
* 2
+1 4
fl=(134)
fn=(676)
31 1400
+1 280
-1 280
+1 280
-1 280
+4 560
+2 5040
+1 1401
+1 1
fi=(127)
870 3
+2 2
+1 2
fe=(134)
39 279
fi=(127)
870 837
+2 558
+1 558
fe=(134)
39 1120
cfi=(118) /build/glibc-OTsEL5/glibc-2.27/libio/fileops.c
cfn=(678) _IO_file_xsputn@@GLIBC_2.2.5
calls=280 1220
* 56656
* 840
fi=(127)
796 560
+1 1120
fe=(134)
38 558
fi=(127)
797 1400
fe=(134)
45 560
+1 280
+3 2520
fl=(85) /build/glibc-OTsEL5/glibc-2.27/misc/init-misc.c
fn=(314) __init_misc
31 2
-1 3
+1 4
+2 3
cfi=(86) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strrchr-avx2.S
cfn=(318) __strrchr_avx2
calls=1 +10
* 27
* 1
+4 5
+1 3
+2 4
fl=(72)
fn=(242)
40 1
-2 1
+2 2
-2 2
+11 1
fl=(101) /build/glibc-OTsEL5/glibc-2.27/malloc/hooks.c
fn=(388) malloc_hook_ini
29 5
fi=(102)
291 1
fe=(101)
30 1
fi=(102)
291 1
fe=(101)
30 1
fi=(102)
291 1
fi=(100)
3039 7
+3 1
-2 2
+2 3
+13 4
+2 3
cfn=(418) _int_malloc
calls=1 3521
* 158
+1 1
-1 1
+1 6
-19 4
-56 5
cfn=(416) tcache_init.part.4
calls=1 +3
* 496
+62 3
fe=(101)
33 6
cfi=(102)
cfn=(390)
calls=1 289
* 63153
* 1
fi=(100)
3034 2
fe=(101)
fl=(108) /build/glibc-OTsEL5/glibc-2.27/misc/sbrk.c
fn=(424) sbrk
32 13
+8 13
-8 39
+8 75
+1 2
cfi=(109) /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/brk.c
cfn=(426) brk
calls=1 -10
* 12
* 3
+3 26
+4 72
+12 5
-4 24
cfi=(109)
cfn=(426)
calls=12 -25
* 144
* 24
+4 60
fl=(70)
fn=(232)
30 5
fi=(143) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcspn.c
-1 1
fe=(70)
fn=(262)
30 5
fi=(144) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strspn.c
-1 1
fe=(70)
fn=(246)
30 5
fi=(145) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strpbrk.c
-1 1
fe=(70)
fl=(109)
fn=(426)
31 104
+8 13
-6 26
+7 13
fl=(112)
fn=(444)
52 1735
+1 1735
+1 1735
+3 1735
+1 1735
+1 1735
+3 1378
+1 1378
+1 1378
+8 1378
+19 357
+1 357
+1 357
+1 357
+2 357
+1 357
+1 357
+1 351
+6 351
+1 351
+1 351
+4 351
+1 351
+16 6
+10 6
+1 6
+1 6
+1 6
332 1384
+1 1384
+1 1384
+4 1384
+1 1384
fl=(128)
fn=(538)
34 2
+3 2
-3 2
+3 28
+1 10
cfi=(122)
cfn=(506)
calls=2 -4
* 126
* 2
+1 10
+18 6
fi=(127)
796 4
+1 16
fe=(128)
45 4
fl=(129)
fn=(544)
31 8
+1 4
-1 2
+4 4
+2 16
+1 6
cfi=(117) /build/glibc-OTsEL5/glibc-2.27/libio/genops.c
cfn=(546) _IO_sgetn
calls=2 427
* 880
fi=(127)
796 2
fe=(129)
38 2
fi=(127)
796 2
+1 16
fe=(129)
40 4
-3 26
+4 2
-1 2
+1 12
fl=(57)
fn=(196)
33 12
+3 12
fi=(146) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncpy.c
-7 3
fe=(57)
fn=(266)
33 4
+3 4
fi=(147) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/stpcpy.c
-3 1
fe=(57)
fn=(280)
33 4
+3 4
fi=(148) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncat.c
-7 1
fe=(57)
fn=(264)
33 4
+3 4
fi=(149) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/stpncpy.c
-5 1
fe=(57)
fn=(238)
33 8
+3 8
fi=(150) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcpy.c
-7 2
fe=(57)
fn=(202)
33 4
+3 4
fi=(151) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcat.c
-7 1
fe=(57)
fl=(116)
fn=(484)
88 15
-23 3
+23 6
-23 3
cob=(2)
cfi=(18)
cfn=(486)
calls=3 -65
* 297
+2 9
+3 3
+2 12
-2 3
+2 9
cfi=(117)
cfn=(488) _IO_no_init
calls=3 590
* 180
+1 3
+1 3
-1 3
+1 3
cfi=(118)
cfn=(492) _IO_new_file_init_internal
calls=3 +33
* 297
+4 15
cfi=(118)
cfn=(496) _IO_file_fopen@@GLIBC_2.2.5
calls=3 214
* 430
* 6
-41 6
+53 21
fl=(88)
fn=(322)
488 7
+14 6
758 2
+2 1
+1 1
+2 1
-3 1
+5 1
-5 1
+4 3
+4 2
+3 2
+2 1
+1 1
+2 1
-3 1
+5 1
-5 1
+4 3
+9 1
+2 8
-2 1
+3 8
500 1
+4 1
-4 1
+4 1
cfn=(324) handle_intel.constprop.1
calls=1 259
* 469
+2 1
-2 1
+2 1
cfn=(324)
calls=1 259
* 515
+5 1
-5 1
+5 1
cfn=(324)
calls=1 259
* 542
+8 1
-8 1
+8 1
+11 1
-20 1
+25 3
+4 2
+8 6
+3 2
+9 6
+14 2
+4 1
+3 1
+1 1
-4 1
+3 1
-3 1
+3 1
+6 8
-39 3
+3 9
+6 6
-6 3
+6 2
+3 20
+5 2
+4 1
+1 1
-1 3
691 4
+1 5
+4 2
+59 2
592 2
+8 1
+2 1
-2 6
+2 4
-2 1
+4 1
+23 2
-25 2
+2 6
+2 6
+3 2
+1 8
+2 4
+3 2
+5 1
+2 2
+1 1
-1 1
+2 1
-2 1
+1 2
+27 2
+1 1
+1 2
+2 1
-1 1
+1 1
-24 3
+4 2
+3 1
+2 4
+1 1
+5 2
fn=(326) intel_check_word.isra.0
132 12
+6 6
-10 18
+10 6
-10 6
+10 6
-10 6
+10 12
-10 6
+10 6
+2 6
-2 6
+2 18
250 12
140 24
+2 15
+2 30
+8 30
+51 24
+22 12
fi=(89) /build/glibc-OTsEL5/glibc-2.27/string/../bits/stdlib-bsearch.h
28 12
-1 24
+4 24
+1 12
fe=(88)
+87 24
fi=(89)
-88 138
+1 69
fe=(88)
+87 138
+3 81
fi=(89)
-93 252
+8 15
-8 36
fe=(88)
134 3
255 36
-91 9
+3 9
-6 13
+3 4
+9 4
+5 14
+1 10
+17 5
-32 15
+3 15
+4 14
+2 28
+2 14
+2 8
+4 3
+2 6
+2 3
+2 3
-2 3
+2 6
-2 3
+3 9
-2 12
+2 6
-24 2
+7 2
+2 4
fn=(324)
259 21
+2 3
-2 9
+5 9
+8 3
+1 3
-3 3
+5 12
+6 6
+5 3
-5 9
+5 3
+2 3
+1 3
-1 3
+5 18
cfn=(326)
calls=3 132
* 1035
+2 6
+3 21
cfn=(326)
calls=3 132
* 314
+2 6
+19 33
fl=(125) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/lseek64.c
fn=(526) lseek
35 16
+2 4
fl=(68)
fn=(224)
38 12
+3 12
+6 3
fl=(114)
fn=(470)
144 2288554
+1 2288554
+2 2288554
+1 2288554
+21 2288554
+1 2288554
+1 2271407
+1 2271407
+1 2239225
+1 2239225
+1 2239225
+1 2239225
+21 2239225
+1 2239225
+1 2239225
+1 2239225
+1 2239225
+1 2239225
+1 2239225
+5 6
+1 6
+9 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
-7 49329
+1 49329
+1 49329
+1 49329
+1 49329
+1 49329
+1 49329
+1 49329
+1 36941
+1 18166
+1 18166
+1 18166
+2 18166
+1 18166
+1 18166
+1 18166
+1 18166
+1 18166
-5 18775
+1 18775
+1 18775
+1 18775
+1 18775
+1 18775
+10 12394
+1 12394
+1 12394
+2 12394
+6 12394
+1 12394
+1 12394
+1 12394
+1 12394
+5 12394
+2 75
+1 75
+1 150
+8 75
+1 75
+3 75
+1 75
+1 75
+1 75
+1 75
+1 75
1196 23854
+1 23854
+1 23854
+1 23854
+1 23854
+2 23854
+1 23854
+1 23854
+1 23854
+1 23854
+1 23854
+1 23854
+1 50
+4 50
+1 50
+1 50
+6 50
+1 50
+1 100
+4 50
+1 50
+3 50
+1 50
+1 50
+7 50
+4 50
+1 50
+1 50
+1 50
+1 50
+1 50
+72 1494
+1 1494
+1 1494
+1 1494
+1 1494
+2 1494
+1 1494
+1 1494
+1 1494
+1 1494
+1 1494
+1 1494
1446 1430
+1 1430
+1 1430
+1 1430
+1 1430
+2 1430
+1 1430
+1 1430
+1 1430
+1 1430
+1 1430
+1 1430
+1 673
+4 673
+1 673
+1 673
+6 673
+1 673
+1 1346
+4 673
+1 673
+3 673
+1 673
+1 673
+7 673
+4 673
+1 673
+1 673
+1 673
+1 673
+1 673
+72 4328
+1 4328
+1 4328
+1 4328
+1 4328
+2 4328
+1 4328
+1 4328
+1 4328
+1 4328
+1 4328
+1 4328
1696 2924
+1 2924
+1 2924
+1 2924
+1 2924
+2 2924
+1 2924
+1 2924
+1 2924
+1 2924
+1 2924
+1 2924
1821 1494
+1 1494
+1 1494
+1 1494
+1 1494
+2 1494
+1 1494
+1 1494
+1 1494
+1 1494
+1 1494
+1 1494
2071 1417
+1 1417
+1 1417
+1 1417
+1 1417
+2 1417
+1 1417
+1 1417
+1 1417
+1 1417
+1 1417
+1 1417
2200 798
+2 798
+1 798
+1 798
+1 798
-3 48537
+1 48537
+1 48537
+1 48537
+1 54498
+5 18166
+6 18166
+1 18166
+8 18166
+1 18166
-16 2270388
+6 2270388
+1 2270388
+8 2270388
+1 2270388
fl=(132) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/close.c
fn=(580) __close_nocancel
37 8
+1 2
fl=(131)
fn=(570)
34 6
+14 2
-14 2
+14 4
fi=(127)
796 4
+1 6
fe=(131)
57 2
fi=(127)
870 6
+2 4
+1 4
fe=(131)
57 6
cfi=(118)
cfn=(584) _IO_file_finish@@GLIBC_2.2.5
calls=2 169
* 74
+1 6
+13 4
+3 12
+3 4
cob=(2)
cfi=(18)
cfn=(522)
calls=2 -77
* 142
+4 10
-32 2
cfi=(117)
cfn=(572) _IO_un_link
calls=2 +4
* 188
+2 38
+1 4
+1 4
cfi=(118)
cfn=(574) _IO_file_close_it@@GLIBC_2.2.5
calls=2 +76
* 462
* 8
fi=(127)
797 12
fe=(131)
fl=(100)
fn=(656) malloc_consolidate
4403 60
+19 60
-19 60
+30 60
-30 120
+29 60
-29 60
+32 60
-15 60
+15 120
+1 120
-1 1080
+1 1080
+3 14931
+1 19908
+8 4977
-3 4977
+3 4977
+1 4977
+1 14931
+2 9954
+1 3722
+2 3722
-1 3722
+2 58887
+3 9954
+1 4974
+2 9948
+1 1592
+1 19104
+4 4974
+4 4974
-3 4974
+1 4974
+2 4974
+1 949
+1 949
+3 949
+1 949
+1 949
-2 1898
+3 949
+9 2847
-12 4025
+1 4025
+1 4025
-2 8050
+3 4025
+9 12160
+3 2400
+1 360
-27 10146
+18 3
+1 6
+1 6
-22 102
-8 33
fn=(670) systrim.isra.1.constprop.11
2760 5
+11 3
+2 1
+1 2
-4 1
+8 3
+2 3
+44 1
-49 1
+49 5
fn=(416)
2986 1
-9 1
+9 9
+1 3
cfn=(418)
calls=1 3521
* 389
+1 1
-1 1
+1 1
+8 4
+7 2
+2 1
+1 2
-1 1
+1 78
+3 2
fn=(420) sysmalloc
2274 96
+20 12
+11 12
-11 12
+11 12
+1 48
fi=(102)
535 12
fe=(100)
2321 24
fi=(102)
535 12
fe=(100)
2321 24
+66 12
+1 36
+10 12
-9 12
+9 91
+6 48
+3 36
2724 24
+1 12
+5 24
+3 24
+5 12
-3 12
+3 12
-2 12
+2 36
+1 12
-1 12
-1 12
+4 12
-3 24
+1 12
+2 12
+6 108
2460 36
+19 24
-11 12
+11 12
-11 12
+21 48
cfi=(107) /build/glibc-OTsEL5/glibc-2.27/malloc/morecore.c
cfn=(422) __default_morecore
calls=12 46
* 578
* 12
+1 12
+3 36
+3 48
+1 24
+46 24
+2 24
+6 12
-6 12
+6 34
+1 55
-83 12
+10 24
+8 12
-8 12
+8 12
+67 4
+34 2
+6 3
+22 2
+1 5
+2 1
-2 1
+2 1
+1 4
cfi=(107)
cfn=(422)
calls=1 46
* 25
+12 3
+48 1
+1 1
-2 1
+1 2
+12 1
-12 1
+1 1
+11 1
2544 2
-3 3
+99 2
+1 4
fn=(386)
3028 79293
+5 52862
+1 52862
+5 185010
+3 26430
-2 79290
+2 79290
+3 52860
+10 35376
+2 26532
cfn=(418)
calls=8844 3521
* 2017594
+1 8844
-1 8844
+1 53064
-19 105720
+8 26359
+1 79077
2941 35172
+2 35172
+1 17586
3081 132150
-46 1
+46 3
-46 1
cfi=(101)
cfn=(388)
calls=1 29
* 63866
fn=(418)
3521 53076
+32 8846
-32 8846
+32 79614
+4 53076
+24 17692
+2 17904
+3 5968
+2 11936
+2 1123
-6 2246
+6 3369
+1 1123
+5 3369
+1 2246
+7 4492
-1 2246
+1 2246
+5 3369
+1 4460
+2 29160
+1 7290
2929 14580
+1 7290
-2 14580
+2 14580
-2 7290
+4 21870
3609 21870
+1 19025
1887 107
3682 107
1887 1517
3682 1303
1887 2606
4131 79614
3639 5828
+62 2702
+1 216
+20 7436
-1 14872
+1 7436
-1 7436
+1 14872
-2 37175
+6 22305
+66 7435
-40 14870
3879 7435
3731 7435
+1 7435
+20 14870
+40 14870
-60 14870
-12 1
+6 3
+66 1
-40 2
3879 1
3731 1
+1 1
+20 2
+40 2
-60 13144
+3 31485
+1 20990
+3 10495
+10 10495
-15 10495
+15 28113
+34 6936
-5 6936
+1 6936
+4 6936
+29 5942
+8 949
+1 507
+1 169
-1 169
+4 169
-3 169
+3 169
-4 78
+1 26
-1 26
+4 26
-3 26
+3 26
+5 256
-2 64
+3 128
+6 4
+1 4
-1 4
+1 4
+1 12
+29 8
+9 4
-9 16
+10 4
-9 4
+1 4
+1 4
+1 4
+6 4
-10 5934
+9 2967
-9 11868
+10 2967
-9 2967
+1 2967
+1 2967
+1 2967
+6 2967
+1 502
+8 6695
3642 22953
+2 7651
-2 7651
+2 15302
+2 287
+1 574
+6 287
-4 287
+1 287
+1 287
+2 574
+7 1148
-1 574
+1 861
+5 3145
+3 1104
-2 1803
3814 5552
+1 11104
+1 5552
3703 80
cfn=(656)
calls=40 4403
* 242946
* 147320
-62 95732
3786 3965
-1 3965
+1 7930
+5 11895
+1 15860
1887 1095
3887 8160
+17 5276
+2 288
+3 72
-3 72
+3 144
+68 5276
+1 5276
+1 5276
+1 5276
+1 5276
+5 12280
+14 23784
+2 8921
+2 17842
3820 104
2929 7200
3751 5347
-1 10694
+1 10532
+4 3559
+1 3559
-1 3559
+2 7118
+3 3559
-2 3559
+1 7118
+1 3559
+2 933
+1 933
+3 5598
+6 933
-6 2799
+2 2799
1887 933
3769 933
1887 1866
3766 15756
+6 2626
-6 7878
+2 7878
1887 2626
3769 2626
1887 5252
3720 2
3865 524
-45 52
2930 3600
+2 3600
-2 7200
+1 3600
3796 3600
2932 3600
3795 3600
+1 3600
+47 300
+1 132
+2 6
+1 18
3670 552
+1 552
+1 1104
+1 552
2929 552
3674 552
+1 552
2929 552
+1 552
-2 552
+2 552
-2 552
3670 552
2932 1104
3893 7024
2941 2622
-1 2622
+2 1748
+1 1748
+1 874
3895 874
+95 3498
+3 4360
-3 2304
+3 2980
-3 1196
+3 1752
+97 681
+3 681
-2 1362
+2 1374
+17 36
4008 2971
+3 5942
+2 1014
+1 1014
+1 1014
-2 4056
-27 1074
3850 60
+7 16
-1 32
+1 16
+1 16
+1 32
+2 120
-8 88
3993 469
+2 1876
+1 938
-1 64
+1 32
+24 5871
+3 3914
+5 1957
-3 3914
+3 23991
+3 3914
+3 182
-1 182
+1 364
1887 2626
4103 2626
1887 5252
3993 32
4125 36
cfn=(420)
calls=12 2274
* 2041
+1 12
-1 12
+1 12
1887 36
4046 1775
-5 1775
+6 3550
+8 1775
-6 1775
+1 1775
+1 1775
+1 1775
+3 1775
+1 1772
+1 3550
+2 97
+1 97
+2 873
+2 291
+1 194
-3 15102
+2 5034
+1 3356
+30 669
+3 1338
-3 669
+1 669
+2 2007
+2 669
-2 1338
-1 669
+1 1338
+2 1338
-72 1419
fn=(478)
3086 289894
+5 52708
+1 52708
+6 52708
+5 26350
-2 26350
+2 52700
+18 79050
+2 79050
4149 52700
+6 105400
+1 52700
+4 105400
+9 79050
-2 52700
+3 52700
+1 105380
+13 38602
+11 53616
+2 40212
1894 40212
4218 13404
+7 13404
-6 26808
+6 26808
-2 13404
+2 26808
+4 26808
+2 13404
+1 26808
3125 289894
4259 11794
+3 5897
+1 5897
-1 17691
+10 5897
-4 5897
+4 11794
+3 11794
+5 17691
+3 11794
+1 11794
+1 11794
1894 17691
4291 11794
+1 54
+2 54
-1 54
+2 818
+3 11794
+5 17592
+1 6236
+1 433
+11 433
-1 433
+2 866
-1 5431
-1 5431
+2 10862
+4 5864
-2 5864
+1 5864
+1 5864
+2 91
+1 91
+2 91
+1 91
+2 273
+1 91
+30 182
-34 5773
+1 5773
+2 17319
+1 5773
+30 11612
+20 11794
2929 21147
+3 7049
-2 14098
+1 7049
+1 14098
4277 17691
-2 11794
+32 16293
+34 33
+1 99
+1 66
+18 63
+1 40
cfn=(656)
calls=20 +41
* 39986
+2 63
+2 105
+2 2
cfn=(670)
calls=1 2760
* 25
* 1
-64 11
fl=(130) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
fn=(560) __memcpy_avx_unaligned_erms
217 2
+2 2
+1 2
+1 2
+1 2
+99 2
+1 2
+5 2
+1 2
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+15 1
+1 1
+58 1
+1 1
+1 1
+1 1
+1 1
+2 1
+3 1
+1 1
+1 1
+1 1
+2 1
+2 1
+2 1
+3 1
+1 1
+4 22
+1 22
+1 22
+1 22
+1 22
+1 22
+1 22
+1 22
+1 22
+1 22
+1 22
+1 22
+1 22
+2 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
fn=(690) __mempcpy_avx_unaligned_erms
204 279
+1 279
+1 279
+13 279
+1 279
+44 279
+1 279
+2 279
+1 279
+1 279
+1 279
+1 279
+1 279
+1 279
+1 279
+1 279
+2 279
fl=(140) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/write.c
fn=(788) write
27 8
+1 1
fl=(123) /build/glibc-OTsEL5/glibc-2.27/libio/filedoalloc.c
fn=(512) _IO_file_doallocate
78 24
+6 12
fi=(127)
870 9
+2 6
+1 6
fe=(123)
84 9
cfi=(118)
cfn=(514) _IO_file_stat
calls=3 1169
* 42
* 6
+2 12
+11 12
+4 6
cob=(2)
cfi=(18)
cfn=(486)
calls=3 0
* 38745
* 3
+2 3
-1 6
+2 12
cfi=(117)
cfn=(518) _IO_setb
calls=3 347
* 54
+1 3
+1 24
fl=(139) /build/glibc-OTsEL5/glibc-2.27/nptl/unregister-atfork.c
fn=(712) __unregister_atfork
28 16
+8 4
-8 12
+11 8
+82 24
fl=(107)
fn=(422)
46 13
+1 13
cfi=(108)
cfn=(424)
calls=13 -15
* 512
+2 39
+3 26
fl=(117)
fn=(586) _IO_default_finish
628 8
+2 2
-2 6
+2 4
+6 6
+3 6
54 4
651 14
fn=(684) _IO_default_xsputn
392 2
-3 5
fi=(127)
870 1
fe=(117)
389 1
fi=(127)
870 1
fe=(117)
389 5
fi=(127)
870 2
fe=(117)
407 2
+8 1
+2 2
-20 4
+2 3
+3 2
+20 1
-29 1
+29 7
-15 1
+5 3
-1 2
+2 4
fn=(780) _IO_flush_all_lockp
749 11
+5 4
+1 11
+3 1
-8 1
+5 1
+3 1
-3 1
+3 1
fi=(127)
870 2
fe=(117)
762 1
fi=(127)
870 2
fe=(117)
769 1
fi=(127)
872 2
+1 2
fe=(117)
769 3
cfi=(118)
cfn=(680) _IO_file_overflow@@GLIBC_2.2.5
calls=1 -22
* 130
+1 3
+2 8
-14 4
+16 4
-16 8
+3 4
-1 4
+1 4
+3 28
+14 9
+1 3
+4 12
-29 4
fn=(520) _IO_free_backup_area
187 4
+1 4
-1 4
+1 4
+2 8
cob=(2)
cfi=(18)
cfn=(522)
calls=4 0
* 116
+1 4
+1 4
+1 4
+1 8
fn=(778) _IO_cleanup
918 2
+3 1
-3 8
+3 1
cfn=(780)
calls=1 749
* 270
-72 1
+72 1
-72 2
+1 11
+3 1
-3 1
+3 1
-3 1
+3 1
fi=(127)
+17 2
fe=(117)
-7 1
fi=(127)
+7 2
fe=(117)
+23 4
-40 12
+2 12
+2 9
+6 12
+8 2
+9 1
fi=(127)
-8 2
+1 2
fe=(117)
+7 4
cfi=(118)
cfn=(792) _IO_file_setbuf@@GLIBC_2.2.5
calls=1 389
* 83
+2 3
+4 5
+1 9
+10 9
+1 2
+35 12
-62 3
+2 2
+2 1
+1 1
-1 1
+2 3
-28 4
+14 4
fn=(490) _IO_old_init
561 3
-2 3
+1 3
-1 3
+2 6
+16 3
-14 3
+1 3
+13 3
+5 3
-17 3
+1 3
+1 3
+1 3
+14 3
-13 3
+1 3
+1 3
+2 3
+1 3
+1 3
+1 3
+6 3
+1 6
+2 3
fn=(794) _IO_default_setbuf
479 2
fi=(127)
870 1
fe=(117)
479 3
fi=(127)
870 1
fe=(117)
479 3
+1 1
fi=(127)
870 1
+2 2
+1 2
fe=(117)
480 2
cfi=(118)
cfn=(796) _IO_file_sync@@GLIBC_2.2.5
calls=1 807
* 17
* 3
+2 2
+7 1
-7 1
+10 2
+2 1
-2 1
+1 3
+2 6
-11 1
348 1
485 1
-1 1
+1 1
348 3
+7 1
-5 1
+1 1
+4 2
fn=(494) _IO_link_in
87 36
+1 18
+4 3
-2 9
+2 6
+1 33
+2 3
-1 3
-1 3
+2 3
-2 3
+2 39
+2 3
-2 3
+5 3
-2 3
-1 3
+3 42
+2 3
-1 3
+1 24
+1 6
+3 42
-14 12
fn=(552) __underflow
288 8
-1 8
+6 10
+3 4
+2 4
+6 4
+7 2
fi=(127)
870 6
+2 4
+1 4
fe=(117)
311 2
+1 2
-1 2
+1 4
-1 2
cfi=(118)
cfn=(554) _IO_file_underflow@@GLIBC_2.2.5
calls=2 478
* 182
-2 6
fn=(556) _IO_switch_to_get_mode
164 8
+1 6
+3 6
+5 2
-1 4
+1 2
+7 2
-4 2
+2 4
+2 2
+1 2
+1 8
fn=(576) _IO_unsave_markers
1019 4
+19 6
189 2
fn=(546)
427 2
fi=(127)
870 4
fe=(117)
427 2
+2 2
fi=(127)
870 2
+2 4
+1 4
fe=(117)
429 2
+1 4
-1 2
cfi=(118)
cfn=(548) _IO_file_xsgetn
calls=2 1295
* 852
fn=(488)
590 27
+1 3
cfn=(490)
calls=3 -30
* 81
+2 3
-1 3
+1 3
+2 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+2 3
+6 3
+1 18
fn=(510) _IO_doallocbuf
362 6
-1 9
+3 12
+4 12
-3 3
fi=(127)
870 9
+2 6
+1 6
fe=(117)
365 6
cfi=(123)
cfn=(512)
calls=3 78
* 38994
* 6
fn=(572)
53 24
+1 8
+4 8
+1 20
+2 2
-2 2
+1 2
+1 2
-2 2
+2 2
-2 2
+2 30
+2 2
-2 2
+2 4
+2 4
+9 2
+2 2
-2 2
+2 16
+2 2
-1 2
+1 16
+1 4
+3 28
-6 14
-18 8
+8 6
fn=(518)
347 15
+1 24
+3 5
+2 20
-3 5
+3 10
+3 21
-7 2
cob=(2)
cfi=(18)
cfn=(522)
calls=2 0
* 240
* 10
fl=(79)
fn=(284)
44 6
fl=(60)
fn=(252)
32 1
-2 1
+2 2
-2 3
fi=(152) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memrchr.c
-1 1
fe=(60)
fn=(230)
32 2
-2 2
+2 4
-2 6
fi=(153) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strnlen.c
+1 2
fe=(60)
fn=(258)
32 1
-2 1
+2 2
-2 3
fi=(154) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memchr.c
-1 1
fe=(60)
fn=(204)
32 2
-2 2
+2 4
-2 6
fi=(155) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strrchr.c
-2 2
fe=(60)
fn=(212)
32 1
-2 1
+2 2
-2 3
fi=(156) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/rawmemchr.c
+1 1
fe=(60)
fn=(268)
32 1
-2 1
+2 2
-2 3
fi=(157) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strchrnul.c
+1 1
fe=(60)
fn=(250)
32 3
-2 3
+2 6
-2 9
fi=(158) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strlen.c
-1 3
fe=(60)
fl=(93)
fn=(354)
137 8
+4 1
-4 2
+4 2
+98 1
-98 1
+98 1
+1 4
cfi=(94) /build/glibc-OTsEL5/glibc-2.27/stdlib/cxa_atexit.c
cfn=(356) __cxa_atexit
calls=1 65
* 65
+22 4
+3 2
+1 5
cob=(7)
cfi=(92)
cfn=(360)
calls=1 0
* 57
+4 4
+15 2
+12 2
cfi=(95) /build/glibc-OTsEL5/glibc-2.27/setjmp/../sysdeps/x86_64/bsd-_setjmp.S
cfn=(372) _setjmp
calls=1 30
* 29
+1 2
+5 2
+1 2
+3 2
+3 6
cob=(7)
cfi=(98)
cfn=(378)
calls=1 13
* 2321837024
fl=(113)
fn=(450)
32 4490
+2 4490
+2 4490
+2 4490
+1 4490
+1 4490
+1 4490
+2 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+1 234
+2 234
+1 234
+2 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+1 30
+2 30
+1 30
+2 26
+1 26
+4 26
+1 26
+1 26
+4 26
+2 26
+1 26
+1 26
+1 26
+1 26
+1 26
+1 26
+1 26
+4 26
+1 26
+3 26
+1 26
+2 6
+1 6
+2 6
+1 6
+1 6
+1 6
+3 6
+1 6
+1 6
+1 6
+1 6
+5 6
+1 6
+1 6
+1 6
+4 6
+2 6
+1 6
+16 6
+1 6
+1 6
+1 5
+1 5
+1 4
+1 4
+1 4
+1 4
+1 3
+1 3
+1 2
+1 2
+1 1
1263 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
1380 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
1614 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
1731 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
1848 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
1965 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
2111 1
+1 1
+4 1
+3 1
+1 1
+1 1
+6 1
+21 5
+1 5
+1 5
+1 5
+4 5
+3 5
+1 5
+1 5
+6 5
+6 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+1 11
+2 9
+1 9
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 2
+1 2
+1 2
+1 2
+7 2
+1 2
+1 1
+1 1
+1 1
+1 1
+26 20
+1 38
+4 9
+1 9
+1 9
+2 9
+1 9
-5 6
+1 6
+1 6
+2 6
+1 6
+1 14
+1 14
+1 13
+1 6
+1 6
+1 4
+1 3
+1 3
+1 1
+1 1
+2 7
+1 7
+1 7
+1 2
+1 2
+1 2
+1 1
+2 1
+1 1
+1 1
+1 1
+2 5
+1 5
+1 2
+1 1
+5 1894
+1 1894
+4 1894
+3 1894
+1 1894
+1 1894
+6 1894
+4 215
+1 215
+4 215
+3 215
+1 215
+1 215
+6 215
+4 501
+1 501
+1 501
+1 501
+4 501
+3 501
+1 501
+1 501
+6 501
+4 386
+1 386
+4 386
+3 386
+1 386
+1 386
+6 386
+4 234
+1 234
+1 234
+1 234
+4 234
+3 234
+1 234
+1 234
+6 234
+4 189
+1 189
+1 189
+1 189
+4 189
+3 189
+1 189
+1 189
+6 189
+4 744
+1 744
+1 744
+1 744
+4 744
+3 744
+1 744
+1 744
+6 744
+4 47
+1 47
+1 47
+1 47
+4 47
+3 47
+1 47
+1 47
+6 47
+4 59
+1 59
+1 59
+1 59
+4 59
+3 59
+1 59
+1 59
+6 59
+4 61
+1 61
+1 61
+1 61
+4 61
+3 61
+1 61
+1 61
+6 61
+4 37
+1 37
+1 37
+1 37
+4 37
+3 37
+1 37
+1 37
+6 37
+4 5
+1 5
+1 5
+1 5
+4 5
+3 5
+1 5
+1 5
+6 5
+4 3
+1 3
+1 3
+1 3
+4 3
+3 3
+1 3
+1 3
+6 3
+4 1
+1 1
+1 1
+1 1
+4 1
+3 1
+1 1
+1 1
+6 1
2777 204
+1 204
+1 161
+1 161
+1 161
+1 161
+1 104
+1 104
+1 104
+1 104
+1 44
+1 44
+1 44
+1 44
+1 7
+1 7
+1 7
+1 7
+1 2
+1 2
+1 2
+1 2
+18 4256
+1 4256
+1 2365
+1 2365
+1 2365
+1 2365
+1 2150
+1 2150
+1 2150
+1 2150
+1 1650
+1 1650
+1 1650
+1 1650
+1 1268
+1 1268
+1 1268
+1 1268
+1 1034
+1 1034
+1 1034
+1 1034
+1 849
+1 849
+1 849
+1 849
+1 108
+1 108
+1 108
+1 108
+6 108
+2 108
2992 1
+1 1
+1 1
+1 1
+1 1
+1 1
+4 1
+1 1
+1 1
+1 1
+1 1
+1 1
+13 1
+1 1
+1 1
+1 1
+1 1
+1 1
+4 1
+1 1
+1 1
+1 1
+1 1
+1 1
+4 1
+1 1
+1 1
+1 1
+1 1
+1 1
+4 1
+1 1
+1 1
+1 1
+1 1
+1 1
fl=(126) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/read.c
fn=(530) read
27 48
+1 6
fl=(63) /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/unix/sysv/linux/dl-vdso.c
fn=(210) _dl_vdso_vsym
25 30
+1 12
+4 12
+18 36
-21 6
+20 6
fl=(82)
fn=(308)
52 8
+3 3
+14 1
fi=(83) /build/glibc-OTsEL5/glibc-2.27/csu/../sysdeps/generic/dl-hash.h
-25 1
fe=(82)
+23 1
+1 1
fi=(83)
-23 1
fe=(82)
+24 1
fi=(84) /build/glibc-OTsEL5/glibc-2.27/csu/../sysdeps/unix/sysv/linux/x86_64/init-first.c
-33 4
fi=(83)
+7 1
+5 3
+14 4
-17 3
+3 9
+14 12
-17 9
+22 1
fi=(84)
-31 2
+2 2
-2 1
+2 2
cfi=(63)
cfn=(210)
calls=1 -13
* 17
+2 1
+4 1
-4 1
+4 1
-4 1
+1 2
+1 1
+2 1
cfi=(63)
cfn=(210)
calls=1 -19
* 17
fe=(82)
+37 3
fi=(84)
-36 2
+1 1
fe=(82)
+35 1
cfi=(85)
cfn=(314)
calls=1 -50
* 52
+3 1
cfi=(87)
cfn=(320)
calls=1 -53
* 16
+5 6
-27 1
-7 1
+7 4
fl=(77)
fn=(274)
42 4
fi=(62) /build/glibc-OTsEL5/glibc-2.27/time/../sysdeps/generic/dl-hash.h
+2 2
+1 2
fe=(77)
-3 6
fi=(62)
+1 2
+5 6
+14 8
-17 6
+3 18
+14 24
-17 18
+22 2
fe=(77)
-25 12
cfi=(63)
cfn=(210)
calls=2 -17
* 34
* 10
fl=(94)
fn=(356)
65 7
-26 2
+26 1
-26 5
+1 2
cfn=(358) __new_exitfn
calls=1 +44
* 29
+2 2
+7 2
+3 1
-1 1
+2 1
+1 1
+1 4
+1 1
+11 6
fn=(358)
84 2
-6 2
+1 2
-1 1
+11 5
+2 3
-2 1
+10 2
-10 2
+45 1
+1 1
+4 4
-19 1
+1 2
fl=(58)
fn=(198)
32 5
fi=(59) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcasecmp.c
-1 1
fe=(58)
fn=(270)
32 5
fi=(76) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncase_l.c
-1 1
fe=(58)
fn=(234)
32 5
fi=(71) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strncase.c
-1 1
fe=(58)
fn=(254)
32 5
fi=(75) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcasecmp_l.c
-1 1
fe=(58)
fl=(78)
fn=(282)
44 5
+4 2
-1 2
+12 2
+2 5
fl=(73)
fn=(244)
32 4
-2 2
+2 4
-2 4
+5 2
-1 8
fi=(159) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wmemset.c
-3 2
fe=(73)
fl=(141) /build/glibc-OTsEL5/glibc-2.27/posix/../sysdeps/unix/sysv/linux/_exit.c
fn=(798) _Exit
27 2
+4 1
+2 2
fl=(64)
fn=(214)
32 2
-2 2
+2 4
-2 6
fi=(160) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wmemchr.c
+1 2
fe=(64)
fn=(260)
32 1
-2 1
+2 2
-2 3
fi=(161) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wcslen.c
-1 1
fe=(64)
fn=(228)
32 2
-2 2
+2 4
-2 6
fi=(162) /build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wcschr.c
+1 2
fe=(64)
fl=(67)
fn=(222)
38 8
+1 6
+9 2
fl=(74)
fn=(248)
40 4
-2 2
+2 4
-2 4
+11 2
fl=(136) /build/glibc-OTsEL5/glibc-2.27/stdlib/cxa_thread_atexit_impl.c
fn=(698) __call_tls_dtors
145 3
+1 4
+18 4
fl=(122)
fn=(506)
34 12
-1 24
+10 24
+1 4
+15 6
fi=(163) /build/glibc-OTsEL5/glibc-2.27/libio/../libio/libioP.h
870 18
+2 12
+1 12
fe=(122)
59 6
+1 6
-1 6
+1 12
-1 6
cfi=(118)
cfn=(508) _IO_file_seekoff@@GLIBC_2.2.5
calls=6 923
* 1522
fl=(69)
fn=(226)
42 10
+4 4
-1 8
+12 4
+2 10
fl=(97)
fn=(376)
29 1
-1 2
+1 2
+5 3
fl=(118)
fn=(574)
129 6
+2 6
+4 2
+3 4
-3 2
-1 4
+6 2
+3 2
-3 2
cfi=(117)
cfn=(576)
calls=2 1019
* 12
+3 6
fi=(127)
870 6
+2 4
+1 4
fe=(118)
143 4
cfn=(578) _IO_file_close
calls=2 1190
* 14
* 2
+3 6
+8 10
cfi=(117)
cfn=(518)
calls=2 347
* 298
+1 4
+3 2
-3 2
+1 6
+2 2
cfi=(117)
cfn=(572)
calls=2 53
* 30
+5 2
-4 2
+1 2
+1 2
+2 2
+1 10
fn=(528) _IO_file_read
1153 12
+3 18
cfi=(126)
cfn=(530)
calls=6 27
* 54
fn=(584)
169 8
+1 4
+7 2
-1 4
+1 4
-1 2
cfi=(117)
cfn=(586)
calls=2 628
* 50
fn=(492)
107 6
+4 3
-4 6
+5 3
-1 3
+3 3
cfi=(117)
cfn=(494)
calls=3 -27
* 258
+1 3
+1 12
fn=(508)
923 66
+8 12
+6 30
+3 4
+25 12
+23 2
fi=(127)
870 6
+2 4
+1 4
fe=(118)
988 6
cfn=(514)
calls=2 1169
* 28
* 4
+89 66
937 8
+3 8
+12 8
+3 6
+5 4
cfi=(117)
cfn=(510)
calls=2 362
* 716
+1 2
+4 2
-4 6
+1 6
+3 2
+26 2
+7 4
cfi=(117)
cfn=(520)
calls=2 187
* 80
* 4
cfi=(117)
cfn=(520)
calls=2 187
* 80
+5 20
+1 4
+3 6
-1 2
+2 16
+12 8
+4 8
+1 4
-1 8
+2 4
-2 4
+1 4
+1 8
+5 4
fi=(127)
872 8
+1 8
fe=(118)
1031 12
cfn=(524) _IO_file_seek
calls=4 1163
* 28
+1 4
-1 4
+1 4
+2 8
+4 2
fi=(127)
872 4
+1 4
fe=(118)
1038 16
cfn=(528)
calls=2 1153
* 28
+3 4
869 4
+2 4
+2 4
+5 4
+11 4
+13 4
+10 4
+76 8
+2 4
888 6
+19 2
1049 2
+4 2
-1 2
-3 10
+2 6
+3 4
-5 2
+4 2
-1 2
-3 10
+2 6
+3 4
fi=(127)
876 6
fe=(118)
fn=(548)
1295 20
+7 4
+11 4
+2 4
+1 2
-1 2
+1 4
fi=(127)
870 8
fe=(118)
1332 8
+9 12
+1 16
+18 2
-8 6
+1 6
+7 2
+1 12
+3 2
fi=(127)
872 6
+1 4
fe=(118)
1364 6
cfn=(528)
calls=2 1153
* 28
+1 4
+12 2
-2 2
+1 2
+1 4
+1 4
-65 8
+2 12
+1 8
+8 8
+59 18
-39 4
cfi=(117)
cfn=(552)
calls=2 288
* 254
* 4
-26 6
cfi=(130)
cfn=(560)
calls=2 217
* 348
* 2
+1 4
fn=(554)
478 6
+6 6
-14 10
+17 12
+13 4
+20 4
cfi=(117)
cfn=(556)
calls=2 164
* 48
+11 2
-5 2
fi=(127)
872 2
fe=(118)
526 4
fi=(127)
872 2
fe=(118)
527 2
+2 2
fi=(127)
873 2
fe=(118)
528 4
fi=(127)
873 2
fe=(118)
531 8
cfn=(528)
calls=2 1153
* 28
+2 4
+16 2
-9 2
+9 4
+1 4
+1 2
+1 4
-1 2
+1 8
fn=(680)
747 6
+7 2
-8 12
+8 5
+35 4
-32 2
+12 2
+9 4
+8 1
-4 1
+3 2
-2 2
-3 1
+1 2
+5 1
-1 1
+1 3
+4 2
+1 2
+11 6
-12 2
cfn=(682) _IO_do_write@@GLIBC_2.2.5
calls=2 433
* 112
-31 2
cfi=(117)
cfn=(510)
calls=1 362
* 38353
+1 6
fn=(524)
1163 8
cfi=(125)
cfn=(526)
calls=4 35
* 20
fn=(578)
1190 4
cfi=(132)
cfn=(580)
calls=2 37
* 10
fn=(496)
214 30
+9 6
+2 14
364 30
234 1
-2 1
+1 1
+15 38
+33 2
-96 2
+1 4
-1 2
+96 1
-96 1
+1 2
-1 1
+4 3
cfi=(119) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/open64.c
cfn=(498) open
calls=3 36
* 86
* 3
+1 6
+3 3
-1 3
+1 6
+3 6
-3 3
+3 3
+10 6
cfi=(117)
cfn=(494)
calls=3 87
* 48
+81 9
cfi=(120) /build/glibc-OTsEL5/glibc-2.27/string/../string/strstr.c
cfn=(500) __GI_strstr
calls=3 53
* 75
+1 3
-1 3
+1 3
-40 11
-19 2
-1 2
-13 4
+73 6
fn=(678)
1220 1120
+7 280
-7 840
+6 1400
+7 1400
+17 840
+1 279
+3 1116
+4 279
+2 837
-1 279
+1 279
-2 279
cfi=(130)
cfn=(690)
calls=279 204
* 4743
* 279
* 279
+4 558
+18 558
+10 2520
-40 1
+16 1
fi=(127)
870 3
+2 2
+1 2
fe=(118)
1266 3
cfn=(680)
calls=1 747
* 38406
* 2
+6 2
+1 7
+2 2
+11 3
+1 4
cfi=(117)
cfn=(684)
calls=1 392
* 50
* 3
fn=(796)
807 4
+5 4
+2 1
+1 2
+15 2
+4 4
fn=(514)
1169 5
+1 15
cfi=(124) /build/glibc-OTsEL5/glibc-2.27/io/../sysdeps/unix/sysv/linux/wordsize-64/fxstat.c
cfn=(516) _fxstat
calls=5 34
* 50
fn=(682)
433 6
+1 1
-3 16
+11 2
+7 4
fi=(127)
873 2
fe=(118)
457 4
cfn=(786) _IO_file_write@@GLIBC_2.2.5
calls=1 1196
* 45
* 1
+1 5
+6 1
-4 1
+4 1
-4 3
+1 2
+3 2
-2 1
-29 4
+1 8
+29 3
fn=(786)
1196 6
+2 6
+5 1
cfi=(140)
cfn=(788)
calls=1 27
* 9
+1 2
+5 1
+1 1
-12 2
+5 5
+10 3
+3 9
fn=(792)
389 2
+1 1
cfi=(117)
cfn=(794)
calls=1 +89
* 68
* 2
+4 2
-1 2
+2 3
+2 1
+1 2
fl=(120)
fn=(500)
53 21
+10 12
+26 27
-23 15
fl=(119)
fn=(498)
36 3
+3 3
-3 9
+3 3
-3 3
+3 11
+8 29
+2 15
-7 2
+1 1
-1 3
+5 4
fl=(124)
fn=(516)
34 5
-1 5
+1 5
+1 30
+4 5
fl=(135)
fn=(696) __run_exit_handlers
40 9
+5 1
-5 1
+5 2
+11 14
+3 2
+2 5
+16 2
+35 6
+2 2
-44 6
+2 1
+1 1
-1 1
+4 4
+1 6
+29 1
-3 1
+5 1
-2 2
+2 2
cob=(1)
cfi=(137)
cfn=(700)
calls=1 -78
* 1434
+1 1
+11 1
+1 1
-1 1
+1 1
+5 4
-73 1
+12 1
+1 4
+63 2
+1 11
cfi=(117)
cfn=(778)
calls=1 918
* 509
* 3
+2 2
cfi=(141)
cfn=(798)
calls=1 27
* 5
-86 1
cfi=(136)
cfn=(698)
calls=1 +99
* 11
* 1
fn=(694)
139 1
-1 1
+1 3
cfn=(696)
calls=1 -99
* 2064
fl=(138)
fn=(710)
30 8
+3 4
-3 20
+3 4
-3 4
+3 20
+3 12
+4 28
-4 12
+58 20
+4 24
-4 12
+12 8
+1 8
cfi=(139)
cfn=(712)
calls=4 -79
* 64
+2 16
+1 32
fl=(61)
fn=(206)
43 4
fi=(62)
+1 2
+1 2
fe=(61)
-2 8
fi=(62)
+5 6
+14 8
-17 6
+3 18
+14 24
-17 18
+22 2
fe=(61)
-24 12
cfi=(63)
cfn=(210)
calls=2 -18
* 34
* 10
fl=(65)
fn=(218)
33 5
-1 2
+2 2
+1 3
fi=(66) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/multiarch/memcmp.c
-6 1
fe=(65)
fl=(86)
fn=(318)
43 1
+1 1
+2 1
+1 1
+3 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+2 1
+1 1
+12 1
+1 1
216 1
+1 1
+1 1
+1 1
+1 1
+2 1
+1 1
+1 1
+1 1
+1 1
fl=(56)
fn=(240)
44 10
+4 4
-1 4
+12 4
+2 10
fn=(194)
44 10
+4 4
-1 4
+12 4
+2 10
fn=(216)
44 5
+4 2
-1 2
+12 2
+2 5
fl=(95)
fn=(372)
30 1
+2 1
cfi=(96)
cfn=(374)
calls=1 -6
* 27
fl=(103)
fn=(392)
126 9
+2 1
-2 1
+5 1
-5 1
+5 2
cob=(1)
cfi=(2)
cfn=(52)
calls=1 784
* 2
+2 2
cob=(1)
cfi=(104)
cfn=(400)
calls=1 -62
* 1384
* 5
+2 3
30 1
+1 1
-1 1
+1 1
+3 2
+5 1
+6 1
-7 1
+2 3
+2 3
+3 1
+5 7
-6 2
+6 4043
+2 1010
+1 2020
-1 1
+1 2
+2 3664
+9 2052
+7 28
-2 28
+2 2353
-2 2297
+2 6003
-10 11625
+2 9300
+1 14806
+36 2
+1 1
+1 3
+3 2
+36 2
cob=(1)
cfi=(2)
cfn=(54)
calls=1 790
* 2
+3 9
-27 1
+1 1
+20 2
ob=(4)
fl=(81)
fn=(302)
0 17
fn=(724)
0 8
cob=(2)
cfi=(18)
cfn=(730)
calls=1 0
0 75
0 1
cfn=(734) 0x0000000000000570
calls=1 0
0 8
0 3
fn=(734)
0 8
ob=(5)
fl=(90)
fn=(760)
0 8
cob=(2)
cfi=(18)
cfn=(766)
calls=1 0
0 75
0 1
cfn=(770) 0x000000000000ca20
calls=1 0
0 8
0 3
fn=(770)
0 8
fn=(334)
0 17
totals: 2322287546
| 95,799 | Common Lisp | .l | 11,314 | 7.379972 | 103 | 0.666504 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 1f7b774920d9c574ac8b6a3925cbe7b1c9445c35237999c906450c32b9a9271d | 16,281 | [
-1
] |
16,282 | old_eval.c | davidsun0_lateral/interpreter/old/old/old_eval.c | #include <stdlib.h>
#include <stdio.h>
#include "object.h"
#include "reader.h"
#include "hash.h"
#include "core.h"
#include "eval.h"
void stack_push(Object *ast, enum mode exe) {
StackFrame *frame = malloc(sizeof(StackFrame));
frame->prev = stack;
frame->fn = NULL;
frame->in = ast;
frame->in_list = NULL;
frame->out = NULL;
frame->out_list = NULL;
frame->ret = NULL;
frame->exe_mode = exe;
stack = frame;
}
void stack_pop() {
if(stack->prev == NULL) {
free(stack);
stack = NULL;
} else {
stack->prev->ret = stack->ret;
StackFrame *frame = stack;
stack = stack->prev;
free(frame);
}
}
int envir_push(List *bindings, List *vals) {
int size = list_length(bindings);
int size_v = list_length(vals);
if(size != size_v) {
printf("error: wrong number of vals for bindings\n");
printf("expected %d but got %d\n", size, size_v);
return -1;
}
Envir *envir = envir_init(size);
for(int i = 0; i < size; i ++) {
envir_set(envir, bindings->obj, vals->obj);
bindings = bindings->next;
vals = vals->next;
}
envir->outer = curr_envir;
curr_envir = envir;
return 0;
}
void envir_pop() {
Envir *envir = curr_envir;
curr_envir = curr_envir->outer;
envir_free(envir);
}
void eval() {
Object *expr = stack->in;
if(expr->type == symt) {
// search for symbols in the environment
stack->ret = envir_search(curr_envir, expr);
if(stack->ret == NULL) {
char *err = la_strdup("symbol not found");
union Data dat = { .ptr = err };
stack->ret = obj_init(errt, dat);
}
stack_pop();
} else if(expr->type == listt) {
// return (map apply expr)
if(stack->out == NULL) {
// initialize output list
List *list = list_init();
union Data dat = { .ptr = list };
stack->out = obj_init(listt, dat);
stack->out_list = list;
stack->in_list = expr->data.ptr;
stack_push(stack->in_list->obj, apply_exe);
// advance working list pointer
// careful! just pushed a new stack frame
stack->prev->in_list = stack->prev->in_list->next;
} else {
// iterate across expr
stack->out_list = list_append(stack->out_list, stack->ret);
if(stack->in_list != NULL) {
stack_push(stack->in_list->obj, apply_exe);
stack->prev->in_list = stack->prev->in_list->next;
} else {
stack->ret = stack->out;
stack_pop();
}
}
} else {
// all other types evaluate to themselves
stack->ret = expr;
stack_pop();
}
}
int special_form() {
List *list = stack->in->data.ptr;
if(stack->in->type != listt || list->obj == NULL) {
return 0;
}
if(obj_eq_sym(list->obj, "fn")) {
list = list->next;
if(list->obj->type != listt) {
stack->ret = err_init("fn expects a list as its first arg\n");
stack_pop();
return 1;
}
List *arg_list = list->obj->data.ptr;
// duplicate list into function structure
List *args = list_init();
List *arg0 = args;
while(arg_list != NULL) {
arg0 = list_append(arg0, arg_list->obj);
arg_list = arg_list->next;
}
Object *expr = list->next->obj;
struct Func func = { .args = args, .expr = expr };
union Data dat = { .func = func };
stack->ret = obj_init(fnt, dat);
stack_pop();
} else if(obj_eq_sym(list->obj, "macro")) {
// copy and paste from fn
list = list->next;
if(list->obj->type != listt) {
stack->ret = err_init("macro expects a list as its first arg\n");
stack_pop();
return 1;
}
List *arg_list = list->obj->data.ptr;
// duplicate list into function structure
List *args = list_init();
List *arg0 = args;
while(arg_list != NULL) {
arg0 = list_append(arg0, arg_list->obj);
arg_list = arg_list->next;
}
Object *expr = list->next->obj;
struct Func func = { .args = args, .expr = expr };
union Data dat = { .func = func };
stack->ret = obj_init(macrot, dat);
stack_pop();
} else if(obj_eq_sym(list->obj, "defmacro")) {
list = list->next;
Object *name = list->obj;
Object *args = list->next->obj;
Object *expr = list->next->next->obj;
obj_debug(name);
obj_debug(args);
obj_debug(expr);
List *arg_list = list_copy(args->data.ptr);
struct Func func = { .args = arg_list, .expr = expr };
union Data dat = { .func = func };
Object *macro = obj_init(macrot, dat);
envir_set(curr_envir, name, macro);
stack->ret = macro;
stack_pop();
} else if(obj_eq_sym(list->obj, "if")) {
if(stack->out == NULL) {
list = list->next;
stack->in_list = list;
stack->out = list->obj;
stack_push(list->obj, apply_exe);
stack->prev->in_list = stack->prev->in_list->next;
} else {
// the actual if statement
if(stack->ret != nil_obj) {
stack->in = stack->in_list->obj;
stack->out = NULL;
stack->in_list = NULL;
stack->out_list = NULL;
stack->ret = NULL;
return 0;
} else if(stack->in_list->next != NULL) {
stack->in = stack->in_list->next->obj;
stack->out = NULL;
stack->in_list = NULL;
stack->out_list = NULL;
stack->ret = NULL;
return 0;
} else {
stack->ret = nil_obj;
stack_pop();
}
}
} else if(obj_eq_sym(list->obj, "def")) {
if(stack->ret == NULL) {
list = list->next;
stack->in_list = list;
stack_push(list->next->obj, apply_exe);
} else {
envir_set(curr_envir, stack->in_list->obj, stack->ret);
stack_pop();
}
} else {
return 0;
}
return 1;
}
int is_macro_call(Object *ast) {
if(ast->type == listt) {
List *list = ast->data.ptr;
Object *fun = list->obj;
if(fun->type == symt) {
Object *obj = envir_search(curr_envir, fun);
if(obj != NULL && obj->type == macrot) {
stack->in_list = list;
stack->out = obj;
return 1;
}
}
}
return 0;
}
void apply() {
if(obj_is_empty_list(stack->in)) {
// () => nil
stack->ret = nil_obj;
stack_pop();
} else if(special_form()) {
;
} else if(is_macro_call(stack->in)) {
List *list = stack->in->data.ptr;
// Object *macrofn = envir_search(list->obj, fun);
Object *macrofn = stack->out;
List *args = macrofn->data.func.args;
Object *expr = macrofn->data.func.expr;
int ret = envir_push(args, list->next);
if(ret < 0) {
stack->ret = err_init("wrong number of args for macro");
stack_pop();
return;
}
stack->exe_mode = macro_exe;
stack_push(expr, eval_exe);
} else if(stack->ret == NULL) {
stack_push(stack->in, eval_exe);
} else if(stack->ret->type != listt) {
// eval returned a symbol
stack_pop();
} else if(stack->out != NULL) {
// only occurs after evaluating lisp function
envir_pop();
stack_pop();
} else if(stack->ret->type == listt) {
stack->out = stack->ret;
stack->out_list = stack->out->data.ptr;
Object *fun = stack->out_list->obj;
List *args = stack->out_list->next;
if(fun->type == natfnt) {
stack->ret = fun->data.fn_ptr(args);
stack_pop();
} else if(fun->type == fnt) {
int ret = envir_push(fun->data.func.args, args);
if(ret < 0) {
stack->ret = err_init("wrong number of args for function");
stack_pop();
}
stack_push(fun->data.func.expr, apply_exe);
} else {
stack->ret = err_init("object is not a function");
stack_pop();
}
}
}
Object *evaluate(Envir *envir, Object *ast) {
stack_push(NULL, result_exe);
stack_push(ast, apply_exe);
while(stack->exe_mode != result_exe) {
if(stack->exe_mode == eval_exe) {
eval();
} else if(stack->exe_mode == apply_exe) {
apply();
} else if(stack->exe_mode == macro_exe) {
printf("macro expansion:\n");
obj_debug(stack->ret);
printf("\n");
envir_pop();
stack_pop();
/*
stack->in = stack->ret;
stack->out = NULL;
stack->ret = NULL;
if(stack->in->type != listt)
stack->exe_mode = eval_exe;
else
stack->exe_mode = apply_exe;
//*/
// stack_pop();
} else if(stack->exe_mode == unknown) {
printf("error: unknown execution mode\n");
return NULL;
}
}
Object *ret = stack->ret;
stack_pop();
return ret;
}
| 9,633 | Common Lisp | .l | 296 | 23.300676 | 77 | 0.498444 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | e4f73468063ff66c87f934e93034c4975903b7d157a06d9118abf3978d467b2f | 16,282 | [
-1
] |
16,287 | Helper.java | davidsun0_lateral/interpreter/old/jvm/Helper.java | import java.util.NoSuchElementException;
class Helper {
public static void main(String[] args) {
Lang.include("core.lisp");
while(true) {
try {
Lateral.main();
//MyClass.main();
} catch (NoSuchElementException n) {
return;
} catch (RuntimeException e) {
e.printStackTrace();
}
}
}
// These functions should be written in lisp, but I'm too lazy
public static Object readAtom(Object a) {
if(a == null || !(a instanceof String)) {
throw new TypeError("readAtom expects non-null string argument");
}
String s = (String)a;
if(s.length() > 1 && s.charAt(0) == '"' && s.charAt(s.length() - 1) == '"') {
s = s.substring(1, s.length() - 1);
s = s.replace("\\\\", "\\");
s = s.replace("\\n", "\n");
s = s.replace("\\\"", "\"");
return s;
} else if(s.charAt(0) == ':') {
return new Keyword(s.substring(1));
} else if(s.length() == 3 && "#\\".equals(s.substring(0, 2))) {
return Character.valueOf(s.charAt(2));
} else if(s.length() > 2 && s.charAt(0) == '0' && s.charAt(1) == 'x') {
return Integer.parseInt(s.substring(2), 16);
} else if(48 <= s.charAt(0) && s.charAt(0) < 58) {
return Integer.parseInt(s);
} else {
return new Symbol(s);
}
}
}
| 1,502 | Common Lisp | .l | 40 | 27.3 | 85 | 0.478767 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 5da7b106f7b21212aabff4a33491118773ad1fc958504970d95bbaa595208dc1 | 16,287 | [
-1
] |
16,292 | ConsCell.java | davidsun0_lateral/interpreter/old/jvm/ConsCell.java | class ConsCell {
private Object car;
private ConsCell cdr;
public ConsCell(Object car, ConsCell cdr) {
this.car = car;
this.cdr = cdr;
}
public Object getCar() {
return car;
}
public void setCar(Object car) {
this.car = car;
}
public ConsCell getCdr() {
return cdr;
}
public void setCdr(ConsCell cdr) {
this.cdr = cdr;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("(");
ConsCell cell = this;
while(cell != null) {
sb.append(cell.car);
if(cell.cdr != null) {
sb.append(" ");
}
cell = cell.cdr;
}
sb.append(")");
return sb.toString();
}
@Override
public boolean equals(Object o) {
if(o instanceof ConsCell) {
ConsCell c = (ConsCell)o;
return (car.equals(c.car) &&
((cdr == null && c.cdr == null) ||
(cdr.equals(c.cdr))));
}
return false;
}
@Override
public int hashCode() {
int hash = 0;
if(car != null) {
hash += car.hashCode();
}
if(cdr != null) {
hash += cdr.hashCode();
}
return hash;
}
}
| 1,356 | Common Lisp | .l | 56 | 15.696429 | 54 | 0.478328 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 886f53e21b588c7386e53a128af2c6bf7ea9202f523e5f2890eeaad422c815ec | 16,292 | [
-1
] |
16,294 | Symbol.java | davidsun0_lateral/interpreter/old/jvm/Symbol.java | class Symbol implements Comparable<Symbol> {
String s;
public Symbol(String s) {
this.s = s;
}
public static Symbol makeSymbol(String s) {
return new Symbol(s);
}
@Override
public String toString() {
return this.s;
}
@Override
public boolean equals(Object obj) {
return (obj instanceof Symbol) && (s.equals(((Symbol)obj).s));
}
@Override
public int hashCode() {
return s.hashCode();
}
@Override
public int compareTo(Symbol sym) {
return s.compareTo(sym.s);
}
}
| 583 | Common Lisp | .l | 25 | 17.44 | 70 | 0.601449 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | c0d8acdcecbde70fc8b3615181d2e4bb92d08013f9e85ca72b3855126d0b10b2 | 16,294 | [
-1
] |
16,300 | Helper.java | davidsun0_lateral/interpreter/jvm/Helper.java | class Helper {
public static void main(String[] args) {
while(true) {
try {
Lateral.main();
} catch (RuntimeException e) {
e.printStackTrace();
}
}
}
// These functions should be written in lisp, but I'm too lazy
public static Object readAtom(Object a) {
if(a == null || !(a instanceof String)) {
throw new TypeError("readAtom expects non-null string argument");
}
String s = (String)a;
if(s.length() > 1 && s.charAt(0) == '"' && s.charAt(s.length() - 1) == '"') {
s = s.substring(1, s.length() - 1);
s = s.replace("\\\\", "\\");
s = s.replace("\\n", "\n");
s = s.replace("\\\"", "\"");
return s;
} else if(s.charAt(0) == ':') {
return new Keyword(s.substring(1));
} else if(s.length() == 3 && "#\\".equals(s.substring(0, 2))) {
return Character.valueOf(s.charAt(2));
} else if(s.length() > 2 && s.charAt(0) == '0' && s.charAt(1) == 'x') {
return Integer.parseInt(s.substring(2), 16);
} else if(48 <= s.charAt(0) && s.charAt(0) < 58) {
return Integer.parseInt(s);
} else {
return new Symbol(s);
}
}
}
| 1,318 | Common Lisp | .l | 35 | 27.6 | 85 | 0.467239 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 14d995fd658fdf3f1937ca0332e0b4476edbe7034f915988403f72ebb87495cb | 16,300 | [
-1
] |
16,301 | CompiledLambda.java | davidsun0_lateral/interpreter/jvm/CompiledLambda.java | import java.lang.reflect.Method;
public class CompiledLambda {
Method method;
boolean isRest;
boolean isMacro;
int argc;
public CompiledLambda(Method method, int argc, boolean isRest, boolean isMacro) {
this.method = method;
this.argc = argc;
this.isRest = isRest;
this.isMacro = isMacro;
}
public String toString() {
return "<compiled-lambda>";
}
}
| 425 | Common Lisp | .l | 16 | 20.875 | 85 | 0.655172 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | baee9f3596df53ba84511c834f3906c83b6e2bf6d243019158fa68f4abc3ed96 | 16,301 | [
-1
] |
16,306 | reflectconfig.json | davidsun0_lateral/interpreter/jvm/reflectconfig.json | [
{
"name" : "Lang",
"allPublicMethods" : true
},
{
"name" : "Lateral",
"allPublicMethods" : true
}
]
| 150 | Common Lisp | .l | 10 | 9.2 | 33 | 0.421429 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 0e4f624e9bf9bea6a942cabce9c9d388f2281d83d76a9684f9d6faefb4725b28 | 16,306 | [
-1
] |
16,311 | Makefile | davidsun0_lateral/interpreter/bootstrap/Makefile | CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -pedantic -ggdb
LDFLAGS = -lreadline
source = $(wildcard *.c)
objects = $(source:.c=.o)
all: lateral
.PHONY: clean
clean:
rm a.out *.o
.PHONY: test
test:
../test/test.py ./a.out ../test/simple.lisp
lateral: $(objects)
$(CC) $(CFLAGS) -o a.out $^ $(LDFLAGS)
| 306 | Common Lisp | .l | 14 | 20.285714 | 47 | 0.66899 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 93ac28bb1c9bff3ce9bdc2e852c46e29d8d5c2fcb0e493f8f1807096c37058d7 | 16,311 | [
-1
] |
16,312 | lateral.c | davidsun0_lateral/interpreter/bootstrap/lateral.c | #include <stdio.h>
#include <stdlib.h>
#include <readline/readline.h>
#include <readline/history.h>
#include "object.h"
#include "reader.h"
#include "eval.h"
#include "core.h"
#include "garbage.h"
int main(int argc, char ** argv) {
garbage_init();
// NIL is a cons cell with CAR and CDR as nil
union Data ndat = { .cell = {NULL, NULL}};
nil_obj = obj_init(listt, ndat);
CAR(nil_obj) = nil_obj;
CDR(nil_obj) = nil_obj;
user_envir = envir_init(32);
curr_envir = user_envir;
lang_init();
read_file("./core.lisp");
if(argc >= 2) {
read_file(argv[1]);
if(argc == 2) {
// garbage_shutdown();
exit(0);
}
}
//REPL MODE
// turn off tab completion
rl_bind_key('\t', rl_insert);
while(1) {
char *input_str = readline("user> ");
if(input_str == NULL) {
break;
} else if(input_str[0] == '\0') {
free(input_str);
continue;
}
// read
Object* ast = read_string(input_str);
free(input_str);
if(ast == NULL) {
continue;
}
// eval
Object *result = evaluate(curr_envir, ast);
// print
if(result == NULL) {
printf("NULL RESULT\n");
} else {
// printf("=> ");
obj_print(result, 0);
printf("\n");
}
garbage_run();
}
printf("\ngoodbye! ('u' )/\n");
envir_free(curr_envir);
// garbage_shutdown();
}
| 1,540 | Common Lisp | .l | 60 | 18.566667 | 51 | 0.507503 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | d3447ceb421b14d59af16276ab60319438abefe61c73ce5a826a7cd8436699fa | 16,312 | [
-1
] |
16,313 | eval.c | davidsun0_lateral/interpreter/bootstrap/eval.c | #include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include "object.h"
#include "eval.h"
Object *funcall(Object *(fn_ptr)(Object *), int count, ...) {
Object *list = NULL;
Object *listb = list;
va_list vl;
va_start(vl, count);
for(int i = 0; i < count; i ++) {
Object* next = va_arg(vl, Object*);
listb = list_append(listb, next);
}
va_end(vl);
return fn_ptr(listb);
}
Object *funcall2(Object *fn, Object *args) {
if(fn->type == natfnt) {
return fn->data.fn_ptr(args);
} else if(fn->type == fnt) {
Object *params = fn->data.func.params;
Envir *envir = envir_push2(params, args);
if(envir == NULL) {
printf("failed to create envir\n");
printf("funcall: \n");
obj_print(fn, 0);
printf("\n");
return err_init("failed to create envir");
}
Object *ret = evaluate(envir, fn->data.func.expr);
envir_pop2();
return ret;
} else {
return err_init("fn is not a function");
}
}
Envir *envir_push(Envir *envir, Object *params, Object *args) {
int sizea = list_length(params);
int sizeb = list_length(args);
if(sizea != sizeb || sizea < 0 || sizeb < 0) {
obj_print(params, 0);
printf("\n");
obj_print(args, 0);
printf("\n");
printf("expected %d arguments, but got %d\n", sizea, sizeb);
return NULL;
}
Envir *next = envir_init(sizea * 2);
for(int i = 0; i < sizea; i ++) {
envir_set(next, CAR(params), CAR(args));
params = CDR(params);
args = CDR(args);
}
envir->next = next;
next->prev = envir;
return next;
}
Envir *envir_push2(Object *params, Object *args) {
int sizea = list_length(params);
int sizeb = list_length(args);
if(sizea != sizeb || sizea < 0 || sizeb < 0) {
obj_print(params, 0);
printf("\n");
obj_print(args, 0);
printf("\n");
printf("expected %d arguments, but got %d\n", sizea, sizeb);
return NULL;
}
Envir *next = envir_init(sizea * 2);
for(int i = 0; i < sizea; i ++) {
envir_set(next, CAR(params), CAR(args));
params = CDR(params);
args = CDR(args);
}
curr_envir->next = next;
next->prev = curr_envir;
curr_envir = next;
return next;
}
Envir *envir_pop(Envir *envir) {
Envir *prev = envir->prev;
prev->next = NULL;
envir_free(envir);
return prev;
}
void envir_pop2() {
Envir *prev = curr_envir->prev;
prev->next = NULL;
envir_free(curr_envir);
curr_envir = prev;
}
int is_macro(Envir *envir, Object *ast) {
if(ast->type == listt) {
Object *fn = CAR(ast);
if(fn->type == symt) {
fn = envir_search(envir, fn);
if(fn != NULL && fn->type == macrot)
return 1;
}
}
return 0;
}
Object *macro_expand(Envir *envir, Object *ast) {
while(is_macro(envir, ast)) {
Object *macro = envir_search(envir, CAR(ast));
Object *args = CDR(ast);
Object *params = macro->data.func.params;
Envir *inner = envir_push2(params, args);
Object *expr = macro->data.func.expr;
ast = evaluate(inner, expr);
// curr_envir = envir_pop(inner);
envir_pop2();
}
return ast;
}
Object *eval_ast(Envir *envir, Object *ast) {
if(ast->type == symt) {
Object *ret = envir_search(envir, ast);
if(ret == NULL) {
obj_debug(ast);
ret = err_init("symbol not found in envir");
}
return ret;
} else if(ast->type == listt) {
Object *list = NULL;
Object *listb = list;
while(ast != nil_obj) {
Object *obj = evaluate(envir, CAR(ast));
if(obj->type == errt) {
obj_print(obj, 0);
exit(1);
}
listb = list_append(listb, obj);
if(list == NULL) {
list = listb;
}
ast = CDR(ast);
}
return list;
} else if(ast->type == hashmapt) {
HashMap *map = ast->data.hashmap;
for(int i = 0; i < map->capacity; i ++) {
Object *keyval = map->buckets + i;
if(CAR(keyval) != NIL) {
Object *val = CDR(CAR(keyval));
CDR(CAR(keyval)) = evaluate(envir, val);
}
}
return ast;
} else {
return ast;
}
}
Object *evaluate(Envir *envir, Object *ast) {
if(ast->type == listt && CAR(ast) == nil_obj && CDR(ast) == nil_obj) {
return nil_obj;
}
ast = macro_expand(envir, ast);
if(ast->type == listt) {
if(obj_eq_sym(CAR(ast), "def")) {
Object *sym = CAR(CDR(ast));
Object *val = evaluate(envir, CAR(CDR(CDR(ast))));
envir_set(user_envir, sym, val);
return val;
} else if(obj_eq_sym(CAR(ast), "defmacro")) {
Object *name = CAR(CDR(ast));
Object *params = CAR(CDR(CDR(ast)));
Object *expr = CAR(CDR(CDR(CDR(ast))));
if(params->type != listt) {
return err_init("macro args must be a list");
}
union Data dat = { .func = { .params = params, .expr = expr }};
Object *macro = obj_init(macrot, dat);
envir_set(envir, name, macro);
return name;
} else if(obj_eq_sym(CAR(ast), "lambda")) {
Object *params = CAR(CDR(ast));
if(CAR(params) == nil_obj) {
params = nil_obj;
}
Object *expr = CAR(CDR(CDR(ast)));
union Data dat = { .func = { .params = params, .expr = expr }};
return obj_init(fnt, dat);
} else if(obj_eq_sym(CAR(ast), "if")) {
Object *pred = evaluate(envir, CAR(CDR(ast)));
ast = CDR(CDR(ast));
if(pred->type == listt && CAR(pred) == nil_obj
&& CDR(pred) == nil_obj) {
if(CDR(ast) == nil_obj) {
// nil if no false branch
return nil_obj;
} else {
// false branch
return evaluate(envir, CAR(CDR(ast)));
}
} else {
return evaluate(envir, CAR(ast));
}
} else if(obj_eq_sym(CAR(ast), "cond")) {
ast = CDR(ast);
while(ast != nil_obj) {
if(CAR(CDR(ast)) == nil_obj) {
return err_init("cond expects an even number of elements");
}
Object *pred = evaluate(envir, CAR(ast));
if(pred != nil_obj) {
return evaluate(envir, CAR(CDR(ast)));
}
ast = CDR(CDR(ast));
}
return nil_obj;
} else if(obj_eq_sym(CAR(ast), "and")) {
ast = CDR(ast);
while(ast != nil_obj && evaluate(envir, CAR(ast)) != nil_obj) {
ast = CDR(ast);
}
if(ast == nil_obj) {
return tru_obj;
} else {
return nil_obj;
}
} else if(obj_eq_sym(CAR(ast), "or")) {
ast = CDR(ast);
while(ast != nil_obj && evaluate(envir, CAR(ast)) == nil_obj) {
ast = CDR(ast);
}
return CAR(ast);
} else if(obj_eq_sym(CAR(ast), "quote")) {
return CAR(CDR(ast));
} else if(obj_eq_sym(CAR(ast), "progn")) {
ast = CDR(ast);
while(CDR(ast) != nil_obj) {
evaluate(envir, CAR(ast));
ast = CDR(ast);
}
return evaluate(envir, CAR(ast));
} else if(obj_eq_sym(CAR(ast), "let")) {
Object *bindings = CAR(CDR(ast));
Object *expr = CAR(CDR(CDR(ast)));
int bind_len = list_length(bindings);
// throw error if odd terms
if(bind_len % 2 != 0) {
return err_init("arg count: let expects even count of args");
}
Envir *let_envir = envir_init(bind_len * 2);
let_envir->prev = curr_envir;
curr_envir->next = let_envir;
curr_envir = let_envir;
while(bindings != NIL) {
Object *sym = CAR(bindings);
Object *val = CAR(CDR(bindings));
val = evaluate(let_envir, val);
envir_set(let_envir, sym, val);
bindings = CDR(CDR(bindings));
}
Object *ret = evaluate(let_envir, expr);
curr_envir = curr_envir->prev;
// envir->next = NULL;
envir_free(let_envir);
return ret;
}
Object *funcall = eval_ast(envir, ast);
if(funcall->type != listt) {
return err_init("error: epected list in fun eval");
}
// funcall
Object *fn = CAR(funcall);
if(fn->type == natfnt) {
return fn->data.fn_ptr(CDR(funcall));
} else if(fn->type == fnt) {
Object *vals = CDR(funcall);
Object *params = fn->data.func.params;
envir = envir_push2(params, vals);
if(envir == NULL) {
printf("failed to create envir\n");
printf("funcall: \n");
// obj_debug(funcall);
obj_print(funcall, 0);
printf("\nexpr: \n");
// obj_debug(ast);
obj_print(ast, 0);
printf("\n");
return err_init("failed to create envir");
}
Object *ret = evaluate(envir, fn->data.func.expr);
// envir = envir_pop(envir);
envir_pop2();
return ret;
} else {
printf("Error: ");
obj_print(fn, 0);
printf(" is not a function ");
printf("(Evaluated from `");
obj_print(CAR(ast), 0);
printf("`).\n");
Object *fn_uneval = CAR(ast);
Object *fn2 = envir_search(user_envir, fn_uneval);
if(fn2 != NULL && (fn2->type == fnt || fn2->type == natfnt)) {
printf("Did you mean to use `");
obj_print(fn_uneval, 0);
printf("`? (Found in outer environment)\n");
printf("If so, rename variable to avoid name conflict.\n");
}
return err_init("error: object is not a function");
}
} else {
return eval_ast(envir, ast);
}
}
| 10,655 | Common Lisp | .l | 310 | 23.996774 | 79 | 0.481345 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | c0ab456193147e6abb6f72300c5a296de06339a67315ad4d743f279eddf8f8c4 | 16,313 | [
-1
] |
16,315 | eval.h | davidsun0_lateral/interpreter/bootstrap/eval.h | #ifndef LA_EVAL_H
#define LA_EVAL_H
#include "object.h"
enum mode {
eval_exe,
apply_exe,
macro_exe,
result_exe,
unknown
};
typedef struct StackFrame {
struct StackFrame* prev;
Object *in;
Object *out;
Object *ret;
enum mode exe_mode;
} StackFrame;
StackFrame *stack;
Envir *curr_envir;
Envir *user_envir;
Envir *envir_push(Envir*, Object *params, Object *args);
Envir *envir_pop(Envir*);
Object *evaluate(Envir *envir, Object *ast);
Object *funcall2(Object *fn, Object *args);
Envir *envir_push2(Object* params, Object* args);
void envir_pop2();
#endif
| 601 | Common Lisp | .l | 27 | 19.481481 | 56 | 0.712014 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 81123b6015c659d9e7ffd23f5490634598176871206854018d7e7e251953ad64 | 16,315 | [
-1
] |
16,318 | hashliteralbug.txt | davidsun0_lateral/interpreter/bootstrap/hashliteralbug.txt | (print {
"rest" (list "Lang" "cdr"
"(Ljava/lang/Object;)Ljava/lang/Object;")
"cons" (list "Lang" "cons"
"(Ljava/lang/Object;Ljava/lang/Object;)LConsCell;")
"equal?" (list "Lang" "is_equal"
"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;")
"inc" (list "Lang" "inc"
"(Ljava/lang/Object;)Ljava/lang/Object;")
"char-at" (list "Lang" "charat"
"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;")
"readline" (list "Lang" "readline"
"()Ljava/lang/String;")
"print" (list "Lang" "print"
"(Ljava/lang/Object;)Ljava/lang/Object;")
"println" ("Lang" "println"
"(Ljava/lang/Object;)Ljava/lang/Object;")
"test" (list 1 2 3)
})
| 834 | Common Lisp | .l | 19 | 32.210526 | 80 | 0.521472 | davidsun0/lateral | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 57fafe26879aa219f0a6c946654e5026d38d345925c019d02d3ec68caf26d902 | 16,318 | [
-1
] |
16,333 | main.lisp | ahungry_injection/src/main.lisp | ;;;; main.lisp
(in-package #:injection-test)
;;; "main" goes here. Hacks and glory await!
| 92 | Common Lisp | .lisp | 3 | 29 | 44 | 0.689655 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | b2e52e9e154b15f2c840963c53194037c8dfa426d89d41118a550a7715be05ad | 16,333 | [
-1
] |
16,334 | Container.lisp | ahungry_injection/src/classes/Container.lisp | ;;;; Container.lisp
(in-package #:injection)
(defparameter *container-singleton*
"The latest instance of a 'Container object loaded through the container factory.")
(defclass Container ()
((Services
:accessor Services
:initarg :file-name
:initform nil)
(Parameters
:accessor Parameters
:initarg :parameters
:initform nil)
(Instances
:accessor Instances
:initarg :instances
:initform (make-hash-table :test #'equal))))
(defgeneric Container-Get-Service (Container name)
(:documentation "Get a specific service NAME (class instance) from CONTAINER.SERVICES."))
(defgeneric Container-Get-Parameter (Container name)
(:documentation "Get a specific parameter NAME from CONTAINER.PARAMETERS."))
(defgeneric Container-Load-File (Container file-name)
(:documentation "Load the YAML 'FILE-NAME' into the CONTAINER.SERVICES and CONTAINER.PARAMETERS."))
(defgeneric Container-Expand-Services (Container arguments)
(:documentation "Look for arguments with the '@' symbol and expand."))
(defgeneric Container-Instantiate-Services (Container)
(:documentation "Instantiate each service (including dependent ones)."))
(defmethod Container-Get-Service ((container Container) name)
(when (typep (Instances container) 'hash-table)
(gethash name (Instances container))))
(defmethod Container-Get-Parameter ((container Container) name)
(when (typep (Parameters container) 'hash-table)
(gethash name (Parameters container))))
(defmethod Container-Load-File ((container Container) file-name)
(let ((file-loader (File-Loader-Factory file-name)))
(when (Yaml file-loader)
(setf (Parameters container) (gethash "parameters" (Yaml file-loader)))
(setf (Services container) (gethash "services" (Yaml file-loader))))))
(defmethod Container-Expand-Services ((container Container) arguments)
"If we have any arguments that begin with an '@' symbol, we want to expand
into the equivalent call to (Container-Get-Service container name)."
(mapcar (lambda (arg)
(cond
;; A service was found via @service_name
((string= "@" arg :end2 1)
(Container-Get-Service container (subseq arg 1)))
;; A parameter was found via %parameter_name%
((and (string= "%" arg :end2 1)
(string= "%" arg :start2 (1- (length arg))))
(Container-Get-Parameter container (subseq arg 1 (1- (length arg)))))
(t arg)))
arguments))
(defmethod Container-Instantiate-Services ((container Container))
(when (typep (Services container) 'hash-table)
(loop for key being the hash-keys of (Services container)
using (hash-value value)
do (progn
(unless (gethash "factory" value) (error "Missing key 'factory' in YML file."))
(let ((arguments (gethash "arguments" value)))
(setf arguments (Container-Expand-Services container arguments))
(print arguments)
(setf (gethash key (Instances container))
(apply (intern (string-upcase (gethash "factory" value)))
arguments)))))))
(defun Container-Factory (file-name &key (singleton nil))
"Return an instance of CONTAINER class loaded up with FILE-NAME.
If SINGLETON is t, also sets the *container-singleton* to the last
loaded file, so the shortcut functions can be used to directly access
the yml elements."
(let ((container (make-instance 'Container)))
(unless (stringp file-name) (print (File-Name file-name)) (setf file-name (File-Name file-name)))
(Container-Load-File container file-name)
(Container-Instantiate-Services container)
(when singleton (setf *container-singleton* container))
container))
(defun get-service (name)
"When the *container-singleton* is set, returns the service NAME."
(when *container-singleton*
(Container-Get-Service *container-singleton* name)))
(defun get-parameter (name)
"When the *container-singleton* is set, returns the service NAME."
(when *container-singleton*
(Container-Get-Parameter *container-singleton* name)))
;;; "Container" goes here. Hacks and glory await!
| 4,201 | Common Lisp | .lisp | 84 | 43.964286 | 101 | 0.701562 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 22fedec778eac0402c2a74d855194f32eda15870c757e263cc9ce70b8feeca50 | 16,334 | [
-1
] |
16,335 | main.lisp | ahungry_injection/src/app/main.lisp | ;;;; main.lisp
(in-package #:injection)
;;; "main" goes here. Hacks and glory await!
| 87 | Common Lisp | .lisp | 3 | 27.333333 | 44 | 0.682927 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 681c312c58557c158d1e296316b6407c14238ebec61982f3b408b964d0a8d227 | 16,335 | [
-1
] |
16,336 | generic.lisp | ahungry_injection/src/util/generic.lisp | ;;;; container.lisp
(in-package #:injection)
;;; "container" goes here. Hacks and glory await!
| 97 | Common Lisp | .lisp | 3 | 30.666667 | 49 | 0.717391 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | c733cd2d2f790b28e2f2de821dde4af8c04834d3123b209dc76a27cde976b717 | 16,336 | [
-1
] |
16,337 | package.lisp | ahungry_injection/src/package/package.lisp | ;;;; package.lisp
(defpackage #:injection
(:use
#:cl
#:cl-yaml)
(:export
#:*container-singleton*
#:get-parameter
#:get-service
#:Container-Factory
#:Container-Get-Parameter
#:Container-Get-Service))
| 228 | Common Lisp | .lisp | 12 | 15.583333 | 28 | 0.665116 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 05da5ea4548068574b36c4af652d5b51d82df86831d05c2fba5e3fdaa945a06a | 16,337 | [
-1
] |
16,338 | File-Loader-Test.lisp | ahungry_injection/tests/classes/File-Loader-Test.lisp | ;;;; File-Loader-Test.lisp
(in-package #:injection-test)
(fiveam:def-suite file-loader :description "Test the project")
(fiveam:in-suite file-loader)
(fiveam:test test-factory
(signals
(error "Missing file")
(injection::File-Loader-Factory "/tmp/fake-file-FLT"))
(let ((file-loader (injection::File-Loader-Factory "/dev/null")))
(is (typep file-loader 'injection::file-loader))
)
)
;;(fiveam:run!)
| 429 | Common Lisp | .lisp | 13 | 29.615385 | 67 | 0.701711 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 7cc8d09286362214cdd758a8370cbb44cad3bad22068394595d150c92d523dcb | 16,338 | [
-1
] |
16,339 | main.lisp | ahungry_injection/tests/app/main.lisp | ;;;; main.lisp
(in-package #:injection-test)
(terpri)
(print "Run the tests with (injection-test:run!)")
(terpri)
| 116 | Common Lisp | .lisp | 5 | 21.8 | 50 | 0.715596 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | acefe7fb053501b777d1a94187f54e573b80dd473456954c30ec782d3992bade | 16,339 | [
-1
] |
16,340 | package.lisp | ahungry_injection/tests/package/package.lisp | ;;;; package.lisp
(defpackage #:injection-test
(:use
#:cl
#:injection
#:fiveam)
(:export
#:run!))
| 115 | Common Lisp | .lisp | 8 | 11.25 | 28 | 0.59434 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | bd3deb2f81b20a7f9adb75c5724b6049ef9e9c10765554d43306110242524aeb | 16,340 | [
-1
] |
16,341 | injection.asd | ahungry_injection/injection.asd | ;; Injection - YAML based Dependency Injection for Common Lisp
;; Copyright (C) 2016 Matthew Carter
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;; injection.asd
(in-package :cl-user)
(defpackage injection-asd
(:use :cl :asdf))
(in-package :injection-asd)
(defsystem #:injection
:version "0.1"
:author "Matthew Carter <[email protected]>"
:license "GPLv3"
:depends-on (:cl-yaml)
:serial t
:components
(
;; Main package definition
(:module
"src/package"
:components
((:file "package")))
;; Utility functions
(:module
"src/util"
:components
((:file "generic")))
;; Specific class functionality
(:module
"src/classes"
:components
((:file "Container" :depends-on ("File-Loader"))
(:file "File-Loader")))
;; Main app entry point
(:module
"src/app"
:components
((:file "main")))
)
:description "Dependency injection for Common Lisp"
:in-order-to ((test-op (load-op injection-test))))
| 1,595 | Common Lisp | .asd | 52 | 27.596154 | 72 | 0.702932 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 8f684be32d2602868f24cfff53b28421e4f3d5a64ed1304f5e86fbfd57c4e0e2 | 16,341 | [
-1
] |
16,342 | injection-test.asd | ahungry_injection/injection-test.asd | ;; Injection - YAML based Dependency Injection for Common Lisp
;; Copyright (C) 2016 Matthew Carter
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;; injection.asd
(in-package :cl-user)
(defpackage injection-test-asd
(:use :cl :asdf))
(in-package :injection-test-asd)
(defsystem #:injection-test
:version "0.1"
:author "Matthew Carter <[email protected]>"
:license "GPLv3"
:depends-on (:fiveam
:injection)
:serial t
:components
(
;; Main package definition
(:module
"tests/package"
:components
((:file "package")))
;; Specific class functionality
(:module
"tests/classes"
:components
((:file "File-Loader-Test")))
(:module
"tests/app"
:components
((:file "main")))
)
:description "Dependency injection for Common Lisp"
)
| 1,424 | Common Lisp | .asd | 46 | 27.869565 | 72 | 0.712619 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | d206c85a08380eaaf18b07cbdcfad0d357d9a06f09352834ef296c4d6220ac86 | 16,342 | [
-1
] |
16,344 | config.yml | ahungry_injection/example/config.yml | parameters:
foo: bar
an_array: [1, 2, 3]
extra_config_file: "../example/config_only_params.yml"
services:
file_loader:
# 'factory:' is a function that will return an instance of the class we require,
# since Common Lisp doesn't have position based class
# constructors, a factory function is needed to map them to the class.
factory: File-Loader-Factory
arguments: ["%extra_config_file%"]
service_container:
factory: Container-Factory
arguments: ["@file_loader"]
| 503 | Common Lisp | .l | 14 | 32.071429 | 84 | 0.718686 | ahungry/injection | 4 | 0 | 1 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 38504011c5182e53373fd720c9f66753e55e18af32ecc819d534788205e02a25 | 16,344 | [
-1
] |
16,367 | cl-typed.lisp | ahungry_cl-typed/src/cl-typed.lisp | ;; cl-typed - A project template generated by ahungry-fleece
;; Copyright (C) 2016 Your Name <[email protected]>
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;; cl-typed.lisp
(in-package #:cl-user)
(defpackage cl-typed
(:use :cl :cl-annot :cl-typed.lib.stub)
(:export :main
:!
:defn
:print-usage))
(in-package #:cl-typed)
(annot:enable-annot-syntax)
(setf (annot.core:annotation-inline-p 'annot) t)
@! (number number → number)
(defun add (a b)
(print "I will never print, even with invalid inputs at runtime.")
(+ a b))
(defun broken-call () (add "x" "y"))
(defun add-x (a b)
(print "I will happily print, even with invalid inputs at runtime.")
(+ a b))
(defun broken-call-x () (add-x "x" "y"))
(defun print-usage ()
(format t
"cl-typed v/~a.
Usage:
$ cl-typed [-h, --help] # Print this help
"
(asdf:component-version (asdf:find-system :cl-typed))))
(defun main (&rest argv)
(unless argv
(setf argv (cdr sb-ext:*posix-argv*)))
(if (or (equal (first argv) "-h")
(equal (first argv) "--help"))
(print-usage)
(cond
(t (print-usage)))))
;;; "cl-typed" goes here. Hacks and glory await!
| 1,840 | Common Lisp | .lisp | 51 | 32.607843 | 78 | 0.673815 | ahungry/cl-typed | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 4408ec7ab880ae00b9f40b81f8fc3e619ba9bcb980c21ed0ccbae461fd2ee96a | 16,367 | [
-1
] |
16,368 | cl-typed.lib.stub.lisp | ahungry_cl-typed/src/libs/cl-typed.lib.stub.lisp | ;; cl-typed - A project template generated by ahungry-fleece
;; Copyright (C) 2016 Your Name <[email protected]>
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;; cl-typed.lib.stub.lisp
(in-package #:cl-user)
(defpackage cl-typed.lib.stub
(:use :cl :cl-annot)
(:export
:!
:defn
:echo))
(in-package #:cl-typed.lib.stub)
(annot:enable-annot-syntax)
(setf (annot.core:annotation-inline-p 'annot) t)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defmacro defn (types name args &rest rest)
"Type safe defun"
(let ((types (remove-if
(lambda (x) (or (equal '-> x) (equal '→ x))) types)))
`(progn (defun ,name ,args
,@(loop
for arg in args
for type in types
collect `(check-type ,arg ,type))
,@rest)
(declaim (ftype (function ,(butlast types) ,@(last types)) ,name)))))
(defannotation ! (x y)
(:arity 2 :inline t)
`(defn ,x ,(cadr y) ,@(cddr y))))
(defun echo (input)
input)
;;; "cl-typed.lib.stub" goes here. Hacks and glory await!
| 1,744 | Common Lisp | .lisp | 44 | 34.568182 | 83 | 0.654642 | ahungry/cl-typed | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 414ee30afdec6c2cef3e030ac5342b439bccffee2260a5ab924debe6cee1eaaf | 16,368 | [
-1
] |
16,369 | cl-typed.run.tests.lisp | ahungry_cl-typed/t/cl-typed.run.tests.lisp | ;; cl-typed - A project template generated by ahungry-fleece
;; Copyright (C) 2016 Your Name <[email protected]>
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;; cl-typed.run.tests.lisp
(in-package #:cl-user)
(defpackage cl-typed.run.tests
(:use :cl
:cl-typed.lib.stub
:af.lib.ansi-colors
:af.lib.coverage
:af.lib.testy)
(:export :main))
(in-package #:cl-typed.run.tests)
(annot:enable-annot-syntax)
(defparameter *base-directory* (asdf:system-source-directory :cl-typed))
(defun main ()
"Run the tests, or the tests with coverage."
(if (and (sb-ext:posix-getenv "AF_LIB_TESTY_COVERAGE")
(> (length (sb-ext:posix-getenv "AF_LIB_TESTY_COVERAGE")) 0))
(coverage)
(test)
))
@! (number → number)
(defun mirror-number (a)
a)
(defun test ()
"Begin the tests!"
(unless (and (sb-ext:posix-getenv "AF_LIB_TESTY_COLORIZE")
(> (length (sb-ext:posix-getenv "AF_LIB_TESTY_COLORIZE")) 0))
(setf af.lib.ansi-colors:*colorize-p* nil))
(if (suite
"cl-typed.lib"
(desc
"cl-typed.lib.stub"
(it "Should echo the input"
(eq 3 (cl-typed.lib.stub:echo 3)))
)
(desc
"Type assertions"
(it "Should work with valid values"
(eq 4 (mirror-number 4)))
(it "Should throw an error if my types are invalid."
(handler-case
(progn
(mirror-number "four")
;; force a failure incase we don't pop out first
(eq nil t)
)
(simple-type-error (e)
(eq t t)
))))
) ;; end suite
(setf sb-ext:*exit-hooks* (list (lambda () (sb-ext:exit :code 0))))
(setf sb-ext:*exit-hooks* (list (lambda () (sb-ext:exit :code 1)))))
)
(defun coverage ()
"Begin the tests!"
;; See if we're in the shell environment or not (SLIME will use 'dumb' here)
(af.lib.coverage:with-coverage :cl-typed
(test)
(terpri)
(with-color :blue (format t "Summary of coverage:~%"))
(with-open-stream (*error-output* (make-broadcast-stream))
(af.contrib.sb-cover:report (merge-pathnames #P"coverage/" *base-directory*)))
(with-open-stream (*error-output* (make-broadcast-stream))
(af.lib.coverage:report-cli (merge-pathnames #P"coverage/" *base-directory*))
)
(with-open-stream (*error-output* (make-broadcast-stream))
(af.lib.coverage:report-json (merge-pathnames #P"coverage/" *base-directory*))
)
(with-color :light-blue
(format t "~%Full coverage report generated in: ~a" (merge-pathnames #P"coverage/" *base-directory*))
(format t "~%Coverage summary generated in: ~acoverage.json~%~%" (merge-pathnames #P"coverage/" *base-directory*))
)
)
)
;;; "cl-typed.run.tests" goes here. Hacks and glory await!
| 3,574 | Common Lisp | .lisp | 89 | 33.303371 | 120 | 0.625289 | ahungry/cl-typed | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | c3c935289cdea7a8d43d0129f2a5354ef3a6b1a3dbb5add1ef128bcf60cac395 | 16,369 | [
-1
] |
16,370 | cl-typed.asd | ahungry_cl-typed/cl-typed.asd | ;; cl-typed - A project template generated by ahungry-fleece
;; Copyright (C) 2016 Your Name <[email protected]>
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;;; cl-typed.asd
(in-package :cl-user)
(defpackage cl-typed-asd
(:use :cl :asdf))
(in-package :cl-typed-asd)
(asdf:defsystem #:cl-typed
:version "0.0.1"
:description "Your project template"
:author "Your Name <[email protected]>"
:license "GPLv3"
:depends-on (#:ahungry-fleece
#:cl-annot)
:serial t
:components
(
;; The lib modules
(:module "libs"
:pathname "src/libs"
:components
((:file "cl-typed.lib.stub")))
;; The main module
(:module "cl-typed"
:pathname "src"
:depends-on ("libs")
:components
((:file "cl-typed")))
;; The testing module
(:module "t"
:pathname "t"
:depends-on ("libs" "cl-typed")
:components
((:file "cl-typed.run.tests")))
)
)
;;:in-order-to ((test-op (load-op alluring-allegory-test))))
| 1,699 | Common Lisp | .asd | 50 | 29.06 | 78 | 0.652651 | ahungry/cl-typed | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 1e4da9960a6e3bc0472bb1f34b94b685e7bf33a2759b069568100b48ebdc78c0 | 16,370 | [
-1
] |
16,373 | Makefile.in | ahungry_cl-typed/Makefile.in | LISP?= sbcl
AF_LIB_TESTY_COLORIZE?= yes
TFLAGS = --non-interactive \
--eval '(ql:quickload :cl-typed)' \
--eval '(cl-typed.run.tests:main)'
CFLAGS = --disable-debugger \
--eval "(mapc \#'require '(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 sb-rotate-byte sb-cover asdf))" \
--eval '(sb-ext:save-lisp-and-die "bin/cl-typed.core")'
TEFLAGS = --disable-debugger \
--eval '(ql:quickload :cl-typed)' \
--eval '(sb-ext:save-lisp-and-die "bin/cl-typed-test" :executable t)'
EFLAGS = --disable-debugger \
--eval '(ql:quickload :cl-typed)' \
--eval '(sb-ext:save-lisp-and-die "bin/cl-typed" :executable t :toplevel '"\#'cl-typed::main)"
CORE = bin/cl-typed.core
EXE = bin/cl-typed
TEXE = bin/cl-typed-test
all: $(EXE)
$(CORE):
$(LISP) $(CFLAGS)
$(EXE): $(CORE)
$(LISP) --core $< $(EFLAGS)
$(TEXE): $(CORE)
$(LISP) --core $< $(TEFLAGS)
test: $(TEXE)
AF_LIB_TESTY_COLORIZE=$(AF_LIB_TESTY_COLORIZE) $< $(TFLAGS)
coverage: $(TEXE)
AF_LIB_TESTY_COVERAGE='y' \
AF_LIB_TESTY_COLORIZE=$(AF_LIB_TESTY_COLORIZE) $< $(TFLAGS)
clean:
-rm $(CORE)
-rm $(EXE)
-rm $(TEXE)
.PHONY:
all test
| 1,100 | Common Lisp | .l | 35 | 29.542857 | 108 | 0.661597 | ahungry/cl-typed | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | e299f1f3da667c6acdeb8623054f52dafad0c92666ef059d39d74d84add8dbd4 | 16,373 | [
-1
] |
16,377 | cl-typed.ros | ahungry_cl-typed/roswell/cl-typed.ros | #!/bin/sh
#|-*- mode:lisp -*-|#
#| A skelly project for Common Lisp dependant on SBCL, generated by Ahungry Fleece
exec ros -Q -L sbcl-bin -- $0 "$@"
|#
#-sbcl
(error "cl-typed requires SBCL. Make sure it is installed with `ros install sbcl' and use it with `ros use sbcl'.")
(progn ;;init forms
(ql:quickload '(#:cl-typed) :silent t))
(defpackage #:ros.script.cl-typed
(:use #:cl))
(in-package :ros.script.cl-typed)
(defun main (&rest argv)
(cl-typed:main argv))
;;; vim: set ft=lisp lisp:
| 502 | Common Lisp | .l | 15 | 31.733333 | 115 | 0.680498 | ahungry/cl-typed | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 0adbb17098885666d50f7638f3dcd511dfe1488dd6ca5a9f09e7f9cebc5a9512 | 16,377 | [
-1
] |
16,393 | utils.lisp | borodust_notalone-thriced/game/utils.lisp | (cl:in-package :notalone-thriced)
(declaim (special *scene*
*overlay*
*width*
*height*
*framebuffer-width*
*framebuffer-height*))
(defvar *unloaded-foreign-libraries* nil)
(defparameter *debug-table* (make-hash-table :test #'equal))
(defun debug-print (name value)
(setf (gethash name *debug-table*) value))
(defun debug-format (name control &rest args)
(setf (gethash name *debug-table*) (apply #'format nil control args)))
(defun shout (control &rest args)
(format *standard-output* "~&")
(apply #'format *standard-output* control args)
(finish-output *standard-output*))
(defun unload-foreign-libraries ()
(bodge-blobs-support:close-foreign-libraries)
(handler-bind ((style-warning #'muffle-warning))
(loop for lib in (cffi:list-foreign-libraries :loaded-only t)
do (progn
(pushnew (cffi:foreign-library-name lib) *unloaded-foreign-libraries*
:test #'equal)
(cffi:close-foreign-library lib)))))
(defun reload-foreign-libraries ()
(bodge-blobs-support:load-foreign-libraries)
(loop for lib-name in *unloaded-foreign-libraries*
do (cffi:load-foreign-library lib-name))
(setf *unloaded-foreign-libraries* nil))
(uiop:register-image-dump-hook 'unload-foreign-libraries)
(defmacro with-transform ((transform &rest operations) &body body)
(alexandria:with-gensyms (transform0 transform1 vec)
(flet ((%expand-transform (result source operation-desc)
(let* ((operation (first operation-desc)))
(if (eq operation :transform)
`(aw:mat4-mult ,result ,source ,(second operation-desc))
(let ((vec-config (if (eq operation :rotation)
(cddr operation-desc)
(rest operation-desc))))
(destructuring-bind (&key x y z) vec-config
`(aw:with-vec3 (,vec
,@(when x `(:x ,x))
,@(when y `(:y ,y))
,@(when z `(:z ,z)))
,(ecase operation
(:rotation `(aw:rotate-mat4 ,result ,source ,(second operation-desc) ,vec))
(:translation `(aw:translate-mat4 ,result ,source ,vec))
(:scale `(aw:scale-mat4 ,result ,source ,vec))))))))))
`(aw:with-mat4* (,transform0
,transform1)
,@(loop with result = transform0 and source = transform1
for operation in operations
collect (prog1 (%expand-transform result source operation)
(rotatef result source))
into transforms
finally (return (append transforms
`((let ((,transform ,source))
,@body)))))))))
(defun real-time-seconds ()
(float (/ (get-internal-real-time) internal-time-units-per-second) 0f0))
| 3,169 | Common Lisp | .lisp | 61 | 36.885246 | 104 | 0.546161 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | dd18e9b3746926d2e6d17ef4bfd42397153efaac99179d303f62569225dbfba2 | 16,393 | [
-1
] |
16,394 | packages.lisp | borodust_notalone-thriced/game/packages.lisp | (cl:defpackage :notalone-thriced
(:local-nicknames (:a :alexandria)
(:aw :alien-works)
(:cref :cffi-c-ref))
(:use :cl))
| 164 | Common Lisp | .lisp | 5 | 23 | 40 | 0.509434 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | c1fde178c91427ca5849565484e606bca25a49bd03e39ec31b23ca3d7ed86be6 | 16,394 | [
-1
] |
16,395 | play.lisp | borodust_notalone-thriced/game/implementation/play.lisp | (cl:in-package :notalone-thriced)
(defun calc-angle (vec)
(aw:with-vec2* ((ref-vec :x 1 :y 0)
(nvec))
(aw:vec2-normalize nvec vec)
(let ((pre-angle (acos (aw:vec2-dot ref-vec nvec))))
(if (> (aw:vec2 vec 1) 0)
pre-angle
(- (* 2 pi) pre-angle)))))
;;;
;;; ENEMY
;;;
(defstruct (enemy
(:constructor %make-enemy))
position
created
entity
shot-p
(sound-sources (list)))
(defun make-enemy (x y)
(let ((renderable (funcall (find-asset :renderable "alien.mesh.0.renderable"))))
(aw:add-scene-entity *scene* renderable)
(%make-enemy :position (aw:make-vec2 x y)
:created (real-time-seconds)
:entity renderable
:sound-sources (list (let ((source (aw:make-audio-source (find-asset :audio "spawn"))))
(aw:with-vec3 (pos :x x :y y)
(setf (aw:audio-source-position source) pos))
(aw:play-audio-source source)
source)
(let ((source (aw:make-audio-source (find-asset :audio "crawl"))))
(aw:with-vec3 (pos :x x :y y)
(setf (aw:audio-source-position source) pos
(aw:audio-source-looping-p source) t))
(aw:play-audio-source source)
source)))))
(defun update-enemy (enemy)
(with-slots (player-position) *state*
(let* ((enemy-position (enemy-position enemy))
(life (- (real-time-seconds) (enemy-created enemy)))
(scale (* 0.08 (+ 0.5 (* 0.5 (abs (cos (* life 3))))))))
(aw:with-vec2* (tmp vel)
(aw:vec2-subt tmp player-position enemy-position)
(aw:vec2-normalize vel tmp)
(let ((distance (aw:vec2-length tmp)))
(aw:vec2-scalar-mult tmp vel (if (> distance 0.8)
0.015
0.005)))
(aw:vec2-copy vel tmp)
(aw:vec2-copy tmp enemy-position)
(aw:vec2-add enemy-position tmp vel))
(with-transform (transform
(:translation :x (aw:vec2 enemy-position 0)
:y (aw:vec2 enemy-position 1)
:z 0.01)
(:rotation life :z 1)
(:scale :x scale :y scale :z scale))
(aw:transform-entity (enemy-entity enemy) transform))
(loop for source in (enemy-sound-sources enemy)
if (eq :playing (aw:audio-source-state source))
do (aw:with-vec3 (pos :x (aw:vec2 enemy-position 0)
:y (aw:vec2 enemy-position 1))
(setf (aw:audio-source-position source) pos))
else
collect source into stopped-sources
finally (loop for stopped-source in stopped-sources
do (aw:destroy-audio-source stopped-source)
(a:deletef (enemy-sound-sources enemy)
stopped-source)))))
(not (enemy-shot-p enemy)))
(defun update-if-enemy-shot (enemy)
(with-slots (player-position player-angle) *state*
(let ((enemy-position (enemy-position enemy)))
(aw:with-vec2* (tmp)
(aw:vec2-subt tmp enemy-position player-position)
(let ((enemy-angle (calc-angle tmp)))
(when (and (< (- player-angle (* (/ pi 180) 15))
enemy-angle
(+ player-angle (* (/ pi 180) 15)))
(> 0.6 (aw:vec2-length tmp)))
(setf (enemy-shot-p enemy) t)))))))
(defun destroy-enemy (enemy)
(loop for source in (enemy-sound-sources enemy)
do (aw:stop-audio-source source)
(aw:destroy-audio-source source))
(aw:remove-scene-entity *scene* (enemy-entity enemy))
(aw:destroy-vec2 (enemy-position enemy)))
;;;
;;; PARTICLE
;;;
(defstruct (particle-cloud-instance
(:constructor %make-particle-cloud-instance))
instance
created)
(defun make-particle-cloud-instance (x y angle vel-x vel-y)
(let ((particles (make-particle-cloud (find-asset :material "particle")
x y angle vel-x vel-y)))
(setf (particle-cloud-delta particles) 0)
(aw:add-scene-entity *scene* (particle-cloud-entity particles))
(%make-particle-cloud-instance :instance particles)))
(defun update-particle-cloud-instance (instance)
(let ((particles (particle-cloud-instance-instance instance))
(current-time (real-time-seconds)))
(unless (particle-cloud-instance-created instance)
(setf (particle-cloud-instance-created instance) current-time))
(let ((delta (- current-time
(particle-cloud-instance-created instance))))
(setf (particle-cloud-delta particles) (+ 0.05
(if (zerop delta)
0
(* 1/4 (log (+ 1 (* 25 delta)) 10))))))))
(defun particle-cloud-instance-life (instance)
(if (particle-cloud-instance-created instance)
(- (real-time-seconds) (particle-cloud-instance-created instance))
0))
(defun destroy-particle-cloud-instance (instance)
(let ((instance (particle-cloud-instance-instance instance)))
(aw:remove-scene-entity *scene* (particle-cloud-entity instance))
(destroy-particle-cloud instance)))
;;;
;;; ENDLESS FLOOR
;;;
(defstruct (endless-floor
(:constructor %make-endless-floor))
(patches nil))
(defun make-endless-floor (width height)
(let ((patches (make-array (list width height))))
(loop for i below width
do (loop for j below height
do (setf
(aref patches i j)
(make-floor (find-asset :material "floor")
(find-asset :texture "floor_baseColor")
(find-asset :texture "floor_normal")
(find-asset :texture "floor_arm")))
(aw:add-scene-entity *scene* (floor-entity (aref patches i j)))))
(%make-endless-floor :patches patches)))
(defun update-endless-floor (floor x y)
(let* ((patches (endless-floor-patches floor))
(width (array-dimension patches 0))
(height (array-dimension patches 1))
(offset-x (+ (/ width -2) (floor x)))
(offset-y (+ (/ height -2) (floor y))))
(with-transform (root-transform
(:translation :x offset-x :y offset-y :z 0))
(loop for i below width
do (loop for j below height
for patch = (aref patches i j)
do (with-transform (transform
(:transform root-transform)
(:translation :x i :y j))
(aw:transform-entity (floor-entity patch) transform)))))))
(defun destroy-endless-floor (floor)
(let ((patches (endless-floor-patches floor)))
(loop for i below (array-dimension patches 0)
do (loop for j below (array-dimension patches 1)
for patch = (aref patches i j)
do (aw:remove-scene-entity *scene* (floor-entity patch))
(destroy-floor patch)))))
;;;
;;; STATE
;;;
(defclass gameplay-state (notalone-state)
((mouse-state :initform (aw:make-mouse-state))
(key-bag :initform (list))
(player-angle :initform (/ pi 2))
(player-velocity :initform (aw:make-vec2 0 0))
(player-position :initform (aw:make-vec2 0 0))
(particles :initform (list))
(enemies :initform (list))
(player-sources :initform (list))
(kill-count :initform 0)
(started :initform (real-time-seconds))
floor flashlight))
(defmethod initialize-instance :after ((this gameplay-state) &key)
(with-slots (floor flashlight player-sources) this
(setf floor (make-endless-floor 5 4)
flashlight (aw:with-vec3 (light-direction :x 0f0 :y 0f0 :z -1f0)
(aw:make-light :focused-spot
(aw:.cast-shadows t)
(aw:.intensity 100000)
(aw:.direction light-direction)
(aw:.falloff 0.9)
(aw:.spot-light-cone (/ pi 8) (/ pi 4)))))
(let ((music (aw:make-audio-source (find-asset :audio "action"))))
(push music player-sources)
(aw:play-audio-source music)
(setf (aw:audio-source-looping-p music) t))
(aw:add-scene-entity *scene* flashlight)))
(defmethod withdraw ((this gameplay-state))
(with-slots (floor flashlight particles player-velocity player-position enemies
player-sources)
this
(loop for instance in particles
do (destroy-particle-cloud-instance instance))
(aw:remove-scene-entity *scene* flashlight)
(loop for enemy in enemies
do (destroy-enemy enemy))
(loop for source in player-sources
do (aw:destroy-audio-source source))
(aw:destroy-light flashlight)
(destroy-endless-floor floor)
(aw:destroy-vec2 player-velocity)
(aw:destroy-vec2 player-position)))
(defmethod react ((this gameplay-state) event)
(with-slots (key-bag particles enemies player-position player-angle player-velocity
player-sources kill-count)
this
(let ((event-type (aw:event-type event)))
(case event-type
((:keyboard-button-down :keyboard-button-up)
(let ((pressed-p (eq event-type :keyboard-button-down))
(key (aw:event-key-scan-code event)))
(case key
(:escape (when pressed-p
(transition-to 'initial-state :kill-count kill-count)))
((:w :a :s :d) (if pressed-p
(pushnew key key-bag)
(a:deletef key-bag key))))))
(:mouse-button-down
(when (eq :left (aw:event-mouse-button event))
(push (make-particle-cloud-instance (aw:vec2 player-position 0)
(aw:vec2 player-position 1)
player-angle
(aw:vec2 player-velocity 0)
(aw:vec2 player-velocity 1))
particles)
(let ((shot (aw:make-audio-source (find-asset :audio "shot"))))
(aw:play-audio-source shot)
(push shot player-sources))
(loop for enemy in enemies
do (update-if-enemy-shot enemy))))))))
(defun spawn-enemy ()
(with-slots (player-position enemies) *state*
(let ((rand-x (- 1 (random 2f0)))
(rand-y (- 1 (random 2f0))))
(push (make-enemy (+ (+ rand-x (if (> rand-x 0) 1 -1)) (aw:vec2 player-position 0))
(+ (+ rand-y (if (> rand-y 0) 1 -1)) (aw:vec2 player-position 1)))
enemies))))
(defun player-dead-p ()
(with-slots (player-position enemies) *state*
(aw:with-vec2 (tmp)
(loop for enemy in enemies
thereis (progn
(aw:vec2-subt tmp (enemy-position enemy) player-position)
(<= (aw:vec2-length tmp) 0.1))))))
(defmethod act ((this gameplay-state))
(with-slots (floor flashlight mouse-state key-bag particles enemies started
player-angle player-position player-velocity player-sources kill-count)
this
(aw:mouse-state mouse-state)
(let* ((time-delta (- (real-time-seconds) started))
(enemies-expected (1+ (floor (/ time-delta 10))))
(enemies-needed (- enemies-expected (length enemies))))
(when (> time-delta 3)
(loop repeat enemies-needed
do (spawn-enemy))))
(loop for instance in particles
do (update-particle-cloud-instance instance)
when (> (particle-cloud-instance-life instance) 2)
collect instance into for-removal
finally (loop for instance in for-removal
do (destroy-particle-cloud-instance instance)
(a:deletef particles instance)))
(aw:with-vec2* ((tmp :x 0 :y 0)
(mov-dir :x 0 :y 0))
(loop for key in key-bag
do (case key
(:w (incf (aw:vec2 tmp 1)))
(:a (decf (aw:vec2 tmp 0)))
(:s (decf (aw:vec2 tmp 1)))
(:d (incf (aw:vec2 tmp 0)))))
(if (aw:vec2-equal tmp mov-dir)
(setf (aw:vec2 player-velocity 0) 0
(aw:vec2 player-velocity 1) 0)
(progn
(aw:vec2-normalize mov-dir tmp)
(aw:vec2-scalar-mult player-velocity mov-dir 0.01)
(aw:vec2-copy tmp player-position)
(aw:vec2-add player-position tmp player-velocity))))
(update-endless-floor floor
(aw:vec2 player-position 0)
(aw:vec2 player-position 1))
(with-transform (transform
(:translation :x (aw:vec2 player-position 0)
:y (+ (aw:vec2 player-position 1) -0.1)
:z 2)
(:rotation (* (/ pi 180) 3) :x 1))
(aw:transform-scene-camera *scene* transform))
(aw:with-vec3 (pos :x (aw:vec2 player-position 0)
:y (aw:vec2 player-position 1))
(setf (aw:audio-listener-position) pos)
(loop for source in player-sources
if (eq :playing (aw:audio-source-state source))
do (setf (aw:audio-source-position source) pos)
else
collect source into stopped-sources
finally (loop for stopped-source in stopped-sources
do (aw:destroy-audio-source stopped-source)
(a:deletef player-sources stopped-source))))
(loop for enemy in enemies
unless (update-enemy enemy)
do (incf kill-count) and collect enemy into dead-enemies
finally (loop for dead-enemy in dead-enemies
do (a:deletef enemies dead-enemy)
(destroy-enemy dead-enemy)))
(aw:with-vec2 (mouse-vec :x (- (aw:mouse-state-x mouse-state) (/ *width* 2))
:y (- (- *height* (aw:mouse-state-y mouse-state)) (/ *height* 2)))
(setf player-angle (calc-angle mouse-vec)))
(with-transform (root-transform
(:translation :x (aw:vec2 player-position 0)
:y (aw:vec2 player-position 1))
(:rotation player-angle :z 1))
(with-transform (transform
(:transform root-transform)
(:translation :z 0.05)
(:rotation (* (/ pi 180) -80) :y 1))
(aw:transform-entity flashlight transform)))
(when (player-dead-p)
(transition-to 'end-state :kill-count kill-count))))
(defmethod draw ((this gameplay-state))
(with-slots (kill-count started) this
(menu-paint-color)
(aw:with-font (*menu-typeface*)
(aw:font-size 26)
(aw:with-saved-transform ()
(aw:translate (- *width* 120) 40)
(aw:text 0 0 "~3,'0D" kill-count))
(aw:with-saved-transform ()
(let* ((play-time-seconds (- (real-time-seconds) started))
(minutes (floor (/ play-time-seconds 60)))
(seconds (floor (mod play-time-seconds 60))))
(aw:translate 14 40)
(aw:text 0 0 "~1,'0D:~2,'0D" minutes seconds))))))
| 15,997 | Common Lisp | .lisp | 334 | 34.173653 | 104 | 0.538752 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 1b07d45a3f5efb77214089591db1343761f1daf8c5a5466341e1e7a50c8d1823 | 16,395 | [
-1
] |
16,396 | state.lisp | borodust_notalone-thriced/game/implementation/state.lisp | (cl:in-package :notalone-thriced)
(declaim (special *canvas*
*title-typeface*
*menu-typeface*))
(defclass notalone-state ()
(canvas
banner
title-typeface
menu-typeface))
(defmethod initialize-instance :after ((this notalone-state) &key )
(with-slots (canvas banner banner-entity title-typeface menu-typeface) this
(setf canvas (aw:make-canvas *width* *height*
:framebuffer-width *framebuffer-width*
:framebuffer-height *framebuffer-height*)
banner (make-banner (find-asset :material "banner") *width* *height*)
title-typeface (find-asset :typeface "sector17")
menu-typeface (find-asset :typeface "sector34"))
(aw:add-scene-entity *overlay* (banner-entity banner))))
(defmethod withdraw :before ((this notalone-state))
(with-slots (canvas banner) this
(aw:remove-scene-entity *overlay* (banner-entity banner))
(destroy-banner banner)
(aw:destroy-canvas canvas)))
(defmethod draw :around ((this notalone-state))
(with-slots (canvas banner title-typeface menu-typeface) this
(setf (banner-texture banner) (aw:canvas-texture canvas))
(aw:with-canvas (canvas)
(let ((*title-typeface* title-typeface)
(*menu-typeface* menu-typeface))
(call-next-method)))))
(defun title-paint-color ()
(aw:paint-color 0.5 0.7 0))
(defun menu-paint-color ()
(aw:paint-color 0.75 0.6 0))
| 1,484 | Common Lisp | .lisp | 34 | 36.147059 | 79 | 0.658774 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 3957d9087689871d51c3153e19fb42952e49c1981aaff4d68134f7b505ea912c | 16,396 | [
-1
] |
16,397 | end.lisp | borodust_notalone-thriced/game/implementation/end.lisp | (cl:in-package :notalone-thriced)
(defclass end-state (notalone-state)
((kill-count :initarg :kill-count :initform nil)
music))
(defmethod initialize-instance :after ((this end-state) &key kill-count)
(with-slots (music) this
(setf music (aw:make-audio-source (find-asset :audio "menu")))
(update-records kill-count)
(aw:play-audio-source music)
(setf (aw:audio-source-looping-p music) t)))
(defmethod withdraw ((this end-state))
(with-slots (music) this
(aw:destroy-audio-source music)))
(defmethod react ((this end-state) event)
(with-slots (kill-count) this
(case (aw:event-type event)
(:keyboard-button-down
(case (aw:event-key-scan-code event)
((:return :escape :space) (transition-to 'initial-state :kill-count kill-count)))))))
(defmethod act ((this end-state))
(with-slots (banner) this))
(defmethod draw ((this end-state))
(with-slots (kill-count) this
(let ((time (real-time-seconds)))
(aw:paint-color 0.75 0.15 0)
(aw:with-saved-transform ()
(aw:translate 80 250)
(aw:rotate (* (/ pi 180) 2))
(aw:with-font (*title-typeface*)
(aw:font-baseline-snap nil)
(aw:font-subpixel t)
(aw:font-size 160)
(let ((x (* (cos (* 1 time)) 20))
(y (* (sin (* 2 time)) 5)))
(aw:text x y "MISSING")
(aw:translate 380 100)
(aw:text x y "IN ACTION"))))
(when kill-count
(aw:with-saved-transform ()
(aw:translate 400 580)
(aw:with-font (*menu-typeface*)
(aw:font-size 22)
(aw:text 0 0 (format nil "DROP RESULT: ~A" kill-count)))))
(aw:with-saved-transform ()
(menu-paint-color)
(aw:translate 480 700)
(aw:with-font (*menu-typeface*)
(aw:font-size 26)
(aw:with-saved-transform ()
(aw:translate (* 10 (abs (sin (* 5 time)))) 0)
(aw:scale 0.8 0.8)
(aw:text -110 -2 ">>>"))
(aw:text 0 0 "ESCAPE"))))))
| 2,051 | Common Lisp | .lisp | 53 | 30.849057 | 94 | 0.579717 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | f1309b4889910a16c4570581afb2bbe1d85653d84dc1195425aee9182e6563e1 | 16,397 | [
-1
] |
16,398 | record.lisp | borodust_notalone-thriced/game/implementation/record.lisp | (cl:in-package :notalone-thriced)
(defvar *records* nil)
(defun update-records (kill-count)
(when kill-count
(let ((top-result (first *records*)))
(when (or (null top-result)
(> kill-count (cdr top-result)))
(push (cons (local-time:format-timestring nil (local-time:now)
:format local-time:+asctime-format+)
kill-count)
*records*)))))
;;;
;;; STATE
;;;
(defclass record-state (notalone-state)
(music))
(defmethod initialize-instance :after ((this record-state) &key)
(with-slots (music) this
(setf music (aw:make-audio-source (find-asset :audio "menu")))
(aw:play-audio-source music)
(setf (aw:audio-source-looping-p music) t)))
(defmethod withdraw ((this record-state))
(with-slots (music) this
(aw:destroy-audio-source music)))
(defmethod react ((this record-state) event)
(with-slots () this
(case (aw:event-type event)
(:keyboard-button-down
(case (aw:event-key-scan-code event)
((:return :escape :space) (transition-to 'initial-state)))))))
(defmethod act ((this record-state))
(with-slots (banner) this))
(defmethod draw ((this record-state))
(let ((time (real-time-seconds)))
(title-paint-color)
(aw:with-saved-transform ()
(aw:translate 140 200)
(aw:rotate (* (/ pi 180) 2))
(aw:with-font (*title-typeface*)
(aw:font-baseline-snap nil)
(aw:font-subpixel t)
(aw:font-size 160)
(let ((x (* (cos (* 1 time)) 20))
(y (* (sin (* 2 time)) 5)))
(aw:text x y "SERVICE")
(aw:translate 220 100)
(aw:text x y "RECORD"))))
(menu-paint-color)
(aw:with-saved-transform ()
(aw:translate 200 500)
(let ((step 60))
(aw:with-font (*menu-typeface*)
(aw:font-size 22)
(loop for record in *records*
for idx from 0 below 3
for (date . result) = record
do (aw:text 0 (* step idx) "~A" date)
(aw:text 720 (* step idx) "~A" result)))))
(aw:with-saved-transform ()
(aw:translate 510 800)
(aw:with-font (*menu-typeface*)
(aw:font-size 26)
(aw:with-saved-transform ()
(aw:translate (* 10 (abs (sin (* 5 time)))) 0)
(aw:scale 0.8 0.8)
(aw:text -110 -2 ">>>"))
(aw:text 0 0 "RETURN")))))
| 2,446 | Common Lisp | .lisp | 67 | 28.358209 | 86 | 0.560779 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 43994e4cb3b489a8ad26c2b298ae6d0ddf2fb50cb80944bdc85fc640f4f3bc9b | 16,398 | [
-1
] |
16,399 | game.lisp | borodust_notalone-thriced/game/implementation/game.lisp | (cl:in-package :notalone-thriced)
(defclass initial-state (notalone-state)
((selected :initform 0)
(kill-count :initarg :kill-count :initform nil)
music))
(defmethod initialize-instance :after ((this initial-state) &key kill-count)
(with-slots (music) this
(setf music (aw:make-audio-source (find-asset :audio "menu")))
(update-records kill-count)
(aw:play-audio-source music)
(setf (aw:audio-source-looping-p music) t)))
(defmethod withdraw ((this initial-state))
(with-slots (music) this
(aw:destroy-audio-source music)))
(defmethod react ((this initial-state) event)
(with-slots (selected) this
(flet ((next-menu-item ()
(setf selected (mod (1+ selected) 3)))
(prev-menu-item ()
(setf selected (mod (1- selected) 3)))
(perform-item-action ()
(case selected
(0 (transition-to 'gameplay-state))
(1 (transition-to 'record-state))
(2 (throw 'quit nil)))))
(case (aw:event-type event)
(:keyboard-button-down
(case (aw:event-key-scan-code event)
((:down :s) (next-menu-item))
((:up :w) (prev-menu-item))
((:return :space) (perform-item-action))))
(:gamepad-button-down
(case (aw:event-gamepad-button event)
(:dpad-down (next-menu-item))
(:dpad-up (prev-menu-item))
(:a (perform-item-action))))))))
(defmethod act ((this initial-state))
(with-slots (banner) this))
(defmethod draw ((this initial-state))
(with-slots (selected kill-count) this
(let ((time (real-time-seconds)))
(title-paint-color)
(aw:with-saved-transform ()
(aw:translate 140 200)
(aw:rotate (* (/ pi 180) 2))
(aw:with-font (*title-typeface*)
(aw:font-baseline-snap nil)
(aw:font-subpixel t)
(aw:font-size 160)
(let ((x (* (cos (* 1 time)) 20))
(y (* (sin (* 2 time)) 5)))
(aw:text x y "NOTALONE:")
(aw:translate 220 100)
(aw:text x y "THRICED"))))
(menu-paint-color)
(aw:with-saved-transform ()
(aw:translate 160 600)
(aw:with-font (*menu-typeface*)
(aw:font-size 26)
(let ((step 60))
(aw:with-saved-transform ()
(aw:translate (* 10 (abs (sin (* 5 time))))
(* selected step))
(aw:scale 0.8 0.8)
(aw:text -110 -2 ">>>"))
(aw:text 0 (* step 0) "DROP IN")
(aw:text 0 (* step 1) "SERVICE RECORD")
(aw:text 0 (* step 2) "FLEE"))))
(when kill-count
(aw:with-saved-transform ()
(aw:translate 720 880)
(aw:with-font (*menu-typeface*)
(aw:font-size 22)
(aw:text 0 0 (format nil "LAST DROP RESULT: ~A" kill-count))))))))
| 2,901 | Common Lisp | .lisp | 74 | 29.756757 | 78 | 0.546425 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 385bd36f4fd52953a517c6e2329ca887ee22600dd06c38b3627040c577a1bab6 | 16,399 | [
-1
] |
16,400 | cloud.lisp | borodust_notalone-thriced/game/framework/cloud.lisp | (cl:in-package :notalone-thriced)
(eval-when (:compile-toplevel :load-toplevel :execute)
(a:define-constant +particle-count+ 20))
(cffi:defcstruct particle-cloud-vertex
(pos :float :count 3)
(col :float :count 4)
(vel :float :count 3))
(cffi:defcstruct particle-cloud-data
(vertices (:struct particle-cloud-vertex) :count #.+particle-count+)
(indices :uint16 :count #.+particle-count+))
(defun make-particle-cloud-data (x y angle vel-x vel-y)
(with-transform (pos-transform
(:translation :x x :y y))
(with-transform (vel-transform
(:rotation angle :z 1))
(aw:with-vec4* ((tmp :x 0 :y 0 :z 0.2 :w 1)
(tvel)
(tpos))
(aw:mat4-vec-mult tpos pos-transform tmp)
(aw:with-vec4 (col :x 100 :y 0 :z 0 :w 1)
(aw:with-vec3* ((pos :x (aw:vec4 tpos 0)
:y (aw:vec4 tpos 1)
:z (aw:vec4 tpos 2))
(vel))
(flet ((update-velocity ()
(let ((radius 0.5))
(setf (aw:vec4 tmp 0) 2
(aw:vec4 tmp 1) (- radius (random (float (* 2 radius) 0f0)))
(aw:vec4 tmp 2) (+ (aw:vec3 pos 2)
(- radius (random (float (* 2 radius) 0f0))))
(aw:vec4 tmp 3) 1)
(aw:mat4-vec-mult tvel vel-transform tmp)
(setf (aw:vec3 vel 0) (+ (* vel-x 80) (aw:vec4 tvel 0))
(aw:vec3 vel 1) (+ (* vel-y 80) (aw:vec4 tvel 1))
(aw:vec3 vel 2) (aw:vec4 tvel 2))))
(init-vertex (vertex
pos-x pos-y pos-z
vel-x vel-y vel-z
col-r col-g col-b col-a)
(cref:c-val ((vertex (:struct particle-cloud-vertex)))
(setf (vertex :pos 0) (float pos-x 0f0)
(vertex :pos 1) (float pos-y 0f0)
(vertex :pos 2) (float pos-z 0f0)
(vertex :col 0) (float col-r 0f0)
(vertex :col 1) (float col-g 0f0)
(vertex :col 2) (float col-b 0f0)
(vertex :col 3) (float col-a 0f0)
(vertex :vel 0) (float vel-x 0f0)
(vertex :vel 1) (float vel-y 0f0)
(vertex :vel 2) (float vel-z 0f0)))))
(cref:c-let ((data (:struct particle-cloud-data) :alloc t))
(loop for i below +particle-count+
do (update-velocity)
(init-vertex
(data :vertices i &)
(aw:vec3 pos 0) (aw:vec3 pos 1) (aw:vec3 pos 2)
(aw:vec3 vel 0) (aw:vec3 vel 1) (aw:vec3 vel 2)
(aw:vec4 col 0) (aw:vec4 col 1) (aw:vec4 col 2) (aw:vec4 col 3))
(setf (data :indices i) i))
(data &)))))))))
(defstruct (particle-cloud
(:constructor %make-particle-cloud)
(:conc-name %particle-cloud-))
data
mat-instance
renderable
vbuf
ibuf)
(defun make-particle-cloud (material x y angle vel-x vel-y)
(let* ((vertex-size (cffi:foreign-type-size '(:struct particle-cloud-vertex)))
(index-size (cffi:foreign-type-size :uint16))
(color-offset (* 3 (cffi:foreign-type-size :float)))
(velocity-offset (+ color-offset (* 4 (cffi:foreign-type-size :float))))
(vbuf (aw:make-vertex-buffer +particle-count+
(aw:.attribute :position :float3 0 vertex-size)
(aw:.attribute :color :float4 color-offset vertex-size)
(aw:.attribute :custom0 :float3 velocity-offset vertex-size)))
(ibuf (aw:make-index-buffer +particle-count+
(aw:.type :ushort)))
(data (make-particle-cloud-data x y angle vel-x vel-y))
(mat-instance (aw:make-material-instance material)))
(cref:c-val ((data (:struct particle-cloud-data)))
(aw:fill-vertex-buffer vbuf (data :vertices &)
(* +particle-count+ vertex-size))
(aw:fill-index-buffer ibuf
(data :indices &)
(* +particle-count+ index-size)))
(%make-particle-cloud :vbuf vbuf
:ibuf ibuf
:data data
:mat-instance mat-instance
:renderable (aw:make-renderable 1
(aw:.bounding-box -0.001 -0.001 -0.001
0.001 0.001 0.001)
(aw:.culling nil)
(aw:.receive-shadows nil)
(aw:.cast-shadows nil)
(aw:.geometry 0 :points vbuf ibuf)
(aw:.material 0 mat-instance)))))
(defun destroy-particle-cloud (particle-cloud))
(defun particle-cloud-entity (particle-cloud)
(%particle-cloud-renderable particle-cloud))
(defun (setf particle-cloud-delta) (delta particle-cloud)
(setf
(aw:material-instance-parameter-float (%particle-cloud-mat-instance particle-cloud) "delta")
delta)
delta)
| 5,791 | Common Lisp | .lisp | 107 | 33.682243 | 100 | 0.453277 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 00fc812f84e8614b7c60aaae4fbbb6940fb4e94f1589c1016a95de839d3bd78c | 16,400 | [
-1
] |
16,401 | main.lisp | borodust_notalone-thriced/game/framework/main.lisp | (cl:in-package :notalone-thriced)
(defvar *assets* (make-hash-table :test 'equal))
(defun find-asset (type name)
(gethash (list type name) *assets*))
(defun init-loop (baked-assets &rest rest-assets)
(let* ((resources (load-resources baked-assets))
(forged (forge-resources resources)))
(loop for (type name asset) in (append forged rest-assets)
do (setf
(gethash (list type name) *assets*)
(case type
(:typeface (aw:make-typeface (aw:read-host-file-into-shareable-vector asset)))
(t asset)))))
(setf (aw:scene-skybox *scene*) (aw:make-color-skybox 0.0 0.0 0.0 1.0)
(aw:scene-skybox *overlay*) (aw:make-color-skybox 0.0 0.0 0.0 0.0))
(aw:scene-camera-lens-projection *scene* 28f0 (/ *width* *height*) 0.1 100)
(aw:scene-camera-ortho-projection *overlay* 0 *width* 0 *height*)
(init-tools *tools*)
(transition-to 'initial-state))
(defun destroy-loop ()
(game-state-withdraw)
(loop for (type nil) being the hash-key of *assets* using (hash-value asset)
do (case type
(:typeface (aw:destroy-typeface asset)))))
(defun handle-event (event)
(when event
(case (aw:event-type event)
(:quit (throw 'quit nil))
(:gamepad-added (aw:grab-gamepad (aw:event-gamepad-id event))))
(game-state-process-event event)
(handle-tool-event *tools* event)))
(defun handle-loop ()
(flet ((%handle-event (event)
(handle-event event)))
(aw:handle-events #'%handle-event))
(let ((time-delta 0.014))
(update-tools *tools* time-delta)
(game-state-act)
(aw:when-frame ()
(aw:render-scene *scene*)
(aw:render-scene *overlay*)
(render-tools *tools*)
(game-state-draw))
;; FIXME: add proper delta calc
(sleep time-delta)))
(defun run (assets &rest rest-assets)
(alien-works:with-alien-works (:window-title "NOTALONE: 3D")
(let* ((*width* (aw:window-width))
(*height* (aw:window-height))
(*framebuffer-width* (aw:framebuffer-width))
(*framebuffer-height* (aw:framebuffer-height))
(*scene* (aw:make-scene *framebuffer-width*
*framebuffer-height*))
(*overlay* (aw:make-scene *framebuffer-width*
*framebuffer-height*
:post-processing nil
:shadows nil
:blend-mode :translucent))
(*game-state* (make-instance 'game-state)))
(with-tools (:notalone-thriced-tools)
(apply #'init-loop assets rest-assets)
(shout "Game ready")
(unwind-protect
(catch 'quit
(shout "Looping")
(loop
(tagbody start
(restart-case
(handle-loop)
(restart-loop ()
:report "Restart game loop"
(go start))))))
(destroy-loop)
(aw:destroy-scene *scene*)
(aw:destroy-scene *overlay*))))))
(defun asset-path (asset-name)
(cond
((member :android *features*) asset-name)
((member :appimage *features*) (merge-pathnames asset-name (merge-pathnames
"usr/share/app/"
(aw:working-directory))))
((or (member :msix *features*)
(member :awd-archive *features*))
(merge-pathnames asset-name (merge-pathnames
"rsc/"
(aw:working-directory))))
(t (asdf:system-relative-pathname :notalone-thriced
(merge-pathnames asset-name "assets/")))))
(aw:definit main ()
(reload-foreign-libraries)
(run (asset-path "assets.bin")
`(:typeface "sector17" ,(asset-path "sector_017.ttf"))
`(:typeface "sector34" ,(asset-path "sector_034.otf"))))
| 4,054 | Common Lisp | .lisp | 93 | 31.709677 | 94 | 0.54986 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 2f77b3fd69b61f1df11b4b5f82bd11625caf58e803e88d4f1f3f53e9d16376cd | 16,401 | [
-1
] |
16,402 | banner.lisp | borodust_notalone-thriced/game/framework/banner.lisp | (cl:in-package :notalone-thriced)
;;;
;;; GAME
;;;
(cffi:defcstruct banner-vertex
(pos :float :count 2)
(uv :float :count 2))
(cffi:defcstruct banner-data
(vertices (:struct banner-vertex) :count 4)
(indices :uint16 :count 6))
(defun make-banner-data (width height)
(flet ((init-vertex (vertex x0 y0 x1 y1 )
(cref:c-val ((vertex (:struct banner-vertex)))
(setf (vertex :pos 0) (float x0 0f0)
(vertex :pos 1) (float y0 0f0)
(vertex :uv 0) (float x1 0f0)
(vertex :uv 1) (float y1 0f0)))))
(cref:c-let ((data (:struct banner-data) :alloc t))
(init-vertex (data :vertices 0 &)
0 0
0 1)
(init-vertex (data :vertices 1 &)
width 0
1 1)
(init-vertex (data :vertices 2 &)
width height
1 0)
(init-vertex (data :vertices 3 &)
0 height
0 0)
(setf (data :indices 0) 0
(data :indices 1) 1
(data :indices 2) 2
(data :indices 3) 0
(data :indices 4) 2
(data :indices 5) 3)
(data &))))
(defstruct (banner
(:constructor %make-banner)
(:conc-name %banner-))
sampler
data
mat-instance
renderable
vbuf
ibuf)
(defun make-banner (material width height)
(let* ((vertex-size (cffi:foreign-type-size '(:struct banner-vertex)))
(index-size (cffi:foreign-type-size :uint16))
(pos-size (* 2 (cffi:foreign-type-size :float)))
(vbuf (aw:make-vertex-buffer 4
(aw:.attribute :position :float2 0 vertex-size)
(aw:.attribute :uv0 :float2 pos-size vertex-size)))
(ibuf (aw:make-index-buffer 6
(aw:.type :ushort)))
(data (make-banner-data width height))
(sampler (aw:make-sampler))
(mat-instance (aw:make-material-instance material)))
(cref:c-val ((data (:struct banner-data)))
(aw:fill-vertex-buffer vbuf (data :vertices &)
(* 4 vertex-size))
(aw:fill-index-buffer ibuf
(data :indices &)
(* 6 index-size)))
(%make-banner :vbuf vbuf
:ibuf ibuf
:data data
:sampler sampler
:mat-instance mat-instance
:renderable (aw:make-renderable 1
(aw:.bounding-box 0 0 0 1 1 1)
(aw:.culling nil)
(aw:.receive-shadows nil)
(aw:.cast-shadows nil)
(aw:.geometry 0 :triangles vbuf ibuf)
(aw:.material 0 mat-instance)))))
(defun destroy-banner (banner))
(defun banner-entity (banner)
(%banner-renderable banner))
(defun banner-texture (banner)
(declare (ignore banner))
(error "Not implemented"))
(defun (setf banner-texture) (texture banner)
(setf
(aw:material-instance-parameter-sampler (%banner-mat-instance banner) "banner" texture)
(%banner-sampler banner))
texture)
| 3,405 | Common Lisp | .lisp | 87 | 25.609195 | 90 | 0.494539 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | ff184631596e6f36d3d3c0cc5207e3e115f1ae890954bed0cd7c2318ff974416 | 16,402 | [
-1
] |
16,403 | state.lisp | borodust_notalone-thriced/game/framework/state.lisp | (cl:in-package :notalone-thriced)
(declaim (special *game-state*
*state*))
(defgeneric act (state)
(:method (state)
(declare (ignore state))))
(defmethod act :around (state)
(let ((*state* state))
(call-next-method)))
(defgeneric draw (state)
(:method (state)
(declare (ignore state))))
(defmethod draw :around (state)
(let ((*state* state))
(call-next-method)))
(defgeneric react (state event)
(:method (state event)
(declare (ignore state event))))
(defmethod react :around (state event)
(declare (ignore event))
(let ((*state* state))
(call-next-method)))
(defgeneric withdraw (state)
(:method (state)
(declare (ignore state))))
(defmethod withdraw :around (state)
(let ((*state* state))
(call-next-method)))
(defclass game-state ()
((state :initform nil)
(next-state :initform nil)))
(defun game-state ()
(with-slots (state) *game-state*
state))
(defun game-state-process-event (event)
(react (game-state) event))
(defun game-state-act ()
(with-slots (state next-state) *game-state*
(when next-state
(withdraw state)
(setf state (apply #'make-instance next-state)
next-state nil))
(act state)))
(defun game-state-draw ()
(draw (game-state)))
(defun game-state-withdraw ()
(withdraw (game-state)))
(defun transition-to (state-class &rest args &key &allow-other-keys)
(with-slots (next-state) *game-state*
(setf next-state (list* state-class args))))
| 1,510 | Common Lisp | .lisp | 50 | 26.06 | 68 | 0.665966 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 2929e1cf5c3df28c45b5dd0a3f3f34b4f1ffad4e77a3934e77d070dac8eb5fed | 16,403 | [
-1
] |
16,404 | tools.lisp | borodust_notalone-thriced/game/framework/tools.lisp | (cl:in-package :notalone-thriced)
(declaim (special *tools*))
(defgeneric make-tools (name &key &allow-other-keys)
(:method (name &key)
(declare (ignore name))
nil))
(defgeneric init-tools (tools)
(:method (tools)
(declare (ignore tools))))
(defgeneric destroy-tools (tools)
(:method (tools)
(declare (ignore tools))))
(defgeneric call-with-tools (tools body)
(:method (tools body)
(declare (ignore tools))
(funcall body)))
(defgeneric handle-tool-event (tools event)
(:method (tools event)
(declare (ignore tools event))))
(defgeneric render-tools (tools)
(:method (tools)
(declare (ignore tools))))
(defgeneric update-tools (tools time-delta)
(:method (tools time-delta)
(declare (ignore tools time-delta))))
(defmacro with-tools ((name &rest args &key &allow-other-keys) &body body)
`(let ((*tools* (make-tools ,name ,@args)))
(unwind-protect
(call-with-tools *tools* (lambda () ,@body))
(destroy-tools *tools*))))
| 1,010 | Common Lisp | .lisp | 30 | 29.6 | 74 | 0.676715 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 1ab10003a200d3cbbea31b88a63f8103233fba136a03a87367b98f10fcc0f881 | 16,404 | [
-1
] |
16,405 | resource.lisp | borodust_notalone-thriced/game/framework/resource.lisp | (cl:in-package :notalone-thriced)
;;;
;;; RESOURCE TABLE
;;;
(declaim (special *resource-table*))
(defun find-resource (name)
(alexandria:if-let (resource (gethash name *resource-table*))
(values (third resource) (fourth resource))
(error "Resource ~A not found" name)))
;;;
;;; RESOURCE
;;;
(defclass resource ()
((kind :initarg :kind :initform (error ":kind missing") :reader resource-kind)
(name :initarg :name :initform (error ":name missing") :reader resource-name)))
(defgeneric decode-resource (kind name descriptor data-ptr data-size))
(defgeneric encode-resource (resource))
(defgeneric forge-resource (resource))
(defclass blob-resource (resource)
((data :initarg :data :initform (error ":data missing"))
(size :initarg :size :initform (error ":size missing"))))
(defun make-blob-resource (class name data-ptr data-size)
(make-instance class :name name :data data-ptr :size data-size))
(defmethod encode-resource ((this blob-resource))
(with-slots (data size) this
(values nil data size)))
;;;
;;; MESH
;;;
(defmacro do-buffer-descriptor (((kind type size &rest keys) descriptor) &body body)
(alexandria:with-gensyms (el)
`(loop for ,el in ,descriptor
do (destructuring-bind (,kind ,type ,size &key ,@keys &allow-other-keys) ,el
,@body))))
(defun parse-buffer-descriptor (descriptor)
(flet ((%type-size (type)
(ecase type
((:byte :ubyte) 1)
((:ushort :short) 2)
(:float 4)
((:uint :int) 4)))
(%convert-type (type size)
(alexandria:eswitch ((list type size) :test #'equal)
('(:byte 1) :byte)
('(:byte 2) :byte2)
('(:byte 3) :byte3)
('(:byte 4) :byte4)
('(:ubyte 1) :ubyte)
('(:ubyte 2) :ubyte2)
('(:ubyte 3) :ubyte3)
('(:ubyte 4) :ubyte4)
('(:short 1) :short)
('(:short 2) :short2)
('(:short 3) :short3)
('(:short 4) :short4)
('(:ushort 1) :ushort)
('(:ushort 2) :ushort2)
('(:ushort 3) :ushort3)
('(:ushort 4) :ushort4)
('(:int 1) :int)
('(:int 2) :int2)
('(:int 3) :int3)
('(:int 4) :int4)
('(:uint 1) :uint)
('(:uint 2) :uint2)
('(:uint 3) :uint3)
('(:uint 4) :uint4)
('(:float 1) :float)
('(:float 2) :float2)
('(:float 3) :float3)
('(:float 4) :float4))))
(let ((total-byte-size 0))
(do-buffer-descriptor ((kind type size) descriptor)
(declare (ignore kind))
(incf total-byte-size (* (%type-size type) size)))
(let ((current-offset 0)
(opts)
(uv-counter 0))
(flet ((%opt (el)
(push el opts)))
(do-buffer-descriptor ((kind type size) descriptor)
(let ((complex-type (%convert-type type size))
(byte-size (* (%type-size type) size)))
(case kind
(:position (%opt (aw:.attribute :position complex-type current-offset total-byte-size)))
(:tangent
(%opt (aw:.attribute :tangents complex-type current-offset total-byte-size))
(%opt (aw:.normalized :tangents t)))
(:color
(%opt (aw:.attribute :color complex-type current-offset total-byte-size))
(%opt (aw:.normalized :color t)))
(:uv
(let ((uv (ecase uv-counter
(0 :uv0)
(1 :uv1))))
(%opt (aw:.attribute uv complex-type current-offset total-byte-size))
(incf uv-counter)))
(:index
(%opt (aw:.type complex-type))))
(incf current-offset byte-size))))
(values (nreverse opts) total-byte-size)))))
(defclass buffer-resource (resource)
((descriptor :initarg :descriptor)
(data :initarg :data)
(size :initarg :size :reader buffer-resource-size)))
(defmethod encode-resource ((this buffer-resource))
(with-slots (descriptor data size) this
(values descriptor data size)))
(defun make-buffer (class name descriptor data-ptr data-size)
(make-instance class
:name name
:descriptor descriptor
:data data-ptr
:size data-size))
(defclass vertex-buffer-resource (buffer-resource) ()
(:default-initargs :kind :vertex-buffer))
(defun make-vertex-buffer-resource (name descriptor data-ptr data-size)
(make-buffer 'vertex-buffer-resource name descriptor data-ptr data-size))
(defmethod decode-resource ((this (eql :vertex-buffer)) name descriptor data-ptr data-size)
(make-vertex-buffer-resource name descriptor data-ptr data-size))
(defmethod forge-resource ((this vertex-buffer-resource))
(with-slots (descriptor data size) this
(multiple-value-bind (opts vertex-size)
(parse-buffer-descriptor descriptor)
(let ((buf (apply #'aw:make-vertex-buffer
(/ size vertex-size)
opts)))
(aw:fill-vertex-buffer buf data size)
buf))))
(defclass index-buffer-resource (buffer-resource) ()
(:default-initargs :kind :index-buffer))
(defun make-index-buffer-resource (name descriptor data-ptr data-size)
(make-buffer 'index-buffer-resource name descriptor data-ptr data-size))
(defmethod decode-resource ((this (eql :index-buffer)) name descriptor data-ptr data-size)
(make-index-buffer-resource name descriptor data-ptr data-size))
(defmethod forge-resource ((this index-buffer-resource))
(with-slots (descriptor data size) this
(multiple-value-bind (opts index-size)
(parse-buffer-descriptor descriptor)
(let ((buf (apply #'aw:make-index-buffer
(/ size index-size)
opts)))
(aw:fill-index-buffer buf data size)
buf))))
;;;
;;; TEXTURE
;;;
(defclass pixel-buffer-resource (buffer-resource) ()
(:default-initargs :kind :pixel-buffer))
(defun make-pixel-buffer-resource (name descriptor data-ptr data-size)
(make-buffer 'pixel-buffer-resource name descriptor data-ptr data-size))
(defmethod decode-resource ((this (eql :pixel-buffer)) name descriptor data-ptr data-size)
(make-pixel-buffer-resource name descriptor data-ptr data-size))
(defmethod forge-resource ((this pixel-buffer-resource))
(with-slots (descriptor data size) this
(aw:make-pixel-buffer data
size
(ecase (second (first descriptor))
(1 :r)
(2 :rg)
(3 :rgb)
(4 :rgba))
:ubyte)))
(defclass texture-resource (resource)
((width :initarg :width)
(height :initarg :height)
(format :initarg :format)
(sampler :initarg :sampler :initform :2d)
(pixel-buffer :initarg :pixel-buffer :initform nil))
(:default-initargs :kind :texture))
(defun make-texture-resource (name width height format &key pixel-buffer sampler)
(make-instance 'texture-resource :name name
:width width
:height height
:format format
:sampler (or sampler :2d)
:pixel-buffer pixel-buffer))
(defmethod encode-resource ((this texture-resource))
(with-slots (width height format pixel-buffer sampler) this
(values `(:width ,width
:height ,height
:format ,format
,@(when pixel-buffer
`(:pixel-buffer ,pixel-buffer))
,@(when sampler
`(:sampler ,sampler)))
nil 0)))
(defmethod decode-resource ((this (eql :texture)) name descriptor data-ptr data-size)
(declare (ignore data-ptr data-size))
(destructuring-bind (&key width height format pixel-buffer sampler) descriptor
(make-texture-resource name width height format :pixel-buffer pixel-buffer
:sampler sampler)))
(defmethod forge-resource ((this texture-resource))
(with-slots (descriptor width height format pixel-buffer sampler) this
(let ((tex (aw:make-texture (aw:.width width)
(aw:.height height)
(aw:.format format)
(aw:.sampler sampler))))
(when pixel-buffer
(multiple-value-bind (forged-pb resource-pb) (find-resource pixel-buffer)
(ecase sampler
(:2d (aw:update-texture-image tex 0 forged-pb))
(:cubemap (aw:update-cubemap-images tex 0 forged-pb
(/ (buffer-resource-size resource-pb) 6))))
(aw:generate-texture-mipmaps tex)))
tex)))
;;;
;;; MATERIAL
;;;
(defclass material-resource (blob-resource) ()
(:default-initargs :kind :material))
(defun make-material-resource (name data size)
(make-blob-resource 'material-resource name data size))
(defmethod decode-resource ((kind (eql :material)) name descriptor data-ptr data-size)
(declare (ignore descriptor))
(make-material-resource name data-ptr data-size))
(defmethod forge-resource ((this material-resource))
(with-slots (data size) this
(aw:make-material-from-memory data size)))
;;;
;;; RENDERABLE
;;;
(defclass renderable-resource (resource)
((material :initarg :material)
(samplers :initarg :samplers)
(geometry :initarg :geometry)
(aabb :initarg :aabb))
(:default-initargs :kind :renderable))
(defun make-renderable-resource (name material geometry samplers aabb)
(make-instance 'renderable-resource :name name
:material material
:geometry geometry
:samplers samplers
:aabb aabb))
(defmethod encode-resource ((this renderable-resource))
(with-slots (material samplers geometry aabb) this
(values `(:material ,material :samplers ,samplers :geometry ,geometry :aabb ,aabb) nil 0)))
(defmethod decode-resource ((this (eql :renderable)) name descriptor data-ptr data-size)
(declare (ignore data-ptr data-size))
(destructuring-bind (&key material samplers geometry aabb) descriptor
(make-renderable-resource name material geometry samplers aabb)))
(defmethod forge-resource ((this renderable-resource))
(with-slots (material samplers geometry aabb) this
(let* ((renderable-opts (let* ((material (find-resource material))
(textures (loop for (name texture) in samplers
collect (cons name (find-resource texture))))
(buffers (loop for geometry-desc in geometry
collect (destructuring-bind (vertex-buffer index-buffer) geometry-desc
(list (find-resource vertex-buffer) (find-resource index-buffer)))))
(sampler (aw:make-sampler))
(mat-instance (aw:make-material-instance material))
renderable-opts)
(flet ((%add-renderable-opts (&rest opts)
(loop for opt in opts
do (push opt renderable-opts))))
(loop for (name texture) in textures
do (setf
(aw:material-instance-parameter-sampler mat-instance
name
texture)
sampler))
(loop for (vbuf ibuf) in buffers
for idx from 0
do (%add-renderable-opts (aw:.geometry idx :triangles
vbuf
ibuf)
(aw:.material idx
mat-instance)))
renderable-opts)))
(opts (append (list (aw:.culling t)
(aw:.receive-shadows t)
(aw:.cast-shadows t))
(when aabb
(destructuring-bind (&optional min-x min-y min-z max-x max-y max-z)
aabb
(list (aw:.bounding-box (or min-x (- aw:+epsilon+))
(or min-y (- aw:+epsilon+))
(or min-z (- aw:+epsilon+))
(or max-x (+ aw:+epsilon+))
(or max-y (+ aw:+epsilon+))
(or max-z (+ aw:+epsilon+))))))
renderable-opts)))
(lambda ()
(apply #'aw:make-renderable (length geometry) opts)))))
;;;
;;; RESOURCE PACKAGE
;;;
(defun save-resources (path &rest resources)
(ensure-directories-exist path)
(with-open-file (out path :direction :output
:element-type '(unsigned-byte 8)
:if-exists :supersede)
(let ((total-size 0)
preamble
data-list)
(loop for resource in resources
do (multiple-value-bind (descriptor data size) (encode-resource resource)
(push (nconc
(list (resource-kind resource)
(resource-name resource))
(when (and size (> size 0))
(list :size size))
(when descriptor
(list :descriptor descriptor)))
preamble)
(push (cons data size) data-list)
(incf total-size size)))
(alexandria:nreversef preamble)
(alexandria:nreversef data-list)
(let ((preamble-out (flexi-streams:make-flexi-stream out :external-format :utf8)))
(prin1 preamble preamble-out))
(when (> total-size 0)
(static-vectors:with-static-vector (total-data total-size :element-type '(unsigned-byte 8))
(loop with ptr = (static-vectors:static-vector-pointer total-data)
for (data . size) in data-list
when (> size 0)
do (when data
(aw:memcpy ptr data size))
(cffi:incf-pointer ptr size))
(write-sequence total-data out)
(finish-output out))))))
(defun read-into-foreign-memory (dst-ptr size octet-stream)
(let ((buffer-size (* 1024 1024)))
(static-vectors:with-static-vector (buffer buffer-size :element-type '(unsigned-byte 8))
(let ((buffer-ptr (static-vectors:static-vector-pointer buffer)))
(loop with size-read = 0
with current-ptr = (cffi:make-pointer (cffi:pointer-address dst-ptr))
while (< size-read size)
do (let* ((bytes-to-read (min (- size size-read) buffer-size))
(bytes-read (read-sequence buffer octet-stream :start 0 :end bytes-to-read)))
(aw:memcpy current-ptr buffer-ptr bytes-read)
(incf size-read bytes-read)
(cffi:incf-pointer current-ptr bytes-read)))))))
(defun load-resources (path)
(aw:with-open-host-file (out path :direction :input)
(let* ((preamble-out (flexi-streams:make-flexi-stream out :external-format :utf8))
(preamble (let ((*read-eval* nil))
(read-preserving-whitespace preamble-out))))
(loop for encoded-resource in preamble
collect (destructuring-bind (kind name &key size descriptor) encoded-resource
(let ((data-size 0)
data-ptr)
(when (and size (> size 0))
(setf data-ptr (cffi:foreign-alloc :uint8 :count size)
data-size size)
(read-into-foreign-memory data-ptr size out))
(decode-resource kind name
descriptor
data-ptr
data-size)))))))
(defun forge-resources (resources)
(let ((*resource-table* (make-hash-table :test 'equal)))
(loop for resource in resources
for name = (resource-name resource)
for forged = (list (resource-kind resource) name (forge-resource resource) resource)
collect (setf (gethash name *resource-table*) forged))))
;;;
;;; AUDIO RESOURCE
;;;
(defclass audio-resource (resource)
((encoded :initarg :encoded :initform (error ":encoded missing"))
(channels :initarg :channels :initform 1))
(:default-initargs :kind :audio))
(defun make-audio-resource (name encoded &key (channels 1))
(make-instance 'audio-resource
:name name
:encoded (static-vectors:make-static-vector
(length encoded)
:element-type '(unsigned-byte 8)
:initial-contents encoded)
:channels channels))
(defmethod encode-resource ((resource audio-resource))
(with-slots (encoded channels) resource
(values `(:channels ,channels)
(static-vectors:static-vector-pointer encoded)
(length encoded))))
(defmethod decode-resource ((kind (eql :audio)) name descriptor data-ptr data-size)
(declare (ignore kind))
(let ((data (static-vectors:make-static-vector data-size
:element-type '(unsigned-byte 8))))
(aw:memcpy (static-vectors:static-vector-pointer data)
data-ptr
data-size)
(destructuring-bind (&key (channels 1)) descriptor
(make-instance 'audio-resource
:name name
:encoded data
:channels channels))))
(defmethod forge-resource ((resource audio-resource))
(with-slots (encoded channels) resource
(flex:with-input-from-sequence (in encoded)
(aw:make-audio-buffer (aw:decode-audio in :channels channels) :channels channels))))
| 19,070 | Common Lisp | .lisp | 392 | 33.994898 | 128 | 0.53936 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | a9899889dcbb3f5f4a810b45ad4bf6e3328ea78b888b700a16742a47ef73a32b | 16,405 | [
-1
] |
16,406 | floor.lisp | borodust_notalone-thriced/game/framework/floor.lisp | (cl:in-package :notalone-thriced)
;;;
;;; GAME
;;;
(defstruct (%floor
(:constructor %make-floor)
(:conc-name %floor-))
samplers
data
mat-instance
renderable
vbuf
ibuf)
(defun make-floor (material base-color-texture normal-texture arm-texture)
(let* ((vertex-size (cffi:foreign-type-size '(:struct banner-vertex)))
(index-size (cffi:foreign-type-size :uint16))
(pos-size (* 2 (cffi:foreign-type-size :float)))
(vbuf (aw:make-vertex-buffer 4
(aw:.attribute :position :float2 0 vertex-size)
(aw:.attribute :uv0 :float2 pos-size vertex-size)))
(ibuf (aw:make-index-buffer 6
(aw:.type :ushort)))
(data (make-banner-data 1 1))
(samplers (list (aw:make-sampler)
(aw:make-sampler)
(aw:make-sampler)))
(mat-instance (aw:make-material-instance material)))
(cref:c-val ((data (:struct banner-data)))
(aw:fill-vertex-buffer vbuf (data :vertices &)
(* 4 vertex-size))
(aw:fill-index-buffer ibuf
(data :indices &)
(* 6 index-size)))
(loop for (name . tex) in `(("baseColor" . ,base-color-texture)
("normal" . ,normal-texture)
("arm" . ,arm-texture))
for sampler in samplers
do (setf
(aw:material-instance-parameter-sampler mat-instance name tex)
sampler))
(%make-floor :vbuf vbuf
:ibuf ibuf
:data data
:samplers samplers
:mat-instance mat-instance
:renderable (aw:make-renderable 1
(aw:.bounding-box -0.001 -0.001 -0.001
1.001 1.001 0.001)
(aw:.culling t)
(aw:.receive-shadows t)
(aw:.cast-shadows nil)
(aw:.geometry 0 :triangles vbuf ibuf)
(aw:.material 0 mat-instance)))))
(defun destroy-floor (banner))
(defun floor-entity (banner)
(%floor-renderable banner))
| 2,491 | Common Lisp | .lisp | 56 | 26.660714 | 89 | 0.45507 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 3164528aeeac1f0e34936c24a4053eec5faf627a61ccfa0071be2f7a953053b2 | 16,406 | [
-1
] |
16,407 | packages.lisp | borodust_notalone-thriced/tools/packages.lisp | (cl:defpackage :notalone-thriced.tools
(:local-nicknames (:a :alexandria)
(:aw :alien-works)
(:awt :alien-works.tools))
(:use :cl))
| 176 | Common Lisp | .lisp | 5 | 25.4 | 46 | 0.538012 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 4ebd350abf612a77eda0b7defa1b83b5c465a66b627c92d285522fbaee9ba885 | 16,407 | [
-1
] |
16,408 | resources.lisp | borodust_notalone-thriced/tools/assets/resources.lisp | (cl:in-package :notalone-thriced.tools)
(defparameter *banner-material-source*
"
material {
name : banner,
parameters: [
{ type: sampler2d, name: banner }
],
requires : [
uv0
],
shadingModel : unlit,
culling : none,
blending : transparent
}
fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);
material.baseColor = textureLod(materialParams_banner, getUV0(), 0.0);
}
}
")
(defparameter *floor-material-source*
"
material {
name : floor,
parameters: [
{ type: sampler2d, name: baseColor },
{ type: sampler2d, name: normal },
{ type: sampler2d, name: arm }
],
requires : [
uv0
],
shadingModel : lit,
blending : opaque
}
fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);
material.baseColor = textureLod(materialParams_baseColor, getUV0(), 0.0);
material.normal = texture(materialParams_normal, getUV0()).xyz * 2.0 - 1.0;
vec3 arm = textureLod(materialParams_arm, getUV0(), 0.0).rgb;
material.ambientOcclusion = arm.r;
material.roughness = arm.g;
material.metallic = arm.b;
}
}
")
(defparameter *particle-material-source*
"
material {
name : particle_cloud,
requires : [
custom0,
color
],
shadingModel : unlit,
blending : add,
parameters : [
{ type: float, name: delta }
]
}
vertex {
void materialVertex(inout MaterialVertexInputs material) {
float3 offset = vec3(getCustom0().xyz * materialParams.delta);
material.worldPosition = vec4(material.worldPosition.xyz + offset.xyz, material.worldPosition.w);
gl_PointSize = 10.0 - 25.0 * materialParams.delta;
}
}
fragment {
void material(inout MaterialInputs material) {
vec2 coord = gl_PointCoord - vec2(0.5);
if(length(coord) > 0.5)
discard;
prepareMaterial(material);
material.baseColor = getColor();
}
}
")
(defun asset-path (name)
(notalone-thriced::asset-path name))
(defun asset-image (asset-path &key name)
(let ((name (if name name (file-namestring asset-path))))
(awt:load-image name (asset-path asset-path))))
(defun convert-audio-with-ffmpeg (dst src &key (channels 1))
(uiop:run-program `("ffmpeg" "-y"
"-i" ,(namestring src)
"-f" "s16le"
"-ar" "48000"
"-ac" ,(format nil "~A" channels)
"-acodec" "pcm_s16le"
,(namestring dst))
:output nil
:error-output *error-output*))
(defun parse-audio (name path &key (channels 1))
(uiop:with-temporary-file (:pathname tmpfile)
(convert-audio-with-ffmpeg tmpfile path :channels channels)
(alexandria:with-input-from-file (in tmpfile :element-type '(signed-byte 16))
(pcm->resources name in :channels channels))))
(defun parse-material (source)
(awt:parse-material source :debug t
:target-api :opengl
:platform :all
:optimization :performance))
(defun update-assets ()
(let (assets)
(labels ((%add (&rest resources)
(a:nconcf assets resources))
(%add-image (name path)
(apply #'%add
(image->resources (asset-image (merge-pathnames path "src/textures/")
:name name)))))
;; banner
(multiple-value-bind (data size)
(parse-material *banner-material-source*) assets
(%add (notalone-thriced::make-material-resource "banner" data size)))
;; floor
(multiple-value-bind (data size)
(parse-material *floor-material-source*) assets
(%add (notalone-thriced::make-material-resource "floor" data size)))
(%add-image "floor_baseColor" "floors/main/Sci-fi_Floor_001_basecolor.jpg")
(%add-image "floor_normal" "floors/main/Sci-fi_Floor_001_normal.jpg")
(%add-image "floor_arm" "floors/main/Sci-fi_Floor_001_arm.png")
;; particles
(multiple-value-bind (data size)
(parse-material *particle-material-source*) assets
(%add (notalone-thriced::make-material-resource "particle" data size)))
;; alien
(apply #'%add (parse-gltf "alien" (asset-path "src/models/alien/scene.gltf")))
;; audio
(apply #'%add (parse-audio "crawl" (asset-path "src/audio/3/slime_001.ogg")))
(apply #'%add (parse-audio "spawn" (asset-path "src/audio/2/deathb.wav")))
(apply #'%add (parse-audio "shot" (asset-path "src/audio/5/shotgun.wav")))
(apply #'%add (parse-audio "menu"
(asset-path "src/audio/4/Iwan_Gabovitch_Dark_Ambience_Loop.ogg")
:channels 2))
(apply #'%add (parse-audio "action"
(asset-path "src/audio/4/HorrorPen_Dramatic_Action.ogg")
:channels 2)))
(apply #'notalone-thriced::save-resources (asset-path "assets.bin") assets)))
| 5,257 | Common Lisp | .lisp | 141 | 28.446809 | 105 | 0.590257 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | d678614df4719f13f371c9f9b88dff432fc800491f0a378769d2ae274863d911 | 16,408 | [
-1
] |
16,409 | ui.lisp | borodust_notalone-thriced/tools/eden/ui.lisp | (cl:in-package :notalone-thriced.tools)
(define-tool-window (eden-window "Tools" ;; :width 400 :height 600
)
(when (awt:collapsing-header "Info")
(when (awt:button "Clear")
(clrhash notalone-thriced::*debug-table*))
(loop for name being the hash-key of notalone-thriced::*debug-table*
using (hash-value value)
do (awt:text (format nil "~A: ~A" name value))))
(when (awt:collapsing-header "Utilities")
(let ((gain (aw:audio-listener-gain)))
(when (awt:checkbox "Mute Audio" (= gain 0))
(setf (aw:audio-listener-gain) (if (> gain 0) 0 1))))))
| 622 | Common Lisp | .lisp | 13 | 40.615385 | 72 | 0.61944 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 383ce5f49f6831f0d7f120bef2fb7e5b115e21013e34c126b41a96090efe34fe | 16,409 | [
-1
] |
16,410 | eden.lisp | borodust_notalone-thriced/tools/eden/eden.lisp | (cl:in-package :notalone-thriced.tools)
(declaim (special *tools*))
(defclass game-tools ()
((ui :initarg :ui)
(ui-hidden-p :initform t)
(windows :initform (list 'eden-window))
(context :initform (make-hash-table :test 'equal))
(repl-server :initarg :repl-server)
(last-time-delta :initform 0)))
(defun open-tool-window (display-function-name)
(with-slots (windows) *tools*
(pushnew display-function-name windows)))
(defun close-tool-window (display-function-name)
(with-slots (windows) *tools*
(a:deletef windows display-function-name)))
(defun context-property (name)
(with-slots (context) *tools*
(gethash name context)))
(defun (setf context-property) (value name)
(with-slots (context) *tools*
(setf (gethash name context) value)))
(defmethod notalone-thriced::make-tools ((name (eql :notalone-thriced-tools)) &key)
(make-instance 'game-tools
:repl-server (slynk:create-server :port 11958)
:ui (if (uiop:featurep :android)
(awt:make-ui :scale 3 :touch-padding 3)
(awt:make-ui))))
(defmethod notalone-thriced::destroy-tools ((tools game-tools))
(with-slots (ui repl-server) tools
(slynk:stop-server repl-server)
(awt:destroy-ui ui)))
(defmethod notalone-thriced::call-with-tools ((this game-tools) body)
(with-slots (ui) this
(let ((*tools* this))
(funcall body))))
(defmethod notalone-thriced::handle-tool-event ((this game-tools) event)
(with-slots (ui-hidden-p ui) this
(awt:handle-ui-event ui event)
(case (aw:event-type event)
(:keyboard-button-down
(when (eq :grave (aw:event-key-scan-code event))
(setf ui-hidden-p (not ui-hidden-p))))
(:simple-gesture
(when (= (aw:event-simple-gesture-finger-count event) 4)
(setf ui-hidden-p nil))))))
(defmethod notalone-thriced::update-tools (tools time-delta)
(with-slots (last-time-delta ui) tools
(setf last-time-delta time-delta)
(awt:update-ui-input ui)))
(defmethod notalone-thriced::render-tools (tools)
(with-slots (last-time-delta windows ui ui-hidden-p) tools
(awt:ui (ui notalone-thriced::*width* notalone-thriced::*height*
last-time-delta
:framebuffer-width notalone-thriced::*framebuffer-width*
:framebuffer-height notalone-thriced::*framebuffer-height*)
(unless ui-hidden-p
(loop for window in windows
do (funcall window))))
(setf last-time-delta 0)))
(defmacro define-tool-window ((id title &key on-close width height) &body body)
(a:with-gensyms (result)
`(defun ,id ()
(awt:with-panel (,title
:on-close (lambda (,result)
(declare (ignore ,result))
,@(when on-close
`((funcall ,on-close)))
(close-tool-window ',id))
,@(when width `(:width ,width))
,@(when height `(:height ,height)))
,@body))))
| 3,120 | Common Lisp | .lisp | 71 | 35.056338 | 83 | 0.615079 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 6b2cc00f633d3ca3b651c31813714870285ed52a90a67f8089fbb7b08d429eab | 16,410 | [
-1
] |
16,411 | bundle.lisp | borodust_notalone-thriced/bundle/bundle.lisp | (alien-works-delivery:defbundle :notalone-thriced
:system :notalone-thriced/game
:entry-point (:alien-works :run)
:assets ((:file (:system "assets/assets.bin"))
(:file (:system "assets/gamecontrollerdb.txt"))
(:file (:system "assets/sector_017.ttf"))
(:file (:system "assets/sector_034.otf"))))
(alien-works-delivery:defbundle :notalone-thriced/dev
:system :notalone-thriced
:entry-point (:alien-works :run)
:assets ((:file (:system "assets/assets.bin"))
(:file (:system "assets/gamecontrollerdb.txt"))
(:file (:system "assets/sector_017.ttf"))
(:file (:system "assets/sector_034.otf"))))
| 669 | Common Lisp | .lisp | 14 | 41.071429 | 58 | 0.647779 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 1b54f082a13bc1a58a2ce535a4b21b22c9664b823a973047a859ed1fd19c61b5 | 16,411 | [
-1
] |
16,412 | notalone-thriced.asd | borodust_notalone-thriced/notalone-thriced.asd | (asdf:defsystem :notalone-thriced
:description "Autumn 2021 Lisp Game Jam Entry"
:version "0.0.0"
:license "GPLv3"
:author "Pavel Korolev"
:mailto "[email protected]"
:depends-on (:notalone-thriced/game :notalone-thriced/tools))
(asdf:defsystem :notalone-thriced/game
:description "End-user portion of NOTALONE-THRICED"
:version "0.0.0"
:license "GPLv3"
:author "Pavel Korolev"
:mailto "[email protected]"
:depends-on (#:alien-works
#:dissect
#:float-features
#:cffi
#:cffi-c-ref
#:local-time)
:serial t
:pathname "game/"
:components ((:file "packages")
(:file "utils")
(:module "framework"
:components ((:file "tools")
(:file "state")
(:file "resource")
(:file "cloud")
(:file "banner")
(:file "floor")
(:file "main")))
(:module "implementation"
:components ((:file "state")
(:file "record")
(:file "game")
(:file "play")
(:file "end")))))
(asdf:defsystem :notalone-thriced/tools
:description "Tools for NOTALONE-THRICED"
:version "0.0.0"
:license "MIT"
:author "Pavel Korolev"
:mailto "[email protected]"
:depends-on (#:notalone-thriced/game
#:alien-works/tools
#:slynk
#:slynk/mrepl
#:slynk/arglists
#:slynk/fancy-inspector
#:slynk/package-fu
#:slynk/trace-dialog
#:slynk/stickers
#:slynk/indentation)
:serial t
:pathname "tools/"
:components ((:file "packages")
(:module "assets"
:components ((:file "converter")
(:file "resources")))
(:module "eden"
:components ((:file "eden")
(:file "ui")))))
(asdf:defsystem :notalone-thriced/bundle
:description "Bundle for NOTALONE-THRICED"
:version "0.0.0"
:license "MIT"
:author "Pavel Korolev"
:mailto "[email protected]"
:depends-on (#:alien-works-delivery)
:serial t
:pathname "bundle/"
:components ((:file "bundle")))
| 2,433 | Common Lisp | .asd | 72 | 22.097222 | 63 | 0.498301 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 19169c2b0de29f4c00d4cbded6d96408fcde4b5bf30633b196cbdfe96b8167d1 | 16,412 | [
-1
] |
16,433 | gamecontrollerdb.txt | borodust_notalone-thriced/assets/gamecontrollerdb.txt | # Game Controller DB for SDL in 2.0.16 format
# Source: https://github.com/gabomdq/SDL_GameControllerDB
# Windows
03000000fa2d00000100000000000000,3DRUDDER,leftx:a0,lefty:a1,rightx:a5,righty:a2,platform:Windows,
03000000d0160000600a000000000000,4Play,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000d0160000040d000000000000,4Play,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000d0160000050d000000000000,4Play,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000d0160000060d000000000000,4Play,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000d0160000070d000000000000,4Play,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000c82d00000951000000000000,8BitDo Dogbone Modkit,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Windows,
03000000c82d000011ab000000000000,8BitDo F30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00001038000000000000,8BitDo F30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000090000000000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000650000000000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:a4,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00005106000000000000,8BitDo M30 Gamepad,a:b1,b:b0,back:b10,guide:b2,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000151000000000000,8BitDo M30 ModKit,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000310000000000000,8BitDo N30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00002028000000000000,8BitDo N30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00008010000000000000,8BitDo N30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d0000e002000000000000,8BitDo N30,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b6,platform:Windows,
03000000c82d00000451000000000000,8BitDo N30 Modkit,a:b1,b:b0,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,start:b11,platform:Windows,
03000000c82d00000190000000000000,8BitDo N30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00001590000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00006528000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d000012ab000000000000,8BitDo NES30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00002038000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000022000000090000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000203800000900000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000751000000000000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000360000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00002867000000000000,8BitDo S30 Modkit,a:b0,b:b1,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b8,lefttrigger:b9,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000130000000000000,8BitDo SF30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000060000000000000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000061000000000000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d000021ab000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000102800000900000000000000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00003028000000000000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000030000000000000,8BitDo SN30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00001290000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d000020ab000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00004028000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00006228000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000351000000000000,8BitDo SN30 Modkit,a:b1,b:b0,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000021000000000000,8BitDo SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000121000000000000,8BitDo SN30 Pro for Android,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000260000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000261000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000031000000000000,8BitDo Wireless Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00001890000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00003032000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000a00500003232000000000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000d81d00000e00000000000000,AC02,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,rightx:a2,righty:a5,start:b8,x:b4,y:b5,platform:Windows,
030000008f0e00001200000000000000,Acme GA-02,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
03000000c01100000355000000000000,Acrux,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000c01100000355000011010000,ACRUX USB GAME PAD,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000fa190000f0ff000000000000,Acteck AGJ-3200,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000006d0400000bc2000000000000,Action Pad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b8,lefttrigger:a5~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b5,righttrigger:a2~,start:b8,x:b3,y:b4,platform:Windows,
03000000d1180000402c000000000000,ADT1,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a3,rightx:a2,righty:a5,x:b3,y:b4,platform:Windows,
030000006f0e00001413000000000000,Afterglow,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00001301000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e00003901000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e00001302000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ab1200000103000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e00001304000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b000000f9000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000341a00003608000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00000263000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00001101000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00001401000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00001402000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00001901000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00001a01000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000120c00000288000000000000,AirFlo,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000d62000001d57000000000000,Airflo PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000491900001904000000000000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows,
03000000710100001904000000000000,Amazon Luna Controller,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b8,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b4,rightstick:b7,rightx:a3,righty:a4,start:b6,x:b3,y:b2,platform:Windows,
03000000830500000160000000000000,Arcade,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b3,x:b4,y:b4,platform:Windows,
03000000120c0000100e000000000000,Armor 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000869800002500000000000000,Astro C40 TR PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000a30c00002700000000000000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,
03000000a30c00002800000000000000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,
03000000ef0500000300000000000000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows,
03000000fd0500000230000000000000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows,
03000000d6200000e557000000000000,Batarang,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000e4150000103f000000000000,Batarang,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000c01100001352000000000000,Battalife Joystick,a:b6,b:b7,back:b2,leftshoulder:b0,leftx:a0,lefty:a1,rightshoulder:b1,start:b3,x:b4,y:b5,platform:Windows,
030000006f0e00003201000000000000,Battlefield 4 PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000ad1b000001f9000000000000,BB 070,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000d62000002a79000000000000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0500000208000000000000,Belkin Nostromo N40,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
03000000bc2000006012000000000000,Betop 2126F,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000bc2000000055000000000000,Betop BFM Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000bc2000006312000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000bc2000006321000000000000,BETOP CONTROLLER,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000bc2000006412000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000c01100000555000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000c01100000655000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000790000000700000000000000,Betop Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
03000000808300000300000000000000,Betop Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
030000006f0e00006401000000000000,BF One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows,
03000000300f00000202000000000000,Bigben,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a5,righty:a2,start:b7,x:b2,y:b3,platform:Windows,
030000006b1400000209000000000000,Bigben,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006b1400000055000000000000,Bigben PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000006b1400000103000000000000,Bigben PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,
03000000380700008232000000000000,Brawlpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000210e000000000000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000200e000000000000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
0300000066f700000500000000000000,BrutalLegendTest,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
03000000d81d00000b00000000000000,BUFFALO BSGP1601 Series ,a:b5,b:b3,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b4,y:b2,platform:Windows,
030000006d04000042c2000000000000,ChillStream,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000e82000006058000000000000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000457500000401000000000000,Cobra,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000b0400003365000000000000,Comp Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows,
030000005e0400008e02000000000000,Controller (XBOX 360 For Windows),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000a102000000000000,Controller (Xbox 360 Wireless Receiver for Windows),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000ff02000000000000,Controller (Xbox One For Windows) - Wired,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000ea02000000000000,Controller (Xbox One For Windows) - Wireless,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000004c050000c505000000000000,CronusMax Adapter,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000d8140000cefa000000000000,Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000d814000007cd000000000000,Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000380700006352000000000000,CTRLR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000260900008888000000000000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a4,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Windows,
030000003807000002cb000000000000,Cyborg,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000a306000022f6000000000000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000f806000000a3000000000000,DA Leader,a:b7,b:b6,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b0,leftstick:b8,lefttrigger:b1,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:b3,rightx:a2,righty:a3,start:b12,x:b4,y:b5,platform:Windows,
030000001a1c00000001000000000000,Datel,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000451300000830000000000000,Defender Game Racer X7,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000007d0400000840000000000000,Destroyer Tiltpad,+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,x:b0,y:b3,platform:Windows,
03000000c0160000e105000000000000,Dual,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000791d00000103000000000000,Dual Box WII,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000007c1800000006000000000000,Dual Compat,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
030000004f040000070f000000000000,Dual Power,a:b8,b:b9,back:b4,dpdown:b1,dpleft:b2,dpright:b3,dpup:b0,leftshoulder:b13,leftstick:b6,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b12,rightstick:b7,righttrigger:b15,start:b5,x:b10,y:b11,platform:Windows,
030000004f04000012b3000000000000,Dual Power 3,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
030000004f04000020b3000000000000,Dual Trigger,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
03000000bd12000002e0000000000000,Dual USB Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows,
03000000ff1100003133000000000000,DualForce,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b1,platform:Windows,
030000008f0e00000910000000000000,DualShock 2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows,
03000000317300000100000000000000,DualShock 3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
030000006f0e00003001000000000000,EA SPORTS PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000fc0400000250000000000000,Easy Grip,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
030000006e0500000a20000000000000,Elecom DUX60 MMO Gamepad,a:b2,b:b3,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b14,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b15,righttrigger:b13,rightx:a3,righty:a4,start:b20,x:b0,y:b1,platform:Windows,
03000000b80500000410000000000000,Elecom Gamepad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows,
03000000b80500000610000000000000,Elecom Gamepad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows,
030000006e0500000520000000000000,Elecom P301U,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,
03000000411200004450000000000000,Elecom U1012,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,
030000006e0500000320000000000000,Elecom U3613M (DInput),a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,
030000006e0500000e20000000000000,Elecom U3912T,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,
030000006e0500000f20000000000000,Elecom U4013S,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,
030000006e0500001320000000000000,Elecom U4113,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006e0500001020000000000000,Elecom U4113S,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows,
030000006e0500000720000000000000,Elecom W01U,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows,
03000000120c0000f61c000000000000,Elite,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000242f000000b7000000000000,ESM 9110,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Windows,
03000000101c0000181c000000000000,Essential,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b4,leftx:a1,lefty:a0,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
030000008f0e00000f31000000000000,EXEQ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,
03000000341a00000108000000000000,EXEQ RF USB Gamepad 8206,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000801000000900000000000000,F30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000008000000210000000000000,F30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00001028000000000000,F30,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,
030000003512000011ab000000000000,F30,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000790000003018000000000000,F300,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000242f00003900000000000000,F300 Elite,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000006d0400001dc2000000000000,F310,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006d0400001ec2000000000000,F510,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006d0400001fc2000000000000,F710,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e00008401000000000000,Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00008001000000000000,Faceoff Wired Pro Controller for Nintendo Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000021000000090000000000000,FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
0300000011040000c600000000000000,FC801,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,
030000004f04000008d0000000000000,Ferrari 150,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000852100000201000000000000,FF-GP1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00008500000000000000,Fighting Commander 2016 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00008400000000000000,Fighting Commander 5,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00008700000000000000,Fighting Stick mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00008800000000000000,Fighting Stick mini 4,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows,
030000000d0f00002700000000000000,FIGHTING STICK V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000ad1b000028f0000000000000,Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b00002ef0000000000000,Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000380700002847000000000000,FightPad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b000038f0000000000000,Fightpad TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
03000000380700008031000000000000,FightStick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008731000000000000,FightStick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700001847000000000000,FightStick,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
030000003807000038b7000000000000,FightStick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
78696e70757403000000000000000000,Fightstick TES,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Windows,
03000000f806000001a3000000000000,Firestorm,a:b9,b:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b0,leftstick:b10,lefttrigger:b1,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,start:b12,x:b8,y:b4,platform:Windows,
03000000b50700000399000000000000,Firestorm 2,a:b2,b:b4,back:b10,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,righttrigger:b9,start:b11,x:b3,y:b5,platform:Windows,
03000000b50700001302000000000000,Firestorm D3,a:b0,b:b2,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,x:b1,y:b3,platform:Windows,
03000000b40400001024000000000000,Flydigi Apex,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000151900004000000000000000,Flydigi Vader 2,a:b11,b:b10,back:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,leftstick:b1,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b0,righttrigger:b4,rightx:a3,righty:a4,start:b2,x:b9,y:b8,platform:Windows,
03000000b40400001124000000000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b4,paddle2:b5,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b2,y:b3,platform:Windows,
030000008305000000a0000000000000,G08XU,a:b0,b:b1,back:b4,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b5,x:b2,y:b3,platform:Windows,
03000000ac0500002d02000000000000,G2U,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000790000002201000000000000,Game Controller for PC,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
0300000066f700000100000000000000,Game VIB Joystick,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows,
03000000430b00000500000000000000,GameCube,a:b0,b:b2,dpdown:b10,dpleft:b8,dpright:b9,dpup:b11,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a3,rightx:a5,righty:a2,start:b7,x:b1,y:b3,platform:Windows,
03000000341a000005f7000000000000,GameCube,a:b2,b:b3,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b1,y:b0,platform:Windows,
03000000790000004718000000000000,GameCube,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
03000000260900002625000000000000,Gamecube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,lefttrigger:a4,leftx:a0,lefty:a1,righttrigger:a5,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Windows,
03000000790000004618000000000000,GameCube Controller Adapter,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
030000008f0e00000d31000000000000,GAMEPAD 3 TURBO,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000280400000140000000000000,GamePad Pro USB,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000ac0500003d03000000000000,GameSir,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000ac0500004d04000000000000,GameSir,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
030000004c0e00001035000000000000,Gamester,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
030000000d0f00001110000000000000,GameStick Bluetooth Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
0300000047530000616d000000000000,GameStop,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000ffff00000000000000000000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000c01100000140000000000000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000b62500000100000000000000,Gametel GT-004-01,a:b3,b:b0,dpdown:b10,dpleft:b9,dpright:b8,dpup:b11,leftshoulder:b4,rightshoulder:b5,start:b7,x:b1,y:b2,platform:Windows,
030000008f0e00001411000000000000,Gamo2 Divaller PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000a857000000000000,Gator Claw,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000c9110000f055000000000000,GC100XF,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000008305000009a0000000000000,Genius,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000008305000031b0000000000000,Genius Maxfire Blaze 3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000451300000010000000000000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000005c1a00003330000000000000,Genius MaxFire Grandias 12V,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
03000000300f00000b01000000000000,GGE909 Recoil Pad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000f0250000c283000000000000,Gioteck,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000f025000021c1000000000000,Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000f0250000c383000000000000,Gioteck VX2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000f0250000c483000000000000,Gioteck VX2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000004f04000026b3000000000000,GP XID,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
0300000079000000d418000000000000,GPD Win,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000c6240000025b000000000000,GPX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000007d0400000540000000000000,Gravis Eliminator GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000007d0400000340000000000000,Gravis G44011 Xterminator,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a2,start:b9,x:b3,y:b4,platform:Windows,
030000008f0e00000610000000000000,GreenAsia,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a5,righty:a2,start:b11,x:b3,y:b0,platform:Windows,
03000000ac0500006b05000000000000,GT2a,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000341a00000302000000000000,Hama Scorpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000fd0500003902000000000000,Hammerhead,a:b3,b:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b2,lefttrigger:b8,rightshoulder:b7,rightstick:b5,righttrigger:b9,start:b10,x:b0,y:b1,platform:Windows,
03000000fd0500002a26000000000000,Hammerhead FX,a:b3,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows,
03000000fd0500002f26000000000000,Hammerhead FX,a:b4,b:b5,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b1,y:b2,platform:Windows,
030000000d0f00004900000000000000,Hatsune Miku Sho Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000001008000001e1000000000000,Havit HV-G60,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b0,platform:Windows,
030000000d0f00000c00000000000000,HEXT,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f00000d00000000000000,HFS EX2,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
030000000d0f00003701000000000000,HFS Mini,a:b1,b:b0,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Windows,
030000000d0f00002100000000000000,HFS V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00001000000000000000,HFS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000f0d00000010000000000000,HFS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000d81400000862000000000000,HitBox Edition Cthulhu+,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,
03000000632500002605000000000000,HJD-X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
030000000d0f00000a00000000000000,Hori DOA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f00008600000000000000,Hori Fighting Commander,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f0000ba00000000000000,Hori Fighting Commander,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f00002d00000000000000,Hori Fighting Commander 3 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00005f00000000000000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00005e00000000000000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00005100000000000000,Hori Fighting Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00003200000000000000,Hori Fighting Stick 3W,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f0000c000000000000000,Hori Fighting Stick 4,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f00004000000000000000,Hori Fighting Stick Mini 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f0000a000000000000000,Hori Grip TAC4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b13,x:b0,y:b3,platform:Windows,
030000000d0f00000101000000000000,Hori Mini Hatsune Miku FT,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00005400000000000000,Hori Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00000900000000000000,Hori Pad 3 Turbo,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00004d00000000000000,Hori Pad A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00003801000000000000,Hori PC Engine Mini Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,platform:Windows,
030000000d0f00009200000000000000,Hori Pokken Tournament DX Pro Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00009c00000000000000,Hori TAC Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f0000c900000000000000,Hori Taiko Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00002301000000000000,Hori Wired PS4 Controller Light,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
030000000d0f0000c100000000000000,Horipad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00006400000000000000,Horipad 3TP,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00001300000000000000,Horipad 3W,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00006e00000000000000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00006600000000000000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00005500000000000000,Horipad 4 FPS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00004200000000000000,Horipad A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000005b1c00002400000000000000,Horipad Mini,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows,
030000000d0f0000ee00000000000000,HORIPAD mini4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00006700000000000000,Horipad One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f0000dc00000000000000,Horipad Switch,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b000001f5000000000000,HoripadEXT2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f00002600000000000000,HRAP 3P,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00004b00000000000000,HRAP 3W,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00003d00000000000000,HRAP N3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b10,leftstick:b4,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b6,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f0000ae00000000000000,HRAP N4,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f0000d800000000000000,HRAP S,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Windows,
030000000d0f0000aa00000000000000,HRAP S,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f0000af00000000000000,HRAP VHS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00001b00000000000000,HRAP VX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b000002f5000000000000,HRAP VX,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b07,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b08,righttrigger:b11,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Windows,
03000000250900000017000000000000,HRAP2 on PS/SS/N64 Joypad to USB BOX,a:b2,b:b1,back:b9,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b8,x:b3,y:b0,platform:Windows,
030000000d0f00008c00000000000000,HRAP4,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f00006f00000000000000,HRAP4 VLX,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000008f0e00001330000000000000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,platform:Windows,
03000000d81d00000f00000000000000,iBUFFALO BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000d81d00001000000000000000,iBUFFALO BSGP1204P Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000005c0a00000285000000000000,iDroidCon,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b6,platform:Windows,
03000000696400006964000000000000,iDroidCon Bluetooth Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000b50700001403000000000000,Impact Black,a:b2,b:b3,back:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
030000006f0e00002401000000000000,INJUSTICE FightStick PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000830500005130000000000000,InterAct ActionPad,a:b0,b:b1,back:b8,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
03000000fd0500005302000000000000,InterAct ProPad,a:b3,b:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,x:b0,y:b1,platform:Windows,
03000000ac0500002c02000000000000,IPEGA,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000491900000204000000000000,Ipega PG-9023,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000491900000304000000000000,Ipega PG-9087 - Bluetooth Gamepad,+righty:+a5,-righty:-a4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,start:b11,x:b3,y:b4,platform:Windows,
030000007e0500000620000000000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Windows,
030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Windows,
030000007e0500000720000000000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,
030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,
03000000bd12000003c0000010010000,Joypad Alpha Shock,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000ff1100004033000000000000,JPD FFB,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a2,start:b15,x:b3,y:b0,platform:Windows,
03000000242f00002d00000000000000,JYS Wireless Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000242f00008a00000000000000,JYS Wireless Adapter,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,
03000000c4100000c082000000000000,KADE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000828200000180000000000000,Keio,a:b4,b:b5,back:b8,leftshoulder:b2,lefttrigger:b3,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b9,x:b0,y:b1,platform:Windows,
03000000790000000200000000000000,King PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
03000000bd12000001e0000000000000,Leadership,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
030000008f0e00001300000000000000,Logic3,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000006f0e00000103000000000000,Logic3,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e00000104000000000000,Logic3,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006d040000d1ca000000000000,Logitech ChillStream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006d040000d2ca000000000000,Logitech Cordless Precision,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006d04000011c2000000000000,Logitech Cordless Wingman,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b5,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b2,righttrigger:b7,rightx:a3,righty:a4,x:b4,platform:Windows,
030000006d04000016c2000000000000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006d04000018c2000000000000,Logitech F510 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006d04000019c2000000000000,Logitech F710 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006d0400001ac2000000000000,Logitech Precision Gamepad,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000006d04000009c2000000000000,Logitech WingMan,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows,
030000006d0400000ac2000000000000,Logitech WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Windows,
03000000380700005645000000000000,Lynx,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000222200006000000000000000,Macally,a:b1,b:b2,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b33,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700006652000000000000,Mad Catz C.T.R.L.R,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000380700005032000000000000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700005082000000000000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008433000000000000,Mad Catz FightStick TE S+ (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008483000000000000,Mad Catz FightStick TE S+ (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008134000000000000,Mad Catz FightStick TE2+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b4,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008184000000000000,Mad Catz FightStick TE2+ PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,leftstick:b10,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000380700006252000000000000,Mad Catz Micro C.T.R.L.R,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008034000000000000,Mad Catz TE2 PS3 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008084000000000000,Mad Catz TE2 PS4 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000380700008532000000000000,Madcatz Arcade Fightstick TE S PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700003888000000000000,Madcatz Arcade Fightstick TE S+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000380700001888000000000000,MadCatz SFIV FightStick PS3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b6,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000380700008081000000000000,MADCATZ SFV Arcade FightStick Alpha PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000002a0600001024000000000000,Matricom,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows,
030000009f000000adbb000000000000,MaxJoypad Virtual Controller,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000250900000128000000000000,Mayflash Arcade Stick,a:b1,b:b2,back:b8,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b5,y:b6,platform:Windows,
03000000790000004418000000000000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
03000000790000004318000000000000,Mayflash GameCube Controller Adapter,a:b1,b:b2,back:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b0,leftshoulder:b4,leftstick:b0,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b0,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
03000000242f00007300000000000000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,
0300000079000000d218000000000000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000d620000010a7000000000000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000008f0e00001030000000000000,Mayflash USB Adapter for original Sega Saturn controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,rightshoulder:b2,righttrigger:b7,start:b9,x:b3,y:b4,platform:Windows,
0300000025090000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,
03000000790000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000790000002418000000000000,Mega Drive,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,rightshoulder:b2,start:b9,x:b3,y:b4,platform:Windows,
0300000079000000ae18000000000000,Mega Drive,a:b0,b:b1,back:b7,dpdown:b14,dpleft:b15,dpright:b13,dpup:b2,rightshoulder:b6,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
03000000c0160000990a000000000000,Mega Drive,a:b0,b:b1,leftx:a0,lefty:a1,righttrigger:b2,start:b3,platform:Windows,
030000005e0400000300000000000000,Microsoft SideWinder,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows,
030000005e0400000700000000000000,Microsoft SideWinder,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
030000005e0400002700000000000000,Microsoft SideWinder,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b5,x:b2,y:b3,platform:Windows,
030000005e0400000e00000000000000,Microsoft SideWinder Freestyle Pro,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b8,x:b3,y:b4,platform:Windows,
03000000280d00000202000000000000,Miller Lite Cantroller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b5,x:b2,y:b3,platform:Windows,
030000005b1c00002500000000000000,Mini,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows,
03000000ad1b000023f0000000000000,MLG,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a6,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000ad1b00003ef0000000000000,MLG FightStick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
03000000380700006382000000000000,MLG GamePad PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000d6200000e589000000000000,Moga 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows,
03000000d62000007162000000000000,Moga Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows,
03000000d6200000ad0d000000000000,Moga Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000c62400002a89000000000000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c62400002b89000000000000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c62400001a89000000000000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c62400001b89000000000000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000efbe0000edfe000000000000,Monect Virtual Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
03000000250900006688000000000000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000f70600000100000000000000,N64,a:b1,b:b2,back:b3,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,lefttrigger:b0,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b8,x:b4,y:b5,platform:Windows,
030000006b140000010c000000000000,NACON GC-400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000006b1400001106000000000000,Nacon Revolution 3 PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000006b140000100d000000000000,Nacon Revolution Infinity PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006b140000080d000000000000,Nacon Revolution Unlimited Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000bd12000001c0000000000000,Nebular,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000eb0300000000000000000000,NeGcon USB Adapter,a:a2,b:b13,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,lefttrigger:a4,leftx:a1,righttrigger:b11,start:b3,x:a3,y:b12,platform:Windows,
0300000038070000efbe000000000000,NEO SE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000000f00000100000000000000,NES,a:b1,b:b0,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows,
03000000571d00002100000000000000,NES,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows,
03000000921200004346000000000000,NES,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows,
03000000921200004b46000000000000,NES 2-port Adapter,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Windows,
03000000790000004518000000000000,NEXILUX GAMECUBE Controller Adapter,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
030000001008000001e5000000000000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Windows,
03000000050b00000045000000000000,Nexus,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Windows,
03000000152000000182000000000000,NGDS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000000d0500000308000000000000,Nostromo N45,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Windows,
03000000d620000013a7000000000000,NSW wired controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000550900001472000000000000,NVIDIA Controller v01.04,a:b11,b:b10,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b5,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b4,righttrigger:a5,rightx:a3,righty:a6,start:b3,x:b9,y:b8,platform:Windows,
03000000550900001072000000000000,NVIDIA Shield,a:b9,b:b8,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b3,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b2,righttrigger:a4,rightx:a2,righty:a5,start:b0,x:b7,y:b6,platform:Windows,
030000005509000000b4000000000000,NVIDIA Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000004b120000014d000000000000,NYKO AIRFLO,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a3,leftstick:a0,lefttrigger:b6,rightshoulder:b5,rightstick:a2,righttrigger:b7,start:b9,x:b2,y:b3,platform:Windows,
03000000782300000a10000000000000,Onlive Wireless Controller,a:b15,b:b14,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b11,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b13,y:b12,platform:Windows,
030000000d0f00000401000000000000,Onyx,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000008916000001fd000000000000,Onza CE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a3,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000008916000000fd000000000000,Onza TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000d62000006d57000000000000,OPP PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006b14000001a1000000000000,Orange Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
03000000362800000100000000000000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b13,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows,
03000000120c0000f60e000000000000,P4 Wired Gamepad,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b7,rightshoulder:b4,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00008501000000000000,PDP Fightpad Pro,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b0,platform:Windows,
030000006f0e00000901000000000000,PDP Versus Fighting Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000004c050000da0c000000000000,PlayStation Classic Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,
03000000d9040000160f000000000000,Playstation Controller Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
030000004c0500003713000000000000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000d62000006dca000000000000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006d04000084ca000000000000,Precision,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000d62000009557000000000000,Pro Elite PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000c62400001a53000000000000,Pro Ex Mini,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000d62000009f31000000000000,Pro Ex mini PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000d6200000c757000000000000,Pro Ex mini PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000110e000000000000,Pro5,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000632500002306000000000000,PS Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows,
03000000e30500009605000000000000,PS to USB convert cable,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000100800000100000000000000,PS1 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
030000008f0e00007530000000000000,PS1 Controller,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b1,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000100800000300000000000000,PS2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000250900008888000000000000,PS2 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000666600006706000000000000,PS2 Controller,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Windows,
030000006b1400000303000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000009d0d00001330000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000250900000088000000000000,PS2 Controllera:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000250900006888000000000000,PS2 Controllera:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b6,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000ba2200000701000000000000,Technology Innovation PS2 Adapter,a:b0,b:b1,x:b3,y:b2,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,platform:Windows,
03000000430b00000300000000000000,EMS Production PS2 Adapter,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:b12,dpdown:b14,dpleft:b15,dpright:b13,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b4,righttrigger:b5,platform:Windows,
03000000250900000500000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,platform:Windows,
030000004c0500006802000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b10,lefttrigger:a3~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:a4~,rightx:a2,righty:a5,start:b8,x:b3,y:b0,platform:Windows,
03000000632500007505000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000888800000803000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b9,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,
030000008f0e00001431000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000120a00000100000000000000,PS3 Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
030000008f0e00000300000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows,
030000004f1f00000800000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000ba2200002010000000000000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b2,platform:Windows,
03000000120c00001cf1000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000888800000804000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,leftshoulder:b10,leftstick:b1,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Windows,
03000000120c00001307000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000250900000118000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000250900000218000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000120c0000f90e000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000003807000056a8000000000000,PS3 RF pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000100000008200000000000000,PS360+ v1.66,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:h0.4,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000004c050000a00b000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000004c050000cc09000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c00000807000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000a957000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000aa57000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120e0000120c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000160e0000120c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000001a1e0000120c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000f21c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000f31c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000f41c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000f51c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000f10e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000130e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000150e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000f70e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000180e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c00001e0e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000111e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000121e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000181e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000120c0000191e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000004c050000e60c000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000ff000000cb01000000000000,PSP,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,
03000000830500005020000000000000,PSX,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b2,y:b3,platform:Windows,
03000000300f00000111000000000000,Qanba 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00000211000000000000,Qanba 2P,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000300f00000011000000000000,QanBa Arcade JoyStick 1008,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b10,x:b0,y:b3,platform:Windows,
03000000300f00001611000000000000,QanBa Arcade JoyStick 4018,a:b1,b:b2,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows,
03000000222c00000020000000000000,QANBA DRONE ARCADE JOYSTICK,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00001210000000000000,QanBa Joystick Plus,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,
03000000341a00000104000000000000,QanBa Joystick Q4RAF,a:b5,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b1,y:b2,platform:Windows,
03000000300f00001211000000000000,Qanba JS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000222c00000223000000000000,Qanba Obsidian Arcade Joystick PS3 Mode,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000222c00000023000000000000,Qanba Obsidian Arcade Joystick PS4 Mode,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000008a2400006682000000000000,R1,a:b3,b:b1,back:b7,leftx:a0,lefty:a1,start:b6,x:b4,y:b0,platform:Windows,
03000000086700006626000000000000,RadioShack,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows,
030000009b2800002300000000000000,Raphnet Technologies 3DO USB Adapter,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b2,start:b3,platform:Windows,
030000009b2800006900000000000000,Raphnet Technologies 3DO USB Adapter,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b2,start:b3,platform:Windows,
030000009b2800000800000000000000,Raphnet Technologies Dreamcast USB Adapter,a:b2,b:b1,dpdown:b5,dpleft:b6,dpright:b7,dpup:b4,lefttrigger:a2,leftx:a0,righttrigger:a3,righty:a1,start:b3,x:b10,y:b9,platform:Windows,
030000009b2800003200000000000000,Raphnet Technologies GC/N64 to USB v3.4,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,
030000009b2800006000000000000000,Raphnet Technologies GC/N64 to USB v3.6,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,
030000009b2800001800000000000000,Raphnet Technologies Jaguar USB Adapter,a:b2,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b10,start:b3,x:b11,y:b12,platform:Windows,
030000009b2800000200000000000000,Raphnet Technologies NES USB Adapter,a:b7,b:b6,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b4,platform:Windows,
030000009b2800004300000000000000,Raphnet Technologies Saturn,a:b0,b:b1,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows,
030000009b2800000500000000000000,Raphnet Technologies Saturn Adapter 2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
030000009b2800000300000000000000,Raphnet Technologies SNES USB Adapter,a:b0,b:b4,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
030000009b2800005600000000000000,Raphnet Technologies SNES USB Adapter,a:b1,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Windows,
030000009b2800005700000000000000,Raphnet Technologies SNES USB Adapter,a:b1,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Windows,
030000009b2800001e00000000000000,Raphnet Technologies Vectrex USB Adapter,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a1,lefty:a2,x:b2,y:b3,platform:Windows,
030000009b2800002b00000000000000,Raphnet Technologies Wii Classic USB Adapter,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b3,x:b0,y:b5,platform:Windows,
030000009b2800002c00000000000000,Raphnet Technologies Wii Classic USB Adapter,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b3,x:b0,y:b5,platform:Windows,
03000000321500000003000000000000,Razer Hydra,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000321500000204000000000000,Razer Panthera (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000104000000000000,Razer Panthera (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000010000000000000,Razer Raiju,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000507000000000000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000321500000707000000000000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000321500000710000000000000,Razer Raiju TE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000a10000000000000,Razer Raiju TE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000410000000000000,Razer Raiju UE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000910000000000000,Razer Raiju UE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000011000000000000,Razer Raion Fightpad for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000321500000009000000000000,Razer Serval,+lefty:+a2,-lefty:-a1,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,leftx:a0,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000000d0f00001100000000000000,REAL ARCADE PRO.3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00006a00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00006b00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00008a00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00008b00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00007000000000000000,REAL ARCADE PRO.4 VLX,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00002200000000000000,REAL ARCADE Pro.V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00005b00000000000000,Real Arcade Pro.V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f00005c00000000000000,Real Arcade Pro.V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000830500006020000000000000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
03000000c82d00000290000000000000,Retrobit 64,a:b3,b:b9,back:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b0,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b10,start:b11,x:b4,y:b8,platform:Windows,
03000000c82d00003038000000000000,Retrobit 64,a:b3,b:b9,back:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b0,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b10,start:b11,x:b4,y:b8,platform:Windows,
03000000bd12000013d0000000000000,Retrolink USB SEGA Saturn Classic,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows,
03000000bd12000015d0000000000000,Retrolink USB Super SNES Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,
0300000000f000000300000000000000,RetroUSB.com RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,
0300000000f00000f100000000000000,RetroUSB.com Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,
03000000830500000960000000000000,Revenger,a:b0,b:b1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b3,x:b4,y:b5,platform:Windows,
030000006b140000010d000000000000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000006b140000020d000000000000,Revolution Pro Controller 2(1/2),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000006b140000130d000000000000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00004601000000000000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e00001f01000000000000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000c6240000fefa000000000000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e00001e01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00002801000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00002f01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000c6240000fefa000000010000,Rock Candy Xbox 360 Controller, a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Windows,
030000004f04000001d0000000000000,Rumble Force,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
030000004f04000009d0000000000000,Run N Drive,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000004f04000003d0000000000000,run'n'drive,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:a3,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:a4,rightstick:b11,righttrigger:b5,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000c6240000045d000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000008916000000fe000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000a30600001af5000000000000,Saitek Cyborg,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000a306000023f6000000000000,Saitek Cyborg V.1 Game pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00001201000000000000,Saitek Dual Analog Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
03000000a30600000701000000000000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Windows,
03000000a30600000cff000000000000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b0,y:b1,platform:Windows,
03000000a30600000d5f000000000000,Saitek P2600,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Windows,
03000000a30600000dff000000000000,Saitek P2600,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b8,x:b0,y:b3,platform:Windows,
03000000a30600000c04000000000000,Saitek P2900,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
03000000a306000018f5000000000000,Saitek P3200,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00001001000000000000,Saitek P480 Rumble Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
03000000a30600000901000000000000,Saitek P880,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b8,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b5,rightx:a3,righty:a2,x:b0,y:b1,platform:Windows,
03000000a30600000b04000000000000,Saitek P990,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
03000000a30600000b04000000010000,Saitek P990 Dual Analog Pad,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Windows,
03000000a30600002106000000000000,Saitek PS1000,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000a306000020f6000000000000,Saitek PS2700,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00001101000000000000,Saitek Rumble Pad,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
03000000e804000000a0000000000000,Samsung EIGP20,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c01100000252000000000000,Sanwa Easy Grip,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
03000000bd12000003c0000000000000,Sanwa JY-P70UR,a:b1,b:b0,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b11,righttrigger:b9,rightx:a3,righty:a2,start:b4,x:b3,y:b2,platform:Windows,
03000000c01100004350000000000000,Sanwa Micro Grip P3,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,x:b3,y:b2,platform:Windows,
03000000c01100004150000000000000,Sanwa Micro Grip Pro,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
03000000411200004550000000000000,Sanwa Micro Grip Pro,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a1,righty:a2,start:b9,x:b1,y:b3,platform:Windows,
03000000c01100004450000000000000,Sanwa Online Grip,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b11,righttrigger:b9,rightx:a3,righty:a2,start:b14,x:b3,y:b4,platform:Windows,
03000000730700000401000000000000,Sanwa PlayOnline Mobile,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows,
03000000830500006120000000000000,Sanwa Smart Grip II,a:b0,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,x:b1,y:b3,platform:Windows,
03000000c01100000051000000000000,Satechi Bluetooth Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000730700000601000000000000,Saturn,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
03000000b40400000a01000000000000,Saturn,a:b0,b:b1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows,
0300000000f000000800000000000000,Saturn,a:b1,b:b2,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b3,start:b0,x:b5,y:b6,platform:Windows,
0300000000050000289b000000000000,Saturn Adapter 2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
030000004f04000028b3000000000000,Score A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000952e00002577000000000000,Scuf PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000a30c00002500000000000000,Sega Genesis Mini 3B controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,righttrigger:b5,start:b9,platform:Windows,
03000000a30c00002400000000000000,Sega Mega Drive Mini 6B controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,
030000003b07000004a1000000000000,SFX,a:b0,b:b2,back:b7,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b5,start:b8,x:b1,y:b3,platform:Windows,
03000000120c00001c1e000000000000,SnakeByte GamePad 4S PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000571d00002000000000000000,SNES Controller,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,
030000008b2800000300000000000000,SNES Controller,a:b0,b:b4,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
03000000921200004653000000000000,SNES Controller,a:b0,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
0300000003040000c197000000000000,SNES Controller,a:b0,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
0300000081170000960a000000000000,SNES Controller,a:b4,b:b0,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b5,y:b1,platform:Windows,
03000000811700009d0a000000000000,SNES Controller,a:b0,b:b4,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
03000000341a00000208000000000000,Speedlink 6555,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:-a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a3,righty:a2,start:b7,x:b2,y:b3,platform:Windows,
03000000341a00000908000000000000,Speedlink 6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000008f0e00000800000000000000,SpeedLink Strike FX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000c01100000591000000000000,Speedlink Torid,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000d11800000094000000000000,Stadia Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b11,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows,
03000000de280000fc11000000000000,Steam,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000de280000ff11000000000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000120c0000160e000000000000,Steel Play Metaltech PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000110100001914000000000000,SteelSeries,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000381000001214000000000000,SteelSeries Free,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows,
03000000110100003114000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000381000001814000000000000,SteelSeries Stratus XL,a:b0,b:b1,back:b18,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b19,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b2,y:b3,platform:Windows,
03000000790000001c18000000000000,STK-7024X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000381000003014000000000000,Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000381000003114000000000000,Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000380700003847000000000000,Street Fighter Fighting Stick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,start:b7,x:b2,y:b3,platform:Windows,
030000001f08000001e4000000000000,Super Famicom Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,
03000000790000000418000000000000,Super Famicom Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b33,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,
03000000d620000011a7000000000000,Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000000d0f0000f600000000000000,Switch Hori Pad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000457500002211000000000000,SZMY-POWER PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000004f04000007d0000000000000,T Mini Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000004f0400000ab1000000000000,T.16000M,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b10,x:b2,y:b3,platform:Windows,
030000000d0f00007b00000000000000,TAC GEAR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000d814000001a0000000000000,TE Kitty,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000fa1900000706000000000000,Team 5,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000b50700001203000000000000,Techmobility X6-38V,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
03000000790000002601000000000000,TGZ,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows,
030000004f04000015b3000000000000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
030000004f04000023b3000000000000,Thrustmaster Dual Trigger 3-in-1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000004f0400000ed0000000000000,ThrustMaster eSwap PRO Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Windows,
030000004f04000004b3000000000000,Thrustmaster Firestorm Dual Power 3,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
030000006d04000088ca000000000000,Thunderpad,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000666600000488000000000000,TigerGame PS/PS2 Game Controller Adapter,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000d62000006000000000000000,Tournament PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000c01100000055000000000000,Tronsmart,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000005f140000c501000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000b80500000210000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
030000004f04000087b6000000000000,TWCS Throttle,dpdown:b8,dpleft:b9,dpright:b7,dpup:b6,leftstick:b5,lefttrigger:-a5,leftx:a0,lefty:a1,righttrigger:+a5,platform:Windows,
03000000411200000450000000000000,Twin Shock,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a4,start:b11,x:b3,y:b0,platform:Windows,
03000000d90400000200000000000000,TwinShock PS2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000101c0000171c000000000000,uRage Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000242f00006e00000000000000,USB Game Controller,a:b1,b:b4,back:b10,leftshoulder:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b7,rightx:a2,righty:a5,start:b11,x:b0,y:b3,platform:Windows,
03000000b50700001503000000000000,USB Game Controller,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
03000000b404000081c6000000000000,USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows,
03000000666600000188000000000000,USB Game Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000666600000288000000000000,USB Game Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
03000000300f00000701000000000000,USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000bd12000012d0000000000000,USB Game Controller,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,
030000000b0400003065000000000000,USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows,
03000000341a00002308000000000000,USB Game Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000006b1400000203000000000000,USB Game Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000790000000a00000000000000,USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
03000000f0250000c183000000000000,USB Game Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000ff1100004133000000000000,USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000632500002305000000000000,USB Vibration Joystick (BM),a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000790000001a18000000000000,Venom,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00000302000000000000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00000702000000000000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:a3,righty:a4,start:b4,x:b2,y:b3,platform:Windows,
03000000120c0000ab57000000000000,Warrior Joypad JS083,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000007e0500003003000000000000,WiiU Pro,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,leftshoulder:b6,leftstick:b11,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b12,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,
0300000032150000030a000000000000,Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
0300000032150000140a000000000000,Wolverine,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b000016f0000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e0400009102000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b00008e02000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000c62400000053000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000380700002644000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a2,righty:a5,start:b8,x:b2,y:b3,platform:Windows,
03000000380700002045000000000000,Xbox 360 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000005e0400001907000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000380700001647000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000380700002647000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000380700003647000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a7,righty:a5,start:b7,x:b2,y:b3,platform:Windows,
030000003807000026b7000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000c6240000fdfa000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b000000fd000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000ad1b000001fd000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000002e160000efbe000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,rightshoulder:b5,righttrigger:b11,start:b7,x:b2,y:b3,platform:Windows,
030000005e0400000a0b000000000000,Xbox Adaptive Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000002a0600002000000000000000,Xbox Controller,a:b0,b:b1,back:b13,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b5,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b15,righttrigger:b7,rightx:a2,righty:a5,start:b12,x:b2,y:b3,platform:Windows,
030000005e0400000202000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
030000005e0400008502000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e0400008702000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b7,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
030000005e0400008902000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b10,leftstick:b8,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b9,righttrigger:b4,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000380700001645000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000380700002645000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000380700003645000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000380700008645000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000120c00001088000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2~,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5~,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000300f00008888000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:b13,dpleft:b10,dpright:b11,dpup:b12,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
03000000120c00000a88000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a2,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
030000000d0f00006300000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000e002000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000d102000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e0000a802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000006f0e0000c802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000dd02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000fd02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000c62400003a54000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e0400000c0b000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
030000005e040000130b000000000000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000341a00000608000000000000,Xeox,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000450c00002043000000000000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000006f0e00000300000000000000,XGear,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000ac0500005b05000000000000,Xiaoji Gamesir-G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000172700004431000000000000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a7,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000786901006e70000000000000,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000790000004f18000000000000,ZD-T Android,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000120c0000101e000000000000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
# Mac OS X
030000008f0e00000300000009010000,2In1 USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000c82d00000090000001000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00001038000000010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000650000001000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00005106000000010000,8BitDo M30 Gamepad,a:b1,b:b0,back:b10,guide:b2,leftshoulder:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00001590000001000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00006528000000010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d000012ab000001000000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00002028000000010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
030000003512000012ab000001000000,8BitDo NES30 Gamepad,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000022000000090000001000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000190000001000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000102800000900000000000000,8Bitdo SFC30 GamePad Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00001290000001000000,8BitDo SN30 Gamepad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00004028000000010000,8Bitdo SN30 GamePad,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000160000001000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000260000001000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000031000001000000,8BitDo Wireless Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00001890000001000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a31,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000a00500003232000008010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000a00500003232000009010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000491900001904000001010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Mac OS X,
03000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Mac OS X,
03000000a30c00002700000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000a30c00002800000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
03000000ef0500000300000000020000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Mac OS X,
03000000c62400001a89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X,
03000000c62400001b89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000d62000002a79000000010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000120c0000200e000000010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000120c0000210e000000010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000008305000031b0000000000000,Cideko AK08b,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000260900008888000088020000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Mac OS X,
03000000a306000022f6000001030000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00008400000000010000,Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00008500000000010000,Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000151900004000000001000000,Flydigi Vader 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
03000000b40400001124000000000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b4,paddle2:b5,paddle3:b17,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b2,y:b3,platform:Mac OS X,
03000000790000004618000000010000,GameCube Controller Adapter,a:b4,b:b0,dpdown:b56,dpleft:b60,dpright:b52,dpup:b48,lefttrigger:a12,leftx:a0,lefty:a4,rightshoulder:b28,righttrigger:a16,rightx:a20,righty:a8,start:b36,x:b8,y:b12,platform:Mac OS X,
03000000ad1b000001f9000000000000,Gamestop BB-070 X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
03000000c01100000140000000010000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006f0e00000102000000000000,GameStop Xbox 360 Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000007d0400000540000001010000,Gravis Eliminator GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000280400000140000000020000,Gravis Gamepad Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
030000008f0e00000300000007010000,GreenAsia Inc. USB Joystick,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Mac OS X,
030000000d0f00002d00000000100000,Hori Fighting Commander 3 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00005f00000000010000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00005e00000000010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00005f00000000000000,HORI Fighting Commander 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00005e00000000000000,HORI Fighting Commander 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00004d00000000000000,HORI Gem Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00009200000000010000,Hori Pokken Tournament DX Pro Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00006e00000000010000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00006600000000010000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f00006600000000000000,HORIPAD FPS PLUS 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000000d0f0000ee00000000010000,HORIPAD mini4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000008f0e00001330000011010000,HuiJia SNES Controller,a:b4,b:b2,back:b16,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b12,rightshoulder:b14,start:b18,x:b6,y:b0,platform:Mac OS X,
03000000830500006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X,
030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Mac OS X,
030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Mac OS X,
03000000242f00002d00000007010000,JYS Wireless Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
030000006d04000016c2000000020000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006d04000016c2000000030000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006d04000016c2000014040000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006d04000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006d04000018c2000000000000,Logitech F510 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006d04000019c2000005030000,Logitech F710,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006d0400001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000006d04000018c2000000010000,Logitech RumblePad 2 USB,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3~,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006d04000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700005032000000010000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700005082000000010000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700008433000000010000,Mad Catz FightStick TE S+ (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700008483000000010000,Mad Catz FightStick TE S+ (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000790000000600000007010000,Marvo GT-004,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000790000004418000000010000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000242f00007300000000020000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Mac OS X,
0300000079000000d218000026010000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000d620000010a7000003010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
0300000025090000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Mac OS X,
03000000790000000018000000010000,Mayflash Wii U Pro Controller Adapter,a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X,
03000000790000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X,
03000000d8140000cecf000000000000,MC Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
030000005e0400002700000001010000,Microsoft SideWinder Plug & Play Game Pad,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b4,leftx:a0,lefty:a1,righttrigger:b5,x:b2,y:b3,platform:Mac OS X,
03000000d62000007162000001000000,Moga Pro 2 HID,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Mac OS X,
03000000c62400002a89000000010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c62400002b89000000010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000632500007505000000020000,NEOGEO mini PAD Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b2,y:b3,platform:Mac OS X,
03000000921200004b46000003020000,NES 2-port Adapter,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Mac OS X,
030000001008000001e5000006010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000d620000011a7000000020000,Nintendo Switch Core (Plus) Wired Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000d620000011a7000010050000,Nintendo Switch PowerA Wired Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
030000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
03000000550900001472000025050000,NVIDIA Controller v01.04,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Mac OS X,
030000006f0e00000901000002010000,PDP Versus Fighting Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
030000008f0e00000300000000000000,Piranha Xtreme PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Mac OS X,
030000004c050000da0c000000010000,Playstation Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
030000004c0500003713000000010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000d62000006dca000000010000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000100800000300000006010000,PS2 Adapter,a:b2,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
030000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X,
030000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X,
030000004c050000a00b000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000008916000000fd000000000000,Razer Onza TE,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000321500000204000000010000,Razer Panthera (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000321500000104000000010000,Razer Panthera (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000321500000010000000010000,Razer RAIJU,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000321500000507000001010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000321500000011000000010000,Razer Raion Fightpad for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000321500000009000000020000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X,
030000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X,
0300000032150000030a000000000000,Razer Wildcat,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000830500006020000000010000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Mac OS X,
03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000790000001100000005010000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b4,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
030000006b140000010d000000010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006b140000130d000000010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000c6240000fefa000000000000,Rock Candy Gamepad for PS3,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000730700000401000000010000,Sanwa PlayOnline Mobile,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Mac OS X,
03000000811700007e05000000000000,Sega Saturn,a:b2,b:b4,dpdown:b16,dpleft:b15,dpright:b14,dpup:b17,leftshoulder:b8,lefttrigger:a5,leftx:a0,lefty:a2,rightshoulder:b9,righttrigger:a4,start:b13,x:b0,y:b6,platform:Mac OS X,
03000000b40400000a01000000000000,Sega Saturn USB Gamepad,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Mac OS X,
030000003512000021ab000000000000,SFC30 Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
0300000000f00000f100000000000000,SNES RetroPort,a:b2,b:b3,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,rightshoulder:b7,start:b6,x:b0,y:b1,platform:Mac OS X,
030000004c050000e60c000000010000,Sony DualSense,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004c050000cc09000000000000,Sony DualShock 4 V2,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004c050000a00b000000000000,Sony DualShock 4 Wireless Adaptor,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000d11800000094000000010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X,
030000005e0400008e02000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000110100002014000000000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b12,x:b2,y:b3,platform:Mac OS X,
03000000110100002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X,
03000000381000002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X,
05000000484944204465766963650000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X,
05000000556e6b6e6f776e2048494400,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X,
050000004e696d6275732b0000000000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X,
03000000110100001714000000000000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,
03000000110100001714000020010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,
03000000457500002211000000010000,SZMY-POWER PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004f04000015b3000000000000,Thrustmaster Dual Analog 3.2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Mac OS X,
030000004f0400000ed0000000020000,ThrustMaster eSwap PRO Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Mac OS X,
03000000bd12000015d0000000000000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000bd12000015d0000000010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000100800000100000000000000,Twin USB Joystick,a:b4,b:b2,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b12,leftstick:b20,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b14,rightstick:b22,righttrigger:b10,rightx:a6,righty:a4,start:b18,x:b6,y:b0,platform:Mac OS X,
030000006f0e00000302000025040000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
030000006f0e00000702000003060000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000791d00000103000009010000,Wii Classic Controller,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,back:b7,dpdown:b3,dpleft:b0,dpright:b1,dpup:b2,guide:b8,leftshoulder:b11,lefttrigger:b12,leftx:a0,lefty:a1,start:b6,x:b10,y:b9,platform:Mac OS X,
050000005769696d6f74652028313800,Wii U Pro Controller,a:b16,b:b15,back:b7,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b8,leftshoulder:b19,leftstick:b23,lefttrigger:b21,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b24,righttrigger:b22,rightx:a2,righty:a3,start:b6,x:b18,y:b17,platform:Mac OS X,
030000005e0400008e02000000000000,X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000006f0e00000104000000000000,Xbox 360 Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000c6240000045d000000000000,Xbox 360 Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e0400000a0b000000000000,Xbox Adaptive Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e040000050b000003090000,Xbox Elite Wireless Controller Series 2,a:b0,b:b1,back:b31,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b53,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c62400003a54000000000000,Xbox One PowerA Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e040000d102000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e040000dd02000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e040000e302000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000130b000009050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000200b000011050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000e002000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,
030000005e040000e002000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,
030000005e040000ea02000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e040000fd02000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000120c0000100e000000010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000120c0000101e000000010000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
# Linux
03000000021000000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00001038000000010000,8Bitdo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00005106000000010000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Linux,
03000000c82d00001590000011010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00006528000000010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000008000000210000011010000,8BitDo NES30,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
03000000c82d00000310000011010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux,
05000000c82d00008010000000010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux,
03000000022000000090000011010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00002038000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000190000011010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00000060000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00000061000000010000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
030000003512000021ab000010010000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d000021ab000010010000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
030000003512000012ab000010010000,8Bitdo SFC30 GamePad,a:b2,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Linux,
05000000102800000900000000010000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00003028000000010000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000160000011010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00001290000011010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00006228000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000260000011010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000202800000900000000010000,8BitDo SNES30 Gamepad,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000031000011010000,8BitDo Wireless Adapter (DInput),a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000005e0400008e02000020010000,8BitDo Wireless Adapter (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
050000005e040000e002000030110000,8BitDo Zero 2 (XInput),a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
05000000a00500003232000001000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,
05000000a00500003232000008010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,
03000000c01100000355000011010000,ACRUX USB GAME PAD,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006f0e00001302000000010000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00003901000020060000,Afterglow Controller for Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00003901000000430000,Afterglow Prismatic Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00003901000013020000,Afterglow Prismatic Wired Controller 048-007-NA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000100000008200000011010000,Akishop Customs PS360+ v1.66,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
030000007c1800000006000010010000,Alienware Dual Compatible Game Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Linux,
05000000491900000204000021000000,Amazon Fire Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b17,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b12,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000491900001904000011010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Linux,
05000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
03000000790000003018000011010000,Arcade Fightstick F300,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
03000000a30c00002700000011010000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
03000000a30c00002800000011010000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
05000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux,
05000000050b00000045000040000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux,
03000000503200000110000000000000,Atari Classic Controller,a:b0,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,x:b1,platform:Linux,
05000000503200000110000000000000,Atari Classic Controller,a:b0,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,x:b1,platform:Linux,
03000000503200000210000000000000,Atari Game Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a2,righty:a3,start:b8,x:b2,y:b3,platform:Linux,
05000000503200000210000000000000,Atari Game Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux,
03000000120c00000500000010010000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux,
03000000ef0500000300000000010000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux,
03000000c62400001b89000011010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000d62000002a79000011010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000c21100000791000011010000,Be1 GC101 Controller 1.03 mode,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000c31100000791000011010000,Be1 GC101 GAMEPAD 1.03 mode,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000005e0400008e02000003030000,Be1 GC101 Xbox 360 Controller mode,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
05000000bc2000000055000001000000,BETOP AX1 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000006b1400000209000011010000,Bigben,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000666600006706000000010000,boom PSX to PC Converter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Linux,
03000000120c0000200e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000120c0000210e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000120c0000f70e000011010000,Brook Universal Fighting Board,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
03000000ffff0000ffff000000010000,Chinese-made Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
030000000b0400003365000000010000,Competition Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Linux,
03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Linux,
03000000a306000022f6000011010000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
030000004f04000004b3000010010000,Dual Power 2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,
030000006f0e00003001000001010000,EA Sports PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000c11100000191000011010000,EasySMX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
030000006e0500000320000010010000,Elecom U3613M,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Linux,
03000000b40400001124000011010000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000151900004000000001000000,Flydigi Vader 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
03000000341a000005f7000010010000,GameCube {HuiJia USB box},a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux,
03000000bc2000000055000011010000,GameSir G3w,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000ac0500002d0200001b010000,Gamesir-G4s,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b33,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000006f0e00000104000000010000,Gamestop Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000008f0e00000800000010010000,Gasia Co. Ltd PS(R) Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
030000006f0e00001304000000010000,Generic X-Box pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000451300000010000010010000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
0300000079000000d418000000010000,GPD Win 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000007d0400000540000000010000,Gravis Eliminator GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
03000000280400000140000000010000,Gravis GamePad Pro USB ,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
030000008f0e00000610000000010000,GreenAsia Electronics 4Axes 12Keys GamePad ,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Linux,
030000008f0e00001200000010010000,GreenAsia Inc. USB Joystick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
0500000047532067616d657061640000,GS gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
03000000f0250000c383000010010000,GT VX2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
06000000adde0000efbe000002010000,Hidromancer Game Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000d81400000862000011010000,HitBox (PS3/PC) Analog Mode,a:b1,b:b2,back:b8,guide:b9,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b12,x:b0,y:b3,platform:Linux,
03000000c9110000f055000011010000,HJC Game GAMEPAD,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
03000000300f00001210000010010000,HJC QanBa Joystick Plus,a:b0,b:b1,back:b8,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b6,start:b9,x:b2,y:b3,platform:Linux,
03000000632500002605000010010000,HJD-X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000000d0f00000d00000000010000,Hori,a:b0,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,rightshoulder:b7,start:b9,x:b1,y:b2,platform:Linux,
030000000d0f00001000000011010000,HORI CO. LTD. FIGHTING STICK 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f0000c100000011010000,HORI CO. LTD. HORIPAD S,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00006a00000011010000,HORI CO. LTD. Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00006b00000011010000,HORI CO. LTD. Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00002200000011010000,HORI CO. LTD. REAL ARCADE Pro.V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00008500000010010000,HORI Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00008600000002010000,Hori Fighting Commander,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000000d0f00005f00000011010000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00005e00000011010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000000d0f00003801000011010000,Hori PC Engine Mini Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,platform:Linux,
030000000d0f00009200000011010000,Hori Pokken Tournament DX Pro Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f0000aa00000011010000,HORI Real Arcade Pro,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
030000000d0f0000d800000072056800,HORI Real Arcade Pro S,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
030000000d0f00001600000000010000,Hori Real Arcade Pro.EX-SE (Xbox 360),a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux,
030000000d0f00006e00000011010000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00006600000011010000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f0000ee00000011010000,HORIPAD mini4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000000d0f00006700000001010000,HORIPAD ONE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000008f0e00001330000010010000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,platform:Linux,
03000000242e00008816000001010000,Hyperkin X91,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000006964726f69643a636f6e0000,idroid:con,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000b50700001503000010010000,impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,
03000000d80400008200000003000000,IMS PCU0 Gamepad Interface,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b5,x:b3,y:b2,platform:Linux,
03000000fd0500000030000000010000,InterAct GoPad I-73000 (Fighting Game Layout),a:b3,b:b4,back:b6,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b7,x:b0,y:b1,platform:Linux,
0500000049190000020400001b010000,Ipega PG-9069 Bluetooth Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b161,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000632500007505000011010000,Ipega PG-9099 Bluetooth Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000300f00001001000010010000,Jess Tech Dual Analog Rumble Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,
03000000300f00000b01000010010000,Jess Tech GGE909 PC Recoil Pad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
03000000ba2200002010000001010000,Jess Technology USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Linux,
050000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Linux,
030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux,
050000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux,
03000000bd12000003c0000010010000,Joypad Alpha Shock,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000242f00002d00000011010000,JYS Wireless Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000242f00008a00000011010000,JYS Wireless Adapter,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux,
030000006f0e00000103000000020000,Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006d040000d1ca000000000000,Logitech ChillStream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006d04000016c2000010010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006d04000016c2000011010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006d0400001ec2000019200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006d0400000ac2000010010000,Logitech Inc. WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Linux,
030000006d04000018c2000010010000,Logitech RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006d04000011c2000010010000,Logitech WingMan Cordless RumblePad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b10,rightx:a3,righty:a4,start:b8,x:b3,y:b4,platform:Linux,
050000004d4f435554452d3035305800,M54-PC,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000380700006652000025010000,Mad Catz C.T.R.L.R ,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000380700005032000011010000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000380700005082000011010000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000ad1b00002ef0000090040000,Mad Catz Fightpad SFxT,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux,
03000000380700008034000011010000,Mad Catz fightstick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000380700008084000011010000,Mad Catz fightstick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000380700008433000011010000,Mad Catz FightStick TE S+ (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000380700008483000011010000,Mad Catz FightStick TE S+ (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000380700001647000010040000,Mad Catz Wired Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000380700003847000090040000,Mad Catz Wired Xbox 360 Controller (SFIV),a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
03000000ad1b000016f0000090040000,Mad Catz Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000380700001888000010010000,MadCatz PC USB Wired Stick 8818,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000380700003888000010010000,MadCatz PC USB Wired Stick 8838,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:a0,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000242f0000f700000001010000,Magic-S Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000120c00000500000000010000,Manta Dualshock 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
03000000790000004418000010010000,Mayflash GameCube Controller,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
03000000790000004318000010010000,Mayflash GameCube Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux,
03000000242f00007300000011010000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux,
0300000079000000d218000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000d620000010a7000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
0300000025090000e803000001010000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:a5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,
03000000780000000600000010010000,Microntek USB Joystick,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
030000005e0400000e00000000010000,Microsoft SideWinder,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Linux,
030000005e0400000700000000010000,Microsoft SideWinder Game Pad USB,a:b0,b:b1,back:b8,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Linux,
030000005e0400008e02000004010000,Microsoft X-Box 360 pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000062230000,Microsoft X-Box 360 pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000050b000003090000,Microsoft X-Box One Elite 2 pad,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000005e040000e302000003020000,Microsoft X-Box One Elite pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000d102000001010000,Microsoft X-Box One pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000dd02000003020000,Microsoft X-Box One pad (Firmware 2015),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000d102000003020000,Microsoft X-Box One pad v2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008502000000010000,Microsoft X-Box pad (Japan),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
030000005e0400008902000021010000,Microsoft X-Box pad v2 (US),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
030000005e040000000b000008040000,Microsoft Xbox One Elite 2 pad - Wired,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000ea02000008040000,Microsoft Xbox One S pad - Wired,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c62400001a53000000010000,Mini PE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000030000000300000002000000,Miroof,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,
05000000d6200000e589000001000000,Moga 2 HID,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
05000000d6200000ad0d000001000000,Moga Pro,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
05000000d62000007162000001000000,Moga Pro 2 HID,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
03000000c62400002b89000011010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000c62400002a89000000010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b22,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000c62400001a89000000010000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000250900006688000000010000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,
030000006b140000010c000010010000,NACON GC-400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000000d0f00000900000010010000,Natec Genesis P44,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000004f1f00000800000011010000,NEOGEO PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
03000000790000004518000010010000,NEXILUX GAMECUBE Controller Adapter,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
030000001008000001e5000010010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Linux,
060000007e0500003713000000000000,Nintendo 3DS,a:b0,b:b1,back:b8,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,
060000007e0500000820000000000000,Nintendo Combined Joy-Cons (joycond),a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
030000007e0500003703000000016800,Nintendo GameCube Controller,a:b0,b:b2,dpdown:b6,dpleft:b4,dpright:b5,dpup:b7,lefttrigger:a4,leftx:a0,lefty:a1~,rightshoulder:b9,righttrigger:a5,rightx:a2,righty:a3~,start:b8,x:b1,y:b3,platform:Linux,
03000000790000004618000010010000,Nintendo GameCube Controller Adapter,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5~,righty:a2~,start:b9,x:b2,y:b3,platform:Linux,
050000007e0500000620000001800000,Nintendo Switch Left Joy-Con,a:b9,b:b8,back:b5,leftshoulder:b2,leftstick:b6,leftx:a1,lefty:a0~,rightshoulder:b4,start:b0,x:b7,y:b10,platform:Linux,
030000007e0500000920000011810000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
050000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
050000007e0500000920000001800000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
050000007e0500000720000001800000,Nintendo Switch Right Joy-Con,a:b1,b:b2,back:b9,leftshoulder:b4,leftstick:b10,leftx:a1~,lefty:a0~,rightshoulder:b6,start:b8,x:b0,y:b3,platform:Linux,
050000007e0500001720000001000000,Nintendo Switch SNES Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux,
050000007e0500003003000001000000,Nintendo Wii Remote Pro Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,
05000000010000000100000003000000,Nintendo Wiimote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000000d0500000308000010010000,Nostromo n45 Dual Analog Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Linux,
03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,
05000000550900001472000001000000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,
03000000451300000830000010010000,NYKO CORE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
19000000010000000100000001010000,odroidgo2_joypad,a:b1,b:b0,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,guide:b10,leftshoulder:b4,leftstick:b12,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b13,righttrigger:b14,start:b15,x:b2,y:b3,platform:Linux,
19000000010000000200000011000000,odroidgo2_joypad_v11,a:b1,b:b0,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b12,leftshoulder:b4,leftstick:b14,lefttrigger:b13,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b16,start:b17,x:b2,y:b3,platform:Linux,
030000005e0400000202000000010000,Old Xbox pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
03000000c0160000dc27000001010000,OnyxSoft Dual JoyDivision,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,platform:Linux,
05000000362800000100000002010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux,
05000000362800000100000003010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux,
03000000830500005020000010010000,Padix Co. Ltd. Rockfire PSX/USB Bridge,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b2,y:b3,platform:Linux,
03000000790000001c18000011010000,PC Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000ff1100003133000010010000,PC Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
030000006f0e0000b802000001010000,PDP AFTERGLOW Wired Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e0000b802000013020000,PDP AFTERGLOW Wired Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00006401000001010000,PDP Battlefield One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00008001000011010000,PDP CO. LTD. Faceoff Wired Pro Controller for Nintendo Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006f0e00003101000000010000,PDP EA Sports Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e0000c802000012010000,PDP Kingdom Hearts Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00008701000011010000,PDP Rock Candy Wired Controller for Nintendo Switch,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000c6240000fefa000000010000,Rock Candy Xbox 360 Controller, a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux,
030000006f0e00000901000011010000,PDP Versus Fighting Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
030000006f0e0000a802000023020000,PDP Wired Controller for Xbox One,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000006f0e00008501000011010000,PDP Wired Fight Pad Pro for Nintendo Switch,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
0500000049190000030400001b010000,PG-9099,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000491900000204000000000000,PG-9118,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000004c050000da0c000011010000,Playstation Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
03000000d9040000160f000000010000,Playstation Controller Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
030000004c0500003713000011010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
03000000c62400000053000000010000,PowerA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c62400003a54000001010000,PowerA 1428124-01,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000d62000006dca000011010000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000d62000000228000001010000,PowerA Wired Controller for Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000d62000000220000001010000,PowerA Wired Controller for Xbox One and Xbox Series S and X,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux,
03000000c62400001a58000001010000,PowerA Xbox One ,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c62400001a54000001010000,PowerA Xbox One Mini Wired Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000d620000013a7000011010000,Nintendo Switch PowerA Wired Controller,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Linux,
030000006d040000d2ca000011010000,Precision Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000ba2200000701000001010000,Technology Innovation PS2 Adapter,b:b1,a:b0,x:b3,y:b2,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:b6,righttrigger:b7,platform:Linux,
03000000430b00000300000000010000,EMS Production PS2 Adapter,b:b1,a:b2,x:b3,y:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:b12,dpleft:b15,dpdown:b14,dpright:b13,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:b4,righttrigger:b5,platform:Linux,
03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
03000000341a00003608000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000004c0500006802000010010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
030000004c0500006802000010810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
030000004c0500006802000011810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
030000006f0e00001402000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000008f0e00000300000010010000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
050000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
050000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:a12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:a13,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
050000004c0500006802000000800000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
050000004c0500006802000000810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
05000000504c415953544154494f4e00,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
060000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
030000004c050000a00b000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000004c050000a00b000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
030000004c050000c405000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000004c050000c405000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000004c050000cc09000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000004c050000cc09000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
03000000c01100000140000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
050000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
050000004c050000c405000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
050000004c050000c405000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
050000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
050000004c050000cc09000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
050000004c050000cc09000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
030000004c050000e60c000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000ff000000cb01000010010000,PSP,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
03000000300f00001211000011010000,QanBa Arcade JoyStick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,platform:Linux,
030000009b2800004200000001010000,Raphnet Technologies Dual NES to USB v2.0,a:b0,b:b1,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b3,platform:Linux,
030000009b2800003200000001010000,Raphnet Technologies GC/N64 to USB v3.4,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
030000009b2800006000000001010000,Raphnet Technologies GC/N64 to USB v3.6,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
030000009b2800000300000001010000,raphnet.net 4nes4snes v1.5,a:b0,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Linux,
030000008916000001fd000024010000,Razer Onza Classic Edition,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000008916000000fd000024010000,Razer Onza Tournament Edition,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000321500000204000011010000,Razer Panthera (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000321500000104000011010000,Razer Panthera (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000321500000810000011010000,Razer Panthera Evo Arcade Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000321500000010000011010000,Razer RAIJU,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000321500000507000000010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000321500000a10000001000000,Razer Raiju Tournament Edition,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000321500000710000000010000,Razer Raiju Tournament Edition Wired,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000321500000011000011010000,Razer Raion Fightpad for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000008916000000fe000024010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c6240000045d000024010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c6240000045d000025010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000321500000009000011010000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
050000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
0300000032150000030a000001010000,Razer Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000790000001100000010010000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Linux,
0300000081170000990a000001010000,Retronic Adapter,a:b0,leftx:a0,lefty:a1,platform:Linux,
0300000000f000000300000000010000,RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux,
030000006b140000010d000011010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000006b140000130d000011010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000006f0e00001f01000000010000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00001e01000011010000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000006f0e00004601000001010000,Rock Candy Xbox One Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000a306000023f6000011010000,Saitek Cyborg V.1 Game Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
03000000a30600001005000000010000,Saitek P150,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b2,righttrigger:b5,x:b3,y:b4,platform:Linux,
03000000a30600000701000000010000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Linux,
03000000a30600000cff000010010000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b0,y:b1,platform:Linux,
03000000a30600000c04000011010000,Saitek P2900 Wireless Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b12,x:b0,y:b3,platform:Linux,
03000000300f00001201000010010000,Saitek P380,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,
03000000a30600000901000000010000,Saitek P880,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,x:b0,y:b1,platform:Linux,
03000000a30600000b04000000010000,Saitek P990 Dual Analog Pad,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Linux,
03000000a306000018f5000010010000,Saitek PLC Saitek P3200 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
03000000a306000020f6000011010000,Saitek PS2700 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
03000000d81d00000e00000010010000,Savior,a:b0,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,start:b9,x:b4,y:b5,platform:Linux,
030000001f08000001e4000010010000,SFC Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux,
03000000f025000021c1000010010000,ShanWan Gioteck PS3 Wired Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000632500007505000010010000,SHANWAN PS3/PC Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000bc2000000055000010010000,ShanWan PS3/PC Wired GamePad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000005f140000c501000010010000,SHANWAN Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000632500002305000010010000,ShanWan USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000341a00000908000010010000,SL-6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000004c050000e60c000011810000,Sony DualSense,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
050000004c050000e60c000000810000,Sony DualSense ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
03000000250900000500000000010000,Sony PS2 pad with SmartJoy adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,
030000005e0400008e02000073050000,Speedlink TORID Wireless Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000020200000,SpeedLink XEOX Pro Analog Gamepad pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000d11800000094000011010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de2800000112000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de2800000211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de2800000211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b15,paddle2:b16,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux,
03000000de2800004211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de2800004211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b15,paddle2:b16,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux,
03000000de280000fc11000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
05000000de2800000212000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de280000ff11000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000381000003014000075010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000381000003114000075010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
0500000011010000311400001b010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b32,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000110100001914000009010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000ad1b000038f0000090040000,Street Fighter IV FightStick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000003b07000004a1000000010000,Suncom SFX Plus for USB,a:b0,b:b2,back:b7,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b5,start:b8,x:b1,y:b3,platform:Linux,
03000000666600000488000000010000,Super Joy Box 5 Pro,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,
0300000000f00000f100000000010000,Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux,
03000000457500002211000010010000,SZMY-POWER CO. LTD. GAMEPAD,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
030000008f0e00000d31000010010000,SZMY-POWER CO. LTD. GAMEPAD 3 TURBO,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000008f0e00001431000010010000,SZMY-POWER CO. LTD. PS3 gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000004f04000020b3000010010000,Thrustmaster 2 in 1 DT,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,
030000004f04000015b3000010010000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,
030000004f04000023b3000000010000,Thrustmaster Dual Trigger 3-in-1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000004f0400000ed0000011010000,ThrustMaster eSwap PRO Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000b50700000399000000010000,Thrustmaster Firestorm Digital 2,a:b2,b:b4,back:b11,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b0,righttrigger:b9,start:b1,x:b3,y:b5,platform:Linux,
030000004f04000003b3000010010000,Thrustmaster Firestorm Dual Analog 2,a:b0,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b9,rightx:a2,righty:a3,x:b1,y:b3,platform:Linux,
030000004f04000000b3000010010000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Linux,
030000004f04000026b3000002040000,Thrustmaster Gamepad GP XID,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c6240000025b000002020000,Thrustmaster GPX Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000004f04000008d0000000010000,Thrustmaster Run N Drive Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000004f04000009d0000000010000,Thrustmaster Run N Drive Wireless PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000004f04000007d0000000010000,Thrustmaster T Mini Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000004f04000012b3000010010000,Thrustmaster vibrating gamepad,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,
03000000bd12000015d0000010010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux,
03000000d814000007cd000011010000,Toodles 2008 Chimp PC/PS3,a:b0,b:b1,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b2,platform:Linux,
030000005e0400008e02000070050000,Torid,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c01100000591000011010000,Torid,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000100800000100000010010000,Twin USB PS2 Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
03000000790000000600000007010000,USB gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux,
03000000790000001100000000010000,USB Gamepad1,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,platform:Linux,
03000000790000001100000011010000,USB Saturn Controller,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b4,start:b9,x:b0,y:b3,platform:Linux,
03000000790000002201000011010000,USB Saturn Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux,
03000000b40400000a01000000010000,USB Saturn Pad,a:b0,b:b1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Linux,
030000006f0e00000302000011010000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
030000006f0e00000702000011010000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
05000000ac0500003232000001000000,VR-BOX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
03000000791d00000103000010010000,Wii Classic Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
050000000d0f0000f600000001000000,Wireless HORIPAD Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400009102000007010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000a102000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000a102000007010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
0000000058626f782033363020576900,Xbox 360 Wireless Controller,a:b0,b:b1,back:b14,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b7,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux,
030000005e040000a102000014010000,Xbox 360 Wireless Receiver (XBOX),a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
0000000058626f782047616d65706100,Xbox Gamepad (userspace driver),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400000a0b000005040000,Xbox One Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,
030000005e040000d102000002010000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000fd02000030110000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000e302000002090000,Xbox One Elite,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
050000005e040000050b000002090000,Xbox One Elite Series 2,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000005e040000ea02000000000000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000e002000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000fd02000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000005e040000ea02000001030000,Xbox One Wireless Controller (Model 1708),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
060000005e040000120b000007050000,Xbox One Wireless Controller (Model 1914),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000120b000001050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
050000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
050000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000005e040000120b000005050000,XBox Series pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008e02000000010000,xbox360 Wireless EasySMX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000450c00002043000010010000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
03000000ac0500005b05000010010000,Xiaoji Gamesir-G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
05000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Linux,
03000000c0160000e105000001010000,Xin-Mo Xin-Mo Dual Arcade,a:b4,b:b3,back:b6,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b9,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b1,y:b0,platform:Linux,
xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000120c0000100e000011010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000120c0000101e000011010000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
# Android
38653964633230666463343334313533,8BitDo Adapter,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
34343439373236623466343934376233,8BitDo FC30 Pro,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b28,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b29,righttrigger:b7,start:b5,x:b30,y:b2,platform:Android,
33656266353630643966653238646264,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:a5,start:b10,x:b19,y:b2,platform:Android,
39366630663062373237616566353437,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,start:b6,x:b2,y:b3,platform:Android,
64653533313537373934323436343563,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:a4,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b10,start:b6,x:b2,y:b3,platform:Android,
66356438346136366337386437653934,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,start:b18,x:b19,y:b2,platform:Android,
66393064393162303732356665666366,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,start:b6,x:b2,y:b3,platform:Android,
05000000c82d000006500000ffff3f00,8BitDo M30 Gamepad,a:b1,b:b0,back:b4,guide:b17,leftshoulder:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a4,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000051060000ffff3f00,8BitDo M30 Gamepad,a:b1,b:b0,back:b4,guide:b17,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000015900000ffff3f00,8BitDo N30 Pro 2,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000065280000ffff3f00,8BitDo N30 Pro 2,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b17,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
050000000220000000900000ffff3f00,8BitDo NES30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
050000002038000009000000ffff3f00,8BitDo NES30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000000600000ffff3f00,8BitDo SF30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000000610000ffff3f00,8BitDo SF30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
38426974646f20534633302050726f00,8BitDo SF30 Pro,a:b1,b:b0,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b17,platform:Android,
61623334636338643233383735326439,8BitDo SFC30,a:b0,b:b1,back:b4,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b31,start:b5,x:b30,y:b2,platform:Android,
05000000c82d000012900000ffff3f00,8BitDo SN30 Gamepad,a:b1,b:b0,back:b4,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000062280000ffff3f00,8BitDo SN30 Gamepad,a:b1,b:b0,back:b4,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android,
35383531346263653330306238353131,8BitDo SN30 PP,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
05000000c82d000001600000ffff3f00,8BitDo SN30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
36653638656632326235346264663661,8BitDo SN30 Pro Plus,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android,
38303232393133383836366330346462,8BitDo SN30 Pro Plus,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android,
38346630346135363335366265656666,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
66306331643531333230306437353936,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000002600000ffff0f00,8BitDo SN30 Pro+,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b17,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
050000002028000009000000ffff3f00,8BitDo SNES30 Gamepad,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
050000003512000020ab000000780f00,8BitDo SNES30 Gamepad,a:b21,b:b20,back:b30,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b26,rightshoulder:b27,start:b31,x:b24,y:b23,platform:Android,
33666663316164653937326237613331,8BitDo Zero,a:b0,b:b1,back:b15,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android,
05000000c82d000018900000ffff0f00,8BitDo Zero 2,a:b1,b:b0,back:b4,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android,
05000000c82d000030320000ffff0f00,8BitDo Zero 2,a:b1,b:b0,back:b4,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android,
33663434393362303033616630346337,8BitDo Zero 2,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android,
34656330626361666438323266633963,8BitDo Zero 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b20,start:b10,x:b19,y:b2,platform:Android,
63396666386564393334393236386630,8BitDo Zero 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android,
63633435623263373466343461646430,8BitDo Zero 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android,
32333634613735616163326165323731,Amazon Luna Game Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android,
38383337343564366131323064613561,Brook Mars PS4 Controller,a:b1,b:b19,back:b17,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
33323763323132376537376266393366,Dual Strike,a:b24,b:b23,back:b25,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b29,rightshoulder:b78,rightx:a0,righty:a1~,start:b26,x:b22,y:b21,platform:Android,
30363230653635633863366338623265,Evo VR,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,x:b2,y:b3,platform:Android,
05000000b404000011240000dfff3f00,Flydigi Vader 2,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
05000000bc20000000550000ffff3f00,GameSir G3w,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
34323662653333636330306631326233,Google Nexus,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
35383633353935396534393230616564,Google Stadia Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
05000000d6020000e5890000dfff3f00,GPD XD Plus,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android,
0500000031366332860c44aadfff0f00,GS Gamepad,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
66633030656131663837396562323935,Hori Battle,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android,
35623466343433653739346434636330,Hori Fighting Commander 3 Pro,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
65656436646661313232656661616130,Hori PC Engine Mini Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b18,platform:Android,
31303433326562636431653534636633,Hori Real Arcade Pro 3,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
0500000083050000602000000ffe0000,iBuffalo SNES Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b15,rightshoulder:b16,start:b10,x:b2,y:b3,platform:Android,
64306137363261396266353433303531,InterAct GoPad,a:b24,b:b25,leftshoulder:b23,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,x:b21,y:b22,platform:Android,
65346535636333663931613264643164,Joy Con,a:b21,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,rightx:a2,righty:a3,start:b30,x:b23,y:b24,platform:Android,
33346566643039343630376565326335,Joy Con (L),a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b17,x:b19,y:b2,platform:Android,
35313531613435623366313835326238,Joy Con (L),a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b17,x:b19,y:b2,platform:Android,
39363561613936303237333537383931,Joy Con (R),a:b0,b:b1,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android,
38383665633039363066383334653465,Joy Con (R),a:b0,b:b1,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android,
39656136363638323036303865326464,JYS Aapter,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
63316564383539663166353034616434,JYS Adapter,a:b1,b:b3,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b0,y:b2,platform:Android,
64623163333561643339623235373232,Logitech F310,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
35623364393661626231343866613337,Logitech F710,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
64396331333230326333313330336533,Logitech F710,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
30363066623539323534363639323363,Magic NS,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
31353762393935386662336365626334,Magic NS,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
39623565346366623931666633323530,Magic NS,a:b1,b:b3,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b0,y:b2,platform:Android,
32303165626138343962363666346165,Mars,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
31323564663862633234646330373138,Mega Drive,a:b23,b:b22,leftx:a0,lefty:a1,rightshoulder:b25,righttrigger:b26,start:b30,x:b24,y:b21,platform:Android,
37333564393261653735306132613061,Mega Drive,a:b21,b:b22,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,lefttrigger:b28,rightshoulder:b27,righttrigger:b23,start:b30,x:b24,y:b25,platform:Android,
64363363336633363736393038313464,Mega Drive,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b2,y:b3,platform:Android,
64633436313965656664373634323364,Microsoft X-Box 360 pad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android,
32386235353630393033393135613831,Microsoft Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
33343361376163623438613466616531,Mocute M053,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
39306635663061636563316166303966,Mocute M053,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
7573622067616d657061642020202020,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Android,
050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b17,y:b2,platform:Android,
34323437396534643531326161633738,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,misc1:b5,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
37336435666338653565313731303834,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
4e564944494120436f72706f72617469,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
61363931656135336130663561616264,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005509000003720000cf7f3f00,NVIDIA Controller v01.01,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005509000010720000ffff3f00,NVIDIA Controller v01.03,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005509000014720000df7f3f00,NVIDIA Controller v01.04,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android,
61653962353232366130326530363061,Pokken,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,rightshoulder:b20,righttrigger:b10,start:b18,x:b0,y:b2,platform:Android,
32666633663735353234363064386132,PS2,a:b23,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a3,righty:a2,start:b30,x:b24,y:b21,platform:Android,
61363034663839376638653463633865,PS3,a:b0,b:b1,back:b15,dpdown:a14,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
66366539656564653432353139356536,PS3,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
66383132326164626636313737373037,PS3,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000004c05000068020000dfff3f00,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
30303839663330346632363232623138,PS4,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
31326235383662333266633463653332,PS4,a:b1,b:b16,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b17,x:b0,y:b2,platform:Android,
31663838336334393132303338353963,PS4,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
34613139376634626133336530386430,PS4,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
37626233336235343937333961353732,PS4,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
38393161636261653636653532386639,PS4,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
63313733393535663339656564343962,PS4,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
63393662363836383439353064663939,PS4,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
65366465656364636137653363376531,PS4,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android,
66613532303965383534396638613230,PS4,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android,
030000004c050000cc09000000006800,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000004c050000c405000000783f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000004c050000c4050000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
050000004c050000c4050000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000004c050000cc090000fffe3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000004c050000cc090000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
31373231336561636235613666323035,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
35643031303033326130316330353564,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
050000004c050000e60c0000fffe3f00,PS5 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
62653335326261303663356263626339,PSX,a:b19,b:b1,back:b17,leftshoulder:b9,lefttrigger:b3,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b20,start:b18,x:b2,y:b0,platform:Android,
64336263393933626535303339616332,Qanba 4RAF,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b20,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b9,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android,
36626666353861663864336130363137,Razer Junglecat,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
62653861643333663663383332396665,Razer Kishi,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000003215000005070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000003215000007070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000003215000000090000bf7f3f00,Razer Serval,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android,
61343739353764363165343237303336,Retro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,lefttrigger:b18,leftx:a0,lefty:a1,start:b10,x:b2,y:b3,platform:Android,
38653130373365613538333235303036,Retroid Pocket 2,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
64363363336633363736393038313463,Retrolink,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b6,platform:Android,
33373336396634316434323337666361,RumblePad 2,a:b22,b:b23,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,rightx:a2,righty:a3,start:b30,x:b21,y:b24,platform:Android,
66386565396238363534313863353065,Sanwa Mobile,a:b21,b:b22,leftshoulder:b23,leftx:a0,lefty:a1,rightshoulder:b24,platform:Android,
32383165316333383766336338373261,Saturn,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:a4,righttrigger:a5,x:b2,y:b3,platform:Android,
37316565396364386635383230353365,Saturn,a:b21,b:b22,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,lefttrigger:b28,rightshoulder:b27,righttrigger:b23,start:b30,x:b24,y:b25,platform:Android,
38613865396530353338373763623431,Saturn,a:b0,b:b1,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b19,start:b17,x:b2,y:b3,platform:Android,
61316232336262373631343137633631,Saturn,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:a4,righttrigger:a5,x:b2,y:b3,platform:Android,
30353835333338613130373363646337,SG H510,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android,
66386262366536653765333235343634,SG H510,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android,
66633132393363353531373465633064,SG H510,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android,
30306461613834333439303734316539,SideWinder Pro,a:b0,b:b1,leftshoulder:b20,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b19,righttrigger:b10,start:b17,x:b2,y:b3,platform:Android,
62653761636366393366613135366338,SN30 PP,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
38376662666661636265313264613039,SNES,a:b0,b:b1,back:b9,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,start:b10,x:b19,y:b2,platform:Android,
32633532643734376632656664383733,Sony DualSense,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android,
61303162353165316365336436343139,Sony DualSense,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android,
63303964303462366136616266653561,Sony PSP,a:b21,b:b22,back:b27,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,leftx:a0,lefty:a1,rightshoulder:b26,start:b28,x:b23,y:b24,platform:Android,
63376637643462343766333462383235,Sony Vita,a:b1,b:b19,back:b17,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,rightx:a3,righty:a4,start:b18,x:b0,y:b2,platform:Android,
05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android,
05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android,
0500000011010000201400000f7e0f00,SteelSeries Nimbus,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,x:b19,y:b2,platform:Android,
050000004f0400000ed00000fffe3f00,ThrustMaster eSwap PRO Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
5477696e20555342204a6f7973746963,Twin USB Joystick,a:b22,b:b21,back:b28,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,leftstick:b30,lefttrigger:b24,leftx:a0,lefty:a1,rightshoulder:b27,rightstick:b31,righttrigger:b25,rightx:a3,righty:a2,start:b29,x:b23,y:b20,platform:Android,
30623739343039643830333266346439,Valve Steam Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,leftx:a0,lefty:a1,paddle1:b23,paddle2:b24,rightshoulder:b10,rightstick:b8,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
31643365666432386133346639383937,Valve Steam Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,leftx:a0,lefty:a1,paddle1:b23,paddle2:b24,rightshoulder:b10,rightstick:b8,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
30386438313564306161393537333663,Wii Classic,a:b23,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a2,righty:a3,start:b30,x:b24,y:b21,platform:Android,
33333034646336346339646538643633,Wii Classic,a:b23,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a2,righty:a3,start:b30,x:b24,y:b21,platform:Android,
30306539356238653637313730656134,Wireless HORIPAD Switch Pro Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android,
30396232393162346330326334636566,Xbox 360,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
38313038323730383864666463383533,Xbox 360,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
65353331386662343338643939643636,Xbox 360,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
65613532386633373963616462363038,Xbox 360,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e0400008e02000000783f00,Xbox 360 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
33356661323266333733373865656366,Xbox One Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
35623965373264386238353433656138,Xbox One Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e040000000b000000783f00,Xbox One Elite 2 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android,
050000005e040000e002000000783f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e040000ea02000000783f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e040000fd020000ff7f3f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e040000e00200000ffe3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,platform:Android,
050000005e040000fd020000ffff3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e040000120b000000783f00,Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android,
050000005e040000130b0000ffff3f00,Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
65633038363832353634653836396239,Xbox Series Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e04000091020000ff073f00,Xbox Wireless Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android,
34356136633366613530316338376136,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,x:b17,y:b2,platform:Android,
36616131643361333337396261666433,Xbox Wireless Controller,a:b0,b:b1,back:b15,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000001727000044310000ffff3f00,XiaoMi Game Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a6,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android,
# iOS
05000000ac0500000100000000006d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS,
05000000ac050000010000004f066d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS,
05000000ac05000001000000cf076d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS,
05000000ac05000001000000df076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
05000000ac05000001000000ff076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
05000000ac0500000200000000006d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,platform:iOS,
05000000ac050000020000004f066d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,platform:iOS,
4d466947616d65706164010000000000,MFi Extended Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:iOS,
4d466947616d65706164020000000000,MFi Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,platform:iOS,
050000004c050000cc090000df070000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
050000004c050000cc090000df870001,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
050000004c050000cc090000ff070000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
050000004c050000cc090000ff870001,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,touchpad:b11,x:b2,y:b3,platform:iOS,
050000004c050000cc090000ff876d01,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
050000004c050000e60c0000df870000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,touchpad:b10,x:b2,y:b3,platform:iOS,
050000004c050000e60c0000ff870000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,touchpad:b11,x:b2,y:b3,platform:iOS,
05000000ac0500000300000000006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,platform:iOS,
05000000ac0500000300000043006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,platform:iOS,
05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:iOS,
05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:iOS,
050000005e040000050b0000df070001,Xbox Elite Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b10,paddle2:b12,paddle3:b11,paddle4:b13,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
050000005e040000050b0000ff070001,Xbox Elite Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
050000005e040000130b0000df870001,Xbox Series X Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b10,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
050000005e040000130b0000ff870001,Xbox Series X Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
050000005e040000e0020000df070000,Xbox Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
050000005e040000e0020000ff070000,Xbox Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
| 393,015 | Common Lisp | .l | 1,492 | 262.411528 | 348 | 0.823099 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 5f5a1637507357a895f9b3937ddb5a7aeddae78643f0913e5293efc54df48768 | 16,433 | [
-1
] |
16,434 | scene.gltf | borodust_notalone-thriced/assets/src/models/alien/scene.gltf | {
"accessors": [
{
"bufferView": 2,
"componentType": 5126,
"count": 65533,
"max": [
0.98117786645889282,
1.0270715951919556,
0.85563629865646362
],
"min": [
-1.0407609939575195,
-1.0261846780776978,
-1.039110541343689
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 786396,
"componentType": 5126,
"count": 65533,
"max": [
0.999858558177948,
0.9999091625213623,
0.99994367361068726
],
"min": [
-0.99991822242736816,
-0.9999433159828186,
-0.99999672174453735
],
"type": "VEC3"
},
{
"bufferView": 3,
"componentType": 5126,
"count": 65533,
"max": [
0.9999585747718811,
0.99996656179428101,
0.99999850988388062,
1
],
"min": [
-0.99999469518661499,
-0.99997991323471069,
-0.99990469217300415,
-1
],
"type": "VEC4"
},
{
"bufferView": 3,
"byteOffset": 1048528,
"componentType": 5126,
"count": 65533,
"max": [
1,
1,
1,
1
],
"min": [
0.26274511218070984,
0.094117648899555206,
0.019607843831181526,
1
],
"type": "VEC4"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 65533,
"max": [
0.99737000465393066,
0.99804002046585083
],
"min": [
0.0019499999471008778,
0.0019499999471008778
],
"type": "VEC2"
},
{
"bufferView": 0,
"componentType": 5125,
"count": 312960,
"max": [
65532
],
"min": [
0
],
"type": "SCALAR"
},
{
"bufferView": 2,
"byteOffset": 1572792,
"componentType": 5126,
"count": 65533,
"max": [
1.0291986465454102,
1.032464861869812,
1.0372387170791626
],
"min": [
-1.0082311630249023,
-1.0297598838806152,
-1.0079032182693481
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 2359188,
"componentType": 5126,
"count": 65533,
"max": [
0.99999022483825684,
0.99999457597732544,
0.99995875358581543
],
"min": [
-0.99998843669891357,
-0.99996709823608398,
-0.99999457597732544
],
"type": "VEC3"
},
{
"bufferView": 3,
"byteOffset": 2097056,
"componentType": 5126,
"count": 65533,
"max": [
0.9999890923500061,
0.99997258186340332,
0.99998748302459717,
1
],
"min": [
-0.99999922513961792,
-0.99997991323471069,
-0.9999997615814209,
-1
],
"type": "VEC4"
},
{
"bufferView": 3,
"byteOffset": 3145584,
"componentType": 5126,
"count": 65533,
"max": [
1,
1,
1,
1
],
"min": [
0.26274511218070984,
0.094117648899555206,
0.019607843831181526,
1
],
"type": "VEC4"
},
{
"bufferView": 1,
"byteOffset": 524264,
"componentType": 5126,
"count": 65533,
"max": [
0.99766999483108521,
0.99787002801895142
],
"min": [
0.0019499999471008778,
0.0019499999471008778
],
"type": "VEC2"
},
{
"bufferView": 0,
"byteOffset": 1251840,
"componentType": 5125,
"count": 263406,
"max": [
65532
],
"min": [
0
],
"type": "SCALAR"
},
{
"bufferView": 2,
"byteOffset": 3145584,
"componentType": 5126,
"count": 2484,
"max": [
0.91666090488433838,
1.0121012926101685,
0.89734238386154175
],
"min": [
-1.016453742980957,
-0.99561458826065063,
-0.83567941188812256
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 3175392,
"componentType": 5126,
"count": 2484,
"max": [
0.99909478425979614,
0.99970287084579468,
0.99960881471633911
],
"min": [
-0.9997294545173645,
-0.99991011619567871,
-0.99919742345809937
],
"type": "VEC3"
},
{
"bufferView": 3,
"byteOffset": 4194112,
"componentType": 5126,
"count": 2484,
"max": [
0.99962574243545532,
0.99969875812530518,
0.9998248815536499,
1
],
"min": [
-0.99927616119384766,
-0.9991576075553894,
-0.99887311458587646,
-1
],
"type": "VEC4"
},
{
"bufferView": 3,
"byteOffset": 4233856,
"componentType": 5126,
"count": 2484,
"max": [
1,
1,
1,
1
],
"min": [
0.26666668057441711,
0.094117648899555206,
0.019607843831181526,
1
],
"type": "VEC4"
},
{
"bufferView": 1,
"byteOffset": 1048528,
"componentType": 5126,
"count": 2484,
"max": [
0.99233001470565796,
0.9872099757194519
],
"min": [
0.0036599999293684959,
0.0041899997740983963
],
"type": "VEC2"
},
{
"bufferView": 0,
"byteOffset": 2305464,
"componentType": 5125,
"count": 3153,
"max": [
2483
],
"min": [
0
],
"type": "SCALAR"
}
],
"asset": {
"extras": {
"author": "Mn8 (https://sketchfab.com/mn8)",
"license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
"source": "https://sketchfab.com/3d-models/alien-virus-6b5742d756f442cfa0fb4cceecadd4d0",
"title": "Alien Virus"
},
"generator": "Sketchfab-4.61.0",
"version": "2.0"
},
"bufferViews": [
{
"buffer": 0,
"byteLength": 2318076,
"byteOffset": 0,
"name": "floatBufferViews",
"target": 34963
},
{
"buffer": 0,
"byteLength": 1068400,
"byteOffset": 2318076,
"byteStride": 8,
"name": "floatBufferViews",
"target": 34962
},
{
"buffer": 0,
"byteLength": 3205200,
"byteOffset": 3386476,
"byteStride": 12,
"name": "floatBufferViews",
"target": 34962
},
{
"buffer": 0,
"byteLength": 4273600,
"byteOffset": 6591676,
"byteStride": 16,
"name": "floatBufferViews",
"target": 34962
}
],
"buffers": [
{
"byteLength": 10865276,
"uri": "scene.bin"
}
],
"materials": [
{
"doubleSided": true,
"name": "defaultMat",
"pbrMetallicRoughness": {
"baseColorFactor": [
0.48540884400000001,
0.16256321500000001,
0.16256321500000001,
1
],
"metallicFactor": 0,
"roughnessFactor": 0.59999999999999998
}
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"COLOR_0": 3,
"NORMAL": 1,
"POSITION": 0,
"TANGENT": 2,
"TEXCOORD_0": 4
},
"indices": 5,
"material": 0,
"mode": 4
}
]
},
{
"primitives": [
{
"attributes": {
"COLOR_0": 9,
"NORMAL": 7,
"POSITION": 6,
"TANGENT": 8,
"TEXCOORD_0": 10
},
"indices": 11,
"material": 0,
"mode": 4
}
]
},
{
"primitives": [
{
"attributes": {
"COLOR_0": 15,
"NORMAL": 13,
"POSITION": 12,
"TANGENT": 14,
"TEXCOORD_0": 16
},
"indices": 17,
"material": 0,
"mode": 4
}
]
}
],
"nodes": [
{
"children": [
1
],
"name": "RootNode (gltf orientation matrix)",
"rotation": [
-0.70710678118654746,
-0,
-0,
0.70710678118654757
]
},
{
"children": [
2
],
"name": "RootNode (model correction matrix)"
},
{
"children": [
3,
4,
5
],
"name": "alien_virus2_decimated.OBJ.cleaner.materialmerger.gles"
},
{
"mesh": 0,
"name": ""
},
{
"mesh": 1,
"name": ""
},
{
"mesh": 2,
"name": ""
}
],
"scene": 0,
"scenes": [
{
"name": "OSG_Scene",
"nodes": [
0
]
}
]
}
| 8,830 | Common Lisp | .l | 464 | 11.627155 | 95 | 0.457501 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | bde5d0ee6f31842df88a2b6ccc5b457f86c2f84fb9fcbb2d83ab9064e9ade55d | 16,434 | [
-1
] |
16,435 | bundle.yaml | borodust_notalone-thriced/.github/workflows/bundle.yaml | name: Bundle
on:
push:
tags:
- "v*"
jobs:
linux-lts-appimage:
runs-on: ubuntu-18.04
steps:
- name: Check Out Everything
uses: actions/checkout@v2
with:
lfs: true
- name: Set Output Bundle File
run: echo "BUNDLE_FILE=${{ github.workspace }}/notalone-thriced-x86_64.AppImage" >> $GITHUB_ENV
- id: bundle-app
name: Bundle Using Alien-Works-Delivery
uses: boroactions/alien-works-delivery@v0
with:
bundle-def-system: notalone-thriced/bundle
bundle-name: notalone-thriced
bundle-type: appimage
bundle-file: ${{ env.BUNDLE_FILE }}
lisp: sbcl_ros
- name: Publish Binaries
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
${{ env.BUNDLE_FILE }}
linux-lts-archive:
runs-on: ubuntu-18.04
steps:
- name: Check Out Everything
uses: actions/checkout@v2
with:
lfs: true
- name: Set Output Bundle File
run: echo "BUNDLE_FILE=${{ github.workspace }}/notalone-thriced-x86_64.tar.gz" >> $GITHUB_ENV
- id: bundle-app
name: Bundle Using Alien-Works-Delivery
uses: boroactions/alien-works-delivery@v0
with:
bundle-def-system: notalone-thriced/bundle
bundle-name: notalone-thriced
bundle-type: archive
bundle-file: ${{ env.BUNDLE_FILE }}
lisp: sbcl_ros
- name: Publish Binaries
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
${{ env.BUNDLE_FILE }}
| 1,737 | Common Lisp | .l | 56 | 22.714286 | 103 | 0.585714 | borodust/notalone-thriced | 4 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | f2a6c2dafab5449432f3d9eec2e95ed7a072469d2e9149fa60adc3a17bed19ee | 16,435 | [
-1
] |
16,451 | cl-pjsua.lisp | varjagg_cl-pjsip/cl-pjsua.lisp | ;;; PJSUA high level API wrappers
(in-package #:cl-pjsip)
(defctype pjssua-acc-id :int)
(defcenum pjsua-100rel-use
:pjsua-100rel-not-used
:pjsua-100rel-mandatory
:pjsua-100rel-optional)
(defcenum pjsua-sip-timer-use
:pjsua-sip-timer-inactive
:pjsua-sip-timer-optional
:pjsua-sip-timer-required
:pjsua-sip-timer-always)
(defcstruct pjsip-timer-setting
(min-se :uint)
(sess-expires :uint))
(defcstruct cred-info-aka
(k pj-str)
(op pj-str)
(amf pj-str)
(cb :pointer))
(defcstruct pjsip-cred-info
(realm pj-str)
(scheme pj-str)
(username pj-str)
(data-type :int)
(data pj-str)
(ext-aka (:struct cred-info-aka)))
(defctype pjsip-cred-info (:struct pjsip-cred-info))
(defcenum pjmedia-srtp-use
:pjmedia-srtp-disabled
:pjmedia-srtp-optional
:pjmedia-srtp-mandatory)
(defcstruct pjsua-callback
(on-call-state :pointer)
(on-incoming-call :pointer)
(on-call-tsx-state :pointer)
(on-call-media-state :pointer)
(on-call-sdp-created :pointer)
(on-stream-created :pointer)
(on-stream-destroyed :pointer)
(on-dtmf-digit :pointer)
(on-call-transfer-request :pointer)
(on-call-transfer-request2 :pointer)
(on-call-transfer-status :pointer)
(on-call-replace-request :pointer)
(on-call-replace-request2 :pointer)
(on-call-replaced :pointer)
(on-call-rx-offer :pointer)
(on-call-tx-offer :pointer)
(on-reg-started :pointer)
(on-reg-started2 :pointer)
(on-reg-state :pointer)
(on-reg-state2 :pointer)
(on-incoming-subscribe :pointer)
(on-srv-subscribe-state :pointer)
(on-buddy-state :pointer)
(on-buddy-evsub-state :pointer)
(on-pager :pointer)
(on-pager2 :pointer)
(on-pager-status :pointer)
(on-pager-status2 :pointer)
(on-typing :pointer)
(on-typing2 :pointer)
(on-nat-detect :pointer)
(on-call-redirected :pointer)
(on-mwi-state :pointer)
(on-mwi-info :pointer)
(on-transport-state :pointer)
(on-call-media-transport-state :pointer)
(on-ice-transport-error :pointer)
(on-snd-dev-operation :pointer)
(on-call-media-event :pointer)
(on-create-media-transport :pointer)
(on-acc-find-for-incoming :pointer)
(on-stun-resolution-complete :pointer))
(defctype pjsua-callback (:struct pjsua-callback))
(defcstruct pjsua-config
(max-calls :uint)
(thread-cnt :uint)
(nameserver-count :uint)
(nameserver pj-str :count 4)
(force-lr pj-bool)
(outbound-proxy-cnt :uint)
(outbound-proxy pj-str :count 4)
(stun-domain pj-str)
(stun-host pj-str)
(stun-srv-cnt :uint)
(stun-srv pj-str :count 8)
(stun-ignore-failure pj-bool)
(stun-map-use-stun2 pj-bool)
(nat-type-in-sdp :int)
(require-100rel pjsua-100rel-use)
(use-timer pjsua-sip-timer-use)
(enable-unsolicited-mwi pj-bool)
(timer-setting (:struct pjsip-timer-setting))
(cred-count :uint)
(cred-info (:struct pjsip-cred-info) :count 8) ;PJSUA_ACC_MAX_PROXIES
(cb pjsua-callback)
(user-agent pj-str)
(use-srtp pjmedia-srtp-use)
(srtp-secure-signaling :int)
(srtp-optional-dup-offer pj-bool)
(hangup-forked-call pj-bool))
(defctype pjsua-config (:struct pjsua-config))
(defctype pjsua-call-id :int)
(defctype pjsua-acc-id :int)
(defctype pjsua-buddy-id :int)
(defctype pjsua-player-id :int)
(defctype pjsua-recorder-id :int)
(defctype pjsua-conf-port-id :int)
(defcstruct pjsua-call-setting
(flag :uint)
(req-keyframe-method :uint)
(aud-cnt :uint)
(vid-cnt :uint))
(defctype pjsua-call-setting (:struct pjsua-call-setting))
(defcenum pjsua-call-media-status
:pjsua-call-media-none
:pjsua-call-media-active
:pjsua-call-media-local-hold
:pjsua-call-media-remote-hole
:pjsua-call-media-error)
(defcstruct call-media-info-stream-aud
(conf-slot pjsua-conf-port-id))
(defctype pjsua-vid-win-id :int)
(defcstruct call-media-info-stream-vid
(win-in pjsua-vid-win-id)
(cap-dev pjmedia-vid-dev-index))
(defcunion call-media-info-stream
(aud (:struct call-media-info-stream-aud))
(vid (:struct call-media-info-stream-vid)))
(defcstruct pjsua-call-media-info
(index :uint)
(type pjmedia-type)
(dir pjmedia-dir)
(status pjsua-call-media-status)
(stream (:union call-media-info-stream)))
(defcstruct call-info-buf
(local-info :char :count 128)
(local-contact :char :count 128)
(remote-info :char :count 128)
(remote-contact :char :count 128)
(call-id :char :count 128)
(last-status-text :char :count 128))
(defcstruct pjsua-call-info
(id pjsua-call-id)
(role pjsip-role-e)
(acc-id pjsua-acc-id)
(local-info pj-str)
(local-contact pj-str)
(remote-info pj-str)
(remote-contact pj-str)
(call-id pj-str)
(setting (:struct pjsua-call-setting))
(state pjsip-inv-state)
(state-text pj-str)
(last-status pjsip-status-code)
(last-status-text pj-str)
(media-status pjsua-call-media-status)
(media-dir pjmedia-dir)
(conf-slot pjsua-conf-port-id)
(media-cnt :uint)
(media pjsua-call-media-info :count 16) ;PJMEDIA_MAX_SDP_MEDIA
(prov-media-cnt :uint)
(prov-media pjsua-call-media-info :count 16) ;PJMEDIA_MAX_SDP_MEDIA
(connect-duration pj-time-val)
(total-duration pj-time-val)
(rem-offerer pj-bool)
(rem-aud-cnt :uint)
(rem-vid-cnt :uint)
(buf_ (:struct call-info-buf)))
(defctype pjsua-call-info (:struct pjsua-call-info))
(defcstruct pjsua-logging-config
(msg-logging pj-bool)
(level :uint)
(console-level :uint)
(decor :uint)
(log-filename pj-str)
(log-file-flags :uint)
(cb :pointer))
(defctype pjsua-logging-config (:struct pjsua-logging-config))
(defcstruct pjsua-transport-config
(port :uint)
(port-range :uint)
(public-addr pj-str)
(bound-add pj-str)
(tls-setting (:struct pjsip-tls-setting))
(qos-type pj-qos-type)
(qos-params pj-qos-params)
(sockopt-params pj-sockopt-params))
(defctype pjsua-transport-config (:struct pjsua-transport-config))
(defctype pjsua-transport-id :int)
(defcenum pjsua-stun-use
:pjsua-stun-use-default
:pjsua-stun-use-disabled
:pjsua-stun-use-retry-on-failure)
(defcenum pjsua-ipv6-use
:pjsua-ipv6-disabled
:pjsua-ipv6-enabled)
(defcenum pjsua-ice-config-use
:pjsua-ice-config-use-default
:pjsua-ice-config-use-custom)
(defcenum pjsua-turn-config-use
:pjsua-trun-config-use-default
:pjsua-trun-config-use-custom)
(defcstruct pj-ice-sess-options
(aggressive pj-bool)
(nominated-check-delay :uint)
(controlled-agent-want-nom-timeout :int))
(defcstruct pjsua-ice-config
(enable-ice pj-bool)
(ice-max-host-cands :int)
(ice-opt (:struct pj-ice-sess-options))
(ice-no-rtcp pj-bool)
(ice-always-update pj-bool))
(defctype pjsua-ice-config (:struct pjsua-ice-config))
(defcstruct pjsua-turn-config
(enable-turn pj-bool)
(turn-server pj-str)
(turn-conn-type pj-turn-tp-type)
(turn-auth-cred pj-stun-auth-cred))
(defctype pjsua-turn-config (:struct pjsua-turn-config))
(defcenum pjsua-call-hold-type
:pjsua-call-hold-type-rfc3264
:pjsua-call-hold-type-rfc2543)
(defcstruct pjsua-acc-config
(user-data (:pointer :void))
(priority :int)
(id pj-str)
(reg-uri pj-str)
(reg-hdr-list pjsip-hdr)
(reg-contact-params pj-str)
(sub-hdr-list pjsip-hdr)
(mwi-enabled pj-bool)
(mwi-expires :uint)
(publish-enabled pj-bool)
(publish-opt (:struct pjsip-publishc-opt))
(unpublsih-max-wait-time-msec :uint)
(auth-pref pjsip-auth-clt-pref)
(pidf-tuple-id pj-str)
(force-contact pj-str)
(contact-params pj-str)
(contact-uri-params pj-str)
(require-100rel pjsua-100rel-use)
(use-timer pjsua-sip-timer-use)
(timer-setting (:struct pjsip-timer-setting))
(proxy-cnt :uint)
(proxy pj-str :count 8) ;PJSUA_ACC_MAX_PROXIES
(lock-codec :uint)
(reg-timeout :uint)
(reg-delay-before-refresh :uint)
(unreg-timeout :uint)
(cred-count :uint)
(cred-info (:struct pjsip-cred-info) :count 8) ;PJSUA_ACC_MAX_PROXIES
(transport-id pjsua-transport-id)
(allow-contact-rewrite pj-bool)
(contact-rewrite-method :int)
(contact-use-src-port pj-bool)
(allow-via-rewrite pj-bool)
(allow-sdp-nat-rewrite pj-bool)
(use-rfc5626 :uint)
(rfc5626-instance-id pj-str)
(rfc5626-reg-id pj-str)
(ka-interval :uint)
(ka-data pj-str)
(vid-in-auto-show pj-bool)
(vid-out-auto-transmit pj-bool)
(vid-wnd-flags :uint)
(vid-cap-dev pjmedia-vid-dev-index)
(vid-rend-dev pjmedia-vid-dev-index)
(vid-stream-rc-config pjmedia-vid-stream-rc-config)
(vid-stream-sk-config pjmedia-vid-stream-sk-config) ;NB: check in 2.5.5
(rtp-cfg (:struct pjsua-transport-config))
(ipv6-media-use pjsua-ipv6-use)
(sip-stun-use pjsua-stun-use)
(media-stun-use pjsua-stun-use)
(ice-cfg-use pjsua-ice-config-use)
(ice-cfg pjsua-ice-config)
(turn-cfg-use pjsua-turn-config-use)
(turn-cfg pjsua-turn-config)
(use-srtp pjmedia-srtp-use)
(srtp-secure-signaling :int)
(srtp-optional-dup-offer pj-bool)
(reg-retry-interval :uint)
(reg-first-retry-interval :uint)
(reg-retry-random-interval :uint)
(drop-calls-on-reg-fail pj-bool)
(reg-use-proxy :uint)
(use-stream-ka pj-bool)
(call-hold-type pjsua-call-hold-type)
(register-on-acc-add pj-bool))
(defctype pjsua-acc-config (:struct pjsua-acc-config))
(defcstruct pjsip-multipart-part
(list pj-list)
(hdr pjsip-hdr)
(body (:pointer pjsip-msg-body)))
(defcstruct pjsua-msg-data
(target-uri pj-str)
(hdr-list pjsip-hdr)
(content-type pj-str)
(msg-body pj-str)
(multipart-type pjsip-media-type)
(multipart-parts (:struct pjsip-multipart-part)))
(defctype pjsua-msg-data (:struct pjsua-msg-data))
(defcstruct pjsua-media-config
(clock-rate :uint)
(snd-clock-rate :uint)
(channel-count :uint)
(audio-frame-ptime :uint)
(max-media-ports :uint)
(has-ioqueue pj-bool)
(thread-cnt :uint)
(quality :uint)
(ptime :uint)
(no-vad pj-bool)
(ilbc-mode :uint)
(tx-drop-pct :uint)
(rx-drop-pct :uint)
(ec-options :uint)
(ec-tail-en :uint)
(snd-rec-latency :uint)
(snd-play-latency :uint)
(jb-init :int)
(jb-min-pre :int)
(jb-max-pre :int)
(jb-max :int)
(enable-ice pj-bool)
(ice-max-host-cands :int)
(ice-opt (:struct pj-ice-sess-options))
(ice-no-rtcp pj-bool)
(ice-always-update pj-bool)
(enable-turn pj-bool)
(turn-server pj-str)
(turn-conn-type pj-turn-tp-type)
(turn-auth-cred pj-stun-auth-cred)
(snd-auto-close-time :int)
(vid-preview-enable-native pj-bool)
(no-smart-media-update pj-bool)
(no-rtcp-sdes-bye pj-bool)
(on-aud-prev-play-frame :pointer)
(on-aud-prev-rec-frame :pointer))
(defctype pjsua-media-config (:struct pjsua-media-config))
(defcfun "pjsua_call_get_info" pj-status (call-id pjsua-call-id) (info (:pointer pjsua-call-info)))
(defcfun "pjsua_call_answer" pj-status (call-id pjsua-call-id) (code :uint)
(reason (:pointer pj-str)) (msg-data (:pointer pjsua-msg-data)))
(defcfun "pjsua_conf_connect" pj-status (source pjsua-conf-port-id) (sink pjsua-conf-port-id))
(defcfun "pjsua_create" pj-status)
(defcfun "pjsua_init" pj-status (ua-cfg (:pointer pjsua-config)) (log-cfg (:pointer pjsua-logging-config))
(media-cfg (:pointer pjsua-media-config)))
(defcfun "pjsua_start" pj-status)
(defcfun "pjsua_destroy" :void)
(defcfun "pjsua_verify_url" pj-status (c-url :string))
(defcfun "pjsua_config_default" :void (cfg (:pointer pjsua-config)))
(defcfun "pjsua_logging_config_default" :void (cfg (:pointer pjsua-logging-config)))
(defcfun "pjsua_transport_config_default" :void (cfg (:pointer pjsua-transport-config)))
(defcfun "pjsua_transport_create" pj-status (type pjsip-transport-type-e) (cfg (:pointer pjsua-transport-config))
(p-id (:pointer pjsua-transport-id)))
(defcfun "pjsua_acc_config_default" :void (cfg (:pointer pjsua-acc-config)))
(defcfun "pjsua_acc_add" pj-status (cfg (:pointer pjsua-acc-config)) (is-default pj-bool) (p-acc-id (:pointer pjsua-acc-id)))
(defcfun "pjsua_call_make_call" pj-status (acc-id pjsua-acc-id) (dest-uri (:pointer pj-str)) (opt (:pointer pjsua-call-setting))
(user-data (:pointer :void)) (msg-data (:pointer pjsua-msg-data)) (p-call-id (:pointer pjsua-call-id)))
(defcfun "pjsua_call_hangup_all" :void)
(defcfun "pjsua_perror" :void (sender :string) (title :string) (status pj-status))
| 12,053 | Common Lisp | .lisp | 363 | 30.413223 | 128 | 0.726475 | varjagg/cl-pjsip | 4 | 1 | 0 | GPL-2.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | c95975db862adfb27acd3d4bf93f2c9ffd98a9b1630bf3c9c8093da002b936ad | 16,451 | [
-1
] |
16,452 | cl-pjsip.lisp | varjagg_cl-pjsip/cl-pjsip.lisp | ;;;; Library wrapper
(in-package #:cl-pjsip)
(define-foreign-library libpjlib-util
(:unix (:or "libpjlib-util.so")))
(define-foreign-library libpj
(:unix (:or "libpj.so.2" "libpj.so")))
(define-foreign-library libpjsip
(:unix (:or "libpjsip.so.2" "libpjsip.so")))
(define-foreign-library libpjsip-ua
(:unix (:or "libpjsip-ua.so")))
(define-foreign-library libpjsua
(:unix (:or "libpjsua.so")))
(define-foreign-library libpjmedia
(:unix (:or "libpjmedia.so")))
(define-foreign-library libpjmedia-codec
(:unix (:or "libpjmedia-codec.so")))
(define-foreign-library libpjmedia-audiodev
(:unix (:or "libpjmedia-audiodev.so")))
(defconstant +pj-invalid-socket+ -1)
(defconstant +pj-success+ 0)
(defconstant +pj-true+ 1)
(defconstant +pj-false+ 0)
(defconstant +pj-errno-start-status+ 70000)
(defconstant +pj-enotsup+ (+ +pj-errno-start-status+ 12))
(eval-when (:compile-toplevel)
(defconstant +pj-max-obj-name+ 32)
(defconstant +pj-caching-pool-array-size+ 16)
(defconstant +pool-buf-size+ 512) ;256 * sizeof(size_t) / 4
(defconstant +pjmedia-codec-mgr-max-codecs+ 32)
(defconstant +pjsip-max-module+ 32)
(defconstant +max-threads+ 16)
(defconstant +pjsip-max-pkt-len+ 4000)
(defconstant +pj-inet6-addrstrlen+ 46)
(defconstant +pjsip-generic-array-max-count+ 32)
(defconstant +pjmedia-format-detail-user-size+ 1)
(defconstant +pjsip-max-resolved-addresses+ 8)
(defconstant +pj-max-sockopt-params+ 4))
(defmacro assert-success (expr)
`(assert (= ,expr +pj-success+)))
(defun pj-success (val)
(= val +pj-success+))
(defctype size :unsigned-long)
(defctype pj-status :int)
(defctype pj-size size)
(defctype pj-ssize :long)
(defctype pj-bool :boolean)
(defctype pj-int32 :int)
(defctype pj-uint32 :uint)
(defctype pj-int16 :short)
(defctype pj-uint16 :ushort)
(defctype pj-uint64 :uint64)
(defctype pj-int64 :int64)
(defcstruct pj-str
(ptr (:pointer :char))
(slen :long))
(defctype pj-str (:struct pj-str))
;;;should really really fix this crap, once get the basics working
(defun lisp-string-to-pj-str (string pjstring)
"Map Lisp strings to pj_str"
(check-type string string)
(pj-strcpy2 pjstring string)
#+nil(with-foreign-slots ((ptr slen) pjstring pj-str)
(setf slen (length string))
(setf ptr (foreign-alloc :char :count slen))
(loop for i from 0 below slen do
(setf (mem-aref ptr :char i) (char-code (char string i))))
pjstring))
(defun pj-str-length (pjstr)
(foreign-slot-value pjstr 'pj-str 'slen))
(defun pj-str-to-lisp (pointer &key (encoding *default-foreign-encoding*))
(unless (null-pointer-p pointer)
(let ((count (pj-str-length pointer))
;; it is not clear yet if PJSIP strings orthogonal to encoding capacity
(mapping (cffi::lookup-mapping cffi::*foreign-string-mappings* encoding)))
(multiple-value-bind (size new-end)
(funcall (cffi::code-point-counter mapping)
pointer 0 count (1- array-total-size-limit))
(let ((string (make-string size)))
(funcall (cffi::decoder mapping)
(foreign-slot-value pointer 'pj-str 'ptr) 0 new-end string 0)
string)))))
(defcenum pjsip-module-priority
(:pjsip-mod-priority-transport-layer 8)
(:pjsip-mod-priority-tsx-layer 16)
(:pjsip-mod-priority-ua-proxy-layer 32)
(:pjsip-mod-priority-dialog-usage 48)
(:pjsip-mod-priority-application 64))
(defcstruct pj-pool-factory-policy
;;pjsip's own callbackery, we're not going to disturb this
(block-alloc :pointer)
(block-free :pointer)
(callback :pointer)
(flags :uint))
(defctype pj-pool-factory-policy (:struct pj-pool-factory-policy))
(defcstruct pj-pool-factory
(policy (:struct pj-pool-factory-policy))
;;pjsip's own callbackery, we're not going to disturb this
(create-pool :pointer)
(release-pool :pointer)
(dump-status :pointer)
(on-block-alloc :pointer)
(on-block-free :pointer))
(defctype pj-pool-factory (:struct pj-pool-factory))
#|
(defcstruct pj-pool-mem
(next :pointer))
(defctype pj-pool-mem (:struct pj-pool-mem))
;; pool_alt.h definitionx
(defcstruct pj-pool
(first-mem (:pointer (:struct pj-pool-mem)))
(factory (:pointer (:struct pj-pool-factory)))
(obj-name :char :count 32)
(cb :pointer)) ;callback
|#
(defcstruct pj-list
(prev (:pointer :void))
(next (:pointer :void)))
(defctype pj-list (:struct pj-list))
(defcstruct pj-pool-block
(list pj-list)
(buf (:pointer :uchar))
(cur (:pointer :uchar))
(end (:pointer :uchar)))
(defctype pj-pool-block (:struct pj-pool-block))
(defcstruct pj-pool
(list pj-list)
(obj-name :char :count #.+pj-max-obj-name+)
(factory (:pointer pj-pool-factory))
(factory-data (:pointer :void))
(capacity pj-size)
(increment-size pj-size)
(block-list pj-pool-block)
(callback :pointer))
(defctype pj-pool (:struct pj-pool))
(defcstruct pj-caching-pool
(factory (:struct pj-pool-factory))
(capacity pj-size)
(max-capacity pj-size)
(used-count pj-size)
(used-size pj-size)
(peak-used-size pj-size)
(free-list (:struct pj-list) :count #.+pj-caching-pool-array-size+)
(used-list (:struct pj-list))
(pool-buf :char :count #.+pool-buf-size+)
(lock :pointer))
(defctype pj-caching-pool (:struct pj-caching-pool))
(defcenum pjsip-hdr-e
:pjsip_h_accept
:pjsip_h_accept_encoding_unimp
:pjsip_h_accept_language_unimp
:pjsip_h_alert_info_unimp
:pjsip_h_allow
:pjsip_h_authentication_info_unimp
:pjsip_h_authorization
:pjsip_h_call_id
:pjsip_h_call_info_unimp
:pjsip_h_contact
:pjsip_h_content_disposition_unimp
:pjsip_h_content_encoding_unimp
:pjsip_h_content_language_unimp
:pjsip_h_content_length
:pjsip_h_content_type
:pjsip_h_cseq
:pjsip_h_date_unimp
:pjsip_h_error_info_unimp
:pjsip_h_expires
:pjsip_h_from
:pjsip_h_in_reply_to_unimp
:pjsip_h_max_forwards
:pjsip_h_mime_version_unimp
:pjsip_h_min_expires
:pjsip_h_organization_unimp
:pjsip_h_priority_unimp
:pjsip_h_proxy_authenticate
:pjsip_h_proxy_authorization
:pjsip_h_proxy_require_unimp
:pjsip_h_record_route
:pjsip_h_reply_to_unimp
:pjsip_h_require
:pjsip_h_retry_after
:pjsip_h_route
:pjsip_h_server_unimp
:pjsip_h_subject_unimp
:pjsip_h_supported
:pjsip_h_timestamp_unimp
:pjsip_h_to
:pjsip_h_unsupported
:pjsip_h_user_agent_unimp
:pjsip_h_via
:pjsip_h_warning_unimp
:pjsip_h_www_authenticate
:pjsip_h_other)
(defcstruct pjsip-hdr
(list pj-list)
(type pjsip-hdr-e)
(name pj-str)
(sname pj-str)
(vptr :pointer))
(defctype pjsip-hdr (:struct pjsip-hdr))
(defcunion pj-in6-addr
(s6-addr :uint8 :count 16)
(u6-addr32 pj-uint32 :count 4))
;;;on Darwin
#+darwin(defcstruct pj-sockaddr-in6
(sin6-zero-len :uint8)
(sin6-family :uint8)
;;assume zero len
;;(sin6-family :uint16)
(sin6-port pj-uint16)
(sin6-flowinfo pj-uint32)
(sin6-addr (:union pj-in6-addr))
(sin6-scope-id pj-uint32))
;;; Linux
#+linux(defcstruct pj-sockaddr-in6
(sin6-family pj-uint16)
(sin6-port pj-uint16)
(sin6-flowinfo pj-uint32)
(sin6-addr (:union pj-in6-addr))
(sin6-scope-id pj-uint32))
(defctype pj-sockaddr-in6 (:struct pj-sockaddr-in6))
(defcstruct pj-in-addr
(s-addr pj-uint32))
(defctype pj-in-addr (:struct pj-in-addr))
;;;on Darwin
#+darwin(defcstruct pj-sockaddr-in
(sin-zero-len :uint8)
(sin-family :uint8)
;;assume zero len
;;(sin-family :uint16)
(sin-port pj-uint16)
(sin-addr (:struct pj-in-addr))
(sin-zero :char :count 8))
;;; Linux
#+linux(defcstruct pj-sockaddr-in
(sin-family pj-uint16)
(sin-port pj-uint16)
(sin-addr (:struct pj-in-addr))
(sin-zero :char :count 8))
(defctype pj-sockaddr-in (:struct pj-sockaddr-in))
;;; Darwin
#+nil(defcstruct pj-addr-hdr
(sa-zero-len :uint8)
(sa-family :uint8))
(defcstruct pj-addr-hdr
(sa-family pj-uint16))
(defctype pj-addr-hdr (:struct pj-addr-hdr))
(defcunion pj-sockaddr
(addr (:struct pj-addr-hdr))
(ipv4 (:struct pj-sockaddr-in))
(ipv6 (:struct pj-sockaddr-in6)))
(defctype pj-sockaddr (:union pj-sockaddr))
(defcstruct pjsip-host-port
(host pj-str)
(port :int))
(defctype pjsip-host-port (:struct pjsip-host-port))
(defcstruct pjsip-transport-key
(type :long)
(rem-addr pj-sockaddr))
(defctype pjsip-transport-key (:struct pjsip-transport-key))
(defcenum pjsip-transport-dir
:pjsip-tp-dir-none
:pjsip-tp-dir-outcoming
:pjsip-tp-dir-incoming)
(defctype pj-timer-id :int)
(defcstruct pj-time-val
(sec :long)
(msec :long))
(defctype pj-time-val (:struct pj-time-val))
(defcstruct pj-timer-entry
(user-data (:pointer :void))
(id :int)
(cb :pointer) ;callbackery
(_timer-id pj-timer-id)
(_timer-value pj-time-val)
(_grp-lock :pointer)) ;dangling
(defctype pj-timer-entry (:struct pj-timer-entry))
(defcunion pj-timestamp
(w pj-uint64) ;lo + hi 32 bit components
(u64 pj-uint64))
(defctype pj-timestamp (:union pj-timestamp))
(defcstruct pjsip-ua-init-param
;; yet another callback stub
(on-dlg-forked :pointer))
(defctype pjsip-ua-init-param (:struct pjsip-ua-init-param))
(defcstruct pjsip-module
(list pj-list)
(name pj-str)
(id :int)
(priority :int)
;;callbackery.. dangling
(load :pointer)
(start :pointer)
(stop :pointer)
(unload :pointer)
(on-rx-request :pointer)
(on-rx-response :pointer)
(on-tx-request :pointer)
(on-tx-response :pointer)
(on-tsx-state :pointer))
(defctype pjsip-module (:struct pjsip-module))
(defcstruct pjsip-inv-callback ;all callbacks are dangling defs..
(on-state-changed :pointer)
(on-new-session :pointer)
(on-tsx-state-changed :pointer)
(on-rx-offer :pointer)
(on-rx-reinvite :pointer)
(on-create-offer :pointer)
(on-media-update :pointer)
(on-send-ack :pointer)
(on-redirected :pointer))
(defctype pjsip-inv-callback (:struct pjsip-inv-callback))
(defcstruct pjmedia-codec-factory
;;pj-list really via c macrology originally
(prev (:pointer :void))
(next (:pointer :void))
(factory-data (:pointer :void))
(op :pointer)) ;dangling
(defctype pjmedia-codec-factory (:struct pjmedia-codec-factory))
(defcenum pjmedia-codec-priority
(:pjmedia-codec-prio-highest 255)
(:pjmedia-codec-prio-next-higher 254)
(:pjmedia-codec-prio-normal 128)
(:pjmedia-codec-prio-lowest 1)
(:pjmedia-codec-prio-disabled 0))
(defcenum pjmedia-type
:pjmedia-type-none
:pjmedia-type-audio
:pjmedia-type-video
:pjmedia-type-application
:pjmedia-type-unknown)
(defcstruct pjmedia-codec-info
(type pjmedia-type)
(pt :uint)
(encoding-name pj-str)
(clock-rate :uint)
(channel-cnt :uint))
(defctype pjmedia-codec-info (:struct pjmedia-codec-info))
(defcstruct pjmedia-codec-desc
(info (:struct pjmedia-codec-info))
(id :char :count #.+pj-max-obj-name+)
(prio pjmedia-codec-priority)
(factory (:pointer (:struct pjmedia-codec-factory)))
(param :pointer)) ;dangling
(defctype pjmedia-codec-desc (:struct pjmedia-codec-desc))
(defcstruct pjmedia-codec-mgr
(pf (:pointer (:struct pj-pool-factory)))
(pool (:pointer (:struct pj-pool)))
(mutex :pointer) ;dangling
(factory-list (:struct pjmedia-codec-factory))
(codec-cnt :uint)
(codec-desc (:struct pjmedia-codec-desc) :count #.+pjmedia-codec-mgr-max-codecs+))
(defctype pjmedia-codec-mgr (:struct pjmedia-codec-mgr))
(defcstruct exit-cb
(list (:struct pj-list))
(func :pointer)) ;dangling
(defctype exit-cb (:struct exit-cb))
(defcstruct pjsip-endpoint
(pool (:pointer (:struct pj-pool)))
(mutex :pointer) ;dangling
(pf (:pointer (:struct pj-pool-factory)))
(name pj-str)
(timer-heap :pointer) ;dangling
(transport-mgr :pointer) ;dangling
(ioqueue :pointer) ;dangling
(ioq-last-err pj-status)
(resolver :pointer) ;dangling
(mod-mutex :pointer) ;dangling
(modules (:pointer (:struct pjsip-module)) :count #.+pjsip-max-module+)
(module-list (:struct pjsip-module))
(cap-hdr (:struct pjsip-hdr))
(req-hdr (:struct pjsip-hdr))
(exit-cb-list (:struct exit-cb)))
(defctype pjsip-endpoint (:struct pjsip-endpoint))
(defcstruct pjsip-transport
(obj-name :char :count #.+pj-max-obj-name+)
(pool (:pointer pj-pool))
(ref-cnt :pointer) ;dangling
(lock :pointer) ;dangling
(tracing pj-bool)
(is-shutdown pj-bool)
(is-destroying pj-bool)
(key pjsip-transport-key)
(type-name (:pointer :char))
(flag :uint)
(info (:pointer :char))
(addr-len :int)
(local-addr pj-sockaddr)
(local-name pjsip-host-port)
(remote-name pjsip-host-port)
(dir pjsip-transport-dir)
(endpt (:pointer pjsip-endpoint))
(tpmgr :pointer) ;dangling
(factory :pointer) ;dangling
(idle-timer pj-timer-entry)
(last-recv-ts pj-timestamp)
(last-recv-len pj-size)
(data (:pointer :void))
(send-msg :pointer)
(do-shutdown :pointer)
(destroy :pointer))
(defctype pjsip-transport (:struct pjsip-transport))
(defcstruct pjmedia-endpt
(pool (:pointer (:struct pj-pool)))
(pf (:pointer (:struct pj-pool-factory)))
(codec-mgr (:struct pjmedia-codec-mgr))
(ioqueue :pointer) ;dangling
(own-ioqueue pj-bool)
(thread-cnt :uint)
(thread :pointer :count #.+max-threads+)
(quit-flag pj-bool)
(has-telephone-event pj-bool)
(exit-cb-list (:struct exit-cb)))
(defctype pjmedia-endpt (:struct pjmedia-endpt))
(defcenum pjmedia-transport-type
:pjmedia-transport-type-udp
:pjmedia-transport-type-ice
:pjmedia-transport-type-srtp
:pjmedia-transport-type-user)
(defcstruct pjmedia-transport-op
;;callbackery
(get-info :pointer)
(attach :pointer)
(detach :pointer)
(send-rtp :pointer)
(send-rtcp :pointer)
(send-rtcp2 :pointer)
(media-create :pointer)
(encode-sdp :pointer)
(media-start :pointer)
(media-stop :pointer)
(simulate-lost :pointer)
(destroy :pointer))
(defctype pjmedia-transport-op (:struct pjmedia-transport-op))
(defcstruct pjmedia-transport
(name :char :count #.+pj-max-obj-name+)
(type pjmedia-transport-type)
(op (:pointer (:struct pjmedia-transport-op)))
(user-data (:pointer :void)))
(defctype pjmedia-transport (:struct pjmedia-transport))
(defctype pj-sock :long)
(defcstruct pjmedia-sock-info
(rtp-sock pj-sock)
(rtp-addr-name (:union pj-sockaddr))
(rtcp-sock pj-sock)
(rtcp-addr-name (:union pj-sockaddr)))
(defctype pjmedia-sock-info (:struct pjmedia-sock-info))
(defcstruct pjmedia-transport-specific-info
(type pjmedia-transport-type)
(cbsize :int)
(buffer :long :count 36)) ;36 * sizeof(long)
(defctype pjmedia-transport-specific-info (:struct pjmedia-transport-specific-info))
(defcstruct pjmedia-transport-info
(sock-info (:struct pjmedia-sock-info))
(src-rtp-name (:union pj-sockaddr))
(src-rtcp-name (:union pj-sockaddr))
(specific-info-cnt :uint)
(spc-info (:struct pjmedia-transport-specific-info) :count 4))
(defctype pjmedia-transport-info (:struct pjmedia-transport-info))
(defctype pjsip-user-agent (:struct pjsip-module))
(defcenum pjsip-dialog-state
:pjsip-dialog-state-null
:pjsip-dialog-state-established)
(defcenum pjsip-uri-context-e
:pjsip-uri-in-req-uri
:pjsip-uri-fromto-hdr
:pjsip-uri-in-contact-hdr
:pjsip-uri-in-routing-hdr
:pjsip-uri-other)
(defcstruct pjsip-uri-vptr
(p-get-scheme :pointer)
(p-get-uri :pointer)
(p-print :pointer)
(p-compare :pointer)
(p-clone :pointer))
(defctype pjsip-uri-vptr (:struct pjsip-uri-vptr))
(defcstruct pjsip-uri
(vptr (:pointer pjsip-uri-vptr)))
(defctype pjsip-uri (:struct pjsip-uri))
(defcenum pjsip-status-code
(:pjsip_sc_trying 100)
(:pjsip_sc_ringing 180)
(:pjsip_sc_call_being_forwarded 181)
(:pjsip_sc_queued 182)
(:pjsip_sc_progress 183)
(:pjsip_sc_ok 200)
(:pjsip_sc_accepted 202)
(:pjsip_sc_multiple_choices 300)
(:pjsip_sc_moved_permanently 301)
(:pjsip_sc_moved_temporarily 302)
(:pjsip_sc_use_proxy 305)
(:pjsip_sc_alternative_service 380)
(:pjsip_sc_bad_request 400)
(:pjsip_sc_unauthorized 401)
(:pjsip_sc_payment_required 402)
(:pjsip_sc_forbidden 403)
(:pjsip_sc_not_found 404)
(:pjsip_sc_method_not_allowed 405)
(:pjsip_sc_not_acceptable 406)
(:pjsip_sc_proxy_authentication_required 407)
(:pjsip_sc_request_timeout 408)
(:pjsip_sc_gone 410)
(:pjsip_sc_request_entity_too_large 413)
(:pjsip_sc_request_uri_too_long 414)
(:pjsip_sc_unsupported_media_type 415)
(:pjsip_sc_unsupported_uri_scheme 416)
(:pjsip_sc_bad_extension 420)
(:pjsip_sc_extension_required 421)
(:pjsip_sc_session_timer_too_small 422)
(:pjsip_sc_interval_too_brief 423)
(:pjsip_sc_temporarily_unavailable 480)
(:pjsip_sc_call_tsx_does_not_exist 481)
(:pjsip_sc_loop_detected 482)
(:pjsip_sc_too_many_hops 483)
(:pjsip_sc_address_incomplete 484)
(:pjsip_ac_ambiguous 485)
(:pjsip_sc_busy_here 486)
(:pjsip_sc_request_terminated 487)
(:pjsip_sc_not_acceptable_here 488)
(:pjsip_sc_bad_event 489)
(:pjsip_sc_request_updated 490)
(:pjsip_sc_request_pending 491)
(:pjsip_sc_undecipherable 493)
(:pjsip_sc_internal_server_error 500)
(:pjsip_sc_not_implemented 501)
(:pjsip_sc_bad_gateway 502)
(:pjsip_sc_service_unavailable 503)
(:pjsip_sc_server_timeout 504)
(:pjsip_sc_version_not_supported 505)
(:pjsip_sc_message_too_large 513)
(:pjsip_sc_precondition_failure 580)
(:pjsip_sc_busy_everywhere 600)
(:pjsip_sc_decline 603)
(:pjsip_sc_does_not_exist_anywhere 604)
(:pjsip_sc_not_acceptable_anywhere 606)
(:pjsip_sc_tsx_timeout 408) ;pjsip_sc_request_timeout
(:pjsip_sc_tsx_transport_error 503) ;pjsip_sc_service_unavailable
(:pjsip_sc__force_32bit #x7fffffff))
(defcstruct pjsip-target
;;pj-list really via c macrology originally
(prev (:pointer :void))
(next (:pointer :void))
(uri (:pointer (:struct pjsip-uri)))
(q1000 :int)
(code pjsip-status-code)
(reason pj-str))
(defctype pjsip-target (:struct pjsip-target))
(defcstruct pjsip-target-set
(head (:struct pjsip-target))
(current (:pointer (:struct pjsip-target))))
(defctype pjsip-target-set (:struct pjsip-target-set))
(defcstruct pjsip-param
;;pj-list really via c macrology originally
(prev (:pointer :void))
(next (:pointer :void))
(name pj-str)
(value pj-str))
(defctype pjsip-param (:struct pjsip-param))
(defcstruct pjsip-fromto-hdr
(hdr pjsip-hdr)
(uri (:pointer (:struct pjsip-uri)))
(tag pj-str)
(other-param (:struct pjsip-param)))
(defctype pjsip-fromto-hdr (:struct pjsip-fromto-hdr))
(defctype pjsip-from-hdr (:struct pjsip-fromto-hdr))
(defctype pjsip-to-hdr (:struct pjsip-fromto-hdr))
(defcstruct pjsip-contact-hdr
(hdr pjsip-hdr)
(star :int)
(uri (:pointer (:struct pjsip-uri)))
(q1000 :int)
(expires pj-int32)
(other-param (:struct pjsip-param)))
(defctype pjsip-contact-hdr (:struct pjsip-contact-hdr))
(defcstruct pjsip-dlg-party
(info (:pointer (:struct pjsip-fromto-hdr)))
(info-str pj-str)
(tag-hval pj-uint32)
(contact (:pointer (:struct pjsip-contact-hdr)))
(first-cseq pj-int32)
(cseq pj-int32))
(defctype pjsip-dlg-party (:struct pjsip-dlg-party))
(defcstruct pjsip-cid-hdr
(hdr pjsip-hdr)
(id pj-str))
(defctype pjsip-cid-hdr (:struct pjsip-cid-hdr))
(defcstruct pjsip-name-addr
(vptr :pointer) ;dangling
(display pj-str)
(uri (:pointer (:struct pjsip-uri))))
(defctype pjsip-name-addr (:struct pjsip-name-addr))
(defcstruct pjsip-routing-hdr
(hdr (:struct pjsip-hdr))
(name-addr (:struct pjsip-name-addr))
(other-param (:struct pjsip-param)))
(defctype pjsip-routing-hdr (:struct pjsip-routing-hdr))
(defctype pjsip-route-hdr (:struct pjsip-routing-hdr))
(defctype pjsip-rr-hdr (:struct pjsip-routing-hdr))
(defcstruct pjsip-common-challenge
(realm pj-str)
(other-param (:struct pjsip-param)))
(defctype pjsip-common-challenge (:struct pjsip-common-challenge))
(defcstruct pjsip-digest-challenge
(realm pj-str)
(other-param (:struct pjsip-param))
(domain pj-str)
(nonce pj-str)
(opaque pj-str)
(stale :int)
(algorithm pj-str)
(qop pj-str))
(defctype pjsip-digest-challenge (:struct pjsip-digest-challenge))
(defcstruct pjsip-pgp-challenge
(realm pj-str)
(other-param (:struct pjsip-param))
(version pj-str)
(micalgorithm pj-str)
(pubalgorithm pj-str)
(nonce pj-str))
(defctype pjsip-pgp-challenge (:struct pjsip-pgp-challenge))
(defcunion u-challenge
(common (:struct pjsip-common-challenge))
(digest (:struct pjsip-digest-challenge))
(pgp (:struct pjsip-pgp-challenge)))
(defcstruct pjsip-www-authenticate-hdr
(decl-stub pjsip-hdr)
(scheme pj-str)
(challenge (:union u-challenge)))
(defctype pjsip-www-authenticate-hdr (:struct pjsip-www-authenticate-hdr))
(defcstruct pjsip-auth-clt-pref
(initial-auth pj-bool)
(algorithm pj-str))
(defctype pjsip-auth-clt-pref (:struct pjsip-auth-clt-pref))
(defcenum pjsip-auth-qop-type
:pjsip-auth-qop-none
:pjsip-auth-qop-auth
:pjsip-auth-qop-auth-int
:pjsip-auth-qop-unknown)
(defcstruct pjsip-cached-auth
(list pj-list)
(pool (:pointer (:struct pj-pool)))
(realm pj-str)
(is-proxy pj-bool)
(qop-value pjsip-auth-qop-type)
(stale-cnt :uint)
(nc pj-uint32) ;PJSIP_AUTH_QOP_SUPPORT = 1
(cnonce pj-str) ;PJSIP_AUTH_QOP_SUPPORT = 1
(last-chal (:pointer (:struct pjsip-www-authenticate-hdr)))
#+nil(cached-hdr (:struct pjsip-cached-auth-hdr)) ;no caching support, as it defaults to none in pjsip, but be careful
)
(defctype pjsip-cached-auth (:struct pjsip-cached-auth))
(defcstruct pjsip-auth-clt-sess
(pool (:pointer (:struct pj-pool)))
(endpt (:pointer (:struct pjsip-endpoint)))
(pref (:struct pjsip-auth-clt-pref))
(cred-cnt :uint)
(cred-info :pointer)
(cached-auth (:struct pjsip-cached-auth)))
(defctype pjsip-auth-clt-sess (:struct pjsip-auth-clt-sess))
(defcenum pjsip-role-e
(:pjsip-role-uac 0)
:pjsip-role-uas
;;aliases to above
(:pjsip-uac-role 0)
:pjsip-uas-role)
(defcenum pjsip-tpselector-type
:pjsip-tpselector-none
:pjsip-tpselector-transport
:pjsip-tpselector-listener)
(defcunion selector-u
(transport (:pointer pjsip-transport))
(listener :pointer)
(ptr (:pointer :void)))
(defcstruct pjsip-tpselector
(type pjsip-tpselector-type)
(u (:union selector-u)))
(defctype pjsip-tpselector (:struct pjsip-tpselector))
(defcstruct pjsip-dialog
;;pj-list really via c macrology originally
(prev (:pointer :void))
(next (:pointer :void))
(obj-name :char :count #.+pj-max-obj-name+)
(pool (:pointer (:struct pj-pool)))
(mutex :pointer) ;dangling
(ua (:pointer pjsip-user-agent))
(endpt (:pointer (:struct pjsip-endpoint)))
(dlg-set (:pointer :void))
(state pjsip-dialog-state)
(target (:pointer (:struct pjsip-uri)))
(target-set (:struct pjsip-target-set))
(inv-hdr (:struct pjsip-hdr))
(local (:struct pjsip-dlg-party))
(remote (:struct pjsip-dlg-party))
(rem-cap-hdr (:struct pjsip-hdr))
(role pjsip-role-e)
(uac-has-2xx pj-bool)
(secure pj-bool)
(add-allow pj-bool)
(call-cid (:pointer pjsip-cid-hdr))
(route-set pjsip-route-hdr)
(route-set-frozen pj-bool)
(auth-sess (:struct pjsip-auth-clt-sess))
(sess-count :int)
(tsx-count :int)
(tpsel (:struct pjsip-tpselector))
(usage-cnt :uint)
(usage (:pointer (:struct pjsip-module)) :count #.+pjsip-max-module+)
(mod-data (:pointer :void) :count #.+pjsip-max-module+)
(via-addr (:struct pjsip-host-port))
(via-tp (:pointer :void)))
(defctype pjsip-dialog (:struct pjsip-dialog))
(defcstruct pjmedia-sock-info
(rtp-sock pj-sock)
(rtp-addr-name (:union pj-sockaddr))
(rtcp-sock pj-sock)
(rtcp-addr-name (:union pj-sockaddr)))
(defctype pjmedia-sock-info (:struct pjmedia-sock-info))
(defcstruct sdp-session-origin
(user pj-str)
(id pj-uint32)
(version pj-uint32)
(net-type pj-str)
(addr-type pj-str)
(addr pj-str))
(defcstruct sdp-session-time
(start pj-uint32)
(stop pj-uint32))
(defcstruct pjmedia-sdp-session
(origin (:struct sdp-session-origin))
(name pj-str)
(conn :pointer) ;dangling pjmedia_sdp_conn def
(bandw-count :uint)
(bandw :pointer :count 4) ;dangling def
(time (:struct sdp-session-time))
(attr-count :uint)
(attr :pointer :count 68) ;dangling, 32*2 + 4
(media-count :uint)
(media :pointer :count 16)) ;dangling
(defctype pjmedia-sdp-session (:struct pjmedia-sdp-session))
(defcenum pjsip-inv-state
:pjsip-inv-state-null
:pjsip-inv-state-calling
:pjsip-inv-state-incoming
:pjsip-inv-state-early
:pjsip-inv-state-connecting
:pjsip-inv-state-confirmed
:pjsip-inv-state-disconnected)
(defcstruct (pjsip-inv-session :conc-name inv-session-)
(obj-name :char :count #.+pj-max-obj-name+)
(pool (:pointer (:struct pj-pool)))
(pool-prov (:pointer (:struct pj-pool)))
(pool-active (:pointer (:struct pj-pool)))
(state pjsip-inv-state)
(cancelling pj-bool)
(pending-cancel pj-bool)
(pending-bye :pointer) ;dangling def
(cause pjsip-status-code)
(cause-next pj-str)
(notify pj-bool)
(cb-called :uint)
(dlg (:pointer (:struct pjsip-dialog)))
(role pjsip-role-e)
(options :uint)
(neg :pointer) ;dangling
(sdp-neg-flags :uint)
(invite-tsx :pointer) ;dangling
(invite-req :pointer) ;dangling
(last-answer :pointer) ;dangling
(last-ack :pointer) ;dangling
(last-ack-cseq pj-int32)
(mod-data (:pointer :void) :count #.+pjsip-max-module+)
(timer :pointer) ;dangling
(following-fork pj-bool)
(ref-cnt :pointer);dangling
)
(defctype pjsip-inv-session (:struct pjsip-inv-session))
(defcstruct pj-ioqueue-op-key
(internal (:pointer :void) :count 32)
(activesock-data (:pointer :void))
(user-data (:pointer :void)))
(defctype pj-ioqueue-op-key (:struct pj-ioqueue-op-key))
(defcstruct pjsip-rx-data-op-key
(op-key (:struct pj-ioqueue-op-key))
(rdata :pointer)) ;;fwd decl to -rx-data
(defctype pjsip-rx-data-op-key (:struct pjsip-rx-data-op-key))
(defcstruct rx-data-tp-info
(pool (:pointer (:struct pj-pool)))
(transport (:pointer (:struct pjsip-transport)))
(tp-data (:pointer :void))
(op-key (:struct pjsip-rx-data-op-key)))
(defctype rx-data-tp-info (:struct rx-data-tp-info))
(defcstruct rx-data-pkt-info
(timestamp (:struct pj-time-val))
(packet :char :count #.+pjsip-max-pkt-len+)
(zero pj-uint32)
(len size)
(src-addr (:union pj-sockaddr))
(src-addr-len :int)
(src-name :char :count #.+pj-inet6-addrstrlen+)
(src-port :int))
(defctype rx-data-pkt-info (:struct rx-data-pkt-info))
(defcstruct pjsip-media-type
(type pj-str)
(subtype pj-str)
(param (:struct pjsip-param)))
(defctype pjsip-media-type (:struct pjsip-media-type))
(defcstruct pjsip-msg-body
(content-type (:struct pjsip-media-type))
(data (:pointer :void))
(len :uint)
(print-body :pointer) ;dangling callback
(clone-data :pointer)) ;dangling callback
(defctype pjsip-msg-body (:struct pjsip-msg-body))
(defcenum pjsip-msg-type-e
:pjsip-request-msg
:pjsip-response-msg)
(defcenum pjsip-method-e
:pjsip-invite-method
:pjsip-cancel-method
:pjsip-ack-method
:pjsip-bye-method
:pjsip-register-method
:pjsip-options-method
:pjsip-other-method)
(defcstruct pjsip-method
(id pjsip-method-e)
(name pj-str))
(defctype pjsip-method (:struct pjsip-method))
(defcstruct pjsip-request-line
(method (:struct pjsip-method))
(uri (:pointer (:struct pjsip-uri))))
(defctype pjsip-request-line (:struct pjsip-request-line))
(defcstruct pjsip-status-line
(code :int)
(reason pj-str))
(defctype pjsip-status-line (:struct pjsip-status-line))
(defcunion msg-line
(req (:struct pjsip-request-line))
(status (:struct pjsip-status-line)))
(defcstruct pjsip-msg
(type pjsip-msg-type-e)
(line (:union msg-line))
(hdr (:struct pjsip-hdr))
(body (:pointer (:struct pjsip-msg-body))))
(defctype pjsip-msg (:struct pjsip-msg))
(defcstruct pjsip-generic-int-hdr
(hdr (:struct pjsip-hdr))
(ivalue pj-int32))
(defctype pjsip-generic-int-hdr (:struct pjsip-generic-int-hdr))
(defctype pjsip-max-fwd-hdr (:struct pjsip-generic-int-hdr))
(defcstruct pjsip-via-hdr
(hdr (:struct pjsip-hdr))
(transport pj-str)
(sent-by (:struct pjsip-host-port))
(ttl-param :int)
(rport-param :int)
(maddr-param pj-str)
(recvd-param pj-str)
(branch-param pj-str)
(other-param (:struct pjsip-param))
(comment pj-str))
(defcstruct pjsip-cseq-hdr
(hdr (:struct pjsip-hdr))
(cseq pj-int32)
(method (:struct pjsip-method)))
(defcstruct pjsip-ctype-hdr
(hdr (:struct pjsip-hdr))
(media (:struct pjsip-media-type)))
(defcstruct pjsip-clen-hdr
(hdr (:struct pjsip-hdr))
(len :int))
(defctype pjsip-ctype-hdr (:struct pjsip-ctype-hdr))
(defctype pjsip-clen-hdr (:struct pjsip-clen-hdr))
(defctype pjsip-via-hdr (:struct pjsip-via-hdr))
(defctype pjsip-cseq-hdr (:struct pjsip-cseq-hdr))
(defcstruct pjsip-generic-array-hdr
(hdr (:struct pjsip-hdr))
(count :uint)
(values pj-str :count #.+pjsip-generic-array-max-count+))
(defctype pjsip-generic-array-hdr (:struct pjsip-generic-array-hdr))
(defctype pjsip-require-hdr (:struct pjsip-generic-array-hdr))
(defctype pjsip-supported-hdr (:struct pjsip-generic-array-hdr))
(defcstruct pjsip-parser-err-report
(list (:struct pj-list))
(except-code :int)
(line :int)
(col :int)
(hname pj-str))
(defctype pjsip-parser-err-report (:struct pjsip-parser-err-report))
(defcstruct rx-data-msg-info
(msg-buf (:pointer :char))
(len :int)
(msg (:pointer (:struct pjsip-msg)))
(info (:pointer :char))
(cid (:pointer pjsip-cid-hdr))
(from (:pointer pjsip-from-hdr))
(to (:pointer pjsip-to-hdr))
(via (:pointer pjsip-via-hdr))
(cseq (:pointer pjsip-cseq-hdr))
(max-fwd (:pointer pjsip-max-fwd-hdr))
(route (:pointer pjsip-route-hdr))
(record-route (:pointer pjsip-rr-hdr))
(ctype (:pointer pjsip-ctype-hdr))
(clen (:pointer pjsip-clen-hdr))
(require (:pointer pjsip-require-hdr))
(supported (:pointer pjsip-supported-hdr))
(parse-err (:struct pjsip-parser-err-report)))
(defctype rx-data-msg-info (:struct rx-data-msg-info))
(defcstruct rx-data-endpt-info
(mod-data (:pointer :void) :count #.+pjsip-max-module+))
(defctype rx-data-endpt-info (:struct rx-data-endpt-info))
(defcstruct (pjsip-rx-data :conc-name pjsip-rx-data-)
(tp-info (:struct rx-data-tp-info))
(pkt-info (:struct rx-data-pkt-info))
(msg-info (:struct rx-data-msg-info))
(endpt-info (:struct rx-data-endpt-info)))
(defctype pjsip-rx-data (:struct pjsip-rx-data))
(defcstruct pjmedia-stream
;;ugly stub for messy struct with bunch of IFDEFs
(pad :char :count 8192))
(defctype pjmedia-stream (:struct pjmedia-stream))
(defcenum pjmedia-tp-proto
:pjmedia-tp-proto-none
:pjmedia-tp-proto-rtp-avp
:pjmedia-tp-proto-rtp-savp
:pjmedia-tp-proto-unknown)
(defcenum pjmedia-dir
:pjmedia-dir-none
(:pjmedia-dir-encoding 1)
(:pjmedia-dir-capture 1)
(:pjmedia-dir-decoding 2)
(:pjmedia-dir-playback 2)
(:pjmedia-dir-render 2)
(:pjmedia-dir-encoding-decoding 3)
(:pjmedia-dir-capture-playback 3)
(:pjmedia-dir-capture-render 3))
(defcstruct pjmedia-stream-info
(type pjmedia-type)
(proto pjmedia-tp-proto)
(dir pjmedia-dir)
(rem-addr pj-sockaddr)
(rem-rtcp pj-sockaddr)
(fmt pjmedia-codec-info)
(param :pointer) ;dangling
(tx-pt :uint)
(rx-pt :uint)
(tx-maxptime :uint)
(tx-event-pt :int)
(rx-event-pt :int)
(ssrc pj-uint32)
(rtp-ts pj-uint32)
(rtp-seq pj-uint16)
(rtp-seq-ts-set :uint8)
(jb-init :int)
(jb-min-pre :int)
(jb-max-pre :int)
(jb-max :int)
(rtcp-sdes-bye-disabled pj-bool))
(defctype pjmedia-stream-info (:struct pjmedia-stream-info))
(defcenum pjmedia-sdp-neg-state
:pjmedia-sdp-neg-state-null
:pjmedia-sdp-neg-state-local-offer
:pjmedia-sdp-neg-state-remote-offer
:pjmedia-sdp-neg-state-wait-nego
:pjmedia-sdp-neg-state-done)
(defcstruct pjmedia-sdp-neg
(state pjmedia-sdp-neg-state)
(prefer-remote-codec-order pj-bool)
(answer-with-multiple-codecs pj-bool)
(has-remote-answer pj-bool)
(answer-was-remote pj-bool)
(initial-sdp (:pointer (:struct pjmedia-sdp-session)))
(initial-sdp-tmp (:pointer (:struct pjmedia-sdp-session)))
(active-local-sdp (:pointer (:struct pjmedia-sdp-session)))
(active-remote-sdp (:pointer (:struct pjmedia-sdp-session)))
(neg-local-sdp (:pointer (:struct pjmedia-sdp-session)))
(neg-remote-sdp (:pointer (:struct pjmedia-sdp-session))))
(defctype pjmedia-sdp-neg (:struct pjmedia-sdp-neg))
(defcenum pjmedia-format-detail-type
:pjmedia-format-detail-none
:pjmedia-format-detail-audio
:pjmedia-format-detail-video
:pjmedia-format-detail-max)
(defcstruct pjmedia-audio-format-detail
(clock-rate :uint)
(channel-count :uint)
(frame-time-usec :uint)
(bits-per-sample :uint)
(avg-bps pj-uint32)
(max-bps pj-uint32))
(defctype pjmedia-audio-format-detail (:struct pjmedia-audio-format-detail))
(defcstruct pjmedia-rect-size
(w :uint)
(h :uint))
(defctype pjmedia-rect-size (:struct pjmedia-rect-size))
(defcstruct pjmedia-ratio
(num :int)
(denum :int))
(defctype pjmedia-ratio (:struct pjmedia-ratio))
(defcenum pjmedia-vid-stream-rc-method
(pjmedia-vid-stream-rc-none 0)
(pjmedia-vid-stream-rc-simple-blocking 1))
(defcstruct pjmedia-vid-stream-rc-config
(method pjmedia-vid-stream-rc-method)
(bandwidth :uint))
(defctype pjmedia-vid-stream-rc-config (:struct pjmedia-vid-stream-rc-config))
(defcstruct pjmedia-video-format-detail
(size (:struct pjmedia-rect-size))
(fps (:struct pjmedia-ratio))
(avg-bps pj-uint32)
(max-bps pj-uint32))
(defctype pjmedia-vid-dev-index pj-int32)
(defctype pjmedia-video-format-detail (:struct pjmedia-video-format-detail))
(defcunion format-det
(aud (:struct pjmedia-audio-format-detail))
(vid (:struct pjmedia-video-format-detail))
(user :char :count #.+pjmedia-format-detail-user-size+))
(defcstruct pjmedia-format
(id pj-uint32)
(type pjmedia-type)
(detail-type pjmedia-format-detail-type)
(det (:union format-det)))
(defctype pjmedia-format (:struct pjmedia-format))
(defcstruct pjmedia-port-info
(name pj-str)
(signature pj-uint32)
(dir pjmedia-dir)
(fmt (:struct pjmedia-format)))
(defctype pjmedia-port-info (:struct pjmedia-port-info))
(defcstruct port-port-data
(pdata (:pointer :void))
(ldata :long))
(defctype port-port-data (:struct port-port-data))
(defcstruct pjmedia-port
(info (:struct pjmedia-port-info))
(port-data (:struct port-port-data))
;;callbackery
(get-clock-src :pointer)
(put-frame :pointer)
(get-frame :pointer)
(on-destroy :pointer))
(defctype pjmedia-port (:struct pjmedia-port))
(defcstruct pjsip-tx-data-op-key
(op-key (:struct pj-ioqueue-op-key))
(tdata :pointer) ;;fwd decl to -tx-data
(token (:pointer :void))
(callback :pointer)) ;dangling callbackery
(defctype pjsip-tx-data-op-key (:struct pjsip-tx-data-op-key))
(defcstruct pjsip-buffer
(start (:pointer :char))
(cur (:pointer :char))
(end (:pointer :char)))
(defctype pjsip-buffer (:struct pjsip-buffer))
(defcenum pjsip-transport-type-e
:pjsip-transport-unspecified
:pjsip-transport-udp
:pjsip-transport-tcp
:pjsip-transport-tls
:pjsip-transport-sctp
:pjsip-transport-loop
:pjsip-transport-loop-dgram
:pjsip-transport-start-other
(:pjsip-transport-ipv6 128)
:pjsip-transport-udp6
:pjsip-transport-tcp6
:pjsip-transport-tls6)
(defcstruct server-addresses-entry
(type pjsip-transport-type-e)
(priority :uint)
(weight :uint)
(addr (:union pj-sockaddr))
(addr-len :int))
(defcstruct pjsip-server-addresses
(count :uint)
(entry (:struct server-addresses-entry) :count #.+pjsip-max-resolved-addresses+))
(defctype pjsip-server-addresses (:struct pjsip-server-addresses))
(defcstruct tx-data-dest-info
(name pj-str)
(addr (:struct pjsip-server-addresses))
(cur-addr :uint))
(defcstruct tx-data-tp-info
(transport (:pointer (:struct pjsip-transport)))
(dst-addr (:union pj-sockaddr))
(dst-addr-len :int)
(dst-name :char :count #.+pj-inet6-addrstrlen+)
(dst-port :int))
(defcstruct (pjsip-tx-data :conc-name pjsip-tx-data-)
(list (:struct pj-list))
(pool (:pointer (:struct pj-pool)))
(obj-name :char :count #.+pj-max-obj-name+)
(info :string)
(rx-timestamp (:struct pj-time-val))
(mgr :pointer) ; dangling transport manager
(op-key (:struct pjsip-tx-data-op-key))
(lock :pointer) ;dangling lock object
(msg (:pointer (:struct pjsip-msg)))
(saved-strict-route (:pointer pjsip-route-hdr))
(buf (:struct pjsip-buffer))
(ref-cnt :pointer) ;dangling atomic
(is-pending :int)
(token (:pointer :void))
(cb :pointer) ;callbackery
(dest-info (:struct tx-data-dest-info))
(tp-info (:struct tx-data-tp-info))
(tp-sel (:struct pjsip-tpselector))
(auth-retry pj-bool)
(mod-data (:pointer :void) :count #.+pjsip-max-module+)
(via-addr (:struct pjsip-host-port))
(via-tp (:pointer :void)))
(defctype pjsip-tx-data (:struct pjsip-tx-data))
(defctype pjsip-user-agent (:struct pjsip-module))
(defcenum pjsip-event-id-e
:pjsip-event-unknown
:pjsip-event-timer
:pjsip-event-tx-msg
:pjsip-event-rx-msg
:pjsip-event-transport-error
:pjsip-event-tsx-state
:pjsip-event-user)
(defcstruct tsx-body-timer
(entry (:pointer pj-timer-entry)))
(defcunion tsx-body-tsx-state-src
(rdata (:pointer pjsip-rx-data))
(tdata (:pointer pjsip-tx-data))
(timer (:pointer pj-timer-entry))
(status pj-status)
(data (:pointer :void)))
(defcstruct tsx-body-tsx-state
(src (:union tsx-body-tsx-state-src))
(tsx :pointer) ;dangling
(prev-state :int)
(type pjsip-event-id-e))
(defcstruct tsx-body-tx-msg
(tdata (:pointer pjsip-tx-data)))
(defcstruct tsx-body-tx-error
(tdata (:pointer pjsip-tx-data))
(tsx :pointer)) ;transaction
(defcstruct tsx-body-rx-msg
(rdata (:pointer pjsip-rx-data)))
(defcstruct tsx-body-user
(user1 (:pointer :void))
(user2 (:pointer :void))
(user3 (:pointer :void))
(user4 (:pointer :void)))
(defcunion event-tsx-body
(timer (:struct tsx-body-timer))
(tsx-state (:struct tsx-body-tsx-state))
(tx-msg (:struct tsx-body-tx-msg))
(tx-error (:struct tsx-body-tx-error))
(rx-msg (:struct tsx-body-rx-msg))
(user (:struct tsx-body-user)))
(defcstruct pjsip-event
(list pj-list)
(type pjsip-event-id-e)
(body (:union event-tsx-body)))
(defctype pjsip-event (:struct pjsip-event))
(defcenum pjsip-ssl-method
(:pjsip-ssl-unspecified-method 0)
(:pjsip-sslv2-method 20)
(:pjsip-sslv3-method 30)
(:pjsip-tlsv1-method 31)
(:pjsip-tlsv1-1-method 32)
(:pjsip-tlsv1-2-method 33)
(:pjsip-sslv23-method 23))
(defcenum pj-qos-type
:pj-qos-type-best-effort
:pj-qos-type-background
:pj-qos-type-video
:pj-qos-type-voice
:pj-qos-type-control)
(defcenum pj-qos-wmm-prio
:pj-qos-wmm-prio-bulk-effort
:pj-qos-wmm-prio-bulk
:pj-qos-wmm-prio-video
:pj-qos-wmm-prio-voice)
(defcstruct pj-qos-params
(flags :uint8)
(dscp-val :uint8)
(so-prio :uint8)
(wmm-proio pj-qos-wmm-prio))
(defctype pj-qos-params (:struct pj-qos-params))
(defcstruct sockopt-params-options
(level :int)
(optname :int)
(optval (:pointer :void))
(optlen :int))
(defcstruct pj-sockopt-params
(cnt :uint)
(options (:struct sockopt-params-options) :count #.+pj-max-sockopt-params+))
(defctype pj-sockopt-params (:struct pj-sockopt-params))
(defcstruct pjsip-tls-setting
(ca-list-file pj-str)
(ca-list-path pj-str)
(cert-file pj-str)
(privkey-file pj-str)
(password pj-str)
(method pjsip-ssl-method)
(proto pj-uint32)
(ciphers-num :uint)
(ciphers :pointer) ;dangling
(verify-server pj-bool)
(verify-client pj-bool)
(require-client-cert pj-bool)
(timeout pj-time-val)
(reuse-addr pj-bool)
(qos-type pj-qos-type)
(params pj-qos-params)
(qos-ignore-error pj-bool)
(sockopt-params pj-sockopt-params)
(sockopt-ignore-error pj-bool))
(defctype pjsip-tls-setting (:struct pjsip-tls-setting))
(defcstruct pjsip-publishc-opt
(queue-request pj-bool))
(defcenum pj-turn-tp-type
(:pj-turn-tp-udp 17)
(:pj-turn-tp-tcp 6)
(:pj-turn-tp-tls 255))
(defcenum pj-stun-auth-cred-type
:pj-stun-auth-cred-static
:pj-stun-auth-cred-dynamic)
(defcenum pj-stun-passwd-type
:pj-stun-passwd-plain
(:pj-stun-passwd-hashed 1))
(defcstruct stun-auth-cred-data-static-cred
(realm pj-str)
(username pj-str)
(data-type pj-stun-passwd-type)
(data pj-str)
(nonce pj-str))
(defcstruct stun-auth-cred-data-dyn-cred
(user-data (:pointer :void))
(get-auth :pointer)
(get-cred :pointer)
(get-password :pointer)
(verify-nonce :pointer))
(defcunion stun-auth-cred-data
(static-cred (:struct stun-auth-cred-data-static-cred))
(dyn-cred (:struct stun-auth-cred-data-dyn-cred)))
(defcstruct pj-stun-auth-cred
(type pj-stun-auth-cred-type)
(data (:union stun-auth-cred-data)))
(defctype pj-stun-auth-cred (:struct pj-stun-auth-cred))
(defcstruct pjmedia-vid-stream-sk-config
(count :uint)
(interval :uint))
(defctype pjmedia-vid-stream-sk-config (:struct pjmedia-vid-stream-sk-config))
(defcvar "PJ_AF_INET" pj-uint16)
(defcfun "pj_str" (:pointer pj-str) (str :string))
(defcfun "pj_strcpy2" (:pointer pj-str) (pstr (:pointer pj-str)) (cstr :string))
(defcfun "pj_strdup2" (:pointer pj-str) (pool (:pointer pj-pool)) (pstr (:pointer pj-str)) (cstr :string))
(defcfun "pj_init" pj-status)
(defcfun "pj_log_set_level" :void (log-level :int))
(defcfun "pj_log_set_log_func" :void (func :pointer))
(defcfun "pj_log" :void (sender :string) (level :int) (format :string)) ;silently dropping va_list
(defcfun "pj_log_pop_indent" :void)
(defcfun "pjlib_util_init" pj-status)
(defcvar "pj_pool_factory_default_policy" pj-pool-factory-policy)
(defcfun "pj_pool_factory_get_default_policy" (:pointer pj-pool-factory-policy))
(defcfun "pj_caching_pool_init" :void (cp (:pointer pj-caching-pool))
(factory-default-policy (:pointer pj-pool-factory-policy)) (max-capacity size))
(defcfun "pjsip_endpt_create" pj-status (factory (:pointer pj-pool-factory)) (endpt-name :string)
(endpoint (:pointer pjsip-endpoint)))
(defcfun "pj_sockaddr_init" :void (family :int) (addr (:pointer pj-sockaddr)) (cp :pointer) (port :uint))
(defcfun "pjsip_udp_transport_start" pj-status (endpoint (:pointer pjsip-endpoint))
(local-addr (:pointer pj-sockaddr-in))
(hostport (:pointer pjsip-host-port))
(async-cnt :uint) (p_transport (:pointer (:pointer pjsip-transport))))
(defcfun "pjsip_udp_transport_start6" pj-status (endpoint (:pointer pjsip-endpoint))
(local-addr (:pointer pj-sockaddr-in6))
(hostport (:pointer pjsip-host-port))
(async-cnt :uint) (p_transport (:pointer (:pointer pjsip-transport))))
(defcfun "pjsip_tsx_layer_init_module" pj-status (endpoint (:pointer pjsip-endpoint)))
(defcfun "pjsip_ua_init_module" pj-status (endpoint (:pointer pjsip-endpoint))
(prm (:pointer pjsip-ua-init-param)))
(defcfun "pjsip_inv_create_uac" pj-status (dlg (:pointer pjsip-dialog)) (local-sdp (:pointer pjmedia-sdp-session))
(options :uint) (p-inv (:pointer (:pointer pjsip-inv-session))))
(defcfun "pjsip_inv_usage_init" pj-status (endpoint (:pointer pjsip-endpoint)) (cb (:pointer pjsip-inv-callback)))
(defcfun "pjsip_inv_invite" pj-status (inv (:pointer pjsip-inv-session)) (p-tdata :pointer (:pointer)))
(defcfun "pjsip_inv_send_msg" pj-status (inv (:pointer pjsip-inv-session)) (tdata :pointer))
(defcfun "pjsip_100rel_init_module" pj-status (endpoint (:pointer pjsip-endpoint)))
(defcfun "pjsip_endpt_register_module" pj-status (endpoint (:pointer pjsip-endpoint))
(module (:pointer pjsip-module)))
(defcfun "pjsip_endpt_handle_events" pj-status (endpt (:pointer pjsip-endpoint)) (max-timeout (:pointer pj-time-val)))
(defcfun "pjsip_endpt_respond_stateless" pj-status (endpt (:pointer pjsip-endpoint)) (rdata (:pointer pjsip-rx-data))
(st-code :int) (st-text (:pointer pj-str)) (hdr-list (:pointer pjsip-hdr)) (body (:pointer pjsip-msg-body)))
(defcfun "pjsip_endpt_get_ioqueue" :pointer (endpt (:pointer pjsip-endpoint)))
(defcfun "pjmedia_codec_g711_init" pj-status (endpoint (:pointer pjmedia-endpt)))
(defcfun "pjmedia_transport_udp_create3" pj-status (endpoint (:pointer pjmedia-endpt)) (af :int) (name :string) (addr (:pointer pj-str))
(port :int) (options :uint) (p-tp (:pointer (:pointer pjmedia-transport))))
(defcfun "pjsip_dlg_create_uac" pj-status (ua (:pointer pjsip-user-agent)) (local-uri (:pointer pj-str))
(local-contact (:pointer pj-str)) (remote-uri (:pointer pj-str)) (target (:pointer pj-str))
(p-dlg (:pointer (:pointer pjsip-dialog))))
(defcfun "pjmedia_endpt_create_sdp" pj-status (endpoint (:pointer pjmedia-endpt)) (pool (:pointer pj-pool))
(stream-cnt :uint) (sock-info (:pointer pjmedia-sock-info)) (p-sdp (:pointer (:pointer pjmedia-sdp-session))))
(defcfun "pjmedia_sdp_neg_get_active_local" pj-status (neg (:pointer pjmedia-sdp-neg))
(local (:pointer (:pointer pjmedia-sdp-session))))
(defcfun "pjmedia_sdp_neg_get_active_remote" pj-status (neg (:pointer pjmedia-sdp-neg))
(remote (:pointer (:pointer pjmedia-sdp-session))))
(defcfun "pjmedia_stream_info_from_sdp" pj-status (info (:pointer pjmedia-stream-info)) (pool (:pointer pj-pool))
(endpt (:pointer pjmedia-endpt)) (local (:pointer pjmedia-sdp-session))
(remote (:pointer pjmedia-sdp-session)) (stream-idx :uint))
(defcfun "pjmedia_stream_create" pj-status (endpt (:pointer pjmedia-endpt)) (pool (:pointer pj-pool))
(info (:pointer pjmedia-stream-info)) (tp (:pointer pjmedia-transport))
(user-data (:pointer :void)) (p-stream (:pointer (:pointer pjmedia-stream))))
(defcfun "pjmedia_stream_start" pj-status (stream (:pointer pjmedia-stream)))
(defcfun "pjmedia_stream_destroy" pj-status (stream (:pointer pjmedia-stream)))
(defcfun "pjmedia_stream_get_port" pj-status (stream (:pointer pjmedia-stream)) (p-port (:pointer (:pointer pjmedia-port))))
(defcfun "pjsip_endpt_destroy" pj-status (endpt (:pointer pjsip-endpoint)))
(defcfun "pj_pool_release" :void (pool (:pointer pj-pool)))
(defcfun "pjsip_get_status_text" (:pointer pj-str) (code :int))
(defcfun "pjsip_inv_state_name" :string (state pjsip-inv-state))
(defcfun "pjsip_inv_verify_request" pj-status (rdata (:pointer pjsip-rx-data)) (options (:pointer :uint))
(l-sdp (:pointer pjmedia-sdp-session)) (dlg (:pointer pjsip-dialog))
(endpt (:pointer pjsip-endpoint)) (p-tdata (:pointer (:pointer pjsip-tx-data))))
(defcfun "pjsip_dlg_create_uas_and_inc_lock" pj-status (ua (:pointer pjsip-user-agent)) (rdata (:pointer pjsip-rx-data))
(contact (:pointer pj-str)) (p-dlg (:pointer (:pointer pjsip-dialog))))
(defcfun "pjsip_dlg_inc_lock" :void (dlg (:pointer pjsip-dialog)))
(defcfun "pjsip_dlg_try_inc_lock" pj-status (dlg (:pointer pjsip-dialog)))
(defcfun "pjsip_dlg_dec_lock" :void (dlg (:pointer pjsip-dialog)))
(defcfun "pjsip_inv_create_uas" pj-status (dlg (:pointer pjsip-dialog)) (rdata (:pointer pjsip-rx-data))
(local-sdp (:pointer pjmedia-sdp-session)) (options :uint) (p-inv (:pointer (:pointer pjsip-inv-session))))
(defcfun "pjsip_inv_initial_answer" pj-status (inv (:pointer pjsip-inv-session)) (rdata (:pointer pjsip-rx-data))
(st-code :int) (st-text (:pointer pj-str)) (sdp (:pointer pjmedia-sdp-session))
(p-session (:pointer (:pointer pjmedia-sdp-session))))
(defcfun "pjsip_inv_answer" pj-status (inv (:pointer pjsip-inv-session)) (st-code :int) (st-text (:pointer pj-str))
(local-sdp (:pointer pjmedia-sdp-session)) (p-session (:pointer (:pointer pjmedia-sdp-session))))
(defcfun "pj_gethostip" pj-status (af :int) (addr (:pointer pj-sockaddr)))
(defcfun "pj_sockaddr_print" :string (addr (:pointer pj-sockaddr)) (buf :string) (size :int) (flags :uint))
(defcfun "pjsip_ua_instance" (:pointer pjsip-user-agent))
(defcfun "pjsip_tpmgr_destroy" pj-status (mgr :pointer))
(defcfun "pjmedia_endpt_create2" pj-status (pf (:pointer pj-pool-factory)) (ioqueue :pointer) (worker-cnt :uint)
(p-endpt (:pointer (:pointer pjmedia-endpt))))
(defcfun "pjmedia_endpt_destroy2" pj-status (endpt (:pointer pjmedia-endpt)))
(defcfun "bzero" :void (s (:pointer :void)) (n size))
(defcfun "pjsip_rx_data_get_info" (:pointer :char) (rdata (:pointer pjsip-rx-data)))
(defcfun "pjsip_tx_data_get_info" (:pointer :char) (tdata (:pointer pjsip-tx-data)))
(defcfun "pjsip_rdata_get_dlg" (:pointer pjsip-dialog) (rdata (:pointer pjsip-rx-data)))
;;; Implementing these as PJSIP guys made them inlined in C..
(defun pjmedia-endpt-create (pf ioqueue worker-cnt p-endpt)
(if (pj-success (pjmedia-aud-subsys-init pf))
(if (pj-success (pjmedia-endpt-create2 pf ioqueue worker-cnt p-endpt))
+pj-success+
(progn (pjmedia-aud-subsys-shutdown) 1))
1))
(defun pjmedia-endpt-destroy (endpt)
(prog1 (pjmedia-endpt-destroy2 endpt)
(pjmedia-aud-subsys-shutdown)))
(defun pjmedia-transport-info-init (info)
;; we comment bzero out altogher until we find what's going on
(bzero info (foreign-type-size 'pjmedia-transport-info))
(setf (foreign-slot-value (foreign-slot-pointer info 'pjmedia-transport-info 'sock-info) 'pjmedia-sock-info 'rtp-sock) +pj-invalid-socket+
(foreign-slot-value (foreign-slot-pointer info 'pjmedia-transport-info 'sock-info) 'pjmedia-sock-info 'rtcp-sock) +pj-invalid-socket+))
(defun pjmedia-transport-get-info (tp info)
(if (and (not (null-pointer-p tp))
(not (null-pointer-p (foreign-slot-value tp 'pjmedia-transport 'op)))
(not (null-pointer-p (foreign-slot-value (foreign-slot-value tp 'pjmedia-transport 'op) 'pjmedia-transport-op 'get-info))))
(foreign-funcall-pointer (foreign-slot-value (foreign-slot-value tp 'pjmedia-transport 'op) 'pjmedia-transport-op 'get-info) ()
:pointer tp :pointer info
pj-status)
+pj-enotsup+))
(defun pjmedia-transport-close (tp)
(if (not (null-pointer-p (foreign-slot-value (foreign-slot-value tp 'pjmedia-transport 'op)
'pjmedia-transport-op 'destroy)))
(foreign-funcall-pointer (foreign-slot-value (foreign-slot-value tp 'pjmedia-transport 'op) 'pjmedia-transport-op 'destroy) ()
:pointer tp pj-status)
+pj-success+))
(defun pj-cstr (pjstring string)
(with-foreign-slots ((ptr slen) pjstring pj-str)
(setf slen (length string))
(setf ptr (foreign-string-alloc string))
pjstring))
(defcallback logger :void ((level :int) (data :string) (len :int))
(declare (ignorable len level))
(format t "~A" data))
(defun ua-log (string)
(pj-log "cl-pjsip-ua.lisp" 1 string)
(finish-output))
(defun deref (var)
(mem-ref var :pointer))
(defun pjsip-uri-print (context uri)
(with-foreign-object (buffer :char 256)
(foreign-funcall-pointer (foreign-slot-value uri 'pjsip-uri-vptr 'cl-pjsip::p-print) ()
pjsip-uri-context-e context :pointer uri (:pointer :char) buffer :int 256 :int)
(foreign-string-to-lisp buffer)))
| 50,491 | Common Lisp | .lisp | 1,383 | 33.631236 | 140 | 0.720326 | varjagg/cl-pjsip | 4 | 1 | 0 | GPL-2.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | e298f3ff4fc3acb6ea8108ac94cfa50b87c5bce1a41e4ac87866407b6033c96c | 16,452 | [
-1
] |
16,453 | package.lisp | varjagg_cl-pjsip/package.lisp | ;;;; package.lisp
(defpackage #:cl-pjsip
(:use #:cl #:cffi)
(:export "PJSIP-VIA-HDR-TCLASS" "PJSIP-USER-AGENT" "PJ-STR-TO-LISP" "PJSUA-VID-WIN-ID" "PJMEDIA-STREAM-CREATE" "PJSIP-TARGET-SET" "PJSIP-METHOD" "PJMEDIA-PORT" "PJ-LOG-POP-INDENT" "PJ-TIMESTAMP" "PJSIP-URI" "PJ-SOCKADDR-IN" "PJSIP-TRANSPORT-KEY" "PJSUA-VERIFY-URL" "PJSIP-CLEN-HDR" "PJSUA-PLAYER-ID" "PJMEDIA-SND-PORT-TCLASS" "PJSIP-MSG-BODY" "PJMEDIA-SDP-SESSION-TCLASS" "PJSUA-TRANSPORT-CONFIG-TCLASS" "PJSIP-AUTH-CLT-PREF-TCLASS" "PJMEDIA-STREAM-START"
"PJMEDIA-CODEC-INFO" "PJMEDIA-TRANSPORT" "PJSIP-TRANSPORT-DIR" "PJMEDIA-DIR" "PJSIP-METHOD-TCLASS" "PJ-CACHING-POOL-INIT" "PJ-TIME-VAL" "PJSIP-CSEQ-HDR-TCLASS" "PJSIP-RX-DATA-TCLASS" "PJMEDIA-TP-PROTO" "PJMEDIA-MASTER-PORT-TCLASS" "PJSIP-DLG-CREATE-UAC" "PJMEDIA-MASTER-PORT-CREATE" "PJSUA-SIP-TIMER-USE" "PJSIP-TPSELECTOR" "PJMEDIA-SDP-NEG-GET-ACTIVE-LOCAL" "PJMEDIA-TRANSPORT-OP-TCLASS" "PJSUA-IPV6-USE" "PJSIP-TX-DATA-SAVED-STRICT-ROUTE" "PJMEDIA-ENDPT-CREATE2" "PJMEDIA-STREAM-GET-PORT" "PJSIP-CACHED-AUTH-TCLASS" "PJ-IOQUEUE-OP-KEY" "PJ-SOCKADDR-IN6" "PJSIP-TPMGR-DESTROY" "PJSIP-INV-SESSION"
"PJ-GETHOSTIP" "PJMEDIA-CODEC-MGR" "PJSIP-RX-DATA-MSG-INFO" "PJSUA-ICE-CONFIG-TCLASS" "PJ-CACHING-POOL-TCLASS" "PJMEDIA-AUD-DEV-ROUTE" "PJSUA-CALL-MEDIA-STATUS" "PJ-SOCKADDR-PRINT" "PJSIP-TX-DATA-TP-SEL" "PJ-ADDR-HDR-TCLASS" "PJSIP-DLG-INC-LOCK" "PJSIP-PUBLISHC-OPT-TCLASS" "PJSIP-DLG-CREATE-UAS-AND-INC-LOCK" "PJ-ICE-SESS-OPTIONS" "PJSUA-CONFIG" "PJMEDIA-TYPE" "PJSUA-TURN-CONFIG" "PJSIP-AUTH-QOP-TYPE" "PJSIP-TX-DATA-INFO" "PJSIP-MSG-TCLASS" "PJSIP-PARAM-TCLASS" "PJMEDIA-WAV-PLAYER-PORT-CREATE" "PJSIP-PGP-CHALLENGE-TCLASS" "PJ-QOS-PARAMS-TCLASS" "PJ-POOL-FACTORY-DEFAULT-POLICY" "PJSIP-ROUTING-HDR-TCLASS"
"PJSIP-BUFFER" "PJSIP-TX-DATA-IS-PENDING" "PJSIP-TX-DATA-TCLASS" "PJSIP-TPSELECTOR-TCLASS" "PJSIP-INV-STATE" "PJSIP-CID-HDR-TCLASS" "PJMEDIA-VIDEO-FORMAT-DETAIL" "PJ-QOS-PARAMS" "PJMEDIA-STREAM-INFO" "PJSIP-TO-HDR" "PJSUA-LOGGING-CONFIG-DEFAULT" "PJ-SOCK" "PJSIP-UA-INSTANCE" "PJMEDIA-PIA-CCNT" "PJSIP-TRANSPORT" "PJSIP-UA-INIT-PARAM-TCLASS" "PJSIP-TX-DATA-AUTH-RETRY" "PJ-QOS-WMM-PRIO" "PJ-SUCCESS" "PJ-UINT32" "PJSUA-CALL-MAKE-CALL" "PJ-INT64" "PJMEDIA-PORT-TCLASS" "PJMEDIA-PORT-INFO-TCLASS" "PJ-STR-TCLASS" "PJSUA-CONFIG-DEFAULT" "PJSUA-ACC-CONFIG-DEFAULT" "PJSIP-RX-DATA-OP-KEY-TCLASS" "PJSIP-STATUS-LINE-TCLASS" "PJSIP-ENDPT-CREATE" "PJSUA-LOGGING-CONFIG" "PJMEDIA-FORMAT" "PJ-POOL-RELEASE" "PJSIP-COMMON-CHALLENGE"
"PJ-POOL-BLOCK-TCLASS" "PJSIP-TIMER-SETTING-TCLASS" "PJSUA-MSG-DATA" "PJ-UINT64" "PJSIP-TX-DATA-VIA-TP" "PJMEDIA-PIA-TIME" "PJMEDIA-CODEC-FACTORY" "PJMEDIA-CODEC-MGR-TCLASS" "PJ-SOCKADDR-IN-TCLASS" "PJSIP-INV-CREATE-UAS" "PJMEDIA-RECT-SIZE-TCLASS" "PJ-POOL-FACTORY-POLICY-TCLASS" "PJMEDIA-TRANSPORT-TCLASS" "PJSIP-DIGEST-CHALLENGE-TCLASS" "PJMEDIA-SDP-NEG-STATE" "PJMEDIA-AUD-DEV-INDEX" "PJSIP-RX-DATA" "PJMEDIA-STREAM-INFO-FROM-SDP" "PJSIP-UDP-TRANSPORT-START6" "PJSIP-MODULE-TCLASS" "PJMEDIA-VID-DEV-INDEX" "PJSIP-PUBLISHC-OPT" "PJSUA-CALL-SETTING" "PJ-QOS-TYPE" "PJMEDIA-ENDPT-DESTROY2" "PJMEDIA-ENDPT-DESTROY"
"PJMEDIA-TRANSPORT-INFO" "PJSUA-DESTROY" "PJSIP-TLS-SETTING-TCLASS" "PJSUA-CALL-INFO-TCLASS" "PJMEDIA-AUDIO-FORMAT-DETAIL-TCLASS" "PJSIP-CRED-INFO" "PJMEDIA-STREAM-INFO-TCLASS" "PJSIP-TX-DATA-CB" "PJSUA-LOGGING-CONFIG-TCLASS" "PJMEDIA-MASTER-PORT-START" "PJSIP-EVENT-ID-E" "PJSUA-ACC-CONFIG" "PJ-BOOL" "PJSUA-CONF-PORT-ID" "PJSIP-CID-HDR" "PJSIP-INV-STATE-NAME" "PJSIP-NAME-ADDR" "PJ-ICE-SESS-OPTIONS-TCLASS" "PJSUA-CALL-MEDIA-INFO" "PJ-UINT16" "PJSIP-INV-ANSWER" "PJMEDIA-SDP-NEG-TCLASS" "PJSIP-MEDIA-TYPE" "PJSIP-TX-DATA" "PJMEDIA-MASTER-PORT" "PJSIP-RX-DATA-GET-INFO" "PJSUA-ICE-CONFIG" "PJ-IOQUEUE-OP-KEY-TCLASS" "PJSIP-PARAM" "PJMEDIA-SDP-NEG" "PJSIP-MSG-BODY-TCLASS" "PJMEDIA-CODEC-INFO-TCLASS" "PJSIP-DIALOG-TCLASS" "PJSIP-VIA-HDR" "PJSUA-CALLBACK-TCLASS" "PJSIP-UDP-TRANSPORT-START" "PJSIP-INV-SESSION-TCLASS" "PJSIP-DIGEST-CHALLENGE" "PJMEDIA-VID-STREAM-SK-CONFIG"
"PJSIP-MULTIPART-PART" "PJSUA-INIT" "PJMEDIA-VID-STREAM-RC-CONFIG-TCLASS" "PJ-POOL-BLOCK" "PJSUA-START" "PJMEDIA-STREAM-DESTROY" "PJMEDIA-ENDPT" "PJMEDIA-AUDIO-FORMAT-DETAIL" "PJSIP-GENERIC-ARRAY-HDR-TCLASS" "PJ-IN6-ADDR" "PJSIP-TX-DATA-REF-CNT" "PJSIP-MULTIPART-PART-TCLASS" "PJSTR" "PJSUA-CALL-ID" "PJSIP-CRED-INFO-TCLASS" "PJSIP-INV-INVITE" "PJ-LOG" "PJMEDIA-SND-PORT-CREATE" "PJMEDIA-STREAM-TCLASS" "PJSIP-FROM-HDR" "PJSIP-TSX-LAYER-INIT-MODULE" "PJSIP-CSEQ-HDR" "PJMEDIA-TRANSPORT-INFO-TCLASS" "PJSIP-MAX-FWD-HDR" "PJSIP-TX-DATA-RX-TIMESTAMP" "PJMEDIA-AUD-SUBSYS-SHUTDOWN" "PJSIP-INV-USAGE-INIT" "PJSIP-HOST-PORT-TCLASS"
"PJSIP-RX-DATA-OP-KEY" "PJMEDIA-SOCK-INFO" "PJSIP-ROLE-E" "PJ-CACHING-POOL" "PJSIP-TX-DATA-MOD-DATA" "PJSIP-TRANSPORT-KEY-TCLASS" "PJSIP-TARGET-TCLASS" "PJSUA-CALLBACK" "PJSUA-TRANSPORT-CONFIG-DEFAULT" "PJSIP-CACHED-AUTH" "PJMEDIA-AUD-PARAM" "PJSIP-CTYPE-HDR" "PJMEDIA-TRANSPORT-GET-INFO" "PJMEDIA-SRTP-USE" "PJSIP-MEDIA-TYPE-TCLASS" "PJSIP-TX-DATA-VIA-ADDR" "PJSIP-MODULE-PRIORITY" "PJSIP-NAME-ADDR-TCLASS" "PJSUA-RECORDER-ID" "PJSIP-TX-DATA-GET-INFO" "PJ-TIMER-ID" "PJMEDIA-VID-STREAM-SK-CONFIG-TCLASS" "PJMEDIA-PORT-INFO" "PJSIP-TX-DATA-POOL" "PJSIP-INV-CALLBACK"
"PJ-SIZE" "PJSIP-TLS-SETTING" "PJSIP-GET-STATUS-TEXT" "PJ-LOG-SET-LOG-FUNC" "PJSIP-DLG-DEC-LOCK" "PJSIP-HOST-PORT" "PJMEDIA-CLOCK-SRC" "PJSUA-CALL-HANGUP-ALL" "PJMEDIA-TRANSPORT-TYPE" "PJSIP-RX-DATA-PKT-INFO" "PJSIP-UA-INIT-MODULE" "PJSUA-ICE-CONFIG-USE" "PJSIP-TX-DATA-DEST-INFO" "PJSIP-ROUTE-HDR" "PJSIP-SSL-METHOD" "PJSIP-PARSER-ERR-REPORT-TCLASS" "PJSUA-TRANSPORT-CREATE" "PJSIP-TX-DATA-OBJ-NAME" "PJ-SOCKOPT-PARAMS" "PJSIP-ENDPT-REGISTER-MODULE" "PJMEDIA-PIA-SPF" "PJ-IN-ADDR-TCLASS" "PJSIP-COMMON-CHALLENGE-TCLASS" "PJSIP-URI-TCLASS" "PJSIP-METHOD-E" "PJMEDIA-VID-STREAM-RC-SIMPLE-BLOCKING" "PJ-TIMER-ENTRY" "PJ-STRCPY2" "PJSIP-TX-DATA-" "PJSUA-MSG-DATA-TCLASS" "PJSIP-EVENT-TCLASS" "PJMEDIA-PIA-BITS" "PJSIP-FROMTO-HDR" "PJSIP-TX-DATA-MSG" "PJSIP-INV-CALLBACK-TCLASS" "PJSIP-WWW-AUTHENTICATE-HDR-TCLASS" "PJMEDIA-SND-PORT-DESTROY" "PJSUA-CALL-MEDIA-INFO-TCLASS" "PJMEDIA-VID-STREAM-RC-METHOD"
"PJMEDIA-CLOCK-SRC-TCLASS" "PJ-POOL-FACTORY" "PJLIB-UTIL-INIT" "PJMEDIA-SND-PORT-CONNECT" "PJSUA-BUDDY-ID" "PJMEDIA-CODEC-DESC-TCLASS" "PJ-CSTR" "PJSIP-CLEN-HDR-TCLASS" "PJSUA-ACC-CONFIG-TCLASS" "PJMEDIA-CODEC-DESC" "PJSUA-CALL-SETTING-TCLASS" "PJSUA-ACC-ADD" "PJMEDIA-TRANSPORT-SPECIFIC-INFO" "PJMEDIA-VID-STREAM-RC-CONFIG" "PJMEDIA-SDP-SESSION" "PJ-ADDR-HDR" "PJSIP-HDR-E" "PJSIP-CONTACT-HDR" "PJSUA-CREATE" "PJMEDIA-MASTER-PORT-DESTROY" "PJSIP-TX-DATA-BUF" "PJSIP-TX-DATA-LIST" "PJSIP-MSG" "PJ-LOG-SET-LEVEL" "PJ-INIT" "PJ-STR-LENGTH" "PJSIP-AUTH-CLT-SESS" "PJ-SSIZE" "PJSUA-MEDIA-CONFIG" "PJMEDIA-VID-STREAM-RC-NONE" "PJSUA-CALL-HOLD-TYPE" "PJ-STUN-AUTH-CRED" "PJSIP-HDR-TCLASS" "PJ-IN-ADDR" "PJSIP-ENDPOINT" "PJSUA-CONFIG-TCLASS" "PJMEDIA-WAV-WRITER-PORT-CREATE" "PJSIP-TX-DATA-LOCK" "PJMEDIA-CODEC-FACTORY-TCLASS" "PJSIP-INV-CREATE-UAC" "PJSIP-SERVER-ADDRESSES" "PJSUA-CONF-CONNECT" "PJ-STRDUP2" "PJSIP-DIALOG-STATE" "PJMEDIA-VIDEO-FORMAT-DETAIL-TCLASS" "PJMEDIA-SDP-NEG-GET-ACTIVE-REMOTE" "PJMEDIA-TRANSPORT-CLOSE" "PJ-POOL-TCLASS" "PJMEDIA-ENDPT-CREATE" "PJSIP-GENERIC-ARRAY-HDR" "PJSIP-BUFFER-TCLASS" "PJMEDIA-MASTER-PORT-STOP" "PJSTRING" "PJSIP-ENDPT-RESPOND-STATELESS" "PJ-AF-INET" "PJMEDIA-TRANSPORT-OP" "PJ-LIST-TCLASS" "PJSIP-AUTH-CLT-PREF" "PJSIP-TRANSPORT-TYPE-E" "PJ-STUN-AUTH-CRED-TYPE" "PJSUA-PERROR"
"PJ-TIME-VAL-TCLASS" "PJSUA-TRANSPORT-CONFIG" "PJSIP-CONTACT-HDR-TCLASS" "PJMEDIA-ENDPT-TCLASS" "PJSUA-ACC-ID" "PJSIP-INV-INITIAL-ANSWER" "PJ-INT16" "PJ-TIMER-ENTRY-TCLASS" "PJMEDIA-CODEC-G711-INIT" "PJSUA-CALL-INFO" "PJSIP-SUPPORTED-HDR" "PJMEDIA-SPF" "PJ-POOL-FACTORY-POLICY" "PJSIP-STATUS-CODE" "PJSIP-STATUS-LINE" "PJSUA-100REL-USE" "PJMEDIA-CODEC-PRIORITY" "PJSIP-CTYPE-HDR-TCLASS" "PJMEDIA-AUD-PARAM-TCLASS" "PJMEDIA-FORMAT-DETAIL-TYPE" "PJSIP-DIALOG" "PJSIP-TX-DATA-MGR" "PJSUA-MEDIA-CONFIG-TCLASS" "PJSIP-GENERIC-INT-HDR-TCLASS" "PJ-STATUS" "PJMEDIA-TRANSPORT-UDP-CREATE3" "PJSIP-INV-SEND-MSG" "PJSIP-TIMER-SETTING" "PJSIP-ENDPT-HANDLE-EVENTS" "PJSIP-GENERIC-INT-HDR" "PJSUA-TURN-CONFIG-TCLASS" "PJSIP-WWW-AUTHENTICATE-HDR" "PJSIP-ROUTING-HDR" "PJSIP-TX-DATA-TP-INFO" "PJ-SOCKADDR-INIT" "PJSIP-100REL-INIT-MODULE" "PJSIP-TARGET" "PJ-STUN-AUTH-CRED-TCLASS" "PJSUA-CALL-ANSWER" "PJSIP-TPSELECTOR-TYPE" "PJMEDIA-SOCK-INFO-TCLASS" "PJSIP-TRANSPORT-TCLASS" "PJSIP-RX-DATA-TP-INFO" "PJ-SOCKADDR-IN6-TCLASS" "PJSIP-DLG-PARTY-TCLASS" "PJMEDIA-RATIO" "PJSIP-REQUEST-LINE" "PJMEDIA-PIA-SRATE" "PJMEDIA-SND-PORT" "PJ-POOL-FACTORY-GET-DEFAULT-POLICY" "PJSIP-TX-DATA-OP-KEY" "PJSIP-DLG-TRY-INC-LOCK"
"PJSIP-TARGET-SET-TCLASS" "PJ-POOL-FACTORY-TCLASS" "PJ-POOL" "PJSIP-INV-VERIFY-REQUEST" "PJSUA-CALL-GET-INFO" "PJSIP-ENDPT-DESTROY" "PJSIP-REQUEST-LINE-TCLASS" "PJSIP-DLG-PARTY" "PJMEDIA-AUD-SUBSYS-INIT" "PJSIP-RX-DATA-ENDPT-INFO" "PJSIP-AUTH-CLT-SESS-TCLASS" "PJMEDIA-STREAM" "PJMEDIA-TRANSPORT-SPECIFIC-INFO-TCLASS" "PJMEDIA-TRANSPORT-INFO-INIT" "PJ-SOCKOPT-PARAMS-TCLASS" "PJSIP-ENDPOINT-TCLASS" "PJ-STR" "PJSUA-STUN-USE" "PJSIP-PARSER-ERR-REPORT" "PJMEDIA-AFD-SPF" "PJSIP-REQUIRE-HDR" "PJSIP-RR-HDR" "PJSIP-RX-DATA-" "PJSIP-FROMTO-HDR-TCLASS" "PJSIP-PGP-CHALLENGE" "PJSUA-TURN-CONFIG-USE" "PJSIP-SERVER-ADDRESSES-TCLASS" "PJMEDIA-RECT-SIZE" "PJSSUA-ACC-ID" "PJSIP-TX-DATA-TOKEN" "PJSIP-MSG-TYPE-E" "PJ-STUN-PASSWD-TYPE" "PJ-TURN-TP-TYPE" "PJSIP-EVENT" "PJSUA-TRANSPORT-ID" "PJ-LIST" "PJSIP-UA-INIT-PARAM" "PJ-SOCKADDR" "PJSIP-HDR" "PJMEDIA-RATIO-TCLASS" "PJSIP-ENDPT-GET-IOQUEUE" "PJSIP-MODULE" "PJSIP-TX-DATA-OP-KEY-TCLASS" "PJ-INT32" "PJMEDIA-FORMAT-TCLASS" "PJMEDIA-ENDPT-CREATE-SDP" "INIT" "RUN-AGENT" "ON-RX-REQUEST" "DEREF" "UA-LOG" "INV-SESSION-NEG" "INV-SESSION-DLG" "INV-SESSION-POOL"
"ASSERT-SUCCESS" "PJMEDIA-PIA-TIME" "PJMEDIA-WAV-WRITER-PORT-CREATE" "*PJ-POOL-FACTORY-DEFAULT-POLICY*"
"*PJ-AF-INET*" "BZERO" "+PJ-TRUE+" "PJMEDIA-PORT-DESTROY"
"LIBPJLIB-UTIL" "LIBPJ" "LIBPJSIP" "LIBPJSIP-UA" "LIBPJMEDIA" "LIBPJMEDIA-CODEC" "LIBPJMEDIA-AUDIODEV"
"LOGGER" "INV-SESSION-STATE" "INV-SESSION-CAUSE" "INV-SESSION-DLG" "INV-SESSION-POOL" "INV-SESSION-NEG"
"PJSIP-URI-VPTR" "PJSIP-URI-PRINT"))
| 10,083 | Common Lisp | .lisp | 20 | 501.3 | 1,320 | 0.748534 | varjagg/cl-pjsip | 4 | 1 | 0 | GPL-2.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 0f6a72450f1795bb9fe5d6f16bc373259f7c4c06b2bf556244f9cf156acb783a | 16,453 | [
-1
] |
16,454 | cl-pjsua-demo.lisp | varjagg_cl-pjsip/cl-pjsua-demo.lisp | (in-package #:cl-pjsip)
(defvar *sip-domain* "10.0.14.3")
(defvar *sip-user* "1100")
(defvar *sip-passwd* "secret")
(defconstant +pjsip-cred-data-plain-passwd+ 0)
(defmacro assert-no-error (form &optional error-message)
(let ((retval (gentemp)))
(unless error-message
(setf error-message (format nil "Error in ~A" (symbol-name (first form)))))
`(let ((,retval ,form))
(unless (pj-success ,retval)
(error-exit ,error-message ,retval)))))
(defcallback on-incoming-call :void ((acc-id pjsua-acc-id) (call-id pjsua-call-id) (rdata (:pointer pjsip-rx-data)))
(declare (ignorable acc-id rdata))
(with-foreign-object (ci 'pjsua-call-info)
(pjsua-call-get-info call-id ci)
(ua-log (format nil "Incoming call from ~A!!" (pj-str-to-lisp (foreign-slot-pointer ci 'pjsua-call-info 'remote-info))))
(pjsua-call-answer call-id 200 (null-pointer) (null-pointer))))
(defcallback on-call-state :void ((call-id pjsua-call-id) (e (:pointer pjsip-event)))
(declare (ignorable e))
(with-foreign-object (ci 'pjsua-call-info)
(pjsua-call-get-info call-id ci)
(format t "Call ~D state=~A~%" call-id (foreign-slot-value ci 'pjsua-call-info 'state))))
(defcallback on-call-media-state :void ((call-id pjsua-call-id))
(with-foreign-object (ci 'pjsua-call-info)
(pjsua-call-get-info call-id ci)
(when (eql (foreign-slot-value ci 'pjsua-call-info 'media-status) :pjsua-call-media-active)
;; plug the audio in
(pjsua-conf-connect (foreign-slot-value ci 'pjsua-call-info 'conf-slot) 0)
(pjsua-conf-connect 0 (foreign-slot-value ci 'pjsua-call-info 'conf-slot)))))
(defun error-exit (title status)
(pjsua-perror "cl-pjsua-demo" title status)
(pjsua-destroy)
(throw 'demo-error nil))
(defun run-pjsua (&optional destination)
(let ((acc-id (foreign-alloc 'pjsua-acc-id)))
(use-foreign-library libpjsua)
(assert-no-error (pjsua-create))
(when destination
(assert-no-error (pjsua-verify-url destination) "Invalid URL as argument"))
(with-foreign-objects ((cfg 'pjsua-config) (log-cfg 'pjsua-logging-config))
(pjsua-config-default cfg)
(with-foreign-slots ((on-incoming-call on-call-media-state on-call-state) (foreign-slot-value cfg 'pjsua-config 'cb) pjsua-callback)
(setf on-incoming-call (callback on-incoming-call)
on-call-media-state (callback on-call-media-state)
on-call-state (callback on-call-state)))
(pjsua-logging-config-default log-cfg)
(with-foreign-slots ((console-level cb) log-cfg pjsua-logging-config)
(setf console-level 4
cb (callback logger)))
(assert-no-error (pjsua-init cfg log-cfg (null-pointer))))
(with-foreign-object (cfg 'pjsua-transport-config)
(pjsua-transport-config-default cfg)
(setf (foreign-slot-value cfg 'pjsua-transport-config 'port) 5060)
(assert-no-error (pjsua-transport-create :pjsip-transport-udp cfg (null-pointer)) "Error creating transport"))
(assert-no-error (pjsua-start) "Error starting pjsua")
(with-foreign-object (cfg 'pjsua-acc-config)
(pjsua-acc-config-default cfg)
(with-foreign-slots ((id reg-uri cred-count) cfg pjsua-acc-config)
(pj-cstr id (format nil "sip:~A@~A" *sip-user* *sip-domain*))
;;(pj-cstr reg-uri (format nil "sip:~A" *sip-domain*))
(setf cred-count 1)
(with-foreign-slots ((realm scheme username data-type data)
(mem-aptr (foreign-slot-pointer cfg 'pjsua-acc-config 'cred-info) 'pjsip-cred-info 0)
pjsip-cred-info)
(pj-cstr realm *sip-domain*)
(pj-cstr scheme "digest")
(pj-cstr username *sip-user*)
(setf data-type +pjsip-cred-data-plain-passwd+)
(pj-cstr data *sip-passwd*)
(assert-no-error (pjsua-acc-add cfg +pj-true+ acc-id) "Error adding account"))))
(when destination
(with-foreign-object (uri 'pj-str)
(pj-cstr uri destination)
(assert-no-error (pjsua-call-make-call (mem-ref acc-id 'pjsua-acc-id) uri (null-pointer)
(null-pointer) (null-pointer) (null-pointer))
"Error making call")))
(loop for banner = (format t "Press H to hang up all calls, Q to quit~%")
for option = (read-line)
when (zerop (length option)) do (terpri)
else when (eql (char-downcase (aref option 0)) #\q) return nil
else when (eql (char-downcase (aref option 0)) #\h) do
(pjsua-call-hangup-all))
(pjsua-destroy)
(catch 'demo-error
(foreign-free acc-id)
#+nil(ua-log "Exiting"))))
| 4,459 | Common Lisp | .lisp | 87 | 46.103448 | 138 | 0.686288 | varjagg/cl-pjsip | 4 | 1 | 0 | GPL-2.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 6387feaa0a09cf33598e03427b91d0f37607847a5d42ca361ea6f65d05143082 | 16,454 | [
-1
] |
16,455 | media-ports.lisp | varjagg_cl-pjsip/media-ports.lisp | (in-package #:cl-pjsip)
(defconstant +pjmedia-aud-default-capture-dev+ -1)
(defconstant +pjmedia-aud-default-playback-dev+ -2)
(defconstant +pjmedia-aud-invalid-dev+ +3)
(defcstruct pjmedia-clock-src
(media-type pjmedia-type)
(clock-rate :uint)
(ptime-usec :uint)
(timestamp pj-timestamp)
(last-update pj-timestamp))
(defctype pjmedia-clock-src (:struct pjmedia-clock-src))
(defctype pjmedia-aud-dev-index pj-int32)
(defcenum pjmedia-aud-dev-route
:pjmedia-aud-dev-route-default
:pjmedia-aud-dev-route-loudspeaker
:pjmedia-aud-dev-route-earpiece
(:pjmedia-aud-dev-route-bluetooth 4)
(:pjmedia-aud-dev-route-custom 128))
(defcstruct pjmedia-aud-param
(dir pjmedia-dir)
(rec-id pjmedia-aud-dev-index)
(play-id pjmedia-aud-dev-index)
(clock-rate :uint)
(channel-count :uint)
(samples-per-frame :uint)
(bits-per-sample :uint)
(flags :uint)
(ext-fmt pjmedia-format)
(input-latency-ms :uint)
(output-latency-ms :uint)
(input-vol :uint)
(output-vol :uint)
(input-route pjmedia-aud-dev-route)
(output-route pjmedia-aud-dev-route)
(ec-enabled pj-bool)
(ec-tail-ms :uint)
(plc-enabled pj-bool)
(cng-enabled pj-bool)
(vad-enabled pj-bool))
(defctype pjmedia-aud-param (:struct pjmedia-aud-param))
(defcstruct pjmedia-snd-port
(rec-id :int)
(play-id :int)
(aud-caps pj-uint32)
(aud-param pjmedia-aud-param)
(aud-stream :pointer) ;dangling
(dir pjmedia-dir)
(port (:pointer pjmedia-port))
(cap-clocksrc pjmedia-clock-src)
(play-clocksrc pjmedia-clock-src)
(clock-rate :uint)
(channel-count :uint)
(samples-per-frame :uint)
(bits-per-sample :uint)
(options :uint)
(prm-ec-options :uint)
(ec-state :pointer) ;dangling
(ec-options :uint)
(ec-tail-len :uint)
(ec-suspended pj-bool)
(ec-suspended-count :uint)
(ec-suspended-limit :uint)
;;callbackery
(user-data (:pointer :void))
(on-play-frame :pointer)
(on-rec-frame :pointer))
(defctype pjmedia-snd-port (:struct pjmedia-snd-port))
(defcstruct pjmedia-master-port
(options :uint)
(clock :pointer) ;dangling
(u-port (:pointer pjmedia-port))
(d-port (:pointer pjmedia-port))
(buff-size :uint)
(buff (:pointer :void))
(lock :pointer))
(defctype pjmedia-master-port (:struct pjmedia-master-port))
(defcfun "pjmedia_wav_player_port_create" pj-status (pool (:pointer pj-pool)) (filename :string) (ptime :uint) (options :uint)
(buff-size pj-ssize) (p-port (:pointer (:pointer pjmedia-port))))
(defcfun "pjmedia_wav_writer_port_create" pj-status (pool (:pointer pj-pool)) (filename :string) (sampling-rate :uint)
(channel-count :uint) (samples-per-frame :uint) (bits-per-sample :uint) (flags :uint)
(buff-size pj-ssize) (p-port (:pointer (:pointer pjmedia-port))))
(defcfun "pjmedia_master_port_create" pj-status (pool (:pointer pj-pool)) (u-port (:pointer pjmedia-port))
(d-port (:pointer pjmedia-port)) (options :uint) (p-m (:pointer (:pointer pjmedia-master-port))))
(defcfun "pjmedia_master_port_start" pj-status (m (:pointer pjmedia-master-port)))
(defcfun "pjmedia_master_port_stop" pj-status (m (:pointer pjmedia-master-port)))
(defcfun "pjmedia_master_port_destroy" pj-status (m (:pointer pjmedia-master-port)) (destroy-ports pj-bool))
(defcfun "pjmedia_aud_subsys_init" pj-status (pf (:pointer pj-pool-factory)))
(defcfun "pjmedia_aud_subsys_shutdown" :void)
(defcfun "pjmedia_snd_port_create" :void (pool (:pointer pj-pool)) (rec_id :int) (play-id :int)
(clock-rate :uint) (channel-count :uint) (samples-per-frame :uint) (bits-per-sample :uint) (options :uint)
(p-port (:pointer (:pointer pjmedia-snd-port))))
(defcfun "pjmedia_snd_port_connect" pj-status (snd-port (:pointer pjmedia-snd-port)) (port (:pointer pjmedia-port)))
(defcfun "pjmedia_snd_port_destroy" :void (snd-port (:pointer pjmedia-snd-port)))
(defcfun "pjmedia_port_destroy" pj-status (port (:pointer pjmedia-port)))
(defun pjmedia-pia-srate (pia)
(let ((fmt (foreign-slot-pointer pia 'pjmedia-port-info 'fmt)))
(assert (and (eql (foreign-slot-value fmt 'pjmedia-format 'type) :pjmedia-type-audio)
(eql (foreign-slot-value fmt 'pjmedia-format 'detail-type)
:pjmedia-format-detail-audio)))
(foreign-slot-value (foreign-slot-pointer (foreign-slot-pointer fmt 'pjmedia-format 'det)
'(:union format-det) 'aud)
'pjmedia-audio-format-detail 'clock-rate)))
(defun pjmedia-pia-ccnt (pia)
(let ((fmt (foreign-slot-pointer pia 'pjmedia-port-info 'fmt)))
(assert (and (eql (foreign-slot-value fmt 'pjmedia-format 'type) :pjmedia-type-audio)
(eql (foreign-slot-value fmt 'pjmedia-format 'detail-type)
:pjmedia-format-detail-audio)))
(foreign-slot-value (foreign-slot-pointer (foreign-slot-pointer fmt 'pjmedia-format 'det)
'(:union format-det) 'aud)
'pjmedia-audio-format-detail 'channel-count)))
(defun pjmedia-pia-bits (pia)
(let ((fmt (foreign-slot-pointer pia 'pjmedia-port-info 'fmt)))
(assert (and (eql (foreign-slot-value fmt 'pjmedia-format 'type) :pjmedia-type-audio)
(eql (foreign-slot-value fmt 'pjmedia-format 'detail-type)
:pjmedia-format-detail-audio)))
(foreign-slot-value (foreign-slot-pointer (foreign-slot-pointer fmt 'pjmedia-format 'det)
'(:union format-det) 'aud)
'pjmedia-audio-format-detail 'bits-per-sample)))
(defun pjmedia-spf (clock-rate usec-ptime channel-count)
(/ (* usec-ptime clock-rate channel-count) 1000000))
(defun pjmedia-afd-spf (pafd)
(pjmedia-spf (foreign-slot-value pafd 'pjmedia-audio-format-detail 'clock-rate)
(foreign-slot-value pafd 'pjmedia-audio-format-detail 'frame-time-usec)
(foreign-slot-value pafd 'pjmedia-audio-format-detail 'channel-count)))
(defun pjmedia-pia-spf (pia)
(let ((fmt (foreign-slot-pointer pia 'pjmedia-port-info 'fmt)))
(assert (and (eql (foreign-slot-value fmt 'pjmedia-format 'type) :pjmedia-type-audio)
(eql (foreign-slot-value fmt 'pjmedia-format 'detail-type)
:pjmedia-format-detail-audio)))
(pjmedia-afd-spf (foreign-slot-pointer (foreign-slot-pointer fmt 'pjmedia-format 'det)
'(:union format-det) 'aud))))
(defun pjmedia-pia-time (pia)
(let ((fmt (foreign-slot-pointer pia 'pjmedia-port-info 'fmt)))
(assert (and (eql (foreign-slot-value fmt 'pjmedia-format 'type) :pjmedia-type-audio)
(eql (foreign-slot-value fmt 'pjmedia-format 'detail-type)
:pjmedia-format-detail-audio)))
(round (foreign-slot-value (foreign-slot-pointer (foreign-slot-pointer fmt 'pjmedia-format 'det)
'(:union format-det) 'aud)
'pjmedia-audio-format-detail 'frame-time-usec)
1000)))
| 6,592 | Common Lisp | .lisp | 140 | 43.478571 | 126 | 0.715955 | varjagg/cl-pjsip | 4 | 1 | 0 | GPL-2.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 3bf7aecccecbfe687a6576e53a99e4a6a17723695796f82c83982614d95fcba0 | 16,455 | [
-1
] |
16,456 | cl-pjsip-ua.lisp | varjagg_cl-pjsip/cl-pjsip-ua.lisp | (in-package #:cl-pjsip)
(defconstant +sip-port+ 5060)
(defconstant +rtp-port+ 4000)
(defconstant +max-media-cnt+ 1)
(defconstant +ivp6_addr_size+ 46)
(defparameter *complete* nil)
(defparameter *endpt* (foreign-alloc '(:pointer pjsip-endpoint) :initial-contents (list (null-pointer))))
(defparameter *cp* (foreign-alloc 'pj-caching-pool))
(defparameter *med-endpt* (foreign-alloc '(:pointer pjmedia-endpt) :initial-contents (list (null-pointer))))
(defparameter *med-tpinfo* (foreign-alloc 'pjmedia-transport-info :count +max-media-cnt+))
(defparameter *med-transport* (foreign-alloc '(:pointer pjmedia-transport) :count +max-media-cnt+
:initial-contents (loop repeat +max-media-cnt+ collecting (null-pointer))))
(defvar *sock-info* (foreign-alloc 'pjmedia-sock-info :count +max-media-cnt+))
;;;Call variables
(defparameter *inv* (foreign-alloc '(:pointer pjsip-inv-session) :initial-contents (list (null-pointer))))
(defvar *med-stream* (foreign-alloc '(:pointer pjmedia-stream) :initial-contents (list (null-pointer))))
(defvar *snd-port* (foreign-alloc '(:pointer pjmedia-snd-port) :initial-contents (list (null-pointer))))
(defvar *mod-simpleua* (foreign-alloc 'pjsip-module))
(defvar *msg-logger* (foreign-alloc 'pjsip-module))
#+nil(defclass sip-agent ()
((endpt :accessor endpt :initform (foreign-alloc '(:pointer pjsip-endpoint) :initial-contents (list (null-pointer))))
(cp :accessor cp :initform (foreign-alloc 'pj-caching-pool))
(med-endpt :accessor med-endpt :initform (foreign-alloc '(:pointer pjmedia-endpt) :initial-contents (list (null-pointer))))
(med-tpinfo :accessor med-tpinfo :initform (foreign-alloc 'pjmedia-transport-info :count +max-media-cnt+))
(med-transport :accessor med-transport :initform (foreign-alloc '(:pointer pjmedia-transport) :count +max-media-cnt+
:initial-contents (loop repeat +max-media-cnt+ collecting (null-pointer))))
(sock-info :accessor sock-info :initform (foreign-alloc 'pjmedia-sock-info :count +max-media-cnt+))
(inv :accessor inv :initform (foreign-alloc '(:pointer pjsip-inv-session) :initial-contents (list (null-pointer))))
(med-stream :accessor med-stream :initform (foreign-alloc '(:pointer pjmedia-snd-port) :initial-contents (list (null-pointer))))))
(defun load-pjsip-libraries ()
(pushnew #p"/usr/local/lib" *foreign-library-directories* :test #'equalp)
(use-foreign-library libpjlib-util)
(use-foreign-library libpj)
(use-foreign-library libpjsip)
(use-foreign-library libpjsip-ua)
(use-foreign-library libpjmedia)
(use-foreign-library libpjmedia-codec)
(use-foreign-library libpjmedia-audiodev))
(defcallback on-rx-request pj-bool ((rdata (:pointer pjsip-rx-data)))
(ua-log "Handling RX request")
(with-foreign-objects ((hostaddr 'pj-sockaddr)
(local-uri 'pj-str)
(dlg '(:pointer (:pointer pjsip-dialog)))
(pjs 'pj-str)
(options :uint 1)
(hostip :char +ivp6_addr_size+)
(local-sdp '(:pointer (:pointer pjmedia-sdp-session)))
(tdata '(:pointer (:pointer pjsip-tx-data))))
(setf (mem-ref options :uint) 0)
(let* ((id-val (foreign-slot-value
(foreign-slot-pointer
(foreign-slot-pointer
(foreign-slot-pointer
(foreign-slot-value (foreign-slot-pointer rdata 'pjsip-rx-data 'msg-info) 'rx-data-msg-info 'msg)
'pjsip-msg 'line)
'(:union msg-line) 'req)
'pjsip-request-line 'method)
'pjsip-method 'id)))
(when (not (eql :pjsip-invite-method id-val))
(when (not (eql :pjsip-ack-method id-val))
(pjsip-endpt-respond-stateless (deref *endpt*) rdata 500 (pj-cstr pjs "Unable to handle request")
(null-pointer) (null-pointer)))
(return-from on-rx-request t))
(unless (null-pointer-p (deref *inv*))
(pjsip-endpt-respond-stateless (deref *endpt*) rdata 500 (pj-cstr pjs "Another call in progress")
(null-pointer) (null-pointer))
(return-from on-rx-request t))
(unless (pj-success (pjsip-inv-verify-request rdata options (null-pointer) (null-pointer) *endpt* (null-pointer)))
(pjsip-endpt-respond-stateless (deref *endpt*) rdata 500 (pj-cstr pjs "INVITE too complex for this humble agent")
(null-pointer) (null-pointer))
(return-from on-rx-request t))
(unless (pj-success (pj-gethostip *pj-af-inet* hostaddr))
(ua-log "Unable to retrieve local host IP")
(return-from on-rx-request t))
(pj-cstr
local-uri
(format nil "<sip:simpleuas@~A:~D>" (pj-sockaddr-print hostaddr hostip +ivp6_addr_size+ 2) +sip-port+))
(unless (pj-success (pjsip-dlg-create-uas-and-inc-lock (pjsip-ua-instance) rdata local-uri dlg))
(pjsip-endpt-respond-stateless (deref *endpt*) (deref rdata) 500 (null-pointer)
(null-pointer) (null-pointer))
(return-from on-rx-request t))
(unless (pj-success (pjmedia-endpt-create-sdp (deref *med-endpt*)
(foreign-slot-value (foreign-slot-pointer rdata 'pjsip-rx-data 'tp-info)
'rx-data-tp-info 'pool)
+max-media-cnt+ *sock-info* local-sdp))
(pjsip-dlg-dec-lock (deref dlg))
(return-from on-rx-request t))
(unless (pj-success (pjsip-inv-create-uas (deref dlg) rdata (deref local-sdp) 0 *inv*))
(pjsip-dlg-dec-lock (deref dlg))
(return-from on-rx-request t))
(pjsip-dlg-dec-lock (deref dlg))
;; initial 180 response
(unless (pj-success (pjsip-inv-initial-answer (deref *inv*) rdata 180 (null-pointer) (null-pointer) tdata))
(return-from on-rx-request t))
(unless (pj-success (pjsip-inv-send-msg (deref *inv*) (deref tdata)))
(return-from on-rx-request t))
;; 200 response
(unless (pj-success (pjsip-inv-initial-answer (deref *inv*) rdata 200 (null-pointer) (null-pointer) tdata))
(return-from on-rx-request t))
(unless (pj-success (pjsip-inv-send-msg (deref *inv*) (deref tdata)))
(return-from on-rx-request t))))
t)
(defcallback logging-on-rx-msg pj-bool ((rdata (:pointer pjsip-rx-data)))
(ua-log (format nil "RX ~A:~% ~A~% --end-of-message--" (foreign-string-to-lisp (pjsip-rx-data-get-info rdata))
(foreign-string-to-lisp (getf (pjsip-rx-data-msg-info rdata) 'msg-buf)))))
(defcallback logging-on-tx-msg pj-bool ((tdata (:pointer pjsip-tx-data)))
(let ((body (foreign-slot-value (pjsip-tx-data-msg tdata) 'pjsip-msg 'body)))
(unless (null-pointer-p body)
(let ((size (foreign-slot-value body 'pjsip-msg-body 'len)))
(with-foreign-string (msg (make-string (1+ size)))
(foreign-funcall-pointer (foreign-slot-value body 'pjsip-msg-body 'print-body) ()
:pointer body :pointer msg size size :int)
(ua-log (format nil "TX ~A:~% ~A~% --end-of-message--" (foreign-string-to-lisp (pjsip-tx-data-get-info tdata))
(foreign-string-to-lisp msg))))))))
(defun init ()
(load-pjsip-libraries)
(foreign-funcall "bzero" :pointer *mod-simpleua* :int (foreign-type-size 'pjsip-module) :void)
(with-foreign-slots ((name id priority on-rx-request) *mod-simpleua* pjsip-module)
(pj-cstr name "mod-simpleua")
(setf priority (foreign-enum-value 'pjsip-module-priority :pjsip-mod-priority-application)
id -1
on-rx-request (callback on-rx-request)))
(foreign-funcall "bzero" :pointer *msg-logger* :int (foreign-type-size 'pjsip-module) :void)
(with-foreign-slots ((name id priority on-rx-request on-rx-response on-tx-request on-tx-response) *msg-logger* pjsip-module)
(pj-cstr name "mod-msg-log")
(setf priority (1- (foreign-enum-value 'pjsip-module-priority :pjsip-mod-priority-transport-layer))
id -1
on-rx-request (callback logging-on-rx-msg)
on-tx-request (callback logging-on-tx-msg)
on-rx-response (callback logging-on-rx-msg)
on-tx-response (callback logging-on-tx-msg))))
(defcallback call-on-state-changed :void ((inv (:pointer pjsip-inv-session)) (e (:pointer pjsip-event)))
(declare (ignorable e))
(if (eql (inv-session-state inv) :pjsip-inv-state-disconnected)
(progn
(ua-log (format nil "Call DISCONNECTED [reason = ~A]" (inv-session-cause inv)))
(setf *complete* t))
(ua-log (format nil "Call state changed to ~A" (inv-session-state inv)))))
(defcallback call-on-forked :void ((inv (:pointer pjsip-inv-session)) (e (:pointer pjsip-event)))
(declare (ignore inv e)))
(defcallback call-on-media-update :void ((inv (:pointer pjsip-inv-session)) (status pj-status))
(with-foreign-objects ((stream-info 'pjmedia-stream-info)
(local-sdp '(:pointer (:pointer pjmedia-sdp-session)))
(remote-sdp '(:pointer (:pointer pjmedia-sdp-session)))
(media-port '(:pointer (:pointer pjmedia-port))))
(unless (pj-success status)
(ua-log "SDP negotiation failed!")
(return-from call-on-media-update))
(pjmedia-sdp-neg-get-active-local (inv-session-neg inv) local-sdp)
(pjmedia-sdp-neg-get-active-remote (inv-session-neg inv) remote-sdp)
(unless (pj-success (pjmedia-stream-info-from-sdp stream-info (foreign-slot-value (inv-session-dlg inv) 'pjsip-dialog 'pool)
(deref *med-endpt*) (deref local-sdp) (deref remote-sdp) 0))
(ua-log "Unable to create audio stream info!")
(return-from call-on-media-update))
(unless (pj-success (pjmedia-stream-create (deref *med-endpt*) (foreign-slot-value (inv-session-dlg inv) 'pjsip-dialog 'pool)
stream-info (deref (mem-aptr *med-transport* :pointer 0))
(null-pointer) *med-stream*))
(ua-log "Unable to create audio stream info!")
(return-from call-on-media-update))
(unless (pj-success (pjmedia-stream-start (deref *med-stream*)))
(ua-log "Unable to start audio stream!")
(return-from call-on-media-update))
(pjmedia-stream-get-port (deref *med-stream*) media-port)
(ua-log "Creating sound port")
(let ((info (foreign-slot-pointer (deref media-port) 'pjmedia-port 'info)))
(pjmedia-snd-port-create (inv-session-pool inv) +pjmedia-aud-default-capture-dev+ +pjmedia-aud-default-playback-dev+
(pjmedia-pia-srate info)
(pjmedia-pia-ccnt info)
(pjmedia-pia-spf info)
(pjmedia-pia-bits info)
0 *snd-port*))
(pjmedia-snd-port-connect (deref *snd-port*) (deref media-port))))
(defun run-agent (&optional uri)
(unwind-protect ;to unwind and protect!
(progn
(assert-success (pj-init))
(pj-log-set-level 5)
(pj-log-set-log-func (callback logger))
(ua-log "Starting user agent..")
(assert-success (pjlib-util-init))
(pj-caching-pool-init *cp* *pj-pool-factory-default-policy* 0)
(let ((endpt-name (machine-instance)))
(ua-log (format nil "Initialize SIP endpoint with name ~A" endpt-name))
(assert-success (pjsip-endpt-create (foreign-slot-pointer *cp* 'pj-caching-pool 'factory) (null-pointer) *endpt*)))
(with-foreign-object (addr 'pj-sockaddr)
(pj-sockaddr-init *pj-af-inet* addr (null-pointer) +sip-port+) ;;ipv4
(assert-success (pjsip-udp-transport-start (deref *endpt*) (foreign-slot-pointer addr 'pj-sockaddr 'ipv4)
(null-pointer) 1 (null-pointer))))
(ua-log "Init transaction layer")
(assert-success (pjsip-tsx-layer-init-module (deref *endpt*)))
(ua-log "Init UA layer")
(assert-success (pjsip-ua-init-module (deref *endpt*) (null-pointer)))
(ua-log "Init INVITE session module")
(with-foreign-object (inv-cb 'pjsip-inv-callback)
(foreign-funcall "bzero" :pointer inv-cb :int (foreign-type-size 'pjsip-inv-callback) :void)
(with-foreign-slots ((on-state-changed on-new-session on-media-update) inv-cb pjsip-inv-callback)
(setf on-state-changed (callback call-on-state-changed)
on-new-session (callback call-on-forked)
on-media-update (callback call-on-media-update))
(assert-success (pjsip-inv-usage-init (deref *endpt*) inv-cb))))
(assert-success (pjsip-100rel-init-module (deref *endpt*)))
(assert-success (pjsip-endpt-register-module (deref *endpt*) *mod-simpleua*))
(assert-success (pjsip-endpt-register-module (deref *endpt*) *msg-logger*))
(ua-log "Initialize media endpoint")
(assert-success (pjmedia-endpt-create (foreign-slot-pointer *cp* 'pj-caching-pool 'factory)
(null-pointer) #+nil(pjsip-endpt-get-ioqueue (deref *endpt*))
1 *med-endpt*))
(ua-log "initialize G711 codec")
(assert-success (pjmedia-codec-g711-init (deref *med-endpt*)))
(bzero *med-tpinfo* (* (foreign-type-size 'pjmedia-transport-info) +max-media-cnt+))
(loop for i from 0 below +max-media-cnt+ do
(ua-log (format nil "Create transport endpoint ~D..." i))
(assert-success (pjmedia-transport-udp-create3 (deref *med-endpt*) *pj-af-inet*
(null-pointer) (null-pointer) (+ (* i 2) +rtp-port+)
0 (mem-aptr *med-transport* '(:pointer pjmedia-transport) i)))
(pjmedia-transport-info-init (mem-aptr *med-tpinfo* 'pjmedia-transport-info i))
(pjmedia-transport-get-info (deref (mem-aptr *med-transport* '(:pointer pjmedia-transport) i))
(mem-aptr *med-tpinfo* 'pjmedia-transport-info i))
(foreign-funcall "memcpy" :pointer (mem-aptr *sock-info* 'pjmedia-sock-info i)
:pointer (foreign-slot-pointer (mem-aptr *med-tpinfo* 'pjmedia-transport-info i)
'pjmedia-transport-info 'sock-info)
:int (foreign-type-size 'pjmedia-sock-info)
:void)
(ua-log " ..done!"))
(if uri
(with-foreign-objects ((hostaddr 'pj-sockaddr)
(hostip :char +ivp6_addr_size+)
(dst-uri 'pj-str)
(local-uri 'pj-str)
(dlg '(:pointer pjsip-dialog))
(local-sdp '(:pointer pjmedia-sdp-session))
(tdata '(:pointer pjsip-tx-data)))
(unless (pj-success (pj-gethostip *pj-af-inet* hostaddr))
(ua-log "Unable to retrieve local host IP")
(return-from run-agent nil))
(pj-cstr local-uri uri)
(pj-sockaddr-print hostaddr hostip +ivp6_addr_size+ 2)
(pj-cstr local-uri
(format nil "<sip:simpleuac@~A:~D>" (pj-sockaddr-print hostaddr hostip +ivp6_addr_size+ 2) +sip-port+))
(pj-cstr dst-uri uri)
(ua-log "Creating UAC dialog")
(assert-success (pjsip-dlg-create-uac (pjsip-ua-instance) local-uri local-uri dst-uri dst-uri dlg))
(ua-log "Creating SDP endpoint")
(assert-success (pjmedia-endpt-create-sdp (deref *med-endpt*)
(foreign-slot-value (deref dlg) 'pjsip-dialog 'pool)
+max-media-cnt+ *sock-info* local-sdp))
(ua-log "Creating INVITE session")
(assert-success (pjsip-inv-create-uac (deref dlg) (deref local-sdp) 0 *inv*))
(assert-success (pjsip-inv-invite (deref *inv*) tdata))
;;get the ball rolling over the net
(assert-success (pjsip-inv-send-msg (deref *inv*) (deref tdata))))
(ua-log "Ready to accept incoming calls.."))
(loop until *complete* do
(with-foreign-object (timeout 'pj-time-val)
(setf (foreign-slot-value timeout 'pj-time-val 'sec) 0
(foreign-slot-value timeout 'pj-time-val 'msec) 10)
(pjsip-endpt-handle-events (deref *endpt*) timeout))))
(ua-log "Shutting down..")
(unless (null-pointer-p (deref *snd-port*))
(pjmedia-snd-port-destroy (deref *snd-port*)))
(unless (null-pointer-p (deref *med-stream*))
(pjmedia-stream-destroy (deref *med-stream*)))
;;destroy media transports, deinit endpoints..
(loop for i from 0 below +max-media-cnt+ do
(unless (null-pointer-p (deref (mem-aptr *med-transport* '(:pointer pjmedia-transport) i)))
(pjmedia-transport-close (deref (mem-aptr *med-transport* '(:pointer pjmedia-transport) i)))))
(unless (null-pointer-p (deref *med-endpt*))
(pjmedia-endpt-destroy (deref *med-endpt*)))
(unless (null-pointer-p (deref *endpt*))
(pjsip-endpt-destroy (deref *endpt*)))
(pj-log-pop-indent))
(setf *complete* nil)
t)
| 15,736 | Common Lisp | .lisp | 273 | 51.934066 | 133 | 0.683519 | varjagg/cl-pjsip | 4 | 1 | 0 | GPL-2.0 | 9/19/2024, 11:27:30 AM (Europe/Amsterdam) | 0a432ca588b2bf35e4c19ee6b3d95307cc7c4ebd83c9c570a0af87ff8ef55754 | 16,456 | [
-1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.