#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 /*<<< orphan*/, int, int /*<<< orphan*/,
                            int /*<<< orphan*/ *, char *, char *,
                            int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strlen(char *);
int main() {
  char pdu[4096];
  char *phone_number = "06709405300";
  char *message =
      "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      "xxxxxxyyyyyyyyyyzzzzzzzzzzmmmmmmmmmm";
  make_pdu(phone_number, message, strlen(message), -1, 0, 1, 0, NULL, "new",
           pdu, 0, 0, 0, 0, NULL);
  printf("%s\n", pdu);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1080,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rax
mov    %rax,-0x1018(%rbp)
lea    0xeb5(%rip),%rax
mov    %rax,-0x1020(%rbp)
mov    -0x1018(%rbp),%rax
mov    %rax,-0x1030(%rbp)
mov    -0x1020(%rbp),%rax
mov    %rax,-0x1028(%rbp)
mov    -0x1020(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1030(%rbp),%rdi
mov    -0x1028(%rbp),%rsi
mov    %eax,%edx
lea    -0x1010(%rbp),%rax
mov    $0xffffffff,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
xor    %r10d,%r10d
lea    0xf0c(%rip),%r10
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x0,0x30(%rsp)
movl   $0x0,0x38(%rsp)
movq   $0x0,0x40(%rsp)
call   1050 <make_pdu@plt>
lea    -0x1010(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1080,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
lea    0xecb(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
sub    $0x8,%rsp
lea    0x8(%rsp),%r14
lea    0xf68(%rip),%r10
lea    0xea0(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
mov    $0xffffffff,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   %r14
push   %r10
push   $0x0
push   $0x0
call   1050 <make_pdu@plt>
add    $0x50,%rsp
lea    0xf30(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"06709405300\00"
@.str.1 = [181 x i8] c"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyzzzzzzzzzzmmmmmmmmmm\00"
@.str.2 = [4 x i8] c"new\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4096 x i8]
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.1, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%10 = call i32 @make_pdu(i8* %5, i8* %6, i32 %8, i32 -1, i32 0, i32 1, i32 0, i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %9, i32 0, i32 0, i32 0, i32 0, i32* null)
%11 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"06709405300\00"
@.str.1 = [181 x i8] c"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyzzzzzzzzzzmmmmmmmmmm\00"
@.str.2 = [4 x i8] c"new\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @strlen(i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @make_pdu(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 -1, i32 0, i32 1, i32 0, i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2, i32 0, i32 0, i32 0, i32 0, i32* null)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
ret i32 0
}