#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 */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void __rat_mod_help_action(const char *help, uint16_t *i, uint16_t *j) {
  do {
  } while (0);
  if (*i && *i == (*j - 1))
    fprintf(stderr, " or ");
  else if (*i)
    fprintf(stderr, ", ");
  fprintf(stderr, "`%s'", help);
  ++*i;
}


x86 assembly (clang, -O0):
<__rat_mod_help_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
jmp    1129 <__rat_mod_help_action+0x19>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     1169 <__rat_mod_help_action+0x59>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1169 <__rat_mod_help_action+0x59>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    0xea3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1192 <__rat_mod_help_action+0x82>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     118d <__rat_mod_help_action+0x7d>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1192 <__rat_mod_help_action+0x82>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe62(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rat_mod_help_action>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%eax
test   %eax,%eax
je     1149 <__rat_mod_help_action+0x39>
mov    (%rdx),%ecx
add    $0xffffffff,%ecx
cmp    %ecx,%eax
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rax
lea    0xec7(%rip),%rsi
cmove  %rax,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xeaf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
addl   $0x1,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c" or \00"
@.str.1 = [3 x i8] c", \00"
@.str.2 = [5 x i8] c"`%s'\00"
define void @__rat_mod_help_action(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
br label %7
7: ; preds = %3
br label %8
8: ; preds = %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = sub nsw i32 %16, 1
%18 = icmp eq i32 %14, %17
br i1 %18, label %19, label %22
19: ; preds = %12
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %30
22: ; preds = %12, %8
%23 = load i32*, i32** %5
%24 = load i32, i32* %23
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %26, %22
br label %30
30: ; preds = %29, %19
%31 = load i32, i32* @stderr
%32 = load i8*, i8** %4
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %32)
%34 = load i32*, i32** %5
%35 = load i32, i32* %34
%36 = add nsw i32 %35, 1
store i32 %36, i32* %34
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c" or \00"
@.str.1 = [3 x i8] c", \00"
@.str.2 = [5 x i8] c"`%s'\00"
define void @__rat_mod_help_action(i8* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
%9 = icmp eq i32 %4, %8
%10 = load i32, i32* @stderr
%11 = select i1 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* %11)
br label %13
13: ; preds = %6, %3
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
ret void
}