#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*/ sprintf(char *, char *, char);
int /*<<< orphan*/ stopErr(char *, char *);
int write(int, void *, int);
void dump_marque(int fd, char C) {
  char b[3 + 1];
  sprintf(b, "<%c>", C);
  if ((write(fd, (void *)b, 3)) != 3)
    stopErr("dump", "marque");
}


x86 assembly (clang, -O0):
<dump_marque>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
lea    0xeb4(%rip),%rsi
movsbl -0x5(%rbp),%edx
call   1050 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x3,%edx
call   1040 <write@plt>
cmp    $0x3,%eax
je     1182 <dump_marque+0x52>
lea    0xe8f(%rip),%rdi
lea    0xe8d(%rip),%rsi
call   1030 <stopErr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_marque>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%edx
mov    %edi,%ebx
lea    0xec1(%rip),%rsi
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1050 <sprintf@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x3,%edx
call   1040 <write@plt>
cmp    $0x3,%eax
jne    1168 <dump_marque+0x38>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe96(%rip),%rdi
lea    0xe94(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <stopErr@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"<%c>\00"
@.str.1 = [5 x i8] c"dump\00"
@.str.2 = [7 x i8] c"marque\00"
define void @dump_marque(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = load i32, i32* %3
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%11 = call i32 @write(i32 %9, i8* %10, i32 3)
%12 = icmp ne i32 %11, 3
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @stopErr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"<%c>\00"
@.str.1 = [5 x i8] c"dump\00"
@.str.2 = [7 x i8] c"marque\00"
define void @dump_marque(i32 %0, i8 signext %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %1)
%6 = call i32 @write(i32 %0, i8* %4, i32 3)
%7 = icmp eq i32 %6, 3
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @stopErr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret void
}