#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 /*<<< orphan*/ s;

/* Variables and functions */
int /*<<< orphan*/ cargo_snprintf(char *, int, char *, int);
const char *_cargo_nargs_str(int nargs) {
  static char s[32];
  *s = '\0';
  switch (nargs) {
  case -3:
    return "0 or 1";
  case -1:
    return "1 or more";
  case -2:
    return "0 or more";
  default:
    cargo_snprintf(s, sizeof(s), "%d", nargs);
    return s;
  }
}


x86 assembly (clang, -O0):
<_cargo_nargs_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
movb   $0x0,0x2f1e(%rip)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xfffffffd,%eax
je     1158 <_cargo_nargs_str+0x48>
jmp    1136 <_cargo_nargs_str+0x26>
mov    -0x10(%rbp),%eax
sub    $0xfffffffe,%eax
je     1178 <_cargo_nargs_str+0x68>
jmp    1147 <_cargo_nargs_str+0x37>
mov    -0x10(%rbp),%eax
sub    $0xffffffff,%eax
je     1168 <_cargo_nargs_str+0x58>
jmp    1188 <_cargo_nargs_str+0x78>
lea    0xea1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11ae <_cargo_nargs_str+0x9e>
lea    0xe98(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11ae <_cargo_nargs_str+0x9e>
lea    0xe92(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11ae <_cargo_nargs_str+0x9e>
mov    -0xc(%rbp),%ecx
lea    0x2eae(%rip),%rdi
mov    $0x20,%esi
lea    0xe7d(%rip),%rdx
call   1030 <cargo_snprintf@plt>
lea    0x2e96(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cargo_nargs_str>:
push   %rbx
mov    %edi,%ecx
movb   $0x0,0x2f26(%rip)
cmp    $0xfffffffc,%edi
jbe    1135 <_cargo_nargs_str+0x25>
add    $0x3,%ecx
movslq %ecx,%rax
lea    0xef4(%rip),%rcx
movslq (%rcx,%rax,4),%rbx
add    %rcx,%rbx
jmp    1150 <_cargo_nargs_str+0x40>
lea    0x2f04(%rip),%rbx
lea    0xed8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <cargo_snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@_cargo_nargs_str.s = internal global [32 x i8] zeroinitializer
@.str = [7 x i8] c"0 or 1\00"
@.str.1 = [10 x i8] c"1 or more\00"
@.str.2 = [10 x i8] c"0 or more\00"
@.str.3 = [3 x i8] c"%d\00"
define i8* @_cargo_nargs_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
store i8 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_cargo_nargs_str.s, i64 0, i64 0)
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 -3, label %5
i32 -1, label %6
i32 -2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
6: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %11
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @cargo_snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_cargo_nargs_str.s, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %9)
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_cargo_nargs_str.s, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %8, %7, %6, %5
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@_cargo_nargs_str.s = internal global [32 x i8] zeroinitializer
@.str = [7 x i8] c"0 or 1\00"
@.str.1 = [10 x i8] c"1 or more\00"
@.str.2 = [10 x i8] c"0 or more\00"
@.str.3 = [3 x i8] c"%d\00"
@reltable._cargo_nargs_str = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable._cargo_nargs_str to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable._cargo_nargs_str to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable._cargo_nargs_str to i64)) to i32)]
define i8* @_cargo_nargs_str(i32 %0) {
store i8 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_cargo_nargs_str.s, i64 0, i64 0)
%2 = icmp ugt i32 %0, -4
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cargo_snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_cargo_nargs_str.s, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %0)
br label %10
5: ; preds = %1
%6 = add i32 %0, 3
%7 = sext i32 %6 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable._cargo_nargs_str to i8*), i64 %8)
br label %10
10: ; preds = %5, %3
%11 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @_cargo_nargs_str.s, i64 0, i64 0), %3 ], [ %9, %5 ]
ret i8* %11
}