#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*/ printf(char *, ...);
int /*<<< orphan*/ safe_exit(int);
void usage(void) {
  printf("\nradiotftp sends or listens for a tftp request\n");
  printf("\nlegal invocations:\n");
  printf("\tradiotftp_uhf\n");
  printf("\tradiotftp_vhf\n");
  printf("Build Date: %s\n", "Mar 16 2022"
                             " "
                             "07:20:09");
  printf("Doesn't use any link layer\n");
  printf("radiotftp mode [-dst] [-b] [-f] terminal [command filename] \n");
  printf(" mode uhf or vhf or serial");
  printf(" -b run in background (EXPERIMENTAL, do NOT use this!)\n");
  printf(" -f defines a different local filename for put and get\n");
  printf("    and defines a different remote filename for append and "
         "appendline\n");
  printf(" -dstXXX.XXX.XXX.XXX sends the request to XXX.XXX.XXX.XXX\n"
         "   default is broadcast");
  printf(" Local address settings are read from a 'radiotftp.conf' file\n");
  printf(" Examples: \n"
         "    radiotftp uhf /dev/ttyUSB0 \n"
         "    radiotftp uhf  /dev/ttyUSB0 get remotephoto.jpg\n"
         "    radiotftp uhf  /dev/ttyUSB0 put localphoto.jpg\n"
         "    radiotftp uhf -flocalphoto.jpg /dev/ttyUSB0 get remotephoto.jpg\n"
         "    radiotftp uhf -flocalmusic.mp3 /dev/ttyUSB0 put remotemusic.mp3\n"
         "    radiotftp vhf -dst10.0.0.1 /dev/ttyUSB0 appendfile logfile.txt\n"
         "    radiotftp vhf -fremote_sensors.dat /dev/ttyUSB0 appendline "
         "'{TELEMETRY BATTERY=3.3V}'\n"
         "\n");
  safe_exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
lea    0xf0b(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x102e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x105f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <safe_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xf5a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf85(%rip),%rdi
call   1030 <puts@plt>
lea    0xf88(%rip),%rdi
call   1030 <puts@plt>
lea    0xe98(%rip),%rdi
lea    0xea1(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf76(%rip),%rdi
call   1030 <puts@plt>
lea    0xf85(%rip),%rdi
call   1030 <puts@plt>
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfa8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd3(%rip),%rdi
call   1030 <puts@plt>
lea    0xffe(%rip),%rdi
call   1030 <puts@plt>
lea    0xe79(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x102a(%rip),%rdi
call   1030 <puts@plt>
lea    0x105c(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
pop    %rax
jmp    1050 <safe_exit@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"\0Aradiotftp sends or listens for a tftp request\0A\00"
@.str.1 = [21 x i8] c"\0Alegal invocations:\0A\00"
@.str.2 = [16 x i8] c"\09radiotftp_uhf\0A\00"
@.str.3 = [16 x i8] c"\09radiotftp_vhf\0A\00"
@.str.4 = [16 x i8] c"Build Date: %s\0A\00"
@.str.5 = [21 x i8] c"Mar 16 2022 07:20:09\00"
@.str.6 = [28 x i8] c"Doesn't use any link layer\0A\00"
@.str.7 = [62 x i8] c"radiotftp mode [-dst] [-b] [-f] terminal [command filename] \0A\00"
@.str.8 = [27 x i8] c" mode uhf or vhf or serial\00"
@.str.9 = [56 x i8] c" -b run in background (EXPERIMENTAL, do NOT use this!)\0A\00"
@.str.10 = [56 x i8] c" -f defines a different local filename for put and get\0A\00"
@.str.11 = [71 x i8] c" and defines a different remote filename for append and appendline\0A\00"
@.str.12 = [82 x i8] c" -dstXXX.XXX.XXX.XXX sends the request to XXX.XXX.XXX.XXX\0A default is broadcast\00"
@.str.13 = [63 x i8] c" Local address settings are read from a 'radiotftp.conf' file\0A\00"
@.str.14 = [442 x i8] c" Examples: \0A radiotftp uhf /dev/ttyUSB0 \0A radiotftp uhf /dev/ttyUSB0 get remotephoto.jpg\0A radiotftp uhf /dev/ttyUSB0 put localphoto.jpg\0A radiotftp uhf -flocalphoto.jpg /dev/ttyUSB0 get remotephoto.jpg\0A radiotftp uhf -flocalmusic.mp3 /dev/ttyUSB0 put remotemusic.mp3\0A radiotftp vhf -dst10.0.0.1 /dev/ttyUSB0 appendfile logfile.txt\0A radiotftp vhf -fremote_sensors.dat /dev/ttyUSB0 appendline '{TELEMETRY BATTERY=3.3V}'\0A\0A\00"
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.10, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.12, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([442 x i8], [442 x i8]* @.str.14, i64 0, i64 0))
%15 = call i32 @safe_exit(i32 -1)
ret void
}

LLVM IR (-O2):
@.str.4 = [16 x i8] c"Build Date: %s\0A\00"
@.str.5 = [21 x i8] c"Mar 16 2022 07:20:09\00"
@.str.8 = [27 x i8] c" mode uhf or vhf or serial\00"
@.str.12 = [82 x i8] c" -dstXXX.XXX.XXX.XXX sends the request to XXX.XXX.XXX.XXX\0A default is broadcast\00"
@str = [47 x i8] c"\0Aradiotftp sends or listens for a tftp request\00"
@str.15 = [20 x i8] c"\0Alegal invocations:\00"
@str.16 = [15 x i8] c"\09radiotftp_uhf\00"
@str.17 = [15 x i8] c"\09radiotftp_vhf\00"
@str.18 = [27 x i8] c"Doesn't use any link layer\00"
@str.19 = [61 x i8] c"radiotftp mode [-dst] [-b] [-f] terminal [command filename] \00"
@str.20 = [55 x i8] c" -b run in background (EXPERIMENTAL, do NOT use this!)\00"
@str.21 = [55 x i8] c" -f defines a different local filename for put and get\00"
@str.22 = [70 x i8] c" and defines a different remote filename for append and appendline\00"
@str.23 = [62 x i8] c" Local address settings are read from a 'radiotftp.conf' file\00"
@str.24 = [441 x i8] c" Examples: \0A radiotftp uhf /dev/ttyUSB0 \0A radiotftp uhf /dev/ttyUSB0 get remotephoto.jpg\0A radiotftp uhf /dev/ttyUSB0 put localphoto.jpg\0A radiotftp uhf -flocalphoto.jpg /dev/ttyUSB0 get remotephoto.jpg\0A radiotftp uhf -flocalmusic.mp3 /dev/ttyUSB0 put remotemusic.mp3\0A radiotftp vhf -dst10.0.0.1 /dev/ttyUSB0 appendfile logfile.txt\0A radiotftp vhf -fremote_sensors.dat /dev/ttyUSB0 appendline '{TELEMETRY BATTERY=3.3V}'\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.15, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.16, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str.12, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([441 x i8], [441 x i8]* @str.24, i64 0, i64 0))
%15 = tail call i32 @safe_exit(i32 -1)
ret void
}