#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 */
long atol(char *);
int /*<<< orphan*/ exit(int);
int floor(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, long, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char toupper(char);
void _ngr2en(char *ngr, long *eastings, long *northings) {
  char buff[64];
  char buff2[64];
  char *padding;
  char c1 = toupper(ngr[0]);
  int l1 = c1 - 'A';
  char c2 = toupper(ngr[1]);
  int l2 = c2 - 'A';
  if (l1 > 7)
    l1--;
  if (l2 > 7)
    l2--;
  long e = ((l1 - 2) % 5) * 5 + (l2 % 5);
  long n = (19 - floor(l1 / 5) * 5) - floor(l2 / 5);
  if (e < 0 || e > 6 || n < 0 || n > 12) {
    printf("Invalid NGR in ngr2ew(): %s\n", ngr);
    exit;
  }
  ngr += 2;
  switch (strlen(ngr)) {
  case 0:
    padding = "50000";
    break;
  case 2:
    padding = "5000";
    break;
  case 4:
    padding = "500";
    break;
  case 6:
    padding = "50";
    break;
  case 8:
    padding = "5";
    break;
  case 10:
    padding = "";
    break;
  default:
    printf("invalid length: %s (%d)\n", ngr, strlen(ngr));
    exit(1);
    ;
  }
  memset(buff, 0, 64);
  strncpy(buff, ngr, strlen(ngr) / 2);
  sprintf(buff2, "%ld%s%s", e, buff, padding);
  *eastings = atol(buff2);
  strcpy(buff, ngr + strlen(ngr) / 2);
  sprintf(buff2, "%ld%s%s", n, buff, padding);
  *northings = atol(buff2);
}


x86 assembly (clang, -O0):
<_ngr2en>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1050 <toupper@plt>
mov    %al,-0xa9(%rbp)
movsbl -0xa9(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0xb0(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1050 <toupper@plt>
mov    %al,-0xb1(%rbp)
movsbl -0xb1(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0xb8(%rbp)
cmpl   $0x7,-0xb0(%rbp)
jle    1218 <_ngr2en+0x78>
mov    -0xb0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xb0(%rbp)
cmpl   $0x7,-0xb8(%rbp)
jle    1234 <_ngr2en+0x94>
mov    -0xb8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb0(%rbp),%eax
sub    $0x2,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
imul   $0x5,%edx,%eax
mov    %eax,-0xd0(%rbp)
mov    -0xb8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    -0xd0(%rbp),%eax
add    %edx,%eax
cltq
mov    %rax,-0xc0(%rbp)
mov    -0xb0(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   10c0 <floor@plt>
imul   $0x5,%eax,%ecx
mov    $0x13,%eax
sub    %ecx,%eax
mov    %eax,-0xcc(%rbp)
mov    -0xb8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   10c0 <floor@plt>
mov    %eax,%ecx
mov    -0xcc(%rbp),%eax
sub    %ecx,%eax
cltq
mov    %rax,-0xc8(%rbp)
cmpq   $0x0,-0xc0(%rbp)
jl     12f2 <_ngr2en+0x152>
cmpq   $0x6,-0xc0(%rbp)
06
jg     12f2 <_ngr2en+0x152>
cmpq   $0x0,-0xc8(%rbp)
jl     12f2 <_ngr2en+0x152>
cmpq   $0xc,-0xc8(%rbp)
0c
jle    1304 <_ngr2en+0x164>
mov    -0x8(%rbp),%rsi
lea    0xd2f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    %rcx,-0xd8(%rbp)
sub    $0xa,%eax
ja     13b4 <_ngr2en+0x214>
mov    -0xd8(%rbp),%rax
lea    0xcc7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xd00(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    13e9 <_ngr2en+0x249>
lea    0xcf3(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    13e9 <_ngr2en+0x249>
lea    0xce5(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    13e9 <_ngr2en+0x249>
lea    0xcd6(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    13e9 <_ngr2en+0x249>
lea    0xcc6(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    13e9 <_ngr2en+0x249>
lea    0xccd(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    13e9 <_ngr2en+0x249>
mov    -0x8(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xe0(%rbp),%rsi
mov    %eax,%edx
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x100(%rbp),%rdi
mov    -0xf8(%rbp),%rsi
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
call   1030 <strncpy@plt>
lea    -0xa0(%rbp),%rdi
mov    -0xc0(%rbp),%rdx
lea    -0x60(%rbp),%rcx
mov    -0xa8(%rbp),%r8
lea    0xc21(%rip),%rsi
call   10a0 <sprintf@plt>
lea    -0xa0(%rbp),%rdi
call   1090 <atol@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
lea    -0x60(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xf0(%rbp),%rsi
mov    -0xe8(%rbp),%rdi
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
add    %rax,%rsi
call   1040 <strcpy@plt>
lea    -0xa0(%rbp),%rdi
mov    -0xc8(%rbp),%rdx
lea    -0x60(%rbp),%rcx
mov    -0xa8(%rbp),%r8
lea    0xba7(%rip),%rsi
call   10a0 <sprintf@plt>
lea    -0xa0(%rbp),%rdi
call   1090 <atol@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ngr2en>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rdx,0x18(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,%r15
movsbl (%rdi),%edi
call   1050 <toupper@plt>
movsbl %al,%ebp
movsbl 0x1(%r15),%edi
call   1050 <toupper@plt>
movsbl %al,%ebx
xor    %eax,%eax
cmp    $0x49,%bpl
setge  %al
sub    %eax,%ebp
lea    -0x41(%rbp),%eax
xor    %ecx,%ecx
cmp    $0x49,%bl
setge  %cl
sub    %ecx,%ebx
add    $0xffffffbf,%ebx
lea    -0x43(%rbp),%ecx
movswl %cx,%ecx
imul   $0x6667,%ecx,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x11,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %ebp,%ecx
add    $0xffffffbd,%ecx
lea    (%rcx,%rcx,4),%ecx
movswl %bx,%edx
imul   $0x6667,%edx,%ebp
mov    %ebp,%edx
shr    $0x1f,%edx
sar    $0x11,%ebp
add    %edx,%ebp
lea    0x0(%rbp,%rbp,4),%edx
sub    %edx,%ebx
add    %ecx,%ebx
cwtl
imul   $0x6667,%eax,%edi
mov    %edi,%eax
shr    $0x1f,%eax
sar    $0x11,%edi
add    %eax,%edi
call   10c0 <floor@plt>
lea    (%rax,%rax,4),%r14d
mov    %ebp,%edi
call   10c0 <floor@plt>
add    %r14d,%eax
mov    $0x13,%ebp
sub    %eax,%ebp
cmp    $0x6,%bx
ja     1269 <_ngr2en+0xc9>
test   %ebp,%ebp
js     1269 <_ngr2en+0xc9>
cmp    $0xd,%ebp
jl     127a <_ngr2en+0xda>
lea    0xd90(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x2,%r15
mov    %r15,%rdi
call   1060 <strlen@plt>
cmp    $0xb,%eax
jae    136d <_ngr2en+0x1cd>
mov    $0x555,%ecx
bt     %eax,%ecx
jae    136d <_ngr2en+0x1cd>
cltq
lea    0x2b22(%rip),%rcx
mov    (%rcx,%rax,8),%r12
movslq %ebp,%rax
mov    %rax,0x8(%rsp)
movswq %bx,%r13
lea    0x60(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
sar    %edx
mov    %rbp,%rdi
mov    %r15,%rsi
call   1030 <strncpy@plt>
lea    0xd5d(%rip),%rbx
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
mov    %r12,%r8
call   10a0 <sprintf@plt>
mov    %r14,%rdi
call   1090 <atol@plt>
mov    0x10(%rsp),%rcx
mov    %rax,(%rcx)
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rsi
add    %r15,%rsi
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    0x8(%rsp),%rdx
mov    %rbp,%rcx
mov    %r12,%r8
call   10a0 <sprintf@plt>
mov    %r14,%rdi
call   1090 <atol@plt>
mov    0x18(%rsp),%rcx
mov    %rax,(%rcx)
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15,%rdi
call   1060 <strlen@plt>
lea    0xcb5(%rip),%rdi
mov    %r15,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Invalid NGR in ngr2ew(): %s\0A\00"
@.str.1 = [6 x i8] c"50000\00"
@.str.2 = [5 x i8] c"5000\00"
@.str.3 = [4 x i8] c"500\00"
@.str.4 = [3 x i8] c"50\00"
@.str.5 = [2 x i8] c"5\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [25 x i8] c"invalid length: %s (%d)\0A\00"
@.str.8 = [8 x i8] c"%ld%s%s\00"
define void @_ngr2en(i8* %0, i64* %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [64 x i8]
%8 = alloca [64 x i8]
%9 = alloca i8*
%10 = alloca i8
%11 = alloca i32
%12 = alloca i8
%13 = alloca i32
%14 = alloca i64
%15 = alloca i64
store i8* %0, i8** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = call signext i8 @toupper(i8 signext %18)
store i8 %19, i8* %10
%20 = load i8, i8* %10
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 65
store i32 %22, i32* %11
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = call signext i8 @toupper(i8 signext %25)
store i8 %26, i8* %12
%27 = load i8, i8* %12
%28 = sext i8 %27 to i32
%29 = sub nsw i32 %28, 65
store i32 %29, i32* %13
%30 = load i32, i32* %11
%31 = icmp sgt i32 %30, 7
br i1 %31, label %32, label %35
32: ; preds = %3
%33 = load i32, i32* %11
%34 = add nsw i32 %33, -1
store i32 %34, i32* %11
br label %35
35: ; preds = %32, %3
%36 = load i32, i32* %13
%37 = icmp sgt i32 %36, 7
br i1 %37, label %38, label %41
38: ; preds = %35
%39 = load i32, i32* %13
%40 = add nsw i32 %39, -1
store i32 %40, i32* %13
br label %41
41: ; preds = %38, %35
%42 = load i32, i32* %11
%43 = sub nsw i32 %42, 2
%44 = srem i32 %43, 5
%45 = mul nsw i32 %44, 5
%46 = load i32, i32* %13
%47 = srem i32 %46, 5
%48 = add nsw i32 %45, %47
%49 = sext i32 %48 to i64
store i64 %49, i64* %14
%50 = load i32, i32* %11
%51 = sdiv i32 %50, 5
%52 = call i32 @floor(i32 %51)
%53 = mul nsw i32 %52, 5
%54 = sub nsw i32 19, %53
%55 = load i32, i32* %13
%56 = sdiv i32 %55, 5
%57 = call i32 @floor(i32 %56)
%58 = sub nsw i32 %54, %57
%59 = sext i32 %58 to i64
store i64 %59, i64* %15
%60 = load i64, i64* %14
%61 = icmp slt i64 %60, 0
br i1 %61, label %71, label %62
62: ; preds = %41
%63 = load i64, i64* %14
%64 = icmp sgt i64 %63, 6
br i1 %64, label %71, label %65
65: ; preds = %62
%66 = load i64, i64* %15
%67 = icmp slt i64 %66, 0
br i1 %67, label %71, label %68
68: ; preds = %65
%69 = load i64, i64* %15
%70 = icmp sgt i64 %69, 12
br i1 %70, label %71, label %74
71: ; preds = %68, %65, %62, %41
%72 = load i8*, i8** %4
%73 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %72)
br label %74
74: ; preds = %71, %68
%75 = load i8*, i8** %4
%76 = getelementptr inbounds i8, i8* %75, i64 2
store i8* %76, i8** %4
%77 = load i8*, i8** %4
%78 = call i32 @strlen(i8* %77)
switch i32 %78, label %85 [
i32 0, label %79
i32 2, label %80
i32 4, label %81
i32 6, label %82
i32 8, label %83
i32 10, label %84
]
79: ; preds = %74
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %9
br label %91
80: ; preds = %74
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %9
br label %91
81: ; preds = %74
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %9
br label %91
82: ; preds = %74
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %9
br label %91
83: ; preds = %74
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8** %9
br label %91
84: ; preds = %74
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8** %9
br label %91
85: ; preds = %74
%86 = load i8*, i8** %4
%87 = load i8*, i8** %4
%88 = call i32 @strlen(i8* %87)
%89 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %86, i32 %88)
%90 = call i32 @exit(i32 1)
unreachable
91: ; preds = %84, %83, %82, %81, %80, %79
%92 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%93 = call i32 @memset(i8* %92, i32 0, i32 64)
%94 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%95 = load i8*, i8** %4
%96 = load i8*, i8** %4
%97 = call i32 @strlen(i8* %96)
%98 = sdiv i32 %97, 2
%99 = call i32 @strncpy(i8* %94, i8* %95, i32 %98)
%100 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%101 = load i64, i64* %14
%102 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%103 = load i8*, i8** %9
%104 = call i32 @sprintf(i8* %100, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i64 %101, i8* %102, i8* %103)
%105 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%106 = call i64 @atol(i8* %105)
%107 = load i64*, i64** %5
store i64 %106, i64* %107
%108 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%109 = load i8*, i8** %4
%110 = load i8*, i8** %4
%111 = call i32 @strlen(i8* %110)
%112 = sdiv i32 %111, 2
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8, i8* %109, i64 %113
%115 = call i32 @strcpy(i8* %108, i8* %114)
%116 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%117 = load i64, i64* %15
%118 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%119 = load i8*, i8** %9
%120 = call i32 @sprintf(i8* %116, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i64 %117, i8* %118, i8* %119)
%121 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%122 = call i64 @atol(i8* %121)
%123 = load i64*, i64** %6
store i64 %122, i64* %123
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Invalid NGR in ngr2ew(): %s\0A\00"
@.str.1 = [6 x i8] c"50000\00"
@.str.2 = [5 x i8] c"5000\00"
@.str.3 = [4 x i8] c"500\00"
@.str.4 = [3 x i8] c"50\00"
@.str.5 = [2 x i8] c"5\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [25 x i8] c"invalid length: %s (%d)\0A\00"
@.str.8 = [8 x i8] c"%ld%s%s\00"
@switch.table._ngr2en = [11 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)]
define void @_ngr2en(i8* %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
%4 = alloca [64 x i8]
%5 = alloca [64 x i8]
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%8 = load i8, i8* %0
%9 = tail call signext i8 @toupper(i8 signext %8)
%10 = sext i8 %9 to i16
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = tail call signext i8 @toupper(i8 signext %12)
%14 = sext i8 %13 to i16
%15 = icmp sgt i8 %9, 72
%16 = select i1 %15, i16 -66, i16 -65
%17 = add nsw i16 %16, %10
%18 = icmp sgt i8 %13, 72
%19 = select i1 %18, i16 -66, i16 -65
%20 = add nsw i16 %19, %14
%21 = add nsw i16 %17, -2
%22 = srem i16 %21, 5
%23 = mul nsw i16 %22, 5
%24 = srem i16 %20, 5
%25 = add nsw i16 %23, %24
%26 = sdiv i16 %17, 5
%27 = sext i16 %26 to i32
%28 = tail call i32 @floor(i32 %27)
%29 = mul i32 %28, -5
%30 = add i32 %29, 19
%31 = sdiv i16 %20, 5
%32 = sext i16 %31 to i32
%33 = tail call i32 @floor(i32 %32)
%34 = sub i32 %30, %33
%35 = icmp ugt i16 %25, 6
%36 = icmp slt i32 %34, 0
%37 = select i1 %35, i1 true, i1 %36
%38 = icmp sgt i32 %34, 12
%39 = select i1 %37, i1 true, i1 %38
br i1 %39, label %40, label %42
40: ; preds = %3
%41 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %42
42: ; preds = %3, %40
%43 = getelementptr inbounds i8, i8* %0, i64 2
%44 = tail call i32 @strlen(i8* %43)
%45 = icmp ult i32 %44, 11
br i1 %45, label %50, label %46
46: ; preds = %50, %42
%47 = tail call i32 @strlen(i8* %43)
%48 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %43, i32 %47)
%49 = tail call i32 @exit(i32 1)
unreachable
50: ; preds = %42
%51 = trunc i32 %44 to i16
%52 = lshr i16 1365, %51
%53 = and i16 %52, 1
%54 = icmp eq i16 %53, 0
br i1 %54, label %46, label %55
55: ; preds = %50
%56 = sext i32 %44 to i64
%57 = getelementptr inbounds [11 x i8*], [11 x i8*]* @switch.table._ngr2en, i64 0, i64 %56
%58 = load i8*, i8** %57
%59 = sext i32 %34 to i64
%60 = sext i16 %25 to i64
%61 = call i32 @memset(i8* %6, i32 0, i32 64)
%62 = call i32 @strlen(i8* %43)
%63 = sdiv i32 %62, 2
%64 = call i32 @strncpy(i8* %6, i8* %43, i32 %63)
%65 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i64 %60, i8* %6, i8* %58)
%66 = call i64 @atol(i8* %7)
store i64 %66, i64* %1
%67 = call i32 @strlen(i8* %43)
%68 = sdiv i32 %67, 2
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %43, i64 %69
%71 = call i32 @strcpy(i8* %6, i8* %70)
%72 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i64 %59, i8* %6, i8* %58)
%73 = call i64 @atol(i8* %7)
store i64 %73, i64* %2
ret void
}