#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 image {
  int dummy;
};
struct derivs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exponential(float *, int *, struct image *, struct derivs *);
int /*<<< orphan*/ gaussian(float *, int *, struct image *, struct derivs *);
int /*<<< orphan*/ king(float *, int *, struct image *, struct derivs *);
int /*<<< orphan*/ moffat(float *, int *, struct image *, struct derivs *);
int /*<<< orphan*/ nuker(float *, int *, struct image *, struct derivs *);
int /*<<< orphan*/ psfunc(float *, int *, struct image *, struct derivs *);
int /*<<< orphan*/ sersic(float *, int *, struct image *, struct derivs *);
int /*<<< orphan*/ sky(float *, int *, struct image *, struct derivs *);
scalar_t__ strncmp(char *, char *, int);
void objselect(float a[], int ia[], char objtype[], struct image *model,
               struct derivs *df) {
  if (strncmp(objtype, "devauc", 6) == 0 || strncmp(objtype, "sersic", 6) == 0)
    sersic(a, ia, model, df);
  if (strncmp(objtype, "nuker", 5) == 0)
    nuker(a, ia, model, df);
  if (strncmp(objtype, "expdisk", 7) == 0)
    exponential(a, ia, model, df);
  if (strncmp(objtype, "moffat", 6) == 0)
    moffat(a, ia, model, df);
  if (strncmp(objtype, "gaussian", 8) == 0)
    gaussian(a, ia, model, df);
  if (strncmp(objtype, "king", 4) == 0)
    king(a, ia, model, df);
  if (strncmp(objtype, "psf", 3) == 0)
    psfunc(a, ia, model, df);
  if (strncmp(objtype, "sky", 3) == 0)
    sky(a, ia, model, df);
}


x86 assembly (clang, -O0):
<objselect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe49(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     11ea <objselect+0x5a>
mov    -0x18(%rbp),%rdi
lea    0xe31(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11ff <objselect+0x6f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1080 <sersic@plt>
mov    -0x18(%rbp),%rdi
lea    0xe04(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1233 <objselect+0xa3>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1090 <nuker@plt>
mov    -0x18(%rbp),%rdi
lea    0xdd6(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1267 <objselect+0xd7>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1060 <exponential@plt>
mov    -0x18(%rbp),%rdi
lea    0xdaa(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    129b <objselect+0x10b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   10a0 <moffat@plt>
mov    -0x18(%rbp),%rdi
lea    0xd7d(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12cf <objselect+0x13f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1070 <gaussian@plt>
mov    -0x18(%rbp),%rdi
lea    0xd52(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1303 <objselect+0x173>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1050 <king@plt>
mov    -0x18(%rbp),%rdi
lea    0xd23(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1337 <objselect+0x1a7>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <psfunc@plt>
mov    -0x18(%rbp),%rdi
lea    0xcf3(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    136b <objselect+0x1db>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   10b0 <sky@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<objselect>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %rsi,%r12
mov    %rdi,%r13
lea    0xe51(%rip),%rsi
mov    %rdx,%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11da <objselect+0x4a>
lea    0xe3f(%rip),%rsi
mov    %rbx,%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    11eb <objselect+0x5b>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1080 <sersic@plt>
lea    0xe1c(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    1215 <objselect+0x85>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1090 <nuker@plt>
lea    0xdf8(%rip),%rsi
mov    %rbx,%rdi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    123f <objselect+0xaf>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1060 <exponential@plt>
lea    0xdd6(%rip),%rsi
mov    %rbx,%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    1269 <objselect+0xd9>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   10a0 <moffat@plt>
lea    0xdb3(%rip),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    1293 <objselect+0x103>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1070 <gaussian@plt>
lea    0xd92(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    12bd <objselect+0x12d>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1050 <king@plt>
lea    0xd6d(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    12e7 <objselect+0x157>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <psfunc@plt>
lea    0xd47(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     130a <objselect+0x17a>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    10b0 <sky@plt>

LLVM IR (-O0):
%struct.image = type { i32 }
%struct.derivs = type { i32 }
@.str = [7 x i8] c"devauc\00"
@.str.1 = [7 x i8] c"sersic\00"
@.str.2 = [6 x i8] c"nuker\00"
@.str.3 = [8 x i8] c"expdisk\00"
@.str.4 = [7 x i8] c"moffat\00"
@.str.5 = [9 x i8] c"gaussian\00"
@.str.6 = [5 x i8] c"king\00"
@.str.7 = [4 x i8] c"psf\00"
@.str.8 = [4 x i8] c"sky\00"
define void @objselect(float* %0, i32* %1, i8* %2, %struct.image* %3, %struct.derivs* %4) {
%6 = alloca float*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca %struct.image*
%10 = alloca %struct.derivs*
store float* %0, float** %6
store i32* %1, i32** %7
store i8* %2, i8** %8
store %struct.image* %3, %struct.image** %9
store %struct.derivs* %4, %struct.derivs** %10
%11 = load i8*, i8** %8
%12 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %5
%15 = load i8*, i8** %8
%16 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %14, %5
%19 = load float*, float** %6
%20 = load i32*, i32** %7
%21 = load %struct.image*, %struct.image** %9
%22 = load %struct.derivs*, %struct.derivs** %10
%23 = call i32 @sersic(float* %19, i32* %20, %struct.image* %21, %struct.derivs* %22)
br label %24
24: ; preds = %18, %14
%25 = load i8*, i8** %8
%26 = call i64 @strncmp(i8* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = load float*, float** %6
%30 = load i32*, i32** %7
%31 = load %struct.image*, %struct.image** %9
%32 = load %struct.derivs*, %struct.derivs** %10
%33 = call i32 @nuker(float* %29, i32* %30, %struct.image* %31, %struct.derivs* %32)
br label %34
34: ; preds = %28, %24
%35 = load i8*, i8** %8
%36 = call i64 @strncmp(i8* %35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %44
38: ; preds = %34
%39 = load float*, float** %6
%40 = load i32*, i32** %7
%41 = load %struct.image*, %struct.image** %9
%42 = load %struct.derivs*, %struct.derivs** %10
%43 = call i32 @exponential(float* %39, i32* %40, %struct.image* %41, %struct.derivs* %42)
br label %44
44: ; preds = %38, %34
%45 = load i8*, i8** %8
%46 = call i64 @strncmp(i8* %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 6)
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %54
48: ; preds = %44
%49 = load float*, float** %6
%50 = load i32*, i32** %7
%51 = load %struct.image*, %struct.image** %9
%52 = load %struct.derivs*, %struct.derivs** %10
%53 = call i32 @moffat(float* %49, i32* %50, %struct.image* %51, %struct.derivs* %52)
br label %54
54: ; preds = %48, %44
%55 = load i8*, i8** %8
%56 = call i64 @strncmp(i8* %55, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %64
58: ; preds = %54
%59 = load float*, float** %6
%60 = load i32*, i32** %7
%61 = load %struct.image*, %struct.image** %9
%62 = load %struct.derivs*, %struct.derivs** %10
%63 = call i32 @gaussian(float* %59, i32* %60, %struct.image* %61, %struct.derivs* %62)
br label %64
64: ; preds = %58, %54
%65 = load i8*, i8** %8
%66 = call i64 @strncmp(i8* %65, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 4)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %74
68: ; preds = %64
%69 = load float*, float** %6
%70 = load i32*, i32** %7
%71 = load %struct.image*, %struct.image** %9
%72 = load %struct.derivs*, %struct.derivs** %10
%73 = call i32 @king(float* %69, i32* %70, %struct.image* %71, %struct.derivs* %72)
br label %74
74: ; preds = %68, %64
%75 = load i8*, i8** %8
%76 = call i64 @strncmp(i8* %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %84
78: ; preds = %74
%79 = load float*, float** %6
%80 = load i32*, i32** %7
%81 = load %struct.image*, %struct.image** %9
%82 = load %struct.derivs*, %struct.derivs** %10
%83 = call i32 @psfunc(float* %79, i32* %80, %struct.image* %81, %struct.derivs* %82)
br label %84
84: ; preds = %78, %74
%85 = load i8*, i8** %8
%86 = call i64 @strncmp(i8* %85, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %94
88: ; preds = %84
%89 = load float*, float** %6
%90 = load i32*, i32** %7
%91 = load %struct.image*, %struct.image** %9
%92 = load %struct.derivs*, %struct.derivs** %10
%93 = call i32 @sky(float* %89, i32* %90, %struct.image* %91, %struct.derivs* %92)
br label %94
94: ; preds = %88, %84
ret void
}

LLVM IR (-O2):
%struct.image = type { i32 }
%struct.derivs = type { i32 }
@.str = [7 x i8] c"devauc\00"
@.str.1 = [7 x i8] c"sersic\00"
@.str.2 = [6 x i8] c"nuker\00"
@.str.3 = [8 x i8] c"expdisk\00"
@.str.4 = [7 x i8] c"moffat\00"
@.str.5 = [9 x i8] c"gaussian\00"
@.str.6 = [5 x i8] c"king\00"
@.str.7 = [4 x i8] c"psf\00"
@.str.8 = [4 x i8] c"sky\00"
define void @objselect(float* %0, i32* %1, i8* %2, %struct.image* %3, %struct.derivs* %4) {
%6 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8, %5
%12 = tail call i32 @sersic(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %13
13: ; preds = %11, %8
%14 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @nuker(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %18
18: ; preds = %16, %13
%19 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = tail call i32 @exponential(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %23
23: ; preds = %21, %18
%24 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 6)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = tail call i32 @moffat(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %28
28: ; preds = %26, %23
%29 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 @gaussian(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %33
33: ; preds = %31, %28
%34 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 4)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = tail call i32 @king(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %38
38: ; preds = %36, %33
%39 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = tail call i32 @psfunc(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %43
43: ; preds = %41, %38
%44 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = tail call i32 @sky(float* %0, i32* %1, %struct.image* %3, %struct.derivs* %4)
br label %48
48: ; preds = %46, %43
ret void
}