#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*/ EspDrv_espEmptyBuf(int /*<<< orphan*/);
int /*<<< orphan*/ EspDrv_sendCmd(char *, int);
int /*<<< orphan*/ delay(int);
void EspDrv_reset() {
  ;
  EspDrv_sendCmd("AT+RST", 1000);
  delay(3000);
  EspDrv_espEmptyBuf((0));
  EspDrv_sendCmd("ATE0", 1000);
  EspDrv_sendCmd("AT+CWMODE=1", 1000);
  delay(200);
  EspDrv_sendCmd("AT+CIPMUX=1", 1000);
  EspDrv_sendCmd("AT+CIPDINFO=1", 1000);
  EspDrv_sendCmd("AT+CWAUTOCONN=0", 1000);
  EspDrv_sendCmd("AT+CWDHCP=1,1", 1000);
  delay(200);
}


x86 assembly (clang, -O0):
<EspDrv_reset>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
mov    $0xbb8,%edi
call   1050 <delay@plt>
xor    %edi,%edi
call   1040 <EspDrv_espEmptyBuf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xe9e(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
mov    $0xc8,%edi
call   1050 <delay@plt>
lea    0xe8f(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xe8a(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xe87(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xe86(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
mov    $0xc8,%edi
call   1050 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EspDrv_reset>:
push   %rax
lea    0xec8(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
mov    $0xbb8,%edi
call   1050 <delay@plt>
xor    %edi,%edi
call   1040 <EspDrv_espEmptyBuf@plt>
lea    0xead(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xea1(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
mov    $0xc8,%edi
call   1050 <delay@plt>
lea    0xe92(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xe8d(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xe8a(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
lea    0xe89(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <EspDrv_sendCmd@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1050 <delay@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"AT+RST\00"
@.str.1 = [5 x i8] c"ATE0\00"
@.str.2 = [12 x i8] c"AT+CWMODE=1\00"
@.str.3 = [12 x i8] c"AT+CIPMUX=1\00"
@.str.4 = [14 x i8] c"AT+CIPDINFO=1\00"
@.str.5 = [16 x i8] c"AT+CWAUTOCONN=0\00"
@.str.6 = [14 x i8] c"AT+CWDHCP=1,1\00"
define void @EspDrv_reset() {
%1 = call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1000)
%2 = call i32 @delay(i32 3000)
%3 = call i32 @EspDrv_espEmptyBuf(i32 0)
%4 = call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1000)
%5 = call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 1000)
%6 = call i32 @delay(i32 200)
%7 = call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 1000)
%8 = call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 1000)
%9 = call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 1000)
%10 = call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 1000)
%11 = call i32 @delay(i32 200)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"AT+RST\00"
@.str.1 = [5 x i8] c"ATE0\00"
@.str.2 = [12 x i8] c"AT+CWMODE=1\00"
@.str.3 = [12 x i8] c"AT+CIPMUX=1\00"
@.str.4 = [14 x i8] c"AT+CIPDINFO=1\00"
@.str.5 = [16 x i8] c"AT+CWAUTOCONN=0\00"
@.str.6 = [14 x i8] c"AT+CWDHCP=1,1\00"
define void @EspDrv_reset() {
%1 = tail call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1000)
%2 = tail call i32 @delay(i32 3000)
%3 = tail call i32 @EspDrv_espEmptyBuf(i32 0)
%4 = tail call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1000)
%5 = tail call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 1000)
%6 = tail call i32 @delay(i32 200)
%7 = tail call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 1000)
%8 = tail call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 1000)
%9 = tail call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 1000)
%10 = tail call i32 @EspDrv_sendCmd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 1000)
%11 = tail call i32 @delay(i32 200)
ret void
}