#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*/ send_string;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *, char *,
                            char *, char *, char *, char *, char *, char *,
                            char *, char *, char *, char *, char *, char *,
                            char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char send_string[1024];
  char A7_device_id_str[] = "1234457777";
  char A7_updated_time_str[] = "123455";
  char A7_updated_date_str[] = "20022017";
  char A7_latitude_str[] = "0.333333333";
  char A7_longitude_str[] = "9.000000000";
  char tcp_string1[] = "at+cipstatus\r\n";
  char tcp_string2[] = "AT+CIPSTART=\"TCP\",\"www.iisl.co.in\",80\r\n";
  char tcp_string3[] = "at+cipstatus\r\n";
  char tcp_string4[] = "AT+CIPSEND\r\n";
  char tcp_header_str[] =
      "GET "
      "http://iisl.co.in/gps_control_panel/gps_mapview/adddevicelocation.php?";
  char tcp_body_str[] = " HTTP/1.0\r\n";
  char tcp_footer_str[] = "Host: www.iisl.co.in:8080\r\n";
  char end_of_file_byte = (char)26;
  char tcp_string_end[1];
  char tcp_string_end1[] = "\r\n";
  char tcp_string20[] = "AT+CIPCLOSE\r\n";
  char tcp_string21[] = "at+cifsr\r\n";
  tcp_string_end[0] = end_of_file_byte;
  strcpy(A7_device_id_str, "1234567890");
  snprintf(send_string, sizeof(send_string),
           "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", tcp_header_str,
           "device_id=", A7_device_id_str, "&", "latitude=", A7_latitude_str,
           "&", "longitude=", A7_longitude_str, "&",
           "utcdate_stamp=", A7_updated_date_str, "&",
           "utctime_stamp=", A7_updated_time_str, tcp_body_str, tcp_footer_str);
  printf("send string |%s|", send_string);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x5c8,%rsp
mov    0xea5(%rip),%rax
mov    %rax,-0x43b(%rbp)
mov    0xe9f(%rip),%ax
mov    %ax,-0x433(%rbp)
mov    0xe94(%rip),%al
mov    %al,-0x431(%rbp)
mov    0xe89(%rip),%eax
mov    %eax,-0x442(%rbp)
mov    0xe80(%rip),%ax
mov    %ax,-0x43e(%rbp)
mov    0xe75(%rip),%al
mov    %al,-0x43c(%rbp)
mov    0xe69(%rip),%rax
mov    %rax,-0x44b(%rbp)
mov    0xe64(%rip),%al
mov    %al,-0x443(%rbp)
mov    0xe58(%rip),%rax
mov    %rax,-0x457(%rbp)
mov    0xe53(%rip),%eax
mov    %eax,-0x44f(%rbp)
mov    0xe4a(%rip),%rax
mov    %rax,-0x463(%rbp)
mov    0xe45(%rip),%eax
mov    %eax,-0x45b(%rbp)
mov    0xe3c(%rip),%rax
mov    %rax,-0x472(%rbp)
mov    0xe37(%rip),%eax
mov    %eax,-0x46a(%rbp)
mov    0xe2e(%rip),%ax
mov    %ax,-0x466(%rbp)
mov    0xe23(%rip),%al
mov    %al,-0x464(%rbp)
lea    -0x4a0(%rbp),%rdi
lea    0xece(%rip),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
mov    0xdf0(%rip),%rax
mov    %rax,-0x4af(%rbp)
mov    0xdeb(%rip),%eax
mov    %eax,-0x4a7(%rbp)
mov    0xde2(%rip),%ax
mov    %ax,-0x4a3(%rbp)
mov    0xdd7(%rip),%al
mov    %al,-0x4a1(%rbp)
mov    0xdcb(%rip),%rax
mov    %rax,-0x4bc(%rbp)
mov    0xdc6(%rip),%eax
mov    %eax,-0x4b4(%rbp)
mov    0xdbe(%rip),%al
mov    %al,-0x4b0(%rbp)
lea    -0x510(%rbp),%rdi
lea    0xe8c(%rip),%rsi
mov    $0x4b,%edx
call   1060 <memcpy@plt>
mov    0xd9a(%rip),%rax
mov    %rax,-0x51c(%rbp)
mov    0xd95(%rip),%eax
mov    %eax,-0x514(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x540(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x538(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x530(%rbp)
mov    0xea0(%rip),%eax
mov    %eax,-0x528(%rbp)
movb   $0x1a,-0x541(%rbp)
mov    0xd4c(%rip),%ax
mov    %ax,-0x545(%rbp)
mov    0xd41(%rip),%al
mov    %al,-0x543(%rbp)
mov    0xd35(%rip),%rax
mov    %rax,-0x553(%rbp)
mov    0xd30(%rip),%eax
mov    %eax,-0x54b(%rbp)
mov    0xd27(%rip),%ax
mov    %ax,-0x547(%rbp)
mov    0xd1b(%rip),%rax
mov    %rax,-0x55e(%rbp)
mov    0xd15(%rip),%ax
mov    %ax,-0x556(%rbp)
mov    0xd0a(%rip),%al
mov    %al,-0x554(%rbp)
mov    -0x541(%rbp),%al
mov    %al,-0x542(%rbp)
lea    -0x43b(%rbp),%rdi
lea    0xceb(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x430(%rbp),%rdi
lea    -0x510(%rbp),%rcx
lea    -0x43b(%rbp),%r9
lea    -0x457(%rbp),%rax
mov    %rax,-0x578(%rbp)
lea    -0x463(%rbp),%r13
lea    -0x44b(%rbp),%r15
lea    -0x442(%rbp),%r11
lea    -0x51c(%rbp),%r10
lea    -0x540(%rbp),%rax
mov    %rax,-0x568(%rbp)
mov    $0x400,%esi
lea    0xc98(%rip),%rdx
lea    0xcb4(%rip),%r8
lea    0xcb8(%rip),%r14
lea    0xcb3(%rip),%rax
lea    0xcb6(%rip),%rbx
mov    %rbx,-0x570(%rbp)
lea    0xcb3(%rip),%r12
lea    0xcbb(%rip),%rbx
mov    %r14,(%rsp)
mov    %rax,0x8(%rsp)
mov    -0x578(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x570(%rbp),%rax
mov    %r14,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    -0x568(%rbp),%rax
mov    %r13,0x28(%rsp)
mov    %r14,0x30(%rsp)
mov    %r12,0x38(%rsp)
mov    %r15,0x40(%rsp)
mov    %r14,0x48(%rsp)
mov    %rbx,0x50(%rsp)
mov    %r11,0x58(%rsp)
mov    %r10,0x60(%rsp)
mov    %rax,0x68(%rsp)
call   1050 <snprintf@plt>
lea    -0x430(%rbp),%rsi
lea    0xc5d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x5c8,%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    $0x4d8,%rsp
movabs $0x3737353434333231,%rax
35 37 37
mov    %rax,0x20(%rsp)
movl   $0x373737,0x27(%rsp)
movl   $0x353534,0xb(%rsp)
movl   $0x34333231,0x8(%rsp)
34
movabs $0x3731303232303032,%rax
30 31 37
mov    %rax,0x10(%rsp)
movb   $0x0,0x18(%rsp)
movabs $0x3333333333332e30,%rax
33 33 33
mov    %rax,0x50(%rsp)
movl   $0x333333,0x58(%rsp)
movabs $0x3030303030302e39,%rax
30 30 30
mov    %rax,0x40(%rsp)
movl   $0x303030,0x48(%rsp)
movups 0xf4a(%rip),%xmm0
movups %xmm0,0xbb(%rsp)
movaps 0xf30(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xf11(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movabs $0x2e312f5054544820,%rax
2f 31 2e
mov    %rax,0x30(%rsp)
movl   $0xa0d30,0x38(%rsp)
movups 0xf09(%rip),%xmm0
movups %xmm0,0x6c(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
lea    0xe14(%rip),%rsi
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0x60(%rsp),%r13
lea    0x30(%rsp),%rbp
lea    0x8(%rsp),%r10
lea    0xe50(%rip),%r11
lea    0xe23(%rip),%rax
lea    0x10(%rsp),%r15
lea    0xe2e(%rip),%r12
lea    0xde2(%rip),%rdx
lea    0xdfe(%rip),%r8
lea    0xd0(%rsp),%r14
lea    0x80(%rsp),%rcx
mov    %rbx,%r9
mov    $0x400,%esi
mov    %r14,%rdi
push   %r13
push   %rbp
push   %r10
push   %r11
push   %rax
push   %r15
push   %r12
push   %rax
lea    0x80(%rsp),%rbp
push   %rbp
lea    0xddd(%rip),%rbp
push   %rbp
push   %rax
lea    0xa8(%rsp),%rbp
push   %rbp
lea    0xdc1(%rip),%rbp
push   %rbp
push   %rax
call   1050 <snprintf@plt>
add    $0x70,%rsp
lea    0xde2(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x4d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.A7_device_id_str = [11 x i8] c"1234457777\00"
@__const.main.A7_updated_time_str = [7 x i8] c"123455\00"
@__const.main.A7_updated_date_str = [9 x i8] c"20022017\00"
@__const.main.A7_latitude_str = [12 x i8] c"0.333333333\00"
@__const.main.A7_longitude_str = [12 x i8] c"9.000000000\00"
@__const.main.tcp_string1 = [15 x i8] c"at+cipstatus\0D\0A\00"
@__const.main.tcp_string2 = [40 x i8] c"AT+CIPSTART=\22TCP\22,\22www.iisl.co.in\22,80\0D\0A\00"
@__const.main.tcp_string3 = [15 x i8] c"at+cipstatus\0D\0A\00"
@__const.main.tcp_string4 = [13 x i8] c"AT+CIPSEND\0D\0A\00"
@__const.main.tcp_header_str = [75 x i8] c"GET http://iisl.co.in/gps_control_panel/gps_mapview/adddevicelocation.php?\00"
@__const.main.tcp_body_str = [12 x i8] c" HTTP/1.0\0D\0A\00"
@__const.main.tcp_footer_str = [28 x i8] c"Host: www.iisl.co.in:8080\0D\0A\00"
@__const.main.tcp_string_end1 = [3 x i8] c"\0D\0A\00"
@__const.main.tcp_string20 = [14 x i8] c"AT+CIPCLOSE\0D\0A\00"
@__const.main.tcp_string21 = [11 x i8] c"at+cifsr\0D\0A\00"
@.str = [11 x i8] c"1234567890\00"
@.str.1 = [35 x i8] c"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\00"
@.str.2 = [11 x i8] c"device_id=\00"
@.str.3 = [2 x i8] c"&\00"
@.str.4 = [10 x i8] c"latitude=\00"
@.str.5 = [11 x i8] c"longitude=\00"
@.str.6 = [15 x i8] c"utcdate_stamp=\00"
@.str.7 = [15 x i8] c"utctime_stamp=\00"
@.str.8 = [17 x i8] c"send string |%s|\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca [11 x i8]
%3 = alloca [7 x i8]
%4 = alloca [9 x i8]
%5 = alloca [12 x i8]
%6 = alloca [12 x i8]
%7 = alloca [15 x i8]
%8 = alloca [40 x i8]
%9 = alloca [15 x i8]
%10 = alloca [13 x i8]
%11 = alloca [75 x i8]
%12 = alloca [12 x i8]
%13 = alloca [28 x i8]
%14 = alloca i8
%15 = alloca [1 x i8]
%16 = alloca [3 x i8]
%17 = alloca [14 x i8]
%18 = alloca [11 x i8]
%19 = bitcast [11 x i8]* %2 to i8*
%20 = bitcast [7 x i8]* %3 to i8*
%21 = bitcast [9 x i8]* %4 to i8*
%22 = bitcast [12 x i8]* %5 to i8*
%23 = bitcast [12 x i8]* %6 to i8*
%24 = bitcast [15 x i8]* %7 to i8*
%25 = bitcast [40 x i8]* %8 to i8*
%26 = bitcast [15 x i8]* %9 to i8*
%27 = bitcast [13 x i8]* %10 to i8*
%28 = bitcast [75 x i8]* %11 to i8*
%29 = bitcast [12 x i8]* %12 to i8*
%30 = bitcast [28 x i8]* %13 to i8*
store i8 26, i8* %14
%31 = bitcast [3 x i8]* %16 to i8*
%32 = bitcast [14 x i8]* %17 to i8*
%33 = bitcast [11 x i8]* %18 to i8*
%34 = load i8, i8* %14
%35 = getelementptr inbounds [1 x i8], [1 x i8]* %15, i64 0, i64 0
store i8 %34, i8* %35
%36 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%37 = call i32 @strcpy(i8* %36, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%38 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%39 = getelementptr inbounds [75 x i8], [75 x i8]* %11, i64 0, i64 0
%40 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%41 = getelementptr inbounds [12 x i8], [12 x i8]* %5, i64 0, i64 0
%42 = getelementptr inbounds [12 x i8], [12 x i8]* %6, i64 0, i64 0
%43 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%44 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%45 = getelementptr inbounds [12 x i8], [12 x i8]* %12, i64 0, i64 0
%46 = getelementptr inbounds [28 x i8], [28 x i8]* %13, i64 0, i64 0
%47 = call i32 @snprintf(i8* %38, i32 1024, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %39, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %44, i8* %45, i8* %46)
%48 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%49 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %48)
ret i32 0
}

LLVM IR (-O2):
@__const.main.A7_device_id_str = [11 x i8] c"1234457777\00"
@__const.main.A7_updated_time_str = [7 x i8] c"123455\00"
@__const.main.A7_updated_date_str = [9 x i8] c"20022017\00"
@__const.main.A7_latitude_str = [12 x i8] c"0.333333333\00"
@__const.main.A7_longitude_str = [12 x i8] c"9.000000000\00"
@__const.main.tcp_header_str = [75 x i8] c"GET http://iisl.co.in/gps_control_panel/gps_mapview/adddevicelocation.php?\00"
@__const.main.tcp_body_str = [12 x i8] c" HTTP/1.0\0D\0A\00"
@__const.main.tcp_footer_str = [28 x i8] c"Host: www.iisl.co.in:8080\0D\0A\00"
@.str = [11 x i8] c"1234567890\00"
@.str.1 = [35 x i8] c"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\00"
@.str.2 = [11 x i8] c"device_id=\00"
@.str.3 = [2 x i8] c"&\00"
@.str.4 = [10 x i8] c"latitude=\00"
@.str.5 = [11 x i8] c"longitude=\00"
@.str.6 = [15 x i8] c"utcdate_stamp=\00"
@.str.7 = [15 x i8] c"utctime_stamp=\00"
@.str.8 = [17 x i8] c"send string |%s|\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca [11 x i8]
%3 = alloca [7 x i8]
%4 = alloca [9 x i8]
%5 = alloca [12 x i8]
%6 = alloca [12 x i8]
%7 = alloca [75 x i8]
%8 = alloca [12 x i8]
%9 = alloca [28 x i8]
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%11 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%14 = getelementptr inbounds [12 x i8], [12 x i8]* %5, i64 0, i64 0
%15 = getelementptr inbounds [12 x i8], [12 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [75 x i8], [75 x i8]* %7, i64 0, i64 0
%17 = getelementptr inbounds [12 x i8], [12 x i8]* %8, i64 0, i64 0
%18 = getelementptr inbounds [28 x i8], [28 x i8]* %9, i64 0, i64 0
%19 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @snprintf(i8* %10, i32 1024, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %16, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %12, i8* %17, i8* %18)
%21 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %10)
ret i32 0
}