#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*/ dprintf(int, char *);
int syntax(void) {
  dprintf(
      2,
      "jobflow "
      "1.3.0"
      " (C) rofl0r\n"
      "------------------------\n"
      "this program is intended to be used as a recipient of another programs "
      "output\n"
      "it launches processes to which the current line can be passed as an "
      "argument\n"
      "using {} for substitution (as in find -exec).\n"
      "if no substitution argument ({} or {.}) is provided, input is piped "
      "into\n"
      "stdin of child processes. input will be then evenly distributed to "
      "jobs,\n"
      "until EOF is received. we call this 'pipe mode'.\n"
      "\n"
      "available options:\n\n"
      "-skip N -threads N -resume -statefile=/tmp/state -delayedflush\n"
      "-delayedspinup N -buffered -joinoutput -limits mem=16M,cpu=10\n"
      "-eof=XXX\n"
      "-exec ./mycommand {}\n"
      "\n"
      "-skip N\n"
      "    N=number of entries to skip\n"
      "-threads N (alternative: -j N)\n"
      "    N=number of parallel processes to spawn\n"
      "-resume\n"
      "    resume from last jobnumber stored in statefile\n"
      "-eof XXX\n"
      "    use XXX as the EOF marker on stdin\n"
      "    if the marker is encountered, behave as if stdin was closed\n"
      "    not compatible with pipe/bulk mode\n"
      "-statefile XXX\n"
      "    XXX=filename\n"
      "    saves last launched jobnumber into a file\n"
      "-delayedflush\n"
      "    only write to statefile whenever all processes are busy,\n"
      "    and at program end\n"
      "-delayedspinup N\n"
      "    N=maximum amount of milliseconds\n"
      "    ...to wait when spinning up a fresh set of processes\n"
      "    a random value between 0 and the chosen amount is used to delay "
      "initial\n"
      "    spinup.\n"
      "    this can be handy to circumvent an I/O lockdown because of a burst "
      "of \n"
      "    activity on program startup\n"
      "-buffered\n"
      "    store the stdout and stderr of launched processes into a temporary "
      "file\n"
      "    which will be printed after a process has finished.\n"
      "    this prevents mixing up of output of different processes.\n"
      "-joinoutput\n"
      "    if -buffered, write both stdout and stderr into the same file.\n"
      "    this saves the chronological order of the output, and the combined "
      "output\n"
      "    will only be printed to stdout.\n"
      "-bulk N\n"
      "    do bulk copies with a buffer of N bytes. only usable in pipe mode.\n"
      "    this passes (almost) the entire buffer to the next scheduled job.\n"
      "    the passed buffer will be truncated to the last line break "
      "boundary,\n"
      "    so jobs always get entire lines to work with.\n"
      "    this option is useful when you have huge input files and relatively "
      "short\n"
      "    task runtimes. by using it, syscall overhead can be reduced to a "
      "minimum.\n"
      "    N must be a multiple of 4KB. the suffixes G/M/K are detected.\n"
      "    actual memory allocation will be twice the amount passed.\n"
      "    note that pipe buffer size is limited to 64K on linux, so anything "
      "higher\n"
      "    than that probably doesn't make sense.\n"
      "-limits [mem=N,cpu=N,stack=N,fsize=N,nofiles=N]\n"
      "    sets the rlimit of the new created processes.\n"
      "    see \"man setrlimit\" for an explanation. the suffixes G/M/K are "
      "detected.\n"
      "-exec command with args\n"
      "    everything past -exec is treated as the command to execute on each "
      "line of\n"
      "    stdin received. the line can be passed as an argument using {}.\n"
      "    {.} passes everything before the last dot in a line as an "
      "argument.\n"
      "    it is possible to use multiple substitutions inside a single "
      "argument,\n"
      "    but currently only of one type.\n"
      "    if -exec is omitted, input will merely be dumped to stdout (like "
      "cat).\n"
      "\n");
  return 1;
}


x86 assembly (clang, -O0):
<syntax>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
call   1030 <dprintf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<syntax>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x2,%edi
call   1030 <dprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3110 x i8] c"jobflow 1.3.0 (C) rofl0r\0A------------------------\0Athis program is intended to be used as a recipient of another programs output\0Ait launches processes to which the current line can be passed as an argument\0Ausing {} for substitution (as in find -exec).\0Aif no substitution argument ({} or {.}) is provided, input is piped into\0Astdin of child processes. input will be then evenly distributed to jobs,\0Auntil EOF is received. we call this 'pipe mode'.\0A\0Aavailable options:\0A\0A-skip N -threads N -resume -statefile=/tmp/state -delayedflush\0A-delayedspinup N -buffered -joinoutput -limits mem=16M,cpu=10\0A-eof=XXX\0A-exec ./mycommand {}\0A\0A-skip N\0A N=number of entries to skip\0A-threads N (alternative: -j N)\0A N=number of parallel processes to spawn\0A-resume\0A resume from last jobnumber stored in statefile\0A-eof XXX\0A use XXX as the EOF marker on stdin\0A if the marker is encountered, behave as if stdin was closed\0A not compatible with pipe/bulk mode\0A-statefile XXX\0A XXX=filename\0A saves last launched jobnumber into a file\0A-delayedflush\0A only write to statefile whenever all processes are busy,\0A and at program end\0A-delayedspinup N\0A N=maximum amount of milliseconds\0A ...to wait when spinning up a fresh set of processes\0A a random value between 0 and the chosen amount is used to delay initial\0A spinup.\0A this can be handy to circumvent an I/O lockdown because of a burst of \0A activity on program startup\0A-buffered\0A store the stdout and stderr of launched processes into a temporary file\0A which will be printed after a process has finished.\0A this prevents mixing up of output of different processes.\0A-joinoutput\0A if -buffered, write both stdout and stderr into the same file.\0A this saves the chronological order of the output, and the combined output\0A will only be printed to stdout.\0A-bulk N\0A do bulk copies with a buffer of N bytes. only usable in pipe mode.\0A this passes (almost) the entire buffer to the next scheduled job.\0A the passed buffer will be truncated to the last line break boundary,\0A so jobs always get entire lines to work with.\0A this option is useful when you have huge input files and relatively short\0A task runtimes. by using it, syscall overhead can be reduced to a minimum.\0A N must be a multiple of 4KB. the suffixes G/M/K are detected.\0A actual memory allocation will be twice the amount passed.\0A note that pipe buffer size is limited to 64K on linux, so anything higher\0A than that probably doesn't make sense.\0A-limits [mem=N,cpu=N,stack=N,fsize=N,nofiles=N]\0A sets the rlimit of the new created processes.\0A see \22man setrlimit\22 for an explanation. the suffixes G/M/K are detected.\0A-exec command with args\0A everything past -exec is treated as the command to execute on each line of\0A stdin received. the line can be passed as an argument using {}.\0A {.} passes everything before the last dot in a line as an argument.\0A it is possible to use multiple substitutions inside a single argument,\0A but currently only of one type.\0A if -exec is omitted, input will merely be dumped to stdout (like cat).\0A\0A\00"
define i32 @syntax() {
%1 = call i32 @dprintf(i32 2, i8* getelementptr inbounds ([3110 x i8], [3110 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [3110 x i8] c"jobflow 1.3.0 (C) rofl0r\0A------------------------\0Athis program is intended to be used as a recipient of another programs output\0Ait launches processes to which the current line can be passed as an argument\0Ausing {} for substitution (as in find -exec).\0Aif no substitution argument ({} or {.}) is provided, input is piped into\0Astdin of child processes. input will be then evenly distributed to jobs,\0Auntil EOF is received. we call this 'pipe mode'.\0A\0Aavailable options:\0A\0A-skip N -threads N -resume -statefile=/tmp/state -delayedflush\0A-delayedspinup N -buffered -joinoutput -limits mem=16M,cpu=10\0A-eof=XXX\0A-exec ./mycommand {}\0A\0A-skip N\0A N=number of entries to skip\0A-threads N (alternative: -j N)\0A N=number of parallel processes to spawn\0A-resume\0A resume from last jobnumber stored in statefile\0A-eof XXX\0A use XXX as the EOF marker on stdin\0A if the marker is encountered, behave as if stdin was closed\0A not compatible with pipe/bulk mode\0A-statefile XXX\0A XXX=filename\0A saves last launched jobnumber into a file\0A-delayedflush\0A only write to statefile whenever all processes are busy,\0A and at program end\0A-delayedspinup N\0A N=maximum amount of milliseconds\0A ...to wait when spinning up a fresh set of processes\0A a random value between 0 and the chosen amount is used to delay initial\0A spinup.\0A this can be handy to circumvent an I/O lockdown because of a burst of \0A activity on program startup\0A-buffered\0A store the stdout and stderr of launched processes into a temporary file\0A which will be printed after a process has finished.\0A this prevents mixing up of output of different processes.\0A-joinoutput\0A if -buffered, write both stdout and stderr into the same file.\0A this saves the chronological order of the output, and the combined output\0A will only be printed to stdout.\0A-bulk N\0A do bulk copies with a buffer of N bytes. only usable in pipe mode.\0A this passes (almost) the entire buffer to the next scheduled job.\0A the passed buffer will be truncated to the last line break boundary,\0A so jobs always get entire lines to work with.\0A this option is useful when you have huge input files and relatively short\0A task runtimes. by using it, syscall overhead can be reduced to a minimum.\0A N must be a multiple of 4KB. the suffixes G/M/K are detected.\0A actual memory allocation will be twice the amount passed.\0A note that pipe buffer size is limited to 64K on linux, so anything higher\0A than that probably doesn't make sense.\0A-limits [mem=N,cpu=N,stack=N,fsize=N,nofiles=N]\0A sets the rlimit of the new created processes.\0A see \22man setrlimit\22 for an explanation. the suffixes G/M/K are detected.\0A-exec command with args\0A everything past -exec is treated as the command to execute on each line of\0A stdin received. the line can be passed as an argument using {}.\0A {.} passes everything before the last dot in a line as an argument.\0A it is possible to use multiple substitutions inside a single argument,\0A but currently only of one type.\0A if -exec is omitted, input will merely be dumped to stdout (like cat).\0A\0A\00"
define i32 @syntax() {
%1 = tail call i32 @dprintf(i32 2, i8* getelementptr inbounds ([3110 x i8], [3110 x i8]* @.str, i64 0, i64 0))
ret i32 1
}