#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 supertype {
  int dummy;
};
struct mdinfo {
  int dummy;
};

/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int update_super_ddf(struct supertype *st, struct mdinfo *info, char *update,
                     char *devname, int verbose, int uuid_set, char *homehost) {
  int rv = 0;
  if (strcmp(update, "grow") == 0) {
  } else if (strcmp(update, "resync") == 0) {
  } else if (strcmp(update, "homehost") == 0) {
    rv = -1;
  } else if (strcmp(update, "name") == 0) {
    rv = -1;
  } else if (strcmp(update, "_reshape_progress") == 0) {
  } else if (strcmp(update, "assemble") == 0) {
    rv = 0;
  } else
    rv = -1;
  return rv;
}


x86 assembly (clang, -O0):
<update_super_ddf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115a <update_super_ddf+0x4a>
jmp    122a <update_super_ddf+0x11a>
mov    -0x18(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1179 <update_super_ddf+0x69>
jmp    1225 <update_super_ddf+0x115>
mov    -0x18(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    119f <update_super_ddf+0x8f>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1220 <update_super_ddf+0x110>
mov    -0x18(%rbp),%rdi
lea    0xe6b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11c5 <update_super_ddf+0xb5>
movl   $0xffffffff,-0x2c(%rbp)
jmp    121b <update_super_ddf+0x10b>
mov    -0x18(%rbp),%rdi
lea    0xe4a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11e4 <update_super_ddf+0xd4>
jmp    1216 <update_super_ddf+0x106>
mov    -0x18(%rbp),%rdi
lea    0xe3d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    120a <update_super_ddf+0xfa>
movl   $0x0,-0x2c(%rbp)
jmp    1211 <update_super_ddf+0x101>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1216 <update_super_ddf+0x106>
jmp    121b <update_super_ddf+0x10b>
jmp    1220 <update_super_ddf+0x110>
jmp    1225 <update_super_ddf+0x115>
jmp    122a <update_super_ddf+0x11a>
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_super_ddf>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
lea    0xee3(%rip),%rsi
mov    %rdx,%rdi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     119a <update_super_ddf+0x8a>
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     119a <update_super_ddf+0x8a>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0xffffffff,%ebp
test   %rax,%rax
je     119a <update_super_ddf+0x8a>
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     119a <update_super_ddf+0x8a>
lea    0xea6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x0,%ebp
test   %rax,%rax
je     119a <update_super_ddf+0x8a>
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
neg    %rax
sbb    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.supertype = type { i32 }
%struct.mdinfo = type { i32 }
@.str = [5 x i8] c"grow\00"
@.str.1 = [7 x i8] c"resync\00"
@.str.2 = [9 x i8] c"homehost\00"
@.str.3 = [5 x i8] c"name\00"
@.str.4 = [18 x i8] c"_reshape_progress\00"
@.str.5 = [9 x i8] c"assemble\00"
define i32 @update_super_ddf(%struct.supertype* %0, %struct.mdinfo* %1, i8* %2, i8* %3, i32 %4, i32 %5, i8* %6) {
%8 = alloca %struct.supertype*
%9 = alloca %struct.mdinfo*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
store %struct.supertype* %0, %struct.supertype** %8
store %struct.mdinfo* %1, %struct.mdinfo** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i8* %6, i8** %14
store i32 0, i32* %15
%16 = load i8*, i8** %10
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %7
br label %51
20: ; preds = %7
%21 = load i8*, i8** %10
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %20
br label %50
25: ; preds = %20
%26 = load i8*, i8** %10
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 -1, i32* %15
br label %49
30: ; preds = %25
%31 = load i8*, i8** %10
%32 = call i64 @strcmp(i8* %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 -1, i32* %15
br label %48
35: ; preds = %30
%36 = load i8*, i8** %10
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %35
br label %47
40: ; preds = %35
%41 = load i8*, i8** %10
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %45
44: ; preds = %40
store i32 0, i32* %15
br label %46
45: ; preds = %40
store i32 -1, i32* %15
br label %46
46: ; preds = %45, %44
br label %47
47: ; preds = %46, %39
br label %48
48: ; preds = %47, %34
br label %49
49: ; preds = %48, %29
br label %50
50: ; preds = %49, %24
br label %51
51: ; preds = %50, %19
%52 = load i32, i32* %15
ret i32 %52
}

LLVM IR (-O2):
%struct.supertype = type { i32 }
%struct.mdinfo = type { i32 }
@.str = [5 x i8] c"grow\00"
@.str.1 = [7 x i8] c"resync\00"
@.str.2 = [9 x i8] c"homehost\00"
@.str.3 = [5 x i8] c"name\00"
@.str.4 = [18 x i8] c"_reshape_progress\00"
@.str.5 = [9 x i8] c"assemble\00"
define i32 @update_super_ddf(%struct.supertype* nocapture readnone %0, %struct.mdinfo* nocapture readnone %1, i8* %2, i8* nocapture readnone %3, i32 %4, i32 %5, i8* nocapture readnone %6) {
%8 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %26, label %10
10: ; preds = %7
%11 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %26, label %13
13: ; preds = %10
%14 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %26, label %16
16: ; preds = %13
%17 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %26, label %19
19: ; preds = %16
%20 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %19
%23 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%24 = icmp ne i64 %23, 0
%25 = sext i1 %24 to i32
br label %26
26: ; preds = %22, %16, %13, %10, %19, %7
%27 = phi i32 [ 0, %7 ], [ 0, %10 ], [ 0, %19 ], [ -1, %13 ], [ -1, %16 ], [ %25, %22 ]
ret i32 %27
}