#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned long *);
int /*<<< orphan*/ stdin;
void main(void) {
  unsigned long i;
  printf("\nDecimal to Hexadecimal\n(c) Copyright 2002,P. Jakubco, ver:1.00");
  printf("\nVlozte cele dekadicke cislo v rozsahu 0 az 4,294,967,295:");
  scanf("%lu", &i);
  printf("\nJeho hexadecimalna hodnota je: %10Xh", i);
  fflush(stdin);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
mov    (%rsp),%rsi
lea    0xf08(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [64 x i8] c"\0ADecimal to Hexadecimal\0A(c) Copyright 2002,P. Jakubco, ver:1.00\00"
@.str.1 = [59 x i8] c"\0AVlozte cele dekadicke cislo v rozsahu 0 az 4,294,967,295:\00"
@.str.2 = [4 x i8] c"%lu\00"
@.str.3 = [38 x i8] c"\0AJeho hexadecimalna hodnota je: %10Xh\00"
@stdin = global i32 0
define void @main() {
%1 = alloca i64
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i64 %5)
%7 = load i32, i32* @stdin
%8 = call i32 @fflush(i32 %7)
%9 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"\0ADecimal to Hexadecimal\0A(c) Copyright 2002,P. Jakubco, ver:1.00\00"
@.str.1 = [59 x i8] c"\0AVlozte cele dekadicke cislo v rozsahu 0 az 4,294,967,295:\00"
@.str.2 = [4 x i8] c"%lu\00"
@.str.3 = [38 x i8] c"\0AJeho hexadecimalna hodnota je: %10Xh\00"
@stdin = global i32 0
define void @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %1)
%6 = load i64, i64* %1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i64 %6)
%8 = load i32, i32* @stdin
%9 = call i32 @fflush(i32 %8)
%10 = call i32 (...) @getchar()
ret void
}