#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 */
struct message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hfield_mult(char *, struct message *, int);
char *skin(int /*<<< orphan*/);
char *fakefrom(struct message *mp) {
  char *name;
  if (((name = skin(hfield_mult("return-path", mp, 1))) == NULL ||
       *name == '\0') &&
      ((name = skin(hfield_mult("from", mp, 1))) == NULL || *name == '\0'))
    name = "-";
  return name;
}


x86 assembly (clang, -O0):
<fakefrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x1,%edx
call   1040 <hfield_mult@plt>
mov    %eax,%edi
call   1030 <skin@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1166 <fakefrom+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11ab <fakefrom+0x8b>
mov    -0x8(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x1,%edx
call   1040 <hfield_mult@plt>
mov    %eax,%edi
call   1030 <skin@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     11a0 <fakefrom+0x80>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11ab <fakefrom+0x8b>
lea    0xe6a(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fakefrom>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <hfield_mult@plt>
mov    %eax,%edi
call   1030 <skin@plt>
test   %rax,%rax
je     114b <fakefrom+0x2b>
cmpb   $0x0,(%rax)
je     114b <fakefrom+0x2b>
pop    %rbx
ret
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <hfield_mult@plt>
mov    %eax,%edi
call   1030 <skin@plt>
test   %rax,%rax
je     1170 <fakefrom+0x50>
cmpb   $0x0,(%rax)
jne    1149 <fakefrom+0x29>
lea    0xe9a(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.message = type { i32 }
@.str = [12 x i8] c"return-path\00"
@.str.1 = [5 x i8] c"from\00"
@.str.2 = [2 x i8] c"-\00"
define i8* @fakefrom(%struct.message* %0) {
%2 = alloca %struct.message*
%3 = alloca i8*
store %struct.message* %0, %struct.message** %2
%4 = load %struct.message*, %struct.message** %2
%5 = call i32 @hfield_mult(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.message* %4, i32 1)
%6 = call i8* @skin(i32 %5)
store i8* %6, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %24
13: ; preds = %8, %1
%14 = load %struct.message*, %struct.message** %2
%15 = call i32 @hfield_mult(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %struct.message* %14, i32 1)
%16 = call i8* @skin(i32 %15)
store i8* %16, i8** %3
%17 = icmp eq i8* %16, null
br i1 %17, label %23, label %18
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %18, %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %24
24: ; preds = %23, %18, %8
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
%struct.message = type { i32 }
@.str = [12 x i8] c"return-path\00"
@.str.1 = [5 x i8] c"from\00"
@.str.2 = [2 x i8] c"-\00"
define i8* @fakefrom(%struct.message* %0) {
%2 = tail call i32 @hfield_mult(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.message* %0, i32 1)
%3 = tail call i8* @skin(i32 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i8, i8* %3
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %5, %1
%9 = tail call i32 @hfield_mult(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %struct.message* %0, i32 1)
%10 = tail call i8* @skin(i32 %9)
%11 = icmp eq i8* %10, null
br i1 %11, label %15, label %12
12: ; preds = %8
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12, %8
br label %16
16: ; preds = %15, %12, %5
%17 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), %15 ], [ %10, %12 ], [ %3, %5 ]
ret i8* %17
}