text
stringlengths 197
24.1M
|
---|
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global root_certs
.section .rodata
.align 3
.type root_certs, %object
.size root_certs, 27216
root_certs:
.ascii "-----BEGIN CERTIFICATE-----\nMIIFqDCCA5CgAwIBAgIQHtOXCV/YtLN"
.ascii "HcB6qvn9FszANBgkqhkiG9w0BAQwFADBl\nMQswCQYDVQQGEwJVUzEeMBwGA"
.ascii "1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw\nNAYDVQQDEy1NaWNyb3N"
.ascii "vZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5\nIDIwMTcwHhcNM"
.ascii "TkxMjE4MjI1MTIyWhcNNDIwNzE4MjMwMDIzWjBlMQswCQYDVQQG\nEwJVUzE"
.ascii "eMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1N\na"
.ascii "WNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwg"
.ascii "gIi\nMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW"
.ascii "9R2LBifOZ\nNt9GkMml7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTE"
.ascii "Ly/xztokLaCLeX0\nZdDMbRnMlfl7rEqUrQ7eS0MdhweSE5CAg2Q1OQT85el"
.ascii "ss7YfUJQ4ZVBcF0a5toW1\nHLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw71Vdyv"
.ascii "D/IybLeS2v4I2wDwAW9lcfNcztm\ngGTjGqwu+UcF8ga2m3P1eDNbx6H7Jyq"
.ascii "htJqRjJHTOoI+dkC0zVJhUXAoP8XFWvLJ\njEm7FFtNyP9nTUwSlq31/niol"
.ascii "4fX/V4ggNyhSyL71Imtus5Hl0dVe49FyGcohJUc\naDDv70ngNXtk55iwlNp"
.ascii "NhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaG\nYaRSMLl6IE9vD"
.ascii "zhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6\nW6IYZVc"
.ascii "Sn2i51BVrlMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4K\nU"
.ascii "GsTuqwPN1q3ErWQgR5WrlcihtnJ0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPS"
.ascii "MQH\n+FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJClTUFLkqqNfs+av"
.ascii "NJVgyeY+Q\nW5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCA"
.ascii "YYwDwYDVR0TAQH/\nBAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNn"
.ascii "pv7tNsiMwEAYJKwYBBAGC\nNxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBA"
.ascii "KyvPl3CEZaJjqPnktaXFbgToqZC\nLgLNFgVZJ8og6Lq46BrsTaiXVq5lQ7G"
.ascii "PAJtSzVXNUzltYkyLDVt8LkS/gxCP81OC\ngMNPOsduET/m4xaRhPtthH80d"
.ascii "K2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6\ntZRGrox/2KJQJWVggEb"
.ascii "bMwSubLWYdFQl3JPk+ONVFT24bcMKpBLBaYVu32TxU5nh\nSnUgnZUP5NbcA"
.ascii "/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex/2kskZGT4d9Mozd2\nTaGf+G0"
.ascii "eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDyAmH3\np"
.ascii "vwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGs"
.ascii "RGR\nxpl/j8nWZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2d"
.ascii "xEuqPiApp\nGWSZI1b7rCoucL5mxAyE7+WL85MB+GqQk2dLsmijtWKP6T+Me"
.ascii "jteD+eMuMZ87zf9\ndOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKTc0QWbej09+C"
.ascii "VgI+WXTik9KveCjCHk9hN\nAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMc"
.ascii "ccMyj6D5KbvtwEwXlGjefVwaaZB\nRA+GsCyRxj3qrg+E\n-----"
.ascii "END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIICWTCCA"
.ascii "d+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQsw\nCQY"
.ascii "DVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAY"
.ascii "D\nVQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9ya"
.ascii "XR5IDIw\nMTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4MjMxNjA0WjBlMQs"
.ascii "wCQYDVQQGEwJV\nUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uM"
.ascii "TYwNAYDVQQDEy1NaWNy\nb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV"
.ascii "0aG9yaXR5IDIwMTcwdjAQBgcq\nhkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBE"
.ascii "yPNgASGAlEvaqiBYgtlzPbKnR5vSmZR\nogPZnZH6thaxjG7efM3beaYvzrv"
.ascii "OcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYb\nhGBKia/teQ87zvH2RPUBe"
.ascii "MCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8E\nBTADAQH/MB0GA1U"
.ascii "dDgQWBBTIy5lycFIM+Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3\nFQEEAwIBA"
.ascii "DAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlfXu5gKcs68tvWMoQZP3zV\nL8K"
.ascii "xzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaReNtUjGU"
.ascii "B\niudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M=\n-----END CERTIF"
.ascii "ICATE-----\n-----BEGIN CERTIFICATE-----\nMIIFazCCA1OgAwIBAgI"
.ascii "RAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw\nTzELMAkGA1UEB"
.ascii "hMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\ncmNoIEd"
.ascii "yb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4\nW"
.ascii "hcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50Z"
.ascii "XJu\nZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkc"
.ascii "gUm9vdCBY\nMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJ"
.ascii "HP0FDfzm54rVygc\nh77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbES"
.ascii "TtrFj/RQSa78f0uoxmyF+\n0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPf"
.ascii "jxwv60pIgbz5MDmgK7iS4+3mX6U\nA5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB"
.ascii "0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW\nT8KOEUt+zwvo/7V3LvSye0rgT"
.ascii "BIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH\nB5T0Y3HsLuJvW5iB4Yl"
.ascii "cNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC\nB5iPNgiV5+I3l"
.ascii "g02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv\nKBds0pj"
.ascii "BqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn\nO"
.ascii "lFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3Szy"
.ascii "nTn\njh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaH"
.ascii "WBfEbwrbw\nqHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1"
.ascii "CLQJ13hef4Y53CI\nrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBA"
.ascii "MA4GA1UdDwEB/wQEAwIBBjAPBgNV\nHRMBAf8EBTADAQH/MB0GA1UdDgQWBB"
.ascii "R5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq\nhkiG9w0BAQsFAAOCAgEAVR9Y"
.ascii "qbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL\nubhzEFnTIZd+50xx+7"
.ascii "LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ\n3BebYhtF8GaV"
.ascii "0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK\nNFtY2P"
.ascii "wByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5\n"
.ascii "ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvH"
.ascii "u7Ur\nTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0w"
.ascii "deRlN8NwdC\njNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1N"
.ascii "bdWhscdCb+ZAJzVc\noyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui"
.ascii "0/1lvh+wjChP4kqKOJ2qxq\n4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7"
.ascii "y0Ff/9yi0GE44Za4rF2LN9d11TPA\nmRGunUHBcnWEvgJBQl9nJEiU0Zsnvg"
.ascii "c/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d\nemyPxgcYxn/eR44/KJ4EBs+l"
.ascii "VDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n-----END CERTIFICA"
.ascii "TE-----\n-----BEGIN CERTIFICATE-----\nMIIFtzCCA5+gAwIBAgICBQ"
.ascii "kwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x\nGTAXBgNVBAoTEFF1"
.ascii "b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv\nb3QgQ0EgMj"
.ascii "AeFw0wNjExMjQxODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNV\nBAYT"
.ascii "AkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W"
.ascii "\nYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAo"
.ascii "ICAQCa\nGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYa"
.ascii "Hv5+HBg6XJxg\nFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsx"
.ascii "Dp3MJGF/hd/aTa/55J\nWpzmM+Yklvc/ulsrHHo1wtZn/qtmUIttKGAr79dg"
.ascii "w8eTvI02kfN/+NsRE8Scd3bB\nrrcCaoF6qUWD4gXmuVbBlDePSHFjIuwXZQ"
.ascii "eVikvfj8ZaCuWw419eaxGrDPmF60Tp\n+ARz8un+XJiM9XOva7R+zdRcAitM"
.ascii "OeGylZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1\nksOR1YqI0JDs3G3eicJlcZ"
.ascii "aLDQP9nL9bFqyS2+r+eXyt66/3FsvbzSUr5R/7mp/i\nUcw6UwxI5g69ybR2"
.ascii "BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1JdxnwQ5hYIiz\nPtGo/KPaHb"
.ascii "DRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og\n/zOh"
.ascii "D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UH"
.ascii "\noycR7hYQe7xFSkyyBNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Ot"
.ascii "b+fVuI\nyV77zGHcizN300QyNQliBJIWENieJ0f7OyHj+OsdWwIDAQABo4Gw"
.ascii "MIGtMA8GA1Ud\nEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBB"
.ascii "QahGK8SEwzJQTU7tD2\nA8QZRtGUazBuBgNVHSMEZzBlgBQahGK8"
.ascii "SEwzJQTU7tD2A8QZRtGUa6FJpEcwRTEL\nMAkGA1UEBhMCQk0xGTAXBgNVBA"
.ascii "oTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT\nElF1b1ZhZGlzIFJvb3Qg"
.ascii "Q0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2f\nBluornFdLwUvZ+"
.ascii "YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzn\ng/iN/Ae4"
.ascii "2l9NLmeyhP3ZRPx3UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2Bl\nfF"
.ascii "/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodmVjB3pjd4M1IQWK4/YY7yarHvGH"
.ascii "5K\nWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK+JDSV6IZ"
.ascii "UaUtl0Ha\nB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6Z"
.ascii "M/57Es3zrWIozc\nhLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v9"
.ascii "0m/xd2gNNWQjrLhVoQPR\nTUIZ3Ph1WVaj+ahJefivDrkRoHy3au000LYmYj"
.ascii "gahwz46P0u05B/B5EqHdZ+XIWD\nmbA4CD/pXvk1B+TJYm5Xf6dQlfe6yJvm"
.ascii "jqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0Z\nohEUGW6yhhtoPkg3Goi3XZZenM"
.ascii "fvJ2II4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y\n4aOTHcyKJloJONDO1w2A"
.ascii "FrR4pTqHTI2KpdVGl/IsELm8VCLAAVBpQ570su9t+Oza\n8eOx79+Rj1QqCy"
.ascii "XBJhnEUhAFZdWCEOrCMc0u\n-----END CERTIFICATE-----\n-----BEGI"
.ascii "N CERTIFICATE-----\nMIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEB"
.ascii "CwUAME0xCzAJBgNVBAYTAkRF\nMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJz"
.ascii "AlBgNVBAMMHkQtVFJVU1QgUm9vdCBD\nbGFzcyAzIENBIDIgMjAwOTAeFw0w"
.ascii "OTExMDUwODM1NThaFw0yOTExMDUwODM1NTha\nME0xCzAJBgNVBAYTAkRFMR"
.ascii "UwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMM\nHkQtVFJVU1QgUm9v"
.ascii "dCBDbGFzcyAzIENBIDIgMjAwOTCCASIwDQYJKoZIhvcNAQEB\nBQADggEPAD"
.ascii "CCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOADER03\nUAif"
.ascii "TUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42"
.ascii "\ntSHKXzlABF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/Rc"
.ascii "PHAY9R\nySPocq60vFYJfxLLHLGvKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0M"
.ascii "E7UAyiZsxGsM\nlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7zp+hnUquVH+BGPt"
.ascii "ikw8paxTGA6Eian5Rp\n/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQ"
.ascii "DcUCAwEAAaOCARowggEWMA8G\nA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP"
.ascii "3aFMSfMN4hvR5COfyrYyNJ4PGEMA4G\nA1UdDwEB/wQEAwIBBjCB0wYDVR0f"
.ascii "BIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVj\ndG9yeS5kLXRydXN0Lm5ldC"
.ascii "9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUy\nMENBJTIwMiUyMDIw"
.ascii "MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRl\ncmV2b2NhdG"
.ascii "lvbmxpc3QwQ6BBoD+GPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3Js\nL2Qt"
.ascii "dHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAwOS5jcmwwDQYJKoZI"
.ascii "hvcNAQEL\nBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUM"
.ascii "Jm2H6NMLVwMeni\nacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNij"
.ascii "nZflQGDSNiH+0LS4F9p0\no3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSf"
.ascii "rzkGkj2wTZ51xY/GXUl77M/C4K\nzCUqNQT4YJEVdT1B/yMfGchs64JTBKbk"
.ascii "TCJNjYy6zltz7GRUUG3RnFX7acM2w4y8\nPIWmawomDeCTmGCufsYkl4phX5"
.ascii "GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3Y\nJohw1+qRzT65ysCQblrG"
.ascii "XnRl11z+o+I=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFIC"
.ascii "ATE-----\nMIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQ"
.ascii "YDVQQGEwJHQjEb\nMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD"
.ascii "VQQHDAdTYWxmb3JkMRow\nGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB"
.ascii "8GA1UEAwwYQUFBIENlcnRpZmlj\nYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw"
.ascii "MDAwMFoXDTI4MTIzMTIzNTk1OVowezEL\nMAkGA1UEBhMCR0IxGzAZBgNVBA"
.ascii "gMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE\nBwwHU2FsZm9yZDEaMBgG"
.ascii "A1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM\nGEFBQSBDZXJ0aW"
.ascii "ZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP\nADCCAQoC"
.ascii "ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua\nBt"
.ascii "DFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWP"
.ascii "Pe\n3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCo"
.ascii "kcdmtet4\nYgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjN"
.ascii "oFmag4qMsXeDZR\nrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1"
.ascii "R8XlKdH5kBjHYpy+g8cm\nez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAw"
.ascii "EAAaOBwDCBvTAdBgNVHQ4EFgQU\noBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYD"
.ascii "VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF\nMAMBAf8wewYDVR0fBHQwcjA4oD"
.ascii "agNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v\nQUFBQ2VydGlmaWNhdGVT"
.ascii "ZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t\nb2RvLm5ldC9BQU"
.ascii "FDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF\nAAOCAQEA"
.ascii "CFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q\nGE"
.ascii "8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzN"
.ascii "Lz\nRt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8"
.ascii "tqtlbgT2\nG9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpy"
.ascii "ypEBMs1OUIJqsi\nl2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLj"
.ascii "Kzg6CYG1a4XXvi3tPxq3\nsmPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==\n----"
.ascii "-END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIDdzCC"
.ascii "Al+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEw"
.ascii "JJ\nRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0"
.ascii "MSIwIAYD\nVQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMD"
.ascii "UxMjE4NDYwMFoX\nDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQ"
.ascii "BgNVBAoTCUJhbHRpbW9y\nZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1"
.ascii "UEAxMZQmFsdGltb3JlIEN5YmVy\nVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcN"
.ascii "AQEBBQADggEPADCCAQoCggEBAKMEuyKr\nmD1X6CZymrV51Cni4eiVgLGw41"
.ascii "uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr\nIZ3AQSsBUnuId9Mcj8e6"
.ascii "uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK\nmpYcqWe4PwzV9/"
.ascii "lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu\nXmD+tqYF"
.ascii "/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy\ndc"
.ascii "93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/"
.ascii "ye\njl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI"
.ascii "VDaGezq1\nBE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAg"
.ascii "EGMA0GCSqGSIb3\nDQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9"
.ascii "Ldcw46QQF+vaKSm2eT92\n9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81u"
.ascii "kMJY2GQE/szKN+OMY3EU/t3Wgx\njkzSswF07r51XgdIGn9w/xZchMB5hbgF"
.ascii "/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0\nEpn3o0WC4zxe9Z2etciefC7IpJ"
.ascii "5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz\nksLi4xaNmjICq44Y3ekQ"
.ascii "Ee5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS\nR9I4LtD+gdwyah"
.ascii "617jzV/OeBHRnDJELqYzmp\n-----END CERTIFICATE-----\n-----BEGI"
.ascii "N CERTIFICATE-----\nMIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZI"
.ascii "hvcNAQELBQAwazELMAkGA1UE\nBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQ"
.ascii "YDVQQKDBpBY3RhbGlzIFMucC5BLi8w\nMzM1ODUyMDk2NzEnMCUGA1UEAwwe"
.ascii "QWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290\nIENBMB4XDTExMDkyMjExMj"
.ascii "IwMloXDTMwMDkyMjExMjIwMlowazELMAkGA1UEBhMC\nSVQxDjAMBgNVBAcM"
.ascii "BU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1\nODUyMDk2Nz"
.ascii "EnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENB\nMIIC"
.ascii "IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNv"
.ascii "\nUTufClrJwkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V"
.ascii "8IbInX\n4ay8IMKx4INRimlNAJZaby/ARH6jDuSRzVju3PvHHkVH3Se5CAGf"
.ascii "piEd9UEtL0z9\nKK3giq0itFZljoZUj5NDKd45RnijMCO6zfB9E1fAXdKDa0"
.ascii "hMxKufgFpbOr3JpyI/\ngCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9"
.ascii "Zg1fYVEiVRvjRuPjPdA1Yprb\nrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp"
.ascii "+Z07/T6k9QnBn+locePGX2oxgkg4YQ\n51Q+qDp2JE+BIcXjDwL4k"
.ascii "5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2F\nbe8lEfKXGkJh90q"
.ascii "X6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxe\nKF+w6D9Fz"
.ascii "8+vm2/7hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4F\nv6M"
.ascii "Gn8i1zeQf1xcGDXqVdFUNaBr8EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sb"
.ascii "n\nfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5jF66CyCU3nuDuP/jV"
.ascii "o23Eek7\njPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFL"
.ascii "YiDrIn3hm7Ynz\nezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jB"
.ascii "BgwFoAUUtiIOsifeGbt\nifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0"
.ascii "GCSqGSIb3DQEBCwUAA4ICAQAL\ne3KHwGCmSUyIWOYdiPcUZEim2FgKDk8TN"
.ascii "d81HdTtBjHIgT5q1d07GjLukD0R0i70\njsNjLiNmsGe+b7bAEzlgqqI0JZN"
.ascii "1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDz\nWochcYBNy+A4mz+7+uAwT"
.ascii "c+G02UQGRjRlwKxK3JCaKygvU5a2hi/a5iB0P2avl4V\nSM0RFbnAKVy06Ij"
.ascii "3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+Xlff1ANATIGk0k9j\npwlCCRT8A"
.ascii "KnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC4yyX\nX04"
.ascii "fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+O"
.ascii "k\nfcvHlXHo2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJ"
.ascii "qK4LL7R\nK4X9p2jIugErsWx0Hbhzlefut8cl8ABMALJ+tguLHPPAUJ4lueA"
.ascii "I3jZm/zel0btU\nZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXemOR/qnuOf0GZvB"
.ascii "eyqdn6/axag67XH/JJU\nLysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0Pjlx"
.ascii "QRrM9vwGYT7JZVEc+NHt4bVaT\nLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+"
.ascii "2ydDKXhlg==\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICA"
.ascii "TE-----\nMIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQY"
.ascii "DVQQGEwJKUDEl\nMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sT"
.ascii "FRELjEnMCUGA1UECxMe\nU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0E"
.ascii "yMB4XDTA5MDUyOTA1MDAzOVoX\nDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEB"
.ascii "hMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy\ndXN0IFN5c3RlbXMgQ08uLExURC4"
.ascii "xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj\nYXRpb24gUm9vdENBMjCCA"
.ascii "SIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV\nOVKxUrO6xVmCxF1"
.ascii "SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr\nzbl+dp+++"
.ascii "T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM\nVAX"
.ascii "3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1Fgk"
.ascii "Q\nhNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKk"
.ascii "aHnFtWO\nojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY"
.ascii "6rCcMU/Gt1SSw\nawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDV"
.ascii "R0OBBYEFAqFqXdlBZh8QIH4D5cs\nOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjA"
.ascii "PBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3\nDQEBCwUAA4IBAQBMOqNErLlFs"
.ascii "ceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF\ncoJxDjrSzG+ntKEju/Y"
.ascii "kn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc\nokgfGT+Ok+vx+"
.ascii "hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8\nt/2jioS"
.ascii "grGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy\n1"
.ascii "UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHI"
.ascii "Rc/\nSjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03\n-----END CERTIFIC"
.ascii "ATE-----\n-----BEGIN CERTIFICATE-----\nMIIDrzCCApegAwIBAgIQC"
.ascii "DvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh\nMQswCQYDVQQGEwJ"
.ascii "VUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlna"
.ascii "WNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD\nQTA"
.ascii "eFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlV"
.ascii "T\nMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY"
.ascii "2VydC5j\nb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMII"
.ascii "BIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqU"
.ascii "KKPC3eQyaKl7hLOllsB\nCSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4"
.ascii "bg7/fzTtxRuLWZscFs3YnFo97\nnh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q"
.ascii "77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt\n43C/dxC//AH2hdmoRBBYMql1GNX"
.ascii "Ror5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P\nT19sdl6gSzeRntwi5m3OF"
.ascii "BqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4\ngdW7jVg/tRvoSSi"
.ascii "icNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO\nBgNVHQ8BA"
.ascii "f8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR\nTLt"
.ascii "m8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VU"
.ascii "w\nDQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIo"
.ascii "yQY/Esr\nhMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8"
.ascii "cvpOp/2PV5Adg\n06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3S"
.ascii "p+dWOIrWcBAI+0tKIJF\nPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0n"
.ascii "a4UU+Krk2U886UAb3LujEV0ls\nYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4"
.ascii "pFsiv9kuXclVzDAGySj4dzp30d8tbQk\nCAUw7C29C79Fv1C5qfPrmAESrci"
.ascii "Ixpg0X40KPMbp1ZWVbd4=\n-----END CERTIFICATE-----\n-----BEGIN"
.ascii " CERTIFICATE-----\nMIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65"
.ascii "TANBgkqhkiG9w0BAQsFADBh\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGl"
.ascii "naUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSA"
.ascii "wHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\nMjAeFw0xMzA4MDExM"
.ascii "jAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\nMRUwEwYDVQQ"
.ascii "KEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\nb20xI"
.ascii "DAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG\n"
.ascii "9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlU"
.ascii "yfuI\n2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYx"
.ascii "psMNzaHxmx\n1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6Ztr"
.ascii "AGCSYP9PIUkY92eQ\nq2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtlu"
.ascii "NJbd134/tJS7SsVQepj5Wz\ntCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS"
.ascii "0xZKBgyMUNGPHgm+F6HmIcr9g+UQ\nvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw"
.ascii "9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP\nBgNVHRMBAf8EBTADAQH/MA4G"
.ascii "A1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV\n5uNu5g/6+rkS7QYXjz"
.ascii "kwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY\n1Yl9PMWLSn/p"
.ascii "vtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4\nNeF22d"
.ascii "+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG\n"
.ascii "Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8b"
.ascii "JZ91\n8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iy"
.ascii "K5S9kJRaTe\npLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyN"
.ascii "xF1WW6LZZm6zNTfl\nMrY=\n-----END CERTIFICATE-----\n-----BEGI"
.ascii "N CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYl"
.ascii "dzANBgkqhkiG9w0BAQUFADBs\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRG"
.ascii "lnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSswKQYD"
.ascii "VQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j\nZSBFViBSb290IENBMB4XDT"
.ascii "A2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL\nMAkGA1UEBhMCVVMx"
.ascii "FTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3\nLmRpZ2ljZX"
.ascii "J0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug\nRVYg"
.ascii "Um9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm"
.ascii "\n+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWT"
.ascii "rT3JTW\nPNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs"
.ascii "2ziS4wblCJEM\nxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG"
.ascii "0AFFoEt7oT61EKmEFB\nIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhak"
.ascii "aHPQNAQTXKFx01p8VdteZOE3\nhzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48s"
.ascii "oKqDirCmTCv2ZdlYTBoSUeh10aUAsg\nEsxBu24LUTi4S8sCAwEAAaNjMGEw"
.ascii "DgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF\nMAMBAf8wHQYDVR"
.ascii "0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA\nFLE+w2kD"
.ascii "+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec\nnz"
.ascii "yIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI"
.ascii "6z\neM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VH"
.ascii "MWEZ71jF\nhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xP"
.ascii "kKmNEVX58Svnw2\nYzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoC"
.ascii "Ww9E1CAx2/S6cCZdkGCe\nvEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/I"
.ascii "Bcm2PN7EeqJSdnoDfzAIJ9VNep\n+OkuE6N36B9K\n-----END CERTIFICA"
.ascii "TE-----\n-----BEGIN CERTIFICATE-----\nMIIEPjCCAyagAwIBAgIESl"
.ascii "OMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMC\nVVMxFjAUBgNVBAoT"
.ascii "DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50\ncnVzdC5uZX"
.ascii "QvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3Qs\nIElu"
.ascii "Yy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVz"
.ascii "\ndCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwHhcNMDkwNz"
.ascii "A3MTcy\nNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAU"
.ascii "BgNVBAoTDUVu\ndHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cn"
.ascii "VzdC5uZXQvbGVnYWwt\ndGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1"
.ascii "c3QsIEluYy4gLSBmb3IgYXV0\naG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAx"
.ascii "MpRW50cnVzdCBSb290IENlcnRpZmlj\nYXRpb24gQXV0aG9yaXR5IC0gRzIw"
.ascii "ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC6hLZy254Ma+KZ6T"
.ascii "ABp3bqMriVQRrJ2mFOWHLP/vaCeb9zYQYKpSfYs1/T\nRU4cctZOMvJyig/3"
.ascii "gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXzHHfV1IWN\ncCG0szLni6"
.ascii "LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hW\nwcKU"
.ascii "s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1"
.ascii "\nU1+cPvQXLOZprE4yTGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64p"
.ascii "tntoP0\njaWvYkxN4FisZDQSA/i2jZRjJKRxAgMBAAGjQjBAMA4GA1UdDwEB"
.ascii "/wQEAwIBBjAP\nBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ60B7vfe"
.ascii "c7aVHUbI2fkBJmqzAN\nBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfT"
.ascii "hwMEYGprmi5ZiXMRrEPR9RP/\njTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorW"
.ascii "KiAHarWWluBh1+xLlEjZivEtRh2woZ\nRkfz6/djwUAFQKXSt/S1mja/qYh2"
.ascii "iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v\n1fN2D807iDginWyTmsQ9v4"
.ascii "IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4R\nnAuknZoh8/CbCzB4"
.ascii "28Hch0P+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmH\nVHOkc8KT/1"
.ascii "EQrBVUAdj8BbGJoX90g5pJ19xOe4pIb4tF9g==\n-----END CERT"
.ascii "IFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIEDzCCAvegAwIBA"
.ascii "gIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl\nMCMGA1UEChM"
.ascii "cU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp\nU3Rhc"
.ascii "mZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw\n"
.ascii "NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMG"
.ascii "A1UE\nChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECx"
.ascii "MpU3RhcmZp\nZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw"
.ascii "ggEgMA0GCSqGSIb3\nDQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDB"
.ascii "Fk385N78gDGIc/oav7PKaf\n8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/"
.ascii "e97gKvDIr1MvnsoFAZMej2YcOadN\n+lq2cwQlZut3f+dZxkqZJRRU6ybH83"
.ascii "8Z1TBwj6+wRir/resp7defqgSHo9T5iaU0\nX9tDkYI22WY8sbi5gv2cOj4Q"
.ascii "yDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa\nK4UmkhynArPkPw2vCH"
.ascii "mCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA\n1W4TNSNe35tf"
.ascii "Pe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G\nA1UdDg"
.ascii "QWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR\n"
.ascii "zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoT"
.ascii "HFN0\nYXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YX"
.ascii "JmaWVsZCBD\nbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG"
.ascii "A1UdEwQFMAMBAf8w\nDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsaf"
.ascii "PzWdqbAYcaT1epoXkJKtv3\nL7IezMdeatiDh6GX70k1PncGQVhiv45YuApn"
.ascii "P+yz3SFmH8lU+nLMPUxA2IGvd56D\neruix/U0F47ZEUD0/CwqTRV/p2JdLi"
.ascii "XTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl\nxy16paq8U4Zt3VekyvggQQto"
.ascii "8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp\nVSJYACPq4xJDKVtHCN"
.ascii "2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY\nWQPJIrSPnNVe"
.ascii "KtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=\n-----END CERTIFICATE--"
.ascii "---\n-----BEGIN CERTIFICATE-----\nMIIEADCCAuigAwIBAgIBADANBg"
.ascii "kqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh\nMB8GA1UEChMYVGhlIEdv"
.ascii "IERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE\nYWRkeSBDbGFzcy"
.ascii "AyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3\nMDYyMFoX"
.ascii "DTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo\nZS"
.ascii "BHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3"
.ascii "Mg\nMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEB"
.ascii "BQADggEN\nADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3"
.ascii "GgXne77ZtJ6XCA\nPVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/H"
.ascii "d8M+eKsaA7Ugay9qK7HFiH7Eux6w\nwdhFJ2+qN1j3hybX2C32qRe3H3I2Tq"
.ascii "YXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi\nEqITLdiOr18SPaAIBQi2XKVl"
.ascii "OARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY\navx4A6lNf4DD+qta/K"
.ascii "FApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+\nYihfukEHU1jP"
.ascii "EX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE\nsNKR1E"
.ascii "wRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h\n"
.ascii "/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERh"
.ascii "ZGR5\nIEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIE"
.ascii "NlcnRpZmlj\nYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJ"
.ascii "KoZIhvcNAQEFBQAD\nggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQ"
.ascii "oZ+YeAEW5p5JYXMP80kWNy\nOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuU"
.ascii "RXO1v0XJJLXVggKtI3lpjbi2Tc7P\nTMozI+gciKqdi0FuFskg5YmezTvacP"
.ascii "d+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ\nHmyW74cNxA9hi63ugyuV+I6S"
.ascii "hHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER\ndEr/VxqHD3VILs9RaR"
.ascii "egAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf\nReYNnyicsbkq"
.ascii "WletNw+vHX/bvZ8=\n-----END CERTIFICATE-----\n-----BEGIN CERT"
.ascii "IFICATE-----\nMIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBg"
.ascii "kqhkiG9w0BAQUFADCB\nyjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlT"
.ascii "aWduLCBJbmMuMR8wHQYDVQQL\nExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMT"
.ascii "owOAYDVQQLEzEoYykgMjAwNiBWZXJp\nU2lnbiwgSW5jLiAtIEZvciBhdXRo"
.ascii "b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW\nZXJpU2lnbiBDbGFzcyAzIF"
.ascii "B1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0\naG9yaXR5IC0gRzUw"
.ascii "HhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL\nMAkGA1UEBh"
.ascii "MCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW\nZXJp"
.ascii "U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln"
.ascii "\nbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEz"
.ascii "xWZXJp\nU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRp"
.ascii "b24gQXV0aG9y\naXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwgg"
.ascii "EKAoIBAQCvJAgIKXo1\nnmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/Xx"
.ascii "rcgxiV0i6CqqpkKzj/i5Vbex\nt0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2"
.ascii "IIPVQT60nKWVSFJuUrjxuf6/WhkcIz\nSdhDY2pSS9KP6HBRTdGJaXvHcPaz"
.ascii "3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG\nBO+QueQA5N06tRn/Arr0PO"
.ascii "7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+\nrCpSx4/VBEnkjWNH"
.ascii "iDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/\nNIe"
.ascii "Wiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8"
.ascii "E\nBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmM"
.ascii "CEwHzAH\nBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDo"
.ascii "vL2xvZ28udmVy\naXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZ"
.ascii "afC3ey78DAJ80M5+gKv\nMzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2L"
.ascii "P2BqYLz3q3JktvXf2pXkiOOzE\np6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8"
.ascii "gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y\n5gaRQBi5+MHt39tBquCWIMnNZBU"
.ascii "4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK\nWE9gyn6CagsCqiUXObXbf"
.ascii "+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ\n4fQRbxC1lfznQgU"
.ascii "y286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N\nhnacRHr2l"
.ascii "Vz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq\n-----END CERTIF"
.ascii "ICATE-----\n-----BEGIN CERTIFICATE-----\nMIIDSjCCAjKgAwIBAgI"
.ascii "QRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/\nMSQwIgYDVQQKE"
.ascii "xtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\nDkRTVCB"
.ascii "Sb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow\nP"
.ascii "zEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDV"
.ascii "QQD\nEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADC"
.ascii "CAQoCggEB\nAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM"
.ascii "3ZJKuM/IUmTrE4O\nrz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XM"
.ascii "uegwGMoOifooUMM0RoOEq\nOLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5o"
.ascii "uJLGiifSKOeDNoJjj4XLh7dIN9b\nxiqKqy69cK3FCxolkHRyxXtqqzTWMIn"
.ascii "/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw\n7BZy1SbsOFU5Q9D8/RhcQPGX6"
.ascii "9Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD\naeQQmxkqtilX4+U9m5/"
.ascii "wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV\nHQ8BAf8EBAMCA"
.ascii "QYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG\nSIb3DQE"
.ascii "BBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69\ni"
.ascii "kugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8"
.ascii "uXr\nAvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6p"
.ascii "ZW87ipxZz\nR8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/"
.ascii "md2cXjbDaJWFBM5\nJDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZG"
.ascii "L+T0yjWW06XyxV3bqxbYo\nOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CN"
.ascii "TUQ\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n"
.ascii "MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEg"
.ascii "MB4G\nA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBg"
.ascii "NVBAoTCkdsb2JhbFNp\nZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYx"
.ascii "MjE1MDgwMDAwWhcNMjExMjE1\nMDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYW"
.ascii "xTaWduIFJvb3QgQ0EgLSBSMjETMBEG\nA1UEChMKR2xvYmFsU2lnbjETMBEG"
.ascii "A1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQ"
.ascii "oCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL\nv4dfxn+G07IwXNb9"
.ascii "rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8\neoLrvozps6"
.ascii "yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq\ntTle"
.ascii "iDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd"
.ascii "\nC9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkw"
.ascii "pRl4pa\nzq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48C"
.ascii "AwEAAaOBnDCB\nmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/z"
.ascii "AdBgNVHQ4EFgQUm+IH\nV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAr"
.ascii "oCmgJ4YlaHR0cDovL2NybC5n\nbG9iYWxzaWduLm5ldC9yb290LXIyLmNybD"
.ascii "AfBgNVHSMEGDAWgBSb4gdXZxwewGoG\n3lm0mi3f3BmGLjANBgkqhkiG9w0B"
.ascii "AQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs\nJ0/WwbgcQ3izDJr86iw8bm"
.ascii "EbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO\n291xNBrBVNpGP+DT"
.ascii "KqttVCL1OmLNIG"
.string "+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS\not+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd\nAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7\nTBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==\n-----END CERTIFICATE-----\n"
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Dieses Programm gibt aus, ob es sich bei den Jahren zwischen dem angegebenen Anfangs- und Endjahr um ein Schaltjahr handelt:\n"
.align 3
.LC1:
.string "Gib das Anfangsjahr ein:"
.align 3
.LC2:
.string "%d"
.align 3
.LC3:
.string "Nun gib das Endjahr ein:"
.align 3
.LC4:
.string "\nJahr | Schaltjahr ?"
.align 3
.LC5:
.string "---------------------"
.align 3
.LC6:
.string " | Nein"
.align 3
.LC7:
.string "%i %s\n"
.text
.align 2
.global jahresliste
.type jahresliste, %function
jahresliste:
.LFB0:
.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
str wzr, [sp, 16]
str wzr, [sp, 20]
str wzr, [sp, 28]
stp xzr, xzr, [sp, 32]
add x0, sp, 48
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
str q0, [x0, 64]
fmov w1, s0
str w1, [x0, 80]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
add x0, sp, 16
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
ldr w0, [sp, 16]
str w0, [sp, 24]
b .L2
.L7:
ldr w0, [sp, 24]
str w0, [sp, 28]
ldr w0, [sp, 28]
and w0, w0, 3
cmp w0, 0
bne .L3
ldr w1, [sp, 28]
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
cmp w0, 0
bne .L4
.L3:
ldr w0, [sp, 28]
and w0, w0, 3
cmp w0, 0
bne .L5
ldr w1, [sp, 28]
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
cmp w0, 0
bne .L5
ldr w1, [sp, 28]
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
cmp w0, 0
bne .L5
.L4:
add x0, sp, 32
mov x1, 8224
movk x1, 0x207c, lsl 16
movk x1, 0x4a20, lsl 32
movk x1, 0x61, lsl 48
str x1, [x0]
b .L6
.L5:
add x2, sp, 32
adrp x0, .LC6
add x1, x0, :lo12:.LC6
mov x0, x2
ldr x2, [x1]
str x2, [x0]
ldrh w1, [x1, 8]
strh w1, [x0, 8]
.L6:
add x0, sp, 32
mov x2, x0
ldr w1, [sp, 28]
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L2:
ldr w0, [sp, 20]
ldr w1, [sp, 24]
cmp w1, w0
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, 136]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L9
bl __stack_chk_fail
.L9:
mov w0, w1
ldp x29, x30, [sp], 144
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size jahresliste, .-jahresliste
.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 jahresliste
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
.align 2
.global f0
.type f0, %function
f0:
.LFB0:
.cfi_startproc
mov w0, 0
ret
.cfi_endproc
.LFE0:
.size f0, .-f0
.align 2
.global f1
.type f1, %function
f1:
.LFB1:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE1:
.size f1, .-f1
.align 2
.global f2
.type f2, %function
f2:
.LFB2:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE2:
.size f2, .-f2
.align 2
.global f3
.type f3, %function
f3:
.LFB3:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE3:
.size f3, .-f3
.align 2
.global f4
.type f4, %function
f4:
.LFB4:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE4:
.size f4, .-f4
.align 2
.global f5
.type f5, %function
f5:
.LFB5:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE5:
.size f5, .-f5
.align 2
.global f6
.type f6, %function
f6:
.LFB6:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE6:
.size f6, .-f6
.align 2
.global f7
.type f7, %function
f7:
.LFB7:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE7:
.size f7, .-f7
.align 2
.global f8
.type f8, %function
f8:
.LFB8:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE8:
.size f8, .-f8
.align 2
.global f9
.type f9, %function
f9:
.LFB9:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE9:
.size f9, .-f9
.align 2
.global f10
.type f10, %function
f10:
.LFB10:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE10:
.size f10, .-f10
.align 2
.global f11
.type f11, %function
f11:
.LFB11:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE11:
.size f11, .-f11
.align 2
.global f12
.type f12, %function
f12:
.LFB12:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE12:
.size f12, .-f12
.align 2
.global f13
.type f13, %function
f13:
.LFB13:
.cfi_startproc
nop
fmov s0, s1
ret
.cfi_endproc
.LFE13:
.size f13, .-f13
.align 2
.global f14
.type f14, %function
f14:
.LFB14:
.cfi_startproc
nop
fmov s0, s1
ret
.cfi_endproc
.LFE14:
.size f14, .-f14
.align 2
.global f15
.type f15, %function
f15:
.LFB15:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE15:
.size f15, .-f15
.align 2
.global f16
.type f16, %function
f16:
.LFB16:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE16:
.size f16, .-f16
.align 2
.global f17
.type f17, %function
f17:
.LFB17:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE17:
.size f17, .-f17
.align 2
.global f18
.type f18, %function
f18:
.LFB18:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE18:
.size f18, .-f18
.align 2
.global f19
.type f19, %function
f19:
.LFB19:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE19:
.size f19, .-f19
.align 2
.global f20
.type f20, %function
f20:
.LFB20:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE20:
.size f20, .-f20
.align 2
.global f21
.type f21, %function
f21:
.LFB21:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE21:
.size f21, .-f21
.align 2
.global f22
.type f22, %function
f22:
.LFB22:
.cfi_startproc
nop
bfi w0, w1, 0, 8
mov w1, w2
bfi w0, w1, 8, 8
ret
.cfi_endproc
.LFE22:
.size f22, .-f22
.align 2
.global f23
.type f23, %function
f23:
.LFB23:
.cfi_startproc
nop
bfi w0, w1, 0, 16
mov w1, w2
bfi w0, w1, 16, 16
ret
.cfi_endproc
.LFE23:
.size f23, .-f23
.align 2
.global f24
.type f24, %function
f24:
.LFB24:
.cfi_startproc
nop
bfi x0, x1, 0, 32
mov x1, x2
bfi x0, x1, 32, 32
ret
.cfi_endproc
.LFE24:
.size f24, .-f24
.align 2
.global f25
.type f25, %function
f25:
.LFB25:
.cfi_startproc
nop
mov x0, x3
mov x1, x2
ret
.cfi_endproc
.LFE25:
.size f25, .-f25
.align 2
.global f26
.type f26, %function
f26:
.LFB26:
.cfi_startproc
nop
fmov s0, s3
fmov s1, s2
ret
.cfi_endproc
.LFE26:
.size f26, .-f26
.align 2
.global f27
.type f27, %function
f27:
.LFB27:
.cfi_startproc
nop
fmov d0, d3
fmov d1, d2
ret
.cfi_endproc
.LFE27:
.size f27, .-f27
.align 2
.global f28
.type f28, %function
f28:
.LFB28:
.cfi_startproc
nop
bfi w0, w1, 0, 8
mov w1, w2
bfi w0, w1, 8, 8
ret
.cfi_endproc
.LFE28:
.size f28, .-f28
.align 2
.global f29
.type f29, %function
f29:
.LFB29:
.cfi_startproc
nop
bfi w0, w1, 0, 16
mov w1, w2
bfi w0, w1, 16, 16
ret
.cfi_endproc
.LFE29:
.size f29, .-f29
.align 2
.global f30
.type f30, %function
f30:
.LFB30:
.cfi_startproc
nop
bfi x0, x1, 0, 32
mov x1, x2
bfi x0, x1, 32, 32
ret
.cfi_endproc
.LFE30:
.size f30, .-f30
.align 2
.global f31
.type f31, %function
f31:
.LFB31:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, 8]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE31:
.size f31, .-f31
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global m_num_package
.bss
.align 2
.type m_num_package, %object
.size m_num_package, 4
m_num_package:
.zero 4
.global m_hostname
.align 3
.type m_hostname, %object
.size m_hostname, 1024
m_hostname:
.zero 1024
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "\n_____IDENTIFY_____\n"
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "auto"
.align 3
.LC3:
.string "break"
.align 3
.LC4:
.string "case"
.align 3
.LC5:
.string "char"
.align 3
.LC6:
.string "continue"
.align 3
.LC7:
.string "do"
.align 3
.LC8:
.string "default"
.align 3
.LC9:
.string "const"
.align 3
.LC10:
.string "double"
.align 3
.LC11:
.string "else"
.align 3
.LC12:
.string "enum"
.align 3
.LC13:
.string "extern"
.align 3
.LC14:
.string "for"
.align 3
.LC15:
.string "if"
.align 3
.LC16:
.string "goto"
.align 3
.LC17:
.string "float"
.align 3
.LC18:
.string "int"
.align 3
.LC19:
.string "long"
.align 3
.LC20:
.string "register"
.align 3
.LC21:
.string "return"
.align 3
.LC22:
.string "signed"
.align 3
.LC23:
.string "static"
.align 3
.LC24:
.string "sizeof"
.align 3
.LC25:
.string "short"
.align 3
.LC26:
.string "struct"
.align 3
.LC27:
.string "switch"
.align 3
.LC28:
.string "typedef"
.align 3
.LC29:
.string "union"
.align 3
.LC30:
.string "void"
.align 3
.LC31:
.string "while"
.align 3
.LC32:
.string "volatile"
.align 3
.LC33:
.string "unsigned"
.align 3
.LC34:
.string "\n\"%s\" is a keyword in C therfore it cannot be an identifier\n\n"
.align 3
.LC35:
.string "Identifier Name: Invalid\n"
.align 3
.LC36:
.string "\nIdentifier Name: Invalid\n"
.align 3
.LC37:
.string "\nIdentifier Name: Valid\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
.cfi_def_cfa_register 29
stp x19, x20, [sp, 16]
sub sp, sp, #16
.cfi_offset 19, -64
.cfi_offset 20, -56
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 x20, x8
mov w8, 80
str w8, [x29, 52]
ldrsw x8, [x29, 52]
sub x8, x8, #1
str x8, [x29, 56]
ldrsw x8, [x29, 52]
mov x6, x8
mov x7, 0
lsr x8, x6, 61
lsl x3, x7, 3
orr x3, x8, x3
lsl x2, x6, 3
ldrsw x2, [x29, 52]
mov x4, x2
mov x5, 0
lsr x2, x4, 61
lsl x1, x5, 3
orr x1, x2, x1
lsl x0, x4, 3
ldrsw x0, [x29, 52]
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L2:
cmp sp, x1
beq .L3
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L2
.L3:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L4
str xzr, [sp, 1024]
.L4:
add x0, sp, 16
add x0, x0, 0
str x0, [x29, 64]
mov w0, 1
str w0, [x29, 44]
str wzr, [x29, 48]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
ldr x1, [x29, 64]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC3
add x1, x0, :lo12:.LC3
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC4
add x1, x0, :lo12:.LC4
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC6
add x1, x0, :lo12:.LC6
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC7
add x1, x0, :lo12:.LC7
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC8
add x1, x0, :lo12:.LC8
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC10
add x1, x0, :lo12:.LC10
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC11
add x1, x0, :lo12:.LC11
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC12
add x1, x0, :lo12:.LC12
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC13
add x1, x0, :lo12:.LC13
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC14
add x1, x0, :lo12:.LC14
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC15
add x1, x0, :lo12:.LC15
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC16
add x1, x0, :lo12:.LC16
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC17
add x1, x0, :lo12:.LC17
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC18
add x1, x0, :lo12:.LC18
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC19
add x1, x0, :lo12:.LC19
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC20
add x1, x0, :lo12:.LC20
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC21
add x1, x0, :lo12:.LC21
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC22
add x1, x0, :lo12:.LC22
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC23
add x1, x0, :lo12:.LC23
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC24
add x1, x0, :lo12:.LC24
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC25
add x1, x0, :lo12:.LC25
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC26
add x1, x0, :lo12:.LC26
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC27
add x1, x0, :lo12:.LC27
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC28
add x1, x0, :lo12:.LC28
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC29
add x1, x0, :lo12:.LC29
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC30
add x1, x0, :lo12:.LC30
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC31
add x1, x0, :lo12:.LC31
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC32
add x1, x0, :lo12:.LC32
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
beq .L5
adrp x0, .LC33
add x1, x0, :lo12:.LC33
ldr x0, [x29, 64]
bl strcmp
cmp w0, 0
bne .L6
.L5:
ldr x1, [x29, 64]
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl printf
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl puts
str wzr, [x29, 44]
.L6:
str wzr, [x29, 48]
b .L7
.L11:
bl __ctype_b_loc
ldr x1, [x0]
ldr x2, [x29, 64]
ldrsw x0, [x29, 48]
ldrb w0, [x2, x0]
and x0, x0, 255
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 1024
cmp w0, 0
bne .L8
bl __ctype_b_loc
ldr x1, [x0]
ldr x2, [x29, 64]
ldrsw x0, [x29, 48]
ldrb w0, [x2, x0]
and x0, x0, 255
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 2048
cmp w0, 0
bne .L8
ldr x1, [x29, 64]
ldrsw x0, [x29, 48]
ldrb w0, [x1, x0]
cmp w0, 95
beq .L8
adrp x0, .LC36
add x0, x0, :lo12:.LC36
bl puts
b .L9
.L8:
ldrsw x19, [x29, 48]
ldr x0, [x29, 64]
bl strlen
sub x0, x0, #1
cmp x19, x0
bne .L10
ldr w0, [x29, 44]
cmp w0, 0
beq .L10
adrp x0, .LC37
add x0, x0, :lo12:.LC37
bl puts
.L10:
ldr w0, [x29, 48]
add w0, w0, 1
str w0, [x29, 48]
.L7:
ldrsw x19, [x29, 48]
ldr x0, [x29, 64]
bl strlen
cmp x19, x0
bcc .L11
.L9:
mov w0, 0
mov sp, x20
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [x29, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L13
bl __stack_chk_fail
.L13:
mov w0, w1
mov sp, x29
ldp x19, x20, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_restore 20
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE0:
.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 .L5
nop
.L3:
bl __VERIFIER_error
.L5:
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 foo
.type foo, %function
foo:
.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]
mov w0, 1
bl __VERIFIER_assert
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size foo, .-foo
.align 2
.global main
.type main, %function
main:
.LFB2:
.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
bl foo
mov w0, 1
bl foo
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global version
.section .rodata
.align 3
.type version, %object
.size version, 4
version:
.string "1.1"
.global copyright
.align 3
.type copyright, %object
.size copyright, 40
copyright:
.string "Copyright (C) 1993-2019 Serge Vakulenko"
.global progname
.bss
.align 3
.type progname, %object
.size progname, 8
progname:
.zero 8
.global verbose
.align 2
.type verbose, %object
.size verbose, 4
verbose:
.zero 4
.global trace
.align 2
.type trace, %object
.size trace, 4
trace:
.zero 4
.global debug
.align 2
.type debug, %object
.size debug, 4
debug:
.zero 4
.section .rodata
.align 3
.LC0:
.string "Skeleton program, Version %s, %s\n"
.align 3
.LC1:
.string "Usage:\n"
.align 3
.LC2:
.string " %s [-vtd] [-r count] file...\n"
.align 3
.LC3:
.string "Options:\n"
.align 3
.LC4:
.string " -v verbose mode\n"
.align 3
.LC5:
.string " -t trace mode\n"
.align 3
.LC6:
.string " -d debug\n"
.align 3
.LC7:
.string " -r # repeat count\n"
.text
.align 2
.global usage
.type usage, %function
usage:
.LFB6:
.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, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x4, [x0]
adrp x0, copyright
add x3, x0, :lo12:copyright
adrp x0, version
add x2, x0, :lo12:version
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x4
bl fprintf
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 7
mov x1, 1
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
adrp x0, progname
add x0, x0, :lo12:progname
ldr x0, [x0]
mov x2, x0
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x3
bl fprintf
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 9
mov x1, 1
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 23
mov x1, 1
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 21
mov x1, 1
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 16
mov x1, 1
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 23
mov x1, 1
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl fwrite
mov w0, -1
bl exit
.cfi_endproc
.LFE6:
.size usage, .-usage
.section .rodata
.align 3
.LC8:
.string "vtdr:"
.align 3
.LC9:
.string "%s "
.text
.align 2
.global main
.type main, %function
main:
.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 w0, [sp, 28]
str x1, [sp, 16]
mov w0, 1
str w0, [sp, 40]
ldr x0, [sp, 16]
ldr x1, [x0]
adrp x0, progname
add x0, x0, :lo12:progname
str x1, [x0]
.L12:
adrp x0, .LC8
add x2, x0, :lo12:.LC8
ldr x1, [sp, 16]
ldr w0, [sp, 28]
bl getopt
cmp w0, 118
beq .L3
cmp w0, 118
bgt .L4
cmp w0, 116
beq .L5
cmp w0, 116
bgt .L4
cmp w0, 114
beq .L6
cmp w0, 114
bgt .L4
cmn w0, #1
beq .L19
cmp w0, 100
beq .L8
b .L4
.L3:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
add w1, w0, 1
adrp x0, verbose
add x0, x0, :lo12:verbose
str w1, [x0]
b .L10
.L5:
adrp x0, trace
add x0, x0, :lo12:trace
ldr w0, [x0]
add w1, w0, 1
adrp x0, trace
add x0, x0, :lo12:trace
str w1, [x0]
b .L10
.L8:
adrp x0, debug
add x0, x0, :lo12:debug
ldr w0, [x0]
add w1, w0, 1
adrp x0, debug
add x0, x0, :lo12:debug
str w1, [x0]
b .L10
.L6:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
mov w2, 0
mov x1, 0
bl strtol
str w0, [sp, 40]
b .L10
.L4:
bl usage
b .L11
.L19:
nop
b .L11
.L10:
b .L12
.L11:
adrp x0, :got:optind
ldr x0, [x0, #:got_lo12:optind]
ldr w0, [x0]
ldr w1, [sp, 28]
sub w0, w1, w0
str w0, [sp, 28]
adrp x0, :got:optind
ldr x0, [x0, #:got_lo12:optind]
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
str x0, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 0
bgt .L14
bl usage
b .L14
.L17:
str wzr, [sp, 44]
b .L15
.L16:
ldrsw x0, [sp, 44]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x0, [x0]
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L15:
ldr w1, [sp, 44]
ldr w0, [sp, 28]
cmp w1, w0
blt .L16
mov w0, 10
bl putchar
.L14:
ldr w0, [sp, 40]
sub w1, w0, #1
str w1, [sp, 40]
cmp w0, 0
bgt .L17
mov w0, 0
ldp x29, x30, [sp], 48
.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
.align 2
.global test_vmovlu32
.type test_vmovlu32, %function
test_vmovlu32:
.LFB4340:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
ldr d0, [sp]
str d0, [sp, 8]
ldr d0, [sp, 8]
uxtl v0.2d, v0.2s
str q0, [sp, 16]
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4340:
.size test_vmovlu32, .-test_vmovlu32
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global test_user_bp
.type test_user_bp, %function
test_user_bp:
.LFB0:
.cfi_startproc
#APP
// 25 "program.c" 1
nop
// 0 "" 2
// 26 "program.c" 1
nop
// 0 "" 2
// 27 "program.c" 1
nop
// 0 "" 2
// 28 "program.c" 1
nop
// 0 "" 2
#NO_APP
nop
ret
.cfi_endproc
.LFE0:
.size test_user_bp, .-test_user_bp
.align 2
.global foo
.type foo, %function
foo:
.LFB1:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE1:
.size foo, .-foo
.align 2
.global test_step_resume
.type test_step_resume, %function
test_step_resume:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
bl foo
#APP
// 40 "program.c" 1
nop
// 0 "" 2
// 41 "program.c" 1
nop
// 0 "" 2
#NO_APP
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size test_step_resume, .-test_step_resume
.align 2
.global main
.type main, %function
main:
.LFB3:
.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_user_bp
bl test_step_resume
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global dictionary
.bss
.align 3
.type dictionary, %object
.size dictionary, 200100
dictionary:
.zero 200100
.global check_words
.align 3
.type check_words, %object
.size check_words, 1100
check_words:
.zero 1100
.global lend
.align 3
.type lend, %object
.size lend, 40020
lend:
.zero 40020
.global lenc
.align 3
.type lenc, %object
.size lenc, 220
lenc:
.zero 220
.global m
.align 2
.type m, %object
.size m, 4
m:
.zero 4
.global n
.align 2
.type n, %object
.size n, 4
n:
.zero 4
.section .rodata
.align 3
.LC0:
.string "%s"
.align 3
.LC1:
.string " is correct"
.align 3
.LC2:
.string " %s"
.text
.align 2
.global check
.type check, %function
check:
.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 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
str wzr, [sp, 56]
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, check_words
add x1, x1, :lo12:check_words
add x0, x0, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
str wzr, [sp, 36]
b .L2
.L5:
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, check_words
add x1, x1, :lo12:check_words
add x2, x0, x1
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, dictionary
add x1, x1, :lo12:dictionary
add x0, x0, x1
mov x1, x0
mov x0, x2
bl strcmp
cmp w0, 0
bne .L3
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
b .L1
.L3:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L2:
adrp x0, m
add x0, x0, :lo12:m
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
blt .L5
mov w0, 58
bl putchar
str wzr, [sp, 60]
str wzr, [sp, 36]
b .L6
.L19:
adrp x0, lend
add x0, x0, :lo12:lend
ldrsw x1, [sp, 36]
ldr w1, [x0, x1, lsl 2]
adrp x0, lenc
add x0, x0, :lo12:lenc
ldrsw x2, [sp, 28]
ldr w0, [x0, x2, lsl 2]
sub w0, w0, #1
cmp w1, w0
bne .L7
str wzr, [sp, 40]
b .L8
.L18:
str wzr, [sp, 52]
str wzr, [sp, 48]
b .L9
.L10:
adrp x0, check_words
add x3, x0, :lo12:check_words
ldrsw x2, [sp, 48]
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
add x0, x0, x2
ldrb w2, [x0]
ldrsw x0, [sp, 48]
add x1, sp, 64
strb w2, [x1, x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L9:
ldr w1, [sp, 48]
ldr w0, [sp, 40]
cmp w1, w0
blt .L10
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 48]
b .L11
.L12:
ldr w0, [sp, 48]
sub w4, w0, #1
adrp x0, check_words
add x3, x0, :lo12:check_words
ldrsw x2, [sp, 48]
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
add x0, x0, x2
ldrb w2, [x0]
sxtw x0, w4
add x1, sp, 64
strb w2, [x1, x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L11:
adrp x0, lenc
add x0, x0, :lo12:lenc
ldrsw x1, [sp, 28]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 48]
cmp w1, w0
blt .L12
str wzr, [sp, 48]
b .L13
.L16:
ldrsw x0, [sp, 48]
add x1, sp, 64
ldrb w2, [x1, x0]
adrp x0, dictionary
add x4, x0, :lo12:dictionary
ldrsw x3, [sp, 48]
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x4, x0
add x0, x0, x3
ldrb w0, [x0]
cmp w2, w0
beq .L14
mov w0, 1
str w0, [sp, 52]
b .L15
.L14:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L13:
adrp x0, lenc
add x0, x0, :lo12:lenc
ldrsw x1, [sp, 28]
ldr w0, [x0, x1, lsl 2]
sub w0, w0, #1
ldr w1, [sp, 48]
cmp w1, w0
blt .L16
.L15:
ldr w0, [sp, 52]
cmp w0, 0
bne .L17
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, dictionary
add x1, x1, :lo12:dictionary
add x0, x0, x1
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
b .L7
.L17:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L8:
adrp x0, lenc
add x0, x0, :lo12:lenc
ldrsw x1, [sp, 28]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 40]
cmp w1, w0
blt .L18
.L7:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L6:
adrp x0, m
add x0, x0, :lo12:m
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
blt .L19
str wzr, [sp, 36]
b .L20
.L25:
adrp x0, lenc
add x0, x0, :lo12:lenc
ldrsw x1, [sp, 28]
ldr w1, [x0, x1, lsl 2]
adrp x0, lend
add x0, x0, :lo12:lend
ldrsw x2, [sp, 36]
ldr w0, [x0, x2, lsl 2]
cmp w1, w0
bne .L21
str wzr, [sp, 44]
str wzr, [sp, 40]
b .L22
.L24:
adrp x0, check_words
add x3, x0, :lo12:check_words
ldrsw x2, [sp, 40]
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
add x0, x0, x2
ldrb w2, [x0]
adrp x0, dictionary
add x4, x0, :lo12:dictionary
ldrsw x3, [sp, 40]
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x4, x0
add x0, x0, x3
ldrb w0, [x0]
cmp w2, w0
beq .L23
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L23:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L22:
adrp x0, lenc
add x0, x0, :lo12:lenc
ldrsw x1, [sp, 28]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 40]
cmp w1, w0
blt .L24
ldr w0, [sp, 44]
cmp w0, 1
bne .L21
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, dictionary
add x1, x1, :lo12:dictionary
add x0, x0, x1
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L21:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L20:
adrp x0, m
add x0, x0, :lo12:m
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
blt .L25
str wzr, [sp, 36]
b .L26
.L39:
adrp x0, lenc
add x0, x0, :lo12:lenc
ldrsw x1, [sp, 28]
ldr w1, [x0, x1, lsl 2]
adrp x0, lend
add x0, x0, :lo12:lend
ldrsw x2, [sp, 36]
ldr w0, [x0, x2, lsl 2]
sub w0, w0, #1
cmp w1, w0
bne .L27
str wzr, [sp, 40]
b .L28
.L38:
str wzr, [sp, 52]
str wzr, [sp, 48]
b .L29
.L30:
adrp x0, dictionary
add x3, x0, :lo12:dictionary
ldrsw x2, [sp, 48]
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
add x0, x0, x2
ldrb w2, [x0]
ldrsw x0, [sp, 48]
add x1, sp, 64
strb w2, [x1, x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L29:
ldr w1, [sp, 48]
ldr w0, [sp, 40]
cmp w1, w0
blt .L30
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 48]
b .L31
.L32:
ldr w0, [sp, 48]
sub w4, w0, #1
adrp x0, dictionary
add x3, x0, :lo12:dictionary
ldrsw x2, [sp, 48]
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
add x0, x0, x2
ldrb w2, [x0]
sxtw x0, w4
add x1, sp, 64
strb w2, [x1, x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L31:
adrp x0, lend
add x0, x0, :lo12:lend
ldrsw x1, [sp, 36]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 48]
cmp w1, w0
blt .L32
str wzr, [sp, 48]
b .L33
.L36:
ldrsw x0, [sp, 48]
add x1, sp, 64
ldrb w2, [x1, x0]
adrp x0, check_words
add x4, x0, :lo12:check_words
ldrsw x3, [sp, 48]
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x4, x0
add x0, x0, x3
ldrb w0, [x0]
cmp w2, w0
beq .L34
mov w0, 1
str w0, [sp, 52]
b .L35
.L34:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L33:
adrp x0, lend
add x0, x0, :lo12:lend
ldrsw x1, [sp, 36]
ldr w0, [x0, x1, lsl 2]
sub w0, w0, #1
ldr w1, [sp, 48]
cmp w1, w0
blt .L36
.L35:
ldr w0, [sp, 52]
cmp w0, 0
bne .L37
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, dictionary
add x1, x1, :lo12:dictionary
add x0, x0, x1
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
b .L27
.L37:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L28:
adrp x0, lend
add x0, x0, :lo12:lend
ldrsw x1, [sp, 36]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 40]
cmp w1, w0
blt .L38
.L27:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L26:
adrp x0, m
add x0, x0, :lo12:m
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
blt .L39
mov w0, 10
bl putchar
.L1:
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 88]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L40
bl __stack_chk_fail
.L40:
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size check, .-check
.align 2
.global main
.type main, %function
main:
.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
adrp x0, m
add x0, x0, :lo12:m
str wzr, [x0]
b .L42
.L45:
adrp x0, m
add x0, x0, :lo12:m
ldr w0, [x0]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, dictionary
add x1, x1, :lo12:dictionary
add x0, x0, x1
bl strlen
mov x2, x0
adrp x0, m
add x0, x0, :lo12:m
ldr w1, [x0]
adrp x0, lend
add x0, x0, :lo12:lend
sxtw x1, w1
str w2, [x0, x1, lsl 2]
adrp x0, m
add x0, x0, :lo12:m
ldr w1, [x0]
adrp x0, dictionary
add x2, x0, :lo12:dictionary
sxtw x1, w1
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldrb w0, [x0]
cmp w0, 35
beq .L54
adrp x0, m
add x0, x0, :lo12:m
ldr w0, [x0]
add w1, w0, 1
adrp x0, m
add x0, x0, :lo12:m
str w1, [x0]
.L42:
adrp x0, m
add x0, x0, :lo12:m
ldr w0, [x0]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, dictionary
add x1, x1, :lo12:dictionary
add x0, x0, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
cmp w0, 0
bne .L45
b .L44
.L54:
nop
.L44:
adrp x0, n
add x0, x0, :lo12:n
str wzr, [x0]
b .L46
.L49:
adrp x0, n
add x0, x0, :lo12:n
ldr w0, [x0]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, check_words
add x1, x1, :lo12:check_words
add x0, x0, x1
bl strlen
mov x2, x0
adrp x0, n
add x0, x0, :lo12:n
ldr w1, [x0]
adrp x0, lenc
add x0, x0, :lo12:lenc
sxtw x1, w1
str w2, [x0, x1, lsl 2]
adrp x0, n
add x0, x0, :lo12:n
ldr w1, [x0]
adrp x0, check_words
add x2, x0, :lo12:check_words
sxtw x1, w1
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldrb w0, [x0]
cmp w0, 35
beq .L55
adrp x0, n
add x0, x0, :lo12:n
ldr w0, [x0]
add w1, w0, 1
adrp x0, n
add x0, x0, :lo12:n
str w1, [x0]
.L46:
adrp x0, n
add x0, x0, :lo12:n
ldr w0, [x0]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
adrp x1, check_words
add x1, x1, :lo12:check_words
add x0, x0, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
cmp w0, 0
bne .L49
b .L48
.L55:
nop
.L48:
str wzr, [sp, 28]
b .L50
.L51:
ldr w0, [sp, 28]
bl check
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L50:
adrp x0, n
add x0, x0, :lo12:n
ldr w0, [x0]
ldr w1, [sp, 28]
cmp w1, w0
blt .L51
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 .L53
bl __stack_chk_fail
.L53:
mov w0, w1
ldp x29, x30, [sp], 64
.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
.align 2
.global my_o_m_a_p_kernel_hal_dummy_function
.type my_o_m_a_p_kernel_hal_dummy_function, %function
my_o_m_a_p_kernel_hal_dummy_function:
.LFB0:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE0:
.size my_o_m_a_p_kernel_hal_dummy_function, .-my_o_m_a_p_kernel_hal_dummy_function
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Please provide the first numerator:"
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "Please provide the first denominator:"
.align 3
.LC3:
.string "Please provide the second numerator:"
.align 3
.LC4:
.string "Please provide the second denominator:"
.align 3
.LC5:
.string "The result of %d / %d + %d / %d is: %d / %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
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
add x0, sp, 16
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
add x0, sp, 24
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
add x0, sp, 20
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
add x0, sp, 28
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w1, [sp, 24]
ldr w0, [sp, 28]
cmp w1, w0
bne .L2
ldr w1, [sp, 16]
ldr w0, [sp, 20]
add w0, w1, w0
str w0, [sp, 32]
ldr w0, [sp, 24]
str w0, [sp, 36]
b .L3
.L2:
ldr w1, [sp, 16]
ldr w0, [sp, 28]
mul w1, w1, w0
ldr w2, [sp, 20]
ldr w0, [sp, 24]
mul w0, w2, w0
add w0, w1, w0
str w0, [sp, 32]
ldr w1, [sp, 24]
ldr w0, [sp, 28]
mul w0, w1, w0
str w0, [sp, 36]
.L3:
ldr w0, [sp, 16]
ldr w1, [sp, 24]
ldr w2, [sp, 20]
ldr w3, [sp, 28]
ldr w6, [sp, 36]
ldr w5, [sp, 32]
mov w4, w3
mov w3, w2
mov w2, w1
mov w1, w0
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, 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 "add(%d,%d) = %d\n"
.align 3
.LC1:
.string "square(%d) = %d\n"
.align 3
.LC2:
.string "max(%d,%d) = %d\n"
.align 3
.LC3:
.string "even(%d) = %d, %d is not an even number\n"
.align 3
.LC4:
.string "even(%d) = %d, %d is an even number\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
mov w0, 5
str w0, [sp, 24]
mov w0, 6
str w0, [sp, 28]
ldr w1, [sp, 24]
ldr w0, [sp, 28]
add w0, w1, w0
mov w3, w0
ldr w2, [sp, 28]
ldr w1, [sp, 24]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 24]
mul w0, w0, w0
mov w2, w0
ldr w1, [sp, 24]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 24]
ldr w2, [sp, 28]
ldr w1, [sp, 28]
cmp w2, w0
csel w0, w1, w0, ge
mov w3, w0
ldr w2, [sp, 28]
ldr w1, [sp, 24]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w0, [sp, 24]
and w0, w0, 1
cmp w0, 0
beq .L2
ldr w0, [sp, 24]
and w0, w0, 1
cmp w0, 0
cset w0, eq
and w0, w0, 255
ldr w3, [sp, 24]
mov w2, w0
ldr w1, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
b .L4
.L2:
ldr w0, [sp, 24]
and w0, w0, 1
cmp w0, 0
cset w0, eq
and w0, w0, 255
ldr w3, [sp, 24]
mov w2, w0
ldr w1, [sp, 24]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
.L4:
nop
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
.align 2
.type __bswap_16, %function
__bswap_16:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
strh w0, [sp, 14]
ldrh w0, [sp, 14]
rev16 w0, w0
and w0, w0, 65535
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size __bswap_16, .-__bswap_16
.global gcxcommands
.data
.align 3
.type gcxcommands, %object
.size gcxcommands, 442
gcxcommands:
.hword 25792
.string "eval"
.zero 27
.hword 3462
.string "if"
.zero 29
.hword -14149
.string "load"
.zero 27
.hword -26362
.string "chara"
.zero 26
.hword 8813
.string "menu"
.zero 27
.hword 8959
.string "mesg"
.zero 27
.hword 12394
.string "light"
.zero 26
.hword 17165
.string "delay"
.zero 26
.hword 19161
.string "system"
.zero 25
.hword 23710
.string "varsave"
.zero 24
.hword 27021
.string "sound"
.zero 26
.hword -26081
.string "start"
.zero 26
.hword -23998
.string "demo"
.zero 27
.text
.align 2
.global gcx_iscommand
.type gcx_iscommand, %function
gcx_iscommand:
.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]
ldr x0, [sp, 24]
ldrh w0, [x0]
bl __bswap_16
strh w0, [sp, 42]
str wzr, [sp, 44]
b .L4
.L7:
adrp x0, gcxcommands
add x2, x0, :lo12:gcxcommands
ldr w1, [sp, 44]
mov x0, x1
lsl x0, x0, 4
add x0, x0, x1
lsl x0, x0, 1
add x0, x2, x0
ldrh w0, [x0]
ldrh w1, [sp, 42]
cmp w1, w0
bne .L5
ldr w0, [sp, 44]
b .L6
.L5:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L4:
ldr w0, [sp, 44]
cmp w0, 12
bls .L7
mov w0, -1
.L6:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size gcx_iscommand, .-gcx_iscommand
.section .rodata
.align 3
.LC0:
.string "gcx_param == type %04x == size ????\n"
.align 3
.LC1:
.string "STACKOP!\n"
.align 3
.LC2:
.string "-m [%02x]:%04x\n"
.align 3
.LC3:
.string "-s [%02x]:%02x\n"
.align 3
.LC4:
.string "-%c "
.align 3
.LC5:
.string "%02x"
.align 3
.LC6:
.string "unknown param %02x size %04x\n"
.text
.align 2
.global gcx_param
.type gcx_param, %function
gcx_param:
.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 x1, [sp, 32]
strh wzr, [sp, 54]
strh wzr, [sp, 56]
strh wzr, [sp, 58]
ldr x0, [sp, 40]
ldrb w0, [x0]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 80
beq .L9
cmp w0, 80
bgt .L10
cmp w0, 48
beq .L11
cmp w0, 64
beq .L12
b .L10
.L11:
ldr x0, [sp, 40]
add x0, x0, 1
ldrb w0, [x0]
strh w0, [sp, 54]
ldr x3, [sp, 32]
mov x2, 9
mov x1, 1
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl fwrite
b .L13
.L12:
ldr x2, [sp, 32]
ldr x1, [sp, 40]
ldr w0, [sp, 56]
bl gcx_proc
b .L13
.L9:
ldr x0, [sp, 40]
add x0, x0, 2
ldrb w0, [x0]
and w0, w0, 65535
add w0, w0, 1
strh w0, [sp, 54]
ldr x0, [sp, 40]
add x0, x0, 1
ldrb w0, [x0]
cmp w0, 109
beq .L14
cmp w0, 115
beq .L15
b .L21
.L14:
ldr x0, [sp, 40]
add x0, x0, 3
ldrb w0, [x0]
mov w19, w0
ldr x0, [sp, 40]
add x0, x0, 4
ldrh w0, [x0]
bl __bswap_16
and w0, w0, 65535
mov w3, w0
mov w2, w19
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 32]
bl fprintf
b .L17
.L15:
ldr x0, [sp, 40]
add x0, x0, 3
ldrb w0, [x0]
mov w1, w0
ldr x0, [sp, 40]
add x0, x0, 4
ldrb w0, [x0]
mov w3, w0
mov w2, w1
adrp x0, .LC3
add x1, x0, :lo12:.LC3
ldr x0, [sp, 32]
bl fprintf
b .L17
.L21:
ldr x0, [sp, 40]
add x0, x0, 1
ldrb w0, [x0]
mov w2, w0
adrp x0, .LC4
add x1, x0, :lo12:.LC4
ldr x0, [sp, 32]
bl fprintf
str wzr, [sp, 60]
b .L18
.L19:
ldr w0, [sp, 60]
add w0, w0, 3
uxtw x0, w0
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
mov w2, w0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr x0, [sp, 32]
bl fprintf
ldrh w0, [sp, 54]
add w0, w0, 1
strh w0, [sp, 54]
.L18:
ldrh w0, [sp, 54]
sub w0, w0, #1
mov w1, w0
ldr w0, [sp, 60]
cmp w0, w1
bcc .L19
ldr x1, [sp, 32]
mov w0, 10
bl fputc
nop
.L17:
b .L13
.L10:
ldr x0, [sp, 40]
ldrb w0, [x0]
mov w1, w0
ldrh w0, [sp, 54]
mov w2, w0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
nop
.L13:
ldrh w0, [sp, 54]
add w0, w0, 1
and w0, w0, 65535
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 gcx_param, .-gcx_param
.section .rodata
.align 3
.LC7:
.string "gcx_cmd == cmd %s (%d) == size %04x\n"
.align 3
.LC8:
.string "%s("
.align 3
.LC9:
.string "%02x \"%s\"\n"
.align 3
.LC10:
.string "unknown cmd %02x size %04x\n"
.align 3
.LC11:
.string ")\n"
.text
.align 2
.global gcx_cmd
.type gcx_cmd, %function
gcx_cmd:
.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 x0, [sp, 24]
bl gcx_iscommand
str w0, [sp, 44]
ldr x0, [sp, 24]
add x0, x0, 2
ldrh w0, [x0]
bl __bswap_16
and w0, w0, 65535
lsr w0, w0, 8
strh w0, [sp, 42]
strh wzr, [sp, 40]
ldrsw x1, [sp, 44]
mov x0, x1
lsl x0, x0, 4
add x0, x0, x1
lsl x0, x0, 1
adrp x1, gcxcommands
add x1, x1, :lo12:gcxcommands
add x0, x0, x1
add x0, x0, 2
ldrh w1, [sp, 42]
mov w3, w1
ldr w2, [sp, 44]
mov x1, x0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
ldrsw x1, [sp, 44]
mov x0, x1
lsl x0, x0, 4
add x0, x0, x1
lsl x0, x0, 1
adrp x1, gcxcommands
add x1, x1, :lo12:gcxcommands
add x0, x0, x1
add x0, x0, 2
mov x2, x0
adrp x0, .LC8
add x1, x0, :lo12:.LC8
ldr x0, [sp, 16]
bl fprintf
mov w0, 3
strh w0, [sp, 40]
ldr w0, [sp, 44]
cmp w0, 3
beq .L27
ldr w0, [sp, 44]
cmp w0, 3
bgt .L24
ldr w0, [sp, 44]
cmp w0, 1
bgt .L25
ldr w0, [sp, 44]
cmp w0, 0
bge .L27
b .L24
.L25:
ldr w0, [sp, 44]
cmp w0, 2
beq .L26
b .L24
.L28:
ldrh w0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [sp, 16]
bl gcx_param
and w0, w0, 65535
ldrh w1, [sp, 40]
add w0, w0, w1
strh w0, [sp, 40]
.L27:
ldrh w0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L28
b .L29
.L26:
ldrh w0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
mov w2, w0
ldrh w0, [sp, 40]
add x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
mov x3, x0
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr x0, [sp, 16]
bl fprintf
ldrh w0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
and w0, w0, 65535
ldrh w1, [sp, 40]
add w0, w0, w1
strh w0, [sp, 40]
b .L30
.L31:
ldrh w0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [sp, 16]
bl gcx_param
and w0, w0, 65535
ldrh w1, [sp, 40]
add w0, w0, w1
strh w0, [sp, 40]
.L30:
ldrh w0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L31
b .L29
.L24:
ldrh w0, [sp, 42]
mov w2, w0
ldr w1, [sp, 44]
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
nop
.L29:
ldr x3, [sp, 16]
mov x2, 2
mov x1, 1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl fwrite
ldrh w0, [sp, 42]
add w0, w0, 2
and w0, w0, 65535
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size gcx_cmd, .-gcx_cmd
.section .rodata
.align 3
.LC12:
.string "gcx_proc == type %02x == size %04x\n"
.align 3
.LC13:
.string "proc %04x {\n"
.align 3
.LC14:
.string "}\n"
.align 3
.LC15:
.string "begin {\n"
.align 3
.LC16:
.string "call %04x\n"
.align 3
.LC17:
.string "unknown type %02x size %04x\n"
.text
.align 2
.global gcx_proc
.type gcx_proc, %function
gcx_proc:
.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 w0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
ldr x0, [sp, 32]
add x0, x0, 1
ldrh w0, [x0]
bl __bswap_16
strh w0, [sp, 60]
strh wzr, [sp, 62]
ldr x0, [sp, 32]
ldrb w0, [x0]
mov w1, w0
ldrh w0, [sp, 60]
mov w2, w0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
ldr x0, [sp, 32]
ldrb w0, [x0]
cmp w0, 112
beq .L34
cmp w0, 112
bgt .L35
cmp w0, 64
beq .L36
cmp w0, 96
beq .L37
b .L35
.L36:
ldrh w0, [sp, 40]
mov w2, w0
adrp x0, .LC13
add x1, x0, :lo12:.LC13
ldr x0, [sp, 24]
bl fprintf
mov w0, 3
strh w0, [sp, 62]
b .L38
.L39:
ldrh w0, [sp, 62]
ldr x1, [sp, 32]
add x0, x1, x0
ldr x2, [sp, 24]
mov x1, x0
ldr w0, [sp, 40]
bl gcx_proc
and w0, w0, 65535
ldrh w1, [sp, 62]
add w0, w0, w1
strh w0, [sp, 62]
.L38:
ldrh w0, [sp, 62]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L39
ldr x3, [sp, 24]
mov x2, 2
mov x1, 1
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl fwrite
b .L40
.L37:
ldr x3, [sp, 24]
mov x2, 8
mov x1, 1
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl fwrite
mov w0, 3
strh w0, [sp, 62]
b .L41
.L42:
ldrh w0, [sp, 62]
ldr x1, [sp, 32]
add x0, x1, x0
ldr x1, [sp, 24]
bl gcx_cmd
and w0, w0, 65535
ldrh w1, [sp, 62]
add w0, w0, w1
strh w0, [sp, 62]
.L41:
ldrh w0, [sp, 62]
ldr x1, [sp, 32]
add x0, x1, x0
bl gcx_iscommand
cmp w0, 0
bge .L42
ldr x3, [sp, 24]
mov x2, 2
mov x1, 1
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl fwrite
b .L40
.L34:
ldrh w0, [sp, 60]
lsr w0, w0, 8
strh w0, [sp, 60]
ldr x0, [sp, 32]
add x0, x0, 2
ldrh w0, [x0]
bl __bswap_16
and w0, w0, 65535
mov w2, w0
adrp x0, .LC16
add x1, x0, :lo12:.LC16
ldr x0, [sp, 24]
bl fprintf
b .L40
.L35:
ldr x0, [sp, 32]
ldrb w0, [x0]
mov w1, w0
ldrh w0, [sp, 60]
mov w2, w0
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl printf
nop
.L40:
ldrh w0, [sp, 60]
add w0, w0, 1
and w0, w0, 65535
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size gcx_proc, .-gcx_proc
.section .rodata
.align 3
.LC18:
.string "Not enough arguments given!\nUsage: %s file.gcx\n"
.align 3
.LC19:
.string "rb"
.align 3
.LC20:
.string "Couldnt open file %s\n"
.align 3
.LC21:
.string ".txt"
.align 3
.LC22:
.string "w"
.align 3
.LC23:
.string "proc %02u - hash %04x - offset %04x\n"
.align 3
.LC24:
.string "have %u definitions\n"
.align 3
.LC25:
.string "parsing proc %u %04x\n"
.align 3
.LC26:
.string "proc is at %08lx\n"
.align 3
.LC27:
.string "end of proc is at %08lx\n"
.align 3
.LC28:
.string "Done."
.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 x19, [sp, 16]
.cfi_offset 19, -112
str w0, [sp, 44]
str x1, [sp, 32]
ldr w0, [sp, 44]
cmp w0, 1
bgt .L45
ldr x0, [sp, 32]
ldr x0, [x0]
mov x1, x0
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl printf
mov w0, 1
b .L46
.L45:
str xzr, [sp, 72]
str xzr, [sp, 80]
str xzr, [sp, 64]
str xzr, [sp, 88]
str xzr, [sp, 96]
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC19
add x1, x0, :lo12:.LC19
mov x0, x2
bl fopen
str x0, [sp, 104]
ldr x0, [sp, 104]
cmp x0, 0
bne .L47
ldr x0, [sp, 32]
add x0, x0, 8
ldr x0, [x0]
mov x1, x0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl printf
mov w0, 1
b .L46
.L47:
ldr x0, [sp, 32]
add x0, x0, 8
ldr x0, [x0]
bl strlen
add x0, x0, 5
bl malloc
str x0, [sp, 88]
ldr x0, [sp, 32]
add x0, x0, 8
ldr x0, [x0]
mov x1, x0
ldr x0, [sp, 88]
bl strcpy
ldr x0, [sp, 88]
bl strlen
mov x1, x0
ldr x0, [sp, 88]
add x2, x0, x1
adrp x0, .LC21
add x1, x0, :lo12:.LC21
mov x0, x2
ldr w2, [x1]
str w2, [x0]
ldrb w1, [x1, 4]
strb w1, [x0, 4]
adrp x0, .LC22
add x1, x0, :lo12:.LC22
ldr x0, [sp, 88]
bl fopen
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L48
ldr x1, [sp, 88]
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl printf
mov w0, 1
b .L46
.L48:
mov w2, 2
mov x1, 0
ldr x0, [sp, 104]
bl fseek
ldr x0, [sp, 104]
bl ftell
str w0, [sp, 52]
mov w2, 0
mov x1, 0
ldr x0, [sp, 104]
bl fseek
ldr w0, [sp, 52]
bl malloc
str x0, [sp, 72]
ldr w0, [sp, 52]
ldr x3, [sp, 104]
mov x2, 1
mov x1, x0
ldr x0, [sp, 72]
bl fread
ldr x0, [sp, 104]
bl fclose
ldr x0, [sp, 72]
add x0, x0, 4
str x0, [sp, 96]
str wzr, [sp, 60]
b .L49
.L50:
ldr w0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
ldrh w2, [x0, 2]
ldr w0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x19, x1, x0
mov w0, w2
bl __bswap_16
and w0, w0, 65535
strh w0, [x19, 2]
ldr w0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
ldrh w2, [x0]
ldr w0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x19, x1, x0
mov w0, w2
bl __bswap_16
and w0, w0, 65535
strh w0, [x19]
ldr w0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
ldrh w0, [x0]
mov w2, w0
ldr w0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
ldrh w0, [x0, 2]
mov w3, w0
ldr w1, [sp, 60]
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl printf
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L49:
ldr w0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
ldrh w0, [x0]
cmp w0, 0
bne .L50
ldr w1, [sp, 60]
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl printf
ldr w0, [sp, 60]
lsl x0, x0, 3
bl malloc
str x0, [sp, 80]
str wzr, [sp, 52]
b .L51
.L52:
ldr w0, [sp, 60]
add x0, x0, 2
lsl x1, x0, 2
ldr w0, [sp, 52]
lsl x0, x0, 2
ldr x2, [sp, 96]
add x0, x2, x0
ldrh w0, [x0, 2]
and x0, x0, 65535
add x1, x1, x0
ldr w0, [sp, 52]
lsl x0, x0, 3
ldr x2, [sp, 80]
add x0, x2, x0
ldr x2, [sp, 72]
add x1, x2, x1
str x1, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L51:
ldr w1, [sp, 52]
ldr w0, [sp, 60]
cmp w1, w0
bcc .L52
str wzr, [sp, 52]
b .L53
.L56:
ldr w0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
ldrh w0, [x0]
mov w2, w0
ldr w1, [sp, 52]
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl printf
ldr w0, [sp, 52]
lsl x0, x0, 3
ldr x1, [sp, 80]
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 72]
sub x0, x1, x0
mov x1, x0
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl printf
ldr w0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
ldr w1, [sp, 52]
lsl x1, x1, 3
ldr x2, [sp, 80]
add x1, x2, x1
ldr x1, [x1]
ldr x2, [sp, 112]
ldr w0, [x0]
bl gcx_proc
and w0, w0, 65535
and x0, x0, 65535
str x0, [sp, 120]
ldr w0, [sp, 52]
lsl x0, x0, 3
ldr x1, [sp, 80]
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 64]
str wzr, [sp, 56]
b .L54
.L55:
ldr x0, [sp, 64]
add x0, x0, 1
str x0, [sp, 64]
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L54:
ldr w0, [sp, 56]
ldr x1, [sp, 120]
cmp x1, x0
bhi .L55
ldr x1, [sp, 64]
ldr x0, [sp, 72]
sub x0, x1, x0
mov x1, x0
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl printf
ldr x1, [sp, 112]
mov w0, 10
bl fputc
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L53:
ldr w1, [sp, 52]
ldr w0, [sp, 60]
cmp w1, w0
bcc .L56
ldr x0, [sp, 112]
bl fclose
ldr x0, [sp, 88]
bl free
ldr x0, [sp, 72]
bl free
ldr x0, [sp, 80]
bl free
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl puts
mov w0, 0
.L46:
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
.LFE10:
.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, -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]
mov w0, 0
bl exit
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type Rot64, %function
Rot64:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
str w1, [sp, 4]
ldr w0, [sp, 4]
ldr x1, [sp, 8]
neg w0, w0
ror x0, x1, x0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size Rot64, .-Rot64
.align 2
.global short128_hash
.type short128_hash, %function
short128_hash:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -480]!
.cfi_def_cfa_offset 480
.cfi_offset 29, -480
.cfi_offset 30, -472
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -464
str x0, [sp, 56]
str w1, [sp, 52]
str w2, [sp, 48]
str x3, [sp, 40]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 472]
mov x1, 0
ldr x0, [sp, 56]
str x0, [sp, 64]
ldrsw x0, [sp, 48]
str x0, [sp, 272]
ldr x0, [sp, 272]
str x0, [sp, 176]
mov w0, 48879
movk w0, 0xdead, lsl 16
str w0, [sp, 464]
str w0, [sp, 468]
ldr x0, [sp, 464]
str x0, [sp, 368]
b .L4
.L7:
ldr x1, [sp, 176]
ldrsw x0, [sp, 52]
eor x0, x1, x0
str x0, [sp, 88]
ldrsw x1, [sp, 52]
ldr x0, [sp, 272]
eor x0, x1, x0
mvn x0, x0
str x0, [sp, 184]
ldr w0, [sp, 52]
cmp w0, 15
bgt .L5
ldrsw x1, [sp, 52]
add x0, sp, 72
mov x2, x1
ldr x1, [sp, 64]
bl memcpy
ldrsw x0, [sp, 52]
add x1, sp, 72
add x3, x1, x0
mov w1, 16
ldr w0, [sp, 52]
sub w0, w1, w0
sxtw x0, w0
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
ldr x1, [sp, 368]
ldr x0, [sp, 72]
add x0, x1, x0
str x0, [sp, 280]
ldr x1, [sp, 464]
ldr x0, [sp, 80]
add x0, x1, x0
str x0, [sp, 376]
str wzr, [sp, 52]
b .L6
.L5:
ldr x1, [sp, 368]
ldr x0, [sp, 64]
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 280]
ldr x1, [sp, 464]
ldr x0, [sp, 64]
add x0, x0, 8
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 376]
ldr x0, [sp, 64]
add x0, x0, 16
str x0, [sp, 64]
ldr w0, [sp, 52]
sub w0, w0, #16
str w0, [sp, 52]
.L6:
ldr x0, [sp, 88]
str x0, [sp, 96]
ldr x0, [sp, 184]
str x0, [sp, 192]
ldr x1, [sp, 376]
ldr x0, [sp, 280]
eor x19, x1, x0
ldr x0, [sp, 280]
mov w1, 15
bl Rot64
str x0, [sp, 288]
ldr x0, [sp, 288]
add x0, x19, x0
str x0, [sp, 384]
ldr x0, [sp, 192]
str x0, [sp, 200]
ldr x0, [sp, 288]
str x0, [sp, 296]
ldr x1, [sp, 96]
ldr x0, [sp, 384]
eor x19, x1, x0
ldr x0, [sp, 384]
mov w1, 52
bl Rot64
str x0, [sp, 392]
ldr x0, [sp, 392]
add x0, x19, x0
str x0, [sp, 104]
ldr x0, [sp, 296]
str x0, [sp, 304]
ldr x0, [sp, 392]
str x0, [sp, 400]
ldr x1, [sp, 200]
ldr x0, [sp, 104]
eor x19, x1, x0
ldr x0, [sp, 104]
mov w1, 26
bl Rot64
str x0, [sp, 112]
ldr x0, [sp, 112]
add x0, x19, x0
str x0, [sp, 208]
ldr x0, [sp, 400]
str x0, [sp, 408]
ldr x0, [sp, 112]
str x0, [sp, 120]
ldr x1, [sp, 304]
ldr x0, [sp, 208]
eor x19, x1, x0
ldr x0, [sp, 208]
mov w1, 51
bl Rot64
str x0, [sp, 216]
ldr x0, [sp, 216]
add x0, x19, x0
str x0, [sp, 312]
ldr x0, [sp, 120]
str x0, [sp, 128]
ldr x0, [sp, 216]
str x0, [sp, 224]
ldr x1, [sp, 408]
ldr x0, [sp, 312]
eor x19, x1, x0
ldr x0, [sp, 312]
mov w1, 28
bl Rot64
str x0, [sp, 320]
ldr x0, [sp, 320]
add x0, x19, x0
str x0, [sp, 416]
ldr x0, [sp, 224]
str x0, [sp, 232]
ldr x0, [sp, 320]
str x0, [sp, 328]
ldr x1, [sp, 128]
ldr x0, [sp, 416]
eor x19, x1, x0
ldr x0, [sp, 416]
mov w1, 9
bl Rot64
str x0, [sp, 424]
ldr x0, [sp, 424]
add x0, x19, x0
str x0, [sp, 136]
ldr x0, [sp, 328]
str x0, [sp, 336]
ldr x0, [sp, 424]
str x0, [sp, 432]
ldr x1, [sp, 232]
ldr x0, [sp, 136]
eor x19, x1, x0
ldr x0, [sp, 136]
mov w1, 47
bl Rot64
str x0, [sp, 144]
ldr x0, [sp, 144]
add x0, x19, x0
str x0, [sp, 240]
ldr x0, [sp, 432]
str x0, [sp, 440]
ldr x0, [sp, 144]
str x0, [sp, 152]
ldr x1, [sp, 336]
ldr x0, [sp, 240]
eor x19, x1, x0
ldr x0, [sp, 240]
mov w1, 54
bl Rot64
str x0, [sp, 248]
ldr x0, [sp, 248]
add x0, x19, x0
str x0, [sp, 344]
ldr x0, [sp, 152]
str x0, [sp, 160]
ldr x0, [sp, 248]
str x0, [sp, 256]
ldr x1, [sp, 440]
ldr x0, [sp, 344]
eor x19, x1, x0
ldr x0, [sp, 344]
mov w1, 32
bl Rot64
str x0, [sp, 352]
ldr x0, [sp, 352]
add x0, x19, x0
str x0, [sp, 448]
ldr x0, [sp, 256]
str x0, [sp, 264]
ldr x0, [sp, 352]
str x0, [sp, 360]
ldr x1, [sp, 160]
ldr x0, [sp, 448]
eor x19, x1, x0
ldr x0, [sp, 448]
mov w1, 25
bl Rot64
str x0, [sp, 456]
ldr x0, [sp, 456]
add x0, x19, x0
str x0, [sp, 168]
ldr x0, [sp, 360]
str x0, [sp, 368]
ldr x0, [sp, 456]
str x0, [sp, 464]
ldr x1, [sp, 264]
ldr x0, [sp, 168]
eor x19, x1, x0
ldr x0, [sp, 168]
mov w1, 63
bl Rot64
str x0, [sp, 176]
ldr x0, [sp, 176]
add x0, x19, x0
str x0, [sp, 272]
.L4:
ldr w0, [sp, 52]
cmp w0, 0
bgt .L7
ldr x1, [sp, 176]
ldr x0, [sp, 40]
str x1, [x0]
ldr x0, [sp, 40]
add x0, x0, 8
ldr x1, [sp, 272]
str x1, [x0]
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 472]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L8
bl __stack_chk_fail
.L8:
ldr x19, [sp, 16]
ldp x29, x30, [sp], 480
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size short128_hash, .-short128_hash
.align 2
.global short64_hash
.type short64_hash, %function
short64_hash:
.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, 40]
str w1, [sp, 36]
str w2, [sp, 32]
str x3, [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
add x0, sp, 56
mov x3, x0
ldr w2, [sp, 32]
ldr w1, [sp, 36]
ldr x0, [sp, 40]
bl short128_hash
ldr x1, [sp, 56]
ldr x0, [sp, 24]
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 .L10
bl __stack_chk_fail
.L10:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size short64_hash, .-short64_hash
.align 2
.global short32_hash
.type short32_hash, %function
short32_hash:
.LFB3:
.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 w1, [sp, 36]
str w2, [sp, 32]
str x3, [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
add x0, sp, 56
mov x3, x0
ldr w2, [sp, 32]
ldr w1, [sp, 36]
ldr x0, [sp, 40]
bl short128_hash
ldr w1, [sp, 56]
ldr x0, [sp, 24]
str w1, [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 .L12
bl __stack_chk_fail
.L12:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size short32_hash, .-short32_hash
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.type INITIAL_S_BIT, %object
.size INITIAL_S_BIT, 1
INITIAL_S_BIT:
.byte 22
.type INITIAL_T_BIT, %object
.size INITIAL_T_BIT, 1
INITIAL_T_BIT:
.byte 21
.type INITIAL_K_BIT, %object
.size INITIAL_K_BIT, 1
INITIAL_K_BIT:
.byte 20
.type INITIAL_P_BIT, %object
.size INITIAL_P_BIT, 1
INITIAL_P_BIT:
.byte 19
.type INITIAL_W_BIT, %object
.size INITIAL_W_BIT, 1
INITIAL_W_BIT:
.byte 18
.type INITIAL_H_BIT, %object
.size INITIAL_H_BIT, 1
INITIAL_H_BIT:
.byte 17
.type INITIAL_R_BIT, %object
.size INITIAL_R_BIT, 1
INITIAL_R_BIT:
.byte 16
.type A_BIT, %object
.size A_BIT, 1
A_BIT:
.byte 15
.type O_BIT, %object
.size O_BIT, 1
O_BIT:
.byte 14
.type STAR_BIT, %object
.size STAR_BIT, 1
STAR_BIT:
.byte 13
.type E_BIT, %object
.size E_BIT, 1
E_BIT:
.byte 12
.type U_BIT, %object
.size U_BIT, 1
U_BIT:
.byte 11
.type FINAL_F_BIT, %object
.size FINAL_F_BIT, 1
FINAL_F_BIT:
.byte 10
.type FINAL_R_BIT, %object
.size FINAL_R_BIT, 1
FINAL_R_BIT:
.byte 9
.type FINAL_P_BIT, %object
.size FINAL_P_BIT, 1
FINAL_P_BIT:
.byte 8
.type FINAL_B_BIT, %object
.size FINAL_B_BIT, 1
FINAL_B_BIT:
.byte 7
.type FINAL_L_BIT, %object
.size FINAL_L_BIT, 1
FINAL_L_BIT:
.byte 6
.type FINAL_G_BIT, %object
.size FINAL_G_BIT, 1
FINAL_G_BIT:
.byte 5
.type FINAL_T_BIT, %object
.size FINAL_T_BIT, 1
FINAL_T_BIT:
.byte 4
.type FINAL_S_BIT, %object
.size FINAL_S_BIT, 1
FINAL_S_BIT:
.byte 3
.type FINAL_D_BIT, %object
.size FINAL_D_BIT, 1
FINAL_D_BIT:
.byte 2
.type FINAL_Z_BIT, %object
.size FINAL_Z_BIT, 1
FINAL_Z_BIT:
.byte 1
.type HASH_BIT, %object
.size HASH_BIT, 1
HASH_BIT:
.zero 1
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global read_timer
.type read_timer, %function
read_timer:
.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 x0, sp, 24
bl ftime
ldr d0, [sp, 24]
scvtf d1, d0
ldrh w0, [sp, 32]
ucvtf d0, w0
mov x0, 70368744177664
movk x0, 0x408f, lsl 48
fmov d2, x0
fdiv d0, d0, d2
fadd d0, d1, d0
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 .L3
bl __stack_chk_fail
.L3:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size read_timer, .-read_timer
.align 2
.global init
.type init, %function
init:
.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, 44]
b .L5
.L6:
bl rand
scvtf s0, w0
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
mov w1, 52429
movk w1, 0x4d4c, lsl 16
fmov s1, w1
fdiv s0, s0, s1
str s0, [x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L5:
ldr w1, [sp, 44]
mov w0, 16383
movk w0, 0x9c, lsl 16
cmp w1, w0
ble .L6
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size init, .-init
.align 2
.global sum
.type sum, %function
sum:
.LFB8:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str wzr, [sp, 24]
str wzr, [sp, 28]
b .L8
.L9:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr s0, [x0]
ldr s1, [sp, 24]
fadd s0, s1, s0
str s0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L8:
ldr w1, [sp, 28]
mov w0, 16383
movk w0, 0x9c, lsl 16
cmp w1, w0
ble .L9
ldr s0, [sp, 24]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size sum, .-sum
.align 2
.global sum_serial
.type sum_serial, %function
sum_serial:
.LFB9:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str wzr, [sp, 24]
str wzr, [sp, 28]
b .L12
.L13:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr s0, [x0]
ldr s1, [sp, 24]
fadd s0, s1, s0
str s0, [sp, 24]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L12:
ldr w1, [sp, 28]
mov w0, 16383
movk w0, 0x9c, lsl 16
cmp w1, w0
ble .L13
ldr s0, [sp, 24]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size sum_serial, .-sum_serial
.section .rodata
.align 3
.LC0:
.string "%.2f "
.align 3
.LC1:
.string "]"
.text
.align 2
.global print_vector
.type print_vector, %function
print_vector:
.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]
mov w0, 91
bl putchar
str wzr, [sp, 44]
b .L16
.L17:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s0, [x0]
fcvt d0, s0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L16:
ldr w0, [sp, 44]
cmp w0, 7
ble .L17
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size print_vector, .-print_vector
.section .rodata
.align 3
.LC2:
.string "=\n"
.align 3
.LC3:
.string "SIMD: %f\n"
.align 3
.LC4:
.string "---------------------------------"
.align 3
.LC5:
.string "Serial: %f\n"
.align 3
.LC6:
.string "=================================================================="
.align 3
.LC7:
.string "Performance:\t\t\tRuntime (s)\t GFLOPS"
.align 3
.LC8:
.string "------------------------------------------------------------------"
.align 3
.LC9:
.string "Sum (SIMD):\t\t%4f\t%4f\n"
.align 3
.LC10:
.string "Sum (Serial):\t\t%4f\t%4f\n"
.align 3
.LC11:
.string "Correctness check: %f\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]
mov x0, 40960000
bl malloc
str x0, [sp, 56]
mov x0, 0
bl time
bl srand
ldr x0, [sp, 56]
bl init
ldr x0, [sp, 56]
bl sum
str s0, [sp, 40]
ldr x0, [sp, 56]
bl sum_serial
str s0, [sp, 44]
str xzr, [sp, 64]
bl read_timer
str d0, [sp, 72]
str wzr, [sp, 48]
b .L19
.L20:
ldr x0, [sp, 56]
bl sum
str s0, [sp, 40]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L19:
ldr w0, [sp, 48]
cmp w0, 19
ble .L20
bl read_timer
fmov d1, d0
ldr d0, [sp, 72]
fsub d0, d1, d0
ldr d1, [sp, 64]
fadd d0, d1, d0
str d0, [sp, 64]
str xzr, [sp, 80]
bl read_timer
str d0, [sp, 88]
str wzr, [sp, 52]
b .L21
.L22:
ldr x0, [sp, 56]
bl sum_serial
str s0, [sp, 44]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L21:
ldr w0, [sp, 52]
cmp w0, 19
ble .L22
bl read_timer
fmov d1, d0
ldr d0, [sp, 88]
fsub d0, d1, d0
ldr d1, [sp, 80]
fadd d0, d1, d0
str d0, [sp, 80]
ldr x0, [sp, 56]
bl print_vector
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
ldr s0, [sp, 40]
fcvt d0, s0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
ldr s0, [sp, 44]
fcvt d0, s0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
ldr d0, [sp, 64]
mov x0, 225833675390976
movk x0, 0x41cd, lsl 48
fmov d1, x0
fmul d0, d0, d1
mov x0, 225833675390976
movk x0, 0x432d, lsl 48
fmov d1, x0
fdiv d0, d1, d0
str d0, [sp, 96]
ldr d0, [sp, 80]
mov x0, 225833675390976
movk x0, 0x41cd, lsl 48
fmov d1, x0
fmul d0, d0, d1
mov x0, 225833675390976
movk x0, 0x432d, lsl 48
fmov d1, x0
fdiv d0, d1, d0
str d0, [sp, 104]
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
fmov d0, 2.0e+1
ldr d1, [sp, 64]
fdiv d0, d1, d0
ldr d1, [sp, 96]
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
fmov d0, 2.0e+1
ldr d1, [sp, 80]
fdiv d0, d1, d0
ldr d1, [sp, 104]
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldr s1, [sp, 44]
ldr s0, [sp, 40]
fsub s0, s1, s0
fcvt d0, s0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
ldr x0, [sp, 56]
bl free
mov w0, 0
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 2
.type PROTOCOL_VERSION, %object
.size PROTOCOL_VERSION, 4
PROTOCOL_VERSION:
.word 70210
.align 2
.type INIT_PROTO_VERSION, %object
.size INIT_PROTO_VERSION, 4
INIT_PROTO_VERSION:
.word 209
.align 2
.type GETHEADERS_VERSION, %object
.size GETHEADERS_VERSION, 4
GETHEADERS_VERSION:
.word 70077
.align 2
.type MIN_PEER_PROTO_VERSION, %object
.size MIN_PEER_PROTO_VERSION, 4
MIN_PEER_PROTO_VERSION:
.word 70206
.align 2
.type CADDR_TIME_VERSION, %object
.size CADDR_TIME_VERSION, 4
CADDR_TIME_VERSION:
.word 31402
.align 2
.type NOBLKS_VERSION_START, %object
.size NOBLKS_VERSION_START, 4
NOBLKS_VERSION_START:
.word 32000
.align 2
.type NOBLKS_VERSION_END, %object
.size NOBLKS_VERSION_END, 4
NOBLKS_VERSION_END:
.word 32400
.align 2
.type BIP0031_VERSION, %object
.size BIP0031_VERSION, 4
BIP0031_VERSION:
.word 60000
.align 2
.type MEMPOOL_GD_VERSION, %object
.size MEMPOOL_GD_VERSION, 4
MEMPOOL_GD_VERSION:
.word 60002
.align 2
.type NO_BLOOM_VERSION, %object
.size NO_BLOOM_VERSION, 4
NO_BLOOM_VERSION:
.word 70201
.align 2
.type SENDHEADERS_VERSION, %object
.size SENDHEADERS_VERSION, 4
SENDHEADERS_VERSION:
.word 70201
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global test_vreinterpretQu8_p16
.type test_vreinterpretQu8_p16, %function
test_vreinterpretQu8_p16:
.LFB4340:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
ldr q0, [sp]
str q0, [sp, 32]
ldr q0, [sp, 32]
str q0, [sp, 16]
nop
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4340:
.size test_vreinterpretQu8_p16, .-test_vreinterpretQu8_p16
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global display_control
.data
.align 3
.type display_control, %object
.size display_control, 8
display_control:
.xword 67108864
.global vram
.align 3
.type vram, %object
.size vram, 8
vram:
.xword 100663296
.text
.align 2
.global get_color
.type get_color, %function
get_color:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
strb w0, [sp, 15]
strb w1, [sp, 14]
strb w2, [sp, 13]
ldrb w0, [sp, 13]
lsl w0, w0, 10
and w0, w0, 65535
and w0, w0, 31744
strh w0, [sp, 30]
ldrb w0, [sp, 14]
lsl w0, w0, 5
sxth w0, w0
and w0, w0, 992
sxth w1, w0
ldrsh w0, [sp, 30]
orr w0, w1, w0
sxth w0, w0
strh w0, [sp, 30]
ldrb w0, [sp, 15]
sxth w0, w0
and w0, w0, 31
sxth w1, w0
ldrsh w0, [sp, 30]
orr w0, w1, w0
sxth w0, w0
strh w0, [sp, 30]
ldrh w0, [sp, 30]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size get_color, .-get_color
.align 2
.global set_pixel
.type set_pixel, %function
set_pixel:
.LFB1:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
str w1, [sp, 8]
strh w2, [sp, 6]
adrp x0, vram
add x0, x0, :lo12:vram
ldr x2, [x0]
ldr w1, [sp, 8]
mov w0, w1
lsl w0, w0, 4
sub w0, w0, w1
lsl w0, w0, 4
mov w1, w0
ldr w0, [sp, 12]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 1
add x0, x2, x0
ldrh w1, [sp, 6]
strh w1, [x0]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size set_pixel, .-set_pixel
.align 2
.global main
.type main, %function
main:
.LFB2:
.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, display_control
add x0, x0, :lo12:display_control
ldr x0, [x0]
mov w1, 1027
str w1, [x0]
mov w2, 10
mov w1, 0
mov w0, 0
bl get_color
strh w0, [sp, 22]
str wzr, [sp, 24]
b .L5
.L8:
str wzr, [sp, 28]
b .L6
.L7:
ldrh w2, [sp, 22]
ldr w1, [sp, 28]
ldr w0, [sp, 24]
bl set_pixel
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L6:
ldr w0, [sp, 28]
cmp w0, 159
ble .L7
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L5:
ldr w0, [sp, 24]
cmp w0, 239
ble .L8
.L9:
b .L9
.cfi_endproc
.LFE2:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global strToInt
.type strToInt, %function
strToInt:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str wzr, [sp, 20]
str wzr, [sp, 24]
ldr x0, [sp, 8]
ldrb w0, [x0]
cmp w0, 45
bne .L2
mov w0, 1
str w0, [sp, 16]
b .L3
.L5:
ldrsw x0, [sp, 16]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
sub w0, w0, #48
str w0, [sp, 28]
ldr w1, [sp, 24]
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 28]
add w0, w0, w1
str w0, [sp, 24]
ldr w0, [sp, 24]
neg w0, w0
str w0, [sp, 20]
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L3:
ldrsw x0, [sp, 16]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 47
bls .L4
ldrsw x0, [sp, 16]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 57
bls .L5
b .L4
.L2:
str wzr, [sp, 16]
b .L6
.L7:
ldrsw x0, [sp, 16]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
sub w0, w0, #48
str w0, [sp, 28]
ldr w1, [sp, 20]
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 28]
add w0, w0, w1
str w0, [sp, 20]
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L6:
ldrsw x0, [sp, 16]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 47
bls .L4
ldrsw x0, [sp, 16]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 57
bls .L7
.L4:
ldr w0, [sp, 20]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size strToInt, .-strToInt
.section .rodata
.align 3
.LC0:
.string "245"
.align 3
.LC1:
.string "%i\n"
.align 3
.LC2:
.string "100"
.align 3
.LC3:
.string "13x5"
.align 3
.LC4:
.string "-100"
.align 3
.LC5:
.string "test = %i\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
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl strToInt
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl strToInt
add w0, w0, 25
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strToInt
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl strToInt
add w0, w0, 25
mov w1, w0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
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 strstr
.type strstr, %function
strstr:
.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 x1, [sp, 16]
ldr x0, [sp, 24]
str x0, [sp, 32]
ldr x0, [sp, 16]
bl strlen
str x0, [sp, 40]
b .L2
.L5:
ldr x2, [sp, 40]
ldr x1, [sp, 16]
ldr x0, [sp, 32]
bl strncmp
cmp w0, 0
bne .L3
ldr x0, [sp, 32]
b .L4
.L3:
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
.L2:
ldr x0, [sp, 16]
ldrb w0, [x0]
mov w1, w0
ldr x0, [sp, 32]
bl strchr
str x0, [sp, 32]
ldr x0, [sp, 32]
cmp x0, 0
bne .L5
mov x0, 0
.L4:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size strstr, .-strstr
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Not enough input arguments."
.align 3
.LC1:
.string "gethostbyname error!"
.align 3
.LC2:
.string "socket error!"
.align 3
.LC3:
.string "connect error!"
.align 3
.LC4:
.string "connect success."
.align 3
.LC5:
.string "GET %s HTTP/1.0\r\n\r\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
mov x12, 5200
sub sp, sp, x12
.cfi_def_cfa_offset 5200
stp x29, x30, [sp]
.cfi_offset 29, -5200
.cfi_offset 30, -5192
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, 5192]
mov x1, 0
ldr w0, [sp, 28]
cmp w0, 4
beq .L2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
mov w0, -1
b .L7
.L2:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl gethostbyname
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
bne .L4
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
mov w0, -2
b .L7
.L4:
ldr x0, [sp, 16]
add x0, x0, 16
ldr x0, [x0]
bl atoi
str w0, [sp, 32]
mov w2, 0
mov w1, 1
mov w0, 2
bl socket
str w0, [sp, 36]
ldr w0, [sp, 36]
cmn w0, #1
bne .L5
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
mov w0, -3
b .L7
.L5:
mov w0, 2
strh w0, [sp, 56]
ldr w0, [sp, 32]
and w0, w0, 65535
bl htons
and w0, w0, 65535
strh w0, [sp, 58]
ldr x0, [sp, 48]
ldr x0, [x0, 24]
ldr x0, [x0]
ldr w0, [x0]
str w0, [sp, 60]
add x0, sp, 56
mov w2, 16
mov x1, x0
ldr w0, [sp, 36]
bl connect
cmn w0, #1
bne .L6
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
ldr w0, [sp, 36]
bl close
mov w0, -4
b .L7
.L6:
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
add x0, sp, 72
mov x2, 1024
mov w1, 0
bl memset
ldr x0, [sp, 16]
add x0, x0, 24
ldr x0, [x0]
add x3, sp, 72
mov x2, x0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
mov x0, x3
bl sprintf
add x0, sp, 72
bl strlen
mov x1, x0
add x0, sp, 72
mov w3, 0
mov x2, x1
mov x1, x0
ldr w0, [sp, 36]
bl send
str w0, [sp, 40]
add x0, sp, 1096
mov x2, 4096
mov w1, 0
bl memset
add x0, sp, 1096
mov w3, 0
mov x2, 4096
mov x1, x0
ldr w0, [sp, 36]
bl recv
str w0, [sp, 44]
add x0, sp, 1096
bl puts
ldr w0, [sp, 36]
bl close
mov w0, 0
.L7:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 5192]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L8
bl __stack_chk_fail
.L8:
mov w0, w1
ldp x29, x30, [sp]
mov x12, 5200
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.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 f
.type f, %function
f:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
str w1, [sp, 4]
ldr w0, [sp, 4]
cmp w0, 0
bne .L2
ldr x0, [sp, 8]
ldr w0, [x0]
mov w1, 1
sdiv w0, w1, w0
b .L3
.L2:
mov w0, 0
.L3:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size f, .-f
.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
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
str wzr, [sp, 20]
add x0, sp, 20
mov w1, 1
bl f
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 .L6
bl __stack_chk_fail
.L6:
mov w0, w1
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 SIMConf_C
.type SIMConf_C, %function
SIMConf_C:
.LFB0:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE0:
.size SIMConf_C, .-SIMConf_C
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global y
.bss
.align 3
.type y, %object
.size y, 28
y:
.zero 28
.global w
.align 3
.type w, %object
.size w, 112
w:
.zero 112
.global zerol
.align 3
.type zerol, %object
.size zerol, 0
zerol:
.section .rodata
.align 3
.LC0:
.string "a"
.align 3
.LC1:
.string "b"
.align 3
.LC2:
.string "ab"
.align 3
.LC3:
.string "cd"
.align 3
.LC4:
.string "abcd"
.string "efg"
.align 3
.LC5:
.string "a"
.string ""
.string ""
.string "b"
.string ""
.string ""
.string "c"
.string ""
.string ""
.string "d"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "e"
.string ""
.string ""
.string "f"
.string ""
.string ""
.string "g"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.text
.align 2
.global test1
.type test1, %function
test1:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -192]!
.cfi_def_cfa_offset 192
.cfi_offset 29, -192
.cfi_offset 30, -184
mov x29, sp
.cfi_def_cfa_register 29
stp x19, x20, [sp, 16]
stp x21, x22, [sp, 32]
stp x23, x24, [sp, 48]
stp x25, x26, [sp, 64]
sub sp, sp, #16
.cfi_offset 19, -176
.cfi_offset 20, -168
.cfi_offset 21, -160
.cfi_offset 22, -152
.cfi_offset 23, -144
.cfi_offset 24, -136
.cfi_offset 25, -128
.cfi_offset 26, -120
str x0, [x29, 88]
str w1, [x29, 84]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 184]
mov x1, 0
mov x0, sp
mov x26, x0
add x0, x29, 152
add x0, x0, 3
str x0, [x29, 112]
ldr w0, [x29, 84]
add w0, w0, 10
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 120]
sxtw x1, w0
mov x20, x1
mov x21, 0
lsr x1, x20, 61
lsl x13, x21, 3
orr x13, x1, x13
lsl x12, x20, 3
sxtw x1, w0
mov x18, x1
mov x19, 0
lsr x1, x18, 61
lsl x11, x19, 3
orr x11, x1, x11
lsl x10, x18, 3
sxtw x0, w0
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L2:
cmp sp, x1
beq .L3
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L2
.L3:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L4
str xzr, [sp, 1024]
.L4:
add x0, sp, 16
add x0, x0, 0
str x0, [x29, 128]
ldr w0, [x29, 84]
add w10, w0, 10
sxtw x0, w10
sub x0, x0, #1
str x0, [x29, 136]
sxtw x0, w10
mov x24, x0
mov x25, 0
mov x0, x24
mov x1, x25
lsr x11, x0, 61
lsl x9, x1, 3
orr x9, x11, x9
lsl x8, x0, 3
mov x0, x8
mov x1, x9
subs x8, x0, x24
sbc x0, x1, x25
mov x16, x8
mov x17, x0
lsr x0, x16, 59
lsl x7, x17, 5
orr x7, x0, x7
lsl x6, x16, 5
sxtw x0, w10
mov x22, x0
mov x23, 0
mov x0, x22
mov x1, x23
lsr x6, x0, 61
lsl x5, x1, 3
orr x5, x6, x5
lsl x4, x0, 3
mov x0, x4
mov x1, x5
subs x4, x0, x22
sbc x0, x1, x23
mov x14, x4
mov x15, x0
lsr x0, x14, 59
lsl x3, x15, 5
orr x3, x0, x3
lsl x2, x14, 5
sxtw x1, w10
mov x0, x1
lsl x0, x0, 3
sub x0, x0, x1
lsl x0, x0, 2
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L5:
cmp sp, x1
beq .L6
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L5
.L6:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L7
str xzr, [sp, 1024]
.L7:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 144]
ldr w0, [x29, 84]
cmp w0, 0
bge .L8
add x0, x29, 152
add x0, x0, 9
str x0, [x29, 104]
b .L9
.L8:
add x0, x29, 152
add x0, x0, 17
str x0, [x29, 104]
.L9:
mov x0, 0
cmp x0, 7
beq .L10
bl abort
.L10:
mov x0, 0
cmp x0, 0
beq .L11
bl abort
.L11:
mov x0, 0
cmp x0, 1
beq .L12
bl abort
.L12:
ldr w0, [x29, 84]
cmp w0, 5
bgt .L13
adrp x0, w+57
add x0, x0, :lo12:w+57
str x0, [x29, 104]
b .L14
.L13:
add x0, x29, 152
add x0, x0, 6
str x0, [x29, 104]
.L14:
mov x0, 0
cmp x0, 4
beq .L15
bl abort
.L15:
ldr w0, [x29, 84]
cmp w0, 19
bgt .L16
mov x0, 30
bl malloc
str x0, [x29, 104]
b .L17
.L16:
mov x1, 16
mov x0, 2
bl calloc
str x0, [x29, 104]
.L17:
mov x0, 0
cmp x0, 30
beq .L18
bl abort
.L18:
ldr w0, [x29, 84]
cmp w0, 19
bgt .L19
mov x0, 30
bl malloc
str x0, [x29, 104]
b .L20
.L19:
mov x1, 14
mov x0, 2
bl calloc
str x0, [x29, 104]
.L20:
mov x0, 0
cmp x0, 28
beq .L21
bl abort
.L21:
ldr w0, [x29, 84]
cmp w0, 29
bgt .L22
mov x0, 28
bl malloc
str x0, [x29, 104]
b .L23
.L22:
add x0, x29, 152
add x0, x0, 3
str x0, [x29, 104]
.L23:
mov x0, 0
cmp x0, 7
beq .L24
bl abort
.L24:
mov x2, 2
adrp x0, .LC0
add x1, x0, :lo12:.LC0
ldr x0, [x29, 104]
bl memcpy
str x0, [x29, 104]
mov x0, 0
cmp x0, 7
beq .L25
bl abort
.L25:
ldr x0, [x29, 104]
add x3, x0, 2
mov x2, 2
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x3
bl memcpy
add x0, x0, 2
str x0, [x29, 104]
mov x0, 0
cmp x0, 3
beq .L26
bl abort
.L26:
add x0, x29, 152
add x0, x0, 4
str x0, [x29, 104]
mov x2, 2
mov w1, 97
ldr x0, [x29, 104]
bl memset
str x0, [x29, 104]
mov x0, 0
cmp x0, 6
beq .L27
bl abort
.L27:
ldr x0, [x29, 104]
add x0, x0, 2
mov x2, 2
mov w1, 98
bl memset
add x0, x0, 2
str x0, [x29, 104]
mov x0, 0
cmp x0, 2
beq .L28
bl abort
.L28:
add x0, x29, 152
add x0, x0, 1
str x0, [x29, 104]
ldr x0, [x29, 104]
adrp x1, .LC2
add x2, x1, :lo12:.LC2
mov x1, x0
ldrh w3, [x2]
strh w3, [x1]
ldrb w2, [x2, 2]
strb w2, [x1, 2]
str x0, [x29, 104]
mov x0, 0
cmp x0, 9
beq .L29
bl abort
.L29:
ldr x0, [x29, 104]
add x3, x0, 2
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x3
ldrh w2, [x1]
strh w2, [x0]
ldrb w1, [x1, 2]
strb w1, [x0, 2]
mov x0, x3
add x0, x0, 2
str x0, [x29, 104]
mov x0, 0
cmp x0, 5
beq .L30
bl abort
.L30:
mov x0, 0
cmp x0, 0
beq .L31
bl abort
.L31:
mov x0, 0
cmp x0, 20
beq .L32
bl abort
.L32:
mov x0, 0
cmp x0, 0
beq .L33
bl abort
.L33:
mov x0, 0
cmp x0, 0
beq .L34
bl abort
.L34:
mov x0, 0
cmp x0, 0
beq .L35
bl abort
.L35:
mov x0, 0
cmp x0, 0
beq .L36
bl abort
.L36:
mov x0, 0
cmp x0, 0
beq .L37
bl abort
.L37:
mov x0, 0
cmp x0, 0
beq .L38
bl abort
.L38:
mov x0, 0
cmp x0, 0
beq .L39
bl abort
.L39:
mov x0, 0
cmp x0, 0
beq .L40
bl abort
.L40:
mov x0, 0
cmp x0, 10
beq .L41
bl abort
.L41:
mov x0, 0
cmp x0, 10
beq .L42
bl abort
.L42:
mov x0, 0
cmp x0, 6
beq .L43
bl abort
.L43:
mov x0, 0
cmp x0, 4
beq .L44
bl abort
.L44:
mov x0, 0
cmp x0, 3
beq .L45
bl abort
.L45:
mov x0, 0
cmp x0, 4
beq .L46
bl abort
.L46:
adrp x0, .LC5
add x0, x0, :lo12:.LC5
str x0, [x29, 104]
mov x0, 0
cmp x0, 34
beq .L47
bl abort
.L47:
mov sp, x26
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [x29, 184]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L48
bl __stack_chk_fail
.L48:
mov sp, x29
ldp x19, x20, [sp, 16]
ldp x21, x22, [sp, 32]
ldp x23, x24, [sp, 48]
ldp x25, x26, [sp, 64]
ldp x29, x30, [sp], 192
.cfi_restore 30
.cfi_restore 29
.cfi_restore 25
.cfi_restore 26
.cfi_restore 23
.cfi_restore 24
.cfi_restore 21
.cfi_restore 22
.cfi_restore 19
.cfi_restore 20
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE0:
.size test1, .-test1
.global l1
.data
.align 3
.type l1, %object
.size l1, 8
l1:
.xword 1
.text
.align 2
.global test2
.type test2, %function
test2:
.LFB1:
.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
add x0, sp, 64
str x0, [sp, 32]
str wzr, [sp, 28]
b .L50
.L55:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
sub x0, x0, #1
cmp x1, x0
bne .L51
add x0, sp, 40
add x0, x0, 1
str x0, [sp, 32]
b .L52
.L51:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
cmp x1, x0
bne .L53
add x0, sp, 40
add x0, x0, 17
str x0, [sp, 32]
b .L52
.L53:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
add x0, x0, 1
cmp x1, x0
bne .L54
add x0, sp, 64
add x0, x0, 5
str x0, [sp, 32]
b .L52
.L54:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
add x0, x0, 2
cmp x1, x0
bne .L52
add x0, sp, 40
add x0, x0, 9
str x0, [sp, 32]
.L52:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L50:
ldr w0, [sp, 28]
cmp w0, 3
ble .L55
mov x0, 0
cmp x0, 1
beq .L56
bl abort
.L56:
add x0, sp, 64
add x0, x0, 20
str x0, [sp, 32]
str wzr, [sp, 28]
b .L57
.L62:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
sub x0, x0, #1
cmp x1, x0
bne .L58
add x0, sp, 40
add x0, x0, 7
str x0, [sp, 32]
b .L59
.L58:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
cmp x1, x0
bne .L60
add x0, sp, 40
add x0, x0, 17
str x0, [sp, 32]
b .L59
.L60:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
add x0, x0, 1
cmp x1, x0
bne .L61
add x0, sp, 64
add x0, x0, 5
str x0, [sp, 32]
b .L59
.L61:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
add x0, x0, 2
cmp x1, x0
bne .L59
add x0, sp, 40
add x0, x0, 9
str x0, [sp, 32]
.L59:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L57:
ldr w0, [sp, 28]
cmp w0, 3
ble .L62
mov x0, 0
cmp x0, 0
beq .L63
bl abort
.L63:
add x0, sp, 64
add x0, x0, 1
str x0, [sp, 32]
str wzr, [sp, 28]
b .L64
.L69:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
sub x0, x0, #1
cmp x1, x0
bne .L65
add x0, sp, 40
add x0, x0, 6
str x0, [sp, 32]
b .L66
.L65:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
cmp x1, x0
bne .L67
add x0, sp, 40
add x0, x0, 14
str x0, [sp, 32]
b .L66
.L67:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
add x0, x0, 1
cmp x1, x0
bne .L68
add x0, sp, 64
add x0, x0, 5
str x0, [sp, 32]
b .L66
.L68:
ldrsw x1, [sp, 28]
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
add x0, x0, 2
cmp x1, x0
bne .L66
add x0, sp, 40
add x0, x0, 2
str x0, [sp, 32]
.L66:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L64:
ldr w0, [sp, 28]
cmp w0, 3
ble .L69
mov x0, 0
cmp x0, 4
beq .L70
bl abort
.L70:
ldr x0, [sp, 32]
add x0, x0, 2
str x0, [sp, 32]
mov x0, 0
cmp x0, 2
beq .L71
bl abort
.L71:
mov x0, 0
cmp x0, 1
beq .L49
bl abort
.L49:
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 88]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L74
bl __stack_chk_fail
.L74:
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size test2, .-test2
.align 2
.global test3
.type test3, %function
test3:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -192]!
.cfi_def_cfa_offset 192
.cfi_offset 29, -192
.cfi_offset 30, -184
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 184]
mov x1, 0
add x0, sp, 48
add x0, x0, 104
str x0, [sp, 24]
mov x0, 0
cmp x0, 8
beq .L76
bl abort
.L76:
add x0, sp, 48
add x0, x0, 104
add x0, x0, 8
str x0, [sp, 24]
mov x0, 0
cmp x0, 8
beq .L77
bl abort
.L77:
add x0, sp, 16
str x0, [sp, 24]
mov x0, 0
cmp x0, 8
beq .L78
bl abort
.L78:
add x0, sp, 32
str x0, [sp, 24]
mov x0, 0
cmp x0, 8
beq .L79
bl abort
.L79:
add x0, sp, 32
add x0, x0, 8
str x0, [sp, 24]
mov x0, 0
cmp x0, 8
beq .L82
bl abort
.L82:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 184]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L81
bl __stack_chk_fail
.L81:
ldp x29, x30, [sp], 192
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size test3, .-test3
.align 2
.global test4
.type test4, %function
test4:
.LFB3:
.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]
mov w19, 0
b .L84
.L86:
ldr x0, [sp, 40]
str x0, [sp, 56]
ldr x0, [sp, 56]
add x0, x0, 28
str x0, [sp, 40]
mov x0, 0
cmp x0, 0
beq .L85
bl abort
.L85:
add w19, w19, 1
.L84:
ldr w0, [sp, 36]
cmp w19, w0
blt .L86
ldr x0, [sp, 40]
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
.LFE3:
.size test4, .-test4
.align 2
.global test5
.type test5, %function
test5:
.LFB4:
.cfi_startproc
stp x29, x30, [sp, -192]!
.cfi_def_cfa_offset 192
.cfi_offset 29, -192
.cfi_offset 30, -184
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, 184]
mov x1, 0
add x0, sp, 56
add x0, x0, 8
str x0, [sp, 40]
str xzr, [sp, 48]
b .L89
.L90:
ldr x0, [sp, 40]
add x0, x0, 4
str x0, [sp, 40]
ldr x0, [sp, 48]
add x0, x0, 1
str x0, [sp, 48]
.L89:
ldr x1, [sp, 48]
ldr x0, [sp, 24]
cmp x1, x0
bcc .L90
mov x0, 0
cmp x0, 0
beq .L91
bl abort
.L91:
mov x2, 40
mov w1, 32
ldr x0, [sp, 40]
bl memset
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 184]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L92
bl __stack_chk_fail
.L92:
ldp x29, x30, [sp], 192
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size test5, .-test5
.align 2
.global test6
.type test6, %function
test6:
.LFB5:
.cfi_startproc
stp x29, x30, [sp, -240]!
.cfi_def_cfa_offset 240
.cfi_offset 29, -240
.cfi_offset 30, -232
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 232]
mov x1, 0
add x0, sp, 168
add x0, x0, 64
str x0, [sp, 24]
add x0, sp, 40
add x0, x0, 64
str x0, [sp, 32]
mov x0, 0
cmp x0, 0
beq .L94
bl abort
.L94:
mov x0, 0
cmp x0, 0
beq .L95
bl abort
.L95:
mov x0, 0
cmp x0, 0
beq .L98
bl abort
.L98:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 232]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L97
bl __stack_chk_fail
.L97:
ldp x29, x30, [sp], 240
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE5:
.size test6, .-test6
.align 2
.global test7
.type test7, %function
test7:
.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
add x0, sp, 32
add x0, x0, 6
str x0, [sp, 16]
add x0, sp, 32
add x0, x0, 10
str x0, [sp, 24]
mov x0, 0
cmp x0, 0
beq .L100
bl abort
.L100:
mov x0, 0
cmp x0, 10
beq .L101
bl abort
.L101:
add x0, sp, 32
add x0, x0, 10
str x0, [sp, 24]
mov x0, 0
cmp x0, 0
beq .L102
bl abort
.L102:
add x0, sp, 32
add x0, x0, 11
str x0, [sp, 24]
mov x0, 0
cmp x0, 0
beq .L103
bl abort
.L103:
add x0, sp, 32
sub x0, x0, #4
str x0, [sp, 16]
mov x0, 0
cmp x0, 0
beq .L106
bl abort
.L106:
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 .L105
bl __stack_chk_fail
.L105:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size test7, .-test7
.align 2
.global main
.type main, %function
main:
.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
adrp x0, l1
add x0, x0, :lo12:l1
ldr x0, [x0]
adrp x1, l1
add x1, x1, :lo12:l1
str x0, [x1]
mov w1, 6
adrp x0, main
add x0, x0, :lo12:main
bl test1
bl test2
bl test3
add x0, sp, 16
mov w1, 10
bl test4
mov x0, 4
bl test5
bl test6
bl test7
mov w0, 0
bl exit
.cfi_endproc
.LFE7:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global fabs
.type fabs, %function
fabs:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str d0, [sp, 8]
ldr d0, [sp, 8]
fcmpe d0, #0.0
bmi .L5
b .L2
.L5:
ldr d0, [sp, 8]
fneg d0, d0
str d0, [sp, 8]
.L2:
ldr d0, [sp, 8]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size fabs, .-fabs
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global arr
.data
.align 3
.type arr, %object
.size arr, 28
arr:
.word 64
.word 34
.word 25
.word 12
.word 22
.word 11
.word 90
.global size
.align 2
.type size, %object
.size size, 4
size:
.word 28
.text
.align 2
.global bubbleSort
.type bubbleSort, %function
bubbleSort:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
adrp x0, size
add x0, x0, :lo12:size
ldr w0, [x0]
str w0, [sp, 4]
b .L2
.L7:
str wzr, [sp, 8]
b .L3
.L6:
ldr w0, [sp, 8]
add w1, w0, 1
adrp x0, arr
add x0, x0, :lo12:arr
sxtw x1, w1
ldr w1, [x0, x1, lsl 2]
adrp x0, arr
add x0, x0, :lo12:arr
ldrsw x2, [sp, 8]
ldr w0, [x0, x2, lsl 2]
cmp w1, w0
bge .L8
adrp x0, arr
add x0, x0, :lo12:arr
ldrsw x1, [sp, 8]
ldr w0, [x0, x1, lsl 2]
str w0, [sp, 12]
ldr w0, [sp, 8]
add w1, w0, 1
adrp x0, arr
add x0, x0, :lo12:arr
sxtw x1, w1
ldr w2, [x0, x1, lsl 2]
adrp x0, arr
add x0, x0, :lo12:arr
ldrsw x1, [sp, 8]
str w2, [x0, x1, lsl 2]
ldr w0, [sp, 8]
add w1, w0, 1
adrp x0, arr
add x0, x0, :lo12:arr
sxtw x1, w1
ldr w2, [sp, 12]
str w2, [x0, x1, lsl 2]
b .L5
.L8:
nop
.L5:
ldr w0, [sp, 8]
add w0, w0, 1
str w0, [sp, 8]
.L3:
ldr w1, [sp, 8]
ldr w0, [sp, 4]
cmp w1, w0
blt .L6
ldr w0, [sp, 4]
sub w0, w0, #1
str w0, [sp, 4]
.L2:
ldr w0, [sp, 4]
cmp w0, 0
bgt .L7
nop
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size bubbleSort, .-bubbleSort
.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
str wzr, [sp, 28]
b .L10
.L11:
adrp x0, arr
add x0, x0, :lo12:arr
ldrsw x1, [sp, 28]
ldr w0, [x0, x1, lsl 2]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L10:
adrp x0, size
add x0, x0, :lo12:size
ldr w0, [x0]
sub w0, w0, #1
ldr w1, [sp, 28]
cmp w1, w0
blt .L11
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
.section .rodata
.align 3
.LC0:
.string "-- No space left --"
.align 3
.LC1:
.string "Enter day and reminder: "
.align 3
.LC2:
.string "%2d"
.align 3
.LC3:
.string "\nDay Reminder"
.align 3
.LC4:
.string " %s\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
sub sp, sp, #512
.cfi_def_cfa_offset 512
stp x29, x30, [sp]
.cfi_offset 29, -512
.cfi_offset 30, -504
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 504]
mov x1, 0
str wzr, [sp, 28]
.L12:
ldr w0, [sp, 28]
cmp w0, 50
bne .L2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
b .L3
.L2:
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
add x0, sp, 16
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
ldr w0, [sp, 16]
cmp w0, 0
beq .L17
ldr w0, [sp, 16]
add x3, sp, 432
mov w2, w0
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x3
bl sprintf
add x0, sp, 440
mov w1, 60
bl read_line
str wzr, [sp, 20]
b .L5
.L8:
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x1, sp, 32
ldr x1, [x1, x0]
add x0, sp, 432
bl strcmp
cmp w0, 0
blt .L18
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L5:
ldr w1, [sp, 20]
ldr w0, [sp, 28]
cmp w1, w0
blt .L8
b .L7
.L18:
nop
.L7:
ldr w0, [sp, 28]
str w0, [sp, 24]
b .L9
.L10:
ldr w0, [sp, 24]
sub w0, w0, #1
sxtw x0, w0
lsl x0, x0, 3
add x1, sp, 32
ldr x2, [x1, x0]
ldrsw x0, [sp, 24]
lsl x0, x0, 3
add x1, sp, 32
str x2, [x1, x0]
ldr w0, [sp, 24]
sub w0, w0, #1
str w0, [sp, 24]
.L9:
ldr w1, [sp, 24]
ldr w0, [sp, 20]
cmp w1, w0
bgt .L10
add x0, sp, 440
bl strlen
add x0, x0, 3
bl malloc
mov x2, x0
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x1, sp, 32
str x2, [x1, x0]
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x1, sp, 32
ldr x0, [x1, x0]
cmp x0, 0
bne .L11
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
b .L3
.L11:
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x1, sp, 32
ldr x0, [x1, x0]
add x1, sp, 432
bl strcpy
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x1, sp, 32
ldr x0, [x1, x0]
add x1, sp, 440
bl strcat
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
b .L12
.L17:
nop
.L3:
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
str wzr, [sp, 20]
b .L13
.L14:
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x1, sp, 32
ldr x0, [x1, x0]
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L13:
ldr w1, [sp, 20]
ldr w0, [sp, 28]
cmp w1, w0
blt .L14
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 504]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L16
bl __stack_chk_fail
.L16:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 512
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.align 2
.global read_line
.type read_line, %function
read_line:
.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 w1, [sp, 20]
str wzr, [sp, 40]
b .L20
.L21:
ldr w1, [sp, 40]
ldr w0, [sp, 20]
cmp w1, w0
bge .L20
ldr w0, [sp, 40]
add w1, w0, 1
str w1, [sp, 40]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [sp, 44]
and w1, w1, 255
strb w1, [x0]
.L20:
bl getchar
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 10
bne .L21
ldrsw x0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
strb wzr, [x0]
ldr w0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size read_line, .-read_line
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%c%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
b .L2
.L6:
ldr w0, [sp, 28]
cmp w0, 9
bne .L3
mov w2, 116
mov w1, 92
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L3:
ldr w0, [sp, 28]
cmp w0, 8
bne .L4
mov w2, 98
mov w1, 92
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L4:
ldr w0, [sp, 28]
cmp w0, 92
bne .L5
mov w2, 92
mov w1, 92
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
b .L2
.L5:
ldr w0, [sp, 28]
bl putchar
.L2:
bl getchar
str w0, [sp, 28]
ldr w0, [sp, 28]
cmn w0, #1
bne .L6
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
.align 2
.global INCOMING_MAILBOX_REG
.type INCOMING_MAILBOX_REG, %function
INCOMING_MAILBOX_REG:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
add w0, w0, 4
lsl w0, w0, 2
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size INCOMING_MAILBOX_REG, .-INCOMING_MAILBOX_REG
.align 2
.global INBOX_BYTE_BITS
.type INBOX_BYTE_BITS, %function
INBOX_BYTE_BITS:
.LFB1:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
lsl w0, w0, 8
and w0, w0, 768
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size INBOX_BYTE_BITS, .-INBOX_BYTE_BITS
.align 2
.global INBOX_SELECT_BITS
.type INBOX_SELECT_BITS, %function
INBOX_SELECT_BITS:
.LFB2:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
lsl w0, w0, 10
and w0, w0, 3072
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size INBOX_SELECT_BITS, .-INBOX_SELECT_BITS
.align 2
.global OUTBOX_BYTE_BITS
.type OUTBOX_BYTE_BITS, %function
OUTBOX_BYTE_BITS:
.LFB3:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
and w0, w0, 3
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size OUTBOX_BYTE_BITS, .-OUTBOX_BYTE_BITS
.align 2
.global OUTBOX_SELECT_BITS
.type OUTBOX_SELECT_BITS, %function
OUTBOX_SELECT_BITS:
.LFB4:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
lsl w0, w0, 2
and w0, w0, 12
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size OUTBOX_SELECT_BITS, .-OUTBOX_SELECT_BITS
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global ft_print_reverse_alphabet
.type ft_print_reverse_alphabet, %function
ft_print_reverse_alphabet:
.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
mov w0, 122
strb w0, [sp, 23]
b .L2
.L3:
add x0, sp, 23
mov x2, 1
mov x1, x0
mov w0, 1
bl write
ldrb w0, [sp, 23]
sub w0, w0, #1
and w0, w0, 255
strb w0, [sp, 23]
.L2:
ldrb w0, [sp, 23]
cmp w0, 96
bhi .L3
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 .L4
bl __stack_chk_fail
.L4:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size ft_print_reverse_alphabet, .-ft_print_reverse_alphabet
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "TAP version 13"
.text
.align 2
.global print_version
.type print_version, %function
print_version:
.LFB6:
.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
.LFE6:
.size print_version, .-print_version
.section .rodata
.align 3
.LC1:
.string "#"
.align 3
.LC2:
.string "1..%d\n"
.align 3
.LC3:
.string "# total %d\n"
.align 3
.LC4:
.string "# pass %d\n"
.align 3
.LC5:
.string "# ok"
.text
.align 2
.global print_summary
.type print_summary, %function
print_summary:
.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 w0, [sp, 28]
str w1, [sp, 24]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
ldr w1, [sp, 28]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w1, [sp, 28]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr w1, [sp, 24]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size print_summary, .-print_summary
.section .rodata
.align 3
.LC6:
.string " ---"
.align 3
.LC7:
.string " iterations: %d\n"
.align 3
.LC8:
.string " elapsed: %0.9f\n"
.align 3
.LC9:
.string " rate: %0.9f\n"
.align 3
.LC10:
.string " ..."
.text
.align 2
.global print_results
.type print_results, %function
print_results:
.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 d0, [sp, 24]
ldr d0, [sp, 24]
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d1, x0
fdiv d0, d1, d0
str d0, [sp, 40]
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
mov w1, 16960
movk w1, 0xf, lsl 16
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
ldr d0, [sp, 24]
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
ldr d0, [sp, 40]
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl puts
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size print_results, .-print_results
.align 2
.global tic
.type tic, %function
tic:
.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
add x0, sp, 24
mov x1, 0
bl gettimeofday
ldr d0, [sp, 24]
scvtf d1, d0
ldr d0, [sp, 32]
scvtf d0, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d2, x0
fdiv d0, d0, d2
fadd d0, d1, d0
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 .L6
bl __stack_chk_fail
.L6:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size tic, .-tic
.align 2
.global rand_double
.type rand_double, %function
rand_double:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
bl rand
str w0, [sp, 28]
ldr w0, [sp, 28]
scvtf d0, w0
mov x0, 4746794007248502784
fmov d1, x0
fdiv d0, d0, d1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size rand_double, .-rand_double
.section .rodata
.align 3
.LC11:
.string "should not return NaN"
.text
.align 2
.global benchmark
.type benchmark, %function
benchmark:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
bl tic
str d0, [sp, 40]
str wzr, [sp, 28]
b .L10
.L13:
bl rand_double
fadd d1, d0, d0
fmov d0, 1.0e+0
fsub d0, d1, d0
str d0, [sp, 48]
ldr d0, [sp, 48]
bl acos
str d0, [sp, 32]
ldr d1, [sp, 32]
ldr d0, [sp, 32]
fcmp d1, d0
beq .L11
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl puts
b .L12
.L11:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L10:
ldr w1, [sp, 28]
mov w0, 16959
movk w0, 0xf, lsl 16
cmp w1, w0
ble .L13
.L12:
bl tic
fmov d1, d0
ldr d0, [sp, 40]
fsub d0, d1, d0
str d0, [sp, 56]
ldr d1, [sp, 32]
ldr d0, [sp, 32]
fcmp d1, d0
beq .L14
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl puts
.L14:
ldr d0, [sp, 56]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size benchmark, .-benchmark
.section .rodata
.align 3
.LC12:
.string "acos"
.align 3
.LC13:
.string "# c::%s\n"
.align 3
.LC14:
.string "ok %d benchmark finished\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
mov x0, 0
bl time
bl srand
bl print_version
str wzr, [sp, 20]
b .L17
.L18:
adrp x0, .LC12
add x1, x0, :lo12:.LC12
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl printf
bl benchmark
str d0, [sp, 24]
ldr d0, [sp, 24]
bl print_results
ldr w0, [sp, 20]
add w0, w0, 1
mov w1, w0
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl printf
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L17:
ldr w0, [sp, 20]
cmp w0, 2
ble .L18
mov w1, 3
mov w0, 3
bl print_summary
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global SumR
.type SumR, %function
SumR:
.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]
str w1, [sp, 20]
adrp x0, iCnt.1
add x0, x0, :lo12:iCnt.1
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
ble .L2
adrp x0, iCnt.1
add x0, x0, :lo12:iCnt.1
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [x0]
adrp x0, iSum.0
add x0, x0, :lo12:iSum.0
ldr w0, [x0]
add w1, w1, w0
adrp x0, iSum.0
add x0, x0, :lo12:iSum.0
str w1, [x0]
adrp x0, iCnt.1
add x0, x0, :lo12:iCnt.1
ldr w0, [x0]
add w1, w0, 1
adrp x0, iCnt.1
add x0, x0, :lo12:iCnt.1
str w1, [x0]
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl SumR
.L2:
adrp x0, iSum.0
add x0, x0, :lo12:iSum.0
ldr w0, [x0]
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size SumR, .-SumR
.section .rodata
.align 3
.LC0:
.string "Enter Number Of Elements : "
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "Enter The Elements : "
.align 3
.LC3:
.string "Addition is : %d"
.text
.align 2
.global main
.type main, %function
main:
.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
str xzr, [sp, 32]
str wzr, [sp, 28]
str wzr, [sp, 20]
str wzr, [sp, 24]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 20]
sxtw x0, w0
lsl x0, x0, 2
bl malloc
str x0, [sp, 32]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
b .L5
.L6:
ldrsw x0, [sp, 24]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L5:
ldr w0, [sp, 20]
ldr w1, [sp, 24]
cmp w1, w0
blt .L6
ldr w0, [sp, 20]
mov w1, w0
ldr x0, [sp, 32]
bl SumR
str w0, [sp, 28]
ldr w1, [sp, 28]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr x0, [sp, 32]
bl free
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 .L8
bl __stack_chk_fail
.L8:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size main, .-main
.local iCnt.1
.comm iCnt.1,4,4
.local iSum.0
.comm iSum.0,4,4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Goodbye"
.align 3
.LC1:
.string "World"
.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
adrp x0, .LC0
add x0, x0, :lo12:.LC0
str x0, [sp, 40]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
str x0, [sp, 48]
add x4, sp, 24
ldr x3, [sp, 40]
adrp x0, print_message_function
add x2, x0, :lo12:print_message_function
mov x1, 0
mov x0, x4
bl pthread_create
add x4, sp, 32
ldr x3, [sp, 48]
adrp x0, print_message_function
add x2, x0, :lo12:print_message_function
mov x1, 0
mov x0, x4
bl pthread_create
ldr x0, [sp, 32]
mov x1, 0
bl pthread_join
ldr x0, [sp, 24]
mov x1, 0
bl pthread_join
mov w0, 0
bl exit
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC2:
.string "%s "
.text
.align 2
.global print_message_function
.type print_message_function, %function
print_message_function:
.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]
str x0, [sp, 40]
ldr x1, [sp, 40]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov x0, 0
bl pthread_exit
.cfi_endproc
.LFE7:
.size print_message_function, .-print_message_function
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global bar1
.type bar1, %function
bar1:
.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 w1, [sp, 28]
mov w0, 1
bl foo2
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size bar1, .-bar1
.align 2
.global bar2
.type bar2, %function
bar2:
.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]
ldr w1, [sp, 28]
mov w0, 1
bl foo3
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size bar2, .-bar2
.align 2
.global bar3
.type bar3, %function
bar3:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str q0, [sp, 16]
ldr q0, [sp, 16]
mov w0, 1
bl foo1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size bar3, .-bar3
.align 2
.global bar4
.type bar4, %function
bar4:
.LFB3:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str q0, [sp, 16]
ldr q0, [sp, 16]
mov w0, 1
bl foo3
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size bar4, .-bar4
.align 2
.global bar5
.type bar5, %function
bar5:
.LFB4:
.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 w1, [sp, 28]
mov w0, 1
bl foo4
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size bar5, .-bar5
.align 2
.global bar6
.type bar6, %function
bar6:
.LFB5:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str q0, [sp, 16]
ldr q0, [sp, 16]
mov w0, 1
bl foo4
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE5:
.size bar6, .-bar6
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%s"
.text
.align 2
.global rot13
.type rot13, %function
rot13:
.LFB0:
.cfi_startproc
sub sp, sp, #2032
.cfi_def_cfa_offset 2032
stp x29, x30, [sp]
.cfi_offset 29, -2032
.cfi_offset 30, -2024
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 2024]
mov x1, 0
add x0, sp, 24
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
str wzr, [sp, 20]
b .L2
.L10:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 64
bls .L3
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 77
bls .L4
.L3:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 96
bls .L5
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 109
bhi .L5
.L4:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
add w0, w0, 13
and w2, w0, 255
ldrsw x0, [sp, 20]
add x1, sp, 1024
strb w2, [x1, x0]
b .L6
.L5:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 77
bls .L7
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 90
bls .L8
.L7:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 108
bls .L9
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 122
bhi .L9
.L8:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
sub w0, w0, #13
and w2, w0, 255
ldrsw x0, [sp, 20]
add x1, sp, 1024
strb w2, [x1, x0]
b .L6
.L9:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w2, [x1, x0]
ldrsw x0, [sp, 20]
add x1, sp, 1024
strb w2, [x1, x0]
.L6:
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L2:
ldrsw x0, [sp, 20]
add x1, sp, 24
ldrb w0, [x1, x0]
cmp w0, 0
bne .L10
ldr w0, [sp, 20]
add w0, w0, 1
sxtw x0, w0
add x1, sp, 1024
strb wzr, [x1, x0]
add x0, sp, 1024
bl puts
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 2024]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L11
bl __stack_chk_fail
.L11:
ldp x29, x30, [sp]
add sp, sp, 2032
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size rot13, .-rot13
.section .rodata
.align 3
.LC1:
.string "%c"
.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
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
mov w0, 97
strb w0, [sp, 23]
b .L13
.L15:
add x0, sp, 23
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldrb w0, [sp, 23]
cmp w0, 99
beq .L14
ldrb w0, [sp, 23]
cmp w0, 100
bne .L13
.L14:
bl rot13
.L13:
ldrb w0, [sp, 23]
cmp w0, 113
bne .L15
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 .L17
bl __stack_chk_fail
.L17:
mov w0, w1
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
.section .rodata
.align 3
.LC0:
.string "Welcome to 8.2! Please enter two numbers (n and m):"
.align 3
.LC1:
.string "%d%d"
.align 3
.LC2:
.string "Invalid input. Exiting."
.align 3
.LC3:
.string "%d is a natural power of %d"
.align 3
.LC4:
.string "%d is not a natural power of %d"
.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 puts
add x1, sp, 20
add x0, sp, 16
mov x2, x1
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
cmp w0, 2
beq .L2
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
mov w0, 1
b .L3
.L2:
ldr w0, [sp, 16]
ldr w1, [sp, 20]
bl is_natural_power_of
cmp w0, 0
beq .L4
adrp x0, .LC3
add x0, x0, :lo12:.LC3
b .L5
.L4:
adrp x0, .LC4
add x0, x0, :lo12:.LC4
.L5:
ldr w1, [sp, 16]
ldr w2, [sp, 20]
bl printf
mov w0, 0
.L3:
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 .L6
bl __stack_chk_fail
.L6:
mov w0, w1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.align 2
.global is_natural_power_of
.type is_natural_power_of, %function
is_natural_power_of:
.LFB1:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str w1, [sp, 8]
ldr w0, [sp, 8]
str w0, [sp, 28]
b .L8
.L9:
ldr w1, [sp, 28]
ldr w0, [sp, 8]
mul w0, w1, w0
str w0, [sp, 28]
.L8:
ldr w1, [sp, 28]
ldr w0, [sp, 12]
cmp w1, w0
blt .L9
ldr w1, [sp, 28]
ldr w0, [sp, 12]
cmp w1, w0
cset w0, eq
and w0, w0, 255
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size is_natural_power_of, .-is_natural_power_of
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Malloc error\n"
.text
.align 2
.global my_xmalloc
.type my_xmalloc, %function
my_xmalloc:
.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 xzr, [sp, 40]
ldrsw x0, [sp, 28]
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L2
mov x2, 13
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov w0, 2
bl write
mov w0, 84
bl exit
.L2:
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 my_xmalloc, .-my_xmalloc
.align 2
.global my_xrealloc
.type my_xrealloc, %function
my_xrealloc:
.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 w1, [sp, 20]
ldr w0, [sp, 20]
bl my_xmalloc
str x0, [sp, 40]
mov w0, -1
str w0, [sp, 36]
b .L5
.L6:
ldrsw x0, [sp, 36]
ldr x1, [sp, 24]
add x1, x1, x0
ldrsw x0, [sp, 36]
ldr x2, [sp, 40]
add x0, x2, x0
ldrb w1, [x1]
strb w1, [x0]
.L5:
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L6
ldrsw x0, [sp, 36]
ldr x1, [sp, 40]
add x0, x1, x0
strb wzr, [x0]
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 my_xrealloc, .-my_xrealloc
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global board_id
.section .rodata
.align 3
.LC0:
.string "0824"
.section .data.rel.local,"aw"
.align 3
.type board_id, %object
.size board_id, 8
board_id:
.xword .LC0
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.data
.align 3
.type id, %object
.size id, 57
id:
.string "@(#)$Id: t_exclopen.c,v 8.6 2001/09/23 03:35:41 ca Exp $"
.local Attacker
.comm Attacker,128,8
.local Attackee
.comm Attackee,128,8
.text
.align 2
.type bail, %function
bail:
.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, Attacker
add x0, x0, :lo12:Attacker
bl unlink
adrp x0, Attackee
add x0, x0, :lo12:Attackee
bl unlink
ldr w0, [sp, 28]
bl exit
.cfi_endproc
.LFE6:
.size bail, .-bail
.section .rodata
.align 3
.LC0:
.string "/tmp/attacker.%d.%ld"
.align 3
.LC1:
.string "/tmp/attackee.%d.%ld"
.align 3
.LC2:
.string "Could not create %s->%s symlink: %d\n"
.align 3
.LC3:
.string "%s already exists -- remove and try again.\n"
.align 3
.LC4:
.string "Weird. Open failed but %s was created anyhow (errno = %d)\n"
.align 3
.LC5:
.string "Good show! Exclusive open works properly with symbolic links (errno = %d).\n"
.align 3
.LC6:
.string "Weird. Open succeeded but %s was not created\n"
.align 3
.LC7:
.string "Bad news: you can do an exclusive open through a symbolic link"
.align 3
.LC8:
.string "\tBe sure you #define BOGUS_O_EXCL in conf.h"
.text
.align 2
.global main
.type main, %function
main:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -192]!
.cfi_def_cfa_offset 192
.cfi_offset 29, -192
.cfi_offset 30, -184
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -176
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, 184]
mov x1, 0
bl getpid
mov w19, w0
mov x0, 0
bl time
mov w3, w0
mov w2, w19
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, Attacker
add x0, x0, :lo12:Attacker
bl sprintf
bl getpid
mov w19, w0
mov x0, 0
bl time
mov w3, w0
mov w2, w19
adrp x0, .LC1
add x1, x0, :lo12:.LC1
adrp x0, Attackee
add x0, x0, :lo12:Attackee
bl sprintf
adrp x0, Attacker
add x1, x0, :lo12:Attacker
adrp x0, Attackee
add x0, x0, :lo12:Attackee
bl symlink
cmp w0, 0
bge .L3
bl __errno_location
ldr w0, [x0]
mov w3, w0
adrp x0, Attackee
add x2, x0, :lo12:Attackee
adrp x0, Attacker
add x1, x0, :lo12:Attacker
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 1
bl bail
.L3:
adrp x0, Attackee
add x0, x0, :lo12:Attackee
bl unlink
add x0, sp, 56
mov x1, x0
adrp x0, Attackee
add x0, x0, :lo12:Attackee
bl stat
cmp w0, 0
blt .L4
adrp x0, Attackee
add x1, x0, :lo12:Attackee
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 1
bl bail
.L4:
mov w2, 420
mov w1, 193
adrp x0, Attacker
add x0, x0, :lo12:Attacker
bl open
cmp w0, 0
bge .L5
bl __errno_location
ldr w0, [x0]
str w0, [sp, 52]
add x0, sp, 56
mov x1, x0
adrp x0, Attackee
add x0, x0, :lo12:Attackee
bl stat
cmp w0, 0
blt .L6
ldr w2, [sp, 52]
adrp x0, Attackee
add x1, x0, :lo12:Attackee
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
mov w0, 1
bl bail
.L6:
ldr w1, [sp, 52]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
mov w0, 0
bl bail
.L5:
add x0, sp, 56
mov x1, x0
adrp x0, Attackee
add x0, x0, :lo12:Attackee
bl stat
cmp w0, 0
bge .L7
adrp x0, Attackee
add x1, x0, :lo12:Attackee
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
mov w0, 2
bl bail
.L7:
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
mov w0, 1
bl bail
mov w0, 0
bl exit
.cfi_endproc
.LFE7:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d\n"
.align 3
.LC1:
.string "%d %d %c\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
mov x0, 16
bl malloc
str x0, [sp, 24]
mov x0, 8
bl malloc
mov x1, x0
ldr x0, [sp, 24]
str x1, [x0]
mov x1, 1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov x1, 4
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 8]
ldr x0, [sp, 24]
ldr x0, [x0]
mov w1, 2
str w1, [x0]
ldr x0, [sp, 24]
ldr x0, [x0]
mov w1, 120
strb w1, [x0, 4]
ldr x0, [sp, 24]
ldr w1, [x0, 8]
add w2, w1, 1
ldr x0, [sp, 24]
str w2, [x0, 8]
ldr x0, [sp, 24]
ldr x0, [x0]
ldr w2, [x0]
add w3, w2, 1
str w3, [x0]
ldr x0, [sp, 24]
ldr x0, [x0]
ldrb w3, [x0, 4]
add w4, w3, 1
and w4, w4, 255
strb w4, [x0, 4]
mov w0, w3
mov w3, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr x0, [sp, 24]
ldr w1, [x0, 8]
ldr x0, [sp, 24]
ldr x0, [x0]
ldr w2, [x0]
ldr x0, [sp, 24]
ldr x0, [x0]
ldrb w0, [x0, 4]
mov w3, w0
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
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "/dev/sequencer"
.align 3
.LC1:
.string "open (/dev/sequencer)"
.align 3
.LC2:
.string "end res = %li\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
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 w1, 2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl open
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bge .L2
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl perror
mov w0, 1
b .L6
.L2:
mov w0, 5
strb w0, [sp, 48]
mov w0, -2
strb w0, [sp, 49]
ldr w0, [sp, 28]
cmp w0, 1
ble .L4
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl atoi
and w0, w0, 255
b .L5
.L4:
mov w0, 0
.L5:
strb w0, [sp, 50]
add x0, sp, 48
mov x2, 4
mov x1, x0
ldr w0, [sp, 36]
bl write
str x0, [sp, 40]
ldr x1, [sp, 40]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w0, [sp, 36]
bl close
mov w0, 0
.L6:
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
.section .rodata
.align 3
.LC0:
.string "%d %d"
.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
mov w0, 1
str w0, [sp, 24]
mov w0, 1
str w0, [sp, 28]
add x1, sp, 20
add x0, sp, 16
mov x2, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
str wzr, [sp, 32]
b .L2
.L3:
ldr w1, [sp, 16]
ldr w0, [sp, 32]
sub w0, w1, w0
ldr w1, [sp, 24]
mul w0, w1, w0
str w0, [sp, 24]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldr w0, [sp, 20]
ldr w1, [sp, 32]
cmp w1, w0
blt .L3
mov w0, 1
str w0, [sp, 32]
b .L4
.L5:
ldr w1, [sp, 28]
ldr w0, [sp, 32]
mul w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L4:
ldr w0, [sp, 20]
ldr w1, [sp, 32]
cmp w1, w0
ble .L5
ldr w1, [sp, 24]
ldr w0, [sp, 28]
sdiv w0, w1, w0
str w0, [sp, 36]
ldr w1, [sp, 36]
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 .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
.section .rodata
.align 3
.LC0:
.string "lastScriptPath"
.section .data.rel.local,"aw"
.align 3
.type PREF_LAST_SCRIPT_PATH, %object
.size PREF_LAST_SCRIPT_PATH, 8
PREF_LAST_SCRIPT_PATH:
.xword .LC0
.section .rodata
.align 3
.LC1:
.string "presetScriptPath_"
.section .data.rel.local
.align 3
.type PREF_PRESET_SCRIPT_PREFIX, %object
.size PREF_PRESET_SCRIPT_PREFIX, 8
PREF_PRESET_SCRIPT_PREFIX:
.xword .LC1
.section .rodata
.align 3
.LC2:
.string "editorCommand"
.section .data.rel.local
.align 3
.type PREF_EDITOR_COMMAND, %object
.size PREF_EDITOR_COMMAND, 8
PREF_EDITOR_COMMAND:
.xword .LC2
.section .rodata
.align 3
.LC3:
.string "logFilePath"
.section .data.rel.local
.align 3
.type PREF_LOG_FILE_PATH, %object
.size PREF_LOG_FILE_PATH, 8
PREF_LOG_FILE_PATH:
.xword .LC3
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%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
add x0, sp, 40
mov x1, 2000
mov x2, x1
mov w1, 0
bl memset
mov w0, 2
str w0, [sp, 24]
str wzr, [sp, 36]
str wzr, [sp, 28]
mov w0, 1
str w0, [sp, 40]
b .L2
.L7:
str wzr, [sp, 20]
b .L3
.L6:
ldrsw x0, [sp, 20]
lsl x0, x0, 2
add x1, sp, 40
ldr w1, [x1, x0]
ldr w0, [sp, 24]
mul w0, w1, w0
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 36]
str wzr, [sp, 28]
ldr w0, [sp, 36]
cmp w0, 10
ble .L4
ldr w1, [sp, 36]
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, 32]
ldr w0, [sp, 36]
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, 28]
b .L5
.L4:
ldr w0, [sp, 36]
str w0, [sp, 32]
.L5:
ldrsw x0, [sp, 20]
lsl x0, x0, 2
add x1, sp, 40
ldr w2, [sp, 32]
str w2, [x1, x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L3:
ldr w0, [sp, 20]
cmp w0, 499
ble .L6
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L2:
ldr w0, [sp, 24]
cmp w0, 100
ble .L7
mov w0, 499
str w0, [sp, 20]
b .L8
.L9:
ldrsw x0, [sp, 20]
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, 20]
sub w0, w0, #1
str w0, [sp, 20]
.L8:
ldr w0, [sp, 20]
cmp w0, 0
bge .L9
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 .L11
bl __stack_chk_fail
.L11:
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
.section .rodata
.align 3
.LC0:
.string "Call this program with %i arguments\n"
.align 3
.LC1:
.string "You win!"
.align 3
.LC2:
.string "%u\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, 48]
b .L3
.L4:
ldrsw x0, [sp, 48]
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
strb w0, [sp, 47]
ldrsw x0, [sp, 48]
add x1, sp, 56
ldrb w2, [sp, 47]
strb w2, [x1, x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L3:
ldr w0, [sp, 48]
cmp w0, 0
ble .L4
add x1, sp, 64
add x0, sp, 56
bl RandomFunc
ldrb w0, [sp, 64]
cmp w0, 134
bne .L5
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
.L5:
str wzr, [sp, 52]
b .L6
.L7:
ldrsw x0, [sp, 52]
add x1, sp, 64
ldrb w0, [x1, x0]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L6:
ldr w0, [sp, 52]
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 RandomFunc
.type RandomFunc, %function
RandomFunc:
.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 x1, [sp, 16]
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 x0, [sp, 24]
ldrb w0, [x0]
and x0, x0, 255
lsr x0, x0, 3
and w1, w0, 255
mov w0, -75
orr w0, w1, w0
and w0, w0, 255
strb w0, [sp, 32]
ldrb w0, [sp, 32]
lsr w0, w0, 3
and w0, w0, 255
and w0, w0, 1
cmp w0, 0
beq .L11
ldrb w0, [sp, 32]
lsr w0, w0, 4
and w0, w0, 255
and w0, w0, 1
cmp w0, 0
beq .L12
ldrb w0, [sp, 32]
mov w1, w0
ldrb w0, [sp, 32]
lsr w0, w0, 3
and w0, w0, 255
and w0, w0, 6
orr w0, w0, 1
asr w0, w1, w0
and w0, w0, 255
strb w0, [sp, 32]
b .L13
.L12:
ldrb w0, [sp, 32]
mov w1, w0
ldrb w0, [sp, 32]
lsr w0, w0, 1
and w0, w0, 255
and w0, w0, 6
orr w0, w0, 1
asr w0, w1, w0
and w0, w0, 255
strb w0, [sp, 32]
b .L13
.L11:
ldrb w0, [sp, 32]
mov w1, w0
ldrb w0, [sp, 32]
lsr w0, w0, 3
and w0, w0, 255
and w0, w0, 6
orr w0, w0, 1
lsl w0, w1, w0
and w0, w0, 255
strb w0, [sp, 32]
.L13:
ldrb w0, [sp, 32]
eor w0, w0, 6
and w1, w0, 255
ldr x0, [sp, 16]
strb w1, [x0]
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 .L14
bl __stack_chk_fail
.L14:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size RandomFunc, .-RandomFunc
.align 2
.global megaInit
.type megaInit, %function
megaInit:
.LFB2:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE2:
.size megaInit, .-megaInit
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global v
.section .rodata
.align 2
.type v, %object
.size v, 4
v:
.word 1103626240
.align 3
.LC0:
.string "Podaj drog\304\231 w m: "
.align 3
.LC1:
.string "%f"
.align 3
.LC2:
.string "Droga nie mo\305\274e by\304\207 mniejsza od 0!"
.align 3
.LC3:
.string "Drog\304\231 %.2f metr\303\263w z pr\304\231dko\305\233ci\304\205 %.2f m/s pokonasz w %.2f sekund"
.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 puts
add x0, sp, 16
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr s0, [sp, 16]
fcmpe s0, #0.0
bls .L7
b .L8
.L7:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 1
b .L5
.L8:
ldr s1, [sp, 16]
fmov s0, 2.5e+1
fdiv s0, s1, s0
str s0, [sp, 20]
ldr s0, [sp, 16]
fcvt d3, s0
fmov s0, 2.5e+1
fcvt d1, s0
ldr s0, [sp, 20]
fcvt d0, s0
fmov d2, d0
fmov d0, d3
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
bl getchar
mov w0, 0
.L5:
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 .L6
bl __stack_chk_fail
.L6:
mov w0, w1
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 "~ ~"
.align 3
.LC1:
.string "0 0"
.align 3
.LC2:
.string " o "
.align 3
.LC3:
.string "\\_/"
.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, .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
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type nmultiplier, %function
nmultiplier:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
cmp w0, 0
bge .L2
mov w0, 0
b .L3
.L2:
ldr w0, [sp, 12]
cmp w0, 9
bgt .L4
mov w0, 1
b .L3
.L4:
ldr w0, [sp, 12]
cmp w0, 99
bgt .L5
mov w0, 2
b .L3
.L5:
ldr w0, [sp, 12]
cmp w0, 999
bgt .L6
mov w0, 3
b .L3
.L6:
mov w0, 0
.L3:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size nmultiplier, .-nmultiplier
.align 2
.type pow10, %function
pow10:
.LFB1:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
cmp w0, 0
bne .L8
mov w0, 1
b .L9
.L8:
ldr w0, [sp, 12]
cmp w0, 1
bne .L10
mov w0, 10
b .L9
.L10:
ldr w0, [sp, 12]
cmp w0, 2
bne .L11
mov w0, 100
b .L9
.L11:
ldr w0, [sp, 12]
cmp w0, 3
bne .L12
mov w0, 1000
b .L9
.L12:
mov w0, 0
.L9:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size pow10, .-pow10
.align 2
.type find, %function
find:
.LFB2:
.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, 28]
b .L14
.L17:
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 .L15
mov w0, 1
b .L16
.L15:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L14:
ldr w1, [sp, 28]
ldr w0, [sp, 4]
cmp w1, w0
blt .L17
mov w0, 0
.L16:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size find, .-find
.section .rodata
.align 3
.LC0:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB3:
.cfi_startproc
sub sp, sp, #4080
.cfi_def_cfa_offset 4080
stp x29, x30, [sp]
.cfi_offset 29, -4080
.cfi_offset 30, -4072
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, 4072]
mov x1, 0
str wzr, [sp, 48]
mov w0, -1
str w0, [sp, 52]
mov w0, 1
str w0, [sp, 44]
b .L19
.L24:
mov w0, 1
str w0, [sp, 64]
ldr w0, [sp, 44]
bl nmultiplier
str w0, [sp, 68]
add x0, sp, 72
mov x2, 4000
mov w1, 0
bl memset
str wzr, [sp, 60]
str wzr, [sp, 56]
b .L20
.L22:
ldr w0, [sp, 68]
bl pow10
mov w1, w0
ldr w0, [sp, 64]
mul w0, w0, w1
str w0, [sp, 64]
ldr w0, [sp, 64]
ldr w1, [sp, 44]
sdiv w2, w0, w1
ldr w1, [sp, 44]
mul w1, w2, w1
sub w0, w0, w1
str w0, [sp, 64]
add x0, sp, 72
ldr w2, [sp, 64]
ldr w1, [sp, 60]
bl find
cmp w0, 0
bne .L21
ldr w0, [sp, 60]
add w1, w0, 1
str w1, [sp, 60]
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 72
ldr w2, [sp, 64]
str w2, [x1, x0]
.L21:
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L20:
ldr w0, [sp, 56]
cmp w0, 999
ble .L22
ldr w1, [sp, 60]
ldr w0, [sp, 48]
cmp w1, w0
ble .L23
ldr w0, [sp, 60]
str w0, [sp, 48]
ldr w0, [sp, 44]
str w0, [sp, 52]
.L23:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L19:
ldr w0, [sp, 44]
cmp w0, 999
ble .L24
ldr w1, [sp, 52]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
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, 4072]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L26
bl __stack_chk_fail
.L26:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 4080
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global num
.bss
.align 2
.type num, %object
.size num, 4
num:
.zero 4
.section .rodata
.align 3
.LC0:
.string "Create Socket Failed!"
.align 3
.LC1:
.string "Server Bind Port : %d Failed!"
.align 3
.LC2:
.string "Server Listen Failed!"
.align 3
.LC3:
.string "epoll_create error"
.align 3
.LC4:
.string "epll_ctl:server_sockfd register failed"
.align 3
.LC5:
.string "start epoll_wait failed"
.align 3
.LC6:
.string "Server Accept Failed!"
.align 3
.LC7:
.string "XXXXXXXXXXXX"
.align 3
.LC8:
.string "epoll_ctl:client_sockfd register failed"
.align 3
.LC9:
.string "Server Recieve Data Failed!"
.align 3
.LC10:
.string "My name is C "
.align 3
.LC11:
.string "Send File"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
mov x12, 34176
sub sp, sp, x12
.cfi_def_cfa_offset 34176
stp x29, x30, [sp]
.cfi_offset 29, -34176
.cfi_offset 30, -34168
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]
add x1, sp, 32768
ldr x2, [x0]
str x2, [x1, 1400]
mov x2, 0
add x0, sp, 88
stp xzr, xzr, [x0]
mov w0, 2
strh w0, [sp, 88]
mov w0, 0
bl htons
and w0, w0, 65535
str w0, [sp, 92]
mov w0, 8880
bl htons
and w0, w0, 65535
strh w0, [sp, 90]
mov w2, 0
mov w1, 1
mov w0, 2
bl socket
str w0, [sp, 56]
ldr w0, [sp, 56]
cmp w0, 0
bge .L2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 1
bl exit
.L2:
mov w0, 1
str w0, [sp, 40]
add x0, sp, 40
mov w4, 4
mov x3, x0
mov w2, 2
mov w1, 1
ldr w0, [sp, 56]
bl setsockopt
add x0, sp, 88
mov w2, 16
mov x1, x0
ldr w0, [sp, 56]
bl bind
cmp w0, 0
beq .L3
mov w1, 8880
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
mov w0, 1
bl exit
.L3:
mov w1, 1024
ldr w0, [sp, 56]
bl listen
cmp w0, 0
beq .L4
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 1
bl exit
.L4:
mov w0, 2048
bl epoll_create
str w0, [sp, 60]
ldr w0, [sp, 60]
cmn w0, #1
bne .L5
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
mov w0, -1
bl exit
.L5:
mov w0, 1
str w0, [sp, 72]
ldr w0, [sp, 56]
str w0, [sp, 80]
add x0, sp, 72
mov x3, x0
ldr w2, [sp, 56]
mov w1, 1
ldr w0, [sp, 60]
bl epoll_ctl
cmn w0, #1
bne .L6
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl perror
mov w0, 1
bl exit
.L6:
add x0, sp, 120
mov w3, -1
mov w2, 2048
mov x1, x0
ldr w0, [sp, 60]
bl epoll_wait
str w0, [sp, 64]
ldr w0, [sp, 64]
cmn w0, #1
bne .L7
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl perror
mov w0, 1
bl exit
.L7:
str wzr, [sp, 52]
b .L8
.L17:
ldrsw x0, [sp, 52]
lsl x0, x0, 4
add x1, sp, 128
ldr w0, [x1, x0]
ldr w1, [sp, 56]
cmp w1, w0
bne .L9
mov w0, 16
str w0, [sp, 44]
add x1, sp, 44
add x0, sp, 104
mov x2, x1
mov x1, x0
ldr w0, [sp, 56]
bl accept
str w0, [sp, 48]
ldr w0, [sp, 48]
cmp w0, 0
bge .L10
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
b .L6
.L10:
mov w0, -2147483647
str w0, [sp, 72]
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
ldr w0, [sp, 48]
str w0, [sp, 80]
add x0, sp, 72
mov x3, x0
ldr w2, [sp, 48]
mov w1, 1
ldr w0, [sp, 60]
bl epoll_ctl
cmn w0, #1
bne .L13
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl perror
mov w0, 1
bl exit
.L9:
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
adrp x0, num
add x0, x0, :lo12:num
ldr w0, [x0]
add w1, w0, 1
adrp x0, num
add x0, x0, :lo12:num
str w1, [x0]
add x0, sp, 32768
add x0, x0, 376
mov x3, x0
mov x0, 1024
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
add x0, sp, 32768
add x0, x0, 376
mov w3, 0
mov x2, 1024
mov x1, x0
ldr w0, [sp, 48]
bl recv
str w0, [sp, 68]
ldr w0, [sp, 68]
cmp w0, 0
bge .L14
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
b .L11
.L14:
add x0, sp, 32768
add x0, x0, 120
mov x2, 255
mov w1, 0
bl memset
add x3, sp, 32768
add x3, x3, 120
mov x2, 14
adrp x0, .LC10
add x1, x0, :lo12:.LC10
mov x0, x3
bl memcpy
add x0, sp, 32768
add x0, x0, 120
mov w3, 0
mov x2, 12
mov x1, x0
ldr w0, [sp, 48]
bl send
cmp x0, 0
bge .L13
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl puts
b .L11
.L13:
ldr w0, [sp, 48]
bl close
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L8:
ldr w1, [sp, 52]
ldr w0, [sp, 64]
cmp w1, w0
blt .L17
.L11:
b .L6
.cfi_endproc
.LFE8:
.size main, .-main
.section .rodata
.align 3
.LC12:
.string "127.0.0.1"
.align 3
.LC13:
.string "client socket creation failed"
.align 3
.LC14:
.string "connect to server failed"
.align 3
.LC15:
.string "receive from server:%s\n"
.align 3
.LC16:
.string "receive from server failed"
.text
.align 2
.global client_conect
.type client_conect, %function
client_conect:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -320]!
.cfi_def_cfa_offset 320
.cfi_offset 29, -320
.cfi_offset 30, -312
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, 312]
mov x1, 0
add x0, sp, 40
mov x2, 16
mov w1, 0
bl memset
mov w0, 2
strh w0, [sp, 40]
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl inet_addr
str w0, [sp, 44]
mov w0, 8888
bl htons
and w0, w0, 65535
strh w0, [sp, 42]
mov w2, 0
mov w1, 1
mov w0, 2
bl socket
str w0, [sp, 32]
ldr w0, [sp, 32]
cmp w0, 0
bge .L20
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl perror
mov w0, 1
bl exit
.L20:
add x0, sp, 40
mov w2, 16
mov x1, x0
ldr w0, [sp, 32]
bl connect
cmp w0, 0
bge .L21
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl perror
mov w0, 1
bl exit
.L21:
mov w3, 0
mov x2, 1024
ldr x1, [sp, 24]
ldr w0, [sp, 32]
bl send
mov w3, 0
mov x2, 1024
ldr x1, [sp, 16]
ldr w0, [sp, 32]
bl recv
str w0, [sp, 36]
ldr x1, [sp, 16]
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl printf
ldr w0, [sp, 36]
cmp w0, 0
bge .L22
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl perror
mov w0, 1
bl exit
.L22:
ldr w0, [sp, 32]
bl close
mov w0, 0
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 .L24
bl __stack_chk_fail
.L24:
mov w0, w1
ldp x29, x30, [sp], 320
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size client_conect, .-client_conect
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type foo, %function
foo:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, 15]
strb w1, [sp, 14]
ldrb w0, [sp, 15]
lsl w0, w0, 2
add w0, w0, 11
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
.align 2
.global test144
.type test144, %function
test144:
.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, 3
strb w0, [sp, 31]
mov w1, 4
ldrb w0, [sp, 31]
bl foo
add w0, w0, 151
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size test144, .-test144
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -144]!
.cfi_def_cfa_offset 144
.cfi_offset 29, -144
.cfi_offset 30, -136
mov x29, sp
.cfi_def_cfa_register 29
stp x19, x20, [sp, 16]
stp x21, x22, [sp, 32]
stp x23, x24, [sp, 48]
stp x25, x26, [sp, 64]
str x27, [sp, 80]
sub sp, sp, #16
.cfi_offset 19, -128
.cfi_offset 20, -120
.cfi_offset 21, -112
.cfi_offset 22, -104
.cfi_offset 23, -96
.cfi_offset 24, -88
.cfi_offset 25, -80
.cfi_offset 26, -72
.cfi_offset 27, -64
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 136]
mov x1, 0
mov x0, sp
mov x19, x0
add x0, x29, 108
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [x29, 108]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 120]
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
.L2:
cmp sp, x1
beq .L3
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L2
.L3:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L4
str xzr, [sp, 1024]
.L4:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 128]
str wzr, [x29, 116]
b .L5
.L6:
add x0, x29, 112
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w2, [x29, 112]
ldr x0, [x29, 128]
ldrsw x1, [x29, 116]
str w2, [x0, x1, lsl 2]
ldr w0, [x29, 116]
add w0, w0, 1
str w0, [x29, 116]
.L5:
ldr w0, [x29, 108]
ldr w1, [x29, 116]
cmp w1, w0
blt .L6
str wzr, [x29, 116]
b .L7
.L8:
ldr x0, [x29, 128]
ldrsw x1, [x29, 116]
ldr w0, [x0, x1, lsl 2]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [x29, 116]
add w0, w0, 1
str w0, [x29, 116]
.L7:
ldr w0, [x29, 108]
ldr w1, [x29, 116]
cmp w1, w0
blt .L8
mov w0, 0
mov sp, x19
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [x29, 136]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L10
bl __stack_chk_fail
.L10:
mov w0, w1
mov sp, x29
ldp x19, x20, [sp, 16]
ldp x21, x22, [sp, 32]
ldp x23, x24, [sp, 48]
ldp x25, x26, [sp, 64]
ldr x27, [sp, 80]
ldp x29, x30, [sp], 144
.cfi_restore 30
.cfi_restore 29
.cfi_restore 27
.cfi_restore 25
.cfi_restore 26
.cfi_restore 23
.cfi_restore 24
.cfi_restore 21
.cfi_restore 22
.cfi_restore 19
.cfi_restore 20
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global my_print_float
.type my_print_float, %function
my_print_float:
.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 d0, [sp, 24]
ldr d0, [sp, 24]
fcvtzs w0, d0
str w0, [sp, 44]
str wzr, [sp, 40]
ldr w0, [sp, 44]
bl my_print_int
ldr w0, [sp, 44]
scvtf d0, w0
ldr d1, [sp, 24]
fsub d0, d1, d0
str d0, [sp, 24]
mov w0, 46
bl my_print_char
b .L2
.L3:
ldr d1, [sp, 24]
fmov d0, 1.0e+1
fmul d0, d1, d0
str d0, [sp, 24]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L2:
ldr w0, [sp, 40]
cmp w0, 6
bne .L3
ldr d0, [sp, 24]
fcvtzs w0, d0
bl my_print_int
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size my_print_float, .-my_print_float
.align 2
.global my_print_pointer
.type my_print_pointer, %function
my_print_pointer:
.LFB1:
.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, 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, 24]
str x0, [sp, 56]
mov w0, 48
strb w0, [sp, 64]
mov w0, 120
strb w0, [sp, 65]
str xzr, [sp, 48]
b .L5
.L6:
mov x1, 15
ldr x0, [sp, 48]
sub x0, x1, x0
lsl w0, w0, 2
ldr x1, [sp, 56]
asr x0, x1, x0
and x1, x0, 15
ldr x0, [sp, 48]
add x0, x0, 2
adrp x2, .LC0
add x2, x2, :lo12:.LC0
ldrb w2, [x2, x1]
add x1, sp, 64
strb w2, [x1, x0]
ldr x0, [sp, 48]
add x0, x0, 1
str x0, [sp, 48]
.L5:
ldr x0, [sp, 48]
cmp x0, 15
bls .L6
mov w0, 2
str w0, [sp, 40]
mov w0, 6
str w0, [sp, 44]
b .L7
.L8:
ldrsw x0, [sp, 44]
add x1, sp, 64
ldrb w2, [x1, x0]
ldrsw x0, [sp, 40]
add x1, sp, 64
strb w2, [x1, x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L7:
add x0, sp, 64
bl my_strlen
mov w1, w0
ldr w0, [sp, 44]
cmp w0, w1
blt .L8
add x0, sp, 64
mov x2, 14
mov x1, x0
mov w0, 1
bl write
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 88]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L9
bl __stack_chk_fail
.L9:
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size my_print_pointer, .-my_print_pointer
.section .rodata
.align 3
.LC0:
.string "0123456789abcdef"
.text
.align 2
.global my_print_echar
.type my_print_echar, %function
my_print_echar:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
strb w0, [sp, 31]
add x0, sp, 31
mov x2, 1
mov x1, x0
mov w0, 2
bl write
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size my_print_echar, .-my_print_echar
.align 2
.global my_print_error
.type my_print_error, %function
my_print_error:
.LFB3:
.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 .L12
.L13:
ldrsw x0, [sp, 44]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
bl my_print_echar
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L12:
ldrsw x0, [sp, 44]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L13
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size my_print_error, .-my_print_error
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "usage: %s encrypted_password\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
sub sp, sp, #560
.cfi_def_cfa_offset 560
stp x29, x30, [sp]
.cfi_offset 29, -560
.cfi_offset 30, -552
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, 552]
mov x1, 0
ldr w0, [sp, 28]
cmp w0, 2
beq .L2
ldr x0, [sp, 16]
ldr x0, [x0]
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 1
b .L3
.L2:
stp xzr, xzr, [sp, 40]
add x0, sp, 56
mov x1, 496
mov x2, x1
mov w1, 0
bl memset
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
add x1, sp, 40
bl decode_password
add x0, sp, 40
bl puts
mov w0, 0
.L3:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 552]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L4
bl __stack_chk_fail
.L4:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 560
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.align 2
.global decode_password
.type decode_password, %function
decode_password:
.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 x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 16]
ldr x0, [sp, 24]
bl decode_base64
ldr x0, [sp, 16]
bl rotate_bit_left
mov w0, 1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size decode_password, .-decode_password
.align 2
.global rotate_bit_left
.type rotate_bit_left, %function
rotate_bit_left:
.LFB2:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str wzr, [sp, 28]
b .L8
.L9:
ldrsw x0, [sp, 28]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
lsl w0, w0, 1
sxtb w1, w0
ldrsw x0, [sp, 28]
ldr x2, [sp, 8]
add x0, x2, x0
ldrb w0, [x0]
lsr w0, w0, 7
and w0, w0, 255
sxtb w0, w0
orr w0, w1, w0
sxtb w2, w0
ldrsw x0, [sp, 28]
ldr x1, [sp, 8]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L8:
ldrsw x0, [sp, 28]
ldr x1, [sp, 8]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L9
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size rotate_bit_left, .-rotate_bit_left
.align 2
.global rotate_bit_right
.type rotate_bit_right, %function
rotate_bit_right:
.LFB3:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str wzr, [sp, 28]
b .L12
.L13:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
lsr w2, w0, 1
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
lsl w1, w0, 7
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x3, [sp, 8]
add x0, x3, x0
orr w1, w2, w1
str w1, [x0]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L12:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
cmp w0, 0
bne .L13
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size rotate_bit_right, .-rotate_bit_right
.align 2
.global decode_base64
.type decode_base64, %function
decode_base64:
.LFB4:
.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
str wzr, [sp, 40]
str wzr, [sp, 44]
str xzr, [sp, 56]
b .L16
.L18:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L16:
ldrsw x0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 61
beq .L19
ldrsw x0, [sp, 40]
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L18
b .L19
.L20:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L19:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
add w0, w1, w0
sxtw x0, w0
ldr x1, [sp, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 61
beq .L20
ldr w1, [sp, 40]
ldr w0, [sp, 44]
add w0, w1, w0
add w1, w0, 3
cmp w0, 0
csel w0, w1, w0, lt
asr w0, w0, 2
str w0, [sp, 52]
ldr w1, [sp, 52]
mov w0, w1
lsl w0, w0, 1
add w1, w0, w1
ldr w0, [sp, 44]
sub w0, w1, w0
sxtw x0, w0
str x0, [sp, 56]
str wzr, [sp, 48]
b .L21
.L22:
ldr x1, [sp, 24]
ldr x0, [sp, 16]
bl decode_quantum
ldr x0, [sp, 16]
add x0, x0, 3
str x0, [sp, 16]
ldr x0, [sp, 24]
add x0, x0, 4
str x0, [sp, 24]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L21:
ldr w0, [sp, 52]
sub w0, w0, #1
ldr w1, [sp, 48]
cmp w1, w0
blt .L22
add x0, sp, 64
ldr x1, [sp, 24]
bl decode_quantum
str wzr, [sp, 48]
b .L23
.L24:
ldrsw x0, [sp, 48]
ldr x1, [sp, 16]
add x0, x1, x0
ldrsw x1, [sp, 48]
add x2, sp, 64
ldrb w1, [x2, x1]
strb w1, [x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L23:
mov w1, 3
ldr w0, [sp, 44]
sub w0, w1, w0
ldr w1, [sp, 48]
cmp w1, w0
blt .L24
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 .L26
bl __stack_chk_fail
.L26:
mov x0, x1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size decode_base64, .-decode_base64
.align 2
.global decode_quantum
.type decode_quantum, %function
decode_quantum:
.LFB5:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str x1, [sp]
str wzr, [sp, 24]
str wzr, [sp, 28]
b .L28
.L35:
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 64
bls .L29
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 90
bhi .L29
ldr w0, [sp, 24]
lsl w0, w0, 6
ldrsw x1, [sp, 28]
ldr x2, [sp]
add x1, x2, x1
ldrb w1, [x1]
add w0, w0, w1
sub w0, w0, #65
str w0, [sp, 24]
b .L30
.L29:
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 96
bls .L31
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 122
bhi .L31
ldr w0, [sp, 24]
lsl w0, w0, 6
ldrsw x1, [sp, 28]
ldr x2, [sp]
add x1, x2, x1
ldrb w1, [x1]
add w0, w0, w1
sub w0, w0, #71
str w0, [sp, 24]
b .L30
.L31:
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 47
bls .L32
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 57
bhi .L32
ldr w0, [sp, 24]
lsl w0, w0, 6
ldrsw x1, [sp, 28]
ldr x2, [sp]
add x1, x2, x1
ldrb w1, [x1]
add w0, w0, w1
add w0, w0, 4
str w0, [sp, 24]
b .L30
.L32:
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 43
bne .L33
ldr w0, [sp, 24]
lsl w0, w0, 6
add w0, w0, 62
str w0, [sp, 24]
b .L30
.L33:
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 47
bne .L34
ldr w0, [sp, 24]
lsl w0, w0, 6
add w0, w0, 63
str w0, [sp, 24]
b .L30
.L34:
ldrsw x0, [sp, 28]
ldr x1, [sp]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 61
bne .L30
ldr w0, [sp, 24]
lsl w0, w0, 6
str w0, [sp, 24]
.L30:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L28:
ldr w0, [sp, 28]
cmp w0, 3
ble .L35
ldr x0, [sp, 8]
add x0, x0, 2
ldr w1, [sp, 24]
and w1, w1, 255
strb w1, [x0]
ldr w0, [sp, 24]
lsr w0, w0, 8
str w0, [sp, 24]
ldr x0, [sp, 8]
add x0, x0, 1
ldr w1, [sp, 24]
and w1, w1, 255
strb w1, [x0]
ldr w0, [sp, 24]
lsr w0, w0, 8
str w0, [sp, 24]
ldr w0, [sp, 24]
and w1, w0, 255
ldr x0, [sp, 8]
strb w1, [x0]
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE5:
.size decode_quantum, .-decode_quantum
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global WebSocketReceive0
.data
.align 3
.type WebSocketReceive0, %object
.size WebSocketReceive0, 2045
WebSocketReceive0:
.ascii "var myEnv = lsc;\nvar phase = null;\nfunction setPhase(ph) {"
.ascii "\n phase = ph;\n}\n\nvar winPhase = {};\nfunction setWin(tbl"
.ascii ", ph) {\n winPhase[tbl] = ph;\n}\n\nvar clsd = false;\nfunct"
.ascii "ion c(cod, ph, tbl, its, flds, key, com) {\n LS_window.LS_w("
.ascii "cod, ph, tbl, its, flds, key, com);\n}\n\nfunction error(cod"
.ascii ", ph, tbl, msg) {\n if (tbl != null) {\n LS_window.LS_l(cod"
.ascii ", ph, tbl, msg);\n } else {\n LS_window.LS_l(cod, phase, nu"
.ascii "ll, msg);\n }\n}\n\nfunction start(sID, addr, kaMs, reqLim, "
.ascii "srv) {\n LS_window.LS_e(1, phase, sID, addr, kaMs, reqLim, s"
.ascii "rv);\n}\n\nfunction end(cause) {\n LS_window.LS_e(4, phase, "
.ascii "cause);\n}\n\nfunction loop(holdMs) {\n LS_window.LS_e(2, ph"
.ascii "ase, holdMs);\n}\n\nfunction retry() {\n LS_window.LS_e(3, p"
.ascii "hase);\n}\n\nfunction bw(maxBW) {\n LS_window.LS_e(5, phase,"
.ascii " maxBW);\n}\n\nfunction y(secs) {\n LS_window.LS_s(phase, se"
.ascii "cs);\n}\n\nvar unchangedSignal = {};\nunchangedSignal.length"
.ascii " = -1;\nfunction convert(b, f) {\n var a, c, d = f, e = [];"
.ascii "\n for(a = 0;a < b.length;a++) {\n if(a < f) {\n e["
.ascii "a] = b[a]\n } else {\n if(b[a].charAt) {\n b["
.ascii "a] == '$' ? e[d] = '' : b[a] == '#' ? e[d] = null : (c = b[a"
.ascii "].charAt(0), e[d] = c == '$' || c == '#' ? b[a].substring(1)"
.ascii " : b[a]), d++\n } else {\n for(c = 0;c < b[a];c+"
.ascii "+) {\n e[d] = unchangedSignal, d++\n }\n "
.ascii " }\n }\n }\n return e;\n}\nfunction d(tbl) {\n try { L"
.ascii "S_window.LS_u(winPhase[tbl], convert(d.arguments, 2)); } cat"
.ascii "ch(exc) {}\n}\nfunction z(tbl) {\n LS_window.LS_v(winPhase[t"
.ascii "bl], convert(z.arguments, 2));\n}\nfunction n(tbl) {\n LS_wi"
.ascii "ndow.LS_n(winPhase[tbl], n.arguments);\n}\nfunction r(tbl) {"
.ascii "\n LS_window.LS_o(winPhase[tbl], r.arguments);\n}\nfunction "
.ascii "p() {\n LS_window.LS_u(phase, p.arguments);\n}\nmyEnv.setPha"
.ascii "se = setPhase;\nmyEnv.setWin = setWin;\nmyEnv.c = c;\nmyEnv."
.ascii "error = error;\nmyEnv.end = end;\nmyEnv.start = start;\nmyEn"
.ascii "v.loop = loop;\nmyEnv.retry = retry;\nmyEnv.bw = bw;\nmyEnv."
.ascii "y = y;\nmyEnv.convert = convert;\nmyEnv.d = d;\nmyEnv.z = z;"
.ascii "\nmyEnv.n = n;\nmyEnv.r = r;\nmyEnv.p = p;\nmyEnv.LS_window "
.ascii "= LS_window;\n\n// END OF HEADER\n\nsetPhase(303);\nstart('S"
.ascii "e02"
.string "42becabc00d66T1805176', null, 5000, 50000);\n"
.global WebSocketReceiveLen0
.align 3
.type WebSocketReceiveLen0, %object
.size WebSocketReceiveLen0, 8
WebSocketReceiveLen0:
.xword 2044
.global WebSocketReceive1
.align 3
.type WebSocketReceive1, %object
.size WebSocketReceive1, 10
WebSocketReceive1:
.string "bw(0.0);\n"
.global WebSocketReceiveLen1
.align 3
.type WebSocketReceiveLen1, %object
.size WebSocketReceiveLen1, 8
WebSocketReceiveLen1:
.xword 9
.global WebSocketReceive2
.align 3
.type WebSocketReceive2, %object
.size WebSocketReceive2, 37
WebSocketReceive2:
.string "c(6,30,1,10,12,-1,-1);setWin(1,30);\n"
.global WebSocketReceiveLen2
.align 3
.type WebSocketReceiveLen2, %object
.size WebSocketReceiveLen2, 8
WebSocketReceiveLen2:
.xword 36
.global WebSocketReceive3
.align 3
.type WebSocketReceive3, %object
.size WebSocketReceive3, 1053
WebSocketReceive3:
.ascii "z(1,10,'ELE Manufacturing','8.68','07:18:06','14.06','65500'"
.ascii ",'8.68','8.69','31500','6.52','8.75','7.61','7.7');z(1,1,'An"
.ascii "duct','3.2','07:18:06','5.26','11000','3.2','3.21','35000','"
.ascii "2.54','3.37','3.04','3.1');z(1,3,'Bagies Consulting','7.3','"
.ascii "07:18:06','1.52','34000','7.3','7.32','49000','5.92','8.39',"
.ascii "'7.19','7.25');z(1,4,'BAY Corporation','3.38','07:18:06','-6"
.ascii ".88','44500','3.38','3.39','72500','3.35','3.71','3.63','3.6"
.ascii "2');z(1,5,'CON Consulting','8.11','07:18:06','6.57','74000',"
.ascii "'8.11','8.13','77500','6.52','9.0','7.61','7.65');z(1,6,'Cor"
.ascii "cor PLC','2.41','07:18:06','4.78','43500','2.41','2.42','720"
.ascii "00','1.88','2.57','2.3','2.3');z(1,7,'CVS Asia','15.03','07:"
.ascii "18:06','-2.33','37500','15.03','15.04','51000','13.08','17.9"
.ascii "9','15.39','15.85');z(1,8,'Datio PLC','5.48','07:18:06','3.2"
.ascii "','50500','5.47'"
.string ",'5.48','48000','4.46','6.14','5.31','5.31');z(1,9,'Dentems','4.1','07:18:06','-15.63','56000','4.09','4.1','93000','4.08','5.67','4.86','4.97');z(1,2,'Ations Europe','14.9','07:18:06','-7.39','3000','14.9','14.93','62000','13.07','18.83','16.09','16.2');\n"
.global WebSocketReceiveLen3
.align 3
.type WebSocketReceiveLen3, %object
.size WebSocketReceiveLen3, 8
WebSocketReceiveLen3:
.xword 1052
.global WebSocketReceive4
.align 3
.type WebSocketReceive4, %object
.size WebSocketReceive4, 63
WebSocketReceive4:
.string "d(1,2,1,'14.74',1,'-8.39','24500','14.74','14.78','57000',4);\n"
.global WebSocketReceiveLen4
.align 3
.type WebSocketReceiveLen4, %object
.size WebSocketReceiveLen4, 8
WebSocketReceiveLen4:
.xword 62
.global WebSocketReceive5
.align 3
.type WebSocketReceive5, %object
.size WebSocketReceive5, 72
WebSocketReceive5:
.string "d(1,2,1,'14.63','07:18:07','-9.07','92500','14.57','14.63','40500',4);\n"
.global WebSocketReceiveLen5
.align 3
.type WebSocketReceiveLen5, %object
.size WebSocketReceiveLen5, 8
WebSocketReceiveLen5:
.xword 71
.global WebSocketReceive6
.align 3
.type WebSocketReceive6, %object
.size WebSocketReceive6, 77
WebSocketReceive6:
.string "d(1,9,1,'4.06','07:18:07','-16.46','47500','4.06','4.07','82500','4.06',3);\n"
.global WebSocketReceiveLen6
.align 3
.type WebSocketReceiveLen6, %object
.size WebSocketReceiveLen6, 8
WebSocketReceiveLen6:
.xword 76
.global WebSocketReceive7
.align 3
.type WebSocketReceive7, %object
.size WebSocketReceive7, 68
WebSocketReceive7:
.string "d(1,8,1,'5.44','07:18:07','2.44','53000','5.42','5.44','67500',4);\n"
.global WebSocketReceiveLen7
.align 3
.type WebSocketReceiveLen7, %object
.size WebSocketReceiveLen7, 8
WebSocketReceiveLen7:
.xword 67
.global WebSocketReceive8
.align 3
.type WebSocketReceive8, %object
.size WebSocketReceive8, 68
WebSocketReceive8:
.string "d(1,5,1,'8.18','07:18:07','7.49','49500','8.16','8.18','95000',4);\n"
.global WebSocketReceiveLen8
.align 3
.type WebSocketReceiveLen8, %object
.size WebSocketReceiveLen8, 8
WebSocketReceiveLen8:
.xword 67
.global WebSocketReceive9
.align 3
.type WebSocketReceive9, %object
.size WebSocketReceive9, 72
WebSocketReceive9:
.string "d(1,2,1,'14.49','07:18:08','-9.94','96000','14.49','14.52','90000',4);\n"
.global WebSocketReceiveLen9
.align 3
.type WebSocketReceiveLen9, %object
.size WebSocketReceiveLen9, 8
WebSocketReceiveLen9:
.xword 71
.global WebSocketReceive10
.align 3
.type WebSocketReceive10, %object
.size WebSocketReceive10, 68
WebSocketReceive10:
.string "d(1,3,1,'7.26','07:18:08','0.97','75500','7.25','7.26','28500',4);\n"
.global WebSocketReceiveLen10
.align 3
.type WebSocketReceiveLen10, %object
.size WebSocketReceiveLen10, 8
WebSocketReceiveLen10:
.xword 67
.global WebSocketReceive11
.align 3
.type WebSocketReceive11, %object
.size WebSocketReceive11, 57
WebSocketReceive11:
.string "d(1,2,1,'14.51',1,'-9.81','96500','14.51',1,'86000',4);\n"
.global WebSocketReceiveLen11
.align 3
.type WebSocketReceiveLen11, %object
.size WebSocketReceiveLen11, 8
WebSocketReceiveLen11:
.xword 56
.global WebSocketReceive12
.align 3
.type WebSocketReceive12, %object
.size WebSocketReceive12, 61
WebSocketReceive12:
.string "d(1,2,1,'14.6',1,'-9.26','74500','14.59','14.6','52500',4);\n"
.global WebSocketReceiveLen12
.align 3
.type WebSocketReceiveLen12, %object
.size WebSocketReceiveLen12, 8
WebSocketReceiveLen12:
.xword 60
.global WebSocketReceive13
.align 3
.type WebSocketReceive13, %object
.size WebSocketReceive13, 63
WebSocketReceive13:
.string "d(1,2,1,'14.44',1,'-10.25','89000','14.4','14.44','75500',4);\n"
.global WebSocketReceiveLen13
.align 3
.type WebSocketReceiveLen13, %object
.size WebSocketReceiveLen13, 8
WebSocketReceiveLen13:
.xword 62
.global WebSocketReceive14
.align 3
.type WebSocketReceive14, %object
.size WebSocketReceive14, 71
WebSocketReceive14:
.string "d(1,7,1,'15.04','07:18:08','-2.27','97500','15.04','15.1','61500',4);\n"
.global WebSocketReceiveLen14
.align 3
.type WebSocketReceiveLen14, %object
.size WebSocketReceiveLen14, 8
WebSocketReceiveLen14:
.xword 70
.global WebSocketReceive15
.align 3
.type WebSocketReceive15, %object
.size WebSocketReceive15, 72
WebSocketReceive15:
.string "d(1,2,1,'14.54','07:18:09','-9.63','71000','14.53','14.54','47000',4);\n"
.global WebSocketReceiveLen15
.align 3
.type WebSocketReceiveLen15, %object
.size WebSocketReceiveLen15, 8
WebSocketReceiveLen15:
.xword 71
.global WebSocketReceive16
.align 3
.type WebSocketReceive16, %object
.size WebSocketReceive16, 64
WebSocketReceive16:
.string "d(1,2,1,'14.41',1,'-10.44','24000','14.41','14.46','88500',4);\n"
.global WebSocketReceiveLen16
.align 3
.type WebSocketReceiveLen16, %object
.size WebSocketReceiveLen16, 8
WebSocketReceiveLen16:
.xword 63
.global WebSocketReceive17
.align 3
.type WebSocketReceive17, %object
.size WebSocketReceive17, 64
WebSocketReceive17:
.string "d(1,2,1,'14.37',1,'-10.68','62000','14.37','14.43','91000',4);\n"
.global WebSocketReceiveLen17
.align 3
.type WebSocketReceiveLen17, %object
.size WebSocketReceiveLen17, 8
WebSocketReceiveLen17:
.xword 63
.global WebSocketReceive18
.align 3
.type WebSocketReceive18, %object
.size WebSocketReceive18, 63
WebSocketReceive18:
.string "d(1,2,1,'14.32',1,'-11.0','83000','14.29','14.32','68500',4);\n"
.global WebSocketReceiveLen18
.align 3
.type WebSocketReceiveLen18, %object
.size WebSocketReceiveLen18, 8
WebSocketReceiveLen18:
.xword 62
.global WebSocketReceive19
.align 3
.type WebSocketReceive19, %object
.size WebSocketReceive19, 72
WebSocketReceive19:
.string "d(1,2,1,'14.21','07:18:10','-11.68','45500','14.15','14.21','9500',4);\n"
.global WebSocketReceiveLen19
.align 3
.type WebSocketReceiveLen19, %object
.size WebSocketReceiveLen19, 8
WebSocketReceiveLen19:
.xword 71
.global WebSocketReceive20
.align 3
.type WebSocketReceive20, %object
.size WebSocketReceive20, 79
WebSocketReceive20:
.string "y(5);\nd(1,2,1,'14.37','07:18:11','-10.68','73000','14.34','14.37','61500',4);\n"
.global WebSocketReceiveLen20
.align 3
.type WebSocketReceiveLen20, %object
.size WebSocketReceiveLen20, 8
WebSocketReceiveLen20:
.xword 78
.global WebSocketReceive21
.align 3
.type WebSocketReceive21, %object
.size WebSocketReceive21, 72
WebSocketReceive21:
.string "d(1,7,1,'15.13','07:18:11','-1.68','47500','15.13','15.19','85500',4);\n"
.global WebSocketReceiveLen21
.align 3
.type WebSocketReceiveLen21, %object
.size WebSocketReceiveLen21, 8
WebSocketReceiveLen21:
.xword 71
.global WebSocketReceive22
.align 3
.type WebSocketReceive22, %object
.size WebSocketReceive22, 71
WebSocketReceive22:
.string "d(1,10,1,'8.71','07:18:11','14.45','82500','8.71','8.72','100000',4);\n"
.global WebSocketReceiveLen22
.align 3
.type WebSocketReceiveLen22, %object
.size WebSocketReceiveLen22, 8
WebSocketReceiveLen22:
.xword 70
.global WebSocketReceive23
.align 3
.type WebSocketReceive23, %object
.size WebSocketReceive23, 63
WebSocketReceive23:
.string "d(1,2,1,'14.33',1,'-10.93','40500','14.3','14.33','65500',4);\n"
.global WebSocketReceiveLen23
.align 3
.type WebSocketReceiveLen23, %object
.size WebSocketReceiveLen23, 8
WebSocketReceiveLen23:
.xword 62
.global WebSocketReceive24
.align 3
.type WebSocketReceive24, %object
.size WebSocketReceive24, 67
WebSocketReceive24:
.string "d(1,3,1,'7.31','07:18:12','1.66','8000','7.31','7.33','73000',4);\n"
.global WebSocketReceiveLen24
.align 3
.type WebSocketReceiveLen24, %object
.size WebSocketReceiveLen24, 8
WebSocketReceiveLen24:
.xword 66
.global WebSocketReceive25
.align 3
.type WebSocketReceive25, %object
.size WebSocketReceive25, 73
WebSocketReceive25:
.string "d(1,2,1,'14.29','07:18:12','-11.18','89000','14.23','14.29','70500',4);\n"
.global WebSocketReceiveLen25
.align 3
.type WebSocketReceiveLen25, %object
.size WebSocketReceiveLen25, 8
WebSocketReceiveLen25:
.xword 72
.global WebSocketReceive26
.align 3
.type WebSocketReceive26, %object
.size WebSocketReceive26, 59
WebSocketReceive26:
.string "d(1,2,1,'14.23','07:18:13','-11.55','51500',2,'99500',4);\n"
.global WebSocketReceiveLen26
.align 3
.type WebSocketReceiveLen26, %object
.size WebSocketReceiveLen26, 8
WebSocketReceiveLen26:
.xword 58
.global WebSocketReceive27
.align 3
.type WebSocketReceive27, %object
.size WebSocketReceive27, 62
WebSocketReceive27:
.string "d(1,2,1,'14.3',1,'-11.12','23000','14.3','14.31','74000',4);\n"
.global WebSocketReceiveLen27
.align 3
.type WebSocketReceiveLen27, %object
.size WebSocketReceiveLen27, 8
WebSocketReceiveLen27:
.xword 61
.global WebSocketReceive28
.align 3
.type WebSocketReceive28, %object
.size WebSocketReceive28, 64
WebSocketReceive28:
.string "d(1,2,1,'14.21',1,'-11.68','34000','14.21','14.27','72500',4);\n"
.global WebSocketReceiveLen28
.align 3
.type WebSocketReceiveLen28, %object
.size WebSocketReceiveLen28, 8
WebSocketReceiveLen28:
.xword 63
.global WebSocketReceive29
.align 3
.type WebSocketReceive29, %object
.size WebSocketReceive29, 44
WebSocketReceive29:
.string "d(1,6,2,'07:18:14',1,'97500',2,'96000',4);\n"
.global WebSocketReceiveLen29
.align 3
.type WebSocketReceiveLen29, %object
.size WebSocketReceiveLen29, 8
WebSocketReceiveLen29:
.xword 43
.global WebSocketReceive30
.align 3
.type WebSocketReceive30, %object
.size WebSocketReceive30, 52
WebSocketReceive30:
.string "d(1,2,2,'07:18:14',1,'72500',1,'14.22','55500',4);\n"
.global WebSocketReceiveLen30
.align 3
.type WebSocketReceiveLen30, %object
.size WebSocketReceiveLen30, 8
WebSocketReceiveLen30:
.xword 51
.global WebSocketReceive31
.align 3
.type WebSocketReceive31, %object
.size WebSocketReceive31, 62
WebSocketReceive31:
.string "d(1,2,1,'14.3',1,'-11.12','66500','14.24','14.3','26500',4);\n"
.global WebSocketReceiveLen31
.align 3
.type WebSocketReceiveLen31, %object
.size WebSocketReceiveLen31, 8
WebSocketReceiveLen31:
.xword 61
.global WebSocketReceive32
.align 3
.type WebSocketReceive32, %object
.size WebSocketReceive32, 71
WebSocketReceive32:
.string "d(1,7,1,'15.25','07:18:14','-0.9','39500','15.24','15.25','40500',4);\n"
.global WebSocketReceiveLen32
.align 3
.type WebSocketReceiveLen32, %object
.size WebSocketReceiveLen32, 8
WebSocketReceiveLen32:
.xword 70
.global WebSocketReceive33
.align 3
.type WebSocketReceive33, %object
.size WebSocketReceive33, 56
WebSocketReceive33:
.string "d(1,5,2,'07:18:14',1,'85500','8.18','8.19','46500',4);\n"
.global WebSocketReceiveLen33
.align 3
.type WebSocketReceiveLen33, %object
.size WebSocketReceiveLen33, 8
WebSocketReceiveLen33:
.xword 55
.global WebSocketReceive34
.align 3
.type WebSocketReceive34, %object
.size WebSocketReceive34, 68
WebSocketReceive34:
.string "d(1,3,1,'7.27','07:18:14','1.11','47500','7.25','7.27','48500',4);\n"
.global WebSocketReceiveLen34
.align 3
.type WebSocketReceiveLen34, %object
.size WebSocketReceiveLen34, 8
WebSocketReceiveLen34:
.xword 67
.global WebSocketReceive35
.align 3
.type WebSocketReceive35, %object
.size WebSocketReceive35, 43
WebSocketReceive35:
.string "d(1,9,2,'07:18:15',1,'6500',2,'64000',4);\n"
.global WebSocketReceiveLen35
.align 3
.type WebSocketReceiveLen35, %object
.size WebSocketReceiveLen35, 8
WebSocketReceiveLen35:
.xword 42
.global WebSocketReceive36
.align 3
.type WebSocketReceive36, %object
.size WebSocketReceive36, 72
WebSocketReceive36:
.string "d(1,2,1,'14.39','07:18:15','-10.56','87500','14.39','14.41','3500',4);\n"
.global WebSocketReceiveLen36
.align 3
.type WebSocketReceiveLen36, %object
.size WebSocketReceiveLen36, 8
WebSocketReceiveLen36:
.xword 71
.global WebSocketReceive37
.align 3
.type WebSocketReceive37, %object
.size WebSocketReceive37, 64
WebSocketReceive37:
.string "d(1,2,1,'14.46',1,'-10.13','70000','14.46','14.47','14500',4);\n"
.global WebSocketReceiveLen37
.align 3
.type WebSocketReceiveLen37, %object
.size WebSocketReceiveLen37, 8
WebSocketReceiveLen37:
.xword 63
.global WebSocketReceive38
.align 3
.type WebSocketReceive38, %object
.size WebSocketReceive38, 72
WebSocketReceive38:
.string "d(1,2,1,'14.32','07:18:16','-11.0','91000','14.31','14.32','44500',4);\n"
.global WebSocketReceiveLen38
.align 3
.type WebSocketReceiveLen38, %object
.size WebSocketReceiveLen38, 8
WebSocketReceiveLen38:
.xword 71
.global WebSocketReceive39
.align 3
.type WebSocketReceive39, %object
.size WebSocketReceive39, 57
WebSocketReceive39:
.string "d(1,2,1,'14.37',1,'-10.68','84500',1,'14.37','8000',4);\n"
.global WebSocketReceiveLen39
.align 3
.type WebSocketReceiveLen39, %object
.size WebSocketReceiveLen39, 8
WebSocketReceiveLen39:
.xword 56
.global WebSocketReceive40
.align 3
.type WebSocketReceive40, %object
.size WebSocketReceive40, 78
WebSocketReceive40:
.string "y(11);\nd(1,2,1,'14.49','07:18:17','-9.94','96500','14.49','14.53','1500',4);\n"
.global WebSocketReceiveLen40
.align 3
.type WebSocketReceiveLen40, %object
.size WebSocketReceiveLen40, 8
WebSocketReceiveLen40:
.xword 77
.global WebSocketReceive41
.align 3
.type WebSocketReceive41, %object
.size WebSocketReceive41, 68
WebSocketReceive41:
.string "d(1,3,1,'7.23','07:18:17','0.55','17500','7.21','7.23','73500',4);\n"
.global WebSocketReceiveLen41
.align 3
.type WebSocketReceiveLen41, %object
.size WebSocketReceiveLen41, 8
WebSocketReceiveLen41:
.xword 67
.global WebSocketReceive42
.align 3
.type WebSocketReceive42, %object
.size WebSocketReceive42, 68
WebSocketReceive42:
.string "d(1,8,1,'5.45','07:18:18','2.63','54500','5.45','5.46','16500',4);\n"
.global WebSocketReceiveLen42
.align 3
.type WebSocketReceiveLen42, %object
.size WebSocketReceiveLen42, 8
WebSocketReceiveLen42:
.xword 67
.global WebSocketReceive43
.align 3
.type WebSocketReceive43, %object
.size WebSocketReceive43, 70
WebSocketReceive43:
.string "d(1,2,1,'14.6','07:18:18','-9.26','57500','14.6','14.66','73500',4);\n"
.global WebSocketReceiveLen43
.align 3
.type WebSocketReceiveLen43, %object
.size WebSocketReceiveLen43, 8
WebSocketReceiveLen43:
.xword 69
.global WebSocketReceive44
.align 3
.type WebSocketReceive44, %object
.size WebSocketReceive44, 72
WebSocketReceive44:
.string "d(1,7,1,'15.34','07:18:18','-0.32','73000','15.34','15.35','79500',4);\n"
.global WebSocketReceiveLen44
.align 3
.type WebSocketReceiveLen44, %object
.size WebSocketReceiveLen44, 8
WebSocketReceiveLen44:
.xword 71
.global WebSocketReceive45
.align 3
.type WebSocketReceive45, %object
.size WebSocketReceive45, 72
WebSocketReceive45:
.string "d(1,2,1,'14.62','07:18:19','-9.13','48500','14.59','14.62','76000',4);\n"
.global WebSocketReceiveLen45
.align 3
.type WebSocketReceiveLen45, %object
.size WebSocketReceiveLen45, 8
WebSocketReceiveLen45:
.xword 71
.global WebSocketReceive46
.align 3
.type WebSocketReceive46, %object
.size WebSocketReceive46, 63
WebSocketReceive46:
.string "d(1,2,1,'14.78',1,'-8.14','94500','14.78','14.83','66000',4);\n"
.global WebSocketReceiveLen46
.align 3
.type WebSocketReceiveLen46, %object
.size WebSocketReceiveLen46, 8
WebSocketReceiveLen46:
.xword 62
.global WebSocketReceive47
.align 3
.type WebSocketReceive47, %object
.size WebSocketReceive47, 72
WebSocketReceive47:
.string "d(1,2,1,'14.68','07:18:20','-8.76','56000','14.68','14.74','10500',4);\n"
.global WebSocketReceiveLen47
.align 3
.type WebSocketReceiveLen47, %object
.size WebSocketReceiveLen47, 8
WebSocketReceiveLen47:
.xword 71
.global WebSocketReceive48
.align 3
.type WebSocketReceive48, %object
.size WebSocketReceive48, 57
WebSocketReceive48:
.string "d(1,10,2,'07:18:20',1,'36500','8.69','8.71','77500',4);\n"
.global WebSocketReceiveLen48
.align 3
.type WebSocketReceiveLen48, %object
.size WebSocketReceiveLen48, 8
WebSocketReceiveLen48:
.xword 56
.global WebSocketReceive49
.align 3
.type WebSocketReceive49, %object
.size WebSocketReceive49, 69
WebSocketReceive49:
.string "d(1,3,1,'7.17','07:18:20','-0.27','32500','7.16','7.17','83000',4);\n"
.global WebSocketReceiveLen49
.align 3
.type WebSocketReceiveLen49, %object
.size WebSocketReceiveLen49, 8
WebSocketReceiveLen49:
.xword 68
.global WebSocketReceive50
.align 3
.type WebSocketReceive50, %object
.size WebSocketReceive50, 70
WebSocketReceive50:
.string "d(1,9,1,'4.09','07:18:20','-15.84','82000','4.08','4.09','74000',4);\n"
.global WebSocketReceiveLen50
.align 3
.type WebSocketReceiveLen50, %object
.size WebSocketReceiveLen50, 8
WebSocketReceiveLen50:
.xword 69
.global WebSocketReceive51
.align 3
.type WebSocketReceive51, %object
.size WebSocketReceive51, 63
WebSocketReceive51:
.string "d(1,2,1,'14.73',1,'-8.45','78500','14.69','14.73','26500',4);\n"
.global WebSocketReceiveLen51
.align 3
.type WebSocketReceiveLen51, %object
.size WebSocketReceiveLen51, 8
WebSocketReceiveLen51:
.xword 62
.global WebSocketReceive52
.align 3
.type WebSocketReceive52, %object
.size WebSocketReceive52, 68
WebSocketReceive52:
.string "d(1,5,1,'8.16','07:18:21','7.22','81000','8.13','8.16','87000',4);\n"
.global WebSocketReceiveLen52
.align 3
.type WebSocketReceiveLen52, %object
.size WebSocketReceiveLen52, 8
WebSocketReceiveLen52:
.xword 67
.global WebSocketReceive53
.align 3
.type WebSocketReceive53, %object
.size WebSocketReceive53, 71
WebSocketReceive53:
.string "d(1,2,1,'14.58','07:18:21','-9.38','8000','14.53','14.58','70500',4);\n"
.global WebSocketReceiveLen53
.align 3
.type WebSocketReceiveLen53, %object
.size WebSocketReceiveLen53, 8
WebSocketReceiveLen53:
.xword 70
.global WebSocketReceive54
.align 3
.type WebSocketReceive54, %object
.size WebSocketReceive54, 55
WebSocketReceive54:
.string "d(1,2,1,'14.6',1,'-9.26',1,'14.58','14.6','41500',4);\n"
.global WebSocketReceiveLen54
.align 3
.type WebSocketReceiveLen54, %object
.size WebSocketReceiveLen54, 8
WebSocketReceiveLen54:
.xword 54
.global WebSocketReceive55
.align 3
.type WebSocketReceive55, %object
.size WebSocketReceive55, 71
WebSocketReceive55:
.string "d(1,7,1,'15.49','07:18:22','0.64','91000','15.46','15.49','32000',4);\n"
.global WebSocketReceiveLen55
.align 3
.type WebSocketReceiveLen55, %object
.size WebSocketReceiveLen55, 8
WebSocketReceiveLen55:
.xword 70
.global WebSocketReceive56
.align 3
.type WebSocketReceive56, %object
.size WebSocketReceive56, 43
WebSocketReceive56:
.string "d(1,3,2,'07:18:22',1,'2500',2,'60500',4);\n"
.global WebSocketReceiveLen56
.align 3
.type WebSocketReceiveLen56, %object
.size WebSocketReceiveLen56, 8
WebSocketReceiveLen56:
.xword 42
.global WebSocketReceive57
.align 3
.type WebSocketReceive57, %object
.size WebSocketReceive57, 65
WebSocketReceive57:
.string "d(1,2,1,'14.61','07:18:22','-9.19',1,'14.6','14.61','18000',4);\n"
.global WebSocketReceiveLen57
.align 3
.type WebSocketReceiveLen57, %object
.size WebSocketReceiveLen57, 8
WebSocketReceiveLen57:
.xword 64
.global WebSocketReceive58
.align 3
.type WebSocketReceive58, %object
.size WebSocketReceive58, 67
WebSocketReceive58:
.string "d(1,8,1,'5.48','07:18:23','3.2','78000','5.46','5.48','57000',4);\n"
.global WebSocketReceiveLen58
.align 3
.type WebSocketReceiveLen58, %object
.size WebSocketReceiveLen58, 8
WebSocketReceiveLen58:
.xword 66
``` |
### 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]
ldr w1, [x0]
ldr x0, [sp]
ldr w0, [x0]
cmp w1, w0
bne .L2
mov w0, 0
b .L3
.L2:
ldr x0, [sp, 8]
ldr w1, [x0]
ldr x0, [sp]
ldr w0, [x0]
cmp w1, w0
bge .L4
mov w0, -1
b .L3
.L4:
mov w0, 1
.L3:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size cmp, .-cmp
.align 2
.global canBeEqual
.type canBeEqual, %function
canBeEqual:
.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, 40]
str w1, [sp, 36]
str x2, [sp, 24]
str w3, [sp, 32]
ldr w1, [sp, 32]
ldr w0, [sp, 36]
cmp w1, w0
beq .L7
mov w0, 0
b .L8
.L7:
ldrsw x1, [sp, 32]
adrp x0, cmp
add x3, x0, :lo12:cmp
mov x2, 4
ldr x0, [sp, 24]
bl qsort
ldrsw x1, [sp, 36]
adrp x0, cmp
add x3, x0, :lo12:cmp
mov x2, 4
ldr x0, [sp, 40]
bl qsort
str wzr, [sp, 60]
b .L9
.L11:
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [x0]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x2, [sp, 40]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
beq .L10
mov w0, 0
b .L8
.L10:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L9:
ldr w1, [sp, 60]
ldr w0, [sp, 32]
cmp w1, w0
blt .L11
mov w0, 1
.L8:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size canBeEqual, .-canBeEqual
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global RandomFunc
.type RandomFunc, %function
RandomFunc:
.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]
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 x0, [sp, 24]
ldr w1, [x0]
mov w0, 2885
movk w0, 0xff66, lsl 16
add w0, w1, w0
str w0, [sp, 48]
str wzr, [sp, 44]
b .L2
.L3:
ldr w0, [sp, 44]
lsl x0, x0, 2
add x1, sp, 48
ldr w1, [x1, x0]
ldr w0, [sp, 44]
lsl x0, x0, 2
add x2, sp, 48
ldr w0, [x2, x0]
mul w2, w1, w0
ldr w0, [sp, 44]
lsl x0, x0, 2
add x1, sp, 48
str w2, [x1, x0]
ldr w0, [sp, 44]
add w0, w0, 2
str w0, [sp, 44]
.L2:
ldr w0, [sp, 44]
cmp w0, 0
beq .L3
str wzr, [sp, 44]
b .L4
.L5:
ldr w0, [sp, 48]
lsl w0, w0, 1
str w0, [sp, 48]
ldr w0, [sp, 44]
add w0, w0, 2
str w0, [sp, 44]
.L4:
ldr w0, [sp, 44]
cmp w0, 0
beq .L5
ldr w1, [sp, 48]
mov w0, 12701
movk w0, 0x161f, lsl 16
mul w1, w1, w0
mov w0, 42227
movk w0, 0xce08, lsl 16
add w1, w1, w0
ldr x0, [sp, 16]
str w1, [x0]
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 .L6
bl __stack_chk_fail
.L6:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size RandomFunc, .-RandomFunc
.section .rodata
.align 3
.LC0:
.string "Call this program with %i arguments\n"
.align 3
.LC1:
.string "You win!"
.align 3
.LC2:
.string "%u\n"
.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
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 .L8
mov w1, 1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, -1
bl exit
.L8:
str wzr, [sp, 44]
b .L9
.L10:
ldrsw x0, [sp, 44]
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 w0, [sp, 52]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x1, sp, 56
ldr w2, [sp, 52]
str w2, [x1, x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L9:
ldr w0, [sp, 44]
cmp w0, 0
ble .L10
add x1, sp, 64
add x0, sp, 56
bl RandomFunc
ldr w1, [sp, 64]
mov w0, 50651
movk w0, 0xfd28, lsl 16
cmp w1, w0
bne .L11
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
.L11:
str wzr, [sp, 48]
b .L12
.L13:
ldrsw x0, [sp, 48]
lsl x0, x0, 2
add x1, sp, 64
ldr w0, [x1, x0]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L12:
ldr w0, [sp, 48]
cmp w0, 0
ble .L13
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 .L15
bl __stack_chk_fail
.L15:
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
.align 2
.global megaInit
.type megaInit, %function
megaInit:
.LFB2:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE2:
.size megaInit, .-megaInit
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global _godl_XGBoostVersion
.bss
.align 3
.type _godl_XGBoostVersion, %object
.size _godl_XGBoostVersion, 8
_godl_XGBoostVersion:
.zero 8
#APP
.global XGBoostVersion
XGBoostVersion:
movq _godl_XGBoostVersion(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBGetLastError
.align 3
.type _godl_XGBGetLastError, %object
.size _godl_XGBGetLastError, 8
_godl_XGBGetLastError:
.zero 8
#APP
.global XGBGetLastError
XGBGetLastError:
movq _godl_XGBGetLastError(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixCreateFromFile
.align 3
.type _godl_XGDMatrixCreateFromFile, %object
.size _godl_XGDMatrixCreateFromFile, 8
_godl_XGDMatrixCreateFromFile:
.zero 8
#APP
.global XGDMatrixCreateFromFile
XGDMatrixCreateFromFile:
movq _godl_XGDMatrixCreateFromFile(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixCreateFromDT
.align 3
.type _godl_XGDMatrixCreateFromDT, %object
.size _godl_XGDMatrixCreateFromDT, 8
_godl_XGDMatrixCreateFromDT:
.zero 8
#APP
.global XGDMatrixCreateFromDT
XGDMatrixCreateFromDT:
movq _godl_XGDMatrixCreateFromDT(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixCreateFromMat
.align 3
.type _godl_XGDMatrixCreateFromMat, %object
.size _godl_XGDMatrixCreateFromMat, 8
_godl_XGDMatrixCreateFromMat:
.zero 8
#APP
.global XGDMatrixCreateFromMat
XGDMatrixCreateFromMat:
movq _godl_XGDMatrixCreateFromMat(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixFree
.align 3
.type _godl_XGDMatrixFree, %object
.size _godl_XGDMatrixFree, 8
_godl_XGDMatrixFree:
.zero 8
#APP
.global XGDMatrixFree
XGDMatrixFree:
movq _godl_XGDMatrixFree(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixSaveBinary
.align 3
.type _godl_XGDMatrixSaveBinary, %object
.size _godl_XGDMatrixSaveBinary, 8
_godl_XGDMatrixSaveBinary:
.zero 8
#APP
.global XGDMatrixSaveBinary
XGDMatrixSaveBinary:
movq _godl_XGDMatrixSaveBinary(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixNumRow
.align 3
.type _godl_XGDMatrixNumRow, %object
.size _godl_XGDMatrixNumRow, 8
_godl_XGDMatrixNumRow:
.zero 8
#APP
.global XGDMatrixNumRow
XGDMatrixNumRow:
movq _godl_XGDMatrixNumRow(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixNumCol
.align 3
.type _godl_XGDMatrixNumCol, %object
.size _godl_XGDMatrixNumCol, 8
_godl_XGDMatrixNumCol:
.zero 8
#APP
.global XGDMatrixNumCol
XGDMatrixNumCol:
movq _godl_XGDMatrixNumCol(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterCreate
.align 3
.type _godl_XGBoosterCreate, %object
.size _godl_XGBoosterCreate, 8
_godl_XGBoosterCreate:
.zero 8
#APP
.global XGBoosterCreate
XGBoosterCreate:
movq _godl_XGBoosterCreate(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterFree
.align 3
.type _godl_XGBoosterFree, %object
.size _godl_XGBoosterFree, 8
_godl_XGBoosterFree:
.zero 8
#APP
.global XGBoosterFree
XGBoosterFree:
movq _godl_XGBoosterFree(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterSetParam
.align 3
.type _godl_XGBoosterSetParam, %object
.size _godl_XGBoosterSetParam, 8
_godl_XGBoosterSetParam:
.zero 8
#APP
.global XGBoosterSetParam
XGBoosterSetParam:
movq _godl_XGBoosterSetParam(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterLoadModel
.align 3
.type _godl_XGBoosterLoadModel, %object
.size _godl_XGBoosterLoadModel, 8
_godl_XGBoosterLoadModel:
.zero 8
#APP
.global XGBoosterLoadModel
XGBoosterLoadModel:
movq _godl_XGBoosterLoadModel(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterSaveModel
.align 3
.type _godl_XGBoosterSaveModel, %object
.size _godl_XGBoosterSaveModel, 8
_godl_XGBoosterSaveModel:
.zero 8
#APP
.global XGBoosterSaveModel
XGBoosterSaveModel:
movq _godl_XGBoosterSaveModel(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterLoadModelFromBuffer
.align 3
.type _godl_XGBoosterLoadModelFromBuffer, %object
.size _godl_XGBoosterLoadModelFromBuffer, 8
_godl_XGBoosterLoadModelFromBuffer:
.zero 8
#APP
.global XGBoosterLoadModelFromBuffer
XGBoosterLoadModelFromBuffer:
movq _godl_XGBoosterLoadModelFromBuffer(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterGetModelRaw
.align 3
.type _godl_XGBoosterGetModelRaw, %object
.size _godl_XGBoosterGetModelRaw, 8
_godl_XGBoosterGetModelRaw:
.zero 8
#APP
.global XGBoosterGetModelRaw
XGBoosterGetModelRaw:
movq _godl_XGBoosterGetModelRaw(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterSaveJsonConfig
.align 3
.type _godl_XGBoosterSaveJsonConfig, %object
.size _godl_XGBoosterSaveJsonConfig, 8
_godl_XGBoosterSaveJsonConfig:
.zero 8
#APP
.global XGBoosterSaveJsonConfig
XGBoosterSaveJsonConfig:
movq _godl_XGBoosterSaveJsonConfig(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterLoadJsonConfig
.align 3
.type _godl_XGBoosterLoadJsonConfig, %object
.size _godl_XGBoosterLoadJsonConfig, 8
_godl_XGBoosterLoadJsonConfig:
.zero 8
#APP
.global XGBoosterLoadJsonConfig
XGBoosterLoadJsonConfig:
movq _godl_XGBoosterLoadJsonConfig(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterGetAttr
.align 3
.type _godl_XGBoosterGetAttr, %object
.size _godl_XGBoosterGetAttr, 8
_godl_XGBoosterGetAttr:
.zero 8
#APP
.global XGBoosterGetAttr
XGBoosterGetAttr:
movq _godl_XGBoosterGetAttr(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterSetAttr
.align 3
.type _godl_XGBoosterSetAttr, %object
.size _godl_XGBoosterSetAttr, 8
_godl_XGBoosterSetAttr:
.zero 8
#APP
.global XGBoosterSetAttr
XGBoosterSetAttr:
movq _godl_XGBoosterSetAttr(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterGetAttrNames
.align 3
.type _godl_XGBoosterGetAttrNames, %object
.size _godl_XGBoosterGetAttrNames, 8
_godl_XGBoosterGetAttrNames:
.zero 8
#APP
.global XGBoosterGetAttrNames
XGBoosterGetAttrNames:
movq _godl_XGBoosterGetAttrNames(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterBoostOneIter
.align 3
.type _godl_XGBoosterBoostOneIter, %object
.size _godl_XGBoosterBoostOneIter, 8
_godl_XGBoosterBoostOneIter:
.zero 8
#APP
.global XGBoosterBoostOneIter
XGBoosterBoostOneIter:
movq _godl_XGBoosterBoostOneIter(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterUpdateOneIter
.align 3
.type _godl_XGBoosterUpdateOneIter, %object
.size _godl_XGBoosterUpdateOneIter, 8
_godl_XGBoosterUpdateOneIter:
.zero 8
#APP
.global XGBoosterUpdateOneIter
XGBoosterUpdateOneIter:
movq _godl_XGBoosterUpdateOneIter(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterEvalOneIter
.align 3
.type _godl_XGBoosterEvalOneIter, %object
.size _godl_XGBoosterEvalOneIter, 8
_godl_XGBoosterEvalOneIter:
.zero 8
#APP
.global XGBoosterEvalOneIter
XGBoosterEvalOneIter:
movq _godl_XGBoosterEvalOneIter(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterPredict
.align 3
.type _godl_XGBoosterPredict, %object
.size _godl_XGBoosterPredict, 8
_godl_XGBoosterPredict:
.zero 8
#APP
.global XGBoosterPredict
XGBoosterPredict:
movq _godl_XGBoosterPredict(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixSetFloatInfo
.align 3
.type _godl_XGDMatrixSetFloatInfo, %object
.size _godl_XGDMatrixSetFloatInfo, 8
_godl_XGDMatrixSetFloatInfo:
.zero 8
#APP
.global XGDMatrixSetFloatInfo
XGDMatrixSetFloatInfo:
movq _godl_XGDMatrixSetFloatInfo(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixSetUIntInfo
.align 3
.type _godl_XGDMatrixSetUIntInfo, %object
.size _godl_XGDMatrixSetUIntInfo, 8
_godl_XGDMatrixSetUIntInfo:
.zero 8
#APP
.global XGDMatrixSetUIntInfo
XGDMatrixSetUIntInfo:
movq _godl_XGDMatrixSetUIntInfo(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixGetFloatInfo
.align 3
.type _godl_XGDMatrixGetFloatInfo, %object
.size _godl_XGDMatrixGetFloatInfo, 8
_godl_XGDMatrixGetFloatInfo:
.zero 8
#APP
.global XGDMatrixGetFloatInfo
XGDMatrixGetFloatInfo:
movq _godl_XGDMatrixGetFloatInfo(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGDMatrixGetUIntInfo
.align 3
.type _godl_XGDMatrixGetUIntInfo, %object
.size _godl_XGDMatrixGetUIntInfo, 8
_godl_XGDMatrixGetUIntInfo:
.zero 8
#APP
.global XGDMatrixGetUIntInfo
XGDMatrixGetUIntInfo:
movq _godl_XGDMatrixGetUIntInfo(%rip),%rax
jmp *%rax
#NO_APP
.global _godl_XGBoosterDumpModelEx
.align 3
.type _godl_XGBoosterDumpModelEx, %object
.size _godl_XGBoosterDumpModelEx, 8
_godl_XGBoosterDumpModelEx:
.zero 8
#APP
.global XGBoosterDumpModelEx
XGBoosterDumpModelEx:
movq _godl_XGBoosterDumpModelEx(%rip),%rax
jmp *%rax
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global a_ptr
.data
.align 3
.type a_ptr, %object
.size a_ptr, 8
a_ptr:
.xword 32532
.global b_ptr
.align 3
.type b_ptr, %object
.size b_ptr, 8
b_ptr:
.xword 32528
.text
.align 2
.global foo
.type foo, %function
foo:
.LFB0:
.cfi_startproc
mov x0, 32532
ldrb w0, [x0]
and w0, w0, 255
and w0, w0, 8
cmp w0, 0
beq .L2
mov x0, 32528
ldrb w0, [x0]
and w0, w0, 255
and w0, w0, 8
cmp w0, 0
beq .L3
mov w0, -1
b .L4
.L3:
mov w0, 0
b .L4
.L2:
mov w0, -1
.L4:
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
.align 2
.global bar
.type bar, %function
bar:
.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, a_ptr
add x0, x0, :lo12:a_ptr
ldr x0, [x0]
mov w1, 8
strb w1, [x0]
adrp x0, b_ptr
add x0, x0, :lo12:b_ptr
ldr x0, [x0]
mov w1, -9
strb w1, [x0]
bl foo
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size bar, .-bar
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global g
.bss
.align 2
.type g, %object
.size g, 4
g:
.zero 4
.section .rodata
.align 3
.LC0:
.string " "
.align 3
.LC1:
.string "hot"
.align 3
.LC2:
.string "cold"
.align 3
.LC3:
.string "warm"
.text
.align 2
.type tip, %function
tip:
.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 s0, [sp, 28]
str x0, [sp, 16]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr s1, [sp, 28]
ldr x0, [sp, 16]
ldr s0, [x0]
scvtf s0, s0
fsub s0, s1, s0
str s0, [sp, 28]
add x0, sp, 28
str x0, [sp, 16]
ldr x0, [sp, 16]
ldr w0, [x0]
and w1, w0, 2147483647
ldr x0, [sp, 16]
str w1, [x0]
ldr s0, [sp, 28]
fcvtzs w0, s0
cmp w0, 1
beq .L2
cmp w0, 2
beq .L3
b .L7
.L2:
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
b .L5
.L7:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L5:
mov w0, 10
bl putchar
b .L6
.L3:
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
nop
.L6:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size tip, .-tip
.section .rodata
.align 3
.LC4:
.string "Round %d... Good Luck!\n"
.align 3
.LC5:
.string "You lost! The right answer was %d\n"
.align 3
.LC6:
.string "Correct!"
.text
.align 2
.global start
.type start, %function
start:
.LFB1:
.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]
bl rand
and w0, w0, 15
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 9
ble .L10
mov w0, 5
str w0, [sp, 36]
.L10:
ldrb w0, [sp, 31]
mov w1, w0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
bl getchar
sub w0, w0, #48
str w0, [sp, 40]
.L11:
bl getchar
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 10
bne .L11
ldr w1, [sp, 40]
adrp x0, g
add x0, x0, :lo12:g
str w1, [x0]
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
beq .L13
ldr s0, [sp, 36]
scvtf s0, s0
adrp x0, g
add x0, x0, :lo12:g
bl tip
bl getchar
sub w0, w0, #48
str w0, [sp, 48]
.L14:
bl getchar
str w0, [sp, 52]
ldr w0, [sp, 52]
cmp w0, 10
bne .L14
ldr w1, [sp, 48]
adrp x0, g
add x0, x0, :lo12:g
str w1, [x0]
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
beq .L13
ldr s0, [sp, 36]
scvtf s0, s0
adrp x0, g
add x0, x0, :lo12:g
bl tip
bl getchar
sub w0, w0, #48
str w0, [sp, 56]
.L16:
bl getchar
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 10
bne .L16
ldr w1, [sp, 56]
adrp x0, g
add x0, x0, :lo12:g
str w1, [x0]
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
beq .L13
nop
.L17:
ldr w1, [sp, 36]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
mov w0, 0
b .L18
.L13:
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
mov w0, 1
.L18:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size start, .-start
.section .rodata
.align 3
.LC7:
.string "\n%d of %d games won\n"
.align 3
.LC8:
.string ""
.align 3
.LC9:
.string "an..."
.align 3
.LC10:
.string "a..."
.align 3
.LC11:
.string "...ADVANCED"
.align 3
.LC12:
.string "...AMATEUR"
.align 3
.LC13:
.string "...PROFESSIONAL"
.align 3
.LC14:
.string "...HACKER"
.align 3
.LC15:
.string "You... are... %s\n %s!\n"
.text
.align 2
.global stat
.type stat, %function
stat:
.LFB2:
.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, g
add x0, x0, :lo12:g
ldr w0, [x0]
mov w2, 10
mov w1, w0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
cmp w0, 10
beq .L20
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
cmp w0, 9
beq .L20
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
cmp w0, 8
bne .L21
adrp x0, .LC8
add x1, x0, :lo12:.LC8
b .L23
.L21:
adrp x0, .LC9
add x1, x0, :lo12:.LC9
b .L23
.L20:
adrp x0, .LC10
add x1, x0, :lo12:.LC10
.L23:
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
cmp w0, 10
beq .L24
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
cmp w0, 9
beq .L25
adrp x0, g
add x0, x0, :lo12:g
ldr w0, [x0]
cmp w0, 8
bne .L26
adrp x0, .LC11
add x0, x0, :lo12:.LC11
b .L29
.L26:
adrp x0, .LC12
add x0, x0, :lo12:.LC12
b .L29
.L25:
adrp x0, .LC13
add x0, x0, :lo12:.LC13
b .L29
.L24:
adrp x0, .LC14
add x0, x0, :lo12:.LC14
.L29:
mov x2, x0
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl printf
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size stat, .-stat
.align 2
.global main
.type main, %function
main:
.LFB3:
.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, 0
bl time
bl srand
b .L31
.L33:
ldr w0, [sp, 24]
and w1, w0, 255
ldr w0, [sp, 28]
and w0, w0, 255
add w0, w1, w0
and w0, w0, 255
bl start
cmp w0, 0
beq .L32
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
b .L31
.L32:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L31:
ldr w1, [sp, 24]
ldr w0, [sp, 28]
add w0, w1, w0
cmp w0, 9
ble .L33
adrp x0, g
add x0, x0, :lo12:g
ldr w1, [sp, 24]
str w1, [x0]
bl stat
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global foo
.type foo, %function
foo:
.LFB0:
.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]
b .L2
.L5:
ldr w0, [sp, 20]
add w0, w0, 16
str w0, [sp, 28]
str wzr, [sp, 24]
b .L3
.L4:
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
cset w0, eq
and w0, w0, 255
str w0, [sp, 28]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L3:
ldr w1, [sp, 24]
ldr w0, [sp]
cmp w1, w0
blt .L4
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L2:
ldr w1, [sp, 20]
ldr w0, [sp, 4]
cmp w1, w0
blt .L5
ldr w0, [sp, 28]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global sys_isatty
.type sys_isatty, %function
sys_isatty:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
mov w0, 1
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size sys_isatty, .-sys_isatty
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.type strings, %object
.size strings, 502
strings:
.string "Unknown signal"
.string "Hangup"
.string "Interrupt"
.string "Quit"
.string "Illegal instruction"
.string "Trace/breakpoint trap"
.string "Aborted"
.string "Bus error"
.string "Floating point exception"
.string "Killed"
.string "User defined signal 1"
.string "Segmentation fault"
.string "User defined signal 2"
.string "Broken pipe"
.string "Alarm clock"
.string "Terminated"
.string "Stack fault"
.string "Child exited"
.string "Continued"
.string "Stopped (signal)"
.string "Stopped"
.string "Stopped (tty input)"
.string "Stopped (tty output)"
.string "Urgent I/O condition"
.string "CPU time limit exceeded"
.string "File size limit exceeded"
.string "Virtual timer expired"
.string "Profiling timer expired"
.string "Window changed"
.string "I/O possible"
.string "Power failure"
.string "Bad system call"
.text
.align 2
.global strsignal
.type strsignal, %function
strsignal:
.LFB6:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
adrp x0, strings
add x0, x0, :lo12:strings
str x0, [sp, 24]
ldr w0, [sp, 12]
sub w0, w0, #1
cmp w0, 31
bls .L3
str wzr, [sp, 12]
b .L3
.L5:
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
.L4:
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 0
bne .L5
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
.L3:
ldr w0, [sp, 12]
sub w1, w0, #1
str w1, [sp, 12]
cmp w0, 0
bne .L4
ldr x0, [sp, 24]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size strsignal, .-strsignal
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.local verbose
.comm verbose,4,4
.section .rodata
.align 3
.LC4:
.string "HAVE_32BIT_OFF_T"
.align 3
.LC5:
.string "#include <sys/types.h>\nint main(int argc, char *argv[]) {\n\treturn sizeof(off_t) == 4 ? 0 : 1;\n}\n"
.align 3
.LC6:
.string "HAVE_ALIGNOF"
.align 3
.LC7:
.string "return __alignof__(double) > 0 ? 0 : 1;"
.align 3
.LC8:
.string "HAVE_ASPRINTF"
.align 3
.LC9:
.string "#define _GNU_SOURCE\n#include <stdio.h>\nstatic char *func(int x) {\tchar *p;\n\tif (asprintf(&p, \"%u\", x) == -1) p = NULL;\treturn p;\n}"
.align 3
.LC10:
.string "HAVE_ATTRIBUTE_COLD"
.align 3
.LC11:
.string "static int __attribute__((cold)) func(int x) { return x; }"
.align 3
.LC12:
.string "HAVE_ATTRIBUTE_CONST"
.align 3
.LC13:
.string "static int __attribute__((const)) func(int x) { return x; }"
.align 3
.LC14:
.string "HAVE_ATTRIBUTE_PURE"
.align 3
.LC15:
.string "static int __attribute__((pure)) func(int x) { return x; }"
.align 3
.LC16:
.string "HAVE_ATTRIBUTE_MAY_ALIAS"
.align 3
.LC17:
.string "typedef short __attribute__((__may_alias__)) short_a;"
.align 3
.LC18:
.string "HAVE_ATTRIBUTE_NORETURN"
.align 3
.LC19:
.string "#include <stdlib.h>\nstatic void __attribute__((noreturn)) func(int x) { exit(x); }"
.align 3
.LC20:
.string "HAVE_ATTRIBUTE_PRINTF"
.align 3
.LC21:
.string "static void __attribute__((format(__printf__, 1, 2))) func(const char *fmt, ...) { }"
.align 3
.LC22:
.string "HAVE_ATTRIBUTE_UNUSED"
.align 3
.LC23:
.string "static int __attribute__((unused)) func(int x) { return x; }"
.align 3
.LC24:
.string "HAVE_ATTRIBUTE_USED"
.align 3
.LC25:
.string "static int __attribute__((used)) func(int x) { return x; }"
.align 3
.LC26:
.string "HAVE_BACKTRACE"
.align 3
.LC27:
.string "#include <execinfo.h>\nstatic int func(int x) {\tvoid *bt[10];\n\treturn backtrace(bt, 10) < x;\n}"
.align 3
.LC28:
.string "HAVE_BIG_ENDIAN"
.align 3
.LC29:
.string "union { int i; char c[sizeof(int)]; } u;\nu.i = 0x01020304;\nreturn u.c[0] == 0x01 && u.c[1] == 0x02 && u.c[2] == 0x03 && u.c[3] == 0x04 ? 0 : 1;"
.align 3
.LC30:
.string "HAVE_BSWAP_64"
.align 3
.LC31:
.string "HAVE_BYTESWAP_H"
.align 3
.LC32:
.string "#include <byteswap.h>\nstatic int func(int x) { return bswap_64(x); }"
.align 3
.LC33:
.string "HAVE_BUILTIN_CHOOSE_EXPR"
.align 3
.LC34:
.string "return __builtin_choose_expr(1, 0, \"garbage\");"
.align 3
.LC35:
.string "HAVE_BUILTIN_CLZ"
.align 3
.LC36:
.string "return __builtin_clz(1) == (sizeof(int)*8 - 1) ? 0 : 1;"
.align 3
.LC37:
.string "HAVE_BUILTIN_CLZL"
.align 3
.LC38:
.string "return __builtin_clzl(1) == (sizeof(long)*8 - 1) ? 0 : 1;"
.align 3
.LC39:
.string "HAVE_BUILTIN_CLZLL"
.align 3
.LC40:
.string "return __builtin_clzll(1) == (sizeof(long long)*8 - 1) ? 0 : 1;"
.align 3
.LC41:
.string "HAVE_BUILTIN_CTZ"
.align 3
.LC42:
.string "return __builtin_ctz(1 << (sizeof(int)*8 - 1)) == (sizeof(int)*8 - 1) ? 0 : 1;"
.align 3
.LC43:
.string "HAVE_BUILTIN_CTZL"
.align 3
.LC44:
.string "return __builtin_ctzl(1UL << (sizeof(long)*8 - 1)) == (sizeof(long)*8 - 1) ? 0 : 1;"
.align 3
.LC45:
.string "HAVE_BUILTIN_CTZLL"
.align 3
.LC46:
.string "return __builtin_ctzll(1ULL << (sizeof(long long)*8 - 1)) == (sizeof(long long)*8 - 1) ? 0 : 1;"
.align 3
.LC47:
.string "HAVE_BUILTIN_CONSTANT_P"
.align 3
.LC48:
.string "return __builtin_constant_p(1) ? 0 : 1;"
.align 3
.LC49:
.string "HAVE_BUILTIN_EXPECT"
.align 3
.LC50:
.string "return __builtin_expect(argc == 1, 1) ? 0 : 1;"
.align 3
.LC51:
.string "HAVE_BUILTIN_FFS"
.align 3
.LC52:
.string "return __builtin_ffs(0) == 0 ? 0 : 1;"
.align 3
.LC53:
.string "HAVE_BUILTIN_FFSL"
.align 3
.LC54:
.string "return __builtin_ffsl(0L) == 0 ? 0 : 1;"
.align 3
.LC55:
.string "HAVE_BUILTIN_FFSLL"
.align 3
.LC56:
.string "return __builtin_ffsll(0LL) == 0 ? 0 : 1;"
.align 3
.LC57:
.string "HAVE_BUILTIN_POPCOUNTL"
.align 3
.LC58:
.string "return __builtin_popcountl(255L) == 8 ? 0 : 1;"
.align 3
.LC59:
.string "HAVE_BUILTIN_TYPES_COMPATIBLE_P"
.align 3
.LC60:
.string "return __builtin_types_compatible_p(char *, int) ? 1 : 0;"
.align 3
.LC61:
.string "HAVE_ICCARM_INTRINSICS"
.align 3
.LC62:
.string "#include <intrinsics.h>\nint func(int v) {\n\treturn __CLZ(__RBIT(v));\n}"
.align 3
.LC63:
.string "#include <byteswap.h>\n"
.align 3
.LC64:
.string "HAVE_CLOCK_GETTIME"
.align 3
.LC65:
.string "HAVE_STRUCT_TIMESPEC"
.align 3
.LC66:
.string "#include <time.h>\nstatic struct timespec func(void) {\n\tstruct timespec ts;\n\tclock_gettime(CLOCK_REALTIME, &ts);\n\treturn ts;\n}\n"
.align 3
.LC67:
.string "HAVE_CLOCK_GETTIME_IN_LIBRT"
.align 3
.LC68:
.string "HAVE_STRUCT_TIMESPEC !HAVE_CLOCK_GETTIME"
.align 3
.LC69:
.string "-lrt"
.align 3
.LC70:
.string "HAVE_COMPOUND_LITERALS"
.align 3
.LC71:
.string "int *foo = (int[]) { 1, 2, 3, 4 };\nreturn foo[0] ? 0 : 1;"
.align 3
.LC72:
.string "HAVE_FCHDIR"
.align 3
.LC73:
.string "#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <unistd.h>\nint main(void) {\n\tint fd = open(\"..\", O_RDONLY);\n\treturn fchdir(fd) == 0 ? 0 : 1;\n}\n"
.align 3
.LC74:
.string "HAVE_ERR_H"
.align 3
.LC75:
.string "#include <err.h>\nstatic void func(int arg) {\n\tif (arg == 0)\n\t\terr(1, \"err %u\", arg);\n\tif (arg == 1)\n\t\terrx(1, \"err %u\", arg);\n\tif (arg == 3)\n\t\twarn(\"warn %u\", arg);\n\tif (arg == 4)\n\t\twarnx(\"warn %u\", arg);\n}\n"
.align 3
.LC76:
.string "HAVE_FILE_OFFSET_BITS"
.align 3
.LC77:
.string "#define _FILE_OFFSET_BITS 64\n#include <sys/types.h>\nint main(int argc, char *argv[]) {\n\treturn sizeof(off_t) == 8 ? 0 : 1;\n}\n"
.align 3
.LC78:
.string "HAVE_FOR_LOOP_DECLARATION"
.align 3
.LC79:
.string "for (int i = 0; i < argc; i++) { return 0; };\nreturn 1;"
.align 3
.LC80:
.string "HAVE_FLEXIBLE_ARRAY_MEMBER"
.align 3
.LC81:
.string "struct foo { unsigned int x; int arr[]; };"
.align 3
.LC82:
.string "HAVE_GETPAGESIZE"
.align 3
.LC83:
.string "#include <unistd.h>\nstatic int func(void) { return getpagesize(); }"
.align 3
.LC84:
.string "HAVE_ISBLANK"
.align 3
.LC85:
.string "#define _GNU_SOURCE\n#include <ctype.h>\nstatic int func(void) { return isblank(' '); }"
.align 3
.LC86:
.string "HAVE_LITTLE_ENDIAN"
.align 3
.LC87:
.string "union { int i; char c[sizeof(int)]; } u;\nu.i = 0x01020304;\nreturn u.c[0] == 0x04 && u.c[1] == 0x03 && u.c[2] == 0x02 && u.c[3] == 0x01 ? 0 : 1;"
.align 3
.LC88:
.string "HAVE_MEMMEM"
.align 3
.LC89:
.string "#define _GNU_SOURCE\n#include <string.h>\nstatic void *func(void *h, size_t hl, void *n, size_t nl) {\nreturn memmem(h, hl, n, nl);}\n"
.align 3
.LC90:
.string "HAVE_MEMRCHR"
.align 3
.LC91:
.string "#define _GNU_SOURCE\n#include <string.h>\nstatic void *func(void *s, int c, size_t n) {\nreturn memrchr(s, c, n);}\n"
.align 3
.LC92:
.string "HAVE_MMAP"
.align 3
.LC93:
.string "#include <sys/mman.h>\nstatic void *func(int fd) {\n\treturn mmap(0, 65536, PROT_READ, MAP_SHARED, fd, 0);\n}"
.align 3
.LC94:
.string "HAVE_PROC_SELF_MAPS"
.align 3
.LC95:
.string "#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\nint main(void) {\n\treturn open(\"/proc/self/maps\", O_RDONLY) != -1 ? 0 : 1;\n}\n"
.align 3
.LC96:
.string "HAVE_QSORT_R_PRIVATE_LAST"
.align 3
.LC97:
.ascii "#define _GNU_SOURCE 1\n#include <stdlib.h>\nstatic int cmp(c"
.ascii "onst void *lp, const void *rp, void *priv) {\n *(unsigned in"
.string "t *)priv = 1;\n return *(const int *)lp - *(const int *)rp; }\nint main(void) {\n int array[] = { 9, 2, 5 };\n unsigned int called = 0;\n qsort_r(array, 3, sizeof(int), cmp, &called);\n return called && array[0] == 2 && array[1] == 5 && array[2] == 9 ? 0 : 1;\n}\n"
.align 3
.LC98:
.string "#include <time.h>\nstatic void func(void) {\n\tstruct timespec ts;\n\tts.tv_sec = ts.tv_nsec = 1;\n}\n"
.align 3
.LC99:
.string "HAVE_SECTION_START_STOP"
.align 3
.LC100:
.string "static void *__attribute__((__section__(\"mysec\"))) p = &p;\nstatic int func(void) {\n\textern void *__start_mysec[], *__stop_mysec[];\n\treturn __stop_mysec - __start_mysec;\n}\n"
.align 3
.LC101:
.string "HAVE_STACK_GROWS_UPWARDS"
.align 3
.LC102:
.string "static long nest(const void *base, unsigned int i)\n{\n\tif (i == 0)\n\t\treturn (const char *)&i - (const char *)base;\n\treturn nest(base, i-1);\n}\nint main(int argc, char *argv[]) {\n\treturn (nest(&argc, argc) > 0) ? 0 : 1\n;}\n"
.align 3
.LC103:
.string "HAVE_STATEMENT_EXPR"
.align 3
.LC104:
.string "return ({ int x = argc; x == argc ? 0 : 1; });"
.align 3
.LC105:
.string "HAVE_SYS_FILIO_H"
.align 3
.LC106:
.string "#include <sys/filio.h>\n"
.align 3
.LC107:
.string "HAVE_SYS_TERMIOS_H"
.align 3
.LC108:
.string "#include <sys/termios.h>\n"
.align 3
.LC109:
.string "HAVE_TYPEOF"
.align 3
.LC110:
.string "__typeof__(argc) i; i = argc; return i == argc ? 0 : 1;"
.align 3
.LC111:
.string "HAVE_UNALIGNED_ACCESS"
.align 3
.LC112:
.string "#include <string.h>\nint main(int argc, char *argv[]) {\n char pad[sizeof(int *) * 1];\n\tstrncpy(pad, argv[0], sizeof(pad));\n\treturn *(int *)(pad) == *(int *)(pad + 1);\n}\n"
.align 3
.LC113:
.string "HAVE_UTIME"
.align 3
.LC114:
.string "#include <sys/types.h>\n#include <utime.h>\nstatic int func(const char *filename) {\n\tstruct utimbuf times = { 0 };\n\treturn utime(filename, ×);\n}"
.align 3
.LC115:
.string "HAVE_WARN_UNUSED_RESULT"
.align 3
.LC116:
.string "#include <sys/types.h>\n#include <utime.h>\nstatic __attribute__((warn_unused_result)) int func(int i) {\n\treturn i + 1;\n}"
.section .data.rel.local,"aw"
.align 3
.type tests, %object
.size tests, 3136
tests:
.xword .LC4
.word 32776
.zero 4
.xword 0
.xword 0
.xword .LC5
.zero 16
.xword .LC6
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC7
.zero 16
.xword .LC8
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC9
.zero 16
.xword .LC10
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC11
.zero 16
.xword .LC12
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC13
.zero 16
.xword .LC14
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC15
.zero 16
.xword .LC16
.word 1
.zero 4
.xword 0
.xword 0
.xword .LC17
.zero 16
.xword .LC18
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC19
.zero 16
.xword .LC20
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC21
.zero 16
.xword .LC22
.word 1
.zero 4
.xword 0
.xword 0
.xword .LC23
.zero 16
.xword .LC24
.word 1
.zero 4
.xword 0
.xword 0
.xword .LC25
.zero 16
.xword .LC26
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC27
.zero 16
.xword .LC28
.word 32772
.zero 4
.xword 0
.xword 0
.xword .LC29
.zero 16
.xword .LC30
.word 2
.zero 4
.xword .LC31
.xword 0
.xword .LC32
.zero 16
.xword .LC33
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC34
.zero 16
.xword .LC35
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC36
.zero 16
.xword .LC37
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC38
.zero 16
.xword .LC39
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC40
.zero 16
.xword .LC41
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC42
.zero 16
.xword .LC43
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC44
.zero 16
.xword .LC45
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC46
.zero 16
.xword .LC47
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC48
.zero 16
.xword .LC49
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC50
.zero 16
.xword .LC51
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC52
.zero 16
.xword .LC53
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC54
.zero 16
.xword .LC55
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC56
.zero 16
.xword .LC57
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC58
.zero 16
.xword .LC59
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC60
.zero 16
.xword .LC61
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC62
.zero 16
.xword .LC31
.word 1
.zero 4
.xword 0
.xword 0
.xword .LC63
.zero 16
.xword .LC64
.word 2
.zero 4
.xword .LC65
.xword 0
.xword .LC66
.zero 16
.xword .LC67
.word 2
.zero 4
.xword .LC68
.xword .LC69
.xword .LC66
.xword .LC64
.zero 8
.xword .LC70
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC71
.zero 16
.xword .LC72
.word 32776
.zero 4
.xword 0
.xword 0
.xword .LC73
.zero 16
.xword .LC74
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC75
.zero 16
.xword .LC76
.word 32776
.zero 4
.xword .LC4
.xword 0
.xword .LC77
.zero 16
.xword .LC78
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC79
.zero 16
.xword .LC80
.word 1
.zero 4
.xword 0
.xword 0
.xword .LC81
.zero 16
.xword .LC82
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC83
.zero 16
.xword .LC84
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC85
.zero 16
.xword .LC86
.word 32772
.zero 4
.xword 0
.xword 0
.xword .LC87
.zero 16
.xword .LC88
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC89
.zero 16
.xword .LC90
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC91
.zero 16
.xword .LC92
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC93
.zero 16
.xword .LC94
.word 32776
.zero 4
.xword 0
.xword 0
.xword .LC95
.zero 16
.xword .LC96
.word 32792
.zero 4
.xword 0
.xword 0
.xword .LC97
.zero 16
.xword .LC65
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC98
.zero 16
.xword .LC99
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC100
.zero 16
.xword .LC101
.word 32776
.zero 4
.xword 0
.xword 0
.xword .LC102
.zero 16
.xword .LC103
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC104
.zero 16
.xword .LC105
.word 1
.zero 4
.xword 0
.xword 0
.xword .LC106
.zero 16
.xword .LC107
.word 1
.zero 4
.xword 0
.xword 0
.xword .LC108
.zero 16
.xword .LC109
.word 4
.zero 4
.xword 0
.xword 0
.xword .LC110
.zero 16
.xword .LC111
.word 32776
.zero 4
.xword 0
.xword 0
.xword .LC112
.zero 16
.xword .LC113
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC114
.zero 16
.xword .LC115
.word 2
.zero 4
.xword 0
.xword 0
.xword .LC116
.zero 16
.section .rodata
.align 3
.LC117:
.string "reading from command"
.text
.align 2
.type grab_fd, %function
grab_fd:
.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, 28]
str xzr, [sp, 48]
mov x0, 16384
str x0, [sp, 40]
ldr x0, [sp, 40]
add x0, x0, 1
bl malloc
str x0, [sp, 56]
b .L2
.L3:
ldrsw x0, [sp, 36]
ldr x1, [sp, 48]
add x0, x1, x0
str x0, [sp, 48]
ldr x1, [sp, 48]
ldr x0, [sp, 40]
cmp x1, x0
bne .L2
ldr x0, [sp, 40]
lsl x0, x0, 1
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 56]
bl realloc
str x0, [sp, 56]
.L2:
ldr x1, [sp, 56]
ldr x0, [sp, 48]
add x3, x1, x0
ldr x1, [sp, 40]
ldr x0, [sp, 48]
sub x0, x1, x0
mov x2, x0
mov x1, x3
ldr w0, [sp, 28]
bl read
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bgt .L3
ldr w0, [sp, 36]
cmp w0, 0
bge .L4
adrp x0, .LC117
add x1, x0, :lo12:.LC117
mov w0, 1
bl err
.L4:
ldr x1, [sp, 56]
ldr x0, [sp, 48]
add x0, x1, x0
strb wzr, [x0]
ldr x0, [sp, 56]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size grab_fd, .-grab_fd
.section .rodata
.align 3
.LC118:
.string "creating pipe"
.align 3
.LC119:
.string "forking"
.align 3
.LC120:
.string "/dev/null"
.align 3
.LC121:
.string "Failed to wait for child"
.text
.align 2
.type run, %function
run:
.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]
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
add x0, sp, 48
bl pipe
cmp w0, 0
beq .L7
adrp x0, .LC118
add x1, x0, :lo12:.LC118
mov w0, 1
bl err
.L7:
bl fork
str w0, [sp, 36]
ldr w0, [sp, 36]
cmn w0, #1
bne .L8
adrp x0, .LC119
add x1, x0, :lo12:.LC119
mov w0, 1
bl err
.L8:
ldr w0, [sp, 36]
cmp w0, 0
bne .L9
ldr w0, [sp, 52]
mov w1, 1
bl dup2
cmp w0, 1
bne .L10
ldr w0, [sp, 52]
mov w1, 2
bl dup2
cmp w0, 2
bne .L10
ldr w0, [sp, 48]
bl close
cmp w0, 0
bne .L10
mov w0, 0
bl close
cmp w0, 0
bne .L10
mov w1, 0
adrp x0, .LC120
add x0, x0, :lo12:.LC120
bl open
cmp w0, 0
beq .L11
.L10:
mov w0, 128
bl exit
.L11:
ldr x0, [sp, 24]
bl system
str w0, [sp, 32]
ldr w0, [sp, 32]
and w0, w0, 127
cmp w0, 0
bne .L12
ldr w0, [sp, 32]
asr w0, w0, 8
and w0, w0, 255
bl exit
.L12:
ldr w0, [sp, 32]
and w0, w0, 127
add w0, w0, 128
bl exit
.L9:
ldr w0, [sp, 52]
bl close
ldr w0, [sp, 48]
bl grab_fd
str x0, [sp, 40]
add x0, sp, 32
mov w2, 0
mov x1, x0
ldr w0, [sp, 36]
bl waitpid
mov w1, w0
ldr w0, [sp, 36]
cmp w0, w1
beq .L13
adrp x0, .LC121
add x1, x0, :lo12:.LC121
mov w0, 1
bl err
.L13:
ldr w0, [sp, 48]
bl close
ldr w0, [sp, 32]
and w0, w0, 127
cmp w0, 0
bne .L14
ldr w0, [sp, 32]
asr w0, w0, 8
and w1, w0, 255
ldr x0, [sp, 16]
str w1, [x0]
b .L15
.L14:
ldr w0, [sp, 32]
and w0, w0, 127
neg w1, w0
ldr x0, [sp, 16]
str w1, [x0]
.L15:
ldr x0, [sp, 40]
mov x1, x0
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 .L17
bl __stack_chk_fail
.L17:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size run, .-run
.align 2
.type connect_args, %function
connect_args:
.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 x0, [sp, 16]
bl strlen
add w0, w0, 1
str w0, [sp, 36]
mov w0, 1
str w0, [sp, 32]
b .L19
.L20:
ldr w0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
bl strlen
mov w1, w0
ldr w0, [sp, 36]
add w0, w1, w0
add w0, w0, 1
str w0, [sp, 36]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L19:
ldr w0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L20
ldr w0, [sp, 36]
bl malloc
str x0, [sp, 40]
str wzr, [sp, 36]
mov w0, 1
str w0, [sp, 32]
b .L21
.L23:
ldr w0, [sp, 36]
ldr x1, [sp, 40]
add x2, x1, x0
ldr w0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
mov x1, x0
mov x0, x2
bl strcpy
ldr w0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
bl strlen
mov w1, w0
ldr w0, [sp, 36]
add w0, w0, w1
str w0, [sp, 36]
ldr w0, [sp, 32]
add w0, w0, 1
uxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
beq .L22
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
uxtw x0, w0
ldr x1, [sp, 40]
add x0, x1, x0
mov w1, 32
strb w1, [x0]
.L22:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L21:
ldr w0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L23
ldr w0, [sp, 36]
ldr x1, [sp, 40]
add x0, x1, x0
ldr x1, [sp, 16]
bl strcpy
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size connect_args, .-connect_args
.align 2
.type find_test, %function
find_test:
.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 wzr, [sp, 44]
b .L26
.L29:
adrp x0, tests
add x2, x0, :lo12:tests
ldr w1, [sp, 44]
mov x0, x1
lsl x0, x0, 3
sub x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr x0, [x0]
ldr x1, [sp, 24]
bl strcmp
cmp w0, 0
bne .L27
ldr w1, [sp, 44]
mov x0, x1
lsl x0, x0, 3
sub x0, x0, x1
lsl x0, x0, 3
adrp x1, tests
add x1, x1, :lo12:tests
add x0, x0, x1
b .L30
.L27:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L26:
ldr w0, [sp, 44]
cmp w0, 55
bls .L29
bl abort
.L30:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size find_test, .-find_test
.section .rodata
.align 3
.LC122:
.string " "
.align 3
.LC123:
.string "w"
.align 3
.LC124:
.string "configuratortest.c"
.align 3
.LC125:
.string "creating %s"
.align 3
.LC126:
.string "/* Test program generated by configurator. */\n"
.align 3
.LC127:
.string "int main(int argc, char *argv[]) {\n"
.align 3
.LC128:
.string "}\n"
.align 3
.LC129:
.string "return 0;\n"
.align 3
.LC130:
.string "(void)func;\n"
.align 3
.LC131:
.string "cat configuratortest.c"
.align 3
.LC132:
.string "%s %s"
.align 3
.LC133:
.string "Extra link line: %s"
.align 3
.LC134:
.string "warning"
.align 3
.LC135:
.string "fail"
.align 3
.LC136:
.string "Compile %s for %s, status %i: %s\n"
.align 3
.LC137:
.string "Test for %s did not compile:\n%s"
.align 3
.LC138:
.string "./configurator.out"
.align 3
.LC139:
.string "Test for %s failed with %i:\n%s"
.align 3
.LC140:
.string "%s exited %i\n"
.text
.align 2
.type run_test, %function
run_test:
.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 x19, [sp, 16]
.cfi_offset 19, -112
str x0, [sp, 40]
str x1, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 120]
mov x1, 0
ldr x0, [sp, 32]
ldrb w0, [x0, 48]
cmp w0, 0
beq .L32
ldr x0, [sp, 32]
ldrb w0, [x0, 49]
b .L63
.L32:
ldr x0, [sp, 32]
ldr x0, [x0, 16]
cmp x0, 0
beq .L34
ldr x0, [sp, 32]
ldr x0, [x0, 16]
str x0, [sp, 64]
b .L35
.L40:
mov w0, 1
strb w0, [sp, 59]
ldr x1, [sp, 64]
ldr x0, [sp, 80]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
beq .L36
ldr x0, [sp, 64]
bl strdup
str x0, [sp, 72]
ldr x1, [sp, 72]
ldr x0, [sp, 80]
add x0, x1, x0
strb wzr, [x0]
b .L37
.L36:
ldr x0, [sp, 64]
str x0, [sp, 72]
.L37:
ldr x0, [sp, 72]
ldrb w0, [x0]
cmp w0, 33
bne .L38
ldr x0, [sp, 72]
add x0, x0, 1
str x0, [sp, 72]
strb wzr, [sp, 59]
.L38:
ldr x0, [sp, 72]
bl find_test
mov x1, x0
ldr x0, [sp, 40]
bl run_test
and w0, w0, 255
ldrb w1, [sp, 59]
cmp w1, w0
beq .L39
ldr x0, [sp, 32]
strb wzr, [x0, 49]
ldr x0, [sp, 32]
mov w1, 1
strb w1, [x0, 48]
ldr x0, [sp, 32]
ldrb w0, [x0, 49]
b .L63
.L39:
ldr x1, [sp, 64]
ldr x0, [sp, 80]
add x0, x1, x0
str x0, [sp, 64]
adrp x0, .LC122
add x1, x0, :lo12:.LC122
ldr x0, [sp, 64]
bl strspn
mov x1, x0
ldr x0, [sp, 64]
add x0, x0, x1
str x0, [sp, 64]
.L35:
adrp x0, .LC122
add x1, x0, :lo12:.LC122
ldr x0, [sp, 64]
bl strcspn
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bne .L40
.L34:
adrp x0, .LC123
add x1, x0, :lo12:.LC123
adrp x0, .LC124
add x0, x0, :lo12:.LC124
bl fopen
str x0, [sp, 88]
ldr x0, [sp, 88]
cmp x0, 0
bne .L41
adrp x0, .LC124
add x2, x0, :lo12:.LC124
adrp x0, .LC125
add x1, x0, :lo12:.LC125
mov w0, 1
bl err
.L41:
ldr x3, [sp, 88]
mov x2, 46
mov x1, 1
adrp x0, .LC126
add x0, x0, :lo12:.LC126
bl fwrite
ldr x0, [sp, 32]
ldr w1, [x0, 8]
mov w0, -32785
and w0, w1, w0
cmp w0, 8
beq .L42
cmp w0, 8
bhi .L43
cmp w0, 4
beq .L44
cmp w0, 4
bhi .L43
cmp w0, 1
beq .L45
cmp w0, 2
beq .L46
b .L43
.L44:
ldr x3, [sp, 88]
mov x2, 35
mov x1, 1
adrp x0, .LC127
add x0, x0, :lo12:.LC127
bl fwrite
ldr x0, [sp, 32]
ldr x0, [x0, 32]
ldr x1, [sp, 88]
bl fputs
ldr x3, [sp, 88]
mov x2, 2
mov x1, 1
adrp x0, .LC128
add x0, x0, :lo12:.LC128
bl fwrite
b .L47
.L45:
ldr x0, [sp, 32]
ldr x0, [x0, 32]
ldr x1, [sp, 88]
bl fputs
ldr x3, [sp, 88]
mov x2, 35
mov x1, 1
adrp x0, .LC127
add x0, x0, :lo12:.LC127
bl fwrite
ldr x3, [sp, 88]
mov x2, 10
mov x1, 1
adrp x0, .LC129
add x0, x0, :lo12:.LC129
bl fwrite
ldr x3, [sp, 88]
mov x2, 2
mov x1, 1
adrp x0, .LC128
add x0, x0, :lo12:.LC128
bl fwrite
b .L47
.L46:
ldr x0, [sp, 32]
ldr x0, [x0, 32]
ldr x1, [sp, 88]
bl fputs
ldr x3, [sp, 88]
mov x2, 35
mov x1, 1
adrp x0, .LC127
add x0, x0, :lo12:.LC127
bl fwrite
ldr x3, [sp, 88]
mov x2, 12
mov x1, 1
adrp x0, .LC130
add x0, x0, :lo12:.LC130
bl fwrite
ldr x3, [sp, 88]
mov x2, 10
mov x1, 1
adrp x0, .LC129
add x0, x0, :lo12:.LC129
bl fwrite
ldr x3, [sp, 88]
mov x2, 2
mov x1, 1
adrp x0, .LC128
add x0, x0, :lo12:.LC128
bl fwrite
b .L47
.L42:
ldr x0, [sp, 32]
ldr x0, [x0, 32]
ldr x1, [sp, 88]
bl fputs
b .L47
.L43:
bl abort
.L47:
ldr x0, [sp, 88]
bl fclose
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 1
ble .L48
adrp x0, .LC131
add x0, x0, :lo12:.LC131
bl system
.L48:
ldr x0, [sp, 32]
ldr x0, [x0, 24]
cmp x0, 0
beq .L49
ldr x0, [sp, 40]
bl strlen
mov x19, x0
ldr x0, [sp, 32]
ldr x0, [x0, 24]
bl strlen
add x0, x19, x0
add x0, x0, 2
bl malloc
str x0, [sp, 96]
ldr x0, [sp, 32]
ldr x0, [x0, 24]
mov x3, x0
ldr x2, [sp, 40]
adrp x0, .LC132
add x1, x0, :lo12:.LC132
ldr x0, [sp, 96]
bl sprintf
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 1
ble .L50
ldr x1, [sp, 96]
adrp x0, .LC133
add x0, x0, :lo12:.LC133
bl printf
.L50:
ldr x0, [sp, 96]
str x0, [sp, 40]
.L49:
add x0, sp, 60
mov x1, x0
ldr x0, [sp, 40]
bl run
str x0, [sp, 104]
ldr w0, [sp, 60]
cmp w0, 0
bne .L51
adrp x0, .LC134
add x1, x0, :lo12:.LC134
ldr x0, [sp, 104]
bl strstr
cmp x0, 0
beq .L52
.L51:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L53
ldr w0, [sp, 60]
cmp w0, 0
beq .L54
adrp x0, .LC135
add x0, x0, :lo12:.LC135
b .L55
.L54:
adrp x0, .LC134
add x0, x0, :lo12:.LC134
.L55:
ldr x1, [sp, 32]
ldr x1, [x1]
ldr w2, [sp, 60]
ldr x4, [sp, 104]
mov w3, w2
mov x2, x1
mov x1, x0
adrp x0, .LC136
add x0, x0, :lo12:.LC136
bl printf
.L53:
ldr x0, [sp, 32]
ldr w0, [x0, 8]
and w0, w0, 32768
cmp w0, 0
beq .L56
ldr x0, [sp, 32]
ldr w0, [x0, 8]
and w0, w0, 16
cmp w0, 0
bne .L56
ldr x0, [sp, 32]
ldr x0, [x0]
ldr x3, [sp, 104]
mov x2, x0
adrp x0, .LC137
add x1, x0, :lo12:.LC137
mov w0, 1
bl errx
.L56:
ldr x0, [sp, 32]
strb wzr, [x0, 49]
ldr x0, [sp, 104]
bl free
b .L57
.L52:
ldr x0, [sp, 104]
bl free
ldr x0, [sp, 32]
ldr w0, [x0, 8]
and w0, w0, 32768
cmp w0, 0
bne .L58
ldr x0, [sp, 32]
ldr w0, [x0, 8]
and w0, w0, 4
cmp w0, 0
beq .L59
.L58:
add x0, sp, 60
mov x1, x0
adrp x0, .LC138
add x0, x0, :lo12:.LC138
bl run
str x0, [sp, 104]
ldr x0, [sp, 32]
ldr w0, [x0, 8]
and w0, w0, 32768
cmp w0, 0
bne .L60
ldr w0, [sp, 60]
cmp w0, 0
beq .L60
ldr x0, [sp, 32]
ldr x0, [x0]
ldr w1, [sp, 60]
ldr x4, [sp, 104]
mov w3, w1
mov x2, x0
adrp x0, .LC139
add x1, x0, :lo12:.LC139
mov w0, 1
bl errx
.L60:
adrp x0, verbose
add x0, x0, :lo12:verbose
ldr w0, [x0]
cmp w0, 0
beq .L61
ldr w0, [sp, 60]
cmp w0, 0
beq .L61
ldr x0, [sp, 32]
ldr x0, [x0]
ldr w1, [sp, 60]
mov w2, w1
mov x1, x0
adrp x0, .LC140
add x0, x0, :lo12:.LC140
bl printf
.L61:
ldr x0, [sp, 104]
bl free
.L59:
ldr w0, [sp, 60]
cmp w0, 0
cset w0, eq
and w1, w0, 255
ldr x0, [sp, 32]
strb w1, [x0, 49]
.L57:
ldr x0, [sp, 32]
mov w1, 1
strb w1, [x0, 48]
ldr x0, [sp, 32]
ldrb w0, [x0, 49]
cmp w0, 0
beq .L62
ldr x0, [sp, 32]
ldr x0, [x0, 40]
cmp x0, 0
beq .L62
ldr x0, [sp, 32]
ldr x0, [x0, 40]
bl find_test
str x0, [sp, 112]
ldr x0, [sp, 112]
mov w1, 1
strb w1, [x0, 48]
ldr x0, [sp, 112]
mov w1, 1
strb w1, [x0, 49]
.L62:
ldr x0, [sp, 32]
ldrb w0, [x0, 49]
.L63:
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 .L64
bl __stack_chk_fail
.L64:
mov w0, w1
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
.LFE10:
.size run_test, .-run_test
.section .rodata
.align 3
.LC142:
.string "--help"
.align 3
.LC2:
.string "-g3 -ggdb -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition"
.align 3
.LC1:
.string "cc"
.align 3
.LC143:
.string "Usage: configurator [-v] [<compiler> <flags>...]\n <compiler> <flags> will have \"-o <outfile> <infile.c>\" appended\nDefault: %s %s\n"
.align 3
.LC144:
.string "-v"
.align 3
.LC145:
.string "-vv"
.align 3
.LC146:
.string " -o configurator.out configuratortest.c"
.align 3
.LC147:
.string "configurator.out"
.align 3
.LC148:
.string "/* Generated by CCAN configurator */\n#ifndef CCAN_CONFIG_H\n#define CCAN_CONFIG_H"
.align 3
.LC149:
.string "#ifndef _GNU_SOURCE"
.align 3
.LC150:
.string "#define _GNU_SOURCE /* Always use GNU extensions. */"
.align 3
.LC151:
.string "#endif"
.align 3
.LC152:
.string "#define CCAN_COMPILER \"%s\"\n"
.align 3
.LC0:
.string ""
.align 3
.LC153:
.string "#define CCAN_CFLAGS \"%s\"\n\n"
.align 3
.LC154:
.string "#define HAVE_CCAN 1"
.align 3
.LC155:
.string "#define %s %u\n"
.align 3
.LC156:
.string "#endif /* CCAN_CONFIG_H */"
.text
.align 2
.global main
.type main, %function
main:
.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 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, 88]
mov x1, 0
add x0, sp, 104
sub x0, x0, #48
adrp x1, .LC141
add x1, x1, :lo12:.LC141
ld1 {v0.16b - v1.16b}, [x1]
st1 {v0.16b - v1.16b}, [x0]
ldr w0, [sp, 28]
cmp w0, 1
ble .L66
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC142
add x1, x0, :lo12:.LC142
mov x0, x2
bl strcmp
cmp w0, 0
bne .L67
adrp x0, .LC2
add x2, x0, :lo12:.LC2
adrp x0, .LC1
add x1, x0, :lo12:.LC1
adrp x0, .LC143
add x0, x0, :lo12:.LC143
bl printf
mov w0, 0
bl exit
.L67:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC144
add x1, x0, :lo12:.LC144
mov x0, x2
bl strcmp
cmp w0, 0
bne .L68
ldr w0, [sp, 28]
sub w0, w0, #1
str w0, [sp, 28]
ldr x0, [sp, 16]
add x0, x0, 8
str x0, [sp, 16]
adrp x0, verbose
add x0, x0, :lo12:verbose
mov w1, 1
str w1, [x0]
b .L66
.L68:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC145
add x1, x0, :lo12:.LC145
mov x0, x2
bl strcmp
cmp w0, 0
bne .L66
ldr w0, [sp, 28]
sub w0, w0, #1
str w0, [sp, 28]
ldr x0, [sp, 16]
add x0, x0, 8
str x0, [sp, 16]
adrp x0, verbose
add x0, x0, :lo12:verbose
mov w1, 2
str w1, [x0]
.L66:
ldr w0, [sp, 28]
cmp w0, 1
bne .L69
add x0, sp, 56
str x0, [sp, 16]
.L69:
adrp x0, .LC146
add x1, x0, :lo12:.LC146
ldr x0, [sp, 16]
bl connect_args
str x0, [sp, 48]
str wzr, [sp, 44]
b .L70
.L71:
ldr w1, [sp, 44]
mov x0, x1
lsl x0, x0, 3
sub x0, x0, x1
lsl x0, x0, 3
adrp x1, tests
add x1, x1, :lo12:tests
add x0, x0, x1
mov x1, x0
ldr x0, [sp, 48]
bl run_test
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L70:
ldr w0, [sp, 44]
cmp w0, 55
bls .L71
adrp x0, .LC147
add x0, x0, :lo12:.LC147
bl unlink
adrp x0, .LC124
add x0, x0, :lo12:.LC124
bl unlink
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
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
mov x1, x0
adrp x0, .LC152
add x0, x0, :lo12:.LC152
bl printf
ldr x0, [sp, 16]
add x2, x0, 8
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x2
bl connect_args
mov x1, x0
adrp x0, .LC153
add x0, x0, :lo12:.LC153
bl printf
adrp x0, .LC154
add x0, x0, :lo12:.LC154
bl puts
str wzr, [sp, 44]
b .L72
.L73:
adrp x0, tests
add x2, x0, :lo12:tests
ldr w1, [sp, 44]
mov x0, x1
lsl x0, x0, 3
sub x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr x3, [x0]
adrp x0, tests
add x2, x0, :lo12:tests
ldr w1, [sp, 44]
mov x0, x1
lsl x0, x0, 3
sub x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldrb w0, [x0, 49]
mov w2, w0
mov x1, x3
adrp x0, .LC155
add x0, x0, :lo12:.LC155
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L72:
ldr w0, [sp, 44]
cmp w0, 55
bls .L73
adrp x0, .LC156
add x0, x0, :lo12:.LC156
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, 88]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L75
bl __stack_chk_fail
.L75:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size main, .-main
.data
.align 3
.LC141:
.xword .LC0
.xword .LC1
.xword .LC2
.xword 0
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global __sched_cpualloc
.type __sched_cpualloc, %function
__sched_cpualloc:
.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 CPU_ALLOC_SIZE
sxtw x0, w0
bl malloc
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size __sched_cpualloc, .-__sched_cpualloc
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global fsync
.type fsync, %function
fsync:
.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]
bl sync
mov w0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size fsync, .-fsync
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global SYNCMGR_OBJECTID_QueryBeforeDeactivate
.section .rodata
.align 3
.type SYNCMGR_OBJECTID_QueryBeforeDeactivate, %object
.size SYNCMGR_OBJECTID_QueryBeforeDeactivate, 24
SYNCMGR_OBJECTID_QueryBeforeDeactivate:
.xword 2700067458
.hword 24800
.hword 17934
.ascii "\223t\352\210Q<\374\200"
.zero 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global c
.bss
.align 3
.type c, %object
.size c, 0
c:
.text
.align 2
.global d
.type d, %function
d:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
adrp x0, c
add x0, x0, :lo12:c
str x0, [sp, 8]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size d, .-d
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global dir
.section .rodata
.align 3
.type dir, %object
.size dir, 32
dir:
.word 1
.word 0
.word 0
.word 1
.word -1
.word 0
.word 0
.word -1
.global S
.bss
.align 3
.type S, %object
.size S, 12
S:
.zero 12
.global lt
.align 3
.type lt, %object
.size lt, 12
lt:
.zero 12
.global r
.align 2
.type r, %object
.size r, 4
r:
.zero 4
.global c
.align 2
.type c, %object
.size c, 4
c:
.zero 4
.global board
.align 3
.type board, %object
.size board, 2500
board:
.zero 2500
.global min
.align 2
.type min, %object
.size min, 4
min:
.zero 4
.text
.align 2
.global find
.type find, %function
find:
.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 w1, [sp, 24]
str w2, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 10
ble .L2
mov w0, 0
b .L3
.L2:
mov w0, 1
str w0, [sp, 44]
str wzr, [sp, 48]
b .L4
.L14:
str wzr, [sp, 60]
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 52]
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w0, [x0, 4]
ldr w1, [sp, 24]
add w0, w1, w0
str w0, [sp, 56]
b .L5
.L9:
adrp x0, board
add x2, x0, :lo12:board
ldrsw x3, [sp, 56]
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
ldr w0, [x2, x0, lsl 2]
cmp w0, 3
bne .L6
adrp x0, min
add x0, x0, :lo12:min
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
bge .L7
adrp x0, min
add x0, x0, :lo12:min
ldr w1, [sp, 20]
str w1, [x0]
.L7:
mov w0, 1
b .L3
.L6:
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 52]
add w0, w1, w0
str w0, [sp, 52]
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w0, [x0, 4]
ldr w1, [sp, 56]
add w0, w1, w0
str w0, [sp, 56]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L5:
ldr w0, [sp, 52]
cmp w0, 0
blt .L8
adrp x0, r
add x0, x0, :lo12:r
ldr w0, [x0]
ldr w1, [sp, 52]
cmp w1, w0
bge .L8
ldr w0, [sp, 56]
cmp w0, 0
blt .L8
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
ldr w1, [sp, 56]
cmp w1, w0
bge .L8
adrp x0, board
add x2, x0, :lo12:board
ldrsw x3, [sp, 56]
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
ldr w0, [x2, x0, lsl 2]
cmp w0, 0
beq .L9
adrp x0, board
add x2, x0, :lo12:board
ldrsw x3, [sp, 56]
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
ldr w0, [x2, x0, lsl 2]
cmp w0, 3
beq .L9
.L8:
ldr w0, [sp, 52]
cmp w0, 0
blt .L16
adrp x0, r
add x0, x0, :lo12:r
ldr w0, [x0]
ldr w1, [sp, 52]
cmp w1, w0
beq .L16
ldr w0, [sp, 56]
cmp w0, 0
blt .L16
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
ldr w1, [sp, 56]
cmp w1, w0
beq .L16
adrp x0, board
add x2, x0, :lo12:board
ldrsw x3, [sp, 56]
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
ldr w0, [x2, x0, lsl 2]
cmp w0, 1
bne .L12
ldr w0, [sp, 60]
cmp w0, 0
beq .L12
adrp x0, board
add x2, x0, :lo12:board
ldrsw x3, [sp, 56]
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
str wzr, [x2, x0, lsl 2]
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 52]
sub w0, w1, w0
str w0, [sp, 52]
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w0, [x0, 4]
ldr w1, [sp, 56]
sub w0, w1, w0
str w0, [sp, 56]
ldr w0, [sp, 20]
add w0, w0, 1
mov w2, w0
ldr w1, [sp, 56]
ldr w0, [sp, 52]
bl find
cmp w0, 0
beq .L13
str wzr, [sp, 44]
.L13:
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w1, [x0]
ldr w0, [sp, 52]
add w4, w1, w0
adrp x0, dir
add x1, x0, :lo12:dir
ldrsw x0, [sp, 48]
lsl x0, x0, 3
add x0, x1, x0
ldr w1, [x0, 4]
ldr w0, [sp, 56]
add w1, w1, w0
adrp x0, board
add x2, x0, :lo12:board
sxtw x3, w1
sxtw x1, w4
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
mov w1, 1
str w1, [x2, x0, lsl 2]
b .L12
.L16:
nop
.L12:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L4:
ldr w0, [sp, 48]
cmp w0, 3
ble .L14
ldr w0, [sp, 44]
cmp w0, 0
beq .L15
mov w0, 0
b .L3
.L15:
mov w0, 1
.L3:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size find, .-find
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "%d\n"
.align 3
.LC2:
.string "%d%d"
.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]
b .L18
.L27:
adrp x0, min
add x0, x0, :lo12:min
mov w1, 20
str w1, [x0]
str wzr, [sp, 40]
b .L19
.L23:
str wzr, [sp, 44]
b .L20
.L22:
ldrsw x2, [sp, 44]
ldrsw x1, [sp, 40]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x2, x0
lsl x1, x0, 2
adrp x0, board
add x0, x0, :lo12:board
add x0, x1, x0
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
adrp x0, board
add x2, x0, :lo12:board
ldrsw x3, [sp, 44]
ldrsw x1, [sp, 40]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
ldr w0, [x2, x0, lsl 2]
cmp w0, 2
bne .L21
adrp x0, S
add x0, x0, :lo12:S
ldr w1, [sp, 40]
str w1, [x0]
adrp x0, S
add x0, x0, :lo12:S
ldr w1, [sp, 44]
str w1, [x0, 4]
adrp x0, board
add x2, x0, :lo12:board
ldrsw x3, [sp, 44]
ldrsw x1, [sp, 40]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x0, x3
str wzr, [x2, x0, lsl 2]
.L21:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L20:
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
ldr w1, [sp, 44]
cmp w1, w0
blt .L22
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L19:
adrp x0, r
add x0, x0, :lo12:r
ldr w0, [x0]
ldr w1, [sp, 40]
cmp w1, w0
blt .L23
adrp x0, S
add x0, x0, :lo12:S
ldr w3, [x0]
adrp x0, S
add x0, x0, :lo12:S
ldr w0, [x0, 4]
mov w2, 1
mov w1, w0
mov w0, w3
bl find
cmp w0, 0
beq .L24
adrp x0, min
add x0, x0, :lo12:min
ldr w0, [x0]
b .L25
.L24:
mov w0, -1
.L25:
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
.L18:
adrp x0, r
add x2, x0, :lo12:r
adrp x0, c
add x1, x0, :lo12:c
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
cmp w0, 0
beq .L26
adrp x0, r
add x0, x0, :lo12:r
ldr w0, [x0]
cmp w0, 0
beq .L26
adrp x0, c
add x0, x0, :lo12:c
ldr w0, [x0]
cmp w0, 0
bne .L27
.L26:
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
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
mov w0, 23
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 "Sum: %d"
.align 3
.LC2:
.string "\nAvg: %.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
str wzr, [sp, 28]
str wzr, [sp, 32]
add x0, sp, 20
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
.L2:
add x0, sp, 24
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [sp, 24]
ldr w1, [sp, 32]
add w0, w1, w0
str w0, [sp, 32]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
ldr w0, [sp, 20]
ldr w1, [sp, 28]
cmp w1, w0
blt .L2
ldr s0, [sp, 32]
scvtf s1, s0
ldr s0, [sp, 20]
scvtf s0, s0
fdiv s0, s1, s0
str s0, [sp, 36]
ldr w1, [sp, 32]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr s0, [sp, 36]
fcvt d0, s0
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 .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
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Could not find kotlin symbol '%s': %s\n"
.text
.align 2
.global resolve_symbol
.type resolve_symbol, %function
resolve_symbol:
.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]
ldr x1, [sp, 24]
mov x0, 0
bl dlsym
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L2
bl dlerror
mov x2, x0
ldr x1, [sp, 24]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 1
bl exit
.L2:
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 resolve_symbol, .-resolve_symbol
.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 InitMemory
bl InitGlobalVariables
bl run_test
bl exit
.cfi_endproc
.LFE7:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%5d"
.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 wzr, [sp, 24]
mov w0, 1
str w0, [sp, 28]
b .L2
.L3:
ldr w0, [sp, 28]
lsl w0, w0, 1
str w0, [sp, 28]
ldr w1, [sp, 28]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L2:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr w0, [sp, 24]
cmp w0, 10
ble .L3
mov w0, 10
bl putchar
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
.LC14:
.string "r"
.align 3
.LC15:
.string "Cannot open %s!\n"
.align 3
.LC16:
.string " "
.align 3
.LC17:
.string "Not enough space to hold all locations: %d!\n"
.text
.align 2
.global load_locations
.type load_locations, %function
load_locations:
.LFB6:
.cfi_startproc
sub sp, sp, #2080
.cfi_def_cfa_offset 2080
stp x29, x30, [sp]
.cfi_offset 29, -2080
.cfi_offset 30, -2072
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, 2072]
mov x1, 0
adrp x0, .LC14
add x1, x0, :lo12:.LC14
ldr x0, [sp, 40]
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L2
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x2, [sp, 40]
adrp x0, .LC15
add x1, x0, :lo12:.LC15
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.L2:
add x0, sp, 72
ldr x2, [sp, 56]
mov w1, 2000
bl fgets
add x0, sp, 72
ldr x2, [sp, 56]
mov w1, 2000
bl fgets
ldr w0, [sp, 28]
str w0, [sp, 52]
b .L3
.L4:
add x2, sp, 72
adrp x0, .LC16
add x1, x0, :lo12:.LC16
mov x0, x2
bl strtok
str x0, [sp, 64]
ldr x0, [sp, 64]
bl atof
ldrsw x0, [sp, 52]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
fcvt s0, d0
str s0, [x0, 4]
adrp x0, .LC16
add x1, x0, :lo12:.LC16
mov x0, 0
bl strtok
str x0, [sp, 64]
ldr x0, [sp, 64]
bl atof
ldrsw x0, [sp, 52]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
ldr w1, [sp, 52]
mov w0, 3391
movk w0, 0x3, lsl 16
cmp w1, w0
ble .L3
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr w2, [sp, 52]
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.L3:
add x0, sp, 72
ldr x2, [sp, 56]
mov w1, 2000
bl fgets
cmp x0, 0
bne .L4
ldr x0, [sp, 56]
bl fclose
ldr w0, [sp, 52]
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 2072]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L6
bl __stack_chk_fail
.L6:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 2080
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size load_locations, .-load_locations
.align 2
.global coverage
.type coverage, %function
coverage:
.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, 56]
str w1, [sp, 52]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
str wzr, [sp, 76]
str wzr, [sp, 80]
str wzr, [sp, 96]
str wzr, [sp, 88]
b .L8
.L14:
ldrsw x0, [sp, 88]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 104]
ldrsw x0, [sp, 88]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr s0, [x0, 4]
str s0, [sp, 108]
str wzr, [sp, 84]
str wzr, [sp, 100]
str wzr, [sp, 92]
b .L9
.L13:
ldr w1, [sp, 88]
ldr w0, [sp, 92]
cmp w1, w0
beq .L10
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr s1, [x0]
ldr s0, [sp, 104]
fsub s0, s1, s0
str s0, [sp, 116]
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr s1, [x0, 4]
ldr s0, [sp, 108]
fsub s0, s1, s0
str s0, [sp, 120]
ldr s0, [sp, 116]
fmul s1, s0, s0
ldr s0, [sp, 120]
fmul s0, s0, s0
fadd s0, s1, s0
fcvt d0, s0
bl sqrt
fcvt s0, d0
str s0, [sp, 124]
ldr s0, [sp, 124]
fcmpe s0, #0.0
bls .L15
b .L16
.L15:
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
b .L10
.L16:
ldr s0, [sp, 100]
fcvt d1, s0
ldr s0, [sp, 124]
fcvt d0, s0
fmov d2, 1.0e+0
fdiv d0, d2, d0
fadd d0, d1, d0
fcvt s0, d0
str s0, [sp, 100]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L10:
ldr w0, [sp, 92]
add w0, w0, 1
str w0, [sp, 92]
.L9:
ldr w1, [sp, 92]
ldr w0, [sp, 52]
cmp w1, w0
blt .L13
ldr s0, [sp, 84]
scvtf s1, s0
ldr s0, [sp, 100]
fdiv s0, s1, s0
str s0, [sp, 112]
ldr s0, [sp, 96]
fcvt d1, s0
ldr s0, [sp, 112]
fcvt d0, s0
fmov d2, 1.0e+0
fdiv d0, d2, d0
fadd d0, d1, d0
fcvt s0, d0
str s0, [sp, 96]
ldr w0, [sp, 88]
add w0, w0, 1
str w0, [sp, 88]
.L8:
ldr w1, [sp, 88]
ldr w0, [sp, 52]
cmp w1, w0
blt .L14
ldr s0, [sp, 52]
scvtf s1, s0
ldr s0, [sp, 96]
fdiv s0, s1, s0
ldr x0, [sp, 40]
str s0, [x0]
ldr x0, [sp, 32]
ldr w1, [sp, 76]
str w1, [x0]
ldr x0, [sp, 24]
ldr w1, [sp, 80]
str w1, [x0]
nop
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size coverage, .-coverage
.section .rodata
.align 3
.LC18:
.string "data/%s_%s%d.txt"
.text
.align 2
.global mean_coverage1
.type mean_coverage1, %function
mean_coverage1:
.LFB8:
.cfi_startproc
sub x12, sp, #1572864
.cfi_def_cfa 12, 1572864
.LPSRL0:
sub sp, sp, 65536
str xzr, [sp, 1024]
cmp sp, x12
b.ne .LPSRL0
.cfi_def_cfa_register 31
mov x12, 27424
sub sp, sp, x12
.cfi_def_cfa_offset 1600288
stp x29, x30, [sp]
.cfi_offset 29, -1600288
.cfi_offset 30, -1600280
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]
add x1, sp, 1589248
ldr x2, [x0]
str x2, [x1, 11032]
mov x2, 0
str wzr, [sp, 60]
str wzr, [sp, 72]
str wzr, [sp, 64]
b .L18
.L21:
mov w0, 1
str w0, [sp, 68]
b .L19
.L20:
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 2640
ldr w4, [sp, 68]
mov x3, x0
ldr x2, [sp, 40]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 80
add x0, sp, 1597440
add x0, x0, 2640
mov w2, 0
bl load_locations
str w0, [sp, 76]
add x3, sp, 52
add x2, sp, 48
add x1, sp, 56
add x0, sp, 80
mov x4, x3
mov x3, x2
mov x2, x1
ldr w1, [sp, 76]
bl coverage
ldr s0, [sp, 56]
ldr s1, [sp, 72]
fadd s0, s1, s0
str s0, [sp, 72]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L19:
ldr w0, [sp, 68]
cmp w0, 6
ble .L20
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L18:
ldr w1, [sp, 64]
ldr w0, [sp, 28]
cmp w1, w0
blt .L21
ldr s0, [sp, 60]
scvtf s0, s0
ldr s1, [sp, 72]
fdiv s0, s1, s0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x2, sp, 1589248
ldr x3, [x2, 11032]
ldr x1, [x0]
subs x3, x3, x1
mov x1, 0
beq .L23
bl __stack_chk_fail
.L23:
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 2848
.cfi_def_cfa_offset 1597440
add sp, sp, 1597440
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size mean_coverage1, .-mean_coverage1
.align 2
.global mean_coverage2
.type mean_coverage2, %function
mean_coverage2:
.LFB9:
.cfi_startproc
sub x12, sp, #1572864
.cfi_def_cfa 12, 1572864
.LPSRL1:
sub sp, sp, 65536
str xzr, [sp, 1024]
cmp sp, x12
b.ne .LPSRL1
.cfi_def_cfa_register 31
mov x12, 27632
sub sp, sp, x12
.cfi_def_cfa_offset 1600496
stp x29, x30, [sp]
.cfi_offset 29, -1600496
.cfi_offset 30, -1600488
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
str w3, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 1589248
ldr x2, [x0]
str x2, [x1, 11240]
mov x2, 0
str wzr, [sp, 68]
str wzr, [sp, 80]
str wzr, [sp, 72]
b .L25
.L28:
mov w0, 1
str w0, [sp, 76]
b .L26
.L27:
ldrsw x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 2648
ldr w4, [sp, 76]
mov x3, x0
ldr x2, [sp, 40]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 88
add x0, sp, 1597440
add x0, x0, 2648
mov w2, 0
bl load_locations
str w0, [sp, 84]
ldrsw x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 2848
ldr w4, [sp, 76]
mov x3, x0
ldr x2, [sp, 32]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 88
add x0, sp, 1597440
add x0, x0, 2848
ldr w2, [sp, 84]
bl load_locations
str w0, [sp, 84]
add x3, sp, 60
add x2, sp, 56
add x1, sp, 64
add x0, sp, 88
mov x4, x3
mov x3, x2
mov x2, x1
ldr w1, [sp, 84]
bl coverage
ldr s0, [sp, 64]
ldr s1, [sp, 80]
fadd s0, s1, s0
str s0, [sp, 80]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L26:
ldr w0, [sp, 76]
cmp w0, 6
ble .L27
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L25:
ldr w1, [sp, 72]
ldr w0, [sp, 20]
cmp w1, w0
blt .L28
ldr s0, [sp, 68]
scvtf s0, s0
ldr s1, [sp, 80]
fdiv s0, s1, s0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x2, sp, 1589248
ldr x3, [x2, 11240]
ldr x1, [x0]
subs x3, x3, x1
mov x1, 0
beq .L30
bl __stack_chk_fail
.L30:
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 3056
.cfi_def_cfa_offset 1597440
add sp, sp, 1597440
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size mean_coverage2, .-mean_coverage2
.align 2
.global mean_coverage3
.type mean_coverage3, %function
mean_coverage3:
.LFB10:
.cfi_startproc
sub x12, sp, #1572864
.cfi_def_cfa 12, 1572864
.LPSRL2:
sub sp, sp, 65536
str xzr, [sp, 1024]
cmp sp, x12
b.ne .LPSRL2
.cfi_def_cfa_register 31
mov x12, 27840
sub sp, sp, x12
.cfi_def_cfa_offset 1600704
stp x29, x30, [sp]
.cfi_offset 29, -1600704
.cfi_offset 30, -1600696
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, 1589248
ldr x2, [x0]
str x2, [x1, 11448]
mov x2, 0
str wzr, [sp, 76]
str wzr, [sp, 88]
str wzr, [sp, 80]
b .L32
.L35:
mov w0, 1
str w0, [sp, 84]
b .L33
.L34:
ldrsw x0, [sp, 80]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 2656
ldr w4, [sp, 84]
mov x3, x0
ldr x2, [sp, 56]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 96
add x0, sp, 1597440
add x0, x0, 2656
mov w2, 0
bl load_locations
str w0, [sp, 92]
ldrsw x0, [sp, 80]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 2856
ldr w4, [sp, 84]
mov x3, x0
ldr x2, [sp, 48]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 96
add x0, sp, 1597440
add x0, x0, 2856
ldr w2, [sp, 92]
bl load_locations
str w0, [sp, 92]
ldrsw x0, [sp, 80]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 3056
ldr w4, [sp, 84]
mov x3, x0
ldr x2, [sp, 40]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 96
add x0, sp, 1597440
add x0, x0, 3056
ldr w2, [sp, 92]
bl load_locations
str w0, [sp, 92]
add x3, sp, 68
add x2, sp, 64
add x1, sp, 72
add x0, sp, 96
mov x4, x3
mov x3, x2
mov x2, x1
ldr w1, [sp, 92]
bl coverage
ldr s0, [sp, 72]
ldr s1, [sp, 88]
fadd s0, s1, s0
str s0, [sp, 88]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
.L33:
ldr w0, [sp, 84]
cmp w0, 6
ble .L34
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L32:
ldr w1, [sp, 80]
ldr w0, [sp, 28]
cmp w1, w0
blt .L35
ldr s0, [sp, 76]
scvtf s0, s0
ldr s1, [sp, 88]
fdiv s0, s1, s0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x2, sp, 1589248
ldr x3, [x2, 11448]
ldr x1, [x0]
subs x3, x3, x1
mov x1, 0
beq .L37
bl __stack_chk_fail
.L37:
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 3264
.cfi_def_cfa_offset 1597440
add sp, sp, 1597440
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size mean_coverage3, .-mean_coverage3
.align 2
.global mean_coverage4
.type mean_coverage4, %function
mean_coverage4:
.LFB11:
.cfi_startproc
sub x12, sp, #1572864
.cfi_def_cfa 12, 1572864
.LPSRL3:
sub sp, sp, 65536
str xzr, [sp, 1024]
cmp sp, x12
b.ne .LPSRL3
.cfi_def_cfa_register 31
mov x12, 28048
sub sp, sp, x12
.cfi_def_cfa_offset 1600912
stp x29, x30, [sp]
.cfi_offset 29, -1600912
.cfi_offset 30, -1600904
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
str w5, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 1589248
ldr x2, [x0]
str x2, [x1, 11656]
mov x2, 0
str wzr, [sp, 84]
str wzr, [sp, 96]
str wzr, [sp, 88]
b .L39
.L42:
mov w0, 1
str w0, [sp, 92]
b .L40
.L41:
ldrsw x0, [sp, 88]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 2664
ldr w4, [sp, 92]
mov x3, x0
ldr x2, [sp, 56]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 104
add x0, sp, 1597440
add x0, x0, 2664
mov w2, 0
bl load_locations
str w0, [sp, 100]
ldrsw x0, [sp, 88]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 2864
ldr w4, [sp, 92]
mov x3, x0
ldr x2, [sp, 48]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 104
add x0, sp, 1597440
add x0, x0, 2864
ldr w2, [sp, 100]
bl load_locations
str w0, [sp, 100]
ldrsw x0, [sp, 88]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 3064
ldr w4, [sp, 92]
mov x3, x0
ldr x2, [sp, 40]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 104
add x0, sp, 1597440
add x0, x0, 3064
ldr w2, [sp, 100]
bl load_locations
str w0, [sp, 100]
ldrsw x0, [sp, 88]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x0, [x0]
add x5, sp, 1597440
add x5, x5, 3264
ldr w4, [sp, 92]
mov x3, x0
ldr x2, [sp, 32]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x5
bl sprintf
add x1, sp, 104
add x0, sp, 1597440
add x0, x0, 3264
ldr w2, [sp, 100]
bl load_locations
str w0, [sp, 100]
add x3, sp, 76
add x2, sp, 72
add x1, sp, 80
add x0, sp, 104
mov x4, x3
mov x3, x2
mov x2, x1
ldr w1, [sp, 100]
bl coverage
ldr s0, [sp, 80]
ldr s1, [sp, 96]
fadd s0, s1, s0
str s0, [sp, 96]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldr w0, [sp, 92]
add w0, w0, 1
str w0, [sp, 92]
.L40:
ldr w0, [sp, 92]
cmp w0, 6
ble .L41
ldr w0, [sp, 88]
add w0, w0, 1
str w0, [sp, 88]
.L39:
ldr w1, [sp, 88]
ldr w0, [sp, 20]
cmp w1, w0
blt .L42
ldr s0, [sp, 84]
scvtf s0, s0
ldr s1, [sp, 96]
fdiv s0, s1, s0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x2, sp, 1589248
ldr x3, [x2, 11656]
ldr x1, [x0]
subs x3, x3, x1
mov x1, 0
beq .L44
bl __stack_chk_fail
.L44:
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 3472
.cfi_def_cfa_offset 1597440
add sp, sp, 1597440
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size mean_coverage4, .-mean_coverage4
.section .rodata
.align 3
.LC21:
.string "%s: %f\n"
.align 3
.LC22:
.string "%s + %s: %f\n"
.align 3
.LC23:
.string "%s + %s + %s: %f\n"
.align 3
.LC24:
.string "%s + %s + %s + %s: %f\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -176]!
.cfi_def_cfa_offset 176
.cfi_offset 29, -176
.cfi_offset 30, -168
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, 168]
mov x1, 0
add x0, sp, 184
sub x0, x0, #112
adrp x1, .LC19
add x1, x1, :lo12:.LC19
ld1 {v0.16b - v1.16b}, [x1]
st1 {v0.16b - v1.16b}, [x0]
mov w0, 4
str w0, [sp, 60]
adrp x0, .LC20
add x1, x0, :lo12:.LC20
add x0, sp, 104
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldp q0, q1, [x1, 32]
stp q0, q1, [x0, 32]
mov w0, 8
str w0, [sp, 64]
str wzr, [sp, 44]
b .L46
.L47:
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x0, [x0, x1, lsl 3]
add x1, sp, 104
ldr w2, [sp, 64]
bl mean_coverage1
str s0, [sp, 68]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x0, [x0, x1, lsl 3]
ldr s0, [sp, 68]
fcvt d0, s0
mov x1, x0
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L46:
ldr w1, [sp, 44]
ldr w0, [sp, 60]
cmp w1, w0
blt .L47
str wzr, [sp, 44]
b .L48
.L51:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 48]
b .L49
.L50:
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x4, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 48]
ldr x0, [x0, x1, lsl 3]
add x1, sp, 104
ldr w3, [sp, 64]
mov x2, x1
mov x1, x0
mov x0, x4
bl mean_coverage2
str s0, [sp, 68]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x3, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 48]
ldr x0, [x0, x1, lsl 3]
ldr s0, [sp, 68]
fcvt d0, s0
mov x2, x0
mov x1, x3
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl printf
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L49:
ldr w1, [sp, 48]
ldr w0, [sp, 60]
cmp w1, w0
blt .L50
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L48:
ldr w1, [sp, 44]
ldr w0, [sp, 60]
cmp w1, w0
blt .L51
str wzr, [sp, 44]
b .L52
.L57:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 48]
b .L53
.L56:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 52]
b .L54
.L55:
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x5, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 48]
ldr x6, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 52]
ldr x0, [x0, x1, lsl 3]
add x1, sp, 104
ldr w4, [sp, 64]
mov x3, x1
mov x2, x0
mov x1, x6
mov x0, x5
bl mean_coverage3
str s0, [sp, 68]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x4, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 48]
ldr x2, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 52]
ldr x0, [x0, x1, lsl 3]
ldr s0, [sp, 68]
fcvt d0, s0
mov x3, x0
mov x1, x4
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl printf
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L54:
ldr w1, [sp, 52]
ldr w0, [sp, 60]
cmp w1, w0
blt .L55
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L53:
ldr w1, [sp, 48]
ldr w0, [sp, 60]
cmp w1, w0
blt .L56
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L52:
ldr w1, [sp, 44]
ldr w0, [sp, 60]
cmp w1, w0
blt .L57
str wzr, [sp, 44]
b .L58
.L65:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 48]
b .L59
.L64:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 52]
b .L60
.L63:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 56]
b .L61
.L62:
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x6, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 48]
ldr x7, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 52]
ldr x2, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 56]
ldr x0, [x0, x1, lsl 3]
add x1, sp, 104
ldr w5, [sp, 64]
mov x4, x1
mov x3, x0
mov x1, x7
mov x0, x6
bl mean_coverage4
str s0, [sp, 68]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 44]
ldr x5, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 48]
ldr x2, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 52]
ldr x3, [x0, x1, lsl 3]
add x0, sp, 184
sub x0, x0, #112
ldrsw x1, [sp, 56]
ldr x0, [x0, x1, lsl 3]
ldr s0, [sp, 68]
fcvt d0, s0
mov x4, x0
mov x1, x5
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl printf
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L61:
ldr w1, [sp, 56]
ldr w0, [sp, 60]
cmp w1, w0
blt .L62
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L60:
ldr w1, [sp, 52]
ldr w0, [sp, 60]
cmp w1, w0
blt .L63
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L59:
ldr w1, [sp, 48]
ldr w0, [sp, 60]
cmp w1, w0
blt .L64
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L58:
ldr w1, [sp, 44]
ldr w0, [sp, 60]
cmp w1, w0
blt .L65
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 168]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L67
bl __stack_chk_fail
.L67:
mov w0, w1
ldp x29, x30, [sp], 176
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "ebr"
.align 3
.LC1:
.string "ibr"
.align 3
.LC2:
.string "mser"
.align 3
.LC3:
.string "sfop"
.data
.align 3
.LC19:
.xword .LC0
.xword .LC1
.xword .LC2
.xword .LC3
.section .rodata
.align 3
.LC5:
.string "bark"
.align 3
.LC6:
.string "bikes"
.align 3
.LC7:
.string "boat"
.align 3
.LC8:
.string "graf"
.align 3
.LC9:
.string "leuv"
.align 3
.LC10:
.string "trees"
.align 3
.LC11:
.string "ubc"
.align 3
.LC12:
.string "wall"
.data
.align 3
.LC20:
.xword .LC5
.xword .LC6
.xword .LC7
.xword .LC8
.xword .LC9
.xword .LC10
.xword .LC11
.xword .LC12
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Press Enter to Read: \n"
.align 3
.LC1:
.string "r"
.align 3
.LC2:
.string "input.txt"
.align 3
.LC3:
.string "Error: Unable to input file 'input.txt'\n"
.align 3
.LC4:
.string "Reading of File Completed."
.align 3
.LC5:
.string "Converting to recommended File started..."
.align 3
.LC6:
.string "Converting to recommended File Completed."
.align 3
.LC7:
.string "w"
.align 3
.LC8:
.string "list.txt"
.align 3
.LC9:
.string "\n\nPress Enter to Creat the Folders: "
.align 3
.LC10:
.string "\nCreating..."
.align 3
.LC11:
.string "Process Completed"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
sub x12, sp, #1966080
.cfi_def_cfa 12, 1966080
.LPSRL0:
sub sp, sp, 65536
str xzr, [sp, 1024]
cmp sp, x12
b.ne .LPSRL0
.cfi_def_cfa_register 31
mov x12, 33984
sub sp, sp, x12
.cfi_def_cfa_offset 2000064
stp x29, x30, [sp]
.cfi_offset 29, -2000064
.cfi_offset 30, -2000056
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 1998848
ldr x2, [x0]
str x2, [x1, 1208]
mov x2, 0
add x0, sp, 56
str x0, [sp, 24]
add x0, sp, 999424
add x0, x0, 512
stp xzr, xzr, [x0, 120]
add x0, sp, 999424
add x0, x0, 648
mov x1, 16944
movk x1, 0xf, lsl 16
mov x2, x1
mov w1, 0
bl memset
add x0, sp, 999424
add x0, x0, 632
str x0, [sp, 32]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
bl getch
adrp x0, .LC1
add x1, x0, :lo12:.LC1
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L2
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 40
mov x1, 1
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl fwrite
mov w0, 8
bl exit
.L2:
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
b .L3
.L8:
ldr x2, [sp, 40]
mov w1, 200
ldr x0, [sp, 24]
bl fgets
ldr x0, [sp, 32]
mov w1, 10
strb w1, [x0]
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
ldr x0, [sp, 32]
mov w1, 109
strb w1, [x0]
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
ldr x0, [sp, 32]
mov w1, 100
strb w1, [x0]
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
ldr x0, [sp, 32]
mov w1, 32
strb w1, [x0]
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
ldr x0, [sp, 32]
mov w1, 34
strb w1, [x0]
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
b .L4
.L7:
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 124
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 47
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 47
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 58
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 63
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 42
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 60
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 62
beq .L5
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 92
bne .L6
.L5:
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
.L6:
ldr x0, [sp, 24]
ldrb w1, [x0]
ldr x0, [sp, 32]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
.L4:
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 10
bne .L7
ldr x0, [sp, 32]
mov w1, 34
strb w1, [x0]
ldr x0, [sp, 32]
add x0, x0, 1
str x0, [sp, 32]
.L3:
ldr x0, [sp, 40]
bl feof
cmp w0, 0
beq .L8
ldr x0, [sp, 40]
bl fclose
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
add x0, sp, 999424
add x0, x0, 632
str x0, [sp, 48]
add x0, sp, 999424
add x0, x0, 632
bl strlen
mov x1, x0
ldr x0, [sp, 48]
add x0, x0, x1
str x0, [sp, 48]
ldr x0, [sp, 48]
mov w1, 34
strb w1, [x0]
ldr x0, [sp, 48]
add x0, x0, 1
str x0, [sp, 48]
ldr x0, [sp, 48]
strb wzr, [x0]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl fopen
str x0, [sp, 40]
add x0, sp, 999424
add x0, x0, 632
ldr x1, [sp, 40]
bl fputs
ldr x0, [sp, 40]
bl fclose
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
bl getch
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl puts
adrp x0, .LC1
add x1, x0, :lo12:.LC1
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl fopen
str x0, [sp, 40]
b .L9
.L10:
add x0, sp, 999424
add x0, x0, 632
ldr x2, [sp, 40]
mov w1, 200
bl fgets
add x0, sp, 999424
add x0, x0, 632
bl system
.L9:
ldr x0, [sp, 40]
bl feof
cmp w0, 0
beq .L10
ldr x0, [sp, 40]
bl fclose
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
bl getch
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 1998848
ldr x4, [x3, 1208]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L12
bl __stack_chk_fail
.L12:
mov w0, w1
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 1216
.cfi_def_cfa_offset 1998848
add sp, sp, 1998848
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global CEC_ST_RX_DATA_POST_SAMPLE
.bss
.align 2
.type CEC_ST_RX_DATA_POST_SAMPLE, %object
.size CEC_ST_RX_DATA_POST_SAMPLE, 4
CEC_ST_RX_DATA_POST_SAMPLE:
.zero 4
.global CEC_ST_TX_LOW_DRIVE
.align 2
.type CEC_ST_TX_LOW_DRIVE, %object
.size CEC_ST_TX_LOW_DRIVE, 4
CEC_ST_TX_LOW_DRIVE:
.zero 4
.global CEC_TIM_DATA_BIT_SAMPLE
.align 2
.type CEC_TIM_DATA_BIT_SAMPLE, %object
.size CEC_TIM_DATA_BIT_SAMPLE, 4
CEC_TIM_DATA_BIT_SAMPLE:
.zero 4
.global CEC_TX_STATUS_ARB_LOST
.align 3
.type CEC_TX_STATUS_ARB_LOST, %object
.size CEC_TX_STATUS_ARB_LOST, 8
CEC_TX_STATUS_ARB_LOST:
.zero 8
.global CEC_TX_STATUS_LOW_DRIVE
.align 3
.type CEC_TX_STATUS_LOW_DRIVE, %object
.size CEC_TX_STATUS_LOW_DRIVE, 8
CEC_TX_STATUS_LOW_DRIVE:
.zero 8
.global CEC_TX_STATUS_NACK
.align 3
.type CEC_TX_STATUS_NACK, %object
.size CEC_TX_STATUS_NACK, 8
CEC_TX_STATUS_NACK:
.zero 8
.global CEC_TX_STATUS_OK
.align 3
.type CEC_TX_STATUS_OK, %object
.size CEC_TX_STATUS_OK, 8
CEC_TX_STATUS_OK:
.zero 8
.text
.align 2
.type cec_pin_tx_states, %function
cec_pin_tx_states:
.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]
str x1, [sp, 16]
ldr x0, [sp, 24]
ldr w0, [x0]
cmp w0, 151
bgt .L59
cmp w0, 149
bge .L3
cmp w0, 148
beq .L4
cmp w0, 148
bgt .L59
cmp w0, 147
bgt .L59
cmp w0, 146
bge .L3
cmp w0, 145
bgt .L59
cmp w0, 143
bge .L5
cmp w0, 142
beq .L6
cmp w0, 142
bgt .L59
cmp w0, 141
beq .L3
cmp w0, 141
bgt .L59
cmp w0, 140
beq .L4
cmp w0, 140
bgt .L59
cmp w0, 139
beq .L7
cmp w0, 139
bgt .L59
cmp w0, 138
beq .L8
cmp w0, 138
bgt .L59
cmp w0, 137
beq .L9
cmp w0, 137
bgt .L59
cmp w0, 136
beq .L10
cmp w0, 136
bgt .L59
cmp w0, 135
bgt .L59
cmp w0, 132
bge .L11
cmp w0, 131
beq .L12
cmp w0, 131
bgt .L59
cmp w0, 129
beq .L13
cmp w0, 130
beq .L14
b .L59
.L13:
ldr x0, [sp, 24]
bl cec_pin_read
cmp w0, 0
beq .L60
ldr x0, [sp, 24]
bl cec_pin_to_idle
b .L60
.L12:
ldr x0, [sp, 24]
bl tx_short_start
cmp w0, 0
beq .L17
ldr x0, [sp, 24]
mov w1, 132
str w1, [x0]
b .L18
.L17:
ldr x0, [sp, 24]
bl tx_long_start
cmp w0, 0
beq .L19
ldr x0, [sp, 24]
mov w1, 133
str w1, [x0]
b .L18
.L19:
ldr x0, [sp, 24]
mov w1, 135
str w1, [x0]
.L18:
ldr x0, [sp, 24]
bl cec_pin_high
b .L16
.L14:
ldr x0, [sp, 24]
mov w1, 134
str w1, [x0]
ldr x0, [sp, 24]
bl cec_pin_high
b .L16
.L5:
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 0
beq .L3
ldr x0, [sp, 24]
bl cec_pin_to_idle
ldr x0, [sp, 24]
str wzr, [x0, 24]
ldr x0, [sp, 24]
ldr w0, [x0, 88]
cmp w0, 0
bne .L61
ldr x0, [sp, 24]
ldr x1, [sp, 16]
str x1, [x0, 80]
adrp x0, CEC_TX_STATUS_NACK
add x0, x0, :lo12:CEC_TX_STATUS_NACK
ldr x1, [x0]
ldr x0, [sp, 24]
str x1, [x0, 72]
ldr x0, [sp, 24]
add x0, x0, 64
bl wake_up_interruptible
b .L16
.L3:
ldr x0, [sp, 24]
bl cec_pin_read
cmp w0, 0
bne .L7
ldr x0, [sp, 24]
ldr w0, [x0, 88]
cmp w0, 0
bne .L7
ldr x0, [sp, 24]
str wzr, [x0, 24]
ldr x0, [sp, 24]
mov w1, 129
str w1, [x0]
ldr x0, [sp, 24]
ldr x1, [sp, 16]
str x1, [x0, 80]
adrp x0, CEC_TX_STATUS_LOW_DRIVE
add x0, x0, :lo12:CEC_TX_STATUS_LOW_DRIVE
ldr x1, [x0]
ldr x0, [sp, 24]
str x1, [x0, 72]
ldr x0, [sp, 24]
ldr w0, [x0, 92]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0, 92]
ldr x0, [sp, 24]
add x0, x0, 64
bl wake_up_interruptible
b .L16
.L7:
ldr x0, [sp, 24]
bl tx_last_bit
cmp w0, 0
beq .L21
ldr x0, [sp, 24]
bl cec_pin_to_idle
ldr x0, [sp, 24]
str wzr, [x0, 24]
ldr x0, [sp, 24]
ldr w0, [x0, 88]
cmp w0, 0
bne .L62
ldr x0, [sp, 24]
ldr x1, [sp, 16]
str x1, [x0, 80]
adrp x0, CEC_TX_STATUS_OK
add x0, x0, :lo12:CEC_TX_STATUS_OK
ldr x1, [x0]
ldr x0, [sp, 24]
str x1, [x0, 72]
ldr x0, [sp, 24]
add x0, x0, 64
bl wake_up_interruptible
b .L16
.L21:
ldr x0, [sp, 24]
ldr w0, [x0, 8]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0, 8]
.L11:
ldr x0, [sp, 24]
bl tx_low_drive
cmp w0, 0
beq .L23
ldr x0, [sp, 24]
bl cec_pin_low
adrp x0, CEC_ST_TX_LOW_DRIVE
add x0, x0, :lo12:CEC_ST_TX_LOW_DRIVE
ldr w1, [x0]
ldr x0, [sp, 24]
str w1, [x0]
ldr x0, [sp, 24]
str wzr, [x0, 24]
ldr x0, [sp, 24]
ldr w0, [x0, 88]
cmp w0, 0
bne .L63
ldr x0, [sp, 24]
ldr x1, [sp, 16]
str x1, [x0, 80]
adrp x0, CEC_TX_STATUS_LOW_DRIVE
add x0, x0, :lo12:CEC_TX_STATUS_LOW_DRIVE
ldr x1, [x0]
ldr x0, [sp, 24]
str x1, [x0, 72]
ldr x0, [sp, 24]
ldr w0, [x0, 92]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0, 92]
ldr x0, [sp, 24]
add x0, x0, 64
bl wake_up_interruptible
b .L16
.L23:
ldr x0, [sp, 24]
ldr w0, [x0, 8]
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
mov w2, w0
ldr x0, [sp, 24]
ldr w0, [x0, 24]
ldr x1, [sp, 24]
ldr w1, [x1, 12]
add w0, w0, w1
cmp w2, w0
bcc .L25
ldr x0, [sp, 24]
bl cec_pin_to_idle
ldr x0, [sp, 24]
str wzr, [x0, 24]
ldr x0, [sp, 24]
ldr w0, [x0, 88]
cmp w0, 0
bne .L64
ldr x0, [sp, 24]
ldr x1, [sp, 16]
str x1, [x0, 80]
adrp x0, CEC_TX_STATUS_OK
add x0, x0, :lo12:CEC_TX_STATUS_OK
ldr x1, [x0]
ldr x0, [sp, 24]
str x1, [x0, 72]
ldr x0, [sp, 24]
add x0, x0, 64
bl wake_up_interruptible
b .L16
.L25:
ldr x0, [sp, 24]
ldr w2, [x0, 8]
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
cmp w1, 128
beq .L27
cmp w1, 152
beq .L28
ldr x0, [sp, 24]
ldr w0, [x0, 8]
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, 60]
ldr w0, [sp, 60]
str w0, [sp, 40]
ldr x0, [sp, 24]
ldr w0, [x0, 24]
ldr w1, [sp, 60]
cmp w1, w0
bcs .L29
ldr x0, [sp, 24]
ldr x1, [x0, 32]
ldr w0, [sp, 60]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 40]
.L29:
ldr x0, [sp, 24]
ldr w2, [x0, 8]
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
mov w0, 7
sub w0, w0, w1
mov w1, 1
lsl w0, w1, w0
ldr w1, [sp, 40]
and w0, w1, w0
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
beq .L30
mov w0, 140
b .L31
.L30:
mov w0, 148
.L31:
ldr x1, [sp, 24]
str w0, [x1]
b .L32
.L27:
ldr x0, [sp, 24]
ldr w0, [x0, 24]
ldr x1, [sp, 24]
ldr w1, [x1, 12]
add w0, w0, w1
str w0, [sp, 52]
ldr x0, [sp, 24]
ldr w0, [x0, 8]
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, 56]
ldr x0, [sp, 24]
ldr w0, [x0, 16]
cmp w0, 0
bne .L33
ldr w0, [sp, 52]
sub w0, w0, #1
ldr w1, [sp, 56]
cmp w1, w0
bne .L33
mov w0, 1
b .L34
.L33:
mov w0, 0
.L34:
str w0, [sp, 36]
ldr w0, [sp, 52]
cmp w0, 1
bls .L35
ldr w0, [sp, 52]
sub w0, w0, #2
ldr w1, [sp, 56]
cmp w1, w0
bne .L35
ldr x0, [sp, 24]
bl tx_early_eom
cmp w0, 0
beq .L35
mov w0, 1
str w0, [sp, 36]
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 16]
b .L36
.L35:
ldr w0, [sp, 36]
cmp w0, 0
beq .L36
ldr x0, [sp, 24]
bl tx_no_eom
cmp w0, 0
beq .L36
str wzr, [sp, 36]
.L36:
ldr w0, [sp, 36]
cmp w0, 0
beq .L37
mov w0, 140
b .L38
.L37:
mov w0, 148
.L38:
ldr x1, [sp, 24]
str w0, [x1]
b .L32
.L28:
ldr x0, [sp, 24]
mov w1, 140
str w1, [x0]
nop
.L32:
ldr x0, [sp, 24]
bl tx_custom_bit
cmp w0, 0
beq .L39
ldr x0, [sp, 24]
mov w1, 138
str w1, [x0]
.L39:
ldr x0, [sp, 24]
bl cec_pin_low
b .L16
.L4:
ldr x0, [sp, 24]
ldr w0, [x0]
cmp w0, 140
cset w0, eq
and w0, w0, 255
str w0, [sp, 36]
ldr x0, [sp, 24]
ldr w2, [x0, 8]
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
cmp w1, 152
cset w0, eq
and w0, w0, 255
str w0, [sp, 44]
ldr w0, [sp, 36]
cmp w0, 0
beq .L40
ldr x0, [sp, 24]
ldr w0, [x0, 8]
cmp w0, 3
ble .L41
ldr w0, [sp, 44]
cmp w0, 0
beq .L40
.L41:
ldr x0, [sp, 24]
mov w1, 142
str w1, [x0]
b .L42
.L40:
ldr w0, [sp, 44]
cmp w0, 0
bne .L43
ldr x0, [sp, 24]
bl tx_short_bit
cmp w0, 0
beq .L43
ldr w0, [sp, 36]
cmp w0, 0
beq .L44
mov w0, 141
b .L45
.L44:
mov w0, 149
.L45:
ldr x1, [sp, 24]
str w0, [x1]
b .L42
.L43:
ldr w0, [sp, 44]
cmp w0, 0
bne .L46
ldr x0, [sp, 24]
bl tx_long_bit
cmp w0, 0
beq .L46
ldr w0, [sp, 36]
cmp w0, 0
beq .L47
mov w0, 146
b .L48
.L47:
mov w0, 150
.L48:
ldr x1, [sp, 24]
str w0, [x1]
b .L42
.L46:
ldr w0, [sp, 36]
cmp w0, 0
beq .L49
mov w0, 147
b .L50
.L49:
mov w0, 151
.L50:
ldr x1, [sp, 24]
str w0, [x1]
.L42:
ldr x0, [sp, 24]
bl cec_pin_high
b .L16
.L8:
ldr x0, [sp, 24]
mov w1, 139
str w1, [x0]
ldr x0, [sp, 24]
bl cec_pin_high
b .L16
.L6:
ldr x0, [sp, 24]
bl cec_pin_read
str w0, [sp, 36]
ldr x0, [sp, 24]
ldr w2, [x0, 8]
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
cmp w1, 152
cset w0, eq
and w0, w0, 255
str w0, [sp, 44]
ldr w0, [sp, 36]
cmp w0, 0
bne .L51
ldr w0, [sp, 44]
cmp w0, 0
bne .L51
ldr x0, [sp, 24]
ldr w0, [x0, 88]
cmp w0, 0
bne .L51
ldr x0, [sp, 24]
str wzr, [x0, 24]
ldr x0, [sp, 24]
ldr x1, [sp, 16]
str x1, [x0, 80]
adrp x0, CEC_TX_STATUS_ARB_LOST
add x0, x0, :lo12:CEC_TX_STATUS_ARB_LOST
ldr x1, [x0]
ldr x0, [sp, 24]
str x1, [x0, 72]
ldr x0, [sp, 24]
add x0, x0, 64
bl wake_up_interruptible
ldr x0, [sp, 24]
ldr w1, [x0, 8]
ldr x0, [sp, 24]
str w1, [x0, 20]
ldr x0, [sp, 24]
str wzr, [x0, 8]
ldr x0, [sp, 24]
ldr x0, [x0, 48]
mov w2, 8
mov w1, 0
bl memset
ldr x0, [sp, 24]
ldr x1, [x0, 32]
ldr x0, [sp, 24]
ldr x0, [x0, 48]
ldr w1, [x1]
str w1, [x0]
ldr x0, [sp, 24]
ldr x0, [x0, 48]
ldr w2, [x0]
ldr x0, [sp, 24]
ldr w0, [x0, 20]
mov w1, 8
sub w0, w1, w0
mov w1, 255
lsl w1, w1, w0
ldr x0, [sp, 24]
ldr x0, [x0, 48]
and w1, w2, w1
str w1, [x0]
ldr x0, [sp, 24]
str wzr, [x0, 56]
adrp x0, CEC_TIM_DATA_BIT_SAMPLE
add x0, x0, :lo12:CEC_TIM_DATA_BIT_SAMPLE
ldr w0, [x0]
mov w1, w0
ldr x0, [sp, 16]
bl ktime_sub_us
mov w1, w0
ldr x0, [sp, 24]
str w1, [x0, 44]
adrp x0, CEC_ST_RX_DATA_POST_SAMPLE
add x0, x0, :lo12:CEC_ST_RX_DATA_POST_SAMPLE
ldr w1, [x0]
ldr x0, [sp, 24]
str w1, [x0]
ldr x0, [sp, 24]
ldr w0, [x0, 20]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0, 20]
b .L16
.L51:
ldr x0, [sp, 24]
mov w1, 145
str w1, [x0]
ldr w0, [sp, 44]
cmp w0, 0
bne .L52
ldr x0, [sp, 24]
bl tx_short_bit
cmp w0, 0
beq .L52
ldr x0, [sp, 24]
mov w1, 143
str w1, [x0]
b .L53
.L52:
ldr w0, [sp, 44]
cmp w0, 0
bne .L53
ldr x0, [sp, 24]
bl tx_long_bit
cmp w0, 0
beq .L53
ldr x0, [sp, 24]
mov w1, 144
str w1, [x0]
.L53:
ldr w0, [sp, 44]
cmp w0, 0
beq .L65
ldr x0, [sp, 24]
add x0, x0, 24
bl cec_msg_is_broadcast
cmp w0, 0
bne .L55
ldr w0, [sp, 36]
cmp w0, 0
cset w0, eq
and w0, w0, 255
b .L56
.L55:
ldr w0, [sp, 36]
.L56:
str w0, [sp, 48]
ldr w0, [sp, 48]
cmp w0, 0
bne .L66
ldr x0, [sp, 24]
ldr w0, [x0, 40]
cmp w0, 0
beq .L58
ldr x0, [sp, 24]
ldr w0, [x0, 8]
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
mov w1, w0
ldr x0, [sp, 24]
ldr w0, [x0, 24]
sub w0, w0, #1
cmp w1, w0
bne .L66
.L58:
ldr x0, [sp, 24]
ldr w0, [x0, 16]
cmp w0, 0
bne .L66
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 4]
b .L66
.L10:
ldr x0, [sp, 24]
bl cec_pin_high
ldr x0, [sp, 24]
mov w1, 137
str w1, [x0]
b .L16
.L9:
ldr x0, [sp, 24]
bl cec_pin_to_idle
b .L16
.L59:
nop
b .L67
.L60:
nop
b .L67
.L61:
nop
b .L67
.L62:
nop
b .L67
.L63:
nop
b .L67
.L64:
nop
b .L67
.L65:
nop
b .L67
.L66:
nop
.L16:
.L67:
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size cec_pin_tx_states, .-cec_pin_tx_states
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global m_memcpy
.type m_memcpy, %function
m_memcpy:
.LFB0:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 24]
str x1, [sp, 16]
str w2, [sp, 12]
ldr x0, [sp, 16]
str x0, [sp, 32]
ldr x0, [sp, 24]
str x0, [sp, 40]
b .L2
.L3:
ldr x1, [sp, 32]
add x0, x1, 1
str x0, [sp, 32]
ldr x0, [sp, 40]
add x2, x0, 1
str x2, [sp, 40]
ldrb w1, [x1]
strb w1, [x0]
ldr w0, [sp, 12]
sub w0, w0, #1
str w0, [sp, 12]
.L2:
ldr w0, [sp, 12]
cmp w0, 0
bne .L3
ldr x0, [sp, 24]
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size m_memcpy, .-m_memcpy
.align 2
.global m_memset
.type m_memset, %function
m_memset:
.LFB1:
.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]
str x0, [sp, 24]
str wzr, [sp, 20]
b .L6
.L7:
ldr w0, [sp, 20]
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [sp, 4]
and w1, w1, 255
strb w1, [x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L6:
ldr w1, [sp, 20]
ldr w0, [sp]
cmp w1, w0
bcc .L7
ldr x0, [sp, 8]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size m_memset, .-m_memset
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "fork error"
.align 3
.LC1:
.string "child process"
.align 3
.LC2:
.string "/dev/null"
.align 3
.LC3:
.string "ftok error"
.align 3
.LC4:
.string "shmget error"
.align 3
.LC5:
.string "shmat error"
.align 3
.LC6:
.string "child pid is %d, share memory from %lx to %lx, content: %s\n"
.align 3
.LC7:
.string "shmctl error"
.align 3
.LC8:
.string "parent process"
.align 3
.LC9:
.string "hello world"
.align 3
.LC10:
.string "parent pid is %d, share memory from %lx to %lx, content: %s\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
bl fork
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 0
bge .L2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl perror
mov w0, 1
bl exit
.L2:
ldr w0, [sp, 28]
cmp w0, 0
bne .L3
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
mov w1, 2
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl ftok
str w0, [sp, 32]
ldr w0, [sp, 32]
cmp w0, 0
bge .L4
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl perror
mov w0, 1
bl exit
.L4:
mov w2, 896
mov x1, 1024
ldr w0, [sp, 32]
bl shmget
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bge .L5
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl perror
mov w0, 1
bl exit
.L5:
mov w2, 0
mov x1, 0
ldr w0, [sp, 36]
bl shmat
str x0, [sp, 40]
ldr x0, [sp, 40]
cmn x0, #1
bne .L6
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl perror
mov w0, 1
bl exit
.L6:
mov w0, 1
bl sleep
bl getpid
mov w5, w0
ldr x1, [sp, 40]
ldr x0, [sp, 40]
add x0, x0, 1024
ldr x4, [sp, 40]
mov x3, x0
mov x2, x1
mov w1, w5
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
mov w0, 1
bl sleep
mov x2, 0
mov w1, 0
ldr w0, [sp, 36]
bl shmctl
cmp w0, 0
bge .L7
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl perror
mov w0, 1
bl exit
.L7:
mov w0, 0
bl exit
.L3:
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
mov w1, 2
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl ftok
str w0, [sp, 32]
ldr w0, [sp, 32]
cmp w0, 0
bge .L8
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl perror
mov w0, 1
bl exit
.L8:
mov w2, 1920
mov x1, 1024
ldr w0, [sp, 32]
bl shmget
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bge .L9
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl perror
mov w0, 1
bl exit
.L9:
mov w2, 0
mov x1, 0
ldr w0, [sp, 36]
bl shmat
str x0, [sp, 40]
ldr x0, [sp, 40]
cmn x0, #1
bne .L10
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl perror
mov w0, 1
bl exit
.L10:
mov x2, 12
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr x0, [sp, 40]
bl memcpy
bl getpid
mov w5, w0
ldr x1, [sp, 40]
ldr x0, [sp, 40]
add x0, x0, 1024
ldr x4, [sp, 40]
mov x3, x0
mov x2, x1
mov w1, w5
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
mov w2, 0
mov x1, 0
ldr w0, [sp, 28]
bl waitpid
mov w0, 0
bl exit
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global test
.type test, %function
test:
.LFB6:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str x1, [sp]
str xzr, [sp, 24]
b .L2
.L3:
ldr x0, [sp, 24]
add x0, x0, 1
ldr x1, [sp]
add x1, x1, x0
ldr x2, [sp, 8]
ldr x0, [sp, 24]
add x0, x2, x0
ldrb w1, [x1]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
.L2:
ldr x1, [sp, 24]
mov x0, 65535
cmp x1, x0
bls .L3
nop
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size test, .-test
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global socket_path
.bss
.align 3
.type socket_path, %object
.size socket_path, 1024
socket_path:
.zero 1024
.section .rodata
.align 3
.LC0:
.string "CP"
.align 3
.LC1:
.string "MON"
.align 3
.LC2:
.string "PD"
.align 3
.LC3:
.string "/opt/open-osdp/run/%s/open-osdp-control"
.align 3
.LC4:
.string "socket error"
.align 3
.LC5:
.string "connect error"
.align 3
.LC6:
.string "partial write"
.align 3
.LC7:
.string "write error"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -272]!
.cfi_def_cfa_offset 272
.cfi_offset 29, -272
.cfi_offset 30, -264
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, 264]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
str x0, [sp, 40]
ldr w0, [sp, 28]
cmp w0, 1
ble .L2
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x2
bl strcmp
cmp w0, 0
bne .L3
adrp x0, .LC1
add x0, x0, :lo12:.LC1
str x0, [sp, 40]
.L3:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x2
bl strcmp
cmp w0, 0
bne .L2
adrp x0, .LC2
add x0, x0, :lo12:.LC2
str x0, [sp, 40]
.L2:
ldr x2, [sp, 40]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
adrp x0, socket_path
add x0, x0, :lo12:socket_path
bl sprintf
mov w2, 0
mov w1, 1
mov w0, 1
bl socket
str w0, [sp, 32]
ldr w0, [sp, 32]
cmn w0, #1
bne .L4
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl perror
mov w0, -1
bl exit
.L4:
add x0, sp, 48
mov x2, 110
mov w1, 0
bl memset
mov w0, 1
strh w0, [sp, 48]
add x0, sp, 48
add x3, x0, 2
mov x2, 107
adrp x0, socket_path
add x1, x0, :lo12:socket_path
mov x0, x3
bl strncpy
add x0, sp, 48
mov w2, 110
mov x1, x0
ldr w0, [sp, 32]
bl connect
cmn w0, #1
bne .L6
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl perror
mov w0, -1
bl exit
.L8:
ldrsw x1, [sp, 36]
add x0, sp, 160
mov x2, x1
mov x1, x0
ldr w0, [sp, 32]
bl write
mov x1, x0
ldrsw x0, [sp, 36]
cmp x1, x0
beq .L6
ldr w0, [sp, 36]
cmp w0, 0
ble .L7
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 13
mov x1, 1
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl fwrite
b .L6
.L7:
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl perror
mov w0, -1
bl exit
.L6:
add x0, sp, 160
mov x2, 100
mov x1, x0
mov w0, 0
bl read
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bgt .L8
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 264]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L10
bl __stack_chk_fail
.L10:
mov w0, w1
ldp x29, x30, [sp], 272
.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 d
.data
.align 2
.type d, %object
.size d, 4
d:
.word 6
.global counter
.bss
.align 2
.type counter, %object
.size counter, 4
counter:
.zero 4
.text
.align 2
.global foo
.type foo, %function
foo:
.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]
str w1, [sp, 40]
str w2, [sp, 36]
ldr w1, [sp, 44]
ldr w0, [sp, 40]
add w1, w1, w0
ldr w0, [sp, 36]
add w1, w1, w0
adrp x0, d
add x0, x0, :lo12:d
ldr w0, [x0]
add w0, w1, w0
cmp w0, 0
beq .L2
adrp x0, d
add x0, x0, :lo12:d
ldr w0, [x0]
sub w1, w0, #1
adrp x0, d
add x0, x0, :lo12:d
str w1, [x0]
adrp x0, d
add x0, x0, :lo12:d
ldr w1, [x0]
ldr w0, [sp, 44]
add w1, w1, w0
ldr w0, [sp, 40]
add w1, w1, w0
ldr w0, [sp, 36]
add w19, w1, w0
ldr w2, [sp, 36]
ldr w1, [sp, 40]
ldr w0, [sp, 44]
bl foo
add w0, w19, w0
b .L3
.L2:
adrp x0, d
add x0, x0, :lo12:d
ldr w1, [x0]
ldr w0, [sp, 44]
add w1, w1, w0
ldr w0, [sp, 40]
add w1, w1, w0
ldr w0, [sp, 36]
add w0, w1, w0
add w0, w0, 3
.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 foo, .-foo
.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
mov w2, 3
mov w1, 2
mov w0, 1
bl foo
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
.align 2
.global max
.type max, %function
max:
.LFB6:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
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
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size max, .-max
.align 2
.global maxSum
.type maxSum, %function
maxSum:
.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 w1, [sp, 20]
str w2, [sp, 16]
ldr w0, [sp, 20]
cmp w0, 15
bne .L4
mov w0, 0
b .L5
.L4:
ldr w0, [sp, 20]
add w0, w0, 1
ldr w2, [sp, 16]
mov w1, w0
ldr x0, [sp, 24]
bl maxSum
str w0, [sp, 40]
ldr w0, [sp, 20]
add w1, w0, 1
ldr w0, [sp, 16]
add w0, w0, 1
mov w2, w0
ldr x0, [sp, 24]
bl maxSum
str w0, [sp, 44]
ldr w1, [sp, 44]
ldr w0, [sp, 40]
bl max
mov w2, w0
ldrsw x0, [sp, 20]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
add w0, w2, w0
.L5:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size maxSum, .-maxSum
.section .rodata
.align 3
.LC12:
.string "Maximum from top to the bottom of the triangle is:"
.align 3
.LC13:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
sub sp, sp, #576
.cfi_def_cfa_offset 576
stp x29, x30, [sp]
.cfi_offset 29, -576
.cfi_offset 30, -568
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -560
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 568]
mov x1, 0
mov x0, 60
bl malloc
str x0, [sp, 48]
str wzr, [sp, 36]
b .L7
.L8:
ldrsw x0, [sp, 36]
lsl x0, x0, 3
ldr x1, [sp, 48]
add x19, x1, x0
mov x0, 4
bl malloc
str x0, [x19]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L7:
ldr w0, [sp, 36]
cmp w0, 14
ble .L8
mov w0, 75
str w0, [sp, 56]
mov w0, 95
str w0, [sp, 64]
mov w0, 64
str w0, [sp, 68]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 72
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
mov w0, 18
str w0, [sp, 88]
mov w0, 35
str w0, [sp, 92]
mov w0, 87
str w0, [sp, 96]
mov w0, 10
str w0, [sp, 100]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
add x2, sp, 104
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
add x2, sp, 128
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr x0, [x3, 16]
str x0, [x2, 16]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
add x0, sp, 152
ldr q0, [x1]
str q0, [x0]
ldr q0, [x1, 12]
str q0, [x0, 12]
adrp x0, .LC4
add x1, x0, :lo12:.LC4
add x0, sp, 184
ldp q0, q1, [x1]
stp q0, q1, [x0]
adrp x0, .LC5
add x1, x0, :lo12:.LC5
add x0, sp, 216
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr w1, [x1, 32]
str w1, [x0, 32]
adrp x0, .LC6
add x1, x0, :lo12:.LC6
add x0, sp, 256
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr x1, [x1, 32]
str x1, [x0, 32]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
add x0, sp, 296
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 28]
str q0, [x0, 28]
adrp x0, .LC8
add x1, x0, :lo12:.LC8
add x0, sp, 344
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 32]
str q0, [x0, 32]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
add x0, sp, 392
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 32]
str q0, [x0, 32]
ldr w1, [x1, 48]
str w1, [x0, 48]
adrp x0, .LC10
add x1, x0, :lo12:.LC10
add x0, sp, 448
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 32]
str q0, [x0, 32]
ldr x1, [x1, 48]
str x1, [x0, 48]
adrp x0, .LC11
add x1, x0, :lo12:.LC11
add x0, sp, 504
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 32]
str q0, [x0, 32]
ldr q0, [x1, 44]
str q0, [x0, 44]
ldr x0, [sp, 48]
add x1, sp, 56
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 8
add x1, sp, 64
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 16
add x1, sp, 72
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 24
add x1, sp, 88
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 32
add x1, sp, 104
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 40
add x1, sp, 128
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 48
add x1, sp, 152
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 56
add x1, sp, 184
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 64
add x1, sp, 216
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 72
add x1, sp, 256
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 80
add x1, sp, 296
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 88
add x1, sp, 344
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 96
add x1, sp, 392
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 104
add x1, sp, 448
str x1, [x0]
ldr x0, [sp, 48]
add x0, x0, 112
add x1, sp, 504
str x1, [x0]
mov w0, 15
str w0, [sp, 40]
mov w2, 0
mov w1, 0
ldr x0, [sp, 48]
bl maxSum
str w0, [sp, 44]
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl puts
ldr w1, [sp, 44]
adrp x0, .LC13
add x0, x0, :lo12:.LC13
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, 568]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L10
bl __stack_chk_fail
.L10:
mov w0, w1
ldr x19, [sp, 16]
ldp x29, x30, [sp]
add sp, sp, 576
.cfi_restore 29
.cfi_restore 30
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size main, .-main
.section .rodata
.align 3
.LC0:
.word 17
.word 47
.word 82
.align 3
.LC1:
.word 20
.word 4
.word 82
.word 47
.word 65
.align 3
.LC2:
.word 19
.word 1
.word 23
.word 75
.word 3
.word 34
.align 3
.LC3:
.word 88
.word 2
.word 77
.word 73
.word 7
.word 63
.word 67
.align 3
.LC4:
.word 99
.word 65
.word 4
.word 28
.word 6
.word 16
.word 70
.word 92
.align 3
.LC5:
.word 41
.word 41
.word 26
.word 56
.word 83
.word 40
.word 80
.word 70
.word 33
.align 3
.LC6:
.word 41
.word 48
.word 72
.word 33
.word 47
.word 32
.word 37
.word 16
.word 94
.word 29
.align 3
.LC7:
.word 53
.word 71
.word 44
.word 65
.word 25
.word 43
.word 91
.word 52
.word 97
.word 51
.word 14
.align 3
.LC8:
.word 70
.word 11
.word 33
.word 28
.word 77
.word 73
.word 17
.word 78
.word 39
.word 68
.word 17
.word 57
.align 3
.LC9:
.word 91
.word 71
.word 52
.word 38
.word 17
.word 14
.word 91
.word 43
.word 58
.word 50
.word 27
.word 29
.word 48
.align 3
.LC10:
.word 63
.word 66
.word 4
.word 68
.word 89
.word 53
.word 67
.word 30
.word 73
.word 16
.word 69
.word 87
.word 40
.word 31
.align 3
.LC11:
.word 4
.word 62
.word 98
.word 27
.word 23
.word 9
.word 70
.word 98
.word 73
.word 93
.word 38
.word 53
.word 60
.word 4
.word 23
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Choice equals 1"
.align 3
.LC1:
.string "Choice equals 2"
.align 3
.LC2:
.string "You chose something else"
.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, 2
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 1
beq .L2
ldr w0, [sp, 28]
cmp w0, 2
beq .L3
b .L7
.L2:
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
b .L5
.L3:
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
b .L5
.L7:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
.L5:
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 a
.bss
.align 2
.type a, %object
.size a, 4
a:
.zero 4
.global d
.align 2
.type d, %object
.size d, 4
d:
.zero 4
.text
.align 2
.global fn1
.type fn1, %function
fn1:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 8]
ldr w0, [sp, 8]
cmp w0, 0
bgt .L3
adrp x0, a
add x0, x0, :lo12:a
ldr w0, [x0]
cmp w0, 0
beq .L3
adrp x0, d
add x0, x0, :lo12:d
str wzr, [x0]
.L3:
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size fn1, .-fn1
.align 2
.global fn2
.type fn2, %function
fn2:
.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, d
add x0, x0, :lo12:d
str wzr, [x0]
mov w0, -10
str w0, [sp, 24]
ldr w0, [sp, 24]
bl fn1
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size fn2, .-fn2
.align 2
.global main
.type main, %function
main:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
bl fn2
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.data
.align 2
.type VersionS, %object
.size VersionS, 4
VersionS:
.word 1069799178
.section .rodata
.align 3
.LC0:
.string "$Revision: 1.13 $"
.section .data.rel.local,"aw"
.align 3
.type BuildS, %object
.size BuildS, 8
BuildS:
.xword .LC0
.local program
.comm program,8,8
.global alnmt
.bss
.align 3
.type alnmt, %object
.size alnmt, 8
alnmt:
.zero 8
.global lastin
.align 2
.type lastin, %object
.size lastin, 4
lastin:
.zero 4
.global topsize
.align 2
.type topsize, %object
.size topsize, 4
topsize:
.zero 4
.global top
.align 3
.type top, %object
.size top, 8
top:
.zero 8
.global mid
.align 3
.type mid, %object
.size mid, 8
mid:
.zero 8
.global bot
.align 3
.type bot, %object
.size bot, 8
bot:
.zero 8
.global alnum
.align 2
.type alnum, %object
.size alnum, 4
alnum:
.zero 4
.global kind
.align 3
.type kind, %object
.size kind, 8
kind:
.zero 8
.global qname
.align 3
.type qname, %object
.size qname, 2000
qname:
.zero 2000
.global work
.align 3
.type work, %object
.size work, 8
work:
.zero 8
.section .rodata
.align 3
.LC1:
.string "%s Version %1.02f (Build %s)\n"
.text
.align 2
.global version
.type version, %function
version:
.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
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, 36]
str wzr, [sp, 32]
b .L2
.L6:
adrp x0, BuildS
add x0, x0, :lo12:BuildS
ldr x1, [x0]
ldrsw x0, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
sub w0, w0, #48
cmp w0, 9
bls .L3
adrp x0, BuildS
add x0, x0, :lo12:BuildS
ldr x1, [x0]
ldrsw x0, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 46
bne .L4
.L3:
adrp x0, BuildS
add x0, x0, :lo12:BuildS
ldr x1, [x0]
ldrsw x0, [sp, 32]
add x1, x1, x0
ldr w0, [sp, 36]
add w2, w0, 1
str w2, [sp, 36]
ldrb w2, [x1]
sxtw x0, w0
add x1, sp, 40
strb w2, [x1, x0]
.L4:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldrsw x19, [sp, 32]
adrp x0, BuildS
add x0, x0, :lo12:BuildS
ldr x0, [x0]
bl strlen
cmp x19, x0
bcs .L5
ldr w0, [sp, 32]
cmp w0, 30
ble .L6
.L5:
ldrsw x0, [sp, 36]
add x1, sp, 40
strb wzr, [x1, x0]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x4, [x0]
adrp x0, program
add x0, x0, :lo12:program
ldr x1, [x0]
adrp x0, VersionS
add x0, x0, :lo12:VersionS
ldr s0, [x0]
fcvt d0, s0
add x0, sp, 40
mov x3, x0
mov x2, x1
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x4
bl fprintf
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 .L7
bl __stack_chk_fail
.L7:
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 version, .-version
.section .rodata
.align 3
.LC2:
.string "Usage: %s Output_of_GAP2/NAP [ Output_of_GAP2/NAP ]\n\n"
.align 3
.LC3:
.string "It takes any number of output files by GAP2 or NAP\n\n"
.align 3
.LC4:
.string "-help"
.align 3
.LC5:
.string "-h"
.align 3
.LC6:
.string "-version"
.align 3
.LC7:
.string "-V"
.align 3
.LC8:
.string "-depend"
.align 3
.LC9:
.string "-debug"
.align 3
.LC10:
.string "r"
.align 3
.LC11:
.string "ERROR: File: %s cannot be read or is empty. Ignoring this file.\n"
.align 3
.LC12:
.string "Accession: %s"
.align 3
.LC13:
.string "Alignment file No. %d is not in the correct format"
.align 3
.LC14:
.string "ERROR: Input file: %s is corrupt. Ignoring rest of file.\n"
.align 3
.LC15:
.string "Exon %d"
.align 3
.LC16:
.string " ~~~ %d bp removed ~~~"
.align 3
.LC17:
.string "%d"
.align 3
.LC18:
.string "Script%c"
.align 3
.LC19:
.string "No output produced"
.align 3
.LC20:
.string "Score: %d Identity: %d/%d (%d%%) Qstrand: %s Lstrand: %s"
.align 3
.LC21:
.string "plus"
.align 3
.LC22:
.string "Score: %d Identity: %d/%d (%d%%) Strand: %s"
.align 3
.LC23:
.string "Exon %d %d %d %s %d %d"
.align 3
.LC24:
.string "%s"
.align 3
.LC25:
.string "Plus (+) denotes forward strand, and minus (-) reverse strand."
.align 3
.LC26:
.string "Asterisks (*) denote bases not shown on pair wise alignments."
.text
.align 2
.global main
.type main, %function
main:
.LFB1:
.cfi_startproc
mov x12, 8176
sub sp, sp, x12
.cfi_def_cfa_offset 8176
stp x29, x30, [sp]
.cfi_offset 29, -8176
.cfi_offset 30, -8168
mov x29, sp
stp x19, x20, [sp, 16]
.cfi_offset 19, -8160
.cfi_offset 20, -8152
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, 8168]
mov x1, 0
str wzr, [sp, 108]
ldr x0, [sp, 32]
ldr x1, [x0]
adrp x0, program
add x0, x0, :lo12:program
str x1, [x0]
ldr w0, [sp, 44]
cmp w0, 1
bgt .L9
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 32]
ldr x0, [x0]
mov x2, x0
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x3
bl fprintf
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 32]
ldr x0, [x0]
mov x2, x0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.L9:
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC4
add x1, x0, :lo12:.LC4
mov x0, x2
bl strcmp
cmp w0, 0
beq .L10
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC5
add x1, x0, :lo12:.LC5
mov x0, x2
bl strcmp
cmp w0, 0
bne .L11
.L10:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 32]
ldr x0, [x0]
mov x2, x0
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x3
bl fprintf
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 32]
ldr x0, [x0]
mov x2, x0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.L11:
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC6
add x1, x0, :lo12:.LC6
mov x0, x2
bl strcmp
cmp w0, 0
beq .L12
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
mov x0, x2
bl strcmp
cmp w0, 0
bne .L13
.L12:
bl version
mov w0, 1
bl exit
.L13:
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x2
bl strcmp
cmp w0, 0
bne .L14
mov w0, 1
bl exit
.L14:
ldr x0, [sp, 32]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
mov x0, x2
bl strcmp
cmp w0, 0
bne .L15
mov w0, 1
bl exit
.L15:
ldrsw x0, [sp, 44]
lsl x0, x0, 3
bl ckalloc
str x0, [sp, 120]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
bl ckalloc
mov x1, x0
adrp x0, kind
add x0, x0, :lo12:kind
str x1, [x0]
str wzr, [sp, 100]
b .L16
.L17:
adrp x0, kind
add x0, x0, :lo12:kind
ldr x1, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 2
add x0, x1, x0
str wzr, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 3
ldr x1, [sp, 120]
add x19, x1, x0
mov x0, 2002
bl ckalloc
str x0, [x19]
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L16:
ldr w1, [sp, 100]
ldr w0, [sp, 44]
cmp w1, w0
blt .L17
adrp x0, alnum
add x0, x0, :lo12:alnum
str wzr, [x0]
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w1, [x0]
adrp x0, topsize
add x0, x0, :lo12:topsize
str w1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
bl ckalloc
str x0, [sp, 128]
mov w0, 1
str w0, [sp, 100]
b .L18
.L39:
ldrsw x0, [sp, 100]
lsl x0, x0, 2
ldr x1, [sp, 128]
add x0, x1, x0
str wzr, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x2, [x0]
adrp x0, .LC10
add x1, x0, :lo12:.LC10
mov x0, x2
bl ckopenCheck
cmp w0, 0
bne .L19
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
mov x2, x0
adrp x0, .LC11
add x1, x0, :lo12:.LC11
mov x0, x3
bl fprintf
ldrsw x0, [sp, 100]
lsl x0, x0, 2
ldr x1, [sp, 128]
add x0, x1, x0
str wzr, [x0]
b .L20
.L19:
ldrsw x0, [sp, 100]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x2, [x0]
adrp x0, .LC10
add x1, x0, :lo12:.LC10
mov x0, x2
bl ckopen
str x0, [sp, 136]
mov w19, 0
b .L21
.L24:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
beq .L86
add w19, w19, 1
.L21:
cmp w19, 6
ble .L24
b .L23
.L86:
nop
.L23:
ldr x0, [sp, 112]
cmp x0, 0
bne .L25
ldr x0, [sp, 136]
bl fclose
b .L20
.L25:
add x0, sp, 4096
add x0, x0, 64
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov x0, x3
bl __isoc99_sscanf
str w0, [sp, 80]
ldr w0, [sp, 80]
cmp w0, 0
bne .L26
ldr w1, [sp, 100]
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl fatalf
.L26:
str wzr, [sp, 92]
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
str w0, [sp, 108]
b .L27
.L38:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str wzr, [sp, 76]
b .L28
.L36:
add x0, sp, 4096
ldrb w0, [x0, 2064]
cmp w0, 10
beq .L29
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w1, [sp, 108]
str w1, [x0]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x0, [x0]
mov x2, x0
adrp x0, .LC14
add x1, x0, :lo12:.LC14
mov x0, x3
bl fprintf
b .L30
.L29:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
add x0, sp, 4096
add x0, x0, 64
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov x0, x3
bl __isoc99_sscanf
str w0, [sp, 80]
ldr w0, [sp, 80]
cmp w0, 0
bgt .L87
add x0, sp, 72
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC15
add x1, x0, :lo12:.LC15
mov x0, x3
bl __isoc99_sscanf
cmp w0, 0
bgt .L28
add x0, sp, 72
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC16
add x1, x0, :lo12:.LC16
mov x0, x3
bl __isoc99_sscanf
cmp w0, 0
ble .L34
b .L28
.L34:
add x0, sp, 76
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov x0, x3
bl __isoc99_sscanf
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
add x0, sp, 54
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x3
bl __isoc99_sscanf
cmp w0, 0
ble .L35
mov w0, 1
str w0, [sp, 92]
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
.L35:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
add x0, sp, 4096
add x0, x0, 2064
bl strlen
str w0, [sp, 84]
.L28:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L36
b .L32
.L87:
nop
.L32:
ldr w1, [sp, 76]
ldr w0, [sp, 84]
add w1, w1, w0
adrp x0, topsize
add x0, x0, :lo12:topsize
ldr w0, [x0]
add w1, w1, w0
adrp x0, topsize
add x0, x0, :lo12:topsize
str w1, [x0]
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
add w1, w0, 1
adrp x0, alnum
add x0, x0, :lo12:alnum
str w1, [x0]
.L27:
ldr w0, [sp, 80]
cmp w0, 0
ble .L37
ldr x0, [sp, 112]
cmp x0, 0
bne .L38
.L37:
adrp x0, kind
add x0, x0, :lo12:kind
ldr x1, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 2
sub x0, x0, #4
add x0, x1, x0
ldr w1, [sp, 92]
str w1, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 2
ldr x1, [sp, 128]
add x0, x1, x0
mov w1, 1
str w1, [x0]
.L30:
ldr x0, [sp, 136]
bl fclose
.L20:
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L18:
ldr w1, [sp, 100]
ldr w0, [sp, 44]
cmp w1, w0
blt .L39
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
cmp w0, 0
bne .L40
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl puts
mov w0, 0
bl exit
.L40:
adrp x0, topsize
add x0, x0, :lo12:topsize
ldr w0, [x0]
add w0, w0, 1
sxtw x0, w0
bl ckalloc
mov x1, x0
adrp x0, top
add x0, x0, :lo12:top
str x1, [x0]
adrp x0, topsize
add x0, x0, :lo12:topsize
ldr w0, [x0]
add w0, w0, 1
sxtw x0, w0
bl ckalloc
mov x1, x0
adrp x0, mid
add x0, x0, :lo12:mid
str x1, [x0]
adrp x0, topsize
add x0, x0, :lo12:topsize
ldr w0, [x0]
add w0, w0, 1
sxtw x0, w0
bl ckalloc
mov x1, x0
adrp x0, bot
add x0, x0, :lo12:bot
str x1, [x0]
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
add w0, w0, 1
sxtw x0, w0
lsl x0, x0, 3
bl ckalloc
mov x1, x0
adrp x0, alnmt
add x0, x0, :lo12:alnmt
str x1, [x0]
str wzr, [sp, 88]
ldr w0, [sp, 88]
str w0, [sp, 96]
mov w0, 1
str w0, [sp, 100]
b .L41
.L81:
ldrsw x0, [sp, 100]
lsl x0, x0, 2
ldr x1, [sp, 128]
add x0, x1, x0
ldr w0, [x0]
cmp w0, 0
beq .L88
ldrsw x0, [sp, 100]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x2, [x0]
adrp x0, .LC10
add x1, x0, :lo12:.LC10
mov x0, x2
bl ckopen
str x0, [sp, 136]
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L44
ldr x0, [sp, 136]
bl fclose
b .L43
.L44:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L45
ldr x0, [sp, 136]
bl fclose
b .L43
.L45:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L46
ldr x0, [sp, 136]
bl fclose
b .L43
.L46:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L47
ldr x0, [sp, 136]
bl fclose
b .L43
.L47:
add x0, sp, 4096
add x0, x0, 2064
mov x1, x0
adrp x0, qname
add x0, x0, :lo12:qname
bl strcpy
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L48
ldrsw x0, [sp, 100]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 120]
add x0, x1, x0
ldr x0, [x0]
strb wzr, [x0]
ldr x0, [sp, 136]
bl fclose
b .L43
.L48:
ldrsw x0, [sp, 100]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 120]
add x0, x1, x0
ldr x0, [x0]
add x1, sp, 4096
add x1, x1, 2064
bl strcpy
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L49
ldr x0, [sp, 136]
bl fclose
b .L43
.L49:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L50
ldr x0, [sp, 136]
bl fclose
b .L43
.L50:
add x0, sp, 4096
add x0, x0, 64
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov x0, x3
bl __isoc99_sscanf
str w0, [sp, 80]
ldr w0, [sp, 80]
cmp w0, 0
bne .L52
ldr w1, [sp, 100]
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl fatalf
b .L52
.L80:
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 96]
lsl x0, x0, 3
add x19, x1, x0
mov w0, 2072
bl ckalloc
str x0, [x19]
ldr x0, [x19]
str x0, [sp, 144]
ldr x2, [sp, 144]
add x0, sp, 4096
add x0, x0, 2064
add x0, x0, 11
mov x1, x0
mov x0, x2
bl strcpy
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
adrp x0, kind
add x0, x0, :lo12:kind
ldr x1, [x0]
ldrsw x0, [sp, 100]
lsl x0, x0, 2
sub x0, x0, #4
add x0, x1, x0
ldr w0, [x0]
cmp w0, 0
bne .L53
add x5, sp, 2160
add x4, sp, 160
add x3, sp, 68
add x2, sp, 64
add x1, sp, 60
add x0, sp, 56
add x8, sp, 4096
add x8, x8, 2064
mov x7, x5
mov x6, x4
mov x5, x3
mov x4, x2
mov x3, x1
mov x2, x0
adrp x0, .LC20
add x1, x0, :lo12:.LC20
mov x0, x8
bl __isoc99_sscanf
add x2, sp, 2160
adrp x0, .LC21
add x1, x0, :lo12:.LC21
mov x0, x2
bl strcmp
cmp w0, 0
cset w0, eq
and w0, w0, 255
mov w1, w0
ldr x0, [sp, 144]
str w1, [x0, 2016]
ldr x0, [sp, 144]
mov w1, 1
str w1, [x0, 2048]
b .L54
.L53:
add x4, sp, 160
add x3, sp, 68
add x2, sp, 64
add x1, sp, 60
add x0, sp, 56
add x7, sp, 4096
add x7, x7, 2064
mov x6, x4
mov x5, x3
mov x4, x2
mov x3, x1
mov x2, x0
adrp x0, .LC22
add x1, x0, :lo12:.LC22
mov x0, x7
bl __isoc99_sscanf
ldr x0, [sp, 144]
str wzr, [x0, 2048]
ldr x0, [sp, 144]
mov w1, 1
str w1, [x0, 2016]
.L54:
ldr w1, [sp, 56]
ldr x0, [sp, 144]
str w1, [x0, 2000]
ldr w1, [sp, 60]
ldr x0, [sp, 144]
str w1, [x0, 2004]
ldr w1, [sp, 64]
ldr x0, [sp, 144]
str w1, [x0, 2008]
add x2, sp, 160
adrp x0, .LC21
add x1, x0, :lo12:.LC21
mov x0, x2
bl strcmp
cmp w0, 0
cset w0, eq
and w0, w0, 255
mov w1, w0
ldr x0, [sp, 144]
str w1, [x0, 2012]
ldr x0, [sp, 144]
ldr w1, [sp, 88]
str w1, [x0, 2020]
ldr x0, [sp, 144]
mov w1, 1
str w1, [x0, 2044]
ldr x0, [sp, 144]
str xzr, [x0, 2064]
ldr x0, [sp, 144]
ldr x1, [x0, 2064]
ldr x0, [sp, 144]
str x1, [x0, 2056]
mov w0, -1
str w0, [sp, 104]
str wzr, [sp, 76]
b .L55
.L78:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
add x0, sp, 4096
add x0, x0, 64
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov x0, x3
bl __isoc99_sscanf
str w0, [sp, 80]
ldr w0, [sp, 80]
cmp w0, 0
bgt .L89
add x0, sp, 72
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC15
add x1, x0, :lo12:.LC15
mov x0, x3
bl __isoc99_sscanf
cmp w0, 0
ble .L58
mov w0, 24
bl ckalloc
str x0, [sp, 152]
ldr x1, [sp, 152]
ldr x0, [sp, 152]
add x2, x0, 4
ldr x0, [sp, 152]
add x4, x0, 8
ldr x0, [sp, 152]
add x5, x0, 12
add x3, sp, 4096
add x3, x3, 64
add x0, sp, 72
add x8, sp, 4096
add x8, x8, 2064
mov x7, x5
mov x6, x4
mov x5, x3
mov x4, x2
mov x3, x1
mov x2, x0
adrp x0, .LC23
add x1, x0, :lo12:.LC23
mov x0, x8
bl __isoc99_sscanf
ldr x0, [sp, 144]
ldr x0, [x0, 2064]
cmp x0, 0
bne .L59
ldr x0, [sp, 144]
ldr x1, [sp, 152]
str x1, [x0, 2064]
ldr x0, [sp, 144]
ldr x1, [x0, 2064]
ldr x0, [sp, 144]
str x1, [x0, 2056]
ldr x0, [sp, 152]
str xzr, [x0, 16]
b .L55
.L59:
ldr x0, [sp, 144]
ldr x0, [x0, 2064]
ldr x1, [sp, 152]
str x1, [x0, 16]
ldr x0, [sp, 144]
ldr x1, [sp, 152]
str x1, [x0, 2064]
ldr x0, [sp, 152]
str xzr, [x0, 16]
b .L55
.L58:
add x0, sp, 72
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC16
add x1, x0, :lo12:.LC16
mov x0, x3
bl __isoc99_sscanf
cmp w0, 0
ble .L61
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [x0]
ldrsw x0, [sp, 88]
sub x0, x0, #1
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 32
beq .L62
mov w0, 42
strb w0, [sp, 54]
mov w0, 32
strb w0, [sp, 55]
b .L63
.L62:
mov w0, 32
strb w0, [sp, 54]
mov w0, 42
strb w0, [sp, 55]
.L63:
ldr w19, [sp, 88]
mov w20, 0
b .L64
.L68:
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [x0]
sxtw x0, w19
add x0, x1, x0
ldrb w1, [sp, 54]
strb w1, [x0]
adrp x0, mid
add x0, x0, :lo12:mid
ldr x1, [x0]
sxtw x0, w19
add x0, x1, x0
mov w1, 45
strb w1, [x0]
ldr w0, [sp, 92]
cmp w0, 0
beq .L65
ldrb w0, [sp, 55]
cmp w0, 42
bne .L65
mov w0, 21846
movk w0, 0x5555, lsl 16
smull x0, w20, w0
lsr x1, x0, 32
asr w0, w20, 31
sub w1, w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sub w1, w20, w0
cmp w1, 0
bne .L66
.L65:
ldrb w0, [sp, 55]
b .L67
.L66:
mov w0, 32
.L67:
adrp x1, bot
add x1, x1, :lo12:bot
ldr x2, [x1]
mov w1, w19
add w19, w1, 1
sxtw x1, w1
add x1, x2, x1
strb w0, [x1]
add w20, w20, 1
.L64:
ldr w0, [sp, 72]
cmp w20, w0
blt .L68
ldr w0, [sp, 72]
ldr w1, [sp, 88]
add w0, w1, w0
str w0, [sp, 88]
b .L55
.L61:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
add x0, sp, 54
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov x0, x3
bl __isoc99_sscanf
cmp w0, 0
ble .L69
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
.L69:
add x0, sp, 72
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov x0, x3
bl __isoc99_sscanf
ldr w0, [sp, 104]
cmp w0, 0
bge .L70
ldr w1, [sp, 72]
ldr x0, [sp, 144]
str w1, [x0, 2028]
.L70:
ldr w19, [sp, 88]
mov w20, 8
b .L71
.L72:
mov w2, w20
add w20, w2, 1
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [x0]
mov w0, w19
add w19, w0, 1
sxtw x0, w0
add x0, x1, x0
sxtw x1, w2
add x2, sp, 4096
add x2, x2, 2064
ldrb w1, [x2, x1]
strb w1, [x0]
.L71:
sxtw x0, w20
add x1, sp, 4096
add x1, x1, 2064
ldrb w0, [x1, x0]
cmp w0, 10
bne .L72
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
ldr w19, [sp, 88]
mov w20, 8
b .L73
.L74:
mov w2, w20
add w20, w2, 1
adrp x0, mid
add x0, x0, :lo12:mid
ldr x1, [x0]
mov w0, w19
add w19, w0, 1
sxtw x0, w0
add x0, x1, x0
sxtw x1, w2
add x2, sp, 4096
add x2, x2, 2064
ldrb w1, [x2, x1]
strb w1, [x0]
.L73:
sxtw x0, w20
add x1, sp, 4096
add x1, x1, 2064
ldrb w0, [x1, x0]
cmp w0, 10
bne .L74
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
add x0, sp, 72
add x3, sp, 4096
add x3, x3, 2064
mov x2, x0
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov x0, x3
bl __isoc99_sscanf
ldr w0, [sp, 104]
cmp w0, 0
bge .L75
ldr w1, [sp, 72]
ldr x0, [sp, 144]
str w1, [x0, 2036]
mov w0, 1
str w0, [sp, 104]
.L75:
ldr w19, [sp, 88]
mov w20, 8
b .L76
.L77:
mov w2, w20
add w20, w2, 1
adrp x0, bot
add x0, x0, :lo12:bot
ldr x1, [x0]
mov w0, w19
add w19, w0, 1
sxtw x0, w0
add x0, x1, x0
sxtw x1, w2
add x2, sp, 4096
add x2, x2, 2064
ldrb w1, [x2, x1]
strb w1, [x0]
.L76:
sxtw x0, w20
add x1, sp, 4096
add x1, x1, 2064
ldrb w0, [x1, x0]
cmp w0, 10
bne .L77
str w19, [sp, 88]
.L55:
add x0, sp, 4096
add x0, x0, 2064
ldr x2, [sp, 136]
mov w1, 2000
bl fgets
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L78
b .L57
.L89:
nop
.L57:
ldr w0, [sp, 88]
sub w1, w0, #1
ldr x0, [sp, 144]
str w1, [x0, 2024]
ldr w0, [sp, 96]
add w0, w0, 1
str w0, [sp, 96]
.L52:
ldr w0, [sp, 80]
cmp w0, 0
ble .L79
ldr x0, [sp, 112]
cmp x0, 0
bne .L80
.L79:
ldr x0, [sp, 136]
bl fclose
b .L43
.L88:
nop
.L43:
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L41:
ldr w1, [sp, 100]
ldr w0, [sp, 44]
cmp w1, w0
blt .L81
adrp x0, qname
add x1, x0, :lo12:qname
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl printf
mov w0, 1
str w0, [sp, 100]
b .L82
.L84:
ldrsw x0, [sp, 100]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 120]
add x0, x1, x0
ldr x0, [x0]
ldrb w0, [x0]
cmp w0, 0
beq .L83
ldrsw x0, [sp, 100]
lsl x0, x0, 3
sub x0, x0, #8
ldr x1, [sp, 120]
add x0, x1, x0
ldr x0, [x0]
mov x1, x0
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl printf
.L83:
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L82:
ldr w1, [sp, 100]
ldr w0, [sp, 44]
cmp w1, w0
blt .L84
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl puts
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl puts
bl Sort
bl Show
mov w0, 0
bl exit
.cfi_endproc
.LFE1:
.size main, .-main
.align 2
.global Sort
.type Sort, %function
Sort:
.LFB2:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str wzr, [sp, 4]
b .L91
.L100:
mov w0, 1
str w0, [sp]
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
sub w0, w0, #1
str w0, [sp, 8]
b .L92
.L97:
str wzr, [sp, 12]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2012]
str w0, [sp, 16]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2012]
str w0, [sp, 20]
ldr w1, [sp, 16]
ldr w0, [sp, 20]
cmp w1, w0
bne .L93
ldr w0, [sp, 16]
cmp w0, 1
bne .L94
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
ldr x0, [x0]
ldr w1, [x0, 2028]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x2, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
add x0, x2, x0
ldr x0, [x0]
ldr w0, [x0, 2028]
cmp w1, w0
ble .L95
mov w0, 1
str w0, [sp, 12]
b .L95
.L94:
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
ldr x0, [x0]
ldr w1, [x0, 2028]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x2, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
add x0, x2, x0
ldr x0, [x0]
ldr w0, [x0, 2028]
cmp w1, w0
bge .L95
mov w0, 1
str w0, [sp, 12]
b .L95
.L93:
ldr w0, [sp, 16]
cmp w0, 0
bne .L95
ldr w0, [sp, 20]
cmp w0, 1
bne .L95
mov w0, 1
str w0, [sp, 12]
.L95:
ldr w0, [sp, 12]
cmp w0, 0
beq .L96
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 24]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
sub x0, x0, #8
add x1, x1, x0
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x2, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x1]
str x1, [x0]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
ldr x1, [sp, 24]
str x1, [x0]
str wzr, [sp]
.L96:
ldr w0, [sp, 8]
sub w0, w0, #1
str w0, [sp, 8]
.L92:
ldr w1, [sp, 8]
ldr w0, [sp, 4]
cmp w1, w0
bgt .L97
ldr w0, [sp]
cmp w0, 0
bne .L101
ldr w0, [sp, 4]
add w0, w0, 1
str w0, [sp, 4]
.L91:
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
sub w0, w0, #1
ldr w1, [sp, 4]
cmp w1, w0
blt .L100
b .L99
.L101:
nop
.L99:
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size Sort, .-Sort
.section .rodata
.align 3
.LC27:
.string "Query"
.align 3
.LC28:
.string "\n Alignment %d\n"
.align 3
.LC29:
.string "\n ~~ %d bp removed ~~~\n"
.align 3
.LC30:
.string "\n "
.align 3
.LC31:
.string " . :"
.align 3
.LC32:
.string "%-11s %7d %s\n"
.align 3
.LC33:
.string " %s\n"
.align 3
.LC34:
.string "%-21s %7d %s\n"
.align 3
.LC35:
.string "%-21s Exon %10d %10d Confidence: %3d %3d\n"
.text
.align 2
.global Show
.type Show, %function
Show:
.LFB3:
.cfi_startproc
stp x29, x30, [sp, -240]!
.cfi_def_cfa_offset 240
.cfi_offset 29, -240
.cfi_offset 30, -232
mov x29, sp
stp x19, x20, [sp, 16]
str x21, [sp, 32]
.cfi_offset 19, -224
.cfi_offset 20, -216
.cfi_offset 21, -208
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 232]
mov x1, 0
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 3
bl ckalloc
mov x1, x0
adrp x0, work
add x0, x0, :lo12:work
str x1, [x0]
str wzr, [sp, 104]
ldr w0, [sp, 104]
str w0, [sp, 72]
ldr w0, [sp, 72]
str w0, [sp, 68]
ldr w0, [sp, 68]
str w0, [sp, 64]
mov w21, 0
b .L103
.L169:
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w21
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2044]
cmp w0, 0
beq .L104
strh wzr, [sp, 62]
adrp x0, lastin
add x0, x0, :lo12:lastin
mov w1, -1
str w1, [x0]
add x1, sp, 64
add x0, sp, 68
ldr w3, [sp, 72]
mov w2, w21
bl Enter
mov w0, 1
str w0, [sp, 88]
str wzr, [sp, 96]
add x0, sp, 168
str x0, [sp, 120]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w21
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2028]
str w0, [sp, 84]
ldr w0, [sp, 84]
str w0, [sp, 80]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w21
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2012]
str w0, [sp, 116]
add x3, sp, 144
adrp x0, .LC27
add x2, x0, :lo12:.LC27
adrp x0, .LC24
add x1, x0, :lo12:.LC24
mov x0, x3
bl sprintf
ldr w0, [sp, 116]
cmp w0, 0
beq .L105
mov w0, 43
b .L106
.L105:
mov w0, 45
.L106:
mov w19, 5
sxtw x1, w19
add x2, sp, 144
strb w0, [x2, x1]
add w19, w19, 1
sxtw x0, w19
add x1, sp, 144
strb wzr, [x1, x0]
ldr w0, [sp, 104]
add w0, w0, 1
str w0, [sp, 104]
ldr w1, [sp, 104]
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl printf
mov w0, 1
str w0, [sp, 108]
str wzr, [sp, 112]
b .L107
.L164:
ldr w0, [sp, 88]
cmp w0, 0
beq .L108
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
ldr w0, [sp, 64]
sxtw x0, w0
lsl x0, x0, 3
sub x0, x0, #8
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 128]
ldr x0, [sp, 128]
ldr w0, [x0, 144]
add w19, w0, 1
b .L109
.L116:
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2044]
cmp w0, 0
beq .L110
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2012]
ldr w1, [sp, 116]
cmp w1, w0
bne .L171
ldr w0, [sp, 116]
cmp w0, 0
beq .L112
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2028]
ldr w1, [sp, 84]
cmp w1, w0
blt .L172
add x1, sp, 64
add x0, sp, 68
ldr w3, [sp, 72]
mov w2, w19
bl Enter
b .L110
.L112:
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w0, [x0, 2028]
ldr w1, [sp, 84]
cmp w1, w0
bgt .L173
add x1, sp, 64
add x0, sp, 68
ldr w3, [sp, 72]
mov w2, w19
bl Enter
.L110:
add w19, w19, 1
.L109:
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
cmp w19, w0
blt .L116
b .L114
.L171:
nop
b .L114
.L172:
nop
b .L114
.L173:
nop
.L114:
str wzr, [sp, 88]
.L108:
mov w0, 1
str w0, [sp, 92]
b .L117
.L121:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
ldrsw x0, [sp, 96]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 128]
ldr x0, [sp, 128]
ldrsh w0, [x0, 190]
cmp w0, 0
bne .L174
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [x0]
ldr x0, [sp, 128]
ldr w0, [x0, 148]
sxtw x0, w0
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 32
bne .L119
str wzr, [sp, 92]
b .L120
.L174:
nop
.L119:
ldr w0, [sp, 96]
add w0, w0, 1
str w0, [sp, 96]
.L117:
ldr w0, [sp, 64]
ldr w1, [sp, 96]
cmp w1, w0
blt .L121
.L120:
str wzr, [sp, 100]
ldr w0, [sp, 92]
cmp w0, 0
beq .L122
mov w0, 42
strb w0, [sp, 60]
mov w19, 0
b .L123
.L130:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 128]
ldr x0, [sp, 128]
ldrsh w0, [x0, 190]
cmp w0, 0
beq .L124
ldr x0, [sp, 128]
ldr x0, [x0, 128]
add x2, x0, 1
ldr x1, [sp, 128]
str x2, [x1, 128]
mov w1, 32
strb w1, [x0]
ldr x0, [sp, 128]
ldr x0, [x0, 136]
add x2, x0, 1
ldr x1, [sp, 128]
str x2, [x1, 136]
mov w1, 32
strb w1, [x0]
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
b .L125
.L124:
adrp x0, bot
add x0, x0, :lo12:bot
ldr x1, [x0]
ldr x0, [sp, 128]
ldr w0, [x0, 148]
sxtw x0, w0
add x1, x1, x0
ldr x0, [sp, 128]
ldr x0, [x0, 128]
add x3, x0, 1
ldr x2, [sp, 128]
str x3, [x2, 128]
ldrb w1, [x1]
strb w1, [x0]
ldrb w0, [x0]
cmp w0, 32
beq .L126
ldr x0, [sp, 128]
ldr w1, [x0, 160]
ldr x0, [sp, 128]
ldr w0, [x0, 164]
cmp w0, 0
beq .L127
mov w0, 1
b .L128
.L127:
mov w0, -1
.L128:
add w1, w0, w1
ldr x0, [sp, 128]
str w1, [x0, 160]
.L126:
adrp x0, mid
add x0, x0, :lo12:mid
ldr x1, [x0]
ldr x0, [sp, 128]
ldr w0, [x0, 148]
sxtw x0, w0
add x1, x1, x0
ldr x0, [sp, 128]
ldr x0, [x0, 136]
add x3, x0, 1
ldr x2, [sp, 128]
str x3, [x2, 136]
ldrb w1, [x1]
strb w1, [x0]
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [x0]
ldr x0, [sp, 128]
ldr w0, [x0, 148]
add w3, w0, 1
ldr x2, [sp, 128]
str w3, [x2, 148]
sxtw x0, w0
add x0, x1, x0
ldrb w0, [x0]
strb w0, [sp, 61]
ldrb w0, [sp, 61]
cmp w0, 42
beq .L129
ldrb w0, [sp, 61]
strb w0, [sp, 60]
.L129:
ldr x0, [sp, 128]
ldr w1, [x0, 148]
ldr x0, [sp, 128]
ldr w0, [x0, 152]
cmp w1, w0
ble .L125
ldr x0, [sp, 128]
mov w1, 1
strh w1, [x0, 190]
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L125:
add w19, w19, 1
.L123:
ldr w0, [sp, 64]
cmp w19, w0
blt .L130
str wzr, [sp, 96]
ldr w0, [sp, 116]
cmp w0, 0
beq .L131
mov w0, 1
b .L132
.L131:
mov w0, -1
.L132:
ldr w1, [sp, 84]
add w0, w1, w0
str w0, [sp, 84]
ldr x0, [sp, 120]
add x1, x0, 1
str x1, [sp, 120]
ldrb w1, [sp, 60]
strb w1, [x0]
mov w0, 1
str w0, [sp, 88]
ldrb w0, [sp, 60]
cmp w0, 42
beq .L133
str wzr, [sp, 108]
b .L133
.L122:
mov w19, 0
b .L134
.L140:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 128]
adrp x0, top
add x0, x0, :lo12:top
ldr x1, [x0]
ldr x0, [sp, 128]
ldr w0, [x0, 148]
sxtw x0, w0
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 32
bne .L135
adrp x0, bot
add x0, x0, :lo12:bot
ldr x1, [x0]
ldr x0, [sp, 128]
ldr w0, [x0, 148]
sxtw x0, w0
add x0, x1, x0
ldrb w0, [x0]
strb w0, [sp, 61]
ldr x0, [sp, 128]
ldr x0, [x0, 128]
add x2, x0, 1
ldr x1, [sp, 128]
str x2, [x1, 128]
ldrb w1, [sp, 61]
strb w1, [x0]
ldrb w0, [x0]
cmp w0, 32
beq .L136
ldr x0, [sp, 128]
ldr w1, [x0, 160]
ldr x0, [sp, 128]
ldr w0, [x0, 164]
cmp w0, 0
beq .L137
mov w0, 1
b .L138
.L137:
mov w0, -1
.L138:
add w1, w0, w1
ldr x0, [sp, 128]
str w1, [x0, 160]
ldrb w0, [sp, 61]
cmp w0, 42
beq .L136
str wzr, [sp, 108]
.L136:
adrp x0, mid
add x0, x0, :lo12:mid
ldr x1, [x0]
ldr x0, [sp, 128]
ldr w0, [x0, 148]
add w3, w0, 1
ldr x2, [sp, 128]
str w3, [x2, 148]
sxtw x0, w0
add x1, x1, x0
ldr x0, [sp, 128]
ldr x0, [x0, 136]
add x3, x0, 1
ldr x2, [sp, 128]
str x3, [x2, 136]
ldrb w1, [x1]
strb w1, [x0]
ldr x0, [sp, 128]
ldr w1, [x0, 148]
ldr x0, [sp, 128]
ldr w0, [x0, 152]
cmp w1, w0
ble .L139
ldr x0, [sp, 128]
mov w1, 1
strh w1, [x0, 190]
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
b .L139
.L135:
ldr x0, [sp, 128]
ldr x0, [x0, 128]
add x2, x0, 1
ldr x1, [sp, 128]
str x2, [x1, 128]
mov w1, 32
strb w1, [x0]
ldr x0, [sp, 128]
ldr x0, [x0, 136]
add x2, x0, 1
ldr x1, [sp, 128]
str x2, [x1, 136]
mov w1, 32
strb w1, [x0]
ldr x0, [sp, 128]
ldrsh w0, [x0, 190]
cmp w0, 0
beq .L139
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L139:
add w19, w19, 1
.L134:
ldr w0, [sp, 64]
cmp w19, w0
blt .L140
ldr x0, [sp, 120]
add x1, x0, 1
str x1, [sp, 120]
mov w1, 32
strb w1, [x0]
.L133:
ldr w0, [sp, 64]
ldr w1, [sp, 100]
cmp w1, w0
bne .L141
mov w0, 1
strh w0, [sp, 62]
.L141:
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
ldr w0, [sp, 72]
cmp w0, 60
beq .L142
ldrsh w0, [sp, 62]
cmp w0, 0
beq .L107
.L142:
str wzr, [sp, 72]
ldr w0, [sp, 108]
cmp w0, 0
bne .L143
ldr w0, [sp, 112]
cmp w0, 0
ble .L144
ldr w1, [sp, 112]
adrp x0, .LC29
add x0, x0, :lo12:.LC29
bl printf
str wzr, [sp, 112]
.L144:
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl printf
mov w19, 0
b .L145
.L146:
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl printf
add w19, w19, 10
.L145:
cmp w19, 59
ble .L146
mov w0, 10
bl putchar
ldr x0, [sp, 120]
strb wzr, [x0]
add x1, sp, 168
add x0, sp, 144
mov x3, x1
ldr w2, [sp, 80]
mov x1, x0
adrp x0, .LC32
add x0, x0, :lo12:.LC32
bl printf
b .L147
.L143:
ldr w0, [sp, 112]
add w0, w0, 60
str w0, [sp, 112]
.L147:
ldr w0, [sp, 84]
str w0, [sp, 80]
add x0, sp, 168
str x0, [sp, 120]
mov w19, 0
b .L148
.L150:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 128]
ldr x0, [sp, 128]
ldr x0, [x0, 128]
strb wzr, [x0]
ldr x0, [sp, 128]
ldr x0, [x0, 136]
strb wzr, [x0]
ldr w0, [sp, 108]
cmp w0, 0
bne .L149
ldr x0, [sp, 128]
add x0, x0, 61
mov x1, x0
adrp x0, .LC33
add x0, x0, :lo12:.LC33
bl printf
ldr x0, [sp, 128]
add x1, x0, 168
ldr x0, [sp, 128]
ldr w0, [x0, 156]
ldr x2, [sp, 128]
mov x3, x2
mov w2, w0
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl printf
.L149:
ldr x1, [sp, 128]
ldr x0, [sp, 128]
str x1, [x0, 128]
ldr x0, [sp, 128]
add x1, x0, 61
ldr x0, [sp, 128]
str x1, [x0, 136]
ldr x0, [sp, 128]
ldr w1, [x0, 160]
ldr x0, [sp, 128]
str w1, [x0, 156]
add w19, w19, 1
.L148:
ldr w0, [sp, 64]
cmp w19, w0
blt .L150
ldr w0, [sp, 108]
cmp w0, 0
bne .L151
mov w19, 0
b .L152
.L156:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 128]
ldr x0, [sp, 128]
ldr x0, [x0, 192]
str x0, [sp, 136]
ldr x0, [sp, 136]
cmp x0, 0
beq .L153
ldr w0, [sp, 116]
cmp w0, 0
beq .L154
ldr x0, [sp, 136]
ldr w0, [x0, 4]
ldr w1, [sp, 84]
cmp w1, w0
bgt .L155
.L154:
ldr w0, [sp, 116]
cmp w0, 0
bne .L153
ldr x0, [sp, 136]
ldr w0, [x0, 4]
ldr w1, [sp, 84]
cmp w1, w0
bge .L153
.L155:
ldr x0, [sp, 128]
add x1, x0, 168
ldr x0, [sp, 136]
ldr w2, [x0]
ldr x0, [sp, 136]
ldr w3, [x0, 4]
ldr x0, [sp, 136]
ldr w4, [x0, 8]
ldr x0, [sp, 136]
ldr w0, [x0, 12]
mov w5, w0
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl printf
ldr x0, [sp, 136]
ldr x1, [x0, 16]
ldr x0, [sp, 128]
str x1, [x0, 192]
ldr x0, [sp, 136]
bl free
.L153:
add w19, w19, 1
.L152:
ldr w0, [sp, 64]
cmp w19, w0
blt .L156
.L151:
ldrsh w0, [sp, 62]
cmp w0, 0
bne .L157
ldr w0, [sp, 64]
sub w19, w0, #1
mov w20, w19
b .L158
.L162:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldrsh w0, [x0, 190]
cmp w0, 0
beq .L159
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
sxtw x0, w19
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 128]
str w19, [sp, 76]
b .L160
.L161:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
ldrsw x0, [sp, 76]
add x0, x0, 1
lsl x0, x0, 3
add x1, x1, x0
adrp x0, work
add x0, x0, :lo12:work
ldr x2, [x0]
ldrsw x0, [sp, 76]
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x1]
str x1, [x0]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L160:
ldr w0, [sp, 76]
cmp w0, w20
blt .L161
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
mov w0, w20
sub w20, w0, #1
sxtw x0, w0
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [sp, 128]
str x1, [x0]
.L159:
sub w19, w19, #1
.L158:
cmp w19, 0
bge .L162
add w0, w20, 1
str w0, [sp, 64]
b .L163
.L157:
str wzr, [sp, 64]
.L163:
mov w0, 1
str w0, [sp, 108]
.L107:
ldrsh w0, [sp, 62]
cmp w0, 0
beq .L164
mov w20, -1
adrp x0, lastin
add x0, x0, :lo12:lastin
ldr w19, [x0]
b .L165
.L166:
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
str w19, [sp, 76]
ldrsw x0, [sp, 76]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w19, [x0, 2052]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 76]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str w20, [x0, 2052]
ldr w20, [sp, 76]
.L165:
cmn w19, #1
bne .L166
mov w0, 10
bl putchar
b .L167
.L168:
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w20
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
bl puts
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
sxtw x0, w20
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
ldr w20, [x0, 2052]
.L167:
cmn w20, #1
bne .L168
.L104:
add w21, w21, 1
.L103:
adrp x0, alnum
add x0, x0, :lo12:alnum
ldr w0, [x0]
cmp w21, w0
blt .L169
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 232]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L170
bl __stack_chk_fail
.L170:
mov w0, w1
ldp x19, x20, [sp, 16]
ldr x21, [sp, 32]
ldp x29, x30, [sp], 240
.cfi_restore 30
.cfi_restore 29
.cfi_restore 21
.cfi_restore 19
.cfi_restore 20
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size Show, .-Show
.align 2
.global Enter
.type Enter, %function
Enter:
.LFB4:
.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 w2, [sp, 44]
str w3, [sp, 40]
ldr x0, [sp, 56]
ldr w1, [x0]
ldr x0, [sp, 48]
ldr w0, [x0]
cmp w1, w0
bgt .L176
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
ldr x0, [sp, 56]
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 3
add x19, x1, x0
mov w0, 208
bl ckalloc
str x0, [x19]
ldr x0, [sp, 56]
ldr w0, [x0]
add w1, w0, 1
ldr x0, [sp, 56]
str w1, [x0]
.L176:
adrp x0, work
add x0, x0, :lo12:work
ldr x1, [x0]
ldr x0, [sp, 48]
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 80]
ldr x0, [sp, 48]
ldr w0, [x0]
add w1, w0, 1
ldr x0, [sp, 48]
str w1, [x0]
ldr x1, [sp, 80]
ldr x0, [sp, 80]
str x1, [x0, 128]
ldr x0, [sp, 80]
add x1, x0, 61
ldr x0, [sp, 80]
str x1, [x0, 136]
str wzr, [sp, 76]
b .L177
.L178:
ldr x0, [sp, 80]
ldr x0, [x0, 136]
add x2, x0, 1
ldr x1, [sp, 80]
str x2, [x1, 136]
mov w1, 32
strb w1, [x0]
ldr x1, [sp, 80]
ldr x1, [x1, 128]
add x3, x1, 1
ldr x2, [sp, 80]
str x3, [x2, 128]
ldrb w0, [x0]
strb w0, [x1]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L177:
ldr w1, [sp, 76]
ldr w0, [sp, 40]
cmp w1, w0
blt .L178
ldr x0, [sp, 80]
ldr w1, [sp, 44]
str w1, [x0, 144]
adrp x0, alnmt
add x0, x0, :lo12:alnmt
ldr x1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 88]
ldr x0, [sp, 88]
str wzr, [x0, 2044]
adrp x0, lastin
add x0, x0, :lo12:lastin
ldr w1, [x0]
ldr x0, [sp, 88]
str w1, [x0, 2052]
adrp x0, lastin
add x0, x0, :lo12:lastin
ldr w1, [sp, 44]
str w1, [x0]
ldr x0, [sp, 88]
ldr w1, [x0, 2020]
ldr x0, [sp, 80]
str w1, [x0, 148]
ldr x0, [sp, 88]
ldr w1, [x0, 2024]
ldr x0, [sp, 80]
str w1, [x0, 152]
ldr x0, [sp, 88]
ldr w1, [x0, 2036]
ldr x0, [sp, 80]
str w1, [x0, 156]
ldr x0, [sp, 80]
ldr w1, [x0, 156]
ldr x0, [sp, 80]
str w1, [x0, 160]
ldr x0, [sp, 88]
ldr w1, [x0, 2016]
ldr x0, [sp, 80]
str w1, [x0, 164]
str wzr, [sp, 76]
b .L179
.L181:
ldr x1, [sp, 80]
ldrsw x0, [sp, 76]
add x0, x1, x0
ldrb w1, [sp, 75]
strb w1, [x0, 168]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L179:
ldr x1, [sp, 88]
ldrsw x0, [sp, 76]
ldrb w0, [x1, x0]
strb w0, [sp, 75]
ldrb w0, [sp, 75]
cmp w0, 10
beq .L180
ldr w0, [sp, 76]
cmp w0, 19
ble .L181
.L180:
ldr x0, [sp, 88]
ldr w0, [x0, 2048]
cmp w0, 0
beq .L182
ldr x0, [sp, 88]
ldr w0, [x0, 2016]
cmp w0, 0
beq .L183
mov w0, 43
b .L184
.L183:
mov w0, 45
.L184:
ldr x2, [sp, 80]
ldrsw x1, [sp, 76]
add x1, x2, x1
strb w0, [x1, 168]
b .L185
.L182:
ldr x1, [sp, 80]
ldrsw x0, [sp, 76]
add x0, x1, x0
mov w1, 32
strb w1, [x0, 168]
.L185:
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
ldr x1, [sp, 80]
ldrsw x0, [sp, 76]
add x0, x1, x0
strb wzr, [x0, 168]
ldr x0, [sp, 80]
strh wzr, [x0, 190]
ldr x0, [sp, 88]
ldr x1, [x0, 2056]
ldr x0, [sp, 80]
str x1, [x0, 192]
ldr x0, [sp, 88]
ldr x1, [x0, 2064]
ldr x0, [sp, 80]
str x1, [x0, 200]
nop
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
.LFE4:
.size Enter, .-Enter
.section .rodata
.align 3
.LC36:
.string "%s\n"
.text
.align 2
.global fatal
.type fatal, %function
fatal:
.LFB5:
.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 x3, [x0]
ldr x2, [sp, 24]
adrp x0, .LC36
add x1, x0, :lo12:.LC36
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.cfi_endproc
.LFE5:
.size fatal, .-fatal
.align 2
.global fatalf
.type fatalf, %function
fatalf:
.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]
str x1, [sp, 16]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
ldr x2, [sp, 16]
ldr x1, [sp, 24]
bl fprintf
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x1, x0
mov w0, 10
bl putc
mov w0, 1
bl exit
.cfi_endproc
.LFE6:
.size fatalf, .-fatalf
.section .rodata
.align 3
.LC37:
.string "Cannot open %s."
.align 3
.LC38:
.string "%s could not be seeked."
.align 3
.LC39:
.string "%s is empty."
.text
.align 2
.global ckopen
.type ckopen, %function
ckopen:
.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]
bl fopen
str x0, [sp, 32]
ldr x0, [sp, 32]
cmp x0, 0
bne .L189
ldr x1, [sp, 24]
adrp x0, .LC37
add x0, x0, :lo12:.LC37
bl fatalf
.L189:
mov w2, 0
mov x1, 0
ldr x0, [sp, 32]
bl fseek
cmp w0, 0
bne .L190
mov w2, 2
mov x1, 0
ldr x0, [sp, 32]
bl fseek
cmp w0, 0
beq .L191
.L190:
ldr x0, [sp, 32]
bl fclose
ldr x1, [sp, 24]
adrp x0, .LC38
add x0, x0, :lo12:.LC38
bl fatalf
b .L192
.L191:
ldr x0, [sp, 32]
bl ftell
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L193
ldr x0, [sp, 32]
bl fclose
ldr x1, [sp, 24]
adrp x0, .LC39
add x0, x0, :lo12:.LC39
bl fatalf
.L193:
mov w2, 0
mov x1, 0
ldr x0, [sp, 32]
bl fseek
cmp w0, 0
beq .L192
ldr x0, [sp, 32]
bl fclose
ldr x1, [sp, 24]
adrp x0, .LC38
add x0, x0, :lo12:.LC38
bl fatalf
.L192:
ldr x0, [sp, 32]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size ckopen, .-ckopen
.align 2
.global ckopenCheck
.type ckopenCheck, %function
ckopenCheck:
.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]
bl fopen
str x0, [sp, 32]
ldr x0, [sp, 32]
cmp x0, 0
bne .L196
mov w0, 0
b .L197
.L196:
mov w2, 0
mov x1, 0
ldr x0, [sp, 32]
bl fseek
cmp w0, 0
bne .L198
mov w2, 2
mov x1, 0
ldr x0, [sp, 32]
bl fseek
cmp w0, 0
beq .L199
.L198:
ldr x0, [sp, 32]
bl fclose
mov w0, 0
b .L197
.L199:
ldr x0, [sp, 32]
bl ftell
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L200
ldr x0, [sp, 32]
bl fclose
mov w0, 0
b .L197
.L200:
mov w2, 0
mov x1, 0
ldr x0, [sp, 32]
bl fseek
cmp w0, 0
beq .L201
ldr x0, [sp, 32]
bl fclose
mov w0, 0
b .L197
.L201:
mov w0, 1
.L197:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size ckopenCheck, .-ckopenCheck
.section .rodata
.align 3
.LC40:
.string "Ran out of memory."
.text
.align 2
.global ckalloc
.type ckalloc, %function
ckalloc:
.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]
ldr w0, [sp, 28]
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L203
adrp x0, .LC40
add x0, x0, :lo12:.LC40
bl fatal
.L203:
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size ckalloc, .-ckalloc
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global vec2_add
.type vec2_add, %function
vec2_add:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
fmov s4, s0
fmov s0, s1
fmov x0, d4
fmov w1, s0
bfi x0, x1, 32, 32
str x0, [sp, 24]
fmov s1, s2
fmov s0, s3
fmov x0, d1
fmov w1, s0
bfi x0, x1, 32, 32
str x0, [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
str wzr, [sp, 44]
b .L2
.L3:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x1, sp, 24
ldr s1, [x1, x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x1, sp, 16
ldr s0, [x1, x0]
fadd s0, s1, s0
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x1, sp, 48
str s0, [x1, x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L2:
ldr w0, [sp, 44]
cmp w0, 1
ble .L3
ldr x0, [sp, 48]
mov x1, x0
lsr w1, w1, 0
lsr x0, x0, 32
fmov s0, w1
fmov s1, w0
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 vec2_add, .-vec2_add
.align 2
.global vec3_add
.type vec3_add, %function
vec3_add:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
str d8, [sp, 16]
.cfi_offset 72, -112
fmov s8, s0
fmov s7, s1
fmov s6, s2
fmov s2, s3
fmov s1, s4
fmov s0, s5
str s8, [sp, 64]
str s7, [sp, 68]
str s6, [sp, 72]
str s2, [sp, 48]
str s1, [sp, 52]
str s0, [sp, 56]
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, 84]
b .L7
.L8:
ldrsw x0, [sp, 84]
lsl x0, x0, 2
add x1, sp, 64
ldr s1, [x1, x0]
ldrsw x0, [sp, 84]
lsl x0, x0, 2
add x1, sp, 48
ldr s0, [x1, x0]
fadd s0, s1, s0
ldrsw x0, [sp, 84]
lsl x0, x0, 2
add x1, sp, 88
str s0, [x1, x0]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
.L7:
ldr w0, [sp, 84]
cmp w0, 2
ble .L8
add x0, sp, 104
add x1, sp, 88
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
ldr s2, [sp, 104]
ldr s1, [sp, 108]
ldr s0, [sp, 112]
fmov s3, s2
fmov s2, s0
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 .L10
bl __stack_chk_fail
.L10:
fmov s0, s3
ldr d8, [sp, 16]
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_restore 72
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size vec3_add, .-vec3_add
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global regs
.bss
.align 3
.type regs, %object
.size regs, 104
regs:
.zero 104
.global base
.align 2
.type base, %object
.size base, 4
base:
.zero 4
.section .rodata
.align 3
.type calc_lhs, %object
.size calc_lhs, 38
calc_lhs:
.hword -1
.hword 0
.hword 0
.hword 0
.hword 1
.hword 1
.hword 2
.hword 2
.hword 2
.hword 2
.hword 2
.hword 2
.hword 2
.hword 2
.hword 2
.hword 2
.hword 2
.hword 3
.hword 3
.align 3
.type calc_len, %object
.size calc_len, 38
calc_len:
.hword 2
.hword 0
.hword 3
.hword 3
.hword 1
.hword 3
.hword 3
.hword 3
.hword 3
.hword 3
.hword 3
.hword 3
.hword 3
.hword 3
.hword 2
.hword 1
.hword 1
.hword 1
.hword 2
.align 3
.type calc_defred, %object
.size calc_defred, 66
calc_defred:
.hword 1
.hword 0
.hword 0
.hword 17
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 3
.hword 0
.hword 15
.hword 14
.hword 0
.hword 2
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 18
.hword 0
.hword 6
.hword 0
.hword 0
.hword 0
.hword 0
.hword 9
.hword 10
.hword 11
.align 3
.type calc_dgoto, %object
.size calc_dgoto, 8
calc_dgoto:
.hword 1
.hword 7
.hword 8
.hword 9
.align 3
.type calc_sindex, %object
.size calc_sindex, 66
calc_sindex:
.hword 0
.hword -40
.hword -7
.hword 0
.hword -55
.hword -38
.hword -38
.hword 1
.hword -29
.hword -247
.hword 0
.hword -38
.hword 0
.hword 0
.hword 22
.hword 0
.hword -38
.hword -38
.hword -38
.hword -38
.hword -38
.hword -38
.hword -38
.hword 0
.hword -29
.hword 0
.hword 51
.hword 60
.hword -20
.hword -20
.hword 0
.hword 0
.hword 0
.align 3
.type calc_rindex, %object
.size calc_rindex, 66
calc_rindex:
.hword 0
.hword 0
.hword 0
.hword 0
.hword 2
.hword 0
.hword 0
.hword 0
.hword 9
.hword -9
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 10
.hword 0
.hword -6
.hword 14
.hword 5
.hword 13
.hword 0
.hword 0
.hword 0
.align 3
.type calc_gindex, %object
.size calc_gindex, 8
calc_gindex:
.hword 0
.hword 0
.hword 65
.hword 0
.align 3
.type calc_table, %object
.size calc_table, 442
calc_table:
.hword 6
.hword 16
.hword 6
.hword 10
.hword 13
.hword 5
.hword 11
.hword 5
.hword 22
.hword 17
.hword 23
.hword 15
.hword 15
.hword 20
.hword 18
.hword 7
.hword 19
.hword 22
.hword 21
.hword 4
.hword 5
.hword 0
.hword 20
.hword 8
.hword 12
.hword 0
.hword 0
.hword 21
.hword 16
.hword 16
.hword 0
.hword 0
.hword 16
.hword 16
.hword 16
.hword 13
.hword 16
.hword 0
.hword 16
.hword 15
.hword 15
.hword 0
.hword 0
.hword 7
.hword 15
.hword 15
.hword 7
.hword 15
.hword 7
.hword 15
.hword 7
.hword 8
.hword 12
.hword 0
.hword 8
.hword 12
.hword 8
.hword 0
.hword 8
.hword 22
.hword 17
.hword 0
.hword 0
.hword 25
.hword 20
.hword 18
.hword 0
.hword 19
.hword 0
.hword 21
.hword 13
.hword 14
.hword 0
.hword 0
.hword 0
.hword 0
.hword 24
.hword 0
.hword 0
.hword 0
.hword 0
.hword 26
.hword 27
.hword 28
.hword 29
.hword 30
.hword 31
.hword 32
.hword 22
.hword 17
.hword 0
.hword 0
.hword 0
.hword 20
.hword 18
.hword 16
.hword 19
.hword 22
.hword 21
.hword 0
.hword 0
.hword 0
.hword 20
.hword 18
.hword 0
.hword 19
.hword 0
.hword 21
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 16
.hword 0
.hword 0
.hword 13
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 15
.hword 0
.hword 0
.hword 7
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 8
.hword 12
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 16
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 0
.hword 2
.hword 3
.hword 4
.hword 3
.hword 12
.align 3
.type calc_check, %object
.size calc_check, 442
calc_check:
.hword 40
.hword 10
.hword 40
.hword 10
.hword 10
.hword 45
.hword 61
.hword 45
.hword 37
.hword 38
.hword 257
.hword 10
.hword 10
.hword 42
.hword 43
.hword 10
.hword 45
.hword 37
.hword 47
.hword 10
.hword 10
.hword -1
.hword 42
.hword 10
.hword 10
.hword -1
.hword -1
.hword 47
.hword 37
.hword 38
.hword -1
.hword -1
.hword 41
.hword 42
.hword 43
.hword 41
.hword 45
.hword -1
.hword 47
.hword 37
.hword 38
.hword -1
.hword -1
.hword 38
.hword 42
.hword 43
.hword 41
.hword 45
.hword 43
.hword 47
.hword 45
.hword 38
.hword 38
.hword -1
.hword 41
.hword 41
.hword 43
.hword -1
.hword 45
.hword 37
.hword 38
.hword -1
.hword -1
.hword 41
.hword 42
.hword 43
.hword -1
.hword 45
.hword -1
.hword 47
.hword 5
.hword 6
.hword -1
.hword -1
.hword -1
.hword -1
.hword 11
.hword -1
.hword -1
.hword -1
.hword -1
.hword 16
.hword 17
.hword 18
.hword 19
.hword 20
.hword 21
.hword 22
.hword 37
.hword 38
.hword -1
.hword -1
.hword -1
.hword 42
.hword 43
.hword 124
.hword 45
.hword 37
.hword 47
.hword -1
.hword -1
.hword -1
.hword 42
.hword 43
.hword -1
.hword 45
.hword -1
.hword 47
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword 124
.hword -1
.hword -1
.hword 124
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword 124
.hword -1
.hword -1
.hword 124
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword 124
.hword 124
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword 124
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword -1
.hword 256
.hword 257
.hword 258
.hword 257
.hword 258
.global calc_errflag
.bss
.align 2
.type calc_errflag, %object
.size calc_errflag, 4
calc_errflag:
.zero 4
.global calc_char
.align 2
.type calc_char, %object
.size calc_char, 4
calc_char:
.zero 4
.global calc_val
.align 2
.type calc_val, %object
.size calc_val, 4
calc_val:
.zero 4
.global calc_lval
.align 2
.type calc_lval, %object
.size calc_lval, 4
calc_lval:
.zero 4
.global calc_nerrs
.align 2
.type calc_nerrs, %object
.size calc_nerrs, 4
calc_nerrs:
.zero 4
.local yystack
.comm yystack,48,8
.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
b .L2
.L3:
bl calc_parse
.L2:
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl feof
cmp w0, 0
beq .L3
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
.section .rodata
.align 3
.LC0:
.string "%s\n"
.text
.align 2
.type calc_error, %function
calc_error:
.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 x0, [sp, 24]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x2, [sp, 24]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x3
bl fprintf
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size calc_error, .-calc_error
.align 2
.global calc_lex
.type calc_lex, %function
calc_lex:
.LFB2:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
nop
.L7:
bl getchar
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 32
beq .L7
bl __ctype_b_loc
ldr x1, [x0]
ldrsw x0, [sp, 28]
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 512
cmp w0, 0
beq .L8
ldr w0, [sp, 28]
sub w1, w0, #97
adrp x0, calc_lval
add x0, x0, :lo12:calc_lval
str w1, [x0]
mov w0, 258
b .L9
.L8:
bl __ctype_b_loc
ldr x1, [x0]
ldrsw x0, [sp, 28]
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 2048
cmp w0, 0
beq .L10
ldr w0, [sp, 28]
sub w1, w0, #48
adrp x0, calc_lval
add x0, x0, :lo12:calc_lval
str w1, [x0]
mov w0, 257
b .L9
.L10:
ldr w0, [sp, 28]
.L9:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size calc_lex, .-calc_lex
.align 2
.type yygrowstack, %function
yygrowstack:
.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, 24]
ldr x0, [sp, 24]
ldr w0, [x0]
str w0, [sp, 40]
ldr w0, [sp, 40]
cmp w0, 0
bne .L12
mov w0, 200
str w0, [sp, 40]
b .L13
.L12:
ldr w1, [sp, 40]
mov w0, 9999
cmp w1, w0
bls .L14
mov w0, -2
b .L15
.L14:
ldr w0, [sp, 40]
lsl w0, w0, 1
str w0, [sp, 40]
ldr w1, [sp, 40]
mov w0, 10000
cmp w1, w0
bls .L13
mov w0, 10000
str w0, [sp, 40]
.L13:
ldr x0, [sp, 24]
ldr x1, [x0, 16]
ldr x0, [sp, 24]
ldr x0, [x0, 8]
sub x0, x1, x0
asr x0, x0, 1
str w0, [sp, 44]
ldr x0, [sp, 24]
ldr x2, [x0, 8]
ldr w0, [sp, 40]
lsl x0, x0, 1
mov x1, x0
mov x0, x2
bl realloc
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
bne .L16
mov w0, -2
b .L15
.L16:
ldr x0, [sp, 24]
ldr x1, [sp, 48]
str x1, [x0, 8]
ldrsw x0, [sp, 44]
lsl x0, x0, 1
ldr x1, [sp, 48]
add x1, x1, x0
ldr x0, [sp, 24]
str x1, [x0, 16]
ldr x0, [sp, 24]
ldr x2, [x0, 32]
ldr w0, [sp, 40]
lsl x0, x0, 2
mov x1, x0
mov x0, x2
bl realloc
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L17
mov w0, -2
b .L15
.L17:
ldr x0, [sp, 24]
ldr x1, [sp, 56]
str x1, [x0, 32]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 56]
add x1, x1, x0
ldr x0, [sp, 24]
str x1, [x0, 40]
ldr x0, [sp, 24]
ldr w1, [sp, 40]
str w1, [x0]
ldr x0, [sp, 24]
ldr x1, [x0, 8]
ldr w0, [sp, 40]
lsl x0, x0, 1
sub x0, x0, #2
add x1, x1, x0
ldr x0, [sp, 24]
str x1, [x0, 24]
mov w0, 0
.L15:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size yygrowstack, .-yygrowstack
.section .rodata
.align 3
.LC1:
.string "syntax error"
.align 3
.LC2:
.string "%d\n"
.align 3
.LC3:
.string "yacc stack overflow"
.text
.align 2
.global calc_parse
.type calc_parse, %function
calc_parse:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str wzr, [sp, 28]
str wzr, [sp, 20]
adrp x0, calc_nerrs
add x0, x0, :lo12:calc_nerrs
str wzr, [x0]
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
str wzr, [x0]
adrp x0, calc_char
add x0, x0, :lo12:calc_char
mov w1, -1
str w1, [x0]
str wzr, [sp, 24]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 8]
cmp x0, 0
bne .L19
adrp x0, yystack
add x0, x0, :lo12:yystack
bl yygrowstack
cmn w0, #2
beq .L68
.L19:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 8]
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 32]
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 40]
str wzr, [sp, 24]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
strh wzr, [x0]
.L21:
adrp x0, calc_defred
add x0, x0, :lo12:calc_defred
ldrsw x1, [sp, 24]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
bne .L69
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
cmp w0, 0
bge .L24
bl calc_lex
mov w1, w0
adrp x0, calc_char
add x0, x0, :lo12:calc_char
str w1, [x0]
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
cmp w0, 0
bge .L24
adrp x0, calc_char
add x0, x0, :lo12:calc_char
str wzr, [x0]
.L24:
adrp x0, calc_sindex
add x0, x0, :lo12:calc_sindex
ldrsw x1, [sp, 24]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
beq .L25
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
ldr w1, [sp, 20]
add w0, w1, w0
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
blt .L25
ldr w0, [sp, 20]
cmp w0, 220
bgt .L25
adrp x0, calc_check
add x0, x0, :lo12:calc_check
ldrsw x1, [sp, 20]
ldrsh w1, [x0, x1, lsl 1]
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
sxth w0, w0
cmp w1, w0
bne .L25
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 24]
cmp x1, x0
bcc .L26
adrp x0, yystack
add x0, x0, :lo12:yystack
bl yygrowstack
cmn w0, #2
beq .L70
.L26:
adrp x0, calc_table
add x0, x0, :lo12:calc_table
ldrsw x1, [sp, 20]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 24]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
add x1, x0, 2
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
adrp x1, calc_table
add x1, x1, :lo12:calc_table
ldrsw x2, [sp, 20]
ldrsh w1, [x1, x2, lsl 1]
strh w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
add x1, x0, 4
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 40]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
adrp x1, calc_lval
add x1, x1, :lo12:calc_lval
ldr w1, [x1]
str w1, [x0]
adrp x0, calc_char
add x0, x0, :lo12:calc_char
mov w1, -1
str w1, [x0]
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
ldr w0, [x0]
cmp w0, 0
ble .L21
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
ldr w0, [x0]
sub w1, w0, #1
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
str w1, [x0]
b .L21
.L25:
adrp x0, calc_rindex
add x0, x0, :lo12:calc_rindex
ldrsw x1, [sp, 24]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
beq .L28
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
ldr w1, [sp, 20]
add w0, w1, w0
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
blt .L28
ldr w0, [sp, 20]
cmp w0, 220
bgt .L28
adrp x0, calc_check
add x0, x0, :lo12:calc_check
ldrsw x1, [sp, 20]
ldrsh w1, [x0, x1, lsl 1]
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
sxth w0, w0
cmp w1, w0
bne .L28
adrp x0, calc_table
add x0, x0, :lo12:calc_table
ldrsw x1, [sp, 20]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 20]
b .L23
.L28:
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
ldr w0, [x0]
cmp w0, 0
bne .L71
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl calc_error
nop
.L31:
adrp x0, calc_nerrs
add x0, x0, :lo12:calc_nerrs
ldr w0, [x0]
add w1, w0, 1
adrp x0, calc_nerrs
add x0, x0, :lo12:calc_nerrs
str w1, [x0]
b .L30
.L71:
nop
.L30:
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
ldr w0, [x0]
cmp w0, 2
bgt .L32
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
mov w1, 3
str w1, [x0]
.L37:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
ldrsh w0, [x0]
mov w1, w0
adrp x0, calc_sindex
add x0, x0, :lo12:calc_sindex
sxtw x1, w1
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
beq .L33
ldr w0, [sp, 20]
add w0, w0, 256
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
blt .L33
ldr w0, [sp, 20]
cmp w0, 220
bgt .L33
adrp x0, calc_check
add x0, x0, :lo12:calc_check
ldrsw x1, [sp, 20]
ldrsh w0, [x0, x1, lsl 1]
cmp w0, 256
bne .L33
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 24]
cmp x1, x0
bcc .L34
adrp x0, yystack
add x0, x0, :lo12:yystack
bl yygrowstack
cmn w0, #2
beq .L72
.L34:
adrp x0, calc_table
add x0, x0, :lo12:calc_table
ldrsw x1, [sp, 20]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 24]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
add x1, x0, 2
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
adrp x1, calc_table
add x1, x1, :lo12:calc_table
ldrsw x2, [sp, 20]
ldrsh w1, [x1, x2, lsl 1]
strh w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
add x1, x0, 4
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 40]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
adrp x1, calc_lval
add x1, x1, :lo12:calc_lval
ldr w1, [x1]
str w1, [x0]
b .L21
.L33:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 8]
cmp x1, x0
bls .L73
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
sub x1, x0, #2
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x1, x0, #4
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 40]
b .L37
.L32:
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
cmp w0, 0
beq .L74
adrp x0, calc_char
add x0, x0, :lo12:calc_char
mov w1, -1
str w1, [x0]
b .L21
.L69:
nop
.L23:
adrp x0, calc_len
add x0, x0, :lo12:calc_len
ldrsw x1, [sp, 20]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 0
ble .L39
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 40]
mov w2, 1
ldr w0, [sp, 28]
sub w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [x0]
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L40
.L39:
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str wzr, [x0]
.L40:
ldr w0, [sp, 20]
cmp w0, 18
beq .L41
ldr w0, [sp, 20]
cmp w0, 18
bgt .L42
ldr w0, [sp, 20]
cmp w0, 17
beq .L43
ldr w0, [sp, 20]
cmp w0, 17
bgt .L42
ldr w0, [sp, 20]
cmp w0, 15
beq .L44
ldr w0, [sp, 20]
cmp w0, 15
bgt .L42
ldr w0, [sp, 20]
cmp w0, 14
beq .L45
ldr w0, [sp, 20]
cmp w0, 14
bgt .L42
ldr w0, [sp, 20]
cmp w0, 13
beq .L46
ldr w0, [sp, 20]
cmp w0, 13
bgt .L42
ldr w0, [sp, 20]
cmp w0, 12
beq .L47
ldr w0, [sp, 20]
cmp w0, 12
bgt .L42
ldr w0, [sp, 20]
cmp w0, 11
beq .L48
ldr w0, [sp, 20]
cmp w0, 11
bgt .L42
ldr w0, [sp, 20]
cmp w0, 10
beq .L49
ldr w0, [sp, 20]
cmp w0, 10
bgt .L42
ldr w0, [sp, 20]
cmp w0, 9
beq .L50
ldr w0, [sp, 20]
cmp w0, 9
bgt .L42
ldr w0, [sp, 20]
cmp w0, 8
beq .L51
ldr w0, [sp, 20]
cmp w0, 8
bgt .L42
ldr w0, [sp, 20]
cmp w0, 7
beq .L52
ldr w0, [sp, 20]
cmp w0, 7
bgt .L42
ldr w0, [sp, 20]
cmp w0, 6
beq .L53
ldr w0, [sp, 20]
cmp w0, 6
bgt .L42
ldr w0, [sp, 20]
cmp w0, 5
beq .L54
ldr w0, [sp, 20]
cmp w0, 5
bgt .L42
ldr w0, [sp, 20]
cmp w0, 3
beq .L55
ldr w0, [sp, 20]
cmp w0, 4
beq .L56
b .L42
.L55:
adrp x0, calc_errflag
add x0, x0, :lo12:calc_errflag
str wzr, [x0]
b .L42
.L56:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
b .L42
.L54:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
adrp x1, yystack
add x1, x1, :lo12:yystack
ldr x1, [x1, 40]
sub x1, x1, #8
ldr w1, [x1]
ldr w2, [x0]
adrp x0, regs
add x0, x0, :lo12:regs
sxtw x1, w1
str w2, [x0, x1, lsl 2]
b .L42
.L53:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w1, [x0, -4]
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L52:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #8
ldr w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
add w1, w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L51:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #8
ldr w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
sub w1, w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L50:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #8
ldr w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
mul w1, w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L49:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #8
ldr w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
sdiv w1, w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L48:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #8
ldr w0, [x0]
adrp x1, yystack
add x1, x1, :lo12:yystack
ldr x1, [x1, 40]
ldr w1, [x1]
sdiv w2, w0, w1
mul w1, w2, w1
sub w1, w0, w1
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L47:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #8
ldr w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
and w1, w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L46:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #8
ldr w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
orr w1, w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L45:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
neg w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L44:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w1, [x0]
adrp x0, regs
add x0, x0, :lo12:regs
sxtw x1, w1
ldr w1, [x0, x1, lsl 2]
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
b .L42
.L43:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w1, [x0]
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
cmp w0, 0
bne .L57
mov w0, 8
b .L58
.L57:
mov w0, 10
.L58:
adrp x1, base
add x1, x1, :lo12:base
str w0, [x1]
b .L42
.L41:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
sub x0, x0, #4
ldr w1, [x0]
adrp x0, base
add x0, x0, :lo12:base
ldr w0, [x0]
mul w1, w1, w0
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
ldr w0, [x0]
add w1, w1, w0
adrp x0, calc_val
add x0, x0, :lo12:calc_val
str w1, [x0]
nop
.L42:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 16]
ldrsw x0, [sp, 28]
lsl x0, x0, 1
neg x0, x0
add x1, x1, x0
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
ldrsh w0, [x0]
str w0, [sp, 24]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 40]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
neg x0, x0
add x1, x1, x0
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 40]
adrp x0, calc_lhs
add x0, x0, :lo12:calc_lhs
ldrsw x1, [sp, 20]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 28]
ldr w0, [sp, 24]
cmp w0, 0
bne .L59
ldr w0, [sp, 28]
cmp w0, 0
bne .L59
mov w0, 1
str w0, [sp, 24]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
add x1, x0, 2
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
mov w1, 1
strh w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
add x1, x0, 4
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 40]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
adrp x1, calc_val
add x1, x1, :lo12:calc_val
ldr w1, [x1]
str w1, [x0]
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
cmp w0, 0
bge .L60
bl calc_lex
mov w1, w0
adrp x0, calc_char
add x0, x0, :lo12:calc_char
str w1, [x0]
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
cmp w0, 0
bge .L60
adrp x0, calc_char
add x0, x0, :lo12:calc_char
str wzr, [x0]
.L60:
adrp x0, calc_char
add x0, x0, :lo12:calc_char
ldr w0, [x0]
cmp w0, 0
beq .L75
b .L21
.L59:
adrp x0, calc_gindex
add x0, x0, :lo12:calc_gindex
ldrsw x1, [sp, 28]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
beq .L63
ldr w1, [sp, 20]
ldr w0, [sp, 24]
add w0, w1, w0
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 0
blt .L63
ldr w0, [sp, 20]
cmp w0, 220
bgt .L63
adrp x0, calc_check
add x0, x0, :lo12:calc_check
ldrsw x1, [sp, 20]
ldrsh w1, [x0, x1, lsl 1]
ldr w0, [sp, 24]
sxth w0, w0
cmp w1, w0
bne .L63
adrp x0, calc_table
add x0, x0, :lo12:calc_table
ldrsw x1, [sp, 20]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 24]
b .L64
.L63:
adrp x0, calc_dgoto
add x0, x0, :lo12:calc_dgoto
ldrsw x1, [sp, 28]
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 24]
.L64:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 24]
cmp x1, x0
bcc .L65
adrp x0, yystack
add x0, x0, :lo12:yystack
bl yygrowstack
cmn w0, #2
beq .L76
.L65:
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
add x1, x0, 2
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 16]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 16]
ldr w1, [sp, 24]
sxth w1, w1
strh w1, [x0]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
add x1, x0, 4
adrp x0, yystack
add x0, x0, :lo12:yystack
str x1, [x0, 40]
adrp x0, yystack
add x0, x0, :lo12:yystack
ldr x0, [x0, 40]
adrp x1, calc_val
add x1, x1, :lo12:calc_val
ldr w1, [x1]
str w1, [x0]
b .L21
.L68:
nop
b .L20
.L70:
nop
b .L20
.L72:
nop
b .L20
.L76:
nop
.L20:
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl calc_error
b .L36
.L73:
nop
b .L36
.L74:
nop
.L36:
mov w0, 1
b .L66
.L75:
nop
.L62:
mov w0, 0
.L66:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size calc_parse, .-calc_parse
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Array Example 2 - Manipulation of array data\n"
.align 3
.LC1:
.string "Enter a series of 10 numbers:"
.align 3
.LC2:
.string "%lf"
.align 3
.LC3:
.string "The sum is %2.2f\nThe average is %2.2f\nThe largest value is %2.2f\nThe smallest value is %2.2lf\n\n"
.align 3
.LC4:
.string "%2.2lf "
.align 3
.LC5:
.string "\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.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
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
str wzr, [sp, 28]
b .L2
.L3:
add x1, sp, 56
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x0, x1, x0
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L2:
ldr w0, [sp, 28]
cmp w0, 9
ble .L3
str xzr, [sp, 48]
ldr d0, [sp, 56]
str d0, [sp, 40]
ldr d0, [sp, 40]
str d0, [sp, 32]
str wzr, [sp, 28]
b .L4
.L9:
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x1, sp, 56
ldr d0, [x1, x0]
ldr d1, [sp, 48]
fadd d0, d1, d0
str d0, [sp, 48]
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x1, sp, 56
ldr d0, [x1, x0]
ldr d1, [sp, 32]
fcmpe d1, d0
bmi .L16
b .L19
.L16:
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x1, sp, 56
ldr d0, [x1, x0]
str d0, [sp, 32]
b .L7
.L19:
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x1, sp, 56
ldr d0, [x1, x0]
ldr d1, [sp, 40]
fcmpe d1, d0
bgt .L17
b .L7
.L17:
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x1, sp, 56
ldr d0, [x1, x0]
str d0, [sp, 40]
.L7:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L4:
ldr w0, [sp, 28]
cmp w0, 9
ble .L9
fmov d0, 1.0e+1
ldr d1, [sp, 48]
fdiv d0, d1, d0
ldr d3, [sp, 40]
ldr d2, [sp, 32]
fmov d1, d0
ldr d0, [sp, 48]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
str wzr, [sp, 28]
b .L10
.L13:
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x1, sp, 56
ldr d0, [x1, x0]
fcmpe d0, #0.0
bgt .L18
b .L11
.L18:
ldrsw x0, [sp, 28]
lsl x0, x0, 3
add x1, sp, 56
ldr d0, [x1, x0]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
.L11:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L10:
ldr w0, [sp, 28]
cmp w0, 9
ble .L13
adrp x0, .LC5
add x0, x0, :lo12:.LC5
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, 136]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L15
bl __stack_chk_fail
.L15:
mov w0, w1
ldp x29, x30, [sp], 144
.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 lib
.type lib, %function
lib:
.LFB0:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE0:
.size lib, .-lib
``` |
### 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 stage2
.type stage2, %function
stage2:
.LFB0:
.cfi_startproc
.L2:
b .L2
.cfi_endproc
.LFE0:
.size stage2, .-stage2
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 2
.type MODEL_UPDATE_DELAY, %object
.size MODEL_UPDATE_DELAY, 4
MODEL_UPDATE_DELAY:
.word 250
.align 2
.type MAX_PASSPHRASE_SIZE, %object
.size MAX_PASSPHRASE_SIZE, 4
MAX_PASSPHRASE_SIZE:
.word 1024
.align 2
.type STATUSBAR_ICONSIZE, %object
.size STATUSBAR_ICONSIZE, 4
STATUSBAR_ICONSIZE:
.word 16
.align 2
.type TOOLTIP_WRAP_THRESHOLD, %object
.size TOOLTIP_WRAP_THRESHOLD, 4
TOOLTIP_WRAP_THRESHOLD:
.word 80
.align 2
.type MAX_URI_LENGTH, %object
.size MAX_URI_LENGTH, 4
MAX_URI_LENGTH:
.word 255
``` |
### 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:
.LFB0:
.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
add x0, sp, 32
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, 2031
str w1, [x0, 32]
ldr w0, [sp, 64]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
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, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L3
bl __stack_chk_fail
.L3:
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
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC10:
.string "[%s] = [%lld]\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.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
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, .LC9
add x1, x0, :lo12:.LC9
add x0, sp, 48
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldp q0, q1, [x1, 32]
stp q0, q1, [x0, 32]
ldr x1, [x1, 64]
str x1, [x0, 64]
str wzr, [sp, 44]
str wzr, [sp, 44]
b .L2
.L3:
ldrsw x0, [sp, 44]
lsl x0, x0, 3
add x1, sp, 48
ldr x19, [x1, x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 3
add x1, sp, 48
ldr x0, [x1, x0]
bl atoll
mov x2, x0
mov x1, x19
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L2:
ldrsw x0, [sp, 44]
lsl x0, x0, 3
add x1, sp, 48
ldr x0, [x1, x0]
cmp x0, 0
bne .L3
mov w0, 0
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 .L5
bl __stack_chk_fail
.L5:
mov w0, w1
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
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "-10"
.align 3
.LC1:
.string "0"
.align 3
.LC2:
.string "10"
.align 3
.LC3:
.string "a100"
.align 3
.LC4:
.string "100a"
.align 3
.LC5:
.string "-100a"
.align 3
.LC6:
.string " 12f"
.align 3
.LC7:
.string "15.9x"
.data
.align 3
.LC9:
.xword .LC0
.xword .LC1
.xword .LC2
.xword .LC3
.xword .LC4
.xword .LC5
.xword .LC6
.xword .LC7
.xword 0
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global foo
.type foo, %function
foo:
.LFB0:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%s is missing parameters\n"
.align 3
.LC1:
.string "Head node is %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
str w0, [sp, 28]
str x1, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 2
bgt .L2
ldr x0, [sp, 16]
ldr x0, [x0]
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
b .L3
.L2:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl atoi
str w0, [sp, 44]
ldr x0, [sp, 16]
add x0, x0, 16
ldr x0, [x0]
bl atoi
str w0, [sp, 48]
str xzr, [sp, 56]
ldr w1, [sp, 48]
ldr x0, [sp, 56]
bl insert
str x0, [sp, 56]
ldr x0, [sp, 56]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
str wzr, [sp, 40]
b .L4
.L5:
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, 52]
ldr w1, [sp, 52]
ldr x0, [sp, 56]
bl insert
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
ldr x0, [sp, 56]
bl display
ldr x0, [sp, 56]
bl destroy
mov w0, 0
.L3:
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 main
.type main, %function
main:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -176]!
.cfi_def_cfa_offset 176
.cfi_offset 29, -176
.cfi_offset 30, -168
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, 168]
mov x1, 0
ldr w0, [sp, 28]
sxtb w3, w0
ldr w0, [sp, 28]
sxtb w2, w0
ldr w0, [sp, 28]
sxtb w1, w0
ldr w0, [sp, 28]
sxtb w0, w0
adrp x4, .LC0
ldr q0, [x4, #:lo12:.LC0]
dup v1.8b, w3
ins v0.b[0], v1.b[0]
dup v1.8b, w2
ins v0.b[6], v1.b[0]
dup v1.8b, w1
ins v0.b[8], v1.b[0]
dup v1.8b, w0
ins v0.b[14], v1.b[0]
str q0, [sp, 32]
ldr w0, [sp, 28]
sxtb w3, w0
ldr w0, [sp, 28]
sxtb w2, w0
ldr w0, [sp, 28]
sxtb w1, w0
ldr w0, [sp, 28]
sxtb w0, w0
adrp x4, .LC1
ldr q0, [x4, #:lo12:.LC1]
dup v1.8b, w3
ins v0.b[1], v1.b[0]
dup v1.8b, w2
ins v0.b[7], v1.b[0]
dup v1.8b, w1
ins v0.b[8], v1.b[0]
dup v1.8b, w0
ins v0.b[14], v1.b[0]
str q0, [sp, 48]
ldr q1, [sp, 32]
ldr q0, [sp, 48]
add v0.16b, v1.16b, v0.16b
str q0, [sp, 64]
ldr q1, [sp, 32]
ldr q0, [sp, 48]
sub v0.16b, v1.16b, v0.16b
str q0, [sp, 80]
ldr q1, [sp, 32]
ldr q0, [sp, 48]
cmgt v0.16b, v1.16b, v0.16b
str q0, [sp, 96]
ldr q1, [sp, 32]
ldr q0, [sp, 48]
and v0.16b, v1.16b, v0.16b
str q0, [sp, 112]
ldr q0, [sp, 32]
ldr q2, [sp, 48]
movi v1.16b, 0xf
and v1.16b, v2.16b, v1.16b
tbl v0.16b, {v0.16b}, v1.16b
str q0, [sp, 128]
ldr q1, [sp, 32]
ldr q0, [sp, 48]
movi v2.16b, 0x1f
and v2.16b, v0.16b, v2.16b
eor v1.16b, v1.16b, v0.16b
eor v0.16b, v1.16b, v0.16b
eor v1.16b, v1.16b, v0.16b
tbl v0.16b, {v0.16b - v1.16b}, v2.16b
str q0, [sp, 144]
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 4
add x0, x0, x1
add x1, sp, 64
ldrsb w0, [x1, x0]
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 168]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L3
bl __stack_chk_fail
.L3:
mov w0, w1
ldp x29, x30, [sp], 176
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 4
.LC0:
.byte 12
.byte 1
.byte 15
.byte 38
.byte 12
.byte -1
.byte 15
.byte 2
.byte 12
.byte 1
.byte 15
.byte 38
.byte 12
.byte -1
.byte 15
.byte 2
.align 4
.LC1:
.byte -4
.byte 1
.byte 2
.byte 11
.byte 1
.byte 17
.byte -8
.byte 2
.byte -4
.byte 1
.byte 15
.byte 38
.byte 12
.byte -1
.byte -8
.byte 2
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global init_stack
.type init_stack, %function
init_stack:
.LFB6:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x0, [sp, 8]
str xzr, [x0]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size init_stack, .-init_stack
.align 2
.global push
.type push, %function
push:
.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]
mov x0, 16
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
ldr x1, [sp, 16]
str x1, [x0]
ldr x0, [sp, 24]
ldr x1, [x0]
ldr x0, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 24]
ldr x1, [sp, 40]
str x1, [x0]
mov w0, 0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size push, .-push
.align 2
.global pop
.type pop, %function
pop:
.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]
ldr x0, [x0]
str x0, [sp, 32]
ldr x0, [sp, 24]
ldr x0, [x0]
ldr x0, [x0]
str x0, [sp, 40]
ldr x0, [sp, 24]
ldr x0, [x0]
ldr x1, [x0, 8]
ldr x0, [sp, 24]
str x1, [x0]
ldr x0, [sp, 32]
bl free
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size pop, .-pop
.align 2
.global clear_stack
.type clear_stack, %function
clear_stack:
.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]
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 32]
b .L7
.L8:
ldr x0, [sp, 32]
ldr x0, [x0, 8]
str x0, [sp, 40]
ldr x0, [sp, 32]
bl free
ldr x0, [sp, 40]
str x0, [sp, 32]
.L7:
ldr x0, [sp, 32]
cmp x0, 0
bne .L8
ldr x0, [sp, 24]
str xzr, [x0]
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size clear_stack, .-clear_stack
.align 2
.global init
.type init, %function
init:
.LFB10:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x0, [sp, 8]
str xzr, [x0]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size init, .-init
.align 2
.global clear_impl
.type clear_impl, %function
clear_impl:
.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]
cmp x0, 0
beq .L11
ldr x0, [sp, 24]
ldr x0, [x0, 8]
bl clear_impl
ldr x0, [sp, 24]
ldr x0, [x0, 16]
bl clear_impl
str xzr, [sp, 24]
ldr x0, [sp, 24]
b .L12
.L11:
mov x0, 0
.L12:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size clear_impl, .-clear_impl
.align 2
.global clear
.type clear, %function
clear:
.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]
ldr x0, [sp, 24]
ldr x0, [x0]
bl clear_impl
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size clear, .-clear
.align 2
.global insert
.type insert, %function
insert:
.LFB13:
.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]
mov x0, 32
bl malloc
str x0, [sp, 56]
ldr x0, [sp, 56]
ldr w1, [sp, 20]
str w1, [x0]
ldr x0, [sp, 56]
str xzr, [x0, 8]
ldr x0, [sp, 56]
str xzr, [x0, 16]
ldr x0, [sp, 56]
str xzr, [x0, 24]
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
str xzr, [sp, 48]
ldr x0, [sp, 24]
ldr x0, [x0]
cmp x0, 0
bne .L17
ldr x0, [sp, 24]
ldr x1, [sp, 56]
str x1, [x0]
b .L16
.L21:
ldr x0, [sp, 40]
str x0, [sp, 48]
ldr x0, [sp, 40]
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
bge .L18
ldr x0, [sp, 40]
ldr x0, [x0, 8]
str x0, [sp, 40]
b .L17
.L18:
ldr x0, [sp, 40]
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
ble .L19
ldr x0, [sp, 40]
ldr x0, [x0, 16]
str x0, [sp, 40]
b .L17
.L19:
ldr x0, [sp, 40]
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
bne .L17
mov w0, 1
b .L20
.L17:
ldr x0, [sp, 40]
cmp x0, 0
bne .L21
ldr x0, [sp, 56]
ldr x1, [sp, 48]
str x1, [x0, 24]
ldr x0, [sp, 48]
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
bge .L22
ldr x0, [sp, 48]
ldr x1, [sp, 56]
str x1, [x0, 8]
b .L16
.L22:
ldr x0, [sp, 48]
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
ble .L16
ldr x0, [sp, 48]
ldr x1, [sp, 56]
str x1, [x0, 16]
.L16:
mov w0, 0
.L20:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size insert, .-insert
.section .rodata
.align 3
.LC0:
.string "%d"
.text
.align 2
.global iterPreorder
.type iterPreorder, %function
iterPreorder:
.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]
cmp x0, 0
beq .L30
mov x0, 8
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
bl init_stack
ldr x1, [sp, 24]
ldr x0, [sp, 40]
bl push
b .L26
.L29:
ldr x0, [sp, 40]
bl pop
str x0, [sp, 24]
ldr x0, [sp, 24]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr x0, [sp, 24]
ldr x0, [x0, 16]
cmp x0, 0
beq .L27
ldr x0, [sp, 24]
ldr x0, [x0, 16]
mov x1, x0
ldr x0, [sp, 40]
bl push
.L27:
ldr x0, [sp, 24]
ldr x0, [x0, 8]
cmp x0, 0
beq .L28
ldr x0, [sp, 24]
ldr x0, [x0, 8]
mov x1, x0
ldr x0, [sp, 40]
bl push
.L28:
ldr x0, [sp, 40]
ldr x0, [x0]
cmp x0, 0
beq .L26
mov w0, 32
bl putchar
.L26:
ldr x0, [sp, 40]
ldr x0, [x0]
cmp x0, 0
bne .L29
mov w0, 10
bl putchar
ldr x0, [sp, 40]
bl clear_stack
b .L23
.L30:
nop
.L23:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size iterPreorder, .-iterPreorder
.align 2
.global main
.type main, %function
main:
.LFB15:
.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
mov x0, 8
bl malloc
str x0, [sp, 32]
ldr x0, [sp, 32]
bl init
mov w0, 7
str w0, [sp, 28]
str wzr, [sp, 24]
b .L32
.L33:
add x0, sp, 20
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [sp, 20]
mov w1, w0
ldr x0, [sp, 32]
bl insert
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L32:
ldr w1, [sp, 24]
ldr w0, [sp, 28]
cmp w1, w0
blt .L33
ldr x0, [sp, 32]
ldr x0, [x0]
bl iterPreorder
ldr x0, [sp, 32]
bl clear
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 .L35
bl __stack_chk_fail
.L35:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size main, .-main
``` |