#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*/ assert(int);
int lace_compat_fd_spawnlp_wait(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/ *, char const *, char *,
                                char *, char *, int /*<<< orphan*/ *);
void time2sec_usage_tests(const char *lace_exe) {
  int istat;
  istat =
      lace_compat_fd_spawnlp_wait(0, 1, 2, NULL, lace_exe, "-as", "time2sec",
                                  "no_flagless_arg_is_valid", NULL);
  assert(istat == 64);
  istat = lace_compat_fd_spawnlp_wait(0, 1, 2, NULL, lace_exe, "-as",
                                      "time2sec", "-w", NULL);
  assert(istat == 64);
}


x86 assembly (clang, -O0):
<time2sec_usage_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%r8
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
mov    %eax,%ecx
lea    0xeb9(%rip),%r9
lea    0xeb6(%rip),%r10
lea    0xeb8(%rip),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <lace_compat_fd_spawnlp_wait@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%r8
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
mov    %eax,%ecx
lea    0xe65(%rip),%r9
lea    0xe62(%rip),%r10
lea    0xe7d(%rip),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <lace_compat_fd_spawnlp_wait@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time2sec_usage_tests>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
sub    $0x8,%rsp
lea    0xeda(%rip),%rax
lea    0xeca(%rip),%r15
lea    0xebf(%rip),%r14
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
mov    %r14,%r9
push   $0x0
push   %rax
push   %r15
call   1030 <lace_compat_fd_spawnlp_wait@plt>
add    $0x20,%rsp
xor    %edi,%edi
cmp    $0x40,%eax
sete   %dil
call   1040 <assert@plt>
sub    $0x8,%rsp
lea    0xeaa(%rip),%rax
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
mov    %r14,%r9
push   $0x0
push   %rax
push   %r15
call   1030 <lace_compat_fd_spawnlp_wait@plt>
add    $0x20,%rsp
xor    %edi,%edi
cmp    $0x40,%eax
sete   %dil
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"-as\00"
@.str.1 = [9 x i8] c"time2sec\00"
@.str.2 = [25 x i8] c"no_flagless_arg_is_valid\00"
@.str.3 = [3 x i8] c"-w\00"
define void @time2sec_usage_tests(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @lace_compat_fd_spawnlp_wait(i32 0, i32 1, i32 2, i32* null, i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32* null)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 64
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %2
%11 = call i32 @lace_compat_fd_spawnlp_wait(i32 0, i32 1, i32 2, i32* null, i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* null)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 64
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"-as\00"
@.str.1 = [9 x i8] c"time2sec\00"
@.str.2 = [25 x i8] c"no_flagless_arg_is_valid\00"
@.str.3 = [3 x i8] c"-w\00"
define void @time2sec_usage_tests(i8* %0) {
%2 = tail call i32 @lace_compat_fd_spawnlp_wait(i32 0, i32 1, i32 2, i32* null, i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32* null)
%3 = icmp eq i32 %2, 64
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @lace_compat_fd_spawnlp_wait(i32 0, i32 1, i32 2, i32* null, i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* null)
%7 = icmp eq i32 %6, 64
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret void
}