#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*/ print_char(int);
void print_base16(void) {
  int i;
  i = '0';
  while ((i >= 48) && (i <= 57)) {
    print_char(i);
    i++;
  }
  i = 'A';
  while ((i >= 65) && (i <= 70)) {
    print_char(i);
    i++;
  }
}


x86 assembly (clang, -O0):
<print_base16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x30,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1138 <print_base16+0x28>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1148 <print_base16+0x38>
jmp    115e <print_base16+0x4e>
mov    -0x4(%rbp),%edi
call   1030 <print_char@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <print_base16+0xf>
movl   $0x41,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     117e <print_base16+0x6e>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    118e <print_base16+0x7e>
jmp    11a4 <print_base16+0x94>
mov    -0x4(%rbp),%edi
call   1030 <print_char@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <print_base16+0x55>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_base16>:
push   %rax
mov    $0x30,%edi
call   1030 <print_char@plt>
mov    $0x31,%edi
call   1030 <print_char@plt>
mov    $0x32,%edi
call   1030 <print_char@plt>
mov    $0x33,%edi
call   1030 <print_char@plt>
mov    $0x34,%edi
call   1030 <print_char@plt>
mov    $0x35,%edi
call   1030 <print_char@plt>
mov    $0x36,%edi
call   1030 <print_char@plt>
mov    $0x37,%edi
call   1030 <print_char@plt>
mov    $0x38,%edi
call   1030 <print_char@plt>
mov    $0x39,%edi
call   1030 <print_char@plt>
mov    $0x41,%edi
call   1030 <print_char@plt>
mov    $0x42,%edi
call   1030 <print_char@plt>
mov    $0x43,%edi
call   1030 <print_char@plt>
mov    $0x44,%edi
call   1030 <print_char@plt>
mov    $0x45,%edi
call   1030 <print_char@plt>
mov    $0x46,%edi
pop    %rax
jmp    1030 <print_char@plt>

LLVM IR (-O0):
define void @print_base16() {
%1 = alloca i32
store i32 48, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %2
%9 = phi i1 [ false, %2 ], [ %7, %5 ]
br i1 %9, label %10, label %15
10: ; preds = %8
%11 = load i32, i32* %1
%12 = call i32 @print_char(i32 %11)
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %8
store i32 65, i32* %1
br label %16
16: ; preds = %24, %15
%17 = load i32, i32* %1
%18 = icmp sge i32 %17, 65
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* %1
%21 = icmp sle i32 %20, 70
br label %22
22: ; preds = %19, %16
%23 = phi i1 [ false, %16 ], [ %21, %19 ]
br i1 %23, label %24, label %29
24: ; preds = %22
%25 = load i32, i32* %1
%26 = call i32 @print_char(i32 %25)
%27 = load i32, i32* %1
%28 = add nsw i32 %27, 1
store i32 %28, i32* %1
br label %16
29: ; preds = %22
ret void
}

LLVM IR (-O2):
define void @print_base16() {
%1 = tail call i32 @print_char(i32 48)
%2 = tail call i32 @print_char(i32 49)
%3 = tail call i32 @print_char(i32 50)
%4 = tail call i32 @print_char(i32 51)
%5 = tail call i32 @print_char(i32 52)
%6 = tail call i32 @print_char(i32 53)
%7 = tail call i32 @print_char(i32 54)
%8 = tail call i32 @print_char(i32 55)
%9 = tail call i32 @print_char(i32 56)
%10 = tail call i32 @print_char(i32 57)
%11 = tail call i32 @print_char(i32 65)
%12 = tail call i32 @print_char(i32 66)
%13 = tail call i32 @print_char(i32 67)
%14 = tail call i32 @print_char(i32 68)
%15 = tail call i32 @print_char(i32 69)
%16 = tail call i32 @print_char(i32 70)
ret void
}