#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*/ e_addri(int, int);
int /*<<< orphan*/ e_decr(int);
int /*<<< orphan*/ e_incr(int);
int /*<<< orphan*/ e_xxxri(int, int, int, int);
void e_subri(int r, int i) {
  if (i == -1)
    e_incr(r);
  else if (i == 1)
    e_decr(r);
  else if (i == 128)
    e_addri(r, -i);
  e_xxxri(r, i, 5, 0x2D);
}


x86 assembly (clang, -O0):
<e_subri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1165 <e_subri+0x25>
mov    -0x4(%rbp),%edi
call   1030 <e_incr@plt>
jmp    11a0 <e_subri+0x60>
cmpl   $0x1,-0x8(%rbp)
jne    117c <e_subri+0x3c>
mov    -0x4(%rbp),%edi
call   1060 <e_decr@plt>
jmp    119b <e_subri+0x5b>
cmpl   $0x80,-0x8(%rbp)
jne    1196 <e_subri+0x56>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
sub    -0x8(%rbp),%esi
call   1040 <e_addri@plt>
jmp    119b <e_subri+0x5b>
jmp    11a0 <e_subri+0x60>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x5,%edx
mov    $0x2d,%ecx
call   1050 <e_xxxri@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_subri>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
cmp    $0x80,%esi
je     1162 <e_subri+0x22>
cmp    $0x1,%ebx
je     1170 <e_subri+0x30>
cmp    $0xffffffff,%ebx
jne    1177 <e_subri+0x37>
mov    %ebp,%edi
call   1030 <e_incr@plt>
jmp    1177 <e_subri+0x37>
mov    %ebp,%edi
mov    $0xffffff80,%esi
call   1040 <e_addri@plt>
jmp    1177 <e_subri+0x37>
mov    %ebp,%edi
call   1060 <e_decr@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x5,%edx
mov    $0x2d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <e_xxxri@plt>

LLVM IR (-O0):
define void @e_subri(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @e_incr(i32 %8)
br label %26
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %3
%15 = call i32 @e_decr(i32 %14)
br label %25
16: ; preds = %10
%17 = load i32, i32* %4
%18 = icmp eq i32 %17, 128
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = sub nsw i32 0, %21
%23 = call i32 @e_addri(i32 %20, i32 %22)
br label %24
24: ; preds = %19, %16
br label %25
25: ; preds = %24, %13
br label %26
26: ; preds = %25, %7
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = call i32 @e_xxxri(i32 %27, i32 %28, i32 5, i32 45)
ret void
}

LLVM IR (-O2):
define void @e_subri(i32 %0, i32 %1) {
switch i32 %1, label %9 [
i32 -1, label %3
i32 1, label %5
i32 128, label %7
]
3: ; preds = %2
%4 = tail call i32 @e_incr(i32 %0)
br label %9
5: ; preds = %2
%6 = tail call i32 @e_decr(i32 %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @e_addri(i32 %0, i32 -128)
br label %9
9: ; preds = %2, %5, %7, %3
%10 = tail call i32 @e_xxxri(i32 %0, i32 %1, i32 5, i32 45)
ret void
}