#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*/ lineprint7(char *, long, unsigned char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, unsigned char, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char);
void xfer(char *outf, long ctr, unsigned char *op, char *str) {
  char buf[256];
  sprintf(buf, "%-4s $%02X%02X, $%02X%02X, $%02X%02X", str, *(op + 2),
          *(op + 1), *(op + 4), *(op + 3), *(op + 6), *(op + 5));
  lineprint7(outf, ctr, op, buf);
}


x86 assembly (clang, -O0):
<xfer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%r8b
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%r9b
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%r11b
mov    -0x18(%rbp),%rax
mov    0x6(%rax),%r10b
mov    -0x18(%rbp),%rax
lea    0xe88(%rip),%rsi
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %r9b,%r9d
movzbl %r11b,%r11d
mov    %r11d,(%rsp)
movzbl %r10b,%r10d
mov    %r10d,0x8(%rsp)
movzbl 0x5(%rax),%eax
mov    %eax,0x10(%rsp)
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1030 <lineprint7@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfer>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x100,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
movzbl 0x2(%rdx),%ebp
movzbl 0x1(%rdx),%r8d
movzbl 0x4(%rdx),%r9d
movzbl 0x3(%rdx),%r10d
movzbl 0x6(%rdx),%r11d
movzbl 0x5(%rdx),%eax
sub    $0x8,%rsp
lea    0xea1(%rip),%rsi
lea    0x8(%rsp),%r12
mov    %r12,%rdi
mov    %rcx,%rdx
mov    %ebp,%ecx
push   %rax
push   %r11
push   %r10
call   1040 <sprintf@plt>
add    $0x20,%rsp
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
call   1030 <lineprint7@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"%-4s $%02X%02X, $%02X%02X, $%02X%02X\00"
define void @xfer(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [256 x i8]
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %8
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = load i8*, i8** %7
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = load i8*, i8** %7
%19 = getelementptr inbounds i8, i8* %18, i64 4
%20 = load i8, i8* %19
%21 = load i8*, i8** %7
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = load i8*, i8** %7
%25 = getelementptr inbounds i8, i8* %24, i64 6
%26 = load i8, i8* %25
%27 = load i8*, i8** %7
%28 = getelementptr inbounds i8, i8* %27, i64 5
%29 = load i8, i8* %28
%30 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %11, i8 zeroext %14, i8 zeroext %17, i8 zeroext %20, i8 zeroext %23, i8 zeroext %26, i8 zeroext %29)
%31 = load i8*, i8** %5
%32 = load i64, i64* %6
%33 = load i8*, i8** %7
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%35 = call i32 @lineprint7(i8* %31, i64 %32, i8* %33, i8* %34)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"%-4s $%02X%02X, $%02X%02X, $%02X%02X\00"
define void @xfer(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = getelementptr inbounds i8, i8* %2, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %2, i64 1
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %2, i64 4
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %2, i64 3
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %2, i64 6
%16 = load i8, i8* %15
%17 = getelementptr inbounds i8, i8* %2, i64 5
%18 = load i8, i8* %17
%19 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3, i8 zeroext %8, i8 zeroext %10, i8 zeroext %12, i8 zeroext %14, i8 zeroext %16, i8 zeroext %18)
%20 = call i32 @lineprint7(i8* %0, i64 %1, i8* %2, i8* %6)
ret void
}