#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 main(int argc, char *argv[]) {
  char test = argv[1][0] ^ argv[1][1];
  if (1 < test && test < 5)
    printf("done!");
  else
    printf("nope!");
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
movsbl 0x1(%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jge    1171 <main+0x61>
movsbl -0x11(%rbp),%eax
cmp    $0x5,%eax
jge    1171 <main+0x61>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <main+0x6d>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rax
mov    0x1(%rax),%cl
xor    (%rax),%cl
add    $0xfe,%cl
cmp    $0x3,%cl
lea    0xed9(%rip),%rax
lea    0xed8(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"done!\00"
@.str.1 = [6 x i8] c"nope!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = xor i32 %12, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %6
%21 = load i8, i8* %6
%22 = sext i8 %21 to i32
%23 = icmp slt i32 1, %22
br i1 %23, label %24, label %30
24: ; preds = %2
%25 = load i8, i8* %6
%26 = sext i8 %25 to i32
%27 = icmp slt i32 %26, 5
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %32
30: ; preds = %24, %2
%31 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"done!\00"
@.str.1 = [6 x i8] c"nope!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %6
%8 = xor i8 %7, %5
%9 = add i8 %8, -2
%10 = icmp ult i8 %9, 3
%11 = select i1 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%12 = tail call i32 @printf(i8* dereferenceable(1) %11)
ret i32 0
}