#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 */
char *_(int, int, char *);
int /*<<< orphan*/ convert(char *, unsigned int);
void print_normalized_ems_size(unsigned n) {
  if (n > 624)
    convert("%5sM ", (n + 32) / 64);
  else
    convert("%5sK ", n * 16);
  convert(_(1, 2, "(%s bytes)\n"), n * 16384UL);
}


x86 assembly (clang, -O0):
<print_normalized_ems_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x270,-0x4(%rbp)
jbe    1152 <print_normalized_ems_size+0x32>
mov    -0x4(%rbp),%esi
add    $0x20,%esi
shr    $0x6,%esi
lea    0xeb8(%rip),%rdi
call   1030 <convert@plt>
jmp    1164 <print_normalized_ems_size+0x44>
mov    -0x4(%rbp),%esi
shl    $0x4,%esi
lea    0xea7(%rip),%rdi
call   1030 <convert@plt>
mov    $0x1,%edi
mov    $0x2,%esi
lea    0xe97(%rip),%rdx
call   1040 <_@plt>
mov    %rax,%rdi
mov    -0x4(%rbp),%eax
shl    $0xe,%rax
mov    %eax,%esi
call   1030 <convert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_normalized_ems_size>:
push   %rbx
mov    %edi,%ebx
cmp    $0x271,%edi
jb     113a <print_normalized_ems_size+0x1a>
lea    0x20(%rbx),%esi
shr    $0x6,%esi
lea    0xec8(%rip),%rdi
jmp    1146 <print_normalized_ems_size+0x26>
mov    %ebx,%esi
shl    $0x4,%esi
lea    0xec0(%rip),%rdi
call   1030 <convert@plt>
lea    0xeba(%rip),%rdx
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <_@plt>
shl    $0xe,%ebx
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <convert@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%5sM \00"
@.str.1 = [6 x i8] c"%5sK \00"
@.str.2 = [12 x i8] c"(%s bytes)\0A\00"
define void @print_normalized_ems_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 624
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add i32 %6, 32
%8 = udiv i32 %7, 64
%9 = call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %14
10: ; preds = %1
%11 = load i32, i32* %2
%12 = mul i32 %11, 16
%13 = call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %5
%15 = call i8* @_(i32 1, i32 2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = mul i64 %17, 16384
%19 = trunc i64 %18 to i32
%20 = call i32 @convert(i8* %15, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%5sM \00"
@.str.1 = [6 x i8] c"%5sK \00"
@.str.2 = [12 x i8] c"(%s bytes)\0A\00"
define void @print_normalized_ems_size(i32 %0) {
%2 = icmp ugt i32 %0, 624
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = add i32 %0, 32
%5 = lshr i32 %4, 6
%6 = tail call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %10
7: ; preds = %1
%8 = shl nuw nsw i32 %0, 4
%9 = tail call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %3
%11 = tail call i8* @_(i32 1, i32 2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%12 = shl i32 %0, 14
%13 = tail call i32 @convert(i8* %11, i32 %12)
ret void
}