#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*/ abort();
char stab_xcoff_builtin_type(int);
int main() {
  int i;
  if (stab_xcoff_builtin_type(0) != 0)
    abort();
  if (stab_xcoff_builtin_type(-1) != 'i')
    abort();
  if (stab_xcoff_builtin_type(-2) != 's')
    abort();
  if (stab_xcoff_builtin_type(-3) != 's')
    abort();
  for (i = -4; i >= -34; --i)
    if (stab_xcoff_builtin_type(i) != 'i')
      abort();
  if (stab_xcoff_builtin_type(-35) != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <stab_xcoff_builtin_type@plt>
movsbl %al,%eax
cmp    $0x0,%eax
je     1149 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffff,%edi
call   1040 <stab_xcoff_builtin_type@plt>
movsbl %al,%eax
cmp    $0x69,%eax
je     1166 <main+0x46>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xfffffffe,%edi
call   1040 <stab_xcoff_builtin_type@plt>
movsbl %al,%eax
cmp    $0x73,%eax
je     1183 <main+0x63>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xfffffffd,%edi
call   1040 <stab_xcoff_builtin_type@plt>
movsbl %al,%eax
cmp    $0x73,%eax
je     11a0 <main+0x80>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0xfffffffc,-0x8(%rbp)
cmpl   $0xffffffde,-0x8(%rbp)
jl     11df <main+0xbf>
mov    -0x8(%rbp),%edi
call   1040 <stab_xcoff_builtin_type@plt>
movsbl %al,%eax
cmp    $0x69,%eax
je     11cc <main+0xac>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11d1 <main+0xb1>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    11a7 <main+0x87>
mov    $0xffffffdd,%edi
call   1040 <stab_xcoff_builtin_type@plt>
movsbl %al,%eax
cmp    $0x0,%eax
je     11fc <main+0xdc>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <stab_xcoff_builtin_type@plt>
test   %al,%al
jne    1185 <main+0x65>
mov    $0xffffffff,%edi
call   1040 <stab_xcoff_builtin_type@plt>
cmp    $0x69,%al
jne    1185 <main+0x65>
mov    $0xfffffffe,%edi
call   1040 <stab_xcoff_builtin_type@plt>
cmp    $0x73,%al
jne    1185 <main+0x65>
mov    $0xfffffffd,%edi
call   1040 <stab_xcoff_builtin_type@plt>
cmp    $0x73,%al
jne    1185 <main+0x65>
mov    $0xfffffffc,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <stab_xcoff_builtin_type@plt>
cmp    $0x69,%al
jne    1185 <main+0x65>
add    $0xffffffff,%ebx
cmp    $0xffffffde,%ebx
jae    1160 <main+0x40>
mov    $0xffffffdd,%edi
call   1040 <stab_xcoff_builtin_type@plt>
test   %al,%al
jne    1185 <main+0x65>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call signext i8 @stab_xcoff_builtin_type(i32 0)
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call signext i8 @stab_xcoff_builtin_type(i32 -1)
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 105
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %8
%15 = call signext i8 @stab_xcoff_builtin_type(i32 -2)
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 115
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %14
%21 = call signext i8 @stab_xcoff_builtin_type(i32 -3)
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 115
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %20
store i32 -4, i32* %2
br label %27
27: ; preds = %38, %26
%28 = load i32, i32* %2
%29 = icmp sge i32 %28, -34
br i1 %29, label %30, label %41
30: ; preds = %27
%31 = load i32, i32* %2
%32 = call signext i8 @stab_xcoff_builtin_type(i32 %31)
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 105
br i1 %34, label %35, label %37
35: ; preds = %30
%36 = call i32 (...) @abort()
unreachable
37: ; preds = %30
br label %38
38: ; preds = %37
%39 = load i32, i32* %2
%40 = add nsw i32 %39, -1
store i32 %40, i32* %2
br label %27
41: ; preds = %27
%42 = call signext i8 @stab_xcoff_builtin_type(i32 -35)
%43 = sext i8 %42 to i32
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i32 (...) @abort()
unreachable
47: ; preds = %41
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 @stab_xcoff_builtin_type(i32 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call signext i8 @stab_xcoff_builtin_type(i32 -1)
%7 = icmp eq i8 %6, 105
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call signext i8 @stab_xcoff_builtin_type(i32 -2)
%12 = icmp eq i8 %11, 115
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call signext i8 @stab_xcoff_builtin_type(i32 -3)
%17 = icmp eq i8 %16, 115
br i1 %17, label %22, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %22
%21 = icmp ugt i32 %26, -35
br i1 %21, label %22, label %29
22: ; preds = %15, %20
%23 = phi i32 [ %26, %20 ], [ -4, %15 ]
%24 = tail call signext i8 @stab_xcoff_builtin_type(i32 %23)
%25 = icmp eq i8 %24, 105
%26 = add nsw i32 %23, -1
br i1 %25, label %20, label %27
27: ; preds = %22
%28 = tail call i32 (...) @abort()
unreachable
29: ; preds = %20
%30 = tail call signext i8 @stab_xcoff_builtin_type(i32 -35)
%31 = icmp eq i8 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %29
%33 = tail call i32 (...) @abort()
unreachable
34: ; preds = %29
ret i32 0
}