#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*/ exit(int);
scalar_t__ strcmp(char *, char *);
int main() {
  if (strcmp("abc", "abc") != 0) {
    exit(1);
  }
  if (strcmp("abcd", "abce") >= 0) {
    exit(2);
  }
  if (strcmp("abce", "abcd") <= 0) {
    exit(3);
  }
  if (strcmp("", "") != 0) {
    exit(4);
  }
  if (strcmp("abc", "def") >= 0) {
    exit(5);
  }
  if (strcmp("abc", "abcd") >= 0) {
    exit(6);
  }
  if (strcmp("abcd", "abc") <= 0) {
    exit(7);
  }
  if (strcmp("abc", "ABC") <= 0) {
    exit(8);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rsi
mov    %rsi,%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1147 <main+0x27>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xeb6(%rip),%rdi
lea    0xeb4(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jl     116e <main+0x4e>
mov    $0x2,%edi
call   1040 <exit@plt>
lea    0xe94(%rip),%rdi
lea    0xe88(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jg     1195 <main+0x75>
mov    $0x3,%edi
call   1040 <exit@plt>
lea    0xe79(%rip),%rsi
mov    %rsi,%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11b8 <main+0x98>
mov    $0x4,%edi
call   1040 <exit@plt>
lea    0xe41(%rip),%rdi
lea    0xe48(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jl     11df <main+0xbf>
mov    $0x5,%edi
call   1040 <exit@plt>
lea    0xe1a(%rip),%rdi
lea    0xe17(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jl     1206 <main+0xe6>
mov    $0x6,%edi
call   1040 <exit@plt>
lea    0xdf7(%rip),%rdi
lea    0xdec(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jg     122d <main+0x10d>
mov    $0x7,%edi
call   1040 <exit@plt>
lea    0xdcc(%rip),%rdi
lea    0xdd7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jg     1254 <main+0x134>
mov    $0x8,%edi
call   1040 <exit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rdi,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    11ed <main+0xcd>
lea    0xec4(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jns    11f7 <main+0xd7>
lea    0xead(%rip),%rdi
lea    0xea1(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jle    1201 <main+0xe1>
lea    0xe9d(%rip),%rdi
mov    %rdi,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    120b <main+0xeb>
lea    0xe70(%rip),%rdi
lea    0xe77(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jns    1215 <main+0xf5>
lea    0xe58(%rip),%rdi
lea    0xe55(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jns    121f <main+0xff>
lea    0xe44(%rip),%rdi
lea    0xe39(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jle    1229 <main+0x109>
lea    0xe28(%rip),%rdi
lea    0xe33(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jle    1233 <main+0x113>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1040 <exit@plt>
mov    $0x2,%edi
call   1040 <exit@plt>
mov    $0x3,%edi
call   1040 <exit@plt>
mov    $0x4,%edi
call   1040 <exit@plt>
mov    $0x5,%edi
call   1040 <exit@plt>
mov    $0x6,%edi
call   1040 <exit@plt>
mov    $0x7,%edi
call   1040 <exit@plt>
mov    $0x8,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [5 x i8] c"abcd\00"
@.str.2 = [5 x i8] c"abce\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [4 x i8] c"def\00"
@.str.5 = [4 x i8] c"ABC\00"
define i32 @main() {
%1 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @exit(i32 1)
unreachable
5: ; preds = %0
%6 = call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp sge i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @exit(i32 2)
unreachable
10: ; preds = %5
%11 = call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp sle i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @exit(i32 3)
unreachable
15: ; preds = %10
%16 = call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @exit(i32 4)
unreachable
20: ; preds = %15
%21 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp sge i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @exit(i32 5)
unreachable
25: ; preds = %20
%26 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp sge i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @exit(i32 6)
unreachable
30: ; preds = %25
%31 = call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%32 = icmp sle i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @exit(i32 7)
unreachable
35: ; preds = %30
%36 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%37 = icmp sle i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @exit(i32 8)
unreachable
40: ; preds = %35
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [5 x i8] c"abcd\00"
@.str.2 = [5 x i8] c"abce\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [4 x i8] c"def\00"
@.str.5 = [4 x i8] c"ABC\00"
define i32 @main() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %0
%6 = tail call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp sgt i64 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @exit(i32 2)
unreachable
10: ; preds = %5
%11 = tail call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp slt i64 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @exit(i32 3)
unreachable
15: ; preds = %10
%16 = tail call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @exit(i32 4)
unreachable
20: ; preds = %15
%21 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp sgt i64 %21, -1
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = tail call i32 @exit(i32 5)
unreachable
25: ; preds = %20
%26 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp sgt i64 %26, -1
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = tail call i32 @exit(i32 6)
unreachable
30: ; preds = %25
%31 = tail call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%32 = icmp slt i64 %31, 1
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = tail call i32 @exit(i32 7)
unreachable
35: ; preds = %30
%36 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%37 = icmp slt i64 %36, 1
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = tail call i32 @exit(i32 8)
unreachable
40: ; preds = %35
ret i32 0
}