#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage() {
  printf(" usage %s [options]\n\n", "./b2k");
  printf("All input are un hexdecimal text without 0x prefix. All internal "
         "\nsize are static, so be carful about each options size.\n");
  printf("    -k \n            Generates key and iv from password, exit just "
         "after. This option \n            uses the EVP_BytesToKey of openssl "
         "lib with sha512 digest. You can \n            set the number of "
         "iteration with -C (default is 150000) and salt \n            with -S "
         "( default is f71c71c050ab2ec0 ).\n\n");
  printf("    -p \n            Generates the public key associated to a "
         "private key set with -K.\n\n");
  printf("    -e \n            Encrypt data.\n\n");
  printf("    -d \n            Decrypt data.\n\n");
  printf("    -z \n            Print a compressed format of public key.\n\n");
  printf("    -M <master_key> \n");
  printf("    -N <crypted_master_key> \n            Sets the master key or "
         "crypted master key of aes encryption. \n            master_key 32 "
         "bytes, and crypted_master_key 48 bytes.\n\n");
  printf("    -K <key> \n            Uses with -d and -e to set the key. See "
         "-I\n\n");
  printf("    -I <iv> \n            Uses with -d and -e to set the "
         "initialization vector to crypt and\n            and decrypt master "
         "key ( set with -M ). You can use the password \n            "
         "generation to internaly generate key and iv instead of use -K and\n  "
         "          -I option. (16 bytes) \n\n");
  printf("    -P <private_key> \n");
  printf("    -Q <crypted_private_key> \n            Sets the decrypted and "
         "crypted bitcoin private key. You crypt and\n            decrypt with "
         "-e and -d options. private_key 32 bytes, \n            "
         "crypted_private_key 48 bytes\n\n");
  printf("    -C <count> \n            Sets the number of iterations to pass "
         "to EVP_BytesToKey. \n            (default: 150000).\n\n");
  printf("    -S <salt> \n            Sets the salt to EVP_BytesToKey. Default "
         "salt is f71c71c050ab2ec0.\n            Salt is 8 bytes long ( 16 "
         "hexa characters).\n\n");
  printf("    -U <public_key> \n            Sets the bitcoin public key in "
         "hexadecimal. Public is used when \n            you want to encrypt "
         "or decrypt a private key. Public is double  \n            hased to "
         "get the iv parameter for aes cipher. (33 or 65 bytes \n            "
         "depends on format compression\n\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1075(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10bf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10d5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10eb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x111c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1124(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11c1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11fa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1308(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1311(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13dd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1446(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x14d0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee7(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4c(%rip),%rdi
call   1030 <puts@plt>
lea    0x106a(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cc(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1115(%rip),%rdi
call   1030 <puts@plt>
lea    0x111e(%rip),%rdi
call   1030 <puts@plt>
lea    0x11bc(%rip),%rdi
call   1030 <puts@plt>
lea    0x11f6(%rip),%rdi
call   1030 <puts@plt>
lea    0x1305(%rip),%rdi
call   1030 <puts@plt>
lea    0x130f(%rip),%rdi
call   1030 <puts@plt>
lea    0x13dc(%rip),%rdi
call   1030 <puts@plt>
lea    0x1446(%rip),%rdi
call   1030 <puts@plt>
lea    0x14d1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c" usage %s [options]\0A\0A\00"
@.str.1 = [6 x i8] c"./b2k\00"
@.str.2 = [122 x i8] c"All input are un hexdecimal text without 0x prefix. All internal \0Asize are static, so be carful about each options size.\0A\00"
@.str.3 = [299 x i8] c" -k \0A Generates key and iv from password, exit just after. This option \0A uses the EVP_BytesToKey of openssl lib with sha512 digest. You can \0A set the number of iteration with -C (default is 150000) and salt \0A with -S ( default is f71c71c050ab2ec0 ).\0A\0A\00"
@.str.4 = [88 x i8] c" -p \0A Generates the public key associated to a private key set with -K.\0A\0A\00"
@.str.5 = [36 x i8] c" -e \0A Encrypt data.\0A\0A\00"
@.str.6 = [36 x i8] c" -d \0A Decrypt data.\0A\0A\00"
@.str.7 = [63 x i8] c" -z \0A Print a compressed format of public key.\0A\0A\00"
@.str.8 = [22 x i8] c" -M <master_key> \0A\00"
@.str.9 = [171 x i8] c" -N <crypted_master_key> \0A Sets the master key or crypted master key of aes encryption. \0A master_key 32 bytes, and crypted_master_key 48 bytes.\0A\0A\00"
@.str.10 = [71 x i8] c" -K <key> \0A Uses with -d and -e to set the key. See -I\0A\0A\00"
@.str.11 = [284 x i8] c" -I <iv> \0A Uses with -d and -e to set the initialization vector to crypt and\0A and decrypt master key ( set with -M ). You can use the password \0A generation to internaly generate key and iv instead of use -K and\0A -I option. (16 bytes) \0A\0A\00"
@.str.12 = [23 x i8] c" -P <private_key> \0A\00"
@.str.13 = [218 x i8] c" -Q <crypted_private_key> \0A Sets the decrypted and crypted bitcoin private key. You crypt and\0A decrypt with -e and -d options. private_key 32 bytes, \0A crypted_private_key 48 bytes\0A\0A\00"
@.str.14 = [119 x i8] c" -C <count> \0A Sets the number of iterations to pass to EVP_BytesToKey. \0A (default: 150000).\0A\0A\00"
@.str.15 = [152 x i8] c" -S <salt> \0A Sets the salt to EVP_BytesToKey. Default salt is f71c71c050ab2ec0.\0A Salt is 8 bytes long ( 16 hexa characters).\0A\0A\00"
@.str.16 = [294 x i8] c" -U <public_key> \0A Sets the bitcoin public key in hexadecimal. Public is used when \0A you want to encrypt or decrypt a private key. Public is double \0A hased to get the iv parameter for aes cipher. (33 or 65 bytes \0A depends on format compression\0A\0A\00"
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([299 x i8], [299 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([171 x i8], [171 x i8]* @.str.9, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.10, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([284 x i8], [284 x i8]* @.str.11, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([218 x i8], [218 x i8]* @.str.13, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str.14, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.15, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([294 x i8], [294 x i8]* @.str.16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c" usage %s [options]\0A\0A\00"
@.str.1 = [6 x i8] c"./b2k\00"
@str = [121 x i8] c"All input are un hexdecimal text without 0x prefix. All internal \0Asize are static, so be carful about each options size.\00"
@str.17 = [298 x i8] c" -k \0A Generates key and iv from password, exit just after. This option \0A uses the EVP_BytesToKey of openssl lib with sha512 digest. You can \0A set the number of iteration with -C (default is 150000) and salt \0A with -S ( default is f71c71c050ab2ec0 ).\0A\00"
@str.18 = [87 x i8] c" -p \0A Generates the public key associated to a private key set with -K.\0A\00"
@str.19 = [35 x i8] c" -e \0A Encrypt data.\0A\00"
@str.20 = [35 x i8] c" -d \0A Decrypt data.\0A\00"
@str.21 = [62 x i8] c" -z \0A Print a compressed format of public key.\0A\00"
@str.22 = [21 x i8] c" -M <master_key> \00"
@str.23 = [170 x i8] c" -N <crypted_master_key> \0A Sets the master key or crypted master key of aes encryption. \0A master_key 32 bytes, and crypted_master_key 48 bytes.\0A\00"
@str.24 = [70 x i8] c" -K <key> \0A Uses with -d and -e to set the key. See -I\0A\00"
@str.25 = [283 x i8] c" -I <iv> \0A Uses with -d and -e to set the initialization vector to crypt and\0A and decrypt master key ( set with -M ). You can use the password \0A generation to internaly generate key and iv instead of use -K and\0A -I option. (16 bytes) \0A\00"
@str.26 = [22 x i8] c" -P <private_key> \00"
@str.27 = [217 x i8] c" -Q <crypted_private_key> \0A Sets the decrypted and crypted bitcoin private key. You crypt and\0A decrypt with -e and -d options. private_key 32 bytes, \0A crypted_private_key 48 bytes\0A\00"
@str.28 = [118 x i8] c" -C <count> \0A Sets the number of iterations to pass to EVP_BytesToKey. \0A (default: 150000).\0A\00"
@str.29 = [151 x i8] c" -S <salt> \0A Sets the salt to EVP_BytesToKey. Default salt is f71c71c050ab2ec0.\0A Salt is 8 bytes long ( 16 hexa characters).\0A\00"
@str.30 = [293 x i8] c" -U <public_key> \0A Sets the bitcoin public key in hexadecimal. Public is used when \0A you want to encrypt or decrypt a private key. Public is double \0A hased to get the iv parameter for aes cipher. (33 or 65 bytes \0A depends on format compression\0A\00"
define void @usage() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([121 x i8], [121 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([298 x i8], [298 x i8]* @str.17, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.18, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.19, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.20, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.21, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.22, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([170 x i8], [170 x i8]* @str.23, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.24, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([283 x i8], [283 x i8]* @str.25, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.26, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([217 x i8], [217 x i8]* @str.27, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([118 x i8], [118 x i8]* @str.28, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([151 x i8], [151 x i8]* @str.29, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([293 x i8], [293 x i8]* @str.30, i64 0, i64 0))
ret void
}