#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void write_sex_cfg() {
  FILE *cfg;
  FILE *param;
  cfg = fopen("_sex.cfg", "w");
  fprintf(cfg, "CATALOG_NAME\t%s\n", "_sex.cat");
  fprintf(cfg, "CATALOG_TYPE\tASCII_HEAD\n");
  fprintf(cfg, "PARAMETERS_NAME\t_sex.param\n");
  fprintf(cfg, "DETECT_TYPE\tCCD\n");
  fprintf(cfg, "DETECT_MINAREA\t%d\n", 5);
  fprintf(cfg, "DETECT_THRESH\t%.1f\n", 3.0);
  fprintf(cfg, "ANALYSIS_THRESH\t%.1f\n", 3.0);
  fprintf(cfg, "FILTER\tN\n");
  fprintf(cfg, "FILTER_NAME\tdefault.conv\n");
  fprintf(cfg, "DEBLEND_NTHRESH\t32\n");
  fprintf(cfg, "DEBLEND_MINCONT\t0.005\n");
  fprintf(cfg, "CLEAN\tY\n");
  fprintf(cfg, "CLEAN_PARAM\t1.0\n");
  fprintf(cfg, "MASK_TYPE\tCORRECT\n");
  fprintf(cfg, "PHOT_APERTURES\t5\n");
  fprintf(cfg, "PHOT_AUTOPARAMS\t2.5, 3.5\n");
  fprintf(cfg, "SATUR_LEVEL\t50000.0\n");
  fprintf(cfg, "MAG_ZEROPOINT\t0.0\n");
  fprintf(cfg, "MAG_GAMMA\t4.0\n");
  fprintf(cfg, "GAIN\t2.8\n");
  fprintf(cfg, "PIXEL_SCALE\t1.0\n");
  fprintf(cfg, "SEEING_FWHM\t1.2\n");
  fprintf(cfg, "STARNNW_NAME\tdefault.nnw\n");
  fprintf(cfg, "BACK_SIZE\t64\n");
  fprintf(cfg, "BACK_FILTERSIZE\t3\n");
  fprintf(cfg, "MEMORY_OBJSTACK\t2000\n");
  fprintf(cfg, "MEMORY_PIXSTACK\t100000\n");
  fprintf(cfg, "MEMORY_BUFSIZE\t1024\n");
  fprintf(cfg, "VERBOSE_TYPE\tQUIET\n");
  fclose(cfg);
  param = fopen("_sex.param", "w");
  fprintf(param, "X_IMAGE\n");
  fprintf(param, "Y_IMAGE\n");
  fprintf(param, "FLUX_AUTO\n");
  fprintf(param, "FWHM_IMAGE\n");
  fclose(param);
}


x86 assembly (clang, -O0):
<write_sex_cfg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec9(%rip),%rdi
lea    0xecb(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xecb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
movsd  0xe38(%rip),%xmm0
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec0(%rip),%rsi
movsd  0xe1e(%rip),%xmm0
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xecb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xec8(%rip),%rdi
lea    0xc85(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_sex_cfg>:
push   %r14
push   %rbx
push   %rax
lea    0xebd(%rip),%rdi
lea    0xebf(%rip),%r14
mov    %r14,%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeaf(%rip),%rsi
lea    0xeb9(%rip),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xeb1(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xeb4(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xea9(%rip),%rsi
movsd  0xe1b(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <fprintf@plt>
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
movsd  0xdff(%rip),%xmm0
mov    $0x1,%al
call   1040 <fprintf@plt>
lea    0xea1(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe92(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe93(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe8e(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe8c(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe7c(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe74(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe6e(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe67(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe68(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe64(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe5e(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe54(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe45(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe3d(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe35(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe36(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe2b(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe25(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe22(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe21(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe1d(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xe10(%rip),%rdi
mov    %r14,%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xe09(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
lea    0xdf9(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xde9(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xddb(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"_sex.cfg\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [17 x i8] c"CATALOG_NAME\09%s\0A\00"
@.str.3 = [9 x i8] c"_sex.cat\00"
@.str.4 = [25 x i8] c"CATALOG_TYPE\09ASCII_HEAD\0A\00"
@.str.5 = [28 x i8] c"PARAMETERS_NAME\09_sex.param\0A\00"
@.str.6 = [17 x i8] c"DETECT_TYPE\09CCD\0A\00"
@.str.7 = [19 x i8] c"DETECT_MINAREA\09%d\0A\00"
@.str.8 = [20 x i8] c"DETECT_THRESH\09%.1f\0A\00"
@.str.9 = [22 x i8] c"ANALYSIS_THRESH\09%.1f\0A\00"
@.str.10 = [10 x i8] c"FILTER\09N\0A\00"
@.str.11 = [26 x i8] c"FILTER_NAME\09default.conv\0A\00"
@.str.12 = [20 x i8] c"DEBLEND_NTHRESH\0932\0A\00"
@.str.13 = [23 x i8] c"DEBLEND_MINCONT\090.005\0A\00"
@.str.14 = [9 x i8] c"CLEAN\09Y\0A\00"
@.str.15 = [17 x i8] c"CLEAN_PARAM\091.0\0A\00"
@.str.16 = [19 x i8] c"MASK_TYPE\09CORRECT\0A\00"
@.str.17 = [18 x i8] c"PHOT_APERTURES\095\0A\00"
@.str.18 = [26 x i8] c"PHOT_AUTOPARAMS\092.5, 3.5\0A\00"
@.str.19 = [21 x i8] c"SATUR_LEVEL\0950000.0\0A\00"
@.str.20 = [19 x i8] c"MAG_ZEROPOINT\090.0\0A\00"
@.str.21 = [15 x i8] c"MAG_GAMMA\094.0\0A\00"
@.str.22 = [10 x i8] c"GAIN\092.8\0A\00"
@.str.23 = [17 x i8] c"PIXEL_SCALE\091.0\0A\00"
@.str.24 = [17 x i8] c"SEEING_FWHM\091.2\0A\00"
@.str.25 = [26 x i8] c"STARNNW_NAME\09default.nnw\0A\00"
@.str.26 = [14 x i8] c"BACK_SIZE\0964\0A\00"
@.str.27 = [19 x i8] c"BACK_FILTERSIZE\093\0A\00"
@.str.28 = [22 x i8] c"MEMORY_OBJSTACK\092000\0A\00"
@.str.29 = [24 x i8] c"MEMORY_PIXSTACK\09100000\0A\00"
@.str.30 = [21 x i8] c"MEMORY_BUFSIZE\091024\0A\00"
@.str.31 = [20 x i8] c"VERBOSE_TYPE\09QUIET\0A\00"
@.str.32 = [11 x i8] c"_sex.param\00"
@.str.33 = [9 x i8] c"X_IMAGE\0A\00"
@.str.34 = [9 x i8] c"Y_IMAGE\0A\00"
@.str.35 = [11 x i8] c"FLUX_AUTO\0A\00"
@.str.36 = [12 x i8] c"FWHM_IMAGE\0A\00"
define void @write_sex_cfg() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 (i32*, i8*, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%6 = load i32*, i32** %1
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%8 = load i32*, i32** %1
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%10 = load i32*, i32** %1
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%12 = load i32*, i32** %1
%13 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 5)
%14 = load i32*, i32** %1
%15 = call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), double 3.000000e+00)
%16 = load i32*, i32** %1
%17 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double 3.000000e+00)
%18 = load i32*, i32** %1
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%20 = load i32*, i32** %1
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%22 = load i32*, i32** %1
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%24 = load i32*, i32** %1
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%26 = load i32*, i32** %1
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%28 = load i32*, i32** %1
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
%30 = load i32*, i32** %1
%31 = call i32 (i32*, i8*, ...) @fprintf(i32* %30, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0))
%32 = load i32*, i32** %1
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0))
%34 = load i32*, i32** %1
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0))
%36 = load i32*, i32** %1
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.19, i64 0, i64 0))
%38 = load i32*, i32** %1
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
%40 = load i32*, i32** %1
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i64 0, i64 0))
%42 = load i32*, i32** %1
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0))
%44 = load i32*, i32** %1
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0))
%46 = load i32*, i32** %1
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.24, i64 0, i64 0))
%48 = load i32*, i32** %1
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.25, i64 0, i64 0))
%50 = load i32*, i32** %1
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.26, i64 0, i64 0))
%52 = load i32*, i32** %1
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0))
%54 = load i32*, i32** %1
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.28, i64 0, i64 0))
%56 = load i32*, i32** %1
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %56, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.29, i64 0, i64 0))
%58 = load i32*, i32** %1
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.30, i64 0, i64 0))
%60 = load i32*, i32** %1
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.31, i64 0, i64 0))
%62 = load i32*, i32** %1
%63 = call i32 @fclose(i32* %62)
%64 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.32, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %64, i32** %2
%65 = load i32*, i32** %2
%66 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.33, i64 0, i64 0))
%67 = load i32*, i32** %2
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.34, i64 0, i64 0))
%69 = load i32*, i32** %2
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.35, i64 0, i64 0))
%71 = load i32*, i32** %2
%72 = call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0))
%73 = load i32*, i32** %2
%74 = call i32 @fclose(i32* %73)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"_sex.cfg\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [17 x i8] c"CATALOG_NAME\09%s\0A\00"
@.str.3 = [9 x i8] c"_sex.cat\00"
@.str.4 = [25 x i8] c"CATALOG_TYPE\09ASCII_HEAD\0A\00"
@.str.5 = [28 x i8] c"PARAMETERS_NAME\09_sex.param\0A\00"
@.str.6 = [17 x i8] c"DETECT_TYPE\09CCD\0A\00"
@.str.7 = [19 x i8] c"DETECT_MINAREA\09%d\0A\00"
@.str.8 = [20 x i8] c"DETECT_THRESH\09%.1f\0A\00"
@.str.9 = [22 x i8] c"ANALYSIS_THRESH\09%.1f\0A\00"
@.str.10 = [10 x i8] c"FILTER\09N\0A\00"
@.str.11 = [26 x i8] c"FILTER_NAME\09default.conv\0A\00"
@.str.12 = [20 x i8] c"DEBLEND_NTHRESH\0932\0A\00"
@.str.13 = [23 x i8] c"DEBLEND_MINCONT\090.005\0A\00"
@.str.14 = [9 x i8] c"CLEAN\09Y\0A\00"
@.str.15 = [17 x i8] c"CLEAN_PARAM\091.0\0A\00"
@.str.16 = [19 x i8] c"MASK_TYPE\09CORRECT\0A\00"
@.str.17 = [18 x i8] c"PHOT_APERTURES\095\0A\00"
@.str.18 = [26 x i8] c"PHOT_AUTOPARAMS\092.5, 3.5\0A\00"
@.str.19 = [21 x i8] c"SATUR_LEVEL\0950000.0\0A\00"
@.str.20 = [19 x i8] c"MAG_ZEROPOINT\090.0\0A\00"
@.str.21 = [15 x i8] c"MAG_GAMMA\094.0\0A\00"
@.str.22 = [10 x i8] c"GAIN\092.8\0A\00"
@.str.23 = [17 x i8] c"PIXEL_SCALE\091.0\0A\00"
@.str.24 = [17 x i8] c"SEEING_FWHM\091.2\0A\00"
@.str.25 = [26 x i8] c"STARNNW_NAME\09default.nnw\0A\00"
@.str.26 = [14 x i8] c"BACK_SIZE\0964\0A\00"
@.str.27 = [19 x i8] c"BACK_FILTERSIZE\093\0A\00"
@.str.28 = [22 x i8] c"MEMORY_OBJSTACK\092000\0A\00"
@.str.29 = [24 x i8] c"MEMORY_PIXSTACK\09100000\0A\00"
@.str.30 = [21 x i8] c"MEMORY_BUFSIZE\091024\0A\00"
@.str.31 = [20 x i8] c"VERBOSE_TYPE\09QUIET\0A\00"
@.str.32 = [11 x i8] c"_sex.param\00"
@.str.33 = [9 x i8] c"X_IMAGE\0A\00"
@.str.34 = [9 x i8] c"Y_IMAGE\0A\00"
@.str.35 = [11 x i8] c"FLUX_AUTO\0A\00"
@.str.36 = [12 x i8] c"FWHM_IMAGE\0A\00"
define void @write_sex_cfg() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i64 24, i64 1, i32* %1)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i64 27, i64 1, i32* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i64 16, i64 1, i32* %1)
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 5)
%7 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), double 3.000000e+00)
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double 3.000000e+00)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i64 9, i64 1, i32* %1)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i64 25, i64 1, i32* %1)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i64 19, i64 1, i32* %1)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i64 22, i64 1, i32* %1)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i64 8, i64 1, i32* %1)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i64 16, i64 1, i32* %1)
%15 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), i64 18, i64 1, i32* %1)
%16 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i64 17, i64 1, i32* %1)
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i64 25, i64 1, i32* %1)
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.19, i64 0, i64 0), i64 20, i64 1, i32* %1)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0), i64 18, i64 1, i32* %1)
%20 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i64 0, i64 0), i64 14, i64 1, i32* %1)
%21 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0), i64 9, i64 1, i32* %1)
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), i64 16, i64 1, i32* %1)
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.24, i64 0, i64 0), i64 16, i64 1, i32* %1)
%24 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.25, i64 0, i64 0), i64 25, i64 1, i32* %1)
%25 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.26, i64 0, i64 0), i64 13, i64 1, i32* %1)
%26 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0), i64 18, i64 1, i32* %1)
%27 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.28, i64 0, i64 0), i64 21, i64 1, i32* %1)
%28 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.29, i64 0, i64 0), i64 23, i64 1, i32* %1)
%29 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.30, i64 0, i64 0), i64 20, i64 1, i32* %1)
%30 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.31, i64 0, i64 0), i64 19, i64 1, i32* %1)
%31 = tail call i32 @fclose(i32* %1)
%32 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.32, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%33 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.33, i64 0, i64 0), i64 8, i64 1, i32* %32)
%34 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.34, i64 0, i64 0), i64 8, i64 1, i32* %32)
%35 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.35, i64 0, i64 0), i64 10, i64 1, i32* %32)
%36 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0), i64 11, i64 1, i32* %32)
%37 = tail call i32 @fclose(i32* %32)
ret void
}