#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 */
typedef int /*<<< orphan*/ plain;
typedef int /*<<< orphan*/ key4;

/* Variables and functions */
int /*<<< orphan*/ gen_key(char *, int);
int /*<<< orphan*/ print_char(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ xor_enc_one_byte_key(char *, char *, char);
int /*<<< orphan*/ xor_enc_short_key(char *, char *, char *);
int /*<<< orphan*/ xor_enc_stream_cipher(char *, char *, char *);
int main(void) {
  char cipher[256] = {0};
  char key1 = 'A';
  char key2[] = "Abcd";
  char key3[] = "Abcdabcdabciabcdabcd";
  char plain[] = "This is plain text";
  printf("Original string:  ");
  printf("%s\n", plain);
  int len = sizeof(plain);
  printf("---- Test case 1 ----\n");
  xor_enc_one_byte_key(plain, cipher, key1);
  printf("Encrypted string: ");
  print_char(cipher, len);
  xor_enc_one_byte_key(cipher, plain, key1);
  printf("Decrypted string: ");
  print_char(plain, len);
  printf("---- Test case 2 ----\n");
  xor_enc_short_key(plain, cipher, key2);
  printf("Encrypted string: ");
  print_char(cipher, len);
  xor_enc_short_key(cipher, plain, key2);
  printf("Decrypted string: ");
  print_char(plain, len);
  printf("---- Test case 3 ----\n");
  xor_enc_stream_cipher(plain, cipher, key3);
  printf("Encrypted string: ");
  print_char(cipher, len);
  xor_enc_stream_cipher(cipher, plain, key3);
  printf("Decrypted string: ");
  print_char(plain, len);
  printf("---- Test case 4 ----\n");
  char key4[32] = {0};
  gen_key(key4, sizeof(key4));
  printf("Generated key   : ");
  print_char(key4, sizeof(key4));
  xor_enc_stream_cipher(plain, cipher, key4);
  printf("Encrypted string: ");
  print_char(cipher, len);
  xor_enc_stream_cipher(cipher, plain, key4);
  printf("Decrypted string: ");
  print_char(plain, len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
movb   $0x41,-0x111(%rbp)
mov    0xe5e(%rip),%eax
mov    %eax,-0x116(%rbp)
mov    0xe56(%rip),%al
mov    %al,-0x112(%rbp)
mov    0xf05(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0xeff(%rip),%rax
mov    %rax,-0x128(%rbp)
mov    0xefa(%rip),%eax
mov    %eax,-0x120(%rbp)
mov    0xef2(%rip),%al
mov    %al,-0x11c(%rbp)
mov    0xef1(%rip),%rax
mov    %rax,-0x150(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x148(%rbp)
mov    0xee5(%rip),%ax
mov    %ax,-0x140(%rbp)
mov    0xeda(%rip),%al
mov    %al,-0x13e(%rbp)
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rsi
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x13,-0x154(%rbp)
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x110(%rbp),%rsi
movsbl -0x111(%rbp),%edx
call   1030 <xor_enc_one_byte_key@plt>
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x110(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
lea    -0x110(%rbp),%rdi
lea    -0x150(%rbp),%rsi
movsbl -0x111(%rbp),%edx
call   1030 <xor_enc_one_byte_key@plt>
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x110(%rbp),%rsi
lea    -0x116(%rbp),%rdx
call   1080 <xor_enc_short_key@plt>
lea    0xd37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x110(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
lea    -0x110(%rbp),%rdi
lea    -0x150(%rbp),%rsi
lea    -0x116(%rbp),%rdx
call   1080 <xor_enc_short_key@plt>
lea    0xd10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x110(%rbp),%rsi
lea    -0x130(%rbp),%rdx
call   1050 <xor_enc_stream_cipher@plt>
lea    0xcb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x110(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
lea    -0x110(%rbp),%rdi
lea    -0x150(%rbp),%rsi
lea    -0x130(%rbp),%rdx
call   1050 <xor_enc_stream_cipher@plt>
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x180(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
lea    -0x180(%rbp),%rdi
mov    $0x20,%esi
call   1090 <gen_key@plt>
lea    0xc94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x180(%rbp),%rdi
mov    $0x20,%esi
call   1070 <print_char@plt>
lea    -0x150(%rbp),%rdi
lea    -0x110(%rbp),%rsi
lea    -0x180(%rbp),%rdx
call   1050 <xor_enc_stream_cipher@plt>
lea    0xbf0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x110(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
lea    -0x110(%rbp),%rdi
lea    -0x150(%rbp),%rsi
lea    -0x180(%rbp),%rdx
call   1050 <xor_enc_stream_cipher@plt>
lea    0xbc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   1070 <print_char@plt>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x170,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movb   $0x0,0xc(%rsp)
movl   $0x64636241,0x8(%rsp)
64
movabs $0x64636261646362,%rax
mov    %rax,0x3d(%rsp)
movaps 0xe8d(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x747865,0x1f(%rsp)
lea    0xdc2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xdf3(%rip),%rdi
call   1040 <puts@plt>
lea    0x70(%rsp),%r13
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x41,%edx
call   1030 <xor_enc_one_byte_key@plt>
lea    0xd99(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    $0x41,%edx
call   1030 <xor_enc_one_byte_key@plt>
lea    0xd7e(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
lea    0xd9c(%rip),%rdi
call   1040 <puts@plt>
lea    0x8(%rsp),%rbx
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1080 <xor_enc_short_key@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1080 <xor_enc_short_key@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
lea    0xd57(%rip),%rdi
call   1040 <puts@plt>
lea    0x30(%rsp),%rbx
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1060 <xor_enc_stream_cipher@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1060 <xor_enc_stream_cipher@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
lea    0xd12(%rip),%rdi
call   1040 <puts@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <gen_key@plt>
lea    0xc92(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
call   1070 <print_char@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1060 <xor_enc_stream_cipher@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1060 <xor_enc_stream_cipher@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    $0x13,%esi
call   1070 <print_char@plt>
xor    %eax,%eax
add    $0x170,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.key2 = [5 x i8] c"Abcd\00"
@__const.main.key3 = [21 x i8] c"Abcdabcdabciabcdabcd\00"
@__const.main.plain = [19 x i8] c"This is plain text\00"
@.str = [19 x i8] c"Original string: \00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [23 x i8] c"---- Test case 1 ----\0A\00"
@.str.3 = [19 x i8] c"Encrypted string: \00"
@.str.4 = [19 x i8] c"Decrypted string: \00"
@.str.5 = [23 x i8] c"---- Test case 2 ----\0A\00"
@.str.6 = [23 x i8] c"---- Test case 3 ----\0A\00"
@.str.7 = [23 x i8] c"---- Test case 4 ----\0A\00"
@.str.8 = [19 x i8] c"Generated key : \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = alloca i8
%4 = alloca [5 x i8]
%5 = alloca [21 x i8]
%6 = alloca [19 x i8]
%7 = alloca i32
%8 = alloca [32 x i8]
store i32 0, i32* %1
%9 = bitcast [256 x i8]* %2 to i8*
store i8 65, i8* %3
%10 = bitcast [5 x i8]* %4 to i8*
%11 = bitcast [21 x i8]* %5 to i8*
%12 = bitcast [19 x i8]* %6 to i8*
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %14)
store i32 19, i32* %7
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%17 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%19 = load i8, i8* %3
%20 = call i32 @xor_enc_one_byte_key(i8* %17, i8* %18, i8 signext %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%23 = load i32, i32* %7
%24 = call i32 @print_char(i8* %22, i32 %23)
%25 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%26 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%27 = load i8, i8* %3
%28 = call i32 @xor_enc_one_byte_key(i8* %25, i8* %26, i8 signext %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%30 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%31 = load i32, i32* %7
%32 = call i32 @print_char(i8* %30, i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%34 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%36 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%37 = call i32 @xor_enc_short_key(i8* %34, i8* %35, i8* %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%40 = load i32, i32* %7
%41 = call i32 @print_char(i8* %39, i32 %40)
%42 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%43 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%44 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%45 = call i32 @xor_enc_short_key(i8* %42, i8* %43, i8* %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%47 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%48 = load i32, i32* %7
%49 = call i32 @print_char(i8* %47, i32 %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%51 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%52 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%53 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%54 = call i32 @xor_enc_stream_cipher(i8* %51, i8* %52, i8* %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%57 = load i32, i32* %7
%58 = call i32 @print_char(i8* %56, i32 %57)
%59 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%60 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%61 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%62 = call i32 @xor_enc_stream_cipher(i8* %59, i8* %60, i8* %61)
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%64 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%65 = load i32, i32* %7
%66 = call i32 @print_char(i8* %64, i32 %65)
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%68 = bitcast [32 x i8]* %8 to i8*
%69 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%70 = call i32 @gen_key(i8* %69, i32 32)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%72 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%73 = call i32 @print_char(i8* %72, i32 32)
%74 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%75 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%76 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%77 = call i32 @xor_enc_stream_cipher(i8* %74, i8* %75, i8* %76)
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%79 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%80 = load i32, i32* %7
%81 = call i32 @print_char(i8* %79, i32 %80)
%82 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%83 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%84 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%85 = call i32 @xor_enc_stream_cipher(i8* %82, i8* %83, i8* %84)
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%87 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%88 = load i32, i32* %7
%89 = call i32 @print_char(i8* %87, i32 %88)
ret i32 0
}

LLVM IR (-O2):
@__const.main.key2 = [5 x i8] c"Abcd\00"
@__const.main.key3 = [21 x i8] c"Abcdabcdabciabcdabcd\00"
@__const.main.plain = [19 x i8] c"This is plain text\00"
@.str = [19 x i8] c"Original string: \00"
@.str.3 = [19 x i8] c"Encrypted string: \00"
@.str.4 = [19 x i8] c"Decrypted string: \00"
@.str.8 = [19 x i8] c"Generated key : \00"
@str = [22 x i8] c"---- Test case 1 ----\00"
@str.9 = [22 x i8] c"---- Test case 2 ----\00"
@str.10 = [22 x i8] c"---- Test case 3 ----\00"
@str.11 = [22 x i8] c"---- Test case 4 ----\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = alloca [5 x i8]
%3 = alloca [21 x i8]
%4 = alloca [19 x i8]
%5 = alloca [32 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [19 x i8], [19 x i8]* %4, i64 0, i64 0
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @puts(i8* %9)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%13 = call i32 @xor_enc_one_byte_key(i8* %9, i8* %6, i8 signext 65)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @print_char(i8* %6, i32 19)
%16 = call i32 @xor_enc_one_byte_key(i8* %6, i8* %9, i8 signext 65)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 @print_char(i8* %9, i32 19)
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.9, i64 0, i64 0))
%20 = call i32 @xor_enc_short_key(i8* %9, i8* %6, i8* %7)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 @print_char(i8* %6, i32 19)
%23 = call i32 @xor_enc_short_key(i8* %6, i8* %9, i8* %7)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%25 = call i32 @print_char(i8* %9, i32 19)
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.10, i64 0, i64 0))
%27 = call i32 @xor_enc_stream_cipher(i8* %9, i8* %6, i8* %8)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 @print_char(i8* %6, i32 19)
%30 = call i32 @xor_enc_stream_cipher(i8* %6, i8* %9, i8* %8)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%32 = call i32 @print_char(i8* %9, i32 19)
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.11, i64 0, i64 0))
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%35 = call i32 @gen_key(i8* %34, i32 32)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%37 = call i32 @print_char(i8* %34, i32 32)
%38 = call i32 @xor_enc_stream_cipher(i8* %9, i8* %6, i8* %34)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%40 = call i32 @print_char(i8* %6, i32 19)
%41 = call i32 @xor_enc_stream_cipher(i8* %6, i8* %9, i8* %34)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%43 = call i32 @print_char(i8* %9, i32 19)
ret i32 0
}