#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 SCHAR_MAX;
int SCHAR_MIN;
int UCHAR_MAX;
int /*<<< orphan*/ fsc(int);
int /*<<< orphan*/ fuc(int);
void h2(void) {
  fsc(SCHAR_MAX + 1);
  fsc(SCHAR_MIN - 1);
  fsc(UCHAR_MAX);
  fsc(UCHAR_MAX + 1);
  fuc(-1);
  fuc(UCHAR_MAX + 1);
  fuc(SCHAR_MIN);
  fuc(SCHAR_MIN - 1);
  fuc(-UCHAR_MAX);
}


x86 assembly (clang, -O0):
<h2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
add    $0x1,%edi
call   1030 <fsc@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
sub    $0x1,%edi
call   1030 <fsc@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
call   1030 <fsc@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
add    $0x1,%edi
call   1030 <fsc@plt>
mov    $0xffffffff,%edi
call   1040 <fuc@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
add    $0x1,%edi
call   1040 <fuc@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
call   1040 <fuc@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
sub    $0x1,%edi
call   1040 <fuc@plt>
xor    %edi,%edi
mov    0x2e48(%rip),%rax
sub    (%rax),%edi
call   1040 <fuc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
add    $0x1,%edi
call   1030 <fsc@plt>
mov    0x2e9c(%rip),%r14
mov    (%r14),%edi
add    $0xffffffff,%edi
call   1030 <fsc@plt>
mov    0x2ea2(%rip),%rbx
mov    (%rbx),%edi
call   1030 <fsc@plt>
mov    (%rbx),%edi
add    $0x1,%edi
call   1030 <fsc@plt>
mov    $0xffffffff,%edi
call   1040 <fuc@plt>
mov    (%rbx),%edi
add    $0x1,%edi
call   1040 <fuc@plt>
mov    (%r14),%edi
call   1040 <fuc@plt>
mov    (%r14),%edi
add    $0xffffffff,%edi
call   1040 <fuc@plt>
xor    %edi,%edi
sub    (%rbx),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fuc@plt>

LLVM IR (-O0):
@SCHAR_MAX = global i32 0
@SCHAR_MIN = global i32 0
@UCHAR_MAX = global i32 0
define void @h2() {
%1 = load i32, i32* @SCHAR_MAX
%2 = add nsw i32 %1, 1
%3 = call i32 @fsc(i32 %2)
%4 = load i32, i32* @SCHAR_MIN
%5 = sub nsw i32 %4, 1
%6 = call i32 @fsc(i32 %5)
%7 = load i32, i32* @UCHAR_MAX
%8 = call i32 @fsc(i32 %7)
%9 = load i32, i32* @UCHAR_MAX
%10 = add nsw i32 %9, 1
%11 = call i32 @fsc(i32 %10)
%12 = call i32 @fuc(i32 -1)
%13 = load i32, i32* @UCHAR_MAX
%14 = add nsw i32 %13, 1
%15 = call i32 @fuc(i32 %14)
%16 = load i32, i32* @SCHAR_MIN
%17 = call i32 @fuc(i32 %16)
%18 = load i32, i32* @SCHAR_MIN
%19 = sub nsw i32 %18, 1
%20 = call i32 @fuc(i32 %19)
%21 = load i32, i32* @UCHAR_MAX
%22 = sub nsw i32 0, %21
%23 = call i32 @fuc(i32 %22)
ret void
}

LLVM IR (-O2):
@SCHAR_MAX = global i32 0
@SCHAR_MIN = global i32 0
@UCHAR_MAX = global i32 0
define void @h2() {
%1 = load i32, i32* @SCHAR_MAX
%2 = add nsw i32 %1, 1
%3 = tail call i32 @fsc(i32 %2)
%4 = load i32, i32* @SCHAR_MIN
%5 = add nsw i32 %4, -1
%6 = tail call i32 @fsc(i32 %5)
%7 = load i32, i32* @UCHAR_MAX
%8 = tail call i32 @fsc(i32 %7)
%9 = load i32, i32* @UCHAR_MAX
%10 = add nsw i32 %9, 1
%11 = tail call i32 @fsc(i32 %10)
%12 = tail call i32 @fuc(i32 -1)
%13 = load i32, i32* @UCHAR_MAX
%14 = add nsw i32 %13, 1
%15 = tail call i32 @fuc(i32 %14)
%16 = load i32, i32* @SCHAR_MIN
%17 = tail call i32 @fuc(i32 %16)
%18 = load i32, i32* @SCHAR_MIN
%19 = add nsw i32 %18, -1
%20 = tail call i32 @fuc(i32 %19)
%21 = load i32, i32* @UCHAR_MAX
%22 = sub nsw i32 0, %21
%23 = tail call i32 @fuc(i32 %22)
ret void
}