#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*/ GenPrintInstrNoOperand(int, int);
int /*<<< orphan*/ GenPrintInstrOneOperand(int, int /*<<< orphan*/, int, long);
void GenPrintInstr3Operands(int instr, int instrval, int operand1,
                            long operand1val, int operand2, long operand2val,
                            int operand3, long operand3val) {
  GenPrintInstrOneOperand(operand3 < 0x80 ? 0x81 : 0x80, 0, operand3,
                          operand3val);
  GenPrintInstrOneOperand(operand2 < 0x80 ? 0x81 : 0x80, 0, operand2,
                          operand2val);
  GenPrintInstrOneOperand(operand1 < 0x80 ? 0x81 : 0x80, 0, operand1,
                          operand1val);
  GenPrintInstrNoOperand(instr, instrval);
}


x86 assembly (clang, -O0):
<GenPrintInstr3Operands>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    0x10(%rbp),%ecx
mov    $0x80,%edi
mov    $0x81,%eax
cmp    $0x80,%ecx
cmovl  %eax,%edi
mov    0x10(%rbp),%edx
mov    0x18(%rbp),%rcx
xor    %esi,%esi
call   1030 <GenPrintInstrOneOperand@plt>
mov    -0x1c(%rbp),%ecx
mov    $0x80,%edi
mov    $0x81,%eax
cmp    $0x80,%ecx
cmovl  %eax,%edi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rcx
xor    %esi,%esi
call   1030 <GenPrintInstrOneOperand@plt>
mov    -0xc(%rbp),%ecx
mov    $0x80,%edi
mov    $0x81,%eax
cmp    $0x80,%ecx
cmovl  %eax,%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
xor    %esi,%esi
call   1030 <GenPrintInstrOneOperand@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <GenPrintInstrNoOperand@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPrintInstr3Operands>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r13
mov    %r8d,%ebp
mov    %rcx,%r15
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%r12d
mov    0x48(%rsp),%rcx
mov    0x40(%rsp),%edx
xor    %edi,%edi
cmp    $0x80,%edx
setl   %dil
or     $0x80,%edi
xor    %esi,%esi
call   1030 <GenPrintInstrOneOperand@plt>
xor    %edi,%edi
cmp    $0x80,%ebp
setl   %dil
or     $0x80,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %r13,%rcx
call   1030 <GenPrintInstrOneOperand@plt>
xor    %edi,%edi
cmp    $0x80,%ebx
setl   %dil
or     $0x80,%edi
xor    %esi,%esi
mov    %ebx,%edx
mov    %r15,%rcx
call   1030 <GenPrintInstrOneOperand@plt>
mov    %r12d,%edi
mov    %r14d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <GenPrintInstrNoOperand@plt>

LLVM IR (-O0):
define void @GenPrintInstr3Operands(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4, i64 %5, i32 %6, i64 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i32
%14 = alloca i64
%15 = alloca i32
%16 = alloca i64
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i64 %3, i64* %12
store i32 %4, i32* %13
store i64 %5, i64* %14
store i32 %6, i32* %15
store i64 %7, i64* %16
%17 = load i32, i32* %15
%18 = icmp slt i32 %17, 128
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 129, i32 128
%21 = load i32, i32* %15
%22 = load i64, i64* %16
%23 = call i32 @GenPrintInstrOneOperand(i32 %20, i32 0, i32 %21, i64 %22)
%24 = load i32, i32* %13
%25 = icmp slt i32 %24, 128
%26 = zext i1 %25 to i64
%27 = select i1 %25, i32 129, i32 128
%28 = load i32, i32* %13
%29 = load i64, i64* %14
%30 = call i32 @GenPrintInstrOneOperand(i32 %27, i32 0, i32 %28, i64 %29)
%31 = load i32, i32* %11
%32 = icmp slt i32 %31, 128
%33 = zext i1 %32 to i64
%34 = select i1 %32, i32 129, i32 128
%35 = load i32, i32* %11
%36 = load i64, i64* %12
%37 = call i32 @GenPrintInstrOneOperand(i32 %34, i32 0, i32 %35, i64 %36)
%38 = load i32, i32* %9
%39 = load i32, i32* %10
%40 = call i32 @GenPrintInstrNoOperand(i32 %38, i32 %39)
ret void
}

LLVM IR (-O2):
define void @GenPrintInstr3Operands(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4, i64 %5, i32 %6, i64 %7) {
%9 = icmp slt i32 %6, 128
%10 = select i1 %9, i32 129, i32 128
%11 = tail call i32 @GenPrintInstrOneOperand(i32 %10, i32 0, i32 %6, i64 %7)
%12 = icmp slt i32 %4, 128
%13 = select i1 %12, i32 129, i32 128
%14 = tail call i32 @GenPrintInstrOneOperand(i32 %13, i32 0, i32 %4, i64 %5)
%15 = icmp slt i32 %2, 128
%16 = select i1 %15, i32 129, i32 128
%17 = tail call i32 @GenPrintInstrOneOperand(i32 %16, i32 0, i32 %2, i64 %3)
%18 = tail call i32 @GenPrintInstrNoOperand(i32 %0, i32 %1)
ret void
}