#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*/ printf(char *, ...);
int check_arguments(int index, int out_index) {
  if (out_index != 0) {
    {
      printf("Error: ");
      printf("%s", "-c and -x is contradictory option,\n    \rPlease, use only "
                   "one of them\n");
    };
    return 1;
  }
  if (index < 3) {
    {
      printf("Error: ");
      printf("%s",
             "missing operand    \n\rTry 'huff -h' for more information\n");
    };
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_arguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1157 <check_arguments+0x47>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1197 <check_arguments+0x87>
cmpl   $0x3,-0x8(%rbp)
jge    1190 <check_arguments+0x80>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe92(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1197 <check_arguments+0x87>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_arguments>:
push   %rbx
test   %esi,%esi
je     112e <check_arguments+0xe>
lea    0xf14(%rip),%rbx
jmp    113c <check_arguments+0x1c>
xor    %eax,%eax
cmp    $0x2,%edi
jg     1157 <check_arguments+0x37>
lea    0xecc(%rip),%rbx
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Error: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [70 x i8] c"-c and -x is contradictory option,\0A \0DPlease, use only one of them\0A\00"
@.str.3 = [57 x i8] c"missing operand \0A\0DTry 'huff -h' for more information\0A\00"
define i32 @check_arguments(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %18
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %18
17: ; preds = %11
store i32 0, i32* %3
br label %18
18: ; preds = %17, %14, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [8 x i8] c"Error: \00"
@str = [56 x i8] c"missing operand \0A\0DTry 'huff -h' for more information\00"
@str.4 = [69 x i8] c"-c and -x is contradictory option,\0A \0DPlease, use only one of them\00"
define i32 @check_arguments(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = icmp slt i32 %0, 3
br i1 %5, label %6, label %10
6: ; preds = %4, %2
%7 = phi i8* [ getelementptr inbounds ([69 x i8], [69 x i8]* @str.4, i64 0, i64 0), %2 ], [ getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0), %4 ]
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) %7)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ 0, %4 ], [ 1, %6 ]
ret i32 %11
}