#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*/ exit(int);
scalar_t__ fclose(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ output_lbp(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
void output_lbrk_tables(const char *filename1, const char *filename2,
                        const char *version) {
  const char *filenames[2];
  FILE *streams[2];
  size_t i;
  filenames[0] = filename1;
  filenames[1] = filename2;
  for (i = 0; i < 2; i++) {
    streams[i] = fopen(filenames[i], "w");
    if (streams[i] == NULL) {
      fprintf(stderr, "cannot open '%s' for writing\n", filenames[i]);
      exit(1);
    }
  }
  for (i = 0; i < 2; i++) {
    FILE *stream = streams[i];
    fprintf(stream, "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\n");
    fprintf(stream, "/* Line breaking properties of Unicode characters.  */\n");
    fprintf(
        stream,
        "/* Generated automatically by gen-uni-tables.c for Unicode %s.  */\n",
        version);
    fprintf(stream, "\n");
    fprintf(stream, "/* Copyright (C) 2000-2002, 2004, 2008 Free Software "
                    "Foundation, Inc.\n");
    fprintf(stream, "\n");
    fprintf(stream, "   This program is free software: you can redistribute it "
                    "and/or modify\n");
    fprintf(stream, "   it under the terms of the GNU General Public License "
                    "as published by\n");
    fprintf(stream, "   the Free Software Foundation; either version 3 of the "
                    "License, or\n");
    fprintf(stream, "   (at your option) any later version.\n");
    fprintf(stream, "\n");
    fprintf(
        stream,
        "   This program is distributed in the hope that it will be useful,\n");
    fprintf(
        stream,
        "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
    fprintf(
        stream,
        "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n");
    fprintf(stream, "   GNU General Public License for more details.\n");
    fprintf(stream, "\n");
    fprintf(stream, "   You should have received a copy of the GNU General "
                    "Public License\n");
    fprintf(stream, "   along with this program.  If not, see "
                    "<http://www.gnu.org/licenses/>.  */\n");
    fprintf(stream, "\n");
  }
  output_lbp(streams[0], streams[1]);
  for (i = 0; i < 2; i++) {
    if (ferror(streams[i]) || fclose(streams[i])) {
      fprintf(stderr, "error writing to '%s'\n", filenames[i]);
      exit(1);
    }
  }
}


x86 assembly (clang, -O0):
<output_lbrk_tables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x48(%rbp)
cmpq   $0x2,-0x48(%rbp)
jae    1209 <output_lbrk_tables+0xa9>
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdi
lea    0xe59(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%rcx
mov    -0x48(%rbp),%rax
mov    %rcx,-0x40(%rbp,%rax,8)
mov    -0x48(%rbp),%rax
cmpq   $0x0,-0x40(%rbp,%rax,8)
jne    11f3 <output_lbrk_tables+0x93>
mov    0x2e11(%rip),%rax
mov    (%rax),%rdi
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdx
lea    0xe20(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    11f8 <output_lbrk_tables+0x98>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    118c <output_lbrk_tables+0x2c>
movq   $0x0,-0x48(%rbp)
cmpq   $0x2,-0x48(%rbp)
jae    1394 <output_lbrk_tables+0x234>
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xe07(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe29(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x1145(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xe49(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x1121(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xe6c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xea3(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xeda(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xf0e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x10c7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xf12(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xf44(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xf75(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xfa5(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x106d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xfb2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0xfe6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x1037(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1211 <output_lbrk_tables+0xb1>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1050 <output_lbp@plt>
movq   $0x0,-0x48(%rbp)
cmpq   $0x2,-0x48(%rbp)
jae    1425 <output_lbrk_tables+0x2c5>
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
jne    13e4 <output_lbrk_tables+0x284>
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     140f <output_lbrk_tables+0x2af>
mov    0x2bf5(%rip),%rax
mov    (%rax),%rdi
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdx
lea    0xfa0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    1414 <output_lbrk_tables+0x2b4>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    13a9 <output_lbrk_tables+0x249>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_lbrk_tables>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r14
mov    %rdi,0x20(%rsp)
mov    %rsi,0x28(%rsp)
lea    0xe58(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     1407 <output_lbrk_tables+0x287>
mov    %rax,%r15
lea    0xe3b(%rip),%rsi
mov    %rbp,%rdi
call   1080 <fopen@plt>
mov    %rax,0x18(%rsp)
mov    %rbp,%r14
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     1407 <output_lbrk_tables+0x287>
mov    $0x1,%r12d
mov    $0x1,%r13b
lea    0x1117(%rip),%rbp
lea    0x1156(%rip),%r14
mov    %r15,(%rsp)
xchg   %ax,%ax
mov    $0x2c,%esi
mov    $0x1,%edx
lea    0xe0f(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x37,%esi
mov    $0x1,%edx
lea    0xe23(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    %r15,%rdi
lea    0xe49(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
mov    $0x46,%esi
mov    $0x1,%edx
lea    0xe65(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
mov    $0x48,%esi
mov    $0x1,%edx
lea    0xe86(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x48,%esi
mov    $0x1,%edx
lea    0xeb6(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x45,%esi
mov    $0x1,%edx
lea    0xee6(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x27,%esi
mov    $0x1,%edx
lea    0xf13(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
mov    $0x43,%esi
mov    $0x1,%edx
lea    0xf15(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x42,%esi
mov    $0x1,%edx
lea    0xf40(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x41,%esi
mov    $0x1,%edx
lea    0xf6a(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x30,%esi
mov    $0x1,%edx
lea    0xf93(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
mov    $0x45,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0x4d,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
test   $0x1,%r13b
je     13ab <output_lbrk_tables+0x22b>
mov    0x10(%rsp,%r12,8),%r15
mov    $0x2,%r12d
xor    %r13d,%r13d
jmp    1200 <output_lbrk_tables+0x80>
mov    (%rsp),%rbx
mov    %rbx,%rdi
mov    0x8(%rsp),%rbp
mov    %rbp,%rsi
call   1050 <output_lbp@plt>
mov    %rbx,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    141d <output_lbrk_tables+0x29d>
mov    %rbx,%rdi
call   1040 <fclose@plt>
test   %rax,%rax
jne    141d <output_lbrk_tables+0x29d>
mov    %rbp,%rdi
call   1030 <ferror@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    141f <output_lbrk_tables+0x29f>
mov    %rbp,%rdi
call   1040 <fclose@plt>
test   %rax,%rax
jne    141f <output_lbrk_tables+0x29f>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bd2(%rip),%rax
mov    (%rax),%rdi
lea    0xbea(%rip),%rsi
mov    %r14,%rdx
jmp    1435 <output_lbrk_tables+0x2b5>
xor    %ebx,%ebx
mov    0x2bba(%rip),%rax
mov    (%rax),%rdi
mov    0x20(%rsp,%rbx,8),%rdx
lea    0xf69(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@stderr = global i32* null
@.str.1 = [30 x i8] c"cannot open '%s' for writing\0A\00"
@.str.2 = [45 x i8] c"/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\0A\00"
@.str.3 = [56 x i8] c"/* Line breaking properties of Unicode characters. */\0A\00"
@.str.4 = [68 x i8] c"/* Generated automatically by gen-uni-tables.c for Unicode %s. */\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [71 x i8] c"/* Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.\0A\00"
@.str.7 = [73 x i8] c" This program is free software: you can redistribute it and/or modify\0A\00"
@.str.8 = [73 x i8] c" it under the terms of the GNU General Public License as published by\0A\00"
@.str.9 = [70 x i8] c" the Free Software Foundation; either version 3 of the License, or\0A\00"
@.str.10 = [40 x i8] c" (at your option) any later version.\0A\00"
@.str.11 = [68 x i8] c" This program is distributed in the hope that it will be useful,\0A\00"
@.str.12 = [67 x i8] c" but WITHOUT ANY WARRANTY; without even the implied warranty of\0A\00"
@.str.13 = [66 x i8] c" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0A\00"
@.str.14 = [49 x i8] c" GNU General Public License for more details.\0A\00"
@.str.15 = [70 x i8] c" You should have received a copy of the GNU General Public License\0A\00"
@.str.16 = [78 x i8] c" along with this program. If not, see <http://www.gnu.org/licenses/>. */\0A\00"
@.str.17 = [23 x i8] c"error writing to '%s'\0A\00"
define void @output_lbrk_tables(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [2 x i8*]
%8 = alloca [2 x i32*]
%9 = alloca i64
%10 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 0
store i8* %11, i8** %12
%13 = load i8*, i8** %5
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 1
store i8* %13, i8** %14
store i64 0, i64* %9
br label %15
15: ; preds = %37, %3
%16 = load i64, i64* %9
%17 = icmp ult i64 %16, 2
br i1 %17, label %18, label %40
18: ; preds = %15
%19 = load i64, i64* %9
%20 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 %19
%21 = load i8*, i8** %20
%22 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = load i64, i64* %9
%24 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 %23
store i32* %22, i32** %24
%25 = load i64, i64* %9
%26 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 %25
%27 = load i32*, i32** %26
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %36
29: ; preds = %18
%30 = load i32*, i32** @stderr
%31 = load i64, i64* %9
%32 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 %31
%33 = load i8*, i8** %32
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %30, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %33)
%35 = call i32 @exit(i32 1)
unreachable
36: ; preds = %18
br label %37
37: ; preds = %36
%38 = load i64, i64* %9
%39 = add i64 %38, 1
store i64 %39, i64* %9
br label %15
40: ; preds = %15
store i64 0, i64* %9
br label %41
41: ; preds = %87, %40
%42 = load i64, i64* %9
%43 = icmp ult i64 %42, 2
br i1 %43, label %44, label %90
44: ; preds = %41
%45 = load i64, i64* %9
%46 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 %45
%47 = load i32*, i32** %46
store i32* %47, i32** %10
%48 = load i32*, i32** %10
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%50 = load i32*, i32** %10
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%52 = load i32*, i32** %10
%53 = load i8*, i8** %6
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i8* %53)
%55 = load i32*, i32** %10
%56 = call i32 (i32*, i8*, ...) @fprintf(i32* %55, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%57 = load i32*, i32** %10
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0))
%59 = load i32*, i32** %10
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%61 = load i32*, i32** %10
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %61, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0))
%63 = load i32*, i32** %10
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.8, i64 0, i64 0))
%65 = load i32*, i32** %10
%66 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%67 = load i32*, i32** %10
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %67, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%69 = load i32*, i32** %10
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%71 = load i32*, i32** %10
%72 = call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.11, i64 0, i64 0))
%73 = load i32*, i32** %10
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.12, i64 0, i64 0))
%75 = load i32*, i32** %10
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.13, i64 0, i64 0))
%77 = load i32*, i32** %10
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %77, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%79 = load i32*, i32** %10
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %79, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%81 = load i32*, i32** %10
%82 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.15, i64 0, i64 0))
%83 = load i32*, i32** %10
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.16, i64 0, i64 0))
%85 = load i32*, i32** %10
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %85, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %87
87: ; preds = %44
%88 = load i64, i64* %9
%89 = add i64 %88, 1
store i64 %89, i64* %9
br label %41
90: ; preds = %41
%91 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 0
%92 = load i32*, i32** %91
%93 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 1
%94 = load i32*, i32** %93
%95 = call i32 @output_lbp(i32* %92, i32* %94)
store i64 0, i64* %9
br label %96
96: ; preds = %119, %90
%97 = load i64, i64* %9
%98 = icmp ult i64 %97, 2
br i1 %98, label %99, label %122
99: ; preds = %96
%100 = load i64, i64* %9
%101 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 %100
%102 = load i32*, i32** %101
%103 = call i64 @ferror(i32* %102)
%104 = icmp ne i64 %103, 0
br i1 %104, label %111, label %105
105: ; preds = %99
%106 = load i64, i64* %9
%107 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 %106
%108 = load i32*, i32** %107
%109 = call i64 @fclose(i32* %108)
%110 = icmp ne i64 %109, 0
br i1 %110, label %111, label %118
111: ; preds = %105, %99
%112 = load i32*, i32** @stderr
%113 = load i64, i64* %9
%114 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 %113
%115 = load i8*, i8** %114
%116 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* %115)
%117 = call i32 @exit(i32 1)
unreachable
118: ; preds = %105
br label %119
119: ; preds = %118
%120 = load i64, i64* %9
%121 = add i64 %120, 1
store i64 %121, i64* %9
br label %96
122: ; preds = %96
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@stderr = global i32* null
@.str.1 = [30 x i8] c"cannot open '%s' for writing\0A\00"
@.str.2 = [45 x i8] c"/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\0A\00"
@.str.3 = [56 x i8] c"/* Line breaking properties of Unicode characters. */\0A\00"
@.str.4 = [68 x i8] c"/* Generated automatically by gen-uni-tables.c for Unicode %s. */\0A\00"
@.str.6 = [71 x i8] c"/* Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.\0A\00"
@.str.7 = [73 x i8] c" This program is free software: you can redistribute it and/or modify\0A\00"
@.str.8 = [73 x i8] c" it under the terms of the GNU General Public License as published by\0A\00"
@.str.9 = [70 x i8] c" the Free Software Foundation; either version 3 of the License, or\0A\00"
@.str.10 = [40 x i8] c" (at your option) any later version.\0A\00"
@.str.11 = [68 x i8] c" This program is distributed in the hope that it will be useful,\0A\00"
@.str.12 = [67 x i8] c" but WITHOUT ANY WARRANTY; without even the implied warranty of\0A\00"
@.str.13 = [66 x i8] c" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0A\00"
@.str.14 = [49 x i8] c" GNU General Public License for more details.\0A\00"
@.str.15 = [70 x i8] c" You should have received a copy of the GNU General Public License\0A\00"
@.str.16 = [78 x i8] c" along with this program. If not, see <http://www.gnu.org/licenses/>. */\0A\00"
@.str.17 = [23 x i8] c"error writing to '%s'\0A\00"
define void @output_lbrk_tables(i8* %0, i8* %1, i8* %2) {
%4 = alloca [2 x i8*]
%5 = alloca [2 x i32*]
%6 = bitcast [2 x i8*]* %4 to i8*
%7 = bitcast [2 x i32*]* %5 to i8*
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
store i8* %0, i8** %8
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 1
store i8* %1, i8** %9
%10 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [2 x i32*], [2 x i32*]* %5, i64 0, i64 0
store i32* %10, i32** %11
%12 = icmp eq i32* %10, null
br i1 %12, label %17, label %13
13: ; preds = %3
%14 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [2 x i32*], [2 x i32*]* %5, i64 0, i64 1
store i32* %14, i32** %15
%16 = icmp eq i32* %14, null
br i1 %16, label %17, label %22
17: ; preds = %13, %3
%18 = phi i8* [ %0, %3 ], [ %1, %13 ]
%19 = load i32*, i32** @stderr
%20 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %18)
%21 = tail call i32 @exit(i32 1)
unreachable
22: ; preds = %13, %45
%23 = phi i32* [ %47, %45 ], [ %10, %13 ]
%24 = phi i1 [ false, %45 ], [ true, %13 ]
%25 = phi i64 [ 2, %45 ], [ 1, %13 ]
%26 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i64 44, i64 1, i32* %23)
%27 = tail call i64 @fwrite(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0), i64 55, i64 1, i32* %23)
%28 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i8* %2)
%29 = tail call i32 @fputc(i32 10, i32* %23)
%30 = tail call i64 @fwrite(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0), i64 70, i64 1, i32* %23)
%31 = tail call i32 @fputc(i32 10, i32* %23)
%32 = tail call i64 @fwrite(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0), i64 72, i64 1, i32* %23)
%33 = tail call i64 @fwrite(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.8, i64 0, i64 0), i64 72, i64 1, i32* %23)
%34 = tail call i64 @fwrite(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0), i64 69, i64 1, i32* %23)
%35 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i64 39, i64 1, i32* %23)
%36 = tail call i32 @fputc(i32 10, i32* %23)
%37 = tail call i64 @fwrite(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.11, i64 0, i64 0), i64 67, i64 1, i32* %23)
%38 = tail call i64 @fwrite(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.12, i64 0, i64 0), i64 66, i64 1, i32* %23)
%39 = tail call i64 @fwrite(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.13, i64 0, i64 0), i64 65, i64 1, i32* %23)
%40 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0), i64 48, i64 1, i32* %23)
%41 = tail call i32 @fputc(i32 10, i32* %23)
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.15, i64 0, i64 0), i64 69, i64 1, i32* %23)
%43 = tail call i64 @fwrite(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.16, i64 0, i64 0), i64 77, i64 1, i32* %23)
%44 = tail call i32 @fputc(i32 10, i32* %23)
br i1 %24, label %45, label %48
45: ; preds = %22
%46 = getelementptr inbounds [2 x i32*], [2 x i32*]* %5, i64 0, i64 %25
%47 = load i32*, i32** %46
br label %22
48: ; preds = %22
%49 = tail call i32 @output_lbp(i32* %10, i32* %14)
%50 = tail call i64 @ferror(i32* %10)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %48
%53 = tail call i64 @fclose(i32* %10)
%54 = icmp eq i64 %53, 0
br i1 %54, label %62, label %55
55: ; preds = %65, %62, %52, %48
%56 = phi i64 [ 0, %52 ], [ 0, %48 ], [ 1, %62 ], [ 1, %65 ]
%57 = load i32*, i32** @stderr
%58 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 %56
%59 = load i8*, i8** %58
%60 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* %59)
%61 = tail call i32 @exit(i32 1)
unreachable
62: ; preds = %52
%63 = tail call i64 @ferror(i32* %14)
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %55
65: ; preds = %62
%66 = tail call i64 @fclose(i32* %14)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %55
68: ; preds = %65
ret void
}