#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*/ displaySetCS(int /*<<< orphan*/);
int /*<<< orphan*/ displaySetChPitch(int /*<<< orphan*/, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int /*<<< orphan*/,
                                     int, int, int);
int /*<<< orphan*/ displaySetCharNumber(int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int,
                                        int /*<<< orphan*/, int /*<<< orphan*/,
                                        int, int);
int /*<<< orphan*/ displaySetCurPos(int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ displaySetCursorLower(int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ displaySetCursorUpper(int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ displaySetMode(int, int, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ displaySetReset(int);
int /*<<< orphan*/ displaySetStartLower(int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ displaySetStartUpper(int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/
displaySetTimeDivision(int, int /*<<< orphan*/, int, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void setupDisplay() {
  printf("Inizializzo display");
  displaySetReset(0);
  displaySetCS(0);
  displaySetReset(1);
  displaySetMode(1, 1, 0, 0, 1, 0);
  displaySetChPitch(0, 0, 0, 0, 1, 1, 1);
  displaySetCharNumber(0, 0, 0, 1, 0, 0, 1, 1);
  displaySetTimeDivision(1, 0, 1, 0, 0, 0, 0, 0);
  displaySetCurPos(0, 0, 0, 0);
  displaySetStartLower(0, 0, 0, 0, 0, 0, 0, 0);
  displaySetStartUpper(0, 0, 0, 0, 0, 0, 0, 0);
  displaySetCursorLower(0, 0, 0, 0, 0, 0, 0, 0);
  displaySetCursorUpper(0, 0, 0, 0, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<setupDisplay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe31(%rip),%rdi
call   1070 <printf@plt>
xor    %edi,%edi
call   1040 <displaySetReset@plt>
xor    %edi,%edi
call   10d0 <displaySetCS@plt>
mov    $0x1,%edi
call   1040 <displaySetReset@plt>
mov    $0x1,%r8d
xor    %r9d,%r9d
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
call   1050 <displaySetMode@plt>
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
mov    %r9d,%r8d
movl   $0x1,(%rsp)
call   10c0 <displaySetChPitch@plt>
xor    %r9d,%r9d
mov    $0x1,%ecx
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
movl   $0x1,(%rsp)
movl   $0x1,0x8(%rsp)
call   10a0 <displaySetCharNumber@plt>
mov    $0x1,%edx
xor    %r9d,%r9d
mov    %edx,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1090 <displaySetTimeDivision@plt>
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1080 <displaySetCurPos@plt>
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <displaySetStartLower@plt>
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <displaySetStartUpper@plt>
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   10b0 <displaySetCursorLower@plt>
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   10e0 <displaySetCursorUpper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupDisplay>:
push   %rax
lea    0xe38(%rip),%rdi
call   1070 <printf@plt>
xor    %edi,%edi
call   1040 <displaySetReset@plt>
xor    %edi,%edi
call   10d0 <displaySetCS@plt>
mov    $0x1,%edi
call   1040 <displaySetReset@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1050 <displaySetMode@plt>
sub    $0x8,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
push   $0x1
call   10c0 <displaySetChPitch@plt>
add    $0x10,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x1
push   $0x1
call   10a0 <displaySetCharNumber@plt>
add    $0x10,%rsp
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1090 <displaySetTimeDivision@plt>
add    $0x10,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1080 <displaySetCurPos@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1030 <displaySetStartLower@plt>
add    $0x10,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1060 <displaySetStartUpper@plt>
add    $0x10,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   10b0 <displaySetCursorLower@plt>
add    $0x10,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   10e0 <displaySetCursorUpper@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Inizializzo display\00"
define void @setupDisplay() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @displaySetReset(i32 0)
%3 = call i32 @displaySetCS(i32 0)
%4 = call i32 @displaySetReset(i32 1)
%5 = call i32 @displaySetMode(i32 1, i32 1, i32 0, i32 0, i32 1, i32 0)
%6 = call i32 @displaySetChPitch(i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1)
%7 = call i32 @displaySetCharNumber(i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 1)
%8 = call i32 @displaySetTimeDivision(i32 1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0)
%9 = call i32 @displaySetCurPos(i32 0, i32 0, i32 0, i32 0)
%10 = call i32 @displaySetStartLower(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%11 = call i32 @displaySetStartUpper(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%12 = call i32 @displaySetCursorLower(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%13 = call i32 @displaySetCursorUpper(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Inizializzo display\00"
define void @setupDisplay() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @displaySetReset(i32 0)
%3 = tail call i32 @displaySetCS(i32 0)
%4 = tail call i32 @displaySetReset(i32 1)
%5 = tail call i32 @displaySetMode(i32 1, i32 1, i32 0, i32 0, i32 1, i32 0)
%6 = tail call i32 @displaySetChPitch(i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1)
%7 = tail call i32 @displaySetCharNumber(i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 1)
%8 = tail call i32 @displaySetTimeDivision(i32 1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0)
%9 = tail call i32 @displaySetCurPos(i32 0, i32 0, i32 0, i32 0)
%10 = tail call i32 @displaySetStartLower(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%11 = tail call i32 @displaySetStartUpper(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%12 = tail call i32 @displaySetCursorLower(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%13 = tail call i32 @displaySetCursorUpper(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
ret void
}