#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*/ scBubbleSort(char *, int);
int /*<<< orphan*/ ucBubbleSort(unsigned char *, int);
int main() {
  signed char scinput[21];
  unsigned char ucinput[21];
  signed char i;
  unsigned char j;
  int count, errorsc, erroruc;
  scinput[0] = 0xDF;
  scinput[1] = 0x44;
  scinput[2] = 0x12;
  scinput[3] = 0x45;
  scinput[4] = 0x80;
  scinput[5] = 0xDD;
  scinput[6] = 0x43;
  scinput[7] = 0x67;
  scinput[8] = 0x00;
  scinput[9] = 0x23;
  scinput[10] = 0x01;
  scinput[11] = 0xF7;
  scinput[12] = 0x45;
  scinput[13] = 0x86;
  scinput[14] = 0x96;
  scinput[15] = 0x52;
  scinput[16] = 0xFF;
  scinput[17] = 0x56;
  scinput[18] = 0x23;
  scinput[19] = 0x10;
  scinput[20] = 0x05;
  ucinput[0] = 0xDF;
  ucinput[1] = 0x44;
  ucinput[2] = 0x12;
  ucinput[3] = 0x45;
  ucinput[4] = 0x80;
  ucinput[5] = 0xDD;
  ucinput[6] = 0x43;
  ucinput[7] = 0x67;
  ucinput[8] = 0x00;
  ucinput[9] = 0x23;
  ucinput[10] = 0x01;
  ucinput[11] = 0xF7;
  ucinput[12] = 0x45;
  ucinput[13] = 0x86;
  ucinput[14] = 0x96;
  ucinput[15] = 0x52;
  ucinput[16] = 0xFF;
  ucinput[17] = 0x56;
  ucinput[18] = 0x23;
  ucinput[19] = 0x10;
  ucinput[20] = 0x05;
  scBubbleSort(scinput, 21);
  ucBubbleSort(ucinput, 21);
  errorsc = 0;
  for (count = 0; count < 20; count++)
    if (scinput[count] > scinput[count + 1])
      errorsc = 1;
  erroruc = 0;
  for (count = 0; count < 20; count++)
    if (ucinput[count] > ucinput[count + 1])
      erroruc = 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xdf,-0x20(%rbp)
movb   $0x44,-0x1f(%rbp)
movb   $0x12,-0x1e(%rbp)
movb   $0x45,-0x1d(%rbp)
movb   $0x80,-0x1c(%rbp)
movb   $0xdd,-0x1b(%rbp)
movb   $0x43,-0x1a(%rbp)
movb   $0x67,-0x19(%rbp)
movb   $0x0,-0x18(%rbp)
movb   $0x23,-0x17(%rbp)
movb   $0x1,-0x16(%rbp)
movb   $0xf7,-0x15(%rbp)
movb   $0x45,-0x14(%rbp)
movb   $0x86,-0x13(%rbp)
movb   $0x96,-0x12(%rbp)
movb   $0x52,-0x11(%rbp)
movb   $0xff,-0x10(%rbp)
movb   $0x56,-0xf(%rbp)
movb   $0x23,-0xe(%rbp)
movb   $0x10,-0xd(%rbp)
movb   $0x5,-0xc(%rbp)
movb   $0xdf,-0x40(%rbp)
movb   $0x44,-0x3f(%rbp)
movb   $0x12,-0x3e(%rbp)
movb   $0x45,-0x3d(%rbp)
movb   $0x80,-0x3c(%rbp)
movb   $0xdd,-0x3b(%rbp)
movb   $0x43,-0x3a(%rbp)
movb   $0x67,-0x39(%rbp)
movb   $0x0,-0x38(%rbp)
movb   $0x23,-0x37(%rbp)
movb   $0x1,-0x36(%rbp)
movb   $0xf7,-0x35(%rbp)
movb   $0x45,-0x34(%rbp)
movb   $0x86,-0x33(%rbp)
movb   $0x96,-0x32(%rbp)
movb   $0x52,-0x31(%rbp)
movb   $0xff,-0x30(%rbp)
movb   $0x56,-0x2f(%rbp)
movb   $0x23,-0x2e(%rbp)
movb   $0x10,-0x2d(%rbp)
movb   $0x5,-0x2c(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x15,%esi
call   1040 <scBubbleSort@plt>
lea    -0x40(%rbp),%rdi
mov    $0x15,%esi
call   1030 <ucBubbleSort@plt>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x48(%rbp)
cmpl   $0x14,-0x48(%rbp)
jge    1244 <main+0x124>
movslq -0x48(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0x20(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jle    1231 <main+0x111>
movl   $0x1,-0x4c(%rbp)
jmp    1236 <main+0x116>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1201 <main+0xe1>
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x48(%rbp)
cmpl   $0x14,-0x48(%rbp)
jge    1295 <main+0x175>
movslq -0x48(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%eax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movzbl -0x40(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jle    1282 <main+0x162>
movl   $0x1,-0x50(%rbp)
jmp    1287 <main+0x167>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1252 <main+0x132>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x102356ff,0x30(%rsp)
10
movb   $0x5,0x34(%rsp)
movaps %xmm0,(%rsp)
movl   $0x102356ff,0x10(%rsp)
10
movb   $0x5,0x14(%rsp)
lea    0x20(%rsp),%rdi
mov    $0x15,%esi
call   1040 <scBubbleSort@plt>
mov    %rsp,%rdi
mov    $0x15,%esi
call   1030 <ucBubbleSort@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i8]
%3 = alloca [21 x i8]
%4 = alloca i8
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
store i8 -33, i8* %9
%10 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 1
store i8 68, i8* %10
%11 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 2
store i8 18, i8* %11
%12 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 3
store i8 69, i8* %12
%13 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 4
store i8 -128, i8* %13
%14 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 5
store i8 -35, i8* %14
%15 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 6
store i8 67, i8* %15
%16 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 7
store i8 103, i8* %16
%17 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 8
store i8 0, i8* %17
%18 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 9
store i8 35, i8* %18
%19 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 10
store i8 1, i8* %19
%20 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 11
store i8 -9, i8* %20
%21 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 12
store i8 69, i8* %21
%22 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 13
store i8 -122, i8* %22
%23 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 14
store i8 -106, i8* %23
%24 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 15
store i8 82, i8* %24
%25 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 16
store i8 -1, i8* %25
%26 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 17
store i8 86, i8* %26
%27 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 18
store i8 35, i8* %27
%28 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 19
store i8 16, i8* %28
%29 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 20
store i8 5, i8* %29
%30 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
store i8 -33, i8* %30
%31 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 1
store i8 68, i8* %31
%32 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 2
store i8 18, i8* %32
%33 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 3
store i8 69, i8* %33
%34 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 4
store i8 -128, i8* %34
%35 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 5
store i8 -35, i8* %35
%36 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 6
store i8 67, i8* %36
%37 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 7
store i8 103, i8* %37
%38 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 8
store i8 0, i8* %38
%39 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 9
store i8 35, i8* %39
%40 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 10
store i8 1, i8* %40
%41 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 11
store i8 -9, i8* %41
%42 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 12
store i8 69, i8* %42
%43 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 13
store i8 -122, i8* %43
%44 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 14
store i8 -106, i8* %44
%45 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 15
store i8 82, i8* %45
%46 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 16
store i8 -1, i8* %46
%47 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 17
store i8 86, i8* %47
%48 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 18
store i8 35, i8* %48
%49 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 19
store i8 16, i8* %49
%50 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 20
store i8 5, i8* %50
%51 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%52 = call i32 @scBubbleSort(i8* %51, i32 21)
%53 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%54 = call i32 @ucBubbleSort(i8* %53, i32 21)
store i32 0, i32* %7
store i32 0, i32* %6
br label %55
55: ; preds = %73, %0
%56 = load i32, i32* %6
%57 = icmp slt i32 %56, 20
br i1 %57, label %58, label %76
58: ; preds = %55
%59 = load i32, i32* %6
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 %66
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp sgt i32 %63, %69
br i1 %70, label %71, label %72
71: ; preds = %58
store i32 1, i32* %7
br label %72
72: ; preds = %71, %58
br label %73
73: ; preds = %72
%74 = load i32, i32* %6
%75 = add nsw i32 %74, 1
store i32 %75, i32* %6
br label %55
76: ; preds = %55
store i32 0, i32* %8
store i32 0, i32* %6
br label %77
77: ; preds = %95, %76
%78 = load i32, i32* %6
%79 = icmp slt i32 %78, 20
br i1 %79, label %80, label %98
80: ; preds = %77
%81 = load i32, i32* %6
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = load i32, i32* %6
%87 = add nsw i32 %86, 1
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 %88
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = icmp sgt i32 %85, %91
br i1 %92, label %93, label %94
93: ; preds = %80
store i32 1, i32* %8
br label %94
94: ; preds = %93, %80
br label %95
95: ; preds = %94
%96 = load i32, i32* %6
%97 = add nsw i32 %96, 1
store i32 %97, i32* %6
br label %77
98: ; preds = %77
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [21 x i8]
%2 = alloca [21 x i8]
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%5 = bitcast [21 x i8]* %1 to <16 x i8>*
store <16 x i8> <i8 -33, i8 68, i8 18, i8 69, i8 -128, i8 -35, i8 67, i8 103, i8 0, i8 35, i8 1, i8 -9, i8 69, i8 -122, i8 -106, i8 82>, <16 x i8>* %5
%6 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 16
store i8 -1, i8* %6
%7 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 17
store i8 86, i8* %7
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 18
store i8 35, i8* %8
%9 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 19
store i8 16, i8* %9
%10 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 20
store i8 5, i8* %10
%11 = bitcast [21 x i8]* %2 to <16 x i8>*
store <16 x i8> <i8 -33, i8 68, i8 18, i8 69, i8 -128, i8 -35, i8 67, i8 103, i8 0, i8 35, i8 1, i8 -9, i8 69, i8 -122, i8 -106, i8 82>, <16 x i8>* %11
%12 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 16
store i8 -1, i8* %12
%13 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 17
store i8 86, i8* %13
%14 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 18
store i8 35, i8* %14
%15 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 19
store i8 16, i8* %15
%16 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 20
store i8 5, i8* %16
%17 = call i32 @scBubbleSort(i8* %3, i32 21)
%18 = call i32 @ucBubbleSort(i8* %4, i32 21)
ret i32 0
}