#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*/ testmax(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ testmin(char *, int /*<<< orphan*/, int);
int __attribute__((optimize("-ftree-parallelize-loops=0"))) main(void) {
  static signed char A[3200] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
                                0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
                                0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
                                0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f};
  static signed char B[3200] = {0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
                                0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
                                0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
                                0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f};
  static signed char C[3200] = {
      0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0x09, 0x0a, 0x0b,
      0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85,
      0x86, 0x87, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
  };
  int i;
  for (i = 32; i < 3200; i++) {
    A[i] = 0x01;
    B[i] = 0x70;
    C[i] = 0xff;
  }
  testmin(A, 0, 0);
  testmin(B, 0, 0x80);
  testmin(C, 0, 0x80);
  testmax(A, 0, 0x7f);
  testmax(B, 0, 0x7f);
  testmax(C, 0, 0x77);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
cmpl   $0xc80,-0x8(%rbp)
jge    117e <main+0x5e>
movslq -0x8(%rbp),%rcx
lea    0x2ef2(%rip),%rax
movb   $0x1,(%rax,%rcx,1)
movslq -0x8(%rbp),%rcx
lea    0x3b63(%rip),%rax
movb   $0x70,(%rax,%rcx,1)
movslq -0x8(%rbp),%rcx
lea    0x47d4(%rip),%rax
movb   $0xff,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
lea    0x2ebb(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <testmin@plt>
lea    0x3b2b(%rip),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <testmin@plt>
lea    0x4798(%rip),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <testmin@plt>
lea    0x2e85(%rip),%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1030 <testmax@plt>
lea    0x3af2(%rip),%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1030 <testmax@plt>
lea    0x475f(%rip),%rdi
xor    %esi,%esi
mov    $0x77,%edx
call   1030 <testmax@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0x2f24(%rip),%rdi
mov    $0xc60,%edx
mov    $0x1,%esi
call   1030 <memset@plt>
lea    0x2eee(%rip),%r14
lea    0x3b87(%rip),%rdi
mov    $0xc60,%edx
mov    $0x70,%esi
call   1030 <memset@plt>
lea    0x3b51(%rip),%r15
lea    0x47ea(%rip),%rdi
mov    $0xc60,%edx
mov    $0xff,%esi
call   1030 <memset@plt>
lea    0x47b4(%rip),%rbx
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <testmin@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <testmin@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <testmin@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1040 <testmax@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1040 <testmax@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x77,%edx
call   1040 <testmax@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@main.A = internal global <{ [32 x i8], [3168 x i8] }> <{ [32 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10pqrstuvwxyz{|}~\7F", [3168 x i8] zeroinitializer }>
@main.B = internal global <{ [32 x i8], [3168 x i8] }> <{ [32 x i8] c"pqrstuvwxyz{|}~\7F\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F", [3168 x i8] zeroinitializer }>
@main.C = internal global <{ [32 x i8], [3168 x i8] }> <{ [32 x i8] c"\FF\FE\FD\FC\FB\FA\F9\F8\09\0A\0B\0C\0D\0E\0F\10\80\81\82\83\84\85\86\87pqrstuvw", [3168 x i8] zeroinitializer }>
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 32, i32* %2
br label %3
3: ; preds = %16, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 3200
br i1 %5, label %6, label %19
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.A to [3200 x i8]*), i64 0, i64 %8
store i8 1, i8* %9
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.B to [3200 x i8]*), i64 0, i64 %11
store i8 112, i8* %12
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.C to [3200 x i8]*), i64 0, i64 %14
store i8 -1, i8* %15
br label %16
16: ; preds = %6
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %3
19: ; preds = %3
%20 = call i32 @testmin(i8* getelementptr inbounds ([3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.A to [3200 x i8]*), i64 0, i64 0), i32 0, i32 0)
%21 = call i32 @testmin(i8* getelementptr inbounds ([3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.B to [3200 x i8]*), i64 0, i64 0), i32 0, i32 128)
%22 = call i32 @testmin(i8* getelementptr inbounds ([3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.C to [3200 x i8]*), i64 0, i64 0), i32 0, i32 128)
%23 = call i32 @testmax(i8* getelementptr inbounds ([3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.A to [3200 x i8]*), i64 0, i64 0), i32 0, i32 127)
%24 = call i32 @testmax(i8* getelementptr inbounds ([3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.B to [3200 x i8]*), i64 0, i64 0), i32 0, i32 127)
%25 = call i32 @testmax(i8* getelementptr inbounds ([3200 x i8], [3200 x i8]* bitcast (<{ [32 x i8], [3168 x i8] }>* @main.C to [3200 x i8]*), i64 0, i64 0), i32 0, i32 119)
ret i32 0
}

LLVM IR (-O2):
@main.A = internal global <{ [32 x i8], [3168 x i8] }> <{ [32 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10pqrstuvwxyz{|}~\7F", [3168 x i8] zeroinitializer }>
@main.B = internal global <{ [32 x i8], [3168 x i8] }> <{ [32 x i8] c"pqrstuvwxyz{|}~\7F\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F", [3168 x i8] zeroinitializer }>
@main.C = internal global <{ [32 x i8], [3168 x i8] }> <{ [32 x i8] c"\FF\FE\FD\FC\FB\FA\F9\F8\09\0A\0B\0C\0D\0E\0F\10\80\81\82\83\84\85\86\87pqrstuvw", [3168 x i8] zeroinitializer }>
define i32 @main() {
%1 = tail call i32 @testmin(i8* getelementptr inbounds (<{ [32 x i8], [3168 x i8] }>, <{ [32 x i8], [3168 x i8] }>* @main.A, i64 0, i32 0, i64 0), i32 0, i32 0)
%2 = tail call i32 @testmin(i8* getelementptr inbounds (<{ [32 x i8], [3168 x i8] }>, <{ [32 x i8], [3168 x i8] }>* @main.B, i64 0, i32 0, i64 0), i32 0, i32 128)
%3 = tail call i32 @testmin(i8* getelementptr inbounds (<{ [32 x i8], [3168 x i8] }>, <{ [32 x i8], [3168 x i8] }>* @main.C, i64 0, i32 0, i64 0), i32 0, i32 128)
%4 = tail call i32 @testmax(i8* getelementptr inbounds (<{ [32 x i8], [3168 x i8] }>, <{ [32 x i8], [3168 x i8] }>* @main.A, i64 0, i32 0, i64 0), i32 0, i32 127)
%5 = tail call i32 @testmax(i8* getelementptr inbounds (<{ [32 x i8], [3168 x i8] }>, <{ [32 x i8], [3168 x i8] }>* @main.B, i64 0, i32 0, i64 0), i32 0, i32 127)
%6 = tail call i32 @testmax(i8* getelementptr inbounds (<{ [32 x i8], [3168 x i8] }>, <{ [32 x i8], [3168 x i8] }>* @main.C, i64 0, i32 0, i64 0), i32 0, i32 119)
ret i32 0
}