#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*/ itoa(unsigned int, char *);
int /*<<< orphan*/ print(char *);
void printHD0(unsigned int *h) {
  char temp[200];
  print("\nPARTITION 1:");
  print("\n    START: ");
  itoa(h[0], temp);
  print(temp);
  print("\n    Capacity: ");
  itoa(h[1], temp);
  print(temp);
  h += 2;
  print("\nPARTITION 2:");
  print("\n    START: ");
  itoa(h[0], temp);
  print(temp);
  print("\n    Capacity: ");
  itoa(h[1], temp);
  print(temp);
}


x86 assembly (clang, -O0):
<printHD0>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <print@plt>
lea    0xecc(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    -0xd0(%rbp),%rsi
call   1040 <itoa@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <print@plt>
lea    0xeaf(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
lea    -0xd0(%rbp),%rsi
call   1040 <itoa@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
lea    0xe88(%rip),%rdi
call   1030 <print@plt>
lea    0xe5f(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    -0xd0(%rbp),%rsi
call   1040 <itoa@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <print@plt>
lea    0xe42(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
lea    -0xd0(%rbp),%rsi
call   1040 <itoa@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <print@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHD0>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rdi,%rbx
lea    0xec8(%rip),%rdi
call   1030 <print@plt>
lea    0xeca(%rip),%r15
mov    %r15,%rdi
call   1030 <print@plt>
mov    (%rbx),%edi
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <itoa@plt>
mov    %r14,%rdi
call   1030 <print@plt>
lea    0xeb3(%rip),%r12
mov    %r12,%rdi
call   1030 <print@plt>
mov    0x4(%rbx),%edi
mov    %r14,%rsi
call   1040 <itoa@plt>
mov    %r14,%rdi
call   1030 <print@plt>
lea    0xea1(%rip),%rdi
call   1030 <print@plt>
mov    %r15,%rdi
call   1030 <print@plt>
mov    0x8(%rbx),%edi
mov    %r14,%rsi
call   1040 <itoa@plt>
mov    %r14,%rdi
call   1030 <print@plt>
mov    %r12,%rdi
call   1030 <print@plt>
mov    0xc(%rbx),%edi
mov    %r14,%rsi
call   1040 <itoa@plt>
mov    %r14,%rdi
call   1030 <print@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\0APARTITION 1:\00"
@.str.1 = [13 x i8] c"\0A START: \00"
@.str.2 = [16 x i8] c"\0A Capacity: \00"
@.str.3 = [14 x i8] c"\0APARTITION 2:\00"
define void @printHD0(i32* %0) {
%2 = alloca i32*
%3 = alloca [200 x i8]
store i32* %0, i32** %2
%4 = call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%10 = call i32 @itoa(i32 %8, i8* %9)
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%12 = call i32 @print(i8* %11)
%13 = call i32 @print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
%17 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%18 = call i32 @itoa(i32 %16, i8* %17)
%19 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%20 = call i32 @print(i8* %19)
%21 = load i32*, i32** %2
%22 = getelementptr inbounds i32, i32* %21, i64 2
store i32* %22, i32** %2
%23 = call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%25 = load i32*, i32** %2
%26 = getelementptr inbounds i32, i32* %25, i64 0
%27 = load i32, i32* %26
%28 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%29 = call i32 @itoa(i32 %27, i8* %28)
%30 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%31 = call i32 @print(i8* %30)
%32 = call i32 @print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%33 = load i32*, i32** %2
%34 = getelementptr inbounds i32, i32* %33, i64 1
%35 = load i32, i32* %34
%36 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%37 = call i32 @itoa(i32 %35, i8* %36)
%38 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%39 = call i32 @print(i8* %38)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0APARTITION 1:\00"
@.str.1 = [13 x i8] c"\0A START: \00"
@.str.2 = [16 x i8] c"\0A Capacity: \00"
@.str.3 = [14 x i8] c"\0APARTITION 2:\00"
define void @printHD0(i32* nocapture %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %0
%7 = call i32 @itoa(i32 %6, i8* %3)
%8 = call i32 @print(i8* %3)
%9 = call i32 @print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%10 = getelementptr inbounds i32, i32* %0, i64 1
%11 = load i32, i32* %10
%12 = call i32 @itoa(i32 %11, i8* %3)
%13 = call i32 @print(i8* %3)
%14 = getelementptr inbounds i32, i32* %0, i64 2
%15 = call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %14
%18 = call i32 @itoa(i32 %17, i8* %3)
%19 = call i32 @print(i8* %3)
%20 = call i32 @print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%21 = getelementptr inbounds i32, i32* %0, i64 3
%22 = load i32, i32* %21
%23 = call i32 @itoa(i32 %22, i8* %3)
%24 = call i32 @print(i8* %3)
ret void
}