#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 */
struct tm {
  int /*<<< orphan*/ tm_sec;
  int /*<<< orphan*/ tm_min;
  int /*<<< orphan*/ tm_hour;
};

/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ print_balken(char, int /*<<< orphan*/, char *, int);
void side_balken_display(struct tm *current_time) {
  clear();
  print_balken('H', current_time->tm_hour, "%02i", -1);
  print_balken('M', current_time->tm_min, "%02i", -1);
  print_balken('S', current_time->tm_sec, "%02i", -1);
}


x86 assembly (clang, -O0):
<side_balken_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <clear@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
mov    $0x48,%edi
lea    0xeba(%rip),%rdx
mov    $0xffffffff,%ecx
call   1030 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
mov    $0x4d,%edi
lea    0xe9d(%rip),%rdx
mov    $0xffffffff,%ecx
call   1030 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    $0x53,%edi
lea    0xe81(%rip),%rdx
mov    $0xffffffff,%ecx
call   1030 <print_balken@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<side_balken_display>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <clear@plt>
mov    0x8(%rbx),%esi
lea    0xec8(%rip),%r14
mov    $0x48,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1030 <print_balken@plt>
mov    0x4(%rbx),%esi
mov    $0x4d,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1030 <print_balken@plt>
mov    (%rbx),%esi
mov    $0x53,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <print_balken@plt>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@.str = [5 x i8] c"%02i\00"
define void @side_balken_display(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%3 = call i32 (...) @clear()
%4 = load %struct.tm*, %struct.tm** %2
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
%6 = load i32, i32* %5
%7 = call i32 @print_balken(i8 signext 72, i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 -1)
%8 = load %struct.tm*, %struct.tm** %2
%9 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 1
%10 = load i32, i32* %9
%11 = call i32 @print_balken(i8 signext 77, i32 %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 -1)
%12 = load %struct.tm*, %struct.tm** %2
%13 = getelementptr inbounds %struct.tm, %struct.tm* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @print_balken(i8 signext 83, i32 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 -1)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [5 x i8] c"%02i\00"
define void @side_balken_display(%struct.tm* nocapture %0) {
%2 = tail call i32 (...) @clear()
%3 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%4 = load i32, i32* %3
%5 = tail call i32 @print_balken(i8 signext 72, i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 -1)
%6 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%7 = load i32, i32* %6
%8 = tail call i32 @print_balken(i8 signext 77, i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 -1)
%9 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%10 = load i32, i32* %9
%11 = tail call i32 @print_balken(i8 signext 83, i32 %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 -1)
ret void
}