#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*/ ConvertTimeToHM(int, int *, int *);
int GetInteger();
int /*<<< orphan*/ printf(char *, ...);
main() {
  int time, hours, minutes;
  printf("Test program to convert time values\n");
  printf("Enter a time duration in minutes: ");
  time = GetInteger();
  ConvertTimeToHM(time, &hours, &minutes);
  printf("HH:MM format: %d:%02d\n", hours, minutes);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <GetInteger@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <ConvertTimeToHM@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <GetInteger@plt>
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    %eax,%edi
call   1050 <ConvertTimeToHM@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Test program to convert time values\0A\00"
@.str.1 = [35 x i8] c"Enter a time duration in minutes: \00"
@.str.2 = [23 x i8] c"HH:MM format: %d:%02d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @GetInteger()
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @ConvertTimeToHM(i32 %7, i32* %2, i32* %3)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [35 x i8] c"Enter a time duration in minutes: \00"
@.str.2 = [23 x i8] c"HH:MM format: %d:%02d\0A\00"
@str = [36 x i8] c"Test program to convert time values\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (...) @GetInteger()
%8 = call i32 @ConvertTimeToHM(i32 %7, i32* %1, i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}