#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 */
scalar_t__ bmp_test_get_padding();
scalar_t__ bmp_test_header_init_df();
scalar_t__ bmp_test_header_size();
scalar_t__ bmp_test_pixel_init();
int /*<<< orphan*/ bmp_test_print_summary(int, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int points = 0;
  printf("LibBMP-Test v. 0.0.1 A (C) 2016 - 2017 Marc Volker Dickmann\n\n");
  points += bmp_test_get_padding();
  points += bmp_test_header_size();
  points += bmp_test_header_init_df();
  points += bmp_test_pixel_init();
  bmp_test_print_summary(points, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1080 <bmp_test_get_padding@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <bmp_test_header_size@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <bmp_test_header_init_df@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <bmp_test_pixel_init@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x4,%esi
call   1070 <bmp_test_print_summary@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <bmp_test_get_padding@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <bmp_test_header_size@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1040 <bmp_test_header_init_df@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1060 <bmp_test_pixel_init@plt>
add    %eax,%ebx
mov    %ebx,%edi
mov    $0x4,%esi
call   1070 <bmp_test_print_summary@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [62 x i8] c"LibBMP-Test v. 0.0.1 A (C) 2016 - 2017 Marc Volker Dickmann\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%8 = call i64 (...) @bmp_test_get_padding()
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = add nsw i64 %10, %8
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = call i64 (...) @bmp_test_header_size()
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = add nsw i64 %15, %13
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
%18 = call i64 (...) @bmp_test_header_init_df()
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = add nsw i64 %20, %18
%22 = trunc i64 %21 to i32
store i32 %22, i32* %6
%23 = call i64 (...) @bmp_test_pixel_init()
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = add nsw i64 %25, %23
%27 = trunc i64 %26 to i32
store i32 %27, i32* %6
%28 = load i32, i32* %6
%29 = call i32 @bmp_test_print_summary(i32 %28, i32 4)
ret i32 0
}

LLVM IR (-O2):
@str = [61 x i8] c"LibBMP-Test v. 0.0.1 A (C) 2016 - 2017 Marc Volker Dickmann\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%4 = tail call i64 (...) @bmp_test_get_padding()
%5 = tail call i64 (...) @bmp_test_header_size()
%6 = add i64 %5, %4
%7 = tail call i64 (...) @bmp_test_header_init_df()
%8 = add i64 %6, %7
%9 = tail call i64 (...) @bmp_test_pixel_init()
%10 = add i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = tail call i32 @bmp_test_print_summary(i32 %11, i32 4)
ret i32 0
}