#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 _pop3_fprintf(int /*<<< orphan*/ *, char *, char *, ...);
int _send_misc(FILE *ofp, char *prefix, char *message, char *extended_error) {
  if (message) {
    if (extended_error) {
      return _pop3_fprintf(ofp, "%s [%s] %s\r\n", prefix, extended_error,
                           message);
    } else {
      return _pop3_fprintf(ofp, "%s %s\r\n", prefix, message);
    }
  } else {
    return _pop3_fprintf(ofp, "%s\r\n", prefix);
  }
}


x86 assembly (clang, -O0):
<_send_misc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1186 <_send_misc+0x76>
cmpq   $0x0,-0x28(%rbp)
je     1164 <_send_misc+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xeab(%rip),%rsi
mov    $0x0,%al
call   1030 <_pop3_fprintf@plt>
mov    %eax,-0x4(%rbp)
jmp    119f <_send_misc+0x8f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <_pop3_fprintf@plt>
mov    %eax,-0x4(%rbp)
jmp    119f <_send_misc+0x8f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe73(%rip),%rsi
mov    $0x0,%al
call   1030 <_pop3_fprintf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_send_misc>:
mov    %rdx,%r8
mov    %rsi,%rdx
test   %r8,%r8
je     112e <_send_misc+0x1e>
test   %rcx,%rcx
je     113c <_send_misc+0x2c>
lea    0xed9(%rip),%rsi
xor    %eax,%eax
jmp    1030 <_pop3_fprintf@plt>
lea    0xed3(%rip),%rsi
xor    %eax,%eax
jmp    1030 <_pop3_fprintf@plt>
lea    0xeca(%rip),%rsi
mov    %r8,%rcx
xor    %eax,%eax
jmp    1030 <_pop3_fprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s [%s] %s\0D\0A\00"
@.str.1 = [8 x i8] c"%s %s\0D\0A\00"
@.str.2 = [5 x i8] c"%s\0D\0A\00"
define i32 @_send_misc(i32* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i32* %0, i32** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%10 = load i8*, i8** %8
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %26
12: ; preds = %4
%13 = load i8*, i8** %9
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32*, i32** %6
%17 = load i8*, i8** %7
%18 = load i8*, i8** %9
%19 = load i8*, i8** %8
%20 = call i32 (i32*, i8*, i8*, ...) @_pop3_fprintf(i32* %16, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18, i8* %19)
store i32 %20, i32* %5
br label %30
21: ; preds = %12
%22 = load i32*, i32** %6
%23 = load i8*, i8** %7
%24 = load i8*, i8** %8
%25 = call i32 (i32*, i8*, i8*, ...) @_pop3_fprintf(i32* %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %23, i8* %24)
store i32 %25, i32* %5
br label %30
26: ; preds = %4
%27 = load i32*, i32** %6
%28 = load i8*, i8** %7
%29 = call i32 (i32*, i8*, i8*, ...) @_pop3_fprintf(i32* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %28)
store i32 %29, i32* %5
br label %30
30: ; preds = %26, %21, %15
%31 = load i32, i32* %5
ret i32 %31
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s [%s] %s\0D\0A\00"
@.str.1 = [8 x i8] c"%s %s\0D\0A\00"
@.str.2 = [5 x i8] c"%s\0D\0A\00"
define i32 @_send_misc(i32* %0, i8* %1, i8* %2, i8* %3) {
%5 = icmp eq i8* %2, null
br i1 %5, label %12, label %6
6: ; preds = %4
%7 = icmp eq i8* %3, null
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 (i32*, i8*, i8*, ...) @_pop3_fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3, i8* %2)
br label %14
10: ; preds = %6
%11 = tail call i32 (i32*, i8*, i8*, ...) @_pop3_fprintf(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2)
br label %14
12: ; preds = %4
%13 = tail call i32 (i32*, i8*, i8*, ...) @_pop3_fprintf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %1)
br label %14
14: ; preds = %12, %10, %8
%15 = phi i32 [ %9, %8 ], [ %11, %10 ], [ %13, %12 ]
ret i32 %15
}