#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 raster {
  int dummy;
};
struct hgt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ decimal2degree(double, int *, int *, int *);
int /*<<< orphan*/ marklocationdegree(struct raster *, struct hgt *, int, int,
                                      int, int, int, int, char *, int);
void marklocation(struct raster *ra, struct hgt *hgt, double lat, double lon,
                  char *name, int size) {
  int ng, nf, ns, eg, ef, es;
  decimal2degree(lat, &ng, &nf, &ns);
  decimal2degree(lon, &eg, &ef, &es);
  marklocationdegree(ra, hgt, ng, nf, ns, eg, ef, es, name, size);
}


x86 assembly (clang, -O0):
<marklocation>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x68,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %ecx,-0x34(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    -0x38(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1030 <decimal2degree@plt>
movsd  -0x28(%rbp),%xmm0
lea    -0x44(%rbp),%rdi
lea    -0x48(%rbp),%rsi
lea    -0x4c(%rbp),%rdx
call   1030 <decimal2degree@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x38(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x40(%rbp),%r8d
mov    -0x44(%rbp),%r9d
mov    -0x48(%rbp),%ebx
mov    -0x4c(%rbp),%r11d
mov    -0x30(%rbp),%r10
mov    -0x34(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1040 <marklocationdegree@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<marklocation>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %ecx,%r15d
mov    %rdx,%r14
movsd  %xmm1,0x18(%rsp)
mov    %rsi,%r12
mov    %rdi,%r13
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <decimal2degree@plt>
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
movsd  0x18(%rsp),%xmm0
call   1030 <decimal2degree@plt>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x8(%rsp),%r9d
mov    0x4(%rsp),%eax
mov    (%rsp),%ebx
mov    %r13,%rdi
mov    %r12,%rsi
push   %r15
push   %r14
push   %rbx
push   %rax
call   1040 <marklocationdegree@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.raster = type { i32 }
%struct.hgt = type { i32 }
define void @marklocation(%struct.raster* %0, %struct.hgt* %1, double %2, double %3, i8* %4, i32 %5) {
%7 = alloca %struct.raster*
%8 = alloca %struct.hgt*
%9 = alloca double
%10 = alloca double
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store %struct.raster* %0, %struct.raster** %7
store %struct.hgt* %1, %struct.hgt** %8
store double %2, double* %9
store double %3, double* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%19 = load double, double* %9
%20 = call i32 @decimal2degree(double %19, i32* %13, i32* %14, i32* %15)
%21 = load double, double* %10
%22 = call i32 @decimal2degree(double %21, i32* %16, i32* %17, i32* %18)
%23 = load %struct.raster*, %struct.raster** %7
%24 = load %struct.hgt*, %struct.hgt** %8
%25 = load i32, i32* %13
%26 = load i32, i32* %14
%27 = load i32, i32* %15
%28 = load i32, i32* %16
%29 = load i32, i32* %17
%30 = load i32, i32* %18
%31 = load i8*, i8** %11
%32 = load i32, i32* %12
%33 = call i32 @marklocationdegree(%struct.raster* %23, %struct.hgt* %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30, i8* %31, i32 %32)
ret void
}

LLVM IR (-O2):
%struct.raster = type { i32 }
%struct.hgt = type { i32 }
define void @marklocation(%struct.raster* %0, %struct.hgt* %1, double %2, double %3, i8* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = bitcast i32* %7 to i8*
%14 = bitcast i32* %8 to i8*
%15 = bitcast i32* %9 to i8*
%16 = bitcast i32* %10 to i8*
%17 = bitcast i32* %11 to i8*
%18 = bitcast i32* %12 to i8*
%19 = call i32 @decimal2degree(double %2, i32* %7, i32* %8, i32* %9)
%20 = call i32 @decimal2degree(double %3, i32* %10, i32* %11, i32* %12)
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = load i32, i32* %11
%26 = load i32, i32* %12
%27 = call i32 @marklocationdegree(%struct.raster* %0, %struct.hgt* %1, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i8* %4, i32 %5)
ret void
}