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

/* Variables and functions */
int /*<<< orphan*/ GprsM590eLock();
int /*<<< orphan*/ GprsM590eUnLock();
int /*<<< orphan*/ GprsM590eWrite(unsigned char *, unsigned int);
unsigned int snprintf(char *, int, char *);
int GprsSetPPPClose(void) {
  int ret = 0;
  unsigned char buffer[200] = {0};
  unsigned int index = 0;
  GprsM590eLock();
  index = snprintf((char *)buffer, sizeof(buffer), "AT+XIIC=0\r");
  GprsM590eWrite(buffer, index);
  GprsM590eUnLock();
  return ret;
}


x86 assembly (clang, -O0):
<GprsSetPPPClose>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
movl   $0x0,-0xd4(%rbp)
mov    $0x0,%al
call   1070 <GprsM590eLock@plt>
lea    -0xd0(%rbp),%rdi
mov    $0xc8,%esi
lea    0xe67(%rip),%rdx
call   1040 <snprintf@plt>
mov    %eax,-0xd4(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0xd4(%rbp),%esi
call   1060 <GprsM590eWrite@plt>
mov    $0x0,%al
call   1030 <GprsM590eUnLock@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GprsSetPPPClose>:
push   %rbx
sub    $0xd0,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0xc0(%rsp)
xor    %eax,%eax
call   1060 <GprsM590eLock@plt>
lea    0xe54(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <GprsM590eWrite@plt>
xor    %eax,%eax
call   1030 <GprsM590eUnLock@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"AT+XIIC=0\0D\00"
define i32 @GprsSetPPPClose() {
%1 = alloca i32
%2 = alloca [200 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [200 x i8]* %2 to i8*
store i32 0, i32* %3
%5 = call i32 (...) @GprsM590eLock()
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%7 = call i32 @snprintf(i8* %6, i32 200, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 %7, i32* %3
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i32 @GprsM590eWrite(i8* %8, i32 %9)
%11 = call i32 (...) @GprsM590eUnLock()
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [11 x i8] c"AT+XIIC=0\0D\00"
define i32 @GprsSetPPPClose() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @GprsM590eLock()
%4 = call i32 @snprintf(i8* %2, i32 200, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @GprsM590eWrite(i8* %2, i32 %4)
%6 = call i32 (...) @GprsM590eUnLock()
ret i32 0
}