#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 _chown_error(char *, int);
scalar_t__ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *,
                           char *, char *);
int /*<<< orphan*/ stderr;
int _chown_id_error(char *message, char *unknown, int ret) {
  if (errno != 0)
    return _chown_error(message, ret);
  fprintf(stderr, "%s%s%s%s%s",
          "chown"
          ": ",
          message, ": Unknown ", unknown, "\n");
  return ret;
}


x86 assembly (clang, -O0):
<_chown_id_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    0x2e9e(%rip),%rax
cmpq   $0x0,(%rax)
je     1158 <_chown_id_error+0x38>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <_chown_error@plt>
mov    %eax,-0x4(%rbp)
jmp    1194 <_chown_id_error+0x74>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r9
lea    0xe90(%rip),%rsi
lea    0xe94(%rip),%rdx
lea    0xe95(%rip),%r8
lea    0xe99(%rip),%rax
mov    %rax,(%rsp)
call   1040 <fprintf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_chown_id_error>:
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %rdi,%rcx
mov    0x2ea7(%rip),%rax
cmpq   $0x0,(%rax)
je     1146 <_chown_id_error+0x26>
mov    %rcx,%rdi
mov    %ebx,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <_chown_error@plt>
mov    %rsi,%r9
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rax
mov    %rax,(%rsp)
lea    0xe9c(%rip),%rsi
lea    0xea0(%rip),%rdx
lea    0xea1(%rip),%r8
call   1040 <fprintf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@stderr = global i32 0
@.str = [11 x i8] c"%s%s%s%s%s\00"
@.str.1 = [8 x i8] c"chown: \00"
@.str.2 = [11 x i8] c": Unknown \00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @_chown_id_error(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i64, i64* @errno
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %7
%13 = call i32 @_chown_error(i8* %11, i32 %12)
store i32 %13, i32* %4
br label %20
14: ; preds = %3
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %5
%17 = load i8*, i8** %6
%18 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %16, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32, i32* %7
store i32 %19, i32* %4
br label %20
20: ; preds = %14, %10
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@errno = global i64 0
@stderr = global i32 0
@.str = [11 x i8] c"%s%s%s%s%s\00"
@.str.1 = [8 x i8] c"chown: \00"
@.str.2 = [11 x i8] c": Unknown \00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @_chown_id_error(i8* %0, i8* %1, i32 %2) {
%4 = load i64, i64* @errno
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @_chown_error(i8* %0, i32 %2)
br label %11
8: ; preds = %3
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ %7, %6 ], [ %2, %8 ]
ret i32 %12
}