#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 sift_scalespace {
  int dummy;
};
typedef struct sift_scalespace *sift_parameters;
typedef struct sift_scalespace sift_keypoints;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int FILENAME_MAX;
int /*<<< orphan*/ fatal_error(char *, char *);
float *io_png_read_f32_gray(char *, size_t *, size_t *);
int parse_options(int, char **, struct sift_scalespace **, int *, int *, char *,
                  char *);
int /*<<< orphan*/
print_sift_scalespace_gray_nearestneighbor(struct sift_scalespace *, char *);
int /*<<< orphan*/ print_sift_scalespace_rgb(struct sift_scalespace *, char *);
struct sift_scalespace *sift_anatomy(float *, size_t, size_t,
                                     struct sift_scalespace **,
                                     struct sift_scalespace **,
                                     struct sift_scalespace **);
struct sift_scalespace **sift_assign_default_parameters();
int /*<<< orphan*/ sift_free_keypoints(struct sift_scalespace *);
int /*<<< orphan*/ sift_free_scalespace(struct sift_scalespace *);
struct sift_scalespace *sift_malloc_keypoints();
int /*<<< orphan*/ sift_print_keypoints(struct sift_scalespace *, int);
int /*<<< orphan*/ sift_save_keypoints(struct sift_scalespace *, char *,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ xfree(float *);
struct sift_scalespace **xmalloc(int);
int main(int argc, char **argv) {
  struct sift_parameters *p = sift_assign_default_parameters();
  int flagverb_keys = 0;
  int flagverb_ss = 0;
  char label_ss[256];
  char label_keys[256];
  strcpy(label_ss, "extra");
  strcpy(label_keys, "extra");
  int res = parse_options(argc, argv, p, &flagverb_keys, &flagverb_ss,
                          label_keys, label_ss);
  if (res == EXIT_FAILURE)
    return EXIT_FAILURE;
  size_t w, h;
  float *x = io_png_read_f32_gray(argv[1], &w, &h);
  if (!x)
    fatal_error("File \"%s\" not found.", argv[1]);
  for (int i = 0; i < w * h; i++)
    x[i] /= 256.0;
  struct sift_keypoints **kk = xmalloc(6 * sizeof(struct sift_keypoints *));
  for (int i = 0; i < 6; i++)
    kk[i] = sift_malloc_keypoints();
  struct sift_scalespace **ss = xmalloc(4 * sizeof(struct sift_scalespace *));
  struct sift_keypoints *k = sift_anatomy(x, w, h, p, ss, kk);
  int flag = flagverb_keys + 1;
  sift_print_keypoints(k, flag);
  char name[FILENAME_MAX];
  if (flagverb_keys == 1) {
    sprintf(name, "extra_NES_%s.txt", label_keys);
    sift_save_keypoints(kk[0], name, 0);
    sprintf(name, "extra_DoGSoftThresh_%s.txt", label_keys);
    sift_save_keypoints(kk[1], name, 0);
    sprintf(name, "extra_ExtrInterp_%s.txt", label_keys);
    sift_save_keypoints(kk[2], name, 0);
    sprintf(name, "extra_DoGThresh_%s.txt", label_keys);
    sift_save_keypoints(kk[3], name, 0);
    sprintf(name, "extra_OnEdgeResp_%s.txt", label_keys);
    sift_save_keypoints(kk[4], name, 0);
    sprintf(name, "extra_FarFromBorder_%s.txt", label_keys);
    sift_save_keypoints(kk[5], name, 0);
  }
  if (flagverb_ss == 1) {
    sprintf(name, "scalespace_%s", label_ss);
    print_sift_scalespace_gray_nearestneighbor(ss[0], name);
    sprintf(name, "DoG_%s", label_ss);
    print_sift_scalespace_rgb(ss[1], name);
  }
  xfree(x);
  xfree(p);
  sift_free_keypoints(k);
  for (int i = 0; i < 6; i++) {
    sift_free_keypoints(kk[i]);
  }
  xfree(kk);
  for (int i = 0; i < 4; i++) {
    sift_free_scalespace(ss[i]);
  }
  xfree(ss);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x290,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   10f0 <sift_assign_default_parameters@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
lea    0xdc8(%rip),%rsi
call   1050 <strcpy@plt>
lea    -0x220(%rbp),%rdi
lea    0xdb5(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x220(%rbp),%r9
lea    -0x120(%rbp),%rax
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1080 <parse_options@plt>
add    $0x10,%rsp
mov    %eax,-0x224(%rbp)
mov    -0x224(%rbp),%eax
mov    0x2d3b(%rip),%rcx
cmp    (%rcx),%eax
jne    12b6 <main+0xb6>
mov    0x2d2c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    16cb <main+0x4cb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x230(%rbp),%rsi
lea    -0x238(%rbp),%rdx
call   1100 <io_png_read_f32_gray@plt>
mov    %rax,-0x240(%rbp)
cmpq   $0x0,-0x240(%rbp)
jne    12fa <main+0xfa>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd19(%rip),%rdi
call   10e0 <fatal_error@plt>
movl   $0x0,-0x244(%rbp)
movslq -0x244(%rbp),%rax
mov    -0x230(%rbp),%rcx
imul   -0x238(%rbp),%rcx
ff
cmp    %rcx,%rax
jae    1363 <main+0x163>
mov    -0x240(%rbp),%rax
movslq -0x244(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcbe(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x244(%rbp)
jmp    1304 <main+0x104>
mov    $0x30,%edi
call   10b0 <xmalloc@plt>
mov    %rax,-0x250(%rbp)
movl   $0x0,-0x254(%rbp)
cmpl   $0x6,-0x254(%rbp)
jge    13bb <main+0x1bb>
mov    $0x0,%al
call   1030 <sift_malloc_keypoints@plt>
mov    %rax,%rdx
mov    -0x250(%rbp),%rax
movslq -0x254(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x254(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x254(%rbp)
jmp    137e <main+0x17e>
mov    $0x20,%edi
call   10b0 <xmalloc@plt>
mov    %rax,-0x260(%rbp)
mov    -0x240(%rbp),%rdi
mov    -0x230(%rbp),%rsi
mov    -0x238(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x260(%rbp),%r8
mov    -0x250(%rbp),%r9
call   1090 <sift_anatomy@plt>
mov    %rax,-0x268(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x26c(%rbp)
mov    -0x268(%rbp),%rdi
mov    -0x26c(%rbp),%esi
call   1040 <sift_print_keypoints@plt>
mov    0x2bc4(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x278(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x290(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x280(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    158d <main+0x38d>
mov    -0x290(%rbp),%rdi
lea    -0x220(%rbp),%rdx
lea    0xbb2(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x250(%rbp),%rax
mov    (%rax),%rdi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
mov    -0x290(%rbp),%rdi
lea    -0x220(%rbp),%rdx
lea    0xb91(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x250(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
mov    -0x290(%rbp),%rdi
lea    -0x220(%rbp),%rdx
lea    0xb79(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x250(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
mov    -0x290(%rbp),%rdi
lea    -0x220(%rbp),%rdx
lea    0xb5e(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x250(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
mov    -0x290(%rbp),%rdi
lea    -0x220(%rbp),%rdx
lea    0xb42(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x250(%rbp),%rax
mov    0x20(%rax),%rdi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
mov    -0x290(%rbp),%rdi
lea    -0x220(%rbp),%rdx
lea    0xb27(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x250(%rbp),%rax
mov    0x28(%rax),%rdi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
cmpl   $0x1,-0x20(%rbp)
jne    15f8 <main+0x3f8>
mov    -0x290(%rbp),%rdi
lea    -0x120(%rbp),%rdx
lea    0xb05(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x260(%rbp),%rax
mov    (%rax),%rdi
call   10d0 <print_sift_scalespace_gray_nearestneighbor@plt>
mov    -0x290(%rbp),%rdi
lea    -0x120(%rbp),%rdx
lea    0xae3(%rip),%rsi
call   1120 <sprintf@plt>
mov    -0x290(%rbp),%rsi
mov    -0x260(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <print_sift_scalespace_rgb@plt>
mov    -0x240(%rbp),%rdi
call   10a0 <xfree@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <xfree@plt>
mov    -0x268(%rbp),%rdi
call   10c0 <sift_free_keypoints@plt>
movl   $0x0,-0x284(%rbp)
cmpl   $0x6,-0x284(%rbp)
jge    165b <main+0x45b>
mov    -0x250(%rbp),%rax
movslq -0x284(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    -0x284(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x284(%rbp)
jmp    1623 <main+0x423>
mov    -0x250(%rbp),%rdi
call   10a0 <xfree@plt>
movl   $0x0,-0x288(%rbp)
cmpl   $0x4,-0x288(%rbp)
jge    16a9 <main+0x4a9>
mov    -0x260(%rbp),%rax
movslq -0x288(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <sift_free_scalespace@plt>
mov    -0x288(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x288(%rbp)
jmp    1671 <main+0x471>
mov    -0x260(%rbp),%rdi
call   10a0 <xfree@plt>
mov    0x2914(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x278(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x238,%rsp
mov    %rsi,%r12
mov    %edi,%r15d
xor    %eax,%eax
call   10f0 <sift_assign_default_parameters@plt>
mov    %rax,%r14
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
lea    0xddb(%rip),%rbx
lea    -0x160(%rbp),%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
lea    -0x260(%rbp),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
sub    $0x8,%rsp
lea    -0x2c(%rbp),%rcx
lea    -0x30(%rbp),%r8
mov    %r15d,%edi
mov    %r12,%rsi
mov    %r14,-0x38(%rbp)
mov    %r14,%rdx
mov    %r13,%r9
lea    -0x160(%rbp),%rax
push   %rax
call   1080 <parse_options@plt>
add    $0x10,%rsp
mov    0x2d4a(%rip),%rcx
cmp    (%rcx),%eax
je     15e9 <main+0x3e9>
mov    0x8(%r12),%rdi
lea    -0x48(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1100 <io_png_read_f32_gray@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    12c1 <main+0xc1>
mov    0x8(%r12),%rsi
lea    0xd5e(%rip),%rdi
call   10e0 <fatal_error@plt>
mov    -0x40(%rbp),%rax
imul   -0x48(%rbp),%rax
test   %rax,%rax
je     1397 <main+0x197>
cmp    $0x8,%rax
jae    12e0 <main+0xe0>
xor    %ecx,%ecx
jmp    1376 <main+0x176>
mov    %rax,%rcx
and    $0xfffffffffffffff8,%rcx
lea    -0x8(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     15f8 <main+0x3f8>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movaps 0xcf1(%rip),%xmm0
nop
movups (%rbx,%rdx,4),%xmm1
movups 0x10(%rbx,%rdx,4),%xmm2
movups 0x20(%rbx,%rdx,4),%xmm3
movups 0x30(%rbx,%rdx,4),%xmm4
mulps  %xmm0,%xmm1
mulps  %xmm0,%xmm2
movups %xmm1,(%rbx,%rdx,4)
movups %xmm2,0x10(%rbx,%rdx,4)
mulps  %xmm0,%xmm3
mulps  %xmm0,%xmm4
movups %xmm3,0x20(%rbx,%rdx,4)
movups %xmm4,0x30(%rbx,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1310 <main+0x110>
test   $0x1,%sil
je     1371 <main+0x171>
movups (%rbx,%rdx,4),%xmm0
movups 0x10(%rbx,%rdx,4),%xmm1
movaps 0xc9e(%rip),%xmm2
mulps  %xmm2,%xmm0
mulps  %xmm2,%xmm1
movups %xmm0,(%rbx,%rdx,4)
movups %xmm1,0x10(%rbx,%rdx,4)
cmp    %rcx,%rax
je     1397 <main+0x197>
movss  0xc92(%rip),%xmm0
xchg   %ax,%ax
movss  (%rbx,%rcx,4),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rbx,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1380 <main+0x180>
mov    $0x30,%edi
call   10b0 <xmalloc@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1030 <sift_malloc_keypoints@plt>
mov    %rax,(%r15)
xor    %eax,%eax
call   1030 <sift_malloc_keypoints@plt>
mov    %rax,0x8(%r15)
xor    %eax,%eax
call   1030 <sift_malloc_keypoints@plt>
mov    %rax,0x10(%r15)
xor    %eax,%eax
call   1030 <sift_malloc_keypoints@plt>
mov    %rax,0x18(%r15)
xor    %eax,%eax
call   1030 <sift_malloc_keypoints@plt>
mov    %rax,0x20(%r15)
xor    %eax,%eax
call   1030 <sift_malloc_keypoints@plt>
mov    %rax,0x28(%r15)
mov    $0x20,%edi
call   10b0 <xmalloc@plt>
mov    %rax,%r12
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    %rbx,%rdi
mov    -0x38(%rbp),%rcx
mov    %rax,%r8
mov    %r15,%r9
call   1090 <sift_anatomy@plt>
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
mov    %rax,-0x50(%rbp)
mov    %rax,%rdi
call   1040 <sift_print_keypoints@plt>
mov    %rsp,-0x58(%rbp)
mov    0x2bbf(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%r14
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
cmpl   $0x1,-0x2c(%rbp)
jne    150c <main+0x30c>
lea    0xbe2(%rip),%rsi
lea    -0x260(%rbp),%r13
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    (%r15),%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
lea    0xbcd(%rip),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    0x8(%r15),%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
lea    0xbc8(%rip),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    0x10(%r15),%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
lea    0xbc0(%rip),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    0x18(%r15),%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
lea    0xbb7(%rip),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    0x20(%r15),%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
lea    0xbaf(%rip),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    0x28(%r15),%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1110 <sift_save_keypoints@plt>
cmpl   $0x1,-0x30(%rbp)
jne    1556 <main+0x356>
lea    0xba4(%rip),%rsi
lea    -0x160(%rbp),%r13
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    (%r12),%rdi
mov    %r14,%rsi
call   10d0 <print_sift_scalespace_gray_nearestneighbor@plt>
lea    0xb8d(%rip),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
call   1120 <sprintf@plt>
mov    0x8(%r12),%rdi
mov    %r14,%rsi
call   1070 <print_sift_scalespace_rgb@plt>
mov    %rbx,%rdi
call   10a0 <xfree@plt>
mov    -0x38(%rbp),%rdi
call   10a0 <xfree@plt>
mov    -0x50(%rbp),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    (%r15),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    0x8(%r15),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    0x10(%r15),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    0x18(%r15),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    0x20(%r15),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    0x28(%r15),%rdi
call   10c0 <sift_free_keypoints@plt>
mov    %r15,%rdi
call   10a0 <xfree@plt>
mov    (%r12),%rdi
call   1060 <sift_free_scalespace@plt>
mov    0x8(%r12),%rdi
call   1060 <sift_free_scalespace@plt>
mov    0x10(%r12),%rdi
call   1060 <sift_free_scalespace@plt>
mov    0x18(%r12),%rdi
call   1060 <sift_free_scalespace@plt>
mov    %r12,%rdi
call   10a0 <xfree@plt>
mov    0x29ed(%rip),%rax
mov    (%rax),%eax
mov    -0x58(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%sil
jne    1352 <main+0x152>
jmp    1371 <main+0x171>

LLVM IR (-O0):
%struct.sift_parameters = type opaque
%struct.sift_keypoints = type opaque
%struct.sift_scalespace = type { i32 }
@.str = [6 x i8] c"extra\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [21 x i8] c"File \22%s\22 not found.\00"
@FILENAME_MAX = global i32 0
@.str.2 = [17 x i8] c"extra_NES_%s.txt\00"
@.str.3 = [27 x i8] c"extra_DoGSoftThresh_%s.txt\00"
@.str.4 = [24 x i8] c"extra_ExtrInterp_%s.txt\00"
@.str.5 = [23 x i8] c"extra_DoGThresh_%s.txt\00"
@.str.6 = [24 x i8] c"extra_OnEdgeResp_%s.txt\00"
@.str.7 = [27 x i8] c"extra_FarFromBorder_%s.txt\00"
@.str.8 = [14 x i8] c"scalespace_%s\00"
@.str.9 = [7 x i8] c"DoG_%s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.sift_parameters*
%7 = alloca i32
%8 = alloca i32
%9 = alloca [256 x i8]
%10 = alloca [256 x i8]
%11 = alloca i32
%12 = alloca i64
%13 = alloca i64
%14 = alloca float*
%15 = alloca i32
%16 = alloca %struct.sift_keypoints**
%17 = alloca i32
%18 = alloca %struct.sift_scalespace**
%19 = alloca %struct.sift_keypoints*
%20 = alloca i32
%21 = alloca i8*
%22 = alloca i64
%23 = alloca i32
%24 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%25 = call %struct.sift_scalespace** (...) @sift_assign_default_parameters()
%26 = bitcast %struct.sift_scalespace** %25 to %struct.sift_parameters*
store %struct.sift_parameters* %26, %struct.sift_parameters** %6
store i32 0, i32* %7
store i32 0, i32* %8
%27 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%28 = call i32 @strcpy(i8* %27, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%30 = call i32 @strcpy(i8* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%31 = load i32, i32* %4
%32 = load i8**, i8*** %5
%33 = load %struct.sift_parameters*, %struct.sift_parameters** %6
%34 = bitcast %struct.sift_parameters* %33 to %struct.sift_scalespace**
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%36 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%37 = call i32 @parse_options(i32 %31, i8** %32, %struct.sift_scalespace** %34, i32* %7, i32* %8, i8* %35, i8* %36)
store i32 %37, i32* %11
%38 = load i32, i32* %11
%39 = load i32, i32* @EXIT_FAILURE
%40 = icmp eq i32 %38, %39
br i1 %40, label %41, label %43
41: ; preds = %2
%42 = load i32, i32* @EXIT_FAILURE
store i32 %42, i32* %3
br label %220
43: ; preds = %2
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = call float* @io_png_read_f32_gray(i8* %46, i64* %12, i64* %13)
store float* %47, float** %14
%48 = load float*, float** %14
%49 = icmp ne float* %48, null
br i1 %49, label %55, label %50
50: ; preds = %43
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = call i32 @fatal_error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %53)
br label %55
55: ; preds = %50, %43
store i32 0, i32* %15
br label %56
56: ; preds = %72, %55
%57 = load i32, i32* %15
%58 = sext i32 %57 to i64
%59 = load i64, i64* %12
%60 = load i64, i64* %13
%61 = mul i64 %59, %60
%62 = icmp ult i64 %58, %61
br i1 %62, label %63, label %75
63: ; preds = %56
%64 = load float*, float** %14
%65 = load i32, i32* %15
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds float, float* %64, i64 %66
%68 = load float, float* %67
%69 = fpext float %68 to double
%70 = fdiv double %69, 2.560000e+02
%71 = fptrunc double %70 to float
store float %71, float* %67
br label %72
72: ; preds = %63
%73 = load i32, i32* %15
%74 = add nsw i32 %73, 1
store i32 %74, i32* %15
br label %56
75: ; preds = %56
%76 = call %struct.sift_scalespace** @xmalloc(i32 48)
%77 = bitcast %struct.sift_scalespace** %76 to %struct.sift_keypoints**
store %struct.sift_keypoints** %77, %struct.sift_keypoints*** %16
store i32 0, i32* %17
br label %78
78: ; preds = %88, %75
%79 = load i32, i32* %17
%80 = icmp slt i32 %79, 6
br i1 %80, label %81, label %91
81: ; preds = %78
%82 = call %struct.sift_scalespace* (...) @sift_malloc_keypoints()
%83 = bitcast %struct.sift_scalespace* %82 to %struct.sift_keypoints*
%84 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%85 = load i32, i32* %17
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %84, i64 %86
store %struct.sift_keypoints* %83, %struct.sift_keypoints** %87
br label %88
88: ; preds = %81
%89 = load i32, i32* %17
%90 = add nsw i32 %89, 1
store i32 %90, i32* %17
br label %78
91: ; preds = %78
%92 = call %struct.sift_scalespace** @xmalloc(i32 32)
store %struct.sift_scalespace** %92, %struct.sift_scalespace*** %18
%93 = load float*, float** %14
%94 = load i64, i64* %12
%95 = load i64, i64* %13
%96 = load %struct.sift_parameters*, %struct.sift_parameters** %6
%97 = bitcast %struct.sift_parameters* %96 to %struct.sift_scalespace**
%98 = load %struct.sift_scalespace**, %struct.sift_scalespace*** %18
%99 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%100 = bitcast %struct.sift_keypoints** %99 to %struct.sift_scalespace**
%101 = call %struct.sift_scalespace* @sift_anatomy(float* %93, i64 %94, i64 %95, %struct.sift_scalespace** %97, %struct.sift_scalespace** %98, %struct.sift_scalespace** %100)
%102 = bitcast %struct.sift_scalespace* %101 to %struct.sift_keypoints*
store %struct.sift_keypoints* %102, %struct.sift_keypoints** %19
%103 = load i32, i32* %7
%104 = add nsw i32 %103, 1
store i32 %104, i32* %20
%105 = load %struct.sift_keypoints*, %struct.sift_keypoints** %19
%106 = bitcast %struct.sift_keypoints* %105 to %struct.sift_scalespace*
%107 = load i32, i32* %20
%108 = call i32 @sift_print_keypoints(%struct.sift_scalespace* %106, i32 %107)
%109 = load i32, i32* @FILENAME_MAX
%110 = zext i32 %109 to i64
%111 = call i8* @llvm.stacksave()
store i8* %111, i8** %21
%112 = alloca i8, i64 %110
store i64 %110, i64* %22
%113 = load i32, i32* %7
%114 = icmp eq i32 %113, 1
br i1 %114, label %115, label %158
115: ; preds = %91
%116 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%117 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %116)
%118 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%119 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %118, i64 0
%120 = load %struct.sift_keypoints*, %struct.sift_keypoints** %119
%121 = bitcast %struct.sift_keypoints* %120 to %struct.sift_scalespace*
%122 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %121, i8* %112, i32 0)
%123 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%124 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %123)
%125 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%126 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %125, i64 1
%127 = load %struct.sift_keypoints*, %struct.sift_keypoints** %126
%128 = bitcast %struct.sift_keypoints* %127 to %struct.sift_scalespace*
%129 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %128, i8* %112, i32 0)
%130 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%131 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* %130)
%132 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%133 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %132, i64 2
%134 = load %struct.sift_keypoints*, %struct.sift_keypoints** %133
%135 = bitcast %struct.sift_keypoints* %134 to %struct.sift_scalespace*
%136 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %135, i8* %112, i32 0)
%137 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%138 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %137)
%139 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%140 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %139, i64 3
%141 = load %struct.sift_keypoints*, %struct.sift_keypoints** %140
%142 = bitcast %struct.sift_keypoints* %141 to %struct.sift_scalespace*
%143 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %142, i8* %112, i32 0)
%144 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%145 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %144)
%146 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%147 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %146, i64 4
%148 = load %struct.sift_keypoints*, %struct.sift_keypoints** %147
%149 = bitcast %struct.sift_keypoints* %148 to %struct.sift_scalespace*
%150 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %149, i8* %112, i32 0)
%151 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%152 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i8* %151)
%153 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%154 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %153, i64 5
%155 = load %struct.sift_keypoints*, %struct.sift_keypoints** %154
%156 = bitcast %struct.sift_keypoints* %155 to %struct.sift_scalespace*
%157 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %156, i8* %112, i32 0)
br label %158
158: ; preds = %115, %91
%159 = load i32, i32* %8
%160 = icmp eq i32 %159, 1
br i1 %160, label %161, label %174
161: ; preds = %158
%162 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%163 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %162)
%164 = load %struct.sift_scalespace**, %struct.sift_scalespace*** %18
%165 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %164, i64 0
%166 = load %struct.sift_scalespace*, %struct.sift_scalespace** %165
%167 = call i32 @print_sift_scalespace_gray_nearestneighbor(%struct.sift_scalespace* %166, i8* %112)
%168 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%169 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %168)
%170 = load %struct.sift_scalespace**, %struct.sift_scalespace*** %18
%171 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %170, i64 1
%172 = load %struct.sift_scalespace*, %struct.sift_scalespace** %171
%173 = call i32 @print_sift_scalespace_rgb(%struct.sift_scalespace* %172, i8* %112)
br label %174
174: ; preds = %161, %158
%175 = load float*, float** %14
%176 = call i32 @xfree(float* %175)
%177 = load %struct.sift_parameters*, %struct.sift_parameters** %6
%178 = bitcast %struct.sift_parameters* %177 to float*
%179 = call i32 @xfree(float* %178)
%180 = load %struct.sift_keypoints*, %struct.sift_keypoints** %19
%181 = bitcast %struct.sift_keypoints* %180 to %struct.sift_scalespace*
%182 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %181)
store i32 0, i32* %23
br label %183
183: ; preds = %194, %174
%184 = load i32, i32* %23
%185 = icmp slt i32 %184, 6
br i1 %185, label %186, label %197
186: ; preds = %183
%187 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%188 = load i32, i32* %23
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds %struct.sift_keypoints*, %struct.sift_keypoints** %187, i64 %189
%191 = load %struct.sift_keypoints*, %struct.sift_keypoints** %190
%192 = bitcast %struct.sift_keypoints* %191 to %struct.sift_scalespace*
%193 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %192)
br label %194
194: ; preds = %186
%195 = load i32, i32* %23
%196 = add nsw i32 %195, 1
store i32 %196, i32* %23
br label %183
197: ; preds = %183
%198 = load %struct.sift_keypoints**, %struct.sift_keypoints*** %16
%199 = bitcast %struct.sift_keypoints** %198 to float*
%200 = call i32 @xfree(float* %199)
store i32 0, i32* %24
br label %201
201: ; preds = %211, %197
%202 = load i32, i32* %24
%203 = icmp slt i32 %202, 4
br i1 %203, label %204, label %214
204: ; preds = %201
%205 = load %struct.sift_scalespace**, %struct.sift_scalespace*** %18
%206 = load i32, i32* %24
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %205, i64 %207
%209 = load %struct.sift_scalespace*, %struct.sift_scalespace** %208
%210 = call i32 @sift_free_scalespace(%struct.sift_scalespace* %209)
br label %211
211: ; preds = %204
%212 = load i32, i32* %24
%213 = add nsw i32 %212, 1
store i32 %213, i32* %24
br label %201
214: ; preds = %201
%215 = load %struct.sift_scalespace**, %struct.sift_scalespace*** %18
%216 = bitcast %struct.sift_scalespace** %215 to float*
%217 = call i32 @xfree(float* %216)
%218 = load i32, i32* @EXIT_SUCCESS
store i32 %218, i32* %3
%219 = load i8*, i8** %21
br label %220
220: ; preds = %214, %41
%221 = load i32, i32* %3
ret i32 %221
}

LLVM IR (-O2):
%struct.sift_scalespace = type { i32 }
@.str = [6 x i8] c"extra\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [21 x i8] c"File \22%s\22 not found.\00"
@FILENAME_MAX = global i32 0
@.str.2 = [17 x i8] c"extra_NES_%s.txt\00"
@.str.3 = [27 x i8] c"extra_DoGSoftThresh_%s.txt\00"
@.str.4 = [24 x i8] c"extra_ExtrInterp_%s.txt\00"
@.str.5 = [23 x i8] c"extra_DoGThresh_%s.txt\00"
@.str.6 = [24 x i8] c"extra_OnEdgeResp_%s.txt\00"
@.str.7 = [27 x i8] c"extra_FarFromBorder_%s.txt\00"
@.str.8 = [14 x i8] c"scalespace_%s\00"
@.str.9 = [7 x i8] c"DoG_%s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [256 x i8]
%6 = alloca [256 x i8]
%7 = alloca i64
%8 = alloca i64
%9 = tail call %struct.sift_scalespace** (...) @sift_assign_default_parameters()
%10 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%11 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%14 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @parse_options(i32 %0, i8** %1, %struct.sift_scalespace** %9, i32* %3, i32* %4, i8* %13, i8* %12)
%17 = load i32, i32* @EXIT_FAILURE
%18 = icmp eq i32 %16, %17
br i1 %18, label %186, label %19
19: ; preds = %2
%20 = bitcast i64* %7 to i8*
%21 = bitcast i64* %8 to i8*
%22 = getelementptr inbounds i8*, i8** %1, i64 1
%23 = load i8*, i8** %22
%24 = call float* @io_png_read_f32_gray(i8* %23, i64* %7, i64* %8)
%25 = icmp eq float* %24, null
br i1 %25, label %26, label %29
26: ; preds = %19
%27 = load i8*, i8** %22
%28 = call i32 @fatal_error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %27)
br label %29
29: ; preds = %26, %19
%30 = load i64, i64* %7
%31 = load i64, i64* %8
%32 = mul i64 %31, %30
%33 = icmp eq i64 %32, 0
br i1 %33, label %90, label %34
34: ; preds = %29
%35 = icmp ult i64 %32, 8
br i1 %35, label %88, label %36
36: ; preds = %34
%37 = and i64 %32, -8
%38 = add i64 %37, -8
%39 = lshr exact i64 %38, 3
%40 = add nuw nsw i64 %39, 1
%41 = and i64 %40, 1
%42 = icmp eq i64 %38, 0
br i1 %42, label %72, label %43
43: ; preds = %36
%44 = and i64 %40, 4611686018427387902
br label %45
45: ; preds = %45, %43
%46 = phi i64 [ 0, %43 ], [ %69, %45 ]
%47 = phi i64 [ 0, %43 ], [ %70, %45 ]
%48 = getelementptr inbounds float, float* %24, i64 %46
%49 = bitcast float* %48 to <4 x float>*
%50 = load <4 x float>, <4 x float>* %49
%51 = getelementptr inbounds float, float* %48, i64 4
%52 = bitcast float* %51 to <4 x float>*
%53 = load <4 x float>, <4 x float>* %52
%54 = fmul <4 x float> %50, <float 3.906250e-03, float 3.906250e-03, float 3.906250e-03, float 3.906250e-03>
%55 = fmul <4 x float> %53, <float 3.906250e-03, float 3.906250e-03, float 3.906250e-03, float 3.906250e-03>
%56 = bitcast float* %48 to <4 x float>*
store <4 x float> %54, <4 x float>* %56
%57 = bitcast float* %51 to <4 x float>*
store <4 x float> %55, <4 x float>* %57
%58 = or i64 %46, 8
%59 = getelementptr inbounds float, float* %24, i64 %58
%60 = bitcast float* %59 to <4 x float>*
%61 = load <4 x float>, <4 x float>* %60
%62 = getelementptr inbounds float, float* %59, i64 4
%63 = bitcast float* %62 to <4 x float>*
%64 = load <4 x float>, <4 x float>* %63
%65 = fmul <4 x float> %61, <float 3.906250e-03, float 3.906250e-03, float 3.906250e-03, float 3.906250e-03>
%66 = fmul <4 x float> %64, <float 3.906250e-03, float 3.906250e-03, float 3.906250e-03, float 3.906250e-03>
%67 = bitcast float* %59 to <4 x float>*
store <4 x float> %65, <4 x float>* %67
%68 = bitcast float* %62 to <4 x float>*
store <4 x float> %66, <4 x float>* %68
%69 = add nuw i64 %46, 16
%70 = add i64 %47, 2
%71 = icmp eq i64 %70, %44
br i1 %71, label %72, label %45
72: ; preds = %45, %36
%73 = phi i64 [ 0, %36 ], [ %69, %45 ]
%74 = icmp eq i64 %41, 0
br i1 %74, label %86, label %75
75: ; preds = %72
%76 = getelementptr inbounds float, float* %24, i64 %73
%77 = bitcast float* %76 to <4 x float>*
%78 = load <4 x float>, <4 x float>* %77
%79 = getelementptr inbounds float, float* %76, i64 4
%80 = bitcast float* %79 to <4 x float>*
%81 = load <4 x float>, <4 x float>* %80
%82 = fmul <4 x float> %78, <float 3.906250e-03, float 3.906250e-03, float 3.906250e-03, float 3.906250e-03>
%83 = fmul <4 x float> %81, <float 3.906250e-03, float 3.906250e-03, float 3.906250e-03, float 3.906250e-03>
%84 = bitcast float* %76 to <4 x float>*
store <4 x float> %82, <4 x float>* %84
%85 = bitcast float* %79 to <4 x float>*
store <4 x float> %83, <4 x float>* %85
br label %86
86: ; preds = %72, %75
%87 = icmp eq i64 %32, %37
br i1 %87, label %90, label %88
88: ; preds = %34, %86
%89 = phi i64 [ 0, %34 ], [ %37, %86 ]
br label %116
90: ; preds = %116, %86, %29
%91 = call %struct.sift_scalespace** @xmalloc(i32 48)
%92 = call %struct.sift_scalespace* (...) @sift_malloc_keypoints()
store %struct.sift_scalespace* %92, %struct.sift_scalespace** %91
%93 = call %struct.sift_scalespace* (...) @sift_malloc_keypoints()
%94 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %91, i64 1
store %struct.sift_scalespace* %93, %struct.sift_scalespace** %94
%95 = call %struct.sift_scalespace* (...) @sift_malloc_keypoints()
%96 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %91, i64 2
store %struct.sift_scalespace* %95, %struct.sift_scalespace** %96
%97 = call %struct.sift_scalespace* (...) @sift_malloc_keypoints()
%98 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %91, i64 3
store %struct.sift_scalespace* %97, %struct.sift_scalespace** %98
%99 = call %struct.sift_scalespace* (...) @sift_malloc_keypoints()
%100 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %91, i64 4
store %struct.sift_scalespace* %99, %struct.sift_scalespace** %100
%101 = call %struct.sift_scalespace* (...) @sift_malloc_keypoints()
%102 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %91, i64 5
store %struct.sift_scalespace* %101, %struct.sift_scalespace** %102
%103 = call %struct.sift_scalespace** @xmalloc(i32 32)
%104 = load i64, i64* %7
%105 = load i64, i64* %8
%106 = call %struct.sift_scalespace* @sift_anatomy(float* %24, i64 %104, i64 %105, %struct.sift_scalespace** %9, %struct.sift_scalespace** %103, %struct.sift_scalespace** %91)
%107 = load i32, i32* %3
%108 = add nsw i32 %107, 1
%109 = call i32 @sift_print_keypoints(%struct.sift_scalespace* %106, i32 %108)
%110 = load i32, i32* @FILENAME_MAX
%111 = zext i32 %110 to i64
%112 = call i8* @llvm.stacksave()
%113 = alloca i8, i64 %111
%114 = load i32, i32* %3
%115 = icmp eq i32 %114, 1
br i1 %115, label %123, label %142
116: ; preds = %88, %116
%117 = phi i64 [ %121, %116 ], [ %89, %88 ]
%118 = getelementptr inbounds float, float* %24, i64 %117
%119 = load float, float* %118
%120 = fmul float %119, 3.906250e-03
store float %120, float* %118
%121 = add nuw nsw i64 %117, 1
%122 = icmp eq i64 %121, %32
br i1 %122, label %90, label %116
123: ; preds = %90
%124 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%125 = load %struct.sift_scalespace*, %struct.sift_scalespace** %91
%126 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %125, i8* %113, i32 0)
%127 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%128 = load %struct.sift_scalespace*, %struct.sift_scalespace** %94
%129 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %128, i8* %113, i32 0)
%130 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* %13)
%131 = load %struct.sift_scalespace*, %struct.sift_scalespace** %96
%132 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %131, i8* %113, i32 0)
%133 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %13)
%134 = load %struct.sift_scalespace*, %struct.sift_scalespace** %98
%135 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %134, i8* %113, i32 0)
%136 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %13)
%137 = load %struct.sift_scalespace*, %struct.sift_scalespace** %100
%138 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %137, i8* %113, i32 0)
%139 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i8* %13)
%140 = load %struct.sift_scalespace*, %struct.sift_scalespace** %102
%141 = call i32 @sift_save_keypoints(%struct.sift_scalespace* %140, i8* %113, i32 0)
br label %142
142: ; preds = %123, %90
%143 = load i32, i32* %4
%144 = icmp eq i32 %143, 1
br i1 %144, label %145, label %153
145: ; preds = %142
%146 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %12)
%147 = load %struct.sift_scalespace*, %struct.sift_scalespace** %103
%148 = call i32 @print_sift_scalespace_gray_nearestneighbor(%struct.sift_scalespace* %147, i8* %113)
%149 = call i32 @sprintf(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %12)
%150 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %103, i64 1
%151 = load %struct.sift_scalespace*, %struct.sift_scalespace** %150
%152 = call i32 @print_sift_scalespace_rgb(%struct.sift_scalespace* %151, i8* %113)
br label %153
153: ; preds = %145, %142
%154 = call i32 @xfree(float* %24)
%155 = bitcast %struct.sift_scalespace** %9 to float*
%156 = call i32 @xfree(float* %155)
%157 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %106)
%158 = load %struct.sift_scalespace*, %struct.sift_scalespace** %91
%159 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %158)
%160 = load %struct.sift_scalespace*, %struct.sift_scalespace** %94
%161 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %160)
%162 = load %struct.sift_scalespace*, %struct.sift_scalespace** %96
%163 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %162)
%164 = load %struct.sift_scalespace*, %struct.sift_scalespace** %98
%165 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %164)
%166 = load %struct.sift_scalespace*, %struct.sift_scalespace** %100
%167 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %166)
%168 = load %struct.sift_scalespace*, %struct.sift_scalespace** %102
%169 = call i32 @sift_free_keypoints(%struct.sift_scalespace* %168)
%170 = bitcast %struct.sift_scalespace** %91 to float*
%171 = call i32 @xfree(float* %170)
%172 = load %struct.sift_scalespace*, %struct.sift_scalespace** %103
%173 = call i32 @sift_free_scalespace(%struct.sift_scalespace* %172)
%174 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %103, i64 1
%175 = load %struct.sift_scalespace*, %struct.sift_scalespace** %174
%176 = call i32 @sift_free_scalespace(%struct.sift_scalespace* %175)
%177 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %103, i64 2
%178 = load %struct.sift_scalespace*, %struct.sift_scalespace** %177
%179 = call i32 @sift_free_scalespace(%struct.sift_scalespace* %178)
%180 = getelementptr inbounds %struct.sift_scalespace*, %struct.sift_scalespace** %103, i64 3
%181 = load %struct.sift_scalespace*, %struct.sift_scalespace** %180
%182 = call i32 @sift_free_scalespace(%struct.sift_scalespace* %181)
%183 = bitcast %struct.sift_scalespace** %103 to float*
%184 = call i32 @xfree(float* %183)
%185 = load i32, i32* @EXIT_SUCCESS
br label %186
186: ; preds = %2, %153
%187 = phi i32 [ %185, %153 ], [ %16, %2 ]
ret i32 %187
}