#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*/ echo_test_setup(int, char **, char const *);
int /*<<< orphan*/ printf(char *);
int test_validation(int, char **, char const *);
bool test_3_ungrouped_opts_1_operand(const char *optstring) {
  int argc = 5;
  char *argv[] = {"test", "-a", "-b", "-c", "d"};
  printf("Testing with 3 ungrouped options and 1 operand.\n");
  echo_test_setup(argc, argv, optstring);
  return test_validation(argc, argv, optstring);
}


x86 assembly (clang, -O0):
<test_3_ungrouped_opts_1_operand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xe96(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe90(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe88(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe80(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe78(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1050 <echo_test_setup@plt>
mov    -0xc(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1060 <test_validation@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_3_ungrouped_opts_1_operand>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
lea    0xebf(%rip),%rax
mov    %rax,(%rsp)
lea    0xeb9(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xeb0(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xea7(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xe9e(%rip),%rax
mov    %rax,0x20(%rsp)
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%r14
mov    $0x5,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <echo_test_setup@plt>
mov    $0x5,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <test_validation@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [3 x i8] c"-a\00"
@.str.2 = [3 x i8] c"-b\00"
@.str.3 = [3 x i8] c"-c\00"
@.str.4 = [2 x i8] c"d\00"
@.str.5 = [49 x i8] c"Testing with 3 ungrouped options and 1 operand.\0A\00"
define i32 @test_3_ungrouped_opts_1_operand(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [5 x i8*]
store i8* %0, i8** %2
store i32 5, i32* %3
%5 = bitcast [5 x i8*]* %4 to i8*
%6 = bitcast i8* %5 to [5 x i8*]*
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 2
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8** %10
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 4
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8** %11
%12 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* %3
%14 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 0
%15 = load i8*, i8** %2
%16 = call i32 @echo_test_setup(i32 %13, i8** %14, i8* %15)
%17 = load i32, i32* %3
%18 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 0
%19 = load i8*, i8** %2
%20 = call i32 @test_validation(i32 %17, i8** %18, i8* %19)
ret i32 %20
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [3 x i8] c"-a\00"
@.str.2 = [3 x i8] c"-b\00"
@.str.3 = [3 x i8] c"-c\00"
@.str.4 = [2 x i8] c"d\00"
@str = [48 x i8] c"Testing with 3 ungrouped options and 1 operand.\00"
define i32 @test_3_ungrouped_opts_1_operand(i8* %0) {
%2 = alloca [5 x i8*]
%3 = bitcast [5 x i8*]* %2 to i8*
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 4
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8** %8
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%10 = call i32 @echo_test_setup(i32 5, i8** %4, i8* %0)
%11 = call i32 @test_validation(i32 5, i8** %4, i8* %0)
ret i32 %11
}