#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*/ sys_PrintChar(unsigned int);
void sys_PrintInt(unsigned int a0) {
  unsigned int i;
  unsigned int c;
  for (i = 0; i < 8; i++) {
    c = (a0 & 0xf0000000) >> 28;
    sys_PrintChar(
        *((unsigned int
               *)(((((((((((12 + 16) + 40) + 28) + 16) + 20) + 16) + 20) + 16) +
                    24) +
                   20) +
                  16) +
          c) +
        0x700);
    a0 = a0 << 4;
  }
}


x86 assembly (clang, -O0):
<sys_PrintInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jae    1169 <sys_PrintInt+0x59>
mov    -0x4(%rbp),%eax
and    $0xf0000000,%eax
shr    $0x1c,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    $0xf4,%eax
mov    (%rax,%rcx,4),%edi
add    $0x700,%edi
call   1030 <sys_PrintChar@plt>
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <sys_PrintInt+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_PrintInt>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x1c,%eax
mov    $0x700,%ebp
mov    0xf4(,%rax,4),%edi
add    %ebp,%edi
call   1030 <sys_PrintChar@plt>
mov    %ebx,%eax
shr    $0x18,%eax
and    $0xf,%eax
mov    0xf4(,%rax,4),%edi
add    %ebp,%edi
call   1030 <sys_PrintChar@plt>
mov    %ebx,%eax
shr    $0x14,%eax
and    $0xf,%eax
mov    0xf4(,%rax,4),%edi
add    %ebp,%edi
call   1030 <sys_PrintChar@plt>
mov    %ebx,%eax
shr    $0x10,%eax
and    $0xf,%eax
mov    0xf4(,%rax,4),%edi
add    %ebp,%edi
call   1030 <sys_PrintChar@plt>
mov    %ebx,%eax
shr    $0xc,%eax
and    $0xf,%eax
mov    0xf4(,%rax,4),%edi
add    %ebp,%edi
call   1030 <sys_PrintChar@plt>
mov    %ebx,%eax
shr    $0x8,%eax
and    $0xf,%eax
mov    0xf4(,%rax,4),%edi
add    %ebp,%edi
call   1030 <sys_PrintChar@plt>
mov    %ebx,%eax
shr    $0x4,%eax
and    $0xf,%eax
mov    0xf4(,%rax,4),%edi
add    %ebp,%edi
call   1030 <sys_PrintChar@plt>
and    $0xf,%ebx
add    0xf4(,%rbx,4),%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <sys_PrintChar@plt>

LLVM IR (-O0):
define void @sys_PrintInt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %20, %1
%6 = load i32, i32* %3
%7 = icmp ult i32 %6, 8
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %2
%10 = and i32 %9, -268435456
%11 = lshr i32 %10, 28
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %13
%15 = load i32, i32* %14
%16 = add i32 %15, 1792
%17 = call i32 @sys_PrintChar(i32 %16)
%18 = load i32, i32* %2
%19 = shl i32 %18, 4
store i32 %19, i32* %2
br label %20
20: ; preds = %8
%21 = load i32, i32* %3
%22 = add i32 %21, 1
store i32 %22, i32* %3
br label %5
23: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @sys_PrintInt(i32 %0) {
%2 = lshr i32 %0, 28
%3 = zext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %3
%5 = load i32, i32* %4
%6 = add i32 %5, 1792
%7 = tail call i32 @sys_PrintChar(i32 %6)
%8 = lshr i32 %0, 24
%9 = and i32 %8, 15
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %10
%12 = load i32, i32* %11
%13 = add i32 %12, 1792
%14 = tail call i32 @sys_PrintChar(i32 %13)
%15 = lshr i32 %0, 20
%16 = and i32 %15, 15
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %17
%19 = load i32, i32* %18
%20 = add i32 %19, 1792
%21 = tail call i32 @sys_PrintChar(i32 %20)
%22 = lshr i32 %0, 16
%23 = and i32 %22, 15
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %24
%26 = load i32, i32* %25
%27 = add i32 %26, 1792
%28 = tail call i32 @sys_PrintChar(i32 %27)
%29 = lshr i32 %0, 12
%30 = and i32 %29, 15
%31 = zext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %31
%33 = load i32, i32* %32
%34 = add i32 %33, 1792
%35 = tail call i32 @sys_PrintChar(i32 %34)
%36 = lshr i32 %0, 8
%37 = and i32 %36, 15
%38 = zext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %38
%40 = load i32, i32* %39
%41 = add i32 %40, 1792
%42 = tail call i32 @sys_PrintChar(i32 %41)
%43 = lshr i32 %0, 4
%44 = and i32 %43, 15
%45 = zext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %45
%47 = load i32, i32* %46
%48 = add i32 %47, 1792
%49 = tail call i32 @sys_PrintChar(i32 %48)
%50 = and i32 %0, 15
%51 = zext i32 %50 to i64
%52 = getelementptr inbounds i32, i32* inttoptr (i64 244 to i32*), i64 %51
%53 = load i32, i32* %52
%54 = add i32 %53, 1792
%55 = tail call i32 @sys_PrintChar(i32 %54)
ret void
}