#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, ...);
int /*<<< orphan*/ stderr;
void bad_argument(const char *name, const char *value, const char *info) {
  fprintf(stderr, "%s: invalid argument '%s' for '--%s'\n", "duplicut", value,
          name);
  if (info != NULL) {
    fprintf(stderr, "(%s)\n", info);
  }
  fprintf(stderr, "Try '%s --help' for more information.\n", "duplicut");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<bad_argument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0xeb4(%rip),%rsi
lea    0xed3(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
cmpq   $0x0,-0x18(%rbp)
je     1180 <bad_argument+0x60>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
lea    0xe8f(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bad_argument>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%rcx
mov    %rdi,%r8
mov    0x2eac(%rip),%r14
mov    (%r14),%edi
lea    0xec2(%rip),%rsi
lea    0xee1(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
test   %rbx,%rbx
je     1165 <bad_argument+0x45>
mov    (%r14),%edi
lea    0xed4(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xec6(%rip),%rsi
lea    0xeb0(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"%s: invalid argument '%s' for '--%s'\0A\00"
@.str.1 = [9 x i8] c"duplicut\00"
@.str.2 = [6 x i8] c"(%s)\0A\00"
@.str.3 = [39 x i8] c"Try '%s --help' for more information.\0A\00"
@EXIT_FAILURE = global i32 0
define void @bad_argument(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i8*, i8** %6
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %6
%16 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %13, %3
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%20 = load i32, i32* @EXIT_FAILURE
%21 = call i32 @exit(i32 %20)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"%s: invalid argument '%s' for '--%s'\0A\00"
@.str.1 = [9 x i8] c"duplicut\00"
@.str.2 = [6 x i8] c"(%s)\0A\00"
@.str.3 = [39 x i8] c"Try '%s --help' for more information.\0A\00"
@EXIT_FAILURE = global i32 0
define void @bad_argument(i8* %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %0)
%6 = icmp eq i8* %2, null
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %7, %3
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = tail call i32 @exit(i32 %13)
unreachable
}