#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 tm_hour;
  int tm_min;
  int tm_sec;
};

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


x86 assembly (clang, -O0):
<side_alt_balken_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <clear@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    $0x48,%edi
lea    0xea1(%rip),%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    $0x48,%edi
lea    0xe7b(%rip),%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
lea    0xe6c(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    $0x4d,%edi
lea    0xe48(%rip),%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    $0x4d,%edi
lea    0xe21(%rip),%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
lea    0xe12(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    $0x53,%edi
lea    0xdee(%rip),%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    $0x53,%edi
lea    0xdc7(%rip),%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<side_alt_balken_display>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <clear@plt>
movslq (%rbx),%rax
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
lea    0xea4(%rip),%r14
mov    $0x48,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
movslq (%rbx),%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
mov    $0x48,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movslq 0x4(%rbx),%rax
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
mov    $0x4d,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
movslq 0x4(%rbx),%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
mov    $0x4d,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movslq 0x8(%rbx),%rax
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
mov    $0x53,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1040 <print_balken@plt>
movslq 0x8(%rbx),%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
mov    $0x53,%edi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <print_balken@plt>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@.str = [3 x i8] c"%i\00"
@.str.1 = [1 x i8] zeroinitializer
define void @side_alt_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 0
%6 = load i32, i32* %5
%7 = sdiv i32 %6, 10
%8 = call i32 @print_balken(i8 signext 72, i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%9 = load %struct.tm*, %struct.tm** %2
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = srem i32 %11, 10
%13 = call i32 @print_balken(i8 signext 72, i32 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%14 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%15 = load %struct.tm*, %struct.tm** %2
%16 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = sdiv i32 %17, 10
%19 = call i32 @print_balken(i8 signext 77, i32 %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%20 = load %struct.tm*, %struct.tm** %2
%21 = getelementptr inbounds %struct.tm, %struct.tm* %20, i32 0, i32 1
%22 = load i32, i32* %21
%23 = srem i32 %22, 10
%24 = call i32 @print_balken(i8 signext 77, i32 %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%25 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%26 = load %struct.tm*, %struct.tm** %2
%27 = getelementptr inbounds %struct.tm, %struct.tm* %26, i32 0, i32 2
%28 = load i32, i32* %27
%29 = sdiv i32 %28, 10
%30 = call i32 @print_balken(i8 signext 83, i32 %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%31 = load %struct.tm*, %struct.tm** %2
%32 = getelementptr inbounds %struct.tm, %struct.tm* %31, i32 0, i32 2
%33 = load i32, i32* %32
%34 = srem i32 %33, 10
%35 = call i32 @print_balken(i8 signext 83, i32 %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [3 x i8] c"%i\00"
define void @side_alt_balken_display(%struct.tm* nocapture %0) {
%2 = tail call i32 (...) @clear()
%3 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = sdiv i32 %4, 10
%6 = tail call i32 @print_balken(i8 signext 72, i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%7 = load i32, i32* %3
%8 = srem i32 %7, 10
%9 = tail call i32 @print_balken(i8 signext 72, i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%10 = tail call i32 @putchar(i32 10)
%11 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%12 = load i32, i32* %11
%13 = sdiv i32 %12, 10
%14 = tail call i32 @print_balken(i8 signext 77, i32 %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%15 = load i32, i32* %11
%16 = srem i32 %15, 10
%17 = tail call i32 @print_balken(i8 signext 77, i32 %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%18 = tail call i32 @putchar(i32 10)
%19 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%20 = load i32, i32* %19
%21 = sdiv i32 %20, 10
%22 = tail call i32 @print_balken(i8 signext 83, i32 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
%23 = load i32, i32* %19
%24 = srem i32 %23, 10
%25 = tail call i32 @print_balken(i8 signext 83, i32 %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
ret void
}