#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 bsize(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("TEXTBW40 - %d\n", bsize(40, 25, 4));
  printf("TEXTC40 - %d\n", bsize(40, 25, 4));
  printf("TEXTBW80 - %d\n", bsize(80, 25, 4));
  printf("TEXTC40 - %d\n", bsize(80, 25, 4));
  printf("MRES4COLOR - %d\n", bsize(320, 200, 2));
  printf("MRESNOCOLOR - %d\n", bsize(320, 200, 2));
  printf("HRESBW - %d\n", bsize(640, 200, 1));
  printf("TEXTMONO - %d\n", bsize(80, 25, 1));
  printf("MRES16COLOR - %d\n", bsize(320, 200, 4));
  printf("HRES16COLOR - %d\n", bsize(640, 200, 4));
  printf("ERESNOCOLOR - %d\n", bsize(320, 350, 1));
  printf("ERESCOLOR - %d\n", bsize(340, 350, 6));
  printf("VRES2COLOR - %d\n", bsize(640, 480, 1));
  printf("VRES16COLOR - %d\n", bsize(640, 480, 4));
  printf("MRES256COLOR - %d\n", bsize(320, 200, 8));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x28,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    $0x50,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    $0x50,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x2,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x2,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0xc8,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
mov    $0x50,%edi
mov    $0x19,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe2d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0xc8,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xe0a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0x15e,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xdfa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x154,%edi
mov    $0x15e,%esi
mov    $0x6,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xdd8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xdc7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x8,%edx
call   1040 <bsize@plt>
mov    %eax,%esi
lea    0xdb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x28,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x28,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
lea    0xeb1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x50,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x50,%edi
mov    $0x19,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x2,%edx
call   1040 <bsize@plt>
lea    0xe69(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x2,%edx
call   1040 <bsize@plt>
lea    0xe58(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0xc8,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
lea    0xe48(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x50,%edi
mov    $0x19,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
lea    0xe33(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
lea    0xe20(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0xc8,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
lea    0xe10(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0x15e,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
lea    0xe00(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x154,%edi
mov    $0x15e,%esi
mov    $0x6,%edx
call   1040 <bsize@plt>
lea    0xdf0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
mov    $0x1,%edx
call   1040 <bsize@plt>
lea    0xdde(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
mov    $0x4,%edx
call   1040 <bsize@plt>
lea    0xdcd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x140,%edi
mov    $0xc8,%esi
mov    $0x8,%edx
call   1040 <bsize@plt>
lea    0xdbd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"TEXTBW40 - %d\0A\00"
@.str.1 = [14 x i8] c"TEXTC40 - %d\0A\00"
@.str.2 = [15 x i8] c"TEXTBW80 - %d\0A\00"
@.str.3 = [17 x i8] c"MRES4COLOR - %d\0A\00"
@.str.4 = [18 x i8] c"MRESNOCOLOR - %d\0A\00"
@.str.5 = [13 x i8] c"HRESBW - %d\0A\00"
@.str.6 = [15 x i8] c"TEXTMONO - %d\0A\00"
@.str.7 = [18 x i8] c"MRES16COLOR - %d\0A\00"
@.str.8 = [18 x i8] c"HRES16COLOR - %d\0A\00"
@.str.9 = [18 x i8] c"ERESNOCOLOR - %d\0A\00"
@.str.10 = [16 x i8] c"ERESCOLOR - %d\0A\00"
@.str.11 = [17 x i8] c"VRES2COLOR - %d\0A\00"
@.str.12 = [18 x i8] c"VRES16COLOR - %d\0A\00"
@.str.13 = [19 x i8] c"MRES256COLOR - %d\0A\00"
define i32 @main() {
%1 = call i32 @bsize(i32 40, i32 25, i32 4)
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @bsize(i32 40, i32 25, i32 4)
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @bsize(i32 80, i32 25, i32 4)
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 @bsize(i32 80, i32 25, i32 4)
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @bsize(i32 320, i32 200, i32 2)
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%11 = call i32 @bsize(i32 320, i32 200, i32 2)
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%13 = call i32 @bsize(i32 640, i32 200, i32 1)
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %13)
%15 = call i32 @bsize(i32 80, i32 25, i32 1)
%16 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %15)
%17 = call i32 @bsize(i32 320, i32 200, i32 4)
%18 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %17)
%19 = call i32 @bsize(i32 640, i32 200, i32 4)
%20 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %19)
%21 = call i32 @bsize(i32 320, i32 350, i32 1)
%22 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %21)
%23 = call i32 @bsize(i32 340, i32 350, i32 6)
%24 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %23)
%25 = call i32 @bsize(i32 640, i32 480, i32 1)
%26 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i32 %25)
%27 = call i32 @bsize(i32 640, i32 480, i32 4)
%28 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %27)
%29 = call i32 @bsize(i32 320, i32 200, i32 8)
%30 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %29)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"TEXTBW40 - %d\0A\00"
@.str.1 = [14 x i8] c"TEXTC40 - %d\0A\00"
@.str.2 = [15 x i8] c"TEXTBW80 - %d\0A\00"
@.str.3 = [17 x i8] c"MRES4COLOR - %d\0A\00"
@.str.4 = [18 x i8] c"MRESNOCOLOR - %d\0A\00"
@.str.5 = [13 x i8] c"HRESBW - %d\0A\00"
@.str.6 = [15 x i8] c"TEXTMONO - %d\0A\00"
@.str.7 = [18 x i8] c"MRES16COLOR - %d\0A\00"
@.str.8 = [18 x i8] c"HRES16COLOR - %d\0A\00"
@.str.9 = [18 x i8] c"ERESNOCOLOR - %d\0A\00"
@.str.10 = [16 x i8] c"ERESCOLOR - %d\0A\00"
@.str.11 = [17 x i8] c"VRES2COLOR - %d\0A\00"
@.str.12 = [18 x i8] c"VRES16COLOR - %d\0A\00"
@.str.13 = [19 x i8] c"MRES256COLOR - %d\0A\00"
define i32 @main() {
%1 = tail call i32 @bsize(i32 40, i32 25, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @bsize(i32 40, i32 25, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @bsize(i32 80, i32 25, i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @bsize(i32 80, i32 25, i32 4)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = tail call i32 @bsize(i32 320, i32 200, i32 2)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%11 = tail call i32 @bsize(i32 320, i32 200, i32 2)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%13 = tail call i32 @bsize(i32 640, i32 200, i32 1)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %13)
%15 = tail call i32 @bsize(i32 80, i32 25, i32 1)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %15)
%17 = tail call i32 @bsize(i32 320, i32 200, i32 4)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %17)
%19 = tail call i32 @bsize(i32 640, i32 200, i32 4)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %19)
%21 = tail call i32 @bsize(i32 320, i32 350, i32 1)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %21)
%23 = tail call i32 @bsize(i32 340, i32 350, i32 6)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %23)
%25 = tail call i32 @bsize(i32 640, i32 480, i32 1)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i32 %25)
%27 = tail call i32 @bsize(i32 640, i32 480, i32 4)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %27)
%29 = tail call i32 @bsize(i32 320, i32 200, i32 8)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %29)
ret i32 0
}