#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*/ GenPrintInstr(int, int);
int /*<<< orphan*/ GenPrintNewLine();
int /*<<< orphan*/ GenPrintOperand(int, int);
int /*<<< orphan*/ GenPrintOperandSeparator();
scalar_t__ truncUint(int);
void GenPrintInstr2Operands(int instr, int instrval, int operand1,
                            int operand1val, int operand2, int operand2val) {
  if (operand2 == 0x0D && truncUint(operand2val) == 0 &&
      (instr == 0x09 || instr == 0x0A))
    return;
  if (operand2 == 0x0D && (operand2val == 1 || operand2val == -1) &&
      (instr == 0x09 || instr == 0x0A)) {
    if ((operand2val == 1 && instr == 0x09) ||
        (operand2val == -1 && instr == 0x0A))
      GenPrintInstr(0x07, 0);
    else
      GenPrintInstr(0x08, 0);
    GenPrintOperand(operand1, operand1val);
    GenPrintNewLine();
    return;
  }
  GenPrintInstr(instr, instrval);
  GenPrintOperand(operand1, operand1val);
  GenPrintOperandSeparator();
  GenPrintOperand(operand2, operand2val);
  GenPrintNewLine();
}


x86 assembly (clang, -O0):
<GenPrintInstr2Operands>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
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   $0xd,-0x14(%rbp)
jne    11a1 <GenPrintInstr2Operands+0x51>
mov    -0x18(%rbp),%edi
call   1040 <truncUint@plt>
cmp    $0x0,%rax
jne    11a1 <GenPrintInstr2Operands+0x51>
cmpl   $0x9,-0x4(%rbp)
je     119c <GenPrintInstr2Operands+0x4c>
cmpl   $0xa,-0x4(%rbp)
jne    11a1 <GenPrintInstr2Operands+0x51>
jmp    125e <GenPrintInstr2Operands+0x10e>
cmpl   $0xd,-0x14(%rbp)
jne    122f <GenPrintInstr2Operands+0xdf>
cmpl   $0x1,-0x18(%rbp)
je     11bf <GenPrintInstr2Operands+0x6f>
cmpl   $0xffffffff,-0x18(%rbp)
jne    122f <GenPrintInstr2Operands+0xdf>
cmpl   $0x9,-0x4(%rbp)
je     11d3 <GenPrintInstr2Operands+0x83>
cmpl   $0xa,-0x4(%rbp)
jne    122f <GenPrintInstr2Operands+0xdf>
cmpl   $0x1,-0x18(%rbp)
jne    11e7 <GenPrintInstr2Operands+0x97>
cmpl   $0x9,-0x4(%rbp)
je     11fb <GenPrintInstr2Operands+0xab>
cmpl   $0xffffffff,-0x18(%rbp)
jne    120c <GenPrintInstr2Operands+0xbc>
cmpl   $0xa,-0x4(%rbp)
jne    120c <GenPrintInstr2Operands+0xbc>
mov    $0x7,%edi
xor    %esi,%esi
call   1050 <GenPrintInstr@plt>
jmp    1218 <GenPrintInstr2Operands+0xc8>
mov    $0x8,%edi
xor    %esi,%esi
call   1050 <GenPrintInstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1060 <GenPrintOperand@plt>
mov    $0x0,%al
call   1070 <GenPrintNewLine@plt>
jmp    125e <GenPrintInstr2Operands+0x10e>
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   1070 <GenPrintNewLine@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPrintInstr2Operands>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r12d
mov    %r8d,%ebp
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%r13d
mov    %edi,%ebx
cmp    $0xd,%r8d
jne    11de <GenPrintInstr2Operands+0x8e>
mov    %r12d,%edi
call   1040 <truncUint@plt>
lea    -0x9(%rbx),%ecx
cmp    $0x1,%ecx
ja     1196 <GenPrintInstr2Operands+0x46>
test   %rax,%rax
jne    1196 <GenPrintInstr2Operands+0x46>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x1,%r12d
je     11a2 <GenPrintInstr2Operands+0x52>
cmp    $0xffffffff,%r12d
jne    11de <GenPrintInstr2Operands+0x8e>
cmp    $0x1,%ecx
ja     11de <GenPrintInstr2Operands+0x8e>
mov    %r12d,%eax
not    %eax
xor    $0x1,%r12d
mov    %ebx,%ecx
xor    $0xa,%ecx
xor    $0x9,%ebx
or     %r12d,%ebx
sete   %dl
or     %eax,%ecx
sete   %al
or     %dl,%al
movzbl %al,%eax
mov    $0x8,%edi
sub    %eax,%edi
xor    %esi,%esi
call   1050 <GenPrintInstr@plt>
mov    %r15d,%edi
mov    %r14d,%esi
jmp    11ff <GenPrintInstr2Operands+0xaf>
mov    %ebx,%edi
mov    %r13d,%esi
call   1050 <GenPrintInstr@plt>
mov    %r15d,%edi
mov    %r14d,%esi
call   1060 <GenPrintOperand@plt>
xor    %eax,%eax
call   1030 <GenPrintOperandSeparator@plt>
mov    %ebp,%edi
mov    %r12d,%esi
call   1060 <GenPrintOperand@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <GenPrintNewLine@plt>

LLVM IR (-O0):
define void @GenPrintInstr2Operands(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %11
%14 = icmp eq i32 %13, 13
br i1 %14, label %15, label %26
15: ; preds = %6
%16 = load i32, i32* %12
%17 = call i64 @truncUint(i32 %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %15
%20 = load i32, i32* %7
%21 = icmp eq i32 %20, 9
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = load i32, i32* %7
%24 = icmp eq i32 %23, 10
br i1 %24, label %25, label %26
25: ; preds = %22, %19
br label %74
26: ; preds = %22, %15, %6
%27 = load i32, i32* %11
%28 = icmp eq i32 %27, 13
br i1 %28, label %29, label %62
29: ; preds = %26
%30 = load i32, i32* %12
%31 = icmp eq i32 %30, 1
br i1 %31, label %35, label %32
32: ; preds = %29
%33 = load i32, i32* %12
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %62
35: ; preds = %32, %29
%36 = load i32, i32* %7
%37 = icmp eq i32 %36, 9
br i1 %37, label %41, label %38
38: ; preds = %35
%39 = load i32, i32* %7
%40 = icmp eq i32 %39, 10
br i1 %40, label %41, label %62
41: ; preds = %38, %35
%42 = load i32, i32* %12
%43 = icmp eq i32 %42, 1
br i1 %43, label %44, label %47
44: ; preds = %41
%45 = load i32, i32* %7
%46 = icmp eq i32 %45, 9
br i1 %46, label %53, label %47
47: ; preds = %44, %41
%48 = load i32, i32* %12
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %55
50: ; preds = %47
%51 = load i32, i32* %7
%52 = icmp eq i32 %51, 10
br i1 %52, label %53, label %55
53: ; preds = %50, %44
%54 = call i32 @GenPrintInstr(i32 7, i32 0)
br label %57
55: ; preds = %50, %47
%56 = call i32 @GenPrintInstr(i32 8, i32 0)
br label %57
57: ; preds = %55, %53
%58 = load i32, i32* %9
%59 = load i32, i32* %10
%60 = call i32 @GenPrintOperand(i32 %58, i32 %59)
%61 = call i32 (...) @GenPrintNewLine()
br label %74
62: ; preds = %38, %32, %26
%63 = load i32, i32* %7
%64 = load i32, i32* %8
%65 = call i32 @GenPrintInstr(i32 %63, i32 %64)
%66 = load i32, i32* %9
%67 = load i32, i32* %10
%68 = call i32 @GenPrintOperand(i32 %66, i32 %67)
%69 = call i32 (...) @GenPrintOperandSeparator()
%70 = load i32, i32* %11
%71 = load i32, i32* %12
%72 = call i32 @GenPrintOperand(i32 %70, i32 %71)
%73 = call i32 (...) @GenPrintNewLine()
br label %74
74: ; preds = %62, %57, %25
ret void
}

LLVM IR (-O2):
define void @GenPrintInstr2Operands(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp eq i32 %4, 13
br i1 %7, label %8, label %27
8: ; preds = %6
%9 = tail call i64 @truncUint(i32 %5)
%10 = icmp eq i64 %9, 0
%11 = add i32 %0, -9
%12 = icmp ult i32 %11, 2
%13 = and i1 %12, %10
br i1 %13, label %34, label %14
14: ; preds = %8
%15 = icmp eq i32 %5, 1
%16 = icmp eq i32 %5, -1
switch i32 %5, label %27 [
i32 -1, label %17
i32 1, label %17
]
17: ; preds = %14, %14
br i1 %12, label %18, label %27
18: ; preds = %17
%19 = icmp eq i32 %0, 10
%20 = icmp eq i32 %0, 9
%21 = and i1 %20, %15
%22 = and i1 %19, %16
%23 = or i1 %21, %22
%24 = select i1 %23, i32 7, i32 8
%25 = tail call i32 @GenPrintInstr(i32 %24, i32 0)
%26 = tail call i32 @GenPrintOperand(i32 %2, i32 %3)
br label %32
27: ; preds = %6, %14, %17
%28 = tail call i32 @GenPrintInstr(i32 %0, i32 %1)
%29 = tail call i32 @GenPrintOperand(i32 %2, i32 %3)
%30 = tail call i32 (...) @GenPrintOperandSeparator()
%31 = tail call i32 @GenPrintOperand(i32 %4, i32 %5)
br label %32
32: ; preds = %18, %27
%33 = tail call i32 (...) @GenPrintNewLine()
br label %34
34: ; preds = %32, %8
ret void
}