#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*/ assert(int);
char *howMuch(int, int);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ strcmp(char *, char *);
void tests() {
  printf("%s\n", howMuch(1, 100));
  assert(strcmp(howMuch(1, 100), "[[M: 37 B: 5 C: 4][M: 100 B: 14 C: 11]]") ==
         0);
  assert(strcmp(howMuch(2950, 2950), "[]") == 0);
  assert(strcmp(howMuch(20000, 20100),
                "[[M: 20008 B: 2858 C: 2223][M: 20071 B: 2867 C: 2230]]") == 0);
}


x86 assembly (clang, -O0):
<tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x64,%esi
call   1060 <howMuch@plt>
mov    %rax,%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x64,%esi
call   1060 <howMuch@plt>
mov    %rax,%rdi
lea    0xe89(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0xb86,%esi
mov    %esi,%edi
call   1060 <howMuch@plt>
mov    %rax,%rdi
lea    0xe85(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x4e20,%edi
mov    $0x4e84,%esi
call   1060 <howMuch@plt>
mov    %rax,%rdi
lea    0xe59(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tests>:
push   %rax
mov    $0x1,%edi
mov    $0x64,%esi
call   1060 <howMuch@plt>
lea    0xea9(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x64,%esi
call   1060 <howMuch@plt>
lea    0xe8f(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    $0xb86,%edi
mov    $0xb86,%esi
call   1060 <howMuch@plt>
lea    0xe8b(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    $0x4e20,%edi
mov    $0x4e84,%esi
call   1060 <howMuch@plt>
lea    0xe62(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1050 <assert@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [40 x i8] c"[[M: 37 B: 5 C: 4][M: 100 B: 14 C: 11]]\00"
@.str.2 = [3 x i8] c"[]\00"
@.str.3 = [55 x i8] c"[[M: 20008 B: 2858 C: 2223][M: 20071 B: 2867 C: 2230]]\00"
define void @tests() {
%1 = call i8* @howMuch(i32 1, i32 100)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i8* @howMuch(i32 1, i32 100)
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i8* @howMuch(i32 2950, i32 2950)
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i8* @howMuch(i32 20000, i32 20100)
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [40 x i8] c"[[M: 37 B: 5 C: 4][M: 100 B: 14 C: 11]]\00"
@.str.2 = [3 x i8] c"[]\00"
@.str.3 = [55 x i8] c"[[M: 20008 B: 2858 C: 2223][M: 20071 B: 2867 C: 2230]]\00"
define void @tests() {
%1 = tail call i8* @howMuch(i32 1, i32 100)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i8* @howMuch(i32 1, i32 100)
%4 = tail call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i8* @howMuch(i32 2950, i32 2950)
%9 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i8* @howMuch(i32 20000, i32 20100)
%14 = tail call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
ret void
}