#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 */
struct option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, char const *, ...);
char *opt_long_for(char, struct option const *);
int /*<<< orphan*/ stderr;
void help_print(char arg, const char *par, const char *desc,
                const struct option *long_opt) {
  const char *p = opt_long_for(arg, long_opt);
  if (p != NULL && *p != '\0')
    if (par != NULL && *par != '\0')
      fprintf(stderr, "  -%c%s,--%s=%s -- %s\n", arg, par, p, par, desc);
    else
      fprintf(stderr, "  -%c,--%s -- %s\n", arg, p, desc);
  else if (par != NULL && *par != '\0')
    fprintf(stderr, "  -%c%s -- %s\n", arg, par, desc);
  else
    fprintf(stderr, "  -%c -- %s\n", arg, desc);
}


x86 assembly (clang, -O0):
<help_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x1(%rbp),%al
mov    -0x20(%rbp),%rsi
movsbl %al,%edi
call   1030 <opt_long_for@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     11e3 <help_print+0xc3>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11e3 <help_print+0xc3>
cmpq   $0x0,-0x10(%rbp)
je     11b9 <help_print+0x99>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11b9 <help_print+0x99>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
mov    -0x1(%rbp),%dl
mov    -0x10(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    -0x18(%rbp),%rax
lea    0xe5a(%rip),%rsi
movsbl %dl,%edx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    11de <help_print+0xbe>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
mov    -0x1(%rbp),%al
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xe43(%rip),%rsi
movsbl %al,%edx
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    124e <help_print+0x12e>
cmpq   $0x0,-0x10(%rbp)
je     1228 <help_print+0x108>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1228 <help_print+0x108>
mov    0x2ddb(%rip),%rax
mov    (%rax),%edi
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xe10(%rip),%rsi
movsbl %al,%edx
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1249 <help_print+0x129>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
mov    -0x1(%rbp),%al
mov    -0x18(%rbp),%rcx
lea    0xdf9(%rip),%rsi
movsbl %al,%edx
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    124e <help_print+0x12e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_print>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rcx,%rsi
call   1030 <opt_long_for@plt>
test   %rax,%rax
je     117d <help_print+0x5d>
cmpb   $0x0,(%rax)
je     117d <help_print+0x5d>
test   %rbx,%rbx
je     11c6 <help_print+0xa6>
cmpb   $0x0,(%rbx)
je     11c6 <help_print+0xa6>
mov    0x2e8d(%rip),%rcx
mov    (%rcx),%edi
mov    %r14,(%rsp)
movsbl %bpl,%edx
lea    0xe9c(%rip),%rsi
mov    %rbx,%rcx
mov    %rax,%r8
mov    %rbx,%r9
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
test   %rbx,%rbx
je     11a0 <help_print+0x80>
cmpb   $0x0,(%rbx)
je     11a0 <help_print+0x80>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
movsbl %bpl,%edx
lea    0xe8e(%rip),%rsi
mov    %rbx,%rcx
jmp    11dd <help_print+0xbd>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
movsbl %bpl,%edx
lea    0xe84(%rip),%rsi
mov    %r14,%rcx
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fprintf@plt>
mov    0x2e13(%rip),%rcx
mov    (%rcx),%edi
movsbl %bpl,%edx
lea    0xe3d(%rip),%rsi
mov    %rax,%rcx
mov    %r14,%r8
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
%struct.option = type { i32 }
@stderr = global i32 0
@.str = [23 x i8] c" -%c%s,--%s=%s -- %s\0A\00"
@.str.1 = [18 x i8] c" -%c,--%s -- %s\0A\00"
@.str.2 = [15 x i8] c" -%c%s -- %s\0A\00"
@.str.3 = [13 x i8] c" -%c -- %s\0A\00"
define void @help_print(i8 signext %0, i8* %1, i8* %2, %struct.option* %3) {
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca %struct.option*
%9 = alloca i8*
store i8 %0, i8* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store %struct.option* %3, %struct.option** %8
%10 = load i8, i8* %5
%11 = load %struct.option*, %struct.option** %8
%12 = call i8* @opt_long_for(i8 signext %10, %struct.option* %11)
store i8* %12, i8** %9
%13 = load i8*, i8** %9
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %43
15: ; preds = %4
%16 = load i8*, i8** %9
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %43
20: ; preds = %15
%21 = load i8*, i8** %6
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %36
23: ; preds = %20
%24 = load i8*, i8** %6
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %36
28: ; preds = %23
%29 = load i32, i32* @stderr
%30 = load i8, i8* %5
%31 = load i8*, i8** %6
%32 = load i8*, i8** %9
%33 = load i8*, i8** %6
%34 = load i8*, i8** %7
%35 = call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext %30, i8* %31, i8* %32, i8* %33, i8* %34)
br label %42
36: ; preds = %23, %20
%37 = load i32, i32* @stderr
%38 = load i8, i8* %5
%39 = load i8*, i8** %9
%40 = load i8*, i8** %7
%41 = call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext %38, i8* %39, i8* %40)
br label %42
42: ; preds = %36, %28
br label %63
43: ; preds = %15, %4
%44 = load i8*, i8** %6
%45 = icmp ne i8* %44, null
br i1 %45, label %46, label %57
46: ; preds = %43
%47 = load i8*, i8** %6
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %57
51: ; preds = %46
%52 = load i32, i32* @stderr
%53 = load i8, i8* %5
%54 = load i8*, i8** %6
%55 = load i8*, i8** %7
%56 = call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8 signext %53, i8* %54, i8* %55)
br label %62
57: ; preds = %46, %43
%58 = load i32, i32* @stderr
%59 = load i8, i8* %5
%60 = load i8*, i8** %7
%61 = call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8 signext %59, i8* %60)
br label %62
62: ; preds = %57, %51
br label %63
63: ; preds = %62, %42
ret void
}

LLVM IR (-O2):
%struct.option = type { i32 }
@stderr = global i32 0
@.str = [23 x i8] c" -%c%s,--%s=%s -- %s\0A\00"
@.str.1 = [18 x i8] c" -%c,--%s -- %s\0A\00"
@.str.2 = [15 x i8] c" -%c%s -- %s\0A\00"
@.str.3 = [13 x i8] c" -%c -- %s\0A\00"
define void @help_print(i8 signext %0, i8* %1, i8* %2, %struct.option* %3) {
%5 = tail call i8* @opt_long_for(i8 signext %0, %struct.option* %3)
%6 = icmp eq i8* %5, null
br i1 %6, label %21, label %7
7: ; preds = %4
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
br i1 %9, label %21, label %10
10: ; preds = %7
%11 = icmp eq i8* %1, null
br i1 %11, label %18, label %12
12: ; preds = %10
%13 = load i8, i8* %1
%14 = icmp eq i8 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext %0, i8* %1, i8* %5, i8* %1, i8* %2)
br label %32
18: ; preds = %12, %10
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext %0, i8* %5, i8* %2)
br label %32
21: ; preds = %7, %4
%22 = icmp eq i8* %1, null
br i1 %22, label %29, label %23
23: ; preds = %21
%24 = load i8, i8* %1
%25 = icmp eq i8 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %23
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8 signext %0, i8* %1, i8* %2)
br label %32
29: ; preds = %23, %21
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, i8, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8 signext %0, i8* %2)
br label %32
32: ; preds = %26, %29, %15, %18
ret void
}