#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*/ make_pdu(char *, char *, int /*<<< orphan*/, int, int, int,
                            int, char *, char *, char *, int, int, int, int,
                            char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ splitpdu(char *, char *, int *, char *, char *, char *,
                            char *, char *, int *, char *, char *, int *, int *,
                            char *, int *, int *, char *, int *, int);
int /*<<< orphan*/ strlen(char *);
int main(void) {
  char *message = "viltsik";
  char *to = "3725215471";
  int alphabet = 1;
  int flash = 0;
  int with_udh = 0;
  char *udh_data = "";
  char *mode = "new";
  int report = 0;
  char pdu[1024] = {0};
  int validity = 167;
  int system_msg = 0;
  int replace_msg = 0;
  int to_type = 1;
  char *smsc = "";
  make_pdu(to, message, strlen(message), alphabet, flash, report, with_udh,
           udh_data, mode, pdu, validity, replace_msg, system_msg, to_type,
           smsc);
  printf("\nPDU: %s\n\n", pdu);
  char *mode1 = "new";
  int alphabet1[3] = {0};
  char sendr[25] = {0};
  char date[25] = {0};
  char recvd_time[25] = {0};
  char message1[1024] = {0};
  char smsc1[25] = {0};
  int with_udh1[3] = {0};
  char a_udh_data[3] = {0};
  char a_udh_type[3] = {0};
  int is_statusreport;
  int is_unsupported_pdu;
  char from_toa[3] = {0};
  int report1[2] = {0};
  int replace[2] = {0};
  char warning_headers[20] = {0};
  int flash1[2] = {0};
  int bin_udh = 0;
  char *received_msg = "07916998051030F2040B916998775706F8000041019251822061125"
                       "4791E447F83E4E530194447A7E72E10";
  splitpdu(received_msg, mode1, alphabet1, sendr, date, recvd_time, message1,
           smsc1, with_udh1, a_udh_data, a_udh_type, &is_statusreport,
           &is_unsupported_pdu, from_toa, report1, replace, warning_headers,
           flash1, bin_udh);
  printf("received message = %s from sender = %s at time = %s\n", message1,
         sendr, recvd_time);
  splitpdu(pdu, mode1, alphabet1, sendr, date, recvd_time, message1, smsc1,
           with_udh1, a_udh_data, a_udh_type, &is_statusreport,
           &is_unsupported_pdu, from_toa, report1, replace, warning_headers,
           flash1, bin_udh);
  if (!is_unsupported_pdu) {
    printf("there is a msg\n");
  } else {
    printf("there's a problem with that pdu. It isn't supported!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa38,%rsp
movl   $0x0,-0x2c(%rbp)
lea    0xe8e(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe8b(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x1,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
lea    0xe84(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xe6b(%rip),%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
lea    -0x470(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
movl   $0xa7,-0x474(%rbp)
movl   $0x0,-0x478(%rbp)
movl   $0x0,-0x47c(%rbp)
movl   $0x1,-0x480(%rbp)
lea    0xe2c(%rip),%rax
mov    %rax,-0x488(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x9f8(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x9f0(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x9f8(%rbp),%rdi
mov    -0x9f0(%rbp),%rsi
mov    %eax,%edx
mov    -0x44(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x64(%rbp),%r9d
mov    -0x4c(%rbp),%eax
mov    %eax,-0x9e4(%rbp)
mov    -0x58(%rbp),%r13
mov    -0x60(%rbp),%r12
lea    -0x470(%rbp),%r15
mov    -0x474(%rbp),%r14d
mov    -0x47c(%rbp),%ebx
mov    -0x478(%rbp),%r11d
mov    -0x480(%rbp),%r10d
mov    -0x488(%rbp),%rax
mov    %rax,-0x9e0(%rbp)
mov    -0x9e4(%rbp),%eax
mov    %eax,(%rsp)
mov    -0x9e0(%rbp),%rax
mov    %r13,0x8(%rsp)
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14d,0x20(%rsp)
mov    %ebx,0x28(%rsp)
mov    %r11d,0x30(%rsp)
mov    %r10d,0x38(%rsp)
mov    %rax,0x40(%rsp)
call   1060 <make_pdu@plt>
lea    -0x470(%rbp),%rsi
lea    0xd56(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd44(%rip),%rax
mov    %rax,-0x490(%rbp)
lea    -0x49c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
lea    -0x4c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x19,%edx
call   1050 <memset@plt>
lea    -0x4e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x19,%edx
call   1050 <memset@plt>
lea    -0x500(%rbp),%rdi
xor    %esi,%esi
mov    $0x19,%edx
call   1050 <memset@plt>
lea    -0x900(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
lea    -0x920(%rbp),%rdi
xor    %esi,%esi
mov    $0x19,%edx
call   1050 <memset@plt>
lea    -0x92c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
lea    -0x92f(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1050 <memset@plt>
lea    -0x932(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1050 <memset@plt>
lea    -0x93f(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1050 <memset@plt>
lea    -0x948(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
lea    -0x950(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
lea    -0x970(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1050 <memset@plt>
lea    -0x978(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
movl   $0x0,-0x97c(%rbp)
lea    0xc31(%rip),%rax
mov    %rax,-0x988(%rbp)
mov    -0x988(%rbp),%rdi
mov    -0x490(%rbp),%rsi
lea    -0x49c(%rbp),%rdx
lea    -0x4c0(%rbp),%rcx
lea    -0x4e0(%rbp),%r8
lea    -0x500(%rbp),%r9
lea    -0x900(%rbp),%rax
lea    -0x920(%rbp),%r10
mov    %r10,-0x9d8(%rbp)
lea    -0x92c(%rbp),%r10
mov    %r10,-0x9d0(%rbp)
lea    -0x92f(%rbp),%r10
mov    %r10,-0x9c8(%rbp)
lea    -0x932(%rbp),%r10
mov    %r10,-0x9c0(%rbp)
lea    -0x93f(%rbp),%r15
lea    -0x948(%rbp),%r14
lea    -0x950(%rbp),%rbx
lea    -0x970(%rbp),%r11
lea    -0x978(%rbp),%r10
mov    -0x97c(%rbp),%r12d
mov    %r12d,-0x9b4(%rbp)
lea    -0x938(%rbp),%r13
lea    -0x93c(%rbp),%r12
mov    %rax,(%rsp)
mov    -0x9d8(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x9d0(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x9c8(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x9c0(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x9b4(%rbp),%eax
mov    %r13,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r11,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %eax,0x60(%rsp)
call   1070 <splitpdu@plt>
lea    -0x900(%rbp),%rsi
lea    -0x4c0(%rbp),%rdx
lea    -0x500(%rbp),%rcx
lea    0xb57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x470(%rbp),%rdi
mov    -0x490(%rbp),%rsi
lea    -0x49c(%rbp),%rdx
lea    -0x4c0(%rbp),%rcx
lea    -0x4e0(%rbp),%r8
lea    -0x500(%rbp),%r9
lea    -0x900(%rbp),%rax
lea    -0x920(%rbp),%r10
mov    %r10,-0x9b0(%rbp)
lea    -0x92c(%rbp),%r10
mov    %r10,-0x9a8(%rbp)
lea    -0x92f(%rbp),%r10
mov    %r10,-0x9a0(%rbp)
lea    -0x932(%rbp),%r10
mov    %r10,-0x998(%rbp)
lea    -0x93f(%rbp),%r15
lea    -0x948(%rbp),%r14
lea    -0x950(%rbp),%rbx
lea    -0x970(%rbp),%r11
lea    -0x978(%rbp),%r10
mov    -0x97c(%rbp),%r12d
mov    %r12d,-0x98c(%rbp)
lea    -0x938(%rbp),%r13
lea    -0x93c(%rbp),%r12
mov    %rax,(%rsp)
mov    -0x9b0(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x9a8(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x9a0(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x998(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x98c(%rbp),%eax
mov    %r13,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r11,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %eax,0x60(%rsp)
call   1070 <splitpdu@plt>
cmpl   $0x0,-0x93c(%rbp)
jne    1657 <main+0x507>
lea    0xa63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1665 <main+0x515>
lea    0xa60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8f8,%rsp
lea    0x4f0(%rsp),%r14
mov    $0x400,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
lea    0xe71(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
sub    $0x8,%rsp
lea    0xe7f(%rip),%r10
lea    0xe6a(%rip),%rbp
lea    0xe58(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %r10
push   $0x1
push   $0x0
push   $0x0
push   $0xa7
push   %r14
push   %rbp
push   %r10
push   $0x0
call   1070 <make_pdu@plt>
add    $0x50,%rsp
lea    0xe33(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0x48(%rsp)
movq   $0x0,0x40(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x79(%rsp)
movaps %xmm0,0x70(%rsp)
movups %xmm0,0xb9(%rsp)
movaps %xmm0,0xb0(%rsp)
movups %xmm0,0xd9(%rsp)
movaps %xmm0,0xd0(%rsp)
lea    0xf0(%rsp),%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xorps  %xmm0,%xmm0
movups %xmm0,0x99(%rsp)
movaps %xmm0,0x90(%rsp)
xorps  %xmm0,%xmm0
movl   $0x0,0x38(%rsp)
movq   $0x0,0x30(%rsp)
movb   $0x0,0xe(%rsp)
movw   $0x0,0xc(%rsp)
movb   $0x0,0xa(%rsp)
movw   $0x0,0x8(%rsp)
movb   $0x0,0x12(%rsp)
movw   $0x0,0x10(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x20(%rsp)
movaps %xmm0,0x50(%rsp)
movl   $0x0,0x60(%rsp)
movq   $0x0,0x18(%rsp)
sub    $0x8,%rsp
lea    0x20(%rsp),%rbp
lea    0x58(%rsp),%rax
lea    0x28(%rsp),%rbx
lea    0x30(%rsp),%r10
lea    0x18(%rsp),%r15
lea    0x1c(%rsp),%r13
lea    0x54(%rsp),%r12
lea    0xd41(%rip),%rdi
lea    0x48(%rsp),%rdx
lea    0x78(%rsp),%rcx
lea    0xb8(%rsp),%r8
lea    0xd8(%rsp),%r14
lea    0xd11(%rip),%rsi
mov    %r14,%r9
push   $0x0
push   %rbp
push   %rax
push   %rbx
push   %r10
push   %r15
mov    %r15,%rbp
push   %r13
push   %r12
lea    0x50(%rsp),%rax
push   %rax
lea    0x5c(%rsp),%rax
push   %rax
lea    0x88(%rsp),%rax
push   %rax
lea    0xf0(%rsp),%rax
push   %rax
lea    0x158(%rsp),%rax
push   %rax
call   1080 <splitpdu@plt>
add    $0x70,%rsp
lea    0xd2d(%rip),%rdi
lea    0xf0(%rsp),%rsi
mov    %rsi,%r15
lea    0x70(%rsp),%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
sub    $0x8,%rsp
lea    0x4f8(%rsp),%rdi
lea    0xc9a(%rip),%rsi
lea    0x48(%rsp),%rdx
lea    0x78(%rsp),%rcx
lea    0xb8(%rsp),%r8
mov    %r14,%r9
push   $0x0
lea    0x28(%rsp),%rax
push   %rax
lea    0x68(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
lea    0x50(%rsp),%rax
push   %rax
push   %rbp
push   %r13
push   %r12
lea    0x50(%rsp),%rax
push   %rax
lea    0x5c(%rsp),%rax
push   %rax
lea    0x88(%rsp),%rax
push   %rax
lea    0xf0(%rsp),%rax
push   %rax
push   %r15
call   1080 <splitpdu@plt>
add    $0x70,%rsp
cmpl   $0x0,0x14(%rsp)
lea    0xccc(%rip),%rax
lea    0xcd4(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"viltsik\00"
@.str.1 = [11 x i8] c"3725215471\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"new\00"
@.str.4 = [11 x i8] c"\0APDU: %s\0A\0A\00"
@.str.5 = [87 x i8] c"07916998051030F2040B916998775706F80000410192518220611254791E447F83E4E530194447A7E72E10\00"
@.str.6 = [53 x i8] c"received message = %s from sender = %s at time = %s\0A\00"
@.str.7 = [16 x i8] c"there is a msg\0A\00"
@.str.8 = [54 x i8] c"there's a problem with that pdu. It isn't supported!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca [1024 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca [3 x i32]
%18 = alloca [25 x i8]
%19 = alloca [25 x i8]
%20 = alloca [25 x i8]
%21 = alloca [1024 x i8]
%22 = alloca [25 x i8]
%23 = alloca [3 x i32]
%24 = alloca [3 x i8]
%25 = alloca [3 x i8]
%26 = alloca i32
%27 = alloca i32
%28 = alloca [3 x i8]
%29 = alloca [2 x i32]
%30 = alloca [2 x i32]
%31 = alloca [20 x i8]
%32 = alloca [2 x i32]
%33 = alloca i32
%34 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i32 1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %8
store i32 0, i32* %9
%35 = bitcast [1024 x i8]* %10 to i8*
store i32 167, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 1, i32* %14
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8** %15
%36 = load i8*, i8** %3
%37 = load i8*, i8** %2
%38 = load i8*, i8** %2
%39 = call i32 @strlen(i8* %38)
%40 = load i32, i32* %4
%41 = load i32, i32* %5
%42 = load i32, i32* %9
%43 = load i32, i32* %6
%44 = load i8*, i8** %7
%45 = load i8*, i8** %8
%46 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%47 = load i32, i32* %11
%48 = load i32, i32* %13
%49 = load i32, i32* %12
%50 = load i32, i32* %14
%51 = load i8*, i8** %15
%52 = call i32 @make_pdu(i8* %36, i8* %37, i32 %39, i32 %40, i32 %41, i32 %42, i32 %43, i8* %44, i8* %45, i8* %46, i32 %47, i32 %48, i32 %49, i32 %50, i8* %51)
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %53)
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %16
%55 = bitcast [3 x i32]* %17 to i8*
%56 = bitcast [25 x i8]* %18 to i8*
%57 = bitcast [25 x i8]* %19 to i8*
%58 = bitcast [25 x i8]* %20 to i8*
%59 = bitcast [1024 x i8]* %21 to i8*
%60 = bitcast [25 x i8]* %22 to i8*
%61 = bitcast [3 x i32]* %23 to i8*
%62 = bitcast [3 x i8]* %24 to i8*
%63 = bitcast [3 x i8]* %25 to i8*
%64 = bitcast [3 x i8]* %28 to i8*
%65 = bitcast [2 x i32]* %29 to i8*
%66 = bitcast [2 x i32]* %30 to i8*
%67 = bitcast [20 x i8]* %31 to i8*
%68 = bitcast [2 x i32]* %32 to i8*
store i32 0, i32* %33
store i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.5, i64 0, i64 0), i8** %34
%69 = load i8*, i8** %34
%70 = load i8*, i8** %16
%71 = getelementptr inbounds [3 x i32], [3 x i32]* %17, i64 0, i64 0
%72 = getelementptr inbounds [25 x i8], [25 x i8]* %18, i64 0, i64 0
%73 = getelementptr inbounds [25 x i8], [25 x i8]* %19, i64 0, i64 0
%74 = getelementptr inbounds [25 x i8], [25 x i8]* %20, i64 0, i64 0
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %21, i64 0, i64 0
%76 = getelementptr inbounds [25 x i8], [25 x i8]* %22, i64 0, i64 0
%77 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 0
%78 = getelementptr inbounds [3 x i8], [3 x i8]* %24, i64 0, i64 0
%79 = getelementptr inbounds [3 x i8], [3 x i8]* %25, i64 0, i64 0
%80 = getelementptr inbounds [3 x i8], [3 x i8]* %28, i64 0, i64 0
%81 = getelementptr inbounds [2 x i32], [2 x i32]* %29, i64 0, i64 0
%82 = getelementptr inbounds [2 x i32], [2 x i32]* %30, i64 0, i64 0
%83 = getelementptr inbounds [20 x i8], [20 x i8]* %31, i64 0, i64 0
%84 = getelementptr inbounds [2 x i32], [2 x i32]* %32, i64 0, i64 0
%85 = load i32, i32* %33
%86 = call i32 @splitpdu(i8* %69, i8* %70, i32* %71, i8* %72, i8* %73, i8* %74, i8* %75, i8* %76, i32* %77, i8* %78, i8* %79, i32* %26, i32* %27, i8* %80, i32* %81, i32* %82, i8* %83, i32* %84, i32 %85)
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* %21, i64 0, i64 0
%88 = getelementptr inbounds [25 x i8], [25 x i8]* %18, i64 0, i64 0
%89 = getelementptr inbounds [25 x i8], [25 x i8]* %20, i64 0, i64 0
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0), i8* %87, i8* %88, i8* %89)
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%92 = load i8*, i8** %16
%93 = getelementptr inbounds [3 x i32], [3 x i32]* %17, i64 0, i64 0
%94 = getelementptr inbounds [25 x i8], [25 x i8]* %18, i64 0, i64 0
%95 = getelementptr inbounds [25 x i8], [25 x i8]* %19, i64 0, i64 0
%96 = getelementptr inbounds [25 x i8], [25 x i8]* %20, i64 0, i64 0
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %21, i64 0, i64 0
%98 = getelementptr inbounds [25 x i8], [25 x i8]* %22, i64 0, i64 0
%99 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 0
%100 = getelementptr inbounds [3 x i8], [3 x i8]* %24, i64 0, i64 0
%101 = getelementptr inbounds [3 x i8], [3 x i8]* %25, i64 0, i64 0
%102 = getelementptr inbounds [3 x i8], [3 x i8]* %28, i64 0, i64 0
%103 = getelementptr inbounds [2 x i32], [2 x i32]* %29, i64 0, i64 0
%104 = getelementptr inbounds [2 x i32], [2 x i32]* %30, i64 0, i64 0
%105 = getelementptr inbounds [20 x i8], [20 x i8]* %31, i64 0, i64 0
%106 = getelementptr inbounds [2 x i32], [2 x i32]* %32, i64 0, i64 0
%107 = load i32, i32* %33
%108 = call i32 @splitpdu(i8* %91, i8* %92, i32* %93, i8* %94, i8* %95, i8* %96, i8* %97, i8* %98, i32* %99, i8* %100, i8* %101, i32* %26, i32* %27, i8* %102, i32* %103, i32* %104, i8* %105, i32* %106, i32 %107)
%109 = load i32, i32* %27
%110 = icmp ne i32 %109, 0
br i1 %110, label %113, label %111
111: ; preds = %0
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
br label %115
113: ; preds = %0
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0))
br label %115
115: ; preds = %113, %111
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"viltsik\00"
@.str.1 = [11 x i8] c"3725215471\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"new\00"
@.str.4 = [11 x i8] c"\0APDU: %s\0A\0A\00"
@.str.5 = [87 x i8] c"07916998051030F2040B916998775706F80000410192518220611254791E447F83E4E530194447A7E72E10\00"
@.str.6 = [53 x i8] c"received message = %s from sender = %s at time = %s\0A\00"
@str = [15 x i8] c"there is a msg\00"
@str.9 = [53 x i8] c"there's a problem with that pdu. It isn't supported!\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca [3 x i32]
%3 = alloca [25 x i8]
%4 = alloca [25 x i8]
%5 = alloca [25 x i8]
%6 = alloca [1024 x i8]
%7 = alloca [25 x i8]
%8 = alloca [3 x i32]
%9 = alloca [3 x i8]
%10 = alloca [3 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca [3 x i8]
%14 = alloca i64
%15 = alloca i64
%16 = alloca [20 x i8]
%17 = alloca i64
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%19 = tail call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @make_pdu(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %19, i32 1, i32 0, i32 0, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %18, i32 167, i32 0, i32 0, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %18)
%22 = bitcast [3 x i32]* %2 to i8*
%23 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%24 = getelementptr inbounds [25 x i8], [25 x i8]* %4, i64 0, i64 0
%25 = getelementptr inbounds [25 x i8], [25 x i8]* %5, i64 0, i64 0
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%27 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%28 = bitcast [3 x i32]* %8 to i8*
%29 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%30 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%31 = bitcast i32* %11 to i8*
%32 = bitcast i32* %12 to i8*
%33 = getelementptr inbounds [3 x i8], [3 x i8]* %13, i64 0, i64 0
%34 = bitcast i64* %14 to i8*
store i64 0, i64* %14
%35 = bitcast i64* %15 to i8*
store i64 0, i64* %15
%36 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 0
%37 = bitcast i64* %17 to i8*
store i64 0, i64* %17
%38 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
%40 = bitcast i64* %14 to i32*
%41 = bitcast i64* %15 to i32*
%42 = bitcast i64* %17 to i32*
%43 = call i32 @splitpdu(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %38, i8* %23, i8* %24, i8* %25, i8* %26, i8* %27, i32* %39, i8* %29, i8* %30, i32* %11, i32* %12, i8* %33, i32* %40, i32* %41, i8* %36, i32* %42, i32 0)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0), i8* %26, i8* %23, i8* %25)
%45 = call i32 @splitpdu(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %38, i8* %23, i8* %24, i8* %25, i8* %26, i8* %27, i32* %39, i8* %29, i8* %30, i32* %11, i32* %12, i8* %33, i32* %40, i32* %41, i8* %36, i32* %42, i32 0)
%46 = load i32, i32* %12
%47 = icmp eq i32 %46, 0
%48 = select i1 %47, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @str.9, i64 0, i64 0)
%49 = call i32 @puts(i8* dereferenceable(1) %48)
ret i32 0
}