#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(unsigned char const *, int /*<<< orphan*/, int);
int /*<<< orphan*/ testmin(unsigned char const *, int, int);
int main(void) {
  static unsigned char const A[32] = {
      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 unsigned char const B[32] = {
      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 unsigned char const C[32] = {
      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,
  };
  testmin(A, 10, 1);
  testmin(B, 0x7f, 0x70);
  testmin(C, 0x7f, 0x09);
  testmax(A, 0, 0x7f);
  testmax(B, 0, 0x8f);
  testmax(C, 0, 0xff);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
call   1040 <testmin@plt>
lea    0xed4(%rip),%rdi
mov    $0x7f,%esi
mov    $0x70,%edx
call   1040 <testmin@plt>
lea    0xede(%rip),%rdi
mov    $0x7f,%esi
mov    $0x9,%edx
call   1040 <testmin@plt>
lea    0xe88(%rip),%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1030 <testmax@plt>
lea    0xe95(%rip),%rdi
xor    %esi,%esi
mov    $0x8f,%edx
call   1030 <testmax@plt>
lea    0xea2(%rip),%rdi
xor    %esi,%esi
mov    $0xff,%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    0xed4(%rip),%r14
mov    %r14,%rdi
mov    $0xa,%esi
mov    $0x1,%edx
call   1040 <testmin@plt>
lea    0xedb(%rip),%r15
mov    %r15,%rdi
mov    $0x7f,%esi
mov    $0x70,%edx
call   1040 <testmin@plt>
lea    0xee2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x7f,%esi
mov    $0x9,%edx
call   1040 <testmin@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1030 <testmax@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x8f,%edx
call   1030 <testmax@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xff,%edx
call   1030 <testmax@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@main.A = internal constant [32 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10pqrstuvwxyz{|}~\7F"
@main.B = internal constant [32 x i8] c"pqrstuvwxyz{|}~\7F\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F"
@main.C = internal constant [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"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @testmin(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.A, i64 0, i64 0), i32 10, i32 1)
%3 = call i32 @testmin(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.B, i64 0, i64 0), i32 127, i32 112)
%4 = call i32 @testmin(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.C, i64 0, i64 0), i32 127, i32 9)
%5 = call i32 @testmax(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.A, i64 0, i64 0), i32 0, i32 127)
%6 = call i32 @testmax(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.B, i64 0, i64 0), i32 0, i32 143)
%7 = call i32 @testmax(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.C, i64 0, i64 0), i32 0, i32 255)
ret i32 0
}

LLVM IR (-O2):
@main.A = internal constant [32 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10pqrstuvwxyz{|}~\7F"
@main.B = internal constant [32 x i8] c"pqrstuvwxyz{|}~\7F\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F"
@main.C = internal constant [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"
define i32 @main() {
%1 = tail call i32 @testmin(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.A, i64 0, i64 0), i32 10, i32 1)
%2 = tail call i32 @testmin(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.B, i64 0, i64 0), i32 127, i32 112)
%3 = tail call i32 @testmin(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.C, i64 0, i64 0), i32 127, i32 9)
%4 = tail call i32 @testmax(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.A, i64 0, i64 0), i32 0, i32 127)
%5 = tail call i32 @testmax(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.B, i64 0, i64 0), i32 0, i32 143)
%6 = tail call i32 @testmax(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @main.C, i64 0, i64 0), i32 0, i32 255)
ret i32 0
}