#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*/ nmea_send(int, char *, ...);
int /*<<< orphan*/ sleep(int);
void config_raw(int fd) {
  nmea_send(fd, "$PASHS,NME,ALL,A,OFF");
  nmea_send(fd, "$PASHS,NME,ALL,B,OFF");
  nmea_send(fd, "$PASHS,NME,GGA,A,ON");
  nmea_send(fd, "$PASHS,NME,GSA,A,ON");
  nmea_send(fd, "$PASHS,NME,GSV,A,ON");
  nmea_send(fd, "$PASHS,NME,RMC,A,ON");
  nmea_send(fd, "$PASHS,NME,ZDA,A,ON");
  nmea_send(fd, "$PASHS,INI,%d,%d,,,0,", 8, 5);
  sleep(6);
  nmea_send(fd, "$PASHS,WAS,ON");
  nmea_send(fd, "$PASHS,NME,POS,A,ON");
  nmea_send(fd, "$PASHS,NME,SAT,A,ON");
  nmea_send(fd, "$PASHS,NME,MCA,A,ON");
  nmea_send(fd, "$PASHS,NME,PBN,A,ON");
  nmea_send(fd, "$PASHS,NME,SNV,A,ON,10");
  nmea_send(fd, "$PASHS,NME,XMG,A,ON");
}


x86 assembly (clang, -O0):
<config_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xecb(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xee2(%rip),%rsi
mov    $0x8,%edx
mov    $0x5,%ecx
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    $0x6,%edi
call   1040 <sleep@plt>
mov    -0x4(%rbp),%edi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
mov    -0x4(%rbp),%edi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <nmea_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_raw>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xedd(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xee2(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xee6(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xeea(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xeee(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xef2(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xef6(%rip),%rsi
mov    %ebx,%edi
mov    $0x8,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <nmea_send@plt>
mov    $0x6,%edi
call   1040 <sleep@plt>
lea    0xee8(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xee6(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xeea(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xeee(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xef2(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xef6(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <nmea_send@plt>
lea    0xefd(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <nmea_send@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"$PASHS,NME,ALL,A,OFF\00"
@.str.1 = [21 x i8] c"$PASHS,NME,ALL,B,OFF\00"
@.str.2 = [20 x i8] c"$PASHS,NME,GGA,A,ON\00"
@.str.3 = [20 x i8] c"$PASHS,NME,GSA,A,ON\00"
@.str.4 = [20 x i8] c"$PASHS,NME,GSV,A,ON\00"
@.str.5 = [20 x i8] c"$PASHS,NME,RMC,A,ON\00"
@.str.6 = [20 x i8] c"$PASHS,NME,ZDA,A,ON\00"
@.str.7 = [22 x i8] c"$PASHS,INI,%d,%d,,,0,\00"
@.str.8 = [14 x i8] c"$PASHS,WAS,ON\00"
@.str.9 = [20 x i8] c"$PASHS,NME,POS,A,ON\00"
@.str.10 = [20 x i8] c"$PASHS,NME,SAT,A,ON\00"
@.str.11 = [20 x i8] c"$PASHS,NME,MCA,A,ON\00"
@.str.12 = [20 x i8] c"$PASHS,NME,PBN,A,ON\00"
@.str.13 = [23 x i8] c"$PASHS,NME,SNV,A,ON,10\00"
@.str.14 = [20 x i8] c"$PASHS,NME,XMG,A,ON\00"
define void @config_raw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i8*, ...) @nmea_send(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 (i32, i8*, ...) @nmea_send(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 (i32, i8*, ...) @nmea_send(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 (i32, i8*, ...) @nmea_send(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = call i32 (i32, i8*, ...) @nmea_send(i32 %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32, i32* %2
%14 = call i32 (i32, i8*, ...) @nmea_send(i32 %13, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32, i32* %2
%16 = call i32 (i32, i8*, ...) @nmea_send(i32 %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32, i32* %2
%18 = call i32 (i32, i8*, ...) @nmea_send(i32 %17, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 8, i32 5)
%19 = call i32 @sleep(i32 6)
%20 = load i32, i32* %2
%21 = call i32 (i32, i8*, ...) @nmea_send(i32 %20, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%22 = load i32, i32* %2
%23 = call i32 (i32, i8*, ...) @nmea_send(i32 %22, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%24 = load i32, i32* %2
%25 = call i32 (i32, i8*, ...) @nmea_send(i32 %24, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%26 = load i32, i32* %2
%27 = call i32 (i32, i8*, ...) @nmea_send(i32 %26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%28 = load i32, i32* %2
%29 = call i32 (i32, i8*, ...) @nmea_send(i32 %28, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%30 = load i32, i32* %2
%31 = call i32 (i32, i8*, ...) @nmea_send(i32 %30, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%32 = load i32, i32* %2
%33 = call i32 (i32, i8*, ...) @nmea_send(i32 %32, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"$PASHS,NME,ALL,A,OFF\00"
@.str.1 = [21 x i8] c"$PASHS,NME,ALL,B,OFF\00"
@.str.2 = [20 x i8] c"$PASHS,NME,GGA,A,ON\00"
@.str.3 = [20 x i8] c"$PASHS,NME,GSA,A,ON\00"
@.str.4 = [20 x i8] c"$PASHS,NME,GSV,A,ON\00"
@.str.5 = [20 x i8] c"$PASHS,NME,RMC,A,ON\00"
@.str.6 = [20 x i8] c"$PASHS,NME,ZDA,A,ON\00"
@.str.7 = [22 x i8] c"$PASHS,INI,%d,%d,,,0,\00"
@.str.8 = [14 x i8] c"$PASHS,WAS,ON\00"
@.str.9 = [20 x i8] c"$PASHS,NME,POS,A,ON\00"
@.str.10 = [20 x i8] c"$PASHS,NME,SAT,A,ON\00"
@.str.11 = [20 x i8] c"$PASHS,NME,MCA,A,ON\00"
@.str.12 = [20 x i8] c"$PASHS,NME,PBN,A,ON\00"
@.str.13 = [23 x i8] c"$PASHS,NME,SNV,A,ON,10\00"
@.str.14 = [20 x i8] c"$PASHS,NME,XMG,A,ON\00"
define void @config_raw(i32 %0) {
%2 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 8, i32 5)
%10 = tail call i32 @sleep(i32 6)
%11 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%15 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%16 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%17 = tail call i32 (i32, i8*, ...) @nmea_send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
ret void
}