#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int fid;
};
typedef TYPE_1__ XFontStruct;
typedef int /*<<< orphan*/ *XFontSet;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ LC_CTYPE;
int /*<<< orphan*/ True;
int /*<<< orphan*/ *XCreateFontSet(int /*<<< orphan*/ *, char *, char ***,
                                   int *, char **);
int XFontsOfFontSet(int /*<<< orphan*/ *, TYPE_1__ ***, char ***);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XSupportsLocale();
int /*<<< orphan*/ XSynchronize(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
char *setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  Display *d;
  XFontSet fs;
  int i, rc = 0;
  int n_miss, num;
  char *base_font_name = NULL;
  char *lang = "";
  char **miss, *def;
  char **fn_list;
  XFontStruct **fs_list;
  for (i = 1; i < argc; i++) {
    char *opt = argv[i];
    if (!strcmp(opt, "-lang")) {
      lang = argv[++i];
    } else if (!strcmp(opt, "-fs")) {
      base_font_name = argv[++i];
    }
  }
  printf("[%s]\n", setlocale(LC_CTYPE, lang));
  d = XOpenDisplay(NULL);
  if (!d) {
    printf("Can't open display\n");
    exit(101);
  }
  if (!XSupportsLocale()) {
    printf("X Locale [%s] is not supported.\n", lang);
    exit(111);
  }
  XSynchronize(d, True);
  fs = XCreateFontSet(d, base_font_name, &miss, &n_miss, &def);
  if (fs == NULL) {
    printf("Can't create fontset [%s]\n", base_font_name);
    exit(202);
  }
  rc = 0;
  printf("missing count = %d\n", n_miss);
  if (n_miss > 0) {
    for (i = 0; i < n_miss; i++) {
      printf("Missing font #%d [%s]\n", i, miss[i]);
    }
    rc = n_miss;
  }
  num = XFontsOfFontSet(fs, &fs_list, &fn_list);
  for (i = 0; i < num; i++) {
    printf("FID=0x%08x [%s]\n", fs_list[i]->fid, fn_list[i]);
  }
  exit(rc);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x28(%rbp)
movq   $0x0,-0x38(%rbp)
lea    0xe82(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1262 <main+0xd2>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
lea    0xe12(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1219 <main+0x89>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x40(%rbp)
jmp    124f <main+0xbf>
mov    -0x68(%rbp),%rdi
lea    0xde2(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    124a <main+0xba>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x38(%rbp)
jmp    124f <main+0xbf>
jmp    1254 <main+0xc4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11c7 <main+0x37>
mov    0x2d7f(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rsi
call   1080 <setlocale@plt>
mov    %rax,%rsi
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <XOpenDisplay@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12b5 <main+0x125>
lea    0xd66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x65,%edi
call   10b0 <exit@plt>
mov    $0x0,%al
call   1070 <XSupportsLocale@plt>
cmp    $0x0,%eax
jne    12e1 <main+0x151>
mov    -0x40(%rbp),%rsi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x6f,%edi
call   10b0 <exit@plt>
mov    -0x18(%rbp),%rdi
mov    0x2cf4(%rip),%rax
mov    (%rax),%esi
call   1090 <XSynchronize@plt>
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%rsi
lea    -0x48(%rbp),%rdx
lea    -0x2c(%rbp),%rcx
lea    -0x50(%rbp),%r8
call   10a0 <XCreateFontSet@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1337 <main+0x1a7>
mov    -0x38(%rbp),%rsi
lea    0xd19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xca,%edi
call   10b0 <exit@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    139d <main+0x20d>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1397 <main+0x207>
mov    -0x24(%rbp),%esi
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xcec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1360 <main+0x1d0>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rsi
lea    -0x58(%rbp),%rdx
call   1060 <XFontsOfFontSet@plt>
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    13fa <main+0x26a>
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%esi
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xca0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13b8 <main+0x228>
mov    -0x28(%rbp),%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
cmp    $0x2,%edi
jl     1230 <main+0x90>
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe6b(%rip),%rax
mov    %rax,0x10(%rsp)
mov    $0x1,%r15d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
lea    0xe28(%rip),%r12
jmp    11f7 <main+0x57>
nopw   0x0(%rax,%rax,1)
lea    0x1(%r13),%r15d
mov    0x8(%rbx,%r13,8),%rax
mov    %rax,0x10(%rsp)
add    $0x1,%r15d
cmp    %ebp,%r15d
jge    1243 <main+0xa3>
movslq %r15d,%r13
mov    (%rbx,%r13,8),%r14
mov    %r14,%rdi
mov    %r12,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     11e0 <main+0x40>
mov    %r14,%rdi
lea    0xdef(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    11ee <main+0x4e>
lea    0x1(%r13),%r15d
mov    0x8(%rbx,%r13,8),%rax
mov    %rax,0x8(%rsp)
jmp    11ee <main+0x4e>
lea    0xdf3(%rip),%rax
mov    %rax,0x10(%rsp)
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rsp),%rbp
mov    %rbp,%rsi
call   1090 <setlocale@plt>
lea    0xe0b(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <XOpenDisplay@plt>
test   %rax,%rax
jne    128c <main+0xec>
lea    0xe05(%rip),%rdi
call   1030 <puts@plt>
mov    $0x65,%edi
call   10c0 <exit@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1080 <XSupportsLocale@plt>
test   %eax,%eax
jne    12b5 <main+0x115>
lea    0xd69(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x6f,%edi
call   10c0 <exit@plt>
mov    0x2d24(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10a0 <XSynchronize@plt>
lea    0x28(%rsp),%rdx
lea    0x4(%rsp),%rcx
lea    0x30(%rsp),%r8
mov    %rbx,%rdi
mov    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   10b0 <XCreateFontSet@plt>
test   %rax,%rax
jne    1305 <main+0x165>
lea    0xd3a(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xca,%edi
call   10c0 <exit@plt>
mov    %rax,%r15
mov    0x4(%rsp),%esi
lea    0xd33(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1353 <main+0x1b3>
lea    0xd30(%rip),%r14
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    0x28(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
movslq 0x4(%rsp),%rbx
cmp    %rbx,%rbp
jl     1330 <main+0x190>
lea    0x18(%rsp),%rsi
lea    0x20(%rsp),%rdx
mov    %r15,%rdi
call   1070 <XFontsOfFontSet@plt>
test   %eax,%eax
jle    13a7 <main+0x207>
mov    %eax,%r15d
lea    0xcfe(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x18(%rsp),%rax
mov    (%rax,%rbp,8),%rax
mov    (%rax),%esi
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1380 <main+0x1e0>
mov    %ebx,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@.str = [1 x i8] zeroinitializer
@.str.1 = [6 x i8] c"-lang\00"
@.str.2 = [4 x i8] c"-fs\00"
@.str.3 = [6 x i8] c"[%s]\0A\00"
@LC_CTYPE = global i32 0
@.str.4 = [20 x i8] c"Can't open display\0A\00"
@.str.5 = [33 x i8] c"X Locale [%s] is not supported.\0A\00"
@True = global i32 0
@.str.6 = [27 x i8] c"Can't create fontset [%s]\0A\00"
@.str.7 = [20 x i8] c"missing count = %d\0A\00"
@.str.8 = [23 x i8] c"Missing font #%d [%s]\0A\00"
@.str.9 = [17 x i8] c"FID=0x%08x [%s]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8**
%15 = alloca i8*
%16 = alloca i8**
%17 = alloca %struct.TYPE_3__**
%18 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i8* null, i8** %12
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %13
store i32 1, i32* %8
br label %19
19: ; preds = %52, %2
%20 = load i32, i32* %8
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %55
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %8
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
store i8* %28, i8** %18
%29 = load i8*, i8** %18
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %39, label %32
32: ; preds = %23
%33 = load i8**, i8*** %5
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 1
store i32 %35, i32* %8
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %33, i64 %36
%38 = load i8*, i8** %37
store i8* %38, i8** %13
br label %51
39: ; preds = %23
%40 = load i8*, i8** %18
%41 = call i32 @strcmp(i8* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %50, label %43
43: ; preds = %39
%44 = load i8**, i8*** %5
%45 = load i32, i32* %8
%46 = add nsw i32 %45, 1
store i32 %46, i32* %8
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8*, i8** %44, i64 %47
%49 = load i8*, i8** %48
store i8* %49, i8** %12
br label %50
50: ; preds = %43, %39
br label %51
51: ; preds = %50, %32
br label %52
52: ; preds = %51
%53 = load i32, i32* %8
%54 = add nsw i32 %53, 1
store i32 %54, i32* %8
br label %19
55: ; preds = %19
%56 = load i32, i32* @LC_CTYPE
%57 = load i8*, i8** %13
%58 = call i8* @setlocale(i32 %56, i8* %57)
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %58)
%60 = call i32* @XOpenDisplay(i32* null)
store i32* %60, i32** %6
%61 = load i32*, i32** %6
%62 = icmp ne i32* %61, null
br i1 %62, label %66, label %63
63: ; preds = %55
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%65 = call i32 @exit(i32 101)
unreachable
66: ; preds = %55
%67 = call i32 (...) @XSupportsLocale()
%68 = icmp ne i32 %67, 0
br i1 %68, label %73, label %69
69: ; preds = %66
%70 = load i8*, i8** %13
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %70)
%72 = call i32 @exit(i32 111)
unreachable
73: ; preds = %66
%74 = load i32*, i32** %6
%75 = load i32, i32* @True
%76 = call i32 @XSynchronize(i32* %74, i32 %75)
%77 = load i32*, i32** %6
%78 = load i8*, i8** %12
%79 = call i32* @XCreateFontSet(i32* %77, i8* %78, i8*** %14, i32* %10, i8** %15)
store i32* %79, i32** %7
%80 = load i32*, i32** %7
%81 = icmp eq i32* %80, null
br i1 %81, label %82, label %86
82: ; preds = %73
%83 = load i8*, i8** %12
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %83)
%85 = call i32 @exit(i32 202)
unreachable
86: ; preds = %73
store i32 0, i32* %9
%87 = load i32, i32* %10
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %87)
%89 = load i32, i32* %10
%90 = icmp sgt i32 %89, 0
br i1 %90, label %91, label %109
91: ; preds = %86
store i32 0, i32* %8
br label %92
92: ; preds = %104, %91
%93 = load i32, i32* %8
%94 = load i32, i32* %10
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %107
96: ; preds = %92
%97 = load i32, i32* %8
%98 = load i8**, i8*** %14
%99 = load i32, i32* %8
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %98, i64 %100
%102 = load i8*, i8** %101
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %97, i8* %102)
br label %104
104: ; preds = %96
%105 = load i32, i32* %8
%106 = add nsw i32 %105, 1
store i32 %106, i32* %8
br label %92
107: ; preds = %92
%108 = load i32, i32* %10
store i32 %108, i32* %9
br label %109
109: ; preds = %107, %86
%110 = load i32*, i32** %7
%111 = call i32 @XFontsOfFontSet(i32* %110, %struct.TYPE_3__*** %17, i8*** %16)
store i32 %111, i32* %11
store i32 0, i32* %8
br label %112
112: ; preds = %130, %109
%113 = load i32, i32* %8
%114 = load i32, i32* %11
%115 = icmp slt i32 %113, %114
br i1 %115, label %116, label %133
116: ; preds = %112
%117 = load %struct.TYPE_3__**, %struct.TYPE_3__*** %17
%118 = load i32, i32* %8
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds %struct.TYPE_3__*, %struct.TYPE_3__** %117, i64 %119
%121 = load %struct.TYPE_3__*, %struct.TYPE_3__** %120
%122 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %121, i32 0, i32 0
%123 = load i32, i32* %122
%124 = load i8**, i8*** %16
%125 = load i32, i32* %8
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i8*, i8** %124, i64 %126
%128 = load i8*, i8** %127
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %123, i8* %128)
br label %130
130: ; preds = %116
%131 = load i32, i32* %8
%132 = add nsw i32 %131, 1
store i32 %132, i32* %8
br label %112
133: ; preds = %112
%134 = load i32, i32* %9
%135 = call i32 @exit(i32 %134)
unreachable
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@.str = [1 x i8] zeroinitializer
@.str.1 = [6 x i8] c"-lang\00"
@.str.2 = [4 x i8] c"-fs\00"
@.str.3 = [6 x i8] c"[%s]\0A\00"
@LC_CTYPE = global i32 0
@.str.5 = [33 x i8] c"X Locale [%s] is not supported.\0A\00"
@True = global i32 0
@.str.6 = [27 x i8] c"Can't create fontset [%s]\0A\00"
@.str.7 = [20 x i8] c"missing count = %d\0A\00"
@.str.8 = [23 x i8] c"Missing font #%d [%s]\0A\00"
@.str.9 = [17 x i8] c"FID=0x%08x [%s]\0A\00"
@str = [19 x i8] c"Can't open display\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca %struct.TYPE_3__**
%8 = bitcast i32* %3 to i8*
%9 = bitcast i8*** %4 to i8*
%10 = bitcast i8** %5 to i8*
%11 = bitcast i8*** %6 to i8*
%12 = bitcast %struct.TYPE_3__*** %7 to i8*
%13 = icmp sgt i32 %0, 1
br i1 %13, label %14, label %42
14: ; preds = %2, %36
%15 = phi i32 [ %40, %36 ], [ 1, %2 ]
%16 = phi i8* [ %38, %36 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ]
%17 = phi i8* [ %37, %36 ], [ null, %2 ]
%18 = sext i32 %15 to i64
%19 = getelementptr inbounds i8*, i8** %1, i64 %18
%20 = load i8*, i8** %19
%21 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %28
23: ; preds = %14
%24 = add nsw i32 %15, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %1, i64 %25
%27 = load i8*, i8** %26
br label %36
28: ; preds = %14
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = add nsw i32 %15, 1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %1, i64 %33
%35 = load i8*, i8** %34
br label %36
36: ; preds = %28, %31, %23
%37 = phi i8* [ %17, %28 ], [ %35, %31 ], [ %17, %23 ]
%38 = phi i8* [ %16, %28 ], [ %16, %31 ], [ %27, %23 ]
%39 = phi i32 [ %15, %28 ], [ %32, %31 ], [ %24, %23 ]
%40 = add nsw i32 %39, 1
%41 = icmp slt i32 %40, %0
br i1 %41, label %14, label %42
42: ; preds = %36, %2
%43 = phi i8* [ null, %2 ], [ %37, %36 ]
%44 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ], [ %38, %36 ]
%45 = load i32, i32* @LC_CTYPE
%46 = tail call i8* @setlocale(i32 %45, i8* %44)
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %46)
%48 = tail call i32* @XOpenDisplay(i32* null)
%49 = icmp eq i32* %48, null
br i1 %49, label %50, label %53
50: ; preds = %42
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%52 = tail call i32 @exit(i32 101)
unreachable
53: ; preds = %42
%54 = tail call i32 (...) @XSupportsLocale()
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %53
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %44)
%58 = tail call i32 @exit(i32 111)
unreachable
59: ; preds = %53
%60 = load i32, i32* @True
%61 = tail call i32 @XSynchronize(i32* %48, i32 %60)
%62 = call i32* @XCreateFontSet(i32* %48, i8* %43, i8*** %4, i32* %3, i8** %5)
%63 = icmp eq i32* %62, null
br i1 %63, label %64, label %67
64: ; preds = %59
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %43)
%66 = call i32 @exit(i32 202)
unreachable
67: ; preds = %59
%68 = load i32, i32* %3
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %68)
%70 = load i32, i32* %3
%71 = icmp sgt i32 %70, 0
br i1 %71, label %72, label %83
72: ; preds = %67, %72
%73 = phi i64 [ %79, %72 ], [ 0, %67 ]
%74 = load i8**, i8*** %4
%75 = getelementptr inbounds i8*, i8** %74, i64 %73
%76 = load i8*, i8** %75
%77 = trunc i64 %73 to i32
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %77, i8* %76)
%79 = add nuw nsw i64 %73, 1
%80 = load i32, i32* %3
%81 = sext i32 %80 to i64
%82 = icmp slt i64 %79, %81
br i1 %82, label %72, label %83
83: ; preds = %72, %67
%84 = phi i32 [ 0, %67 ], [ %80, %72 ]
%85 = call i32 @XFontsOfFontSet(i32* %62, %struct.TYPE_3__*** %7, i8*** %6)
%86 = icmp sgt i32 %85, 0
br i1 %86, label %87, label %102
87: ; preds = %83
%88 = zext i32 %85 to i64
br label %89
89: ; preds = %87, %89
%90 = phi i64 [ 0, %87 ], [ %100, %89 ]
%91 = load %struct.TYPE_3__**, %struct.TYPE_3__*** %7
%92 = getelementptr inbounds %struct.TYPE_3__*, %struct.TYPE_3__** %91, i64 %90
%93 = load %struct.TYPE_3__*, %struct.TYPE_3__** %92
%94 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %93, i64 0, i32 0
%95 = load i32, i32* %94
%96 = load i8**, i8*** %6
%97 = getelementptr inbounds i8*, i8** %96, i64 %90
%98 = load i8*, i8** %97
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %95, i8* %98)
%100 = add nuw nsw i64 %90, 1
%101 = icmp eq i64 %100, %88
br i1 %101, label %102, label %89
102: ; preds = %89, %83
%103 = call i32 @exit(i32 %84)
unreachable
}