#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*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void fuck(char *s) {
  if (s != NULL)
    fprintf(stderr, "\nA fuck was given: %s\n", s);
  else
    fprintf(stderr, "A fuck was given.\n");
  fprintf(stderr, "errno says: %s\n\n", strerror(errno));
  exit(1);
}


x86 assembly (clang, -O0):
<fuck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1167 <fuck+0x37>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    117e <fuck+0x4e>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xe85(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fuck>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%edi
test   %rdx,%rdx
jne    1152 <fuck+0x22>
lea    0xece(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1160 <fuck+0x30>
lea    0xea7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%ebx
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeb3(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"\0AA fuck was given: %s\0A\00"
@.str.1 = [19 x i8] c"A fuck was given.\0A\00"
@.str.2 = [17 x i8] c"errno says: %s\0A\0A\00"
@errno = global i32 0
define void @fuck(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %12
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %9, %5
%13 = load i32, i32* @stderr
%14 = load i32, i32* @errno
%15 = call i8* @strerror(i32 %14)
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"\0AA fuck was given: %s\0A\00"
@.str.1 = [19 x i8] c"A fuck was given.\0A\00"
@.str.2 = [17 x i8] c"errno says: %s\0A\0A\00"
@errno = global i32 0
define void @fuck(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = load i32, i32* @stderr
br i1 %2, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* @stderr
%10 = load i32, i32* @errno
%11 = tail call i8* @strerror(i32 %10)
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = tail call i32 @exit(i32 1)
unreachable
}