#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
int end(char *name, char *buf, int sze, void *data) {
  FILE *fp = NULL;
  if (data != NULL)
    fp = (FILE *)data;
  else
    fp = stderr;
  fputc('<', fp);
  fwrite(buf, sze, 1, fp);
  fputc('>', fp);
  return 0;
}


x86 assembly (clang, -O0):
<end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1157 <end+0x37>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1165 <end+0x45>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    $0x3c,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x28(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    -0x28(%rbp),%rsi
mov    $0x3e,%edi
call   1030 <fputc@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%rbx
mov    %edx,%r14d
mov    %rsi,%rbp
test   %rcx,%rcx
jne    113c <end+0x1c>
mov    0x2ea7(%rip),%rax
mov    (%rax),%rbx
mov    $0x3c,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0x3e,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32* null
define i32 @end(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
store i32* null, i32** %9
%10 = load i8*, i8** %8
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i8*, i8** %8
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %9
br label %17
15: ; preds = %4
%16 = load i32*, i32** @stderr
store i32* %16, i32** %9
br label %17
17: ; preds = %15, %12
%18 = load i32*, i32** %9
%19 = call i32 @fputc(i8 signext 60, i32* %18)
%20 = load i8*, i8** %6
%21 = load i32, i32* %7
%22 = load i32*, i32** %9
%23 = call i32 @fwrite(i8* %20, i32 %21, i32 1, i32* %22)
%24 = load i32*, i32** %9
%25 = call i32 @fputc(i8 signext 62, i32* %24)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32* null
define i32 @end(i8* nocapture readnone %0, i8* nocapture %1, i32 %2, i8* %3) {
%5 = icmp eq i8* %3, null
%6 = bitcast i8* %3 to i32*
%7 = load i32*, i32** @stderr
%8 = select i1 %5, i32* %7, i32* %6
%9 = tail call i32 @fputc(i8 signext 60, i32* %8)
%10 = tail call i32 @fwrite(i8* %1, i32 %2, i32 1, i32* %8)
%11 = tail call i32 @fputc(i8 signext 62, i32* %8)
ret i32 0
}