#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*/ f_schar_1(char const);
int /*<<< orphan*/ f_schar_2(char const, char const);
int /*<<< orphan*/ sink(int /*<<< orphan*/);
void test_schar_cst(void) {
  const signed char min = (-0x7f - 1);
  const signed char max = 0x7f;
  sink(f_schar_1(min));
  sink(f_schar_1(-1));
  sink(f_schar_1(0));
  sink(f_schar_1(1));
  sink(f_schar_1(max));
  sink(f_schar_2(0, min));
  sink(f_schar_2(min, 0));
  sink(f_schar_2(0, -1));
  sink(f_schar_2(-1, 0));
}


x86 assembly (clang, -O0):
<test_schar_cst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x80,-0x1(%rbp)
movb   $0x7f,-0x2(%rbp)
mov    $0xffffff80,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0xffffffff,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
xor    %edi,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0x1,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0x7f,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
xor    %edi,%edi
mov    $0xffffff80,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0xffffff80,%edi
xor    %esi,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
call   1050 <sink@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
call   1050 <sink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_schar_cst>:
push   %rax
mov    $0xffffff80,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0xffffffff,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
xor    %edi,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0x1,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0x7f,%edi
call   1030 <f_schar_1@plt>
mov    %eax,%edi
call   1050 <sink@plt>
xor    %edi,%edi
mov    $0xffffff80,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0xffffff80,%edi
xor    %esi,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
call   1050 <sink@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
call   1050 <sink@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <f_schar_2@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <sink@plt>

LLVM IR (-O0):
define void @test_schar_cst() {
%1 = alloca i8
%2 = alloca i8
store i8 -128, i8* %1
store i8 127, i8* %2
%3 = call i32 @f_schar_1(i8 signext -128)
%4 = call i32 @sink(i32 %3)
%5 = call i32 @f_schar_1(i8 signext -1)
%6 = call i32 @sink(i32 %5)
%7 = call i32 @f_schar_1(i8 signext 0)
%8 = call i32 @sink(i32 %7)
%9 = call i32 @f_schar_1(i8 signext 1)
%10 = call i32 @sink(i32 %9)
%11 = call i32 @f_schar_1(i8 signext 127)
%12 = call i32 @sink(i32 %11)
%13 = call i32 @f_schar_2(i8 signext 0, i8 signext -128)
%14 = call i32 @sink(i32 %13)
%15 = call i32 @f_schar_2(i8 signext -128, i8 signext 0)
%16 = call i32 @sink(i32 %15)
%17 = call i32 @f_schar_2(i8 signext 0, i8 signext -1)
%18 = call i32 @sink(i32 %17)
%19 = call i32 @f_schar_2(i8 signext -1, i8 signext 0)
%20 = call i32 @sink(i32 %19)
ret void
}

LLVM IR (-O2):
define void @test_schar_cst() {
%1 = tail call i32 @f_schar_1(i8 signext -128)
%2 = tail call i32 @sink(i32 %1)
%3 = tail call i32 @f_schar_1(i8 signext -1)
%4 = tail call i32 @sink(i32 %3)
%5 = tail call i32 @f_schar_1(i8 signext 0)
%6 = tail call i32 @sink(i32 %5)
%7 = tail call i32 @f_schar_1(i8 signext 1)
%8 = tail call i32 @sink(i32 %7)
%9 = tail call i32 @f_schar_1(i8 signext 127)
%10 = tail call i32 @sink(i32 %9)
%11 = tail call i32 @f_schar_2(i8 signext 0, i8 signext -128)
%12 = tail call i32 @sink(i32 %11)
%13 = tail call i32 @f_schar_2(i8 signext -128, i8 signext 0)
%14 = tail call i32 @sink(i32 %13)
%15 = tail call i32 @f_schar_2(i8 signext 0, i8 signext -1)
%16 = tail call i32 @sink(i32 %15)
%17 = tail call i32 @f_schar_2(i8 signext -1, i8 signext 0)
%18 = tail call i32 @sink(i32 %17)
ret void
}