#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
scalar_t__ timlib_get_line(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ xargs(int, char **, char *);
int main(int argc, char **argv) {
  char buffer[1024];
  if (argc < 2) {
    fprintf(stderr, "Usage: %s executable [parameters] {}\n", argv[0]);
    exit(1);
  }
  while (timlib_get_line(buffer, stdin, 1024)) {
    xargs(argc, argv, buffer);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1189 <main+0x49>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe86(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    118e <main+0x4e>
lea    -0x410(%rbp),%rdi
mov    0x2e4c(%rip),%rax
mov    (%rax),%esi
mov    $0x400,%edx
call   1060 <timlib_get_line@plt>
cmp    $0x0,%rax
je     11ca <main+0x8a>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x410(%rbp),%rdx
call   1030 <xargs@plt>
jmp    118e <main+0x4e>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rsi,%r14
cmp    $0x2,%edi
jl     11b2 <main+0x72>
mov    %edi,%ebp
mov    0x2e8a(%rip),%r15
mov    (%r15),%esi
mov    %rsp,%rdi
mov    $0x400,%edx
call   1060 <timlib_get_line@plt>
test   %rax,%rax
je     11a2 <main+0x62>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <xargs@plt>
mov    (%r15),%esi
mov    %rbx,%rdi
mov    $0x400,%edx
call   1060 <timlib_get_line@plt>
test   %rax,%rax
jne    1180 <main+0x40>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xe3b(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s executable [parameters] {}\0A\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
br label %17
17: ; preds = %22, %16
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%19 = load i32, i32* @stdin
%20 = call i64 @timlib_get_line(i8* %18, i32 %19, i32 1024)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %17
%23 = load i32, i32* %4
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%26 = call i32 @xargs(i32 %23, i8** %24, i8* %25)
br label %17
27: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s executable [parameters] {}\0A\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 2
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = load i32, i32* @stdin
%8 = call i64 @timlib_get_line(i8* %4, i32 %7, i32 1024)
%9 = icmp eq i64 %8, 0
br i1 %9, label %20, label %15
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %1
%13 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %6, %15
%16 = call i32 @xargs(i32 %0, i8** %1, i8* %4)
%17 = load i32, i32* @stdin
%18 = call i64 @timlib_get_line(i8* %4, i32 %17, i32 1024)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %15
20: ; preds = %15, %6
ret i32 0
}