#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_129(unsigned int sbn, unsigned short sbl,
                      unsigned short esi) {
  printf("%c", (unsigned char)((sbn >> 24) & 0xFF));
  printf("%c", (unsigned char)((sbn >> 16) & 0xFF));
  printf("%c", (unsigned char)((sbn >> 8) & 0xFF));
  printf("%c", (unsigned char)(sbn & 0xFF));
  printf("%c", (unsigned char)((sbl >> 8) & 0xFF));
  printf("%c", (unsigned char)(sbl & 0xFF));
  printf("%c", (unsigned char)((esi >> 8) & 0xFF));
  printf("%c", (unsigned char)(esi & 0xFF));
}


x86 assembly (clang, -O0):
<add_fec_plid_129>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %edi,-0x4(%rbp)
mov    %cx,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
lea    0xec5(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
lea    0xeab(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
lea    0xe91(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
lea    0xe7a(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
movzwl -0x6(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
lea    0xe5f(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
movzwl -0x6(%rbp),%eax
and    $0xff,%eax
lea    0xe47(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
movzwl -0x8(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
lea    0xe2c(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
movzwl -0x8(%rbp),%eax
and    $0xff,%eax
lea    0xe14(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_fec_plid_129>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x18,%eax
lea    0xed5(%rip),%rbp
mov    %rbp,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
movzbl %bh,%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
movzbl %bl,%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
mov    %r15d,%esi
shr    $0x8,%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
movzbl %r15b,%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
mov    %r14d,%esi
shr    $0x8,%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
movzbl %r14b,%esi
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @add_fec_plid_129(i32 %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i16
store i32 %0, i32* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i32, i32* %4
%8 = lshr i32 %7, 24
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %10)
%12 = load i32, i32* %4
%13 = lshr i32 %12, 16
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %15)
%17 = load i32, i32* %4
%18 = lshr 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 i32, i32* %4
%23 = and i32 %22, 255
%24 = trunc i32 %23 to i8
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %24)
%26 = load i16, i16* %5
%27 = zext i16 %26 to i32
%28 = ashr i32 %27, 8
%29 = and i32 %28, 255
%30 = trunc i32 %29 to i8
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %30)
%32 = load i16, i16* %5
%33 = zext i16 %32 to i32
%34 = and i32 %33, 255
%35 = trunc i32 %34 to i8
%36 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %35)
%37 = load i16, i16* %6
%38 = zext i16 %37 to i32
%39 = ashr i32 %38, 8
%40 = and i32 %39, 255
%41 = trunc i32 %40 to i8
%42 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %41)
%43 = load i16, i16* %6
%44 = zext i16 %43 to i32
%45 = and i32 %44, 255
%46 = trunc i32 %45 to i8
%47 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %46)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @add_fec_plid_129(i32 %0, i16 zeroext %1, i16 zeroext %2) {
%4 = lshr i32 %0, 24
%5 = trunc i32 %4 to i8
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %5)
%7 = lshr i32 %0, 16
%8 = trunc i32 %7 to i8
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %8)
%10 = lshr i32 %0, 8
%11 = trunc i32 %10 to i8
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %11)
%13 = trunc i32 %0 to i8
%14 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %13)
%15 = lshr i16 %1, 8
%16 = trunc i16 %15 to i8
%17 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %16)
%18 = trunc i16 %1 to i8
%19 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %18)
%20 = lshr i16 %2, 8
%21 = trunc i16 %20 to i8
%22 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %21)
%23 = trunc i16 %2 to i8
%24 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %23)
ret void
}