#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_balken_fat_display(struct tm *current_time) {
  clear();
  print_balken('H', current_time->tm_hour, "%i", current_time->tm_hour / 10);
  print_balken('H', current_time->tm_hour, "%i", current_time->tm_hour % 10);
  puts("");
  print_balken('M', current_time->tm_min, "%i", current_time->tm_min / 10);
  print_balken('M', current_time->tm_min, "%i", current_time->tm_min % 10);
  puts("");
  print_balken('S', current_time->tm_sec, "%i", current_time->tm_sec / 10);
  print_balken('S', current_time->tm_sec, "%i", current_time->tm_sec % 10);
}


x86 assembly (clang, -O0):
<side_balken_fat_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),%esi
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x48,%edi
lea    0xe9b(%rip),%rdx
call   1040 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x48,%edi
lea    0xe74(%rip),%rdx
call   1040 <print_balken@plt>
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x4d,%edi
lea    0xe3f(%rip),%rdx
call   1040 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x4d,%edi
lea    0xe16(%rip),%rdx
call   1040 <print_balken@plt>
lea    0xe0c(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x53,%edi
lea    0xde1(%rip),%rdx
call   1040 <print_balken@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x53,%edi
lea    0xdb8(%rip),%rdx
call   1040 <print_balken@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<side_balken_fat_display>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <clear@plt>
movslq (%rbx),%rsi
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x22,%rcx
add    %eax,%ecx
lea    0xea4(%rip),%r14
mov    $0x48,%edi
mov    %r14,%rdx
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
mov    %esi,%ecx
sub    %eax,%ecx
mov    $0x48,%edi
mov    %r14,%rdx
call   1040 <print_balken@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movslq 0x4(%rbx),%rsi
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x22,%rcx
add    %eax,%ecx
mov    $0x4d,%edi
mov    %r14,%rdx
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
mov    %esi,%ecx
sub    %eax,%ecx
mov    $0x4d,%edi
mov    %r14,%rdx
call   1040 <print_balken@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movslq 0x8(%rbx),%rsi
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x22,%rcx
add    %eax,%ecx
mov    $0x53,%edi
mov    %r14,%rdx
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
mov    %esi,%ecx
sub    %eax,%ecx
mov    $0x53,%edi
mov    %r14,%rdx
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_balken_fat_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 = load %struct.tm*, %struct.tm** %2
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 10
%11 = call i32 @print_balken(i8 signext 72, i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%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 = load %struct.tm*, %struct.tm** %2
%16 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 0
%17 = load i32, i32* %16
%18 = srem i32 %17, 10
%19 = call i32 @print_balken(i8 signext 72, i32 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%21 = load %struct.tm*, %struct.tm** %2
%22 = getelementptr inbounds %struct.tm, %struct.tm* %21, i32 0, i32 1
%23 = load i32, i32* %22
%24 = load %struct.tm*, %struct.tm** %2
%25 = getelementptr inbounds %struct.tm, %struct.tm* %24, i32 0, i32 1
%26 = load i32, i32* %25
%27 = sdiv i32 %26, 10
%28 = call i32 @print_balken(i8 signext 77, i32 %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = load %struct.tm*, %struct.tm** %2
%30 = getelementptr inbounds %struct.tm, %struct.tm* %29, i32 0, i32 1
%31 = load i32, i32* %30
%32 = load %struct.tm*, %struct.tm** %2
%33 = getelementptr inbounds %struct.tm, %struct.tm* %32, i32 0, i32 1
%34 = load i32, i32* %33
%35 = srem i32 %34, 10
%36 = call i32 @print_balken(i8 signext 77, i32 %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%38 = load %struct.tm*, %struct.tm** %2
%39 = getelementptr inbounds %struct.tm, %struct.tm* %38, i32 0, i32 2
%40 = load i32, i32* %39
%41 = load %struct.tm*, %struct.tm** %2
%42 = getelementptr inbounds %struct.tm, %struct.tm* %41, i32 0, i32 2
%43 = load i32, i32* %42
%44 = sdiv i32 %43, 10
%45 = call i32 @print_balken(i8 signext 83, i32 %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %44)
%46 = load %struct.tm*, %struct.tm** %2
%47 = getelementptr inbounds %struct.tm, %struct.tm* %46, i32 0, i32 2
%48 = load i32, i32* %47
%49 = load %struct.tm*, %struct.tm** %2
%50 = getelementptr inbounds %struct.tm, %struct.tm* %49, i32 0, i32 2
%51 = load i32, i32* %50
%52 = srem i32 %51, 10
%53 = call i32 @print_balken(i8 signext 83, i32 %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %52)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [3 x i8] c"%i\00"
define void @side_balken_fat_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 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = srem i32 %7, 10
%9 = tail call i32 @print_balken(i8 signext 72, i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%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 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %11
%16 = srem i32 %15, 10
%17 = tail call i32 @print_balken(i8 signext 77, i32 %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
%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 %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %19
%24 = srem i32 %23, 10
%25 = tail call i32 @print_balken(i8 signext 83, i32 %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %24)
ret void
}