#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*/ GenNop();
int /*<<< orphan*/ GenPrintInstr(int, int);
int /*<<< orphan*/ GenPrintNewLine();
int /*<<< orphan*/ GenPrintOperand(int, int);
int /*<<< orphan*/ GenPrintOperandSeparator();
void GenPrintInstr3Operands(int instr, int instrval, int operand1,
                            int operand1val, int operand2, int operand2val,
                            int operand3, int operand3val) {
  if (operand3 == 0x80 && operand3val == 0 && (instr == 0x11 || instr == 0x12))
    return;
  GenPrintInstr(instr, instrval);
  GenPrintOperand(operand1, operand1val);
  GenPrintOperandSeparator();
  GenPrintOperand(operand2, operand2val);
  GenPrintOperandSeparator();
  GenPrintOperand(operand3, operand3val);
  GenPrintNewLine();
  if (instr == 0x21 || instr == 0x22)
    GenNop();
}


x86 assembly (clang, -O0):
<GenPrintInstr3Operands>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
cmpl   $0x80,0x10(%rbp)
jne    11a2 <GenPrintInstr3Operands+0x52>
cmpl   $0x0,0x18(%rbp)
jne    11a2 <GenPrintInstr3Operands+0x52>
cmpl   $0x11,-0x4(%rbp)
je     119d <GenPrintInstr3Operands+0x4d>
cmpl   $0x12,-0x4(%rbp)
jne    11a2 <GenPrintInstr3Operands+0x52>
jmp    11fe <GenPrintInstr3Operands+0xae>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <GenPrintInstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1060 <GenPrintOperand@plt>
mov    $0x0,%al
call   1030 <GenPrintOperandSeparator@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <GenPrintOperand@plt>
mov    $0x0,%al
call   1030 <GenPrintOperandSeparator@plt>
mov    0x10(%rbp),%edi
mov    0x18(%rbp),%esi
call   1060 <GenPrintOperand@plt>
mov    $0x0,%al
call   1070 <GenPrintNewLine@plt>
cmpl   $0x21,-0x4(%rbp)
je     11f7 <GenPrintInstr3Operands+0xa7>
cmpl   $0x22,-0x4(%rbp)
jne    11fe <GenPrintInstr3Operands+0xae>
mov    $0x0,%al
call   1040 <GenNop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPrintInstr3Operands>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r12d
mov    %ecx,%r13d
mov    %edx,%r15d
mov    %edi,%ebx
mov    0x48(%rsp),%r14d
mov    0x40(%rsp),%ebp
lea    -0x11(%rbx),%eax
cmp    $0x1,%eax
ja     1184 <GenPrintInstr3Operands+0x34>
cmp    $0x80,%ebp
jne    1184 <GenPrintInstr3Operands+0x34>
test   %r14d,%r14d
je     11e3 <GenPrintInstr3Operands+0x93>
mov    %ebx,%edi
mov    %r9d,0x4(%rsp)
call   1050 <GenPrintInstr@plt>
mov    %r15d,%edi
mov    %r13d,%esi
call   1060 <GenPrintOperand@plt>
xor    %eax,%eax
call   1030 <GenPrintOperandSeparator@plt>
mov    %r12d,%edi
mov    0x4(%rsp),%esi
call   1060 <GenPrintOperand@plt>
xor    %eax,%eax
call   1030 <GenPrintOperandSeparator@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1060 <GenPrintOperand@plt>
xor    %eax,%eax
call   1070 <GenPrintNewLine@plt>
add    $0xffffffdf,%ebx
cmp    $0x1,%ebx
ja     11e3 <GenPrintInstr3Operands+0x93>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <GenNop@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @GenPrintInstr3Operands(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %15
%18 = icmp eq i32 %17, 128
br i1 %18, label %19, label %29
19: ; preds = %8
%20 = load i32, i32* %16
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = load i32, i32* %9
%24 = icmp eq i32 %23, 17
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = load i32, i32* %9
%27 = icmp eq i32 %26, 18
br i1 %27, label %28, label %29
28: ; preds = %25, %22
br label %52
29: ; preds = %25, %19, %8
%30 = load i32, i32* %9
%31 = load i32, i32* %10
%32 = call i32 @GenPrintInstr(i32 %30, i32 %31)
%33 = load i32, i32* %11
%34 = load i32, i32* %12
%35 = call i32 @GenPrintOperand(i32 %33, i32 %34)
%36 = call i32 (...) @GenPrintOperandSeparator()
%37 = load i32, i32* %13
%38 = load i32, i32* %14
%39 = call i32 @GenPrintOperand(i32 %37, i32 %38)
%40 = call i32 (...) @GenPrintOperandSeparator()
%41 = load i32, i32* %15
%42 = load i32, i32* %16
%43 = call i32 @GenPrintOperand(i32 %41, i32 %42)
%44 = call i32 (...) @GenPrintNewLine()
%45 = load i32, i32* %9
%46 = icmp eq i32 %45, 33
br i1 %46, label %50, label %47
47: ; preds = %29
%48 = load i32, i32* %9
%49 = icmp eq i32 %48, 34
br i1 %49, label %50, label %52
50: ; preds = %47, %29
%51 = call i32 (...) @GenNop()
br label %52
52: ; preds = %28, %50, %47
ret void
}

LLVM IR (-O2):
define void @GenPrintInstr3Operands(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = icmp eq i32 %6, 128
%10 = icmp eq i32 %7, 0
%11 = and i1 %9, %10
%12 = add i32 %0, -17
%13 = icmp ult i32 %12, 2
%14 = and i1 %13, %11
br i1 %14, label %27, label %15
15: ; preds = %8
%16 = tail call i32 @GenPrintInstr(i32 %0, i32 %1)
%17 = tail call i32 @GenPrintOperand(i32 %2, i32 %3)
%18 = tail call i32 (...) @GenPrintOperandSeparator()
%19 = tail call i32 @GenPrintOperand(i32 %4, i32 %5)
%20 = tail call i32 (...) @GenPrintOperandSeparator()
%21 = tail call i32 @GenPrintOperand(i32 %6, i32 %7)
%22 = tail call i32 (...) @GenPrintNewLine()
%23 = add i32 %0, -33
%24 = icmp ult i32 %23, 2
br i1 %24, label %25, label %27
25: ; preds = %15
%26 = tail call i32 (...) @GenNop()
br label %27
27: ; preds = %8, %15, %25
ret void
}