#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*/ GenPrintInstr3Operands(int, int, int, long, int, long, int,
                                          long);
int /*<<< orphan*/ GenPrintInstrNoOperand(int, int);
int /*<<< orphan*/ GenPrintInstrOneOperand(int, int /*<<< orphan*/, int, long);
void GenPrintInstr2Operands(int instr, int instrval, int operand1,
                            long operand1val, int operand2, long operand2val) {
  if (instr == 0x80) {
    GenPrintInstrOneOperand(operand2 < 0x80 ? 0x81 : 0x80, 0, operand2,
                            operand2val);
    GenPrintInstrOneOperand(0x82, 0, operand1, operand1val);
  } else {
    if (instr >= 0x0A && instr <= 0x16) {
      GenPrintInstr3Operands(instr, instrval, operand1, operand1val, operand1,
                             operand1val, operand2, operand2val);
    } else if (instr >= 0x02 && instr <= 0x04) {
      GenPrintInstr3Operands(instr, instrval, operand1, operand1val, operand2,
                             operand2val, 0x80,
                             operand2 < 0x80 ? operand2val : 0);
    } else if (instr >= 0x05 && instr <= 0x07) {
      GenPrintInstr3Operands(instr, instrval, operand2, operand2val, operand1,
                             operand1val, 0x80,
                             operand1 < 0x80 ? operand1val : 0);
    } else {
      GenPrintInstrOneOperand(operand2 < 0x80 ? 0x81 : 0x80, 0, operand2,
                              operand2val);
      GenPrintInstrOneOperand(operand1 < 0x80 ? 0x81 : 0x80, 0, operand1,
                              operand1val);
      GenPrintInstrNoOperand(instr, instrval);
    }
  }
}


x86 assembly (clang, -O0):
<GenPrintInstr2Operands>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
cmpl   $0x80,-0x4(%rbp)
jne    1199 <GenPrintInstr2Operands+0x69>
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   1040 <GenPrintInstrOneOperand@plt>
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x82,%edi
xor    %esi,%esi
call   1040 <GenPrintInstrOneOperand@plt>
jmp    1368 <GenPrintInstr2Operands+0x238>
cmpl   $0xa,-0x4(%rbp)
jl     11dd <GenPrintInstr2Operands+0xad>
cmpl   $0x16,-0x4(%rbp)
jg     11dd <GenPrintInstr2Operands+0xad>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x18(%rbp),%r9
mov    -0x1c(%rbp),%r10d
mov    -0x28(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <GenPrintInstr3Operands@plt>
jmp    1363 <GenPrintInstr2Operands+0x233>
cmpl   $0x2,-0x4(%rbp)
jl     126d <GenPrintInstr2Operands+0x13d>
cmpl   $0x4,-0x4(%rbp)
jg     126d <GenPrintInstr2Operands+0x13d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x80,-0x1c(%rbp)
jge    1233 <GenPrintInstr2Operands+0x103>
mov    -0x28(%rbp),%rax
mov    %rax,-0x58(%rbp)
jmp    123e <GenPrintInstr2Operands+0x10e>
xor    %eax,%eax
mov    %rax,-0x58(%rbp)
jmp    123e <GenPrintInstr2Operands+0x10e>
mov    -0x30(%rbp),%r9
mov    -0x34(%rbp),%r8d
mov    -0x40(%rbp),%rcx
mov    -0x44(%rbp),%edx
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edi
mov    -0x58(%rbp),%rax
movl   $0x80,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <GenPrintInstr3Operands@plt>
jmp    135e <GenPrintInstr2Operands+0x22e>
cmpl   $0x5,-0x4(%rbp)
jl     1306 <GenPrintInstr2Operands+0x1d6>
cmpl   $0x7,-0x4(%rbp)
jg     1306 <GenPrintInstr2Operands+0x1d6>
mov    -0x4(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    12c6 <GenPrintInstr2Operands+0x196>
mov    -0x18(%rbp),%rax
mov    %rax,-0x88(%rbp)
jmp    12d4 <GenPrintInstr2Operands+0x1a4>
xor    %eax,%eax
mov    %rax,-0x88(%rbp)
jmp    12d4 <GenPrintInstr2Operands+0x1a4>
mov    -0x60(%rbp),%r9
mov    -0x64(%rbp),%r8d
mov    -0x70(%rbp),%rcx
mov    -0x74(%rbp),%edx
mov    -0x78(%rbp),%esi
mov    -0x7c(%rbp),%edi
mov    -0x88(%rbp),%rax
movl   $0x80,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <GenPrintInstr3Operands@plt>
jmp    1359 <GenPrintInstr2Operands+0x229>
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   1040 <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   1040 <GenPrintInstrOneOperand@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <GenPrintInstrNoOperand@plt>
jmp    135e <GenPrintInstr2Operands+0x22e>
jmp    1363 <GenPrintInstr2Operands+0x233>
jmp    1368 <GenPrintInstr2Operands+0x238>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPrintInstr2Operands>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r9,%rax
mov    %r8d,%ebx
mov    %rcx,%r14
mov    %edx,%r12d
cmp    $0x80,%edi
jne    1184 <GenPrintInstr2Operands+0x54>
xor    %edi,%edi
cmp    $0x80,%ebx
setl   %dil
or     $0x80,%edi
xor    %esi,%esi
mov    %ebx,%edx
mov    %rax,%rcx
call   1040 <GenPrintInstrOneOperand@plt>
mov    $0x82,%edi
xor    %esi,%esi
mov    %r12d,%edx
mov    %r14,%rcx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <GenPrintInstrOneOperand@plt>
mov    %esi,%r15d
mov    %edi,%ebp
lea    -0xa(%rbp),%ecx
cmp    $0xc,%ecx
ja     11a6 <GenPrintInstr2Operands+0x76>
mov    %ebp,%edi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %r14,%rcx
mov    %r12d,%r8d
mov    %r14,%r9
push   %rax
push   %rbx
jmp    11fb <GenPrintInstr2Operands+0xcb>
lea    -0x2(%rbp),%ecx
cmp    $0x2,%ecx
ja     11ce <GenPrintInstr2Operands+0x9e>
xor    %r10d,%r10d
cmp    $0x80,%ebx
cmovl  %rax,%r10
mov    %ebp,%edi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %r14,%rcx
mov    %ebx,%r8d
mov    %rax,%r9
jmp    11f4 <GenPrintInstr2Operands+0xc4>
lea    -0x5(%rbp),%ecx
cmp    $0x2,%ecx
ja     120d <GenPrintInstr2Operands+0xdd>
xor    %r10d,%r10d
cmp    $0x80,%r12d
cmovl  %r14,%r10
mov    %ebp,%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %rax,%rcx
mov    %r12d,%r8d
mov    %r14,%r9
push   %r10
push   $0x80
call   1030 <GenPrintInstr3Operands@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
cmp    $0x80,%ebx
setl   %dil
or     $0x80,%edi
xor    %esi,%esi
mov    %ebx,%edx
mov    %rax,%rcx
call   1040 <GenPrintInstrOneOperand@plt>
xor    %edi,%edi
cmp    $0x80,%r12d
setl   %dil
or     $0x80,%edi
xor    %esi,%esi
mov    %r12d,%edx
mov    %r14,%rcx
call   1040 <GenPrintInstrOneOperand@plt>
mov    %ebp,%edi
mov    %r15d,%esi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <GenPrintInstrNoOperand@plt>

LLVM IR (-O0):
define void @GenPrintInstr2Operands(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4, i64 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i32
%12 = alloca i64
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i64 %3, i64* %10
store i32 %4, i32* %11
store i64 %5, i64* %12
%13 = load i32, i32* %7
%14 = icmp eq i32 %13, 128
br i1 %14, label %15, label %26
15: ; preds = %6
%16 = load i32, i32* %11
%17 = icmp slt i32 %16, 128
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 129, i32 128
%20 = load i32, i32* %11
%21 = load i64, i64* %12
%22 = call i32 @GenPrintInstrOneOperand(i32 %19, i32 0, i32 %20, i64 %21)
%23 = load i32, i32* %9
%24 = load i64, i64* %10
%25 = call i32 @GenPrintInstrOneOperand(i32 130, i32 0, i32 %23, i64 %24)
br label %105
26: ; preds = %6
%27 = load i32, i32* %7
%28 = icmp sge i32 %27, 10
br i1 %28, label %29, label %42
29: ; preds = %26
%30 = load i32, i32* %7
%31 = icmp sle i32 %30, 22
br i1 %31, label %32, label %42
32: ; preds = %29
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = load i32, i32* %9
%36 = load i64, i64* %10
%37 = load i32, i32* %9
%38 = load i64, i64* %10
%39 = load i32, i32* %11
%40 = load i64, i64* %12
%41 = call i32 @GenPrintInstr3Operands(i32 %33, i32 %34, i32 %35, i64 %36, i32 %37, i64 %38, i32 %39, i64 %40)
br label %104
42: ; preds = %29, %26
%43 = load i32, i32* %7
%44 = icmp sge i32 %43, 2
br i1 %44, label %45, label %63
45: ; preds = %42
%46 = load i32, i32* %7
%47 = icmp sle i32 %46, 4
br i1 %47, label %48, label %63
48: ; preds = %45
%49 = load i32, i32* %7
%50 = load i32, i32* %8
%51 = load i32, i32* %9
%52 = load i64, i64* %10
%53 = load i32, i32* %11
%54 = load i64, i64* %12
%55 = load i32, i32* %11
%56 = icmp slt i32 %55, 128
br i1 %56, label %57, label %59
57: ; preds = %48
%58 = load i64, i64* %12
br label %60
59: ; preds = %48
br label %60
60: ; preds = %59, %57
%61 = phi i64 [ %58, %57 ], [ 0, %59 ]
%62 = call i32 @GenPrintInstr3Operands(i32 %49, i32 %50, i32 %51, i64 %52, i32 %53, i64 %54, i32 128, i64 %61)
br label %103
63: ; preds = %45, %42
%64 = load i32, i32* %7
%65 = icmp sge i32 %64, 5
br i1 %65, label %66, label %84
66: ; preds = %63
%67 = load i32, i32* %7
%68 = icmp sle i32 %67, 7
br i1 %68, label %69, label %84
69: ; preds = %66
%70 = load i32, i32* %7
%71 = load i32, i32* %8
%72 = load i32, i32* %11
%73 = load i64, i64* %12
%74 = load i32, i32* %9
%75 = load i64, i64* %10
%76 = load i32, i32* %9
%77 = icmp slt i32 %76, 128
br i1 %77, label %78, label %80
78: ; preds = %69
%79 = load i64, i64* %10
br label %81
80: ; preds = %69
br label %81
81: ; preds = %80, %78
%82 = phi i64 [ %79, %78 ], [ 0, %80 ]
%83 = call i32 @GenPrintInstr3Operands(i32 %70, i32 %71, i32 %72, i64 %73, i32 %74, i64 %75, i32 128, i64 %82)
br label %102
84: ; preds = %66, %63
%85 = load i32, i32* %11
%86 = icmp slt i32 %85, 128
%87 = zext i1 %86 to i64
%88 = select i1 %86, i32 129, i32 128
%89 = load i32, i32* %11
%90 = load i64, i64* %12
%91 = call i32 @GenPrintInstrOneOperand(i32 %88, i32 0, i32 %89, i64 %90)
%92 = load i32, i32* %9
%93 = icmp slt i32 %92, 128
%94 = zext i1 %93 to i64
%95 = select i1 %93, i32 129, i32 128
%96 = load i32, i32* %9
%97 = load i64, i64* %10
%98 = call i32 @GenPrintInstrOneOperand(i32 %95, i32 0, i32 %96, i64 %97)
%99 = load i32, i32* %7
%100 = load i32, i32* %8
%101 = call i32 @GenPrintInstrNoOperand(i32 %99, i32 %100)
br label %102
102: ; preds = %84, %81
br label %103
103: ; preds = %102, %60
br label %104
104: ; preds = %103, %32
br label %105
105: ; preds = %104, %15
ret void
}

LLVM IR (-O2):
define void @GenPrintInstr2Operands(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4, i64 %5) {
%7 = icmp eq i32 %0, 128
br i1 %7, label %8, label %13
8: ; preds = %6
%9 = icmp slt i32 %4, 128
%10 = select i1 %9, i32 129, i32 128
%11 = tail call i32 @GenPrintInstrOneOperand(i32 %10, i32 0, i32 %4, i64 %5)
%12 = tail call i32 @GenPrintInstrOneOperand(i32 130, i32 0, i32 %2, i64 %3)
br label %40
13: ; preds = %6
%14 = add i32 %0, -10
%15 = icmp ult i32 %14, 13
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @GenPrintInstr3Operands(i32 %0, i32 %1, i32 %2, i64 %3, i32 %2, i64 %3, i32 %4, i64 %5)
br label %40
18: ; preds = %13
%19 = add i32 %0, -2
%20 = icmp ult i32 %19, 3
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = icmp slt i32 %4, 128
%23 = select i1 %22, i64 %5, i64 0
%24 = tail call i32 @GenPrintInstr3Operands(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4, i64 %5, i32 128, i64 %23)
br label %40
25: ; preds = %18
%26 = add i32 %0, -5
%27 = icmp ult i32 %26, 3
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = icmp slt i32 %2, 128
%30 = select i1 %29, i64 %3, i64 0
%31 = tail call i32 @GenPrintInstr3Operands(i32 %0, i32 %1, i32 %4, i64 %5, i32 %2, i64 %3, i32 128, i64 %30)
br label %40
32: ; preds = %25
%33 = icmp slt i32 %4, 128
%34 = select i1 %33, i32 129, i32 128
%35 = tail call i32 @GenPrintInstrOneOperand(i32 %34, i32 0, i32 %4, i64 %5)
%36 = icmp slt i32 %2, 128
%37 = select i1 %36, i32 129, i32 128
%38 = tail call i32 @GenPrintInstrOneOperand(i32 %37, i32 0, i32 %2, i64 %3)
%39 = tail call i32 @GenPrintInstrNoOperand(i32 %0, i32 %1)
br label %40
40: ; preds = %16, %28, %32, %21, %8
ret void
}