#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 ismtp_start_mail(char *, char *, char *, char *, char *, int);
int msmtp_start_mail(char *, char *, char *, char *, char *, int);
scalar_t__ use_mailer();
int smtp_start_mail(char *from, char *to, char *cc, char *bcc, char *subject,
                    int len) {
  if (use_mailer())
    return msmtp_start_mail(from, to, cc, bcc, subject, len);
  else
    return ismtp_start_mail(from, to, cc, bcc, subject, len);
}


x86 assembly (clang, -O0):
<smtp_start_mail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
mov    $0x0,%al
call   1050 <use_mailer@plt>
cmp    $0x0,%rax
je     1186 <smtp_start_mail+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x34(%rbp),%r9d
call   1040 <msmtp_start_mail@plt>
mov    %eax,-0x4(%rbp)
jmp    11a6 <smtp_start_mail+0x76>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x34(%rbp),%r9d
call   1030 <ismtp_start_mail@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smtp_start_mail>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <use_mailer@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14d,%r9d
add    $0x8,%rsp
test   %rax,%rax
je     117e <smtp_start_mail+0x4e>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <msmtp_start_mail@plt>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <ismtp_start_mail@plt>

LLVM IR (-O0):
define i32 @smtp_start_mail(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32 %5, i32* %13
%14 = call i64 (...) @use_mailer()
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %24
16: ; preds = %6
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = load i8*, i8** %10
%20 = load i8*, i8** %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = call i32 @msmtp_start_mail(i8* %17, i8* %18, i8* %19, i8* %20, i8* %21, i32 %22)
store i32 %23, i32* %7
br label %32
24: ; preds = %6
%25 = load i8*, i8** %8
%26 = load i8*, i8** %9
%27 = load i8*, i8** %10
%28 = load i8*, i8** %11
%29 = load i8*, i8** %12
%30 = load i32, i32* %13
%31 = call i32 @ismtp_start_mail(i8* %25, i8* %26, i8* %27, i8* %28, i8* %29, i32 %30)
store i32 %31, i32* %7
br label %32
32: ; preds = %24, %16
%33 = load i32, i32* %7
ret i32 %33
}

LLVM IR (-O2):
define i32 @smtp_start_mail(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = tail call i64 (...) @use_mailer()
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @msmtp_start_mail(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5)
br label %13
11: ; preds = %6
%12 = tail call i32 @ismtp_start_mail(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5)
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
ret i32 %14
}