#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 int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned int);
void w_byte_num(FILE *fp, unsigned int block_num) {
  unsigned int byte_num;
  byte_num = 16 * block_num;
  fprintf(fp, "@%08x\n", 0x00000000);
  fprintf(fp, "%02x\n", (byte_num << 24) >> 24);
  fprintf(fp, "%02x\n", (byte_num << 16) >> 24);
  fprintf(fp, "%02x\n", (byte_num << 8) >> 24);
  fprintf(fp, "%02x\n", byte_num >> 24);
}


x86 assembly (clang, -O0):
<w_byte_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xecd(%rip),%rsi
xor    %edx,%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
shl    $0x18,%edx
shr    $0x18,%edx
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
shl    $0x10,%edx
shr    $0x18,%edx
lea    0xea0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
shl    $0x8,%edx
shr    $0x18,%edx
lea    0xe87(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
shr    $0x18,%edx
lea    0xe71(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_byte_num>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xee0(%rip),%rsi
xor    %edx,%edx
call   1030 <fprintf@plt>
mov    %ebp,%eax
shl    $0x4,%eax
movzbl %al,%edx
lea    0xed1(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    %ebp,%eax
shr    $0x4,%eax
movzbl %al,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    %ebp,%eax
shr    $0xc,%eax
movzbl %al,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fprintf@plt>
shr    $0x14,%ebp
movzbl %bpl,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"@%08x\0A\00"
@.str.1 = [6 x i8] c"%02x\0A\00"
define void @w_byte_num(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = mul i32 16, %6
store i32 %7, i32* %5
%8 = load i32*, i32** %3
%9 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0)
%10 = load i32*, i32** %3
%11 = load i32, i32* %5
%12 = shl i32 %11, 24
%13 = lshr i32 %12, 24
%14 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32*, i32** %3
%16 = load i32, i32* %5
%17 = shl i32 %16, 16
%18 = lshr i32 %17, 24
%19 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = load i32*, i32** %3
%21 = load i32, i32* %5
%22 = shl i32 %21, 8
%23 = lshr i32 %22, 24
%24 = call i32 @fprintf(i32* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = load i32*, i32** %3
%26 = load i32, i32* %5
%27 = lshr i32 %26, 24
%28 = call i32 @fprintf(i32* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %27)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"@%08x\0A\00"
@.str.1 = [6 x i8] c"%02x\0A\00"
define void @w_byte_num(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = shl i32 %1, 4
%5 = and i32 %4, 240
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = lshr i32 %1, 4
%8 = and i32 %7, 255
%9 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = lshr i32 %1, 12
%11 = and i32 %10, 255
%12 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = lshr i32 %1, 20
%14 = and i32 %13, 255
%15 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret void
}