#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*/ drawctext(struct raster *, int, int, char *, int, int, int,
                             int);
int /*<<< orphan*/ drawdot(struct raster *, int, int, int, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ hgtmapcoord(struct hgt *, int, int, int, int, int, int,
                               int *, int *);
void marklocationdegree(struct raster *ra, struct hgt *hgt, int ng, int nf,
                        int ns, int eg, int ef, int es, char *name, int size) {
  int x, y;
  hgtmapcoord(hgt, ng, nf, ns, eg, ef, es, &x, &y);
  drawdot(ra, x, y, 255, 0, 0);
  drawctext(ra, x, y + 5, name, size, 100, 100, 100);
}


x86 assembly (clang, -O0):
<marklocationdegree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    0x10(%rbp),%r9d
mov    0x18(%rbp),%r11d
lea    -0x24(%rbp),%r10
lea    -0x28(%rbp),%rax
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1050 <hgtmapcoord@plt>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    $0xff,%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <drawdot@plt>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
add    $0x5,%edx
mov    0x20(%rbp),%rcx
mov    0x28(%rbp),%r8d
mov    $0x64,%r9d
movl   $0x64,(%rsp)
movl   $0x64,0x8(%rsp)
call   1040 <drawctext@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<marklocationdegree>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9d,%eax
mov    %rdi,%rbx
mov    0x40(%rsp),%r14
mov    0x48(%rsp),%r15d
mov    0x30(%rsp),%r9d
mov    0x38(%rsp),%r10d
sub    $0x8,%rsp
lea    0x8(%rsp),%rbp
lea    0xc(%rsp),%r11
mov    %rsi,%rdi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8d,%ecx
mov    %eax,%r8d
push   %rbp
push   %r11
push   %r10
call   1050 <hgtmapcoord@plt>
add    $0x20,%rsp
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
mov    %rbx,%rdi
mov    $0xff,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <drawdot@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
add    $0x5,%edx
mov    %rbx,%rdi
mov    %r14,%rcx
mov    %r15d,%r8d
mov    $0x64,%r9d
push   $0x64
push   $0x64
call   1040 <drawctext@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.raster = type { i32 }
%struct.hgt = type { i32 }
define void @marklocationdegree(%struct.raster* %0, %struct.hgt* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9) {
%11 = alloca %struct.raster*
%12 = alloca %struct.hgt*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store %struct.raster* %0, %struct.raster** %11
store %struct.hgt* %1, %struct.hgt** %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i8* %8, i8** %19
store i32 %9, i32* %20
%23 = load %struct.hgt*, %struct.hgt** %12
%24 = load i32, i32* %13
%25 = load i32, i32* %14
%26 = load i32, i32* %15
%27 = load i32, i32* %16
%28 = load i32, i32* %17
%29 = load i32, i32* %18
%30 = call i32 @hgtmapcoord(%struct.hgt* %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32* %21, i32* %22)
%31 = load %struct.raster*, %struct.raster** %11
%32 = load i32, i32* %21
%33 = load i32, i32* %22
%34 = call i32 @drawdot(%struct.raster* %31, i32 %32, i32 %33, i32 255, i32 0, i32 0)
%35 = load %struct.raster*, %struct.raster** %11
%36 = load i32, i32* %21
%37 = load i32, i32* %22
%38 = add nsw i32 %37, 5
%39 = load i8*, i8** %19
%40 = load i32, i32* %20
%41 = call i32 @drawctext(%struct.raster* %35, i32 %36, i32 %38, i8* %39, i32 %40, i32 100, i32 100, i32 100)
ret void
}

LLVM IR (-O2):
%struct.raster = type { i32 }
%struct.hgt = type { i32 }
define void @marklocationdegree(%struct.raster* %0, %struct.hgt* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9) {
%11 = alloca i32
%12 = alloca i32
%13 = bitcast i32* %11 to i8*
%14 = bitcast i32* %12 to i8*
%15 = call i32 @hgtmapcoord(%struct.hgt* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %11, i32* %12)
%16 = load i32, i32* %11
%17 = load i32, i32* %12
%18 = call i32 @drawdot(%struct.raster* %0, i32 %16, i32 %17, i32 255, i32 0, i32 0)
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = add nsw i32 %20, 5
%22 = call i32 @drawctext(%struct.raster* %0, i32 %19, i32 %21, i8* %8, i32 %9, i32 100, i32 100, i32 100)
ret void
}