#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*/ my_putchar(char);
int /*<<< orphan*/ my_putnbr(int);
int /*<<< orphan*/ my_putstr(char *);
void pause_system2_1(char *str, int count) {
  my_putstr("\033[0m\033[37m");
  my_putstr(" [ ");
  my_putstr("\033[0m\033[32m");
  my_putstr(str);
  my_putstr("\033[0m\033[37m");
  my_putstr("]\t");
  my_putstr("\033[0m\033[31m");
  my_putnbr(count);
  my_putstr("\033[0m\033[37m");
  my_putchar('%');
  my_putchar('\r');
}


x86 assembly (clang, -O0):
<pause_system2_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xeb8(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xeb0(%rip),%rdi
call   1040 <my_putstr@plt>
mov    -0x8(%rbp),%rdi
call   1040 <my_putstr@plt>
lea    0xe8d(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xe99(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xe90(%rip),%rdi
call   1040 <my_putstr@plt>
mov    -0xc(%rbp),%edi
call   1050 <my_putnbr@plt>
lea    0xe61(%rip),%rdi
call   1040 <my_putstr@plt>
mov    $0x25,%edi
call   1030 <my_putchar@plt>
mov    $0xd,%edi
call   1030 <my_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause_system2_1>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec0(%rip),%r14
mov    %r14,%rdi
call   1040 <my_putstr@plt>
lea    0xebb(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xeb3(%rip),%rdi
call   1040 <my_putstr@plt>
mov    %rbx,%rdi
call   1040 <my_putstr@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
lea    0xea1(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xe98(%rip),%rdi
call   1040 <my_putstr@plt>
mov    %ebp,%edi
call   1050 <my_putnbr@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    $0x25,%edi
call   1030 <my_putchar@plt>
mov    $0xd,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <my_putchar@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B[0m\1B[37m\00"
@.str.1 = [4 x i8] c" [ \00"
@.str.2 = [10 x i8] c"\1B[0m\1B[32m\00"
@.str.3 = [3 x i8] c"]\09\00"
@.str.4 = [10 x i8] c"\1B[0m\1B[31m\00"
define void @pause_system2_1(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @my_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%8 = load i8*, i8** %3
%9 = call i32 @my_putstr(i8* %8)
%10 = call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @my_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32, i32* %4
%14 = call i32 @my_putnbr(i32 %13)
%15 = call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @my_putchar(i8 signext 37)
%17 = call i32 @my_putchar(i8 signext 13)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B[0m\1B[37m\00"
@.str.1 = [4 x i8] c" [ \00"
@.str.2 = [10 x i8] c"\1B[0m\1B[32m\00"
@.str.3 = [3 x i8] c"]\09\00"
@.str.4 = [10 x i8] c"\1B[0m\1B[31m\00"
define void @pause_system2_1(i8* %0, i32 %1) {
%3 = tail call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @my_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @my_putstr(i8* %0)
%7 = tail call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @my_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @my_putnbr(i32 %1)
%11 = tail call i32 @my_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @my_putchar(i8 signext 37)
%13 = tail call i32 @my_putchar(i8 signext 13)
ret void
}