#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 /*<<< orphan*/ strcasecmp(char *, char *);
int location(char *locstr, double *latitude, double *longitude,
             double *long_std) {
  if (!strcasecmp(locstr, "ifu")) {
    *latitude = 47.48;
    *longitude = -11.07;
    *long_std = -15.00;
    return 0;
  }
  if (!strcasecmp(locstr, "dlrop")) {
    *latitude = 48.088;
    *longitude = -11.280;
    *long_std = -15.000;
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<location>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xef5(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    117d <location+0x6d>
mov    -0x18(%rbp),%rax
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xeab(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0xe93(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    11d9 <location+0xc9>
mov    -0x10(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11d2 <location+0xc2>
mov    -0x18(%rbp),%rax
movsd  0xe7e(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xe66(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0xe3e(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    11d9 <location+0xc9>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<location>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xef5(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1160 <location+0x50>
lea    0xee9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
test   %ecx,%ecx
jne    118a <location+0x7a>
movsd  0xeba(%rip),%xmm0
movsd  0xeba(%rip),%xmm1
jmp    1170 <location+0x60>
movsd  0xe98(%rip),%xmm0
movsd  0xe98(%rip),%xmm1
movsd  %xmm1,(%r12)
movsd  %xmm0,(%r15)
movabs $0xc02e000000000000,%rax
mov    %rax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ifu\00"
@.str.1 = [6 x i8] c"dlrop\00"
define i32 @location(i8* %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
store i8* %0, i8** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
%10 = load i8*, i8** %6
%11 = call i32 @strcasecmp(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %17, label %13
13: ; preds = %4
%14 = load double*, double** %7
store double 4.748000e+01, double* %14
%15 = load double*, double** %8
store double -1.107000e+01, double* %15
%16 = load double*, double** %9
store double -1.500000e+01, double* %16
store i32 0, i32* %5
br label %26
17: ; preds = %4
%18 = load i8*, i8** %6
%19 = call i32 @strcasecmp(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %17
%22 = load double*, double** %7
store double 4.808800e+01, double* %22
%23 = load double*, double** %8
store double -1.128000e+01, double* %23
%24 = load double*, double** %9
store double -1.500000e+01, double* %24
store i32 0, i32* %5
br label %26
25: ; preds = %17
store i32 -1, i32* %5
br label %26
26: ; preds = %25, %21, %13
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
@.str = [4 x i8] c"ifu\00"
@.str.1 = [6 x i8] c"dlrop\00"
define i32 @location(i8* nocapture %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7, %4
%11 = phi double [ 4.748000e+01, %4 ], [ 4.808800e+01, %7 ]
%12 = phi double [ -1.107000e+01, %4 ], [ -1.128000e+01, %7 ]
store double %11, double* %1
store double %12, double* %2
store double -1.500000e+01, double* %3
br label %13
13: ; preds = %10, %7
%14 = phi i32 [ -1, %7 ], [ 0, %10 ]
ret i32 %14
}