#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*/ __console_tx_nibble(unsigned char);
void __console_tx_hex32(unsigned char value) {
  __console_tx_nibble((value >> 28) & 0x0f);
  __console_tx_nibble((value >> 24) & 0x0f);
  __console_tx_nibble((value >> 20) & 0x0f);
  __console_tx_nibble((value >> 16) & 0x0f);
  __console_tx_nibble((value >> 12) & 0x0f);
  __console_tx_nibble((value >> 8) & 0x0f);
  __console_tx_nibble((value >> 4) & 0x0f);
  __console_tx_nibble(value & 0x0f);
}


x86 assembly (clang, -O0):
<__console_tx_hex32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1c,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x1(%rbp),%eax
sar    $0x18,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x1(%rbp),%eax
sar    $0x14,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x1(%rbp),%eax
sar    $0x10,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x1(%rbp),%eax
sar    $0xc,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x1(%rbp),%eax
sar    $0x8,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__console_tx_hex32>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <__console_tx_nibble@plt>
xor    %edi,%edi
call   1030 <__console_tx_nibble@plt>
xor    %edi,%edi
call   1030 <__console_tx_nibble@plt>
xor    %edi,%edi
call   1030 <__console_tx_nibble@plt>
xor    %edi,%edi
call   1030 <__console_tx_nibble@plt>
xor    %edi,%edi
call   1030 <__console_tx_nibble@plt>
mov    %ebx,%eax
shr    $0x4,%al
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
and    $0xf,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <__console_tx_nibble@plt>

LLVM IR (-O0):
define void @__console_tx_hex32(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 28
%6 = and i32 %5, 15
%7 = trunc i32 %6 to i8
%8 = call i32 @__console_tx_nibble(i8 zeroext %7)
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = ashr i32 %10, 24
%12 = and i32 %11, 15
%13 = trunc i32 %12 to i8
%14 = call i32 @__console_tx_nibble(i8 zeroext %13)
%15 = load i8, i8* %2
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 20
%18 = and i32 %17, 15
%19 = trunc i32 %18 to i8
%20 = call i32 @__console_tx_nibble(i8 zeroext %19)
%21 = load i8, i8* %2
%22 = zext i8 %21 to i32
%23 = ashr i32 %22, 16
%24 = and i32 %23, 15
%25 = trunc i32 %24 to i8
%26 = call i32 @__console_tx_nibble(i8 zeroext %25)
%27 = load i8, i8* %2
%28 = zext i8 %27 to i32
%29 = ashr i32 %28, 12
%30 = and i32 %29, 15
%31 = trunc i32 %30 to i8
%32 = call i32 @__console_tx_nibble(i8 zeroext %31)
%33 = load i8, i8* %2
%34 = zext i8 %33 to i32
%35 = ashr i32 %34, 8
%36 = and i32 %35, 15
%37 = trunc i32 %36 to i8
%38 = call i32 @__console_tx_nibble(i8 zeroext %37)
%39 = load i8, i8* %2
%40 = zext i8 %39 to i32
%41 = ashr i32 %40, 4
%42 = and i32 %41, 15
%43 = trunc i32 %42 to i8
%44 = call i32 @__console_tx_nibble(i8 zeroext %43)
%45 = load i8, i8* %2
%46 = zext i8 %45 to i32
%47 = and i32 %46, 15
%48 = trunc i32 %47 to i8
%49 = call i32 @__console_tx_nibble(i8 zeroext %48)
ret void
}

LLVM IR (-O2):
define void @__console_tx_hex32(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_nibble(i8 zeroext 0)
%3 = tail call i32 @__console_tx_nibble(i8 zeroext 0)
%4 = tail call i32 @__console_tx_nibble(i8 zeroext 0)
%5 = tail call i32 @__console_tx_nibble(i8 zeroext 0)
%6 = tail call i32 @__console_tx_nibble(i8 zeroext 0)
%7 = tail call i32 @__console_tx_nibble(i8 zeroext 0)
%8 = lshr i8 %0, 4
%9 = tail call i32 @__console_tx_nibble(i8 zeroext %8)
%10 = and i8 %0, 15
%11 = tail call i32 @__console_tx_nibble(i8 zeroext %10)
ret void
}