#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sauce_show(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    fprintf(stderr, "%s [-V] <filename>[ .. <filename>]\n", argv[0]);
    return 1;
  }
  for (int i = 1; i < argc; i++) {
    if (!strcmp(argv[i], "-V")) {
      printf(
          "piece version %s (c) Wijnand Modderman-Lenstra, https://maze.io/\n",
          "0.80.25");
      return 0;
    }
  }
  for (int i = 1; i < argc; i++) {
    sauce_show(argv[i]);
    if (i != argc - 1) {
      printf("\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1188 <main+0x48>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe89(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    124d <main+0x10d>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11f0 <main+0xb0>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe76(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11dd <main+0x9d>
lea    0xe64(%rip),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    124d <main+0x10d>
jmp    11e2 <main+0xa2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118f <main+0x4f>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1246 <main+0x106>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <sauce_show@plt>
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1233 <main+0xf3>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1238 <main+0xf8>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11f7 <main+0xb7>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jge    1183 <main+0x33>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe8d(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%r15d
jmp    120b <main+0xbb>
mov    %edi,%r14d
mov    %edi,%r12d
mov    $0x1,%ebp
lea    0xe8f(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx,%rbp,8),%rdi
mov    %r15,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11f3 <main+0xa3>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    11a0 <main+0x50>
xor    %r15d,%r15d
cmp    $0x2,%r14d
jl     120b <main+0xbb>
add    $0xffffffff,%r14d
mov    $0x1,%ebp
jmp    11d9 <main+0x89>
nopl   (%rax)
add    $0x1,%rbp
cmp    %rbp,%r12
je     120b <main+0xbb>
mov    (%rbx,%rbp,8),%rdi
call   1050 <sauce_show@plt>
cmp    %rbp,%r14
je     11d0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11d0 <main+0x80>
lea    0xe2d(%rip),%rdi
lea    0xe68(%rip),%rsi
xor    %r15d,%r15d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"%s [-V] <filename>[ .. <filename>]\0A\00"
@.str.1 = [3 x i8] c"-V\00"
@.str.2 = [66 x i8] c"piece version %s (c) Wijnand Modderman-Lenstra, https://maze.io/\0A\00"
@.str.3 = [8 x i8] c"0.80.25\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %14)
store i32 1, i32* %3
br label %58
16: ; preds = %2
store i32 1, i32* %6
br label %17
17: ; preds = %32, %16
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %35
21: ; preds = %17
%22 = load i8**, i8*** %5
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
%27 = call i32 @strcmp(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%28 = icmp ne i32 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %21
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %58
31: ; preds = %21
br label %32
32: ; preds = %31
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %17
35: ; preds = %17
store i32 1, i32* %7
br label %36
36: ; preds = %54, %35
%37 = load i32, i32* %7
%38 = load i32, i32* %4
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %57
40: ; preds = %36
%41 = load i8**, i8*** %5
%42 = load i32, i32* %7
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = call i32 @sauce_show(i8* %45)
%47 = load i32, i32* %7
%48 = load i32, i32* %4
%49 = sub nsw i32 %48, 1
%50 = icmp ne i32 %47, %49
br i1 %50, label %51, label %53
51: ; preds = %40
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %53
53: ; preds = %51, %40
br label %54
54: ; preds = %53
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %36
57: ; preds = %36
store i32 0, i32* %3
br label %58
58: ; preds = %57, %29, %10
%59 = load i32, i32* %3
ret i32 %59
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"%s [-V] <filename>[ .. <filename>]\0A\00"
@.str.1 = [3 x i8] c"-V\00"
@.str.2 = [66 x i8] c"piece version %s (c) Wijnand Modderman-Lenstra, https://maze.io/\0A\00"
@.str.3 = [8 x i8] c"0.80.25\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %18
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %38
10: ; preds = %18
%11 = icmp eq i64 %24, %5
br i1 %11, label %12, label %18
12: ; preds = %10
%13 = icmp sgt i32 %0, 1
br i1 %13, label %14, label %38
14: ; preds = %12
%15 = add nsw i32 %0, -1
%16 = zext i32 %15 to i64
%17 = zext i32 %0 to i64
br label %27
18: ; preds = %4, %10
%19 = phi i64 [ 1, %4 ], [ %24, %10 ]
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
%21 = load i8*, i8** %20
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
%24 = add nuw nsw i64 %19, 1
br i1 %23, label %25, label %10
25: ; preds = %18
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %38
27: ; preds = %14, %35
%28 = phi i64 [ 1, %14 ], [ %36, %35 ]
%29 = getelementptr inbounds i8*, i8** %1, i64 %28
%30 = load i8*, i8** %29
%31 = tail call i32 @sauce_show(i8* %30)
%32 = icmp eq i64 %28, %16
br i1 %32, label %35, label %33
33: ; preds = %27
%34 = tail call i32 @putchar(i32 10)
br label %35
35: ; preds = %27, %33
%36 = add nuw nsw i64 %28, 1
%37 = icmp eq i64 %36, %17
br i1 %37, label %38, label %27
38: ; preds = %35, %12, %25, %6
%39 = phi i32 [ 1, %6 ], [ 0, %25 ], [ 0, %12 ], [ 0, %35 ]
ret i32 %39
}