#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_grouped_opts_1_operand(const char *optstring) {
  int argc = 3;
  char *argv[] = {"test", "-abc", "d"};
  printf("Testing with 3 grouped options and 1 operand.\n");
  echo_test_setup(argc, argv, optstring);
  return test_validation(argc, argv, optstring);
}


x86 assembly (clang, -O0):
<test_3_grouped_opts_1_operand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    0x2cb6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cb3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cb0(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <echo_test_setup@plt>
mov    -0xc(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1050 <test_validation@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_3_grouped_opts_1_operand>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    0x2ccf(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cb3(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%r14
mov    $0x3,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <echo_test_setup@plt>
mov    $0x3,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <test_validation@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [5 x i8] c"-abc\00"
@.str.2 = [2 x i8] c"d\00"
@__const.test_3_grouped_opts_1_operand.argv = [3 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [47 x i8] c"Testing with 3 grouped options and 1 operand.\0A\00"
define i32 @test_3_grouped_opts_1_operand(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [3 x i8*]
store i8* %0, i8** %2
store i32 3, i32* %3
%5 = bitcast [3 x i8*]* %4 to i8*
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32, i32* %3
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = call i32 @echo_test_setup(i32 %7, i8** %8, i8* %9)
%11 = load i32, i32* %3
%12 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 0
%13 = load i8*, i8** %2
%14 = call i32 @test_validation(i32 %11, i8** %12, i8* %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [5 x i8] c"-abc\00"
@.str.2 = [2 x i8] c"d\00"
@__const.test_3_grouped_opts_1_operand.argv = [3 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0)]
@str = [46 x i8] c"Testing with 3 grouped options and 1 operand.\00"
define i32 @test_3_grouped_opts_1_operand(i8* %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%6 = call i32 @echo_test_setup(i32 3, i8** %5, i8* %0)
%7 = call i32 @test_validation(i32 3, i8** %5, i8* %0)
ret i32 %7
}