#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 */
typedef unsigned long op_code;

/* Variables and functions */
char *_regname(unsigned long);
int /*<<< orphan*/ decode_indirect_address(unsigned long, unsigned long, int);
int /*<<< orphan*/ myprint(char *, char *);
int /*<<< orphan*/ new_line();
int /*<<< orphan*/ pad_to(int);
void decode_diadic_parallel_addressing(long int op_code, char *first_op,
                                       char *second_op) {
  unsigned long src2;
  unsigned long src3;
  unsigned long dst1;
  unsigned long dst2;
  src2 = (op_code)&0xff;
  dst2 = (op_code >> 8) & 0xff;
  src3 = (op_code >> 16) & 0x07;
  dst1 = (op_code >> 22) & 0x07;
  if (((op_code >> 19) & 0x07) != 0) {
    return;
  }
  myprint("%s", first_op);
  pad_to(10);
  decode_indirect_address(src2 >> 3, src2 & 7, 1);
  myprint(", %s", _regname(dst1));
  new_line();
  pad_to(39);
  myprint("|| %s", second_op);
  pad_to(39 + 10);
  myprint("%s, ", _regname(src3));
  decode_indirect_address(dst2 >> 3, dst2 & 7, 1);
  return;
}


x86 assembly (clang, -O0):
<decode_diadic_parallel_addressing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
and    $0xff,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x10,%rax
and    $0x7,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x16,%rax
and    $0x7,%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x13,%rax
and    $0x7,%rax
cmp    $0x0,%rax
je     11bf <decode_diadic_parallel_addressing+0x6f>
jmp    1268 <decode_diadic_parallel_addressing+0x118>
mov    -0x10(%rbp),%rsi
lea    0xe38(%rip),%rdi
call   1040 <myprint@plt>
mov    $0xa,%edi
call   1060 <pad_to@plt>
mov    -0x20(%rbp),%rdi
shr    $0x3,%rdi
mov    -0x20(%rbp),%rsi
and    $0x7,%rsi
mov    $0x1,%edx
call   1070 <decode_indirect_address@plt>
mov    -0x30(%rbp),%rdi
call   1050 <_regname@plt>
mov    %rax,%rsi
lea    0xdfa(%rip),%rdi
call   1040 <myprint@plt>
mov    $0x0,%al
call   1030 <new_line@plt>
mov    $0x27,%edi
call   1060 <pad_to@plt>
mov    -0x18(%rbp),%rsi
lea    0xdde(%rip),%rdi
call   1040 <myprint@plt>
mov    $0x31,%edi
call   1060 <pad_to@plt>
mov    -0x28(%rbp),%rdi
call   1050 <_regname@plt>
mov    %rax,%rsi
lea    0xdc2(%rip),%rdi
call   1040 <myprint@plt>
mov    -0x38(%rbp),%rdi
shr    $0x3,%rdi
mov    -0x38(%rbp),%rsi
and    $0x7,%rsi
mov    $0x1,%edx
call   1070 <decode_indirect_address@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_diadic_parallel_addressing>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdi,%rbx
test   $0x380000,%ebx
je     116e <decode_diadic_parallel_addressing+0x1e>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
mov    %rdx,%r15
mov    %ebx,%r14d
shr    $0x8,%r14d
and    $0x7,%r14d
mov    %ebx,%r13d
shr    $0x16,%r13d
and    $0x7,%r13d
mov    %ebx,%r12d
shr    $0x10,%r12d
and    $0x7,%r12d
lea    0xe69(%rip),%rdi
call   1040 <myprint@plt>
mov    $0xa,%edi
call   1060 <pad_to@plt>
mov    %ebx,%edi
shr    $0x3,%edi
and    $0x1f,%edi
mov    %ebx,%esi
and    $0x7,%esi
mov    $0x1,%edx
call   1070 <decode_indirect_address@plt>
mov    %r13,%rdi
call   1050 <_regname@plt>
lea    0xe32(%rip),%rdi
mov    %rax,%rsi
call   1040 <myprint@plt>
xor    %eax,%eax
call   1030 <new_line@plt>
mov    $0x27,%edi
call   1060 <pad_to@plt>
lea    0xe17(%rip),%rdi
mov    %r15,%rsi
call   1040 <myprint@plt>
mov    $0x31,%edi
call   1060 <pad_to@plt>
mov    %r12,%rdi
call   1050 <_regname@plt>
lea    0xdfc(%rip),%rdi
mov    %rax,%rsi
call   1040 <myprint@plt>
shr    $0xb,%ebx
and    $0x1f,%ebx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1070 <decode_indirect_address@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c", %s\00"
@.str.2 = [6 x i8] c"|| %s\00"
@.str.3 = [5 x i8] c"%s, \00"
define void @decode_diadic_parallel_addressing(i64 %0, i8* %1, i8* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%11 = load i64, i64* %4
%12 = and i64 %11, 255
store i64 %12, i64* %7
%13 = load i64, i64* %4
%14 = ashr i64 %13, 8
%15 = and i64 %14, 255
store i64 %15, i64* %10
%16 = load i64, i64* %4
%17 = ashr i64 %16, 16
%18 = and i64 %17, 7
store i64 %18, i64* %8
%19 = load i64, i64* %4
%20 = ashr i64 %19, 22
%21 = and i64 %20, 7
store i64 %21, i64* %9
%22 = load i64, i64* %4
%23 = ashr i64 %22, 19
%24 = and i64 %23, 7
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %3
br label %52
27: ; preds = %3
%28 = load i8*, i8** %5
%29 = call i32 @myprint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %28)
%30 = call i32 @pad_to(i32 10)
%31 = load i64, i64* %7
%32 = lshr i64 %31, 3
%33 = load i64, i64* %7
%34 = and i64 %33, 7
%35 = call i32 @decode_indirect_address(i64 %32, i64 %34, i32 1)
%36 = load i64, i64* %9
%37 = call i8* @_regname(i64 %36)
%38 = call i32 @myprint(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %37)
%39 = call i32 (...) @new_line()
%40 = call i32 @pad_to(i32 39)
%41 = load i8*, i8** %6
%42 = call i32 @myprint(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %41)
%43 = call i32 @pad_to(i32 49)
%44 = load i64, i64* %8
%45 = call i8* @_regname(i64 %44)
%46 = call i32 @myprint(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %45)
%47 = load i64, i64* %10
%48 = lshr i64 %47, 3
%49 = load i64, i64* %10
%50 = and i64 %49, 7
%51 = call i32 @decode_indirect_address(i64 %48, i64 %50, i32 1)
br label %52
52: ; preds = %27, %26
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c", %s\00"
@.str.2 = [6 x i8] c"|| %s\00"
@.str.3 = [5 x i8] c"%s, \00"
define void @decode_diadic_parallel_addressing(i64 %0, i8* %1, i8* %2) {
%4 = and i64 %0, 3670016
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %30
6: ; preds = %3
%7 = lshr i64 %0, 8
%8 = lshr i64 %0, 22
%9 = and i64 %8, 7
%10 = lshr i64 %0, 16
%11 = and i64 %10, 7
%12 = tail call i32 @myprint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%13 = tail call i32 @pad_to(i32 10)
%14 = lshr i64 %0, 3
%15 = and i64 %14, 31
%16 = and i64 %0, 7
%17 = tail call i32 @decode_indirect_address(i64 %15, i64 %16, i32 1)
%18 = tail call i8* @_regname(i64 %9)
%19 = tail call i32 @myprint(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %18)
%20 = tail call i32 (...) @new_line()
%21 = tail call i32 @pad_to(i32 39)
%22 = tail call i32 @myprint(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%23 = tail call i32 @pad_to(i32 49)
%24 = tail call i8* @_regname(i64 %11)
%25 = tail call i32 @myprint(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %24)
%26 = lshr i64 %0, 11
%27 = and i64 %26, 31
%28 = and i64 %7, 7
%29 = tail call i32 @decode_indirect_address(i64 %27, i64 %28, i32 1)
br label %30
30: ; preds = %3, %6
ret void
}