#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*/ printf(char *, unsigned char);
void add_fec_plid_0_130(unsigned short sbn, unsigned short esi) {
  printf("%c", (unsigned char)((sbn >> 8) & 0xFF));
  printf("%c", (unsigned char)(sbn & 0xFF));
  printf("%c", (unsigned char)((esi >> 8) & 0xFF));
  printf("%c", (unsigned char)(esi & 0xFF));
}


x86 assembly (clang, -O0):
<add_fec_plid_0_130>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
lea    0xec7(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
lea    0xeaf(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
lea    0xe94(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0xff,%eax
lea    0xe7c(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_fec_plid_0_130>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%esi
shr    $0x8,%esi
lea    0xedc(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
movzbl %bpl,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%esi
shr    $0x8,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
movzbl %bl,%esi
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @add_fec_plid_0_130(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %9)
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %14)
%16 = load i16, i16* %4
%17 = zext i16 %16 to i32
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %20)
%22 = load i16, i16* %4
%23 = zext i16 %22 to i32
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %25)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @add_fec_plid_0_130(i16 zeroext %0, i16 zeroext %1) {
%3 = lshr i16 %0, 8
%4 = trunc i16 %3 to i8
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %4)
%6 = trunc i16 %0 to i8
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
%8 = lshr i16 %1, 8
%9 = trunc i16 %8 to i8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %9)
%11 = trunc i16 %1 to i8
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %11)
ret void
}