#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[]) {
  unsigned char c = argv[1][0];
  if (c > 63) {
    printf("if-1-win ");
    unsigned char x = (c / 3) * 2;
    if (c > 127)
      printf("if-2-win\n");
    else
      printf("if-2-lose\n");
  } else {
    printf("if-1-lose\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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
cmp    $0x3f,%eax
jle    118d <main+0x7d>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x11(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
shl    $0x1,%eax
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
cmp    $0x7f,%eax
jle    117c <main+0x6c>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <main+0x78>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
jmp    1199 <main+0x89>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rax
mov    (%rax),%bl
cmp    $0x40,%bl
jb     114e <main+0x2e>
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
test   %bl,%bl
lea    0xedd(%rip),%rax
lea    0xecc(%rip),%rdi
cmovs  %rax,%rdi
jmp    1155 <main+0x35>
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"if-1-win \00"
@str = [10 x i8] c"if-1-lose\00"
@str.4 = [10 x i8] c"if-2-lose\00"
@str.5 = [9 x i8] c"if-2-win\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 = icmp ugt i8 %5, 63
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = icmp slt i8 %5, 0
%10 = select i1 %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0)
br label %11
11: ; preds = %2, %7
%12 = phi i8* [ %10, %7 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0), %2 ]
%13 = tail call i32 @puts(i8* dereferenceable(1) %12)
ret i32 0
}