#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 */
scalar_t__ strcmp(char const *, char *);
const char *partcode_path(const char *part_type, const char *fs_type) {
  if (strcmp(part_type, "VTOC8") == 0) {
    if (strcmp(fs_type, "ufs") == 0) {
      return ("/boot/boot1");
    } else if (strcmp(fs_type, "zfs") == 0) {
      return ("/boot/zfsboot");
    }
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<partcode_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1198 <partcode_path+0x88>
mov    -0x18(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1164 <partcode_path+0x54>
lea    0xeaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11a0 <partcode_path+0x90>
mov    -0x18(%rbp),%rdi
lea    0xea7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    118e <partcode_path+0x7e>
lea    0xe95(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11a0 <partcode_path+0x90>
jmp    1193 <partcode_path+0x83>
jmp    1198 <partcode_path+0x88>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<partcode_path>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1129 <partcode_path+0x19>
xor    %eax,%eax
pop    %rbx
ret
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     115a <partcode_path+0x4a>
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1125 <partcode_path+0x15>
lea    0xec2(%rip),%rax
pop    %rbx
ret
lea    0xea9(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"VTOC8\00"
@.str.1 = [4 x i8] c"ufs\00"
@.str.2 = [12 x i8] c"/boot/boot1\00"
@.str.3 = [4 x i8] c"zfs\00"
@.str.4 = [14 x i8] c"/boot/zfsboot\00"
define i8* @partcode_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %21
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %22
14: ; preds = %9
%15 = load i8*, i8** %5
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %14
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %22
19: ; preds = %14
br label %20
20: ; preds = %19
br label %21
21: ; preds = %20, %2
store i8* null, i8** %3
br label %22
22: ; preds = %21, %18, %13
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
@.str = [6 x i8] c"VTOC8\00"
@.str.1 = [4 x i8] c"ufs\00"
@.str.2 = [12 x i8] c"/boot/boot1\00"
@.str.3 = [4 x i8] c"zfs\00"
@.str.4 = [14 x i8] c"/boot/zfsboot\00"
define i8* @partcode_path(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %8, %2
br label %12
12: ; preds = %8, %5, %11
%13 = phi i8* [ null, %11 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), %8 ]
ret i8* %13
}