#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*/ alloca_code;

/* Variables and functions */
scalar_t__ chaz_CC_test_link(char *);
int /*<<< orphan*/ chaz_ConfWriter_add_def(char *, char *);
scalar_t__ chaz_HeadCheck_check_many_headers(char const **);
int /*<<< orphan*/ sprintf(char *, char const *, char *, char *);
void chaz_Memory_probe_alloca(void) {
  static const char alloca_code[] = "#include <%s>\n"
                                    "int main() {"
                                    "\n"
                                    "void *foo = %s(1);"
                                    "\n"
                                    "return 0;"
                                    "\n"
                                    "}"
                                    "\n";
  int has_alloca = 0;
  int has_builtin_alloca = 0;
  char code_buf[sizeof(alloca_code) + 100];
  {
    const char *mman_headers[] = {"sys/types.h", "sys/mman.h", NULL};
    if (chaz_HeadCheck_check_many_headers((const char **)mman_headers)) {
      chaz_ConfWriter_add_def("HAS_SYS_MMAN_H", NULL);
    }
  }
  sprintf(code_buf, alloca_code, "alloca.h", "alloca");
  if (chaz_CC_test_link(code_buf)) {
    has_alloca = 1;
    chaz_ConfWriter_add_def("HAS_ALLOCA_H", NULL);
    chaz_ConfWriter_add_def("alloca", "alloca");
  }
  if (!has_alloca) {
    sprintf(code_buf, alloca_code, "stdlib.h", "alloca");
    if (chaz_CC_test_link(code_buf)) {
      has_alloca = 1;
      chaz_ConfWriter_add_def("ALLOCA_IN_STDLIB_H", NULL);
      chaz_ConfWriter_add_def("alloca", "alloca");
    }
  }
  if (!has_alloca) {
    sprintf(code_buf, alloca_code, "stdio.h", "__builtin_alloca");
    if (chaz_CC_test_link(code_buf)) {
      has_builtin_alloca = 1;
      chaz_ConfWriter_add_def("alloca", "__builtin_alloca");
    }
  }
  if (!(has_alloca || has_builtin_alloca)) {
    sprintf(code_buf, alloca_code, "malloc.h", "alloca");
    if (chaz_CC_test_link(code_buf)) {
      has_alloca = 1;
      chaz_ConfWriter_add_def("HAS_MALLOC_H", NULL);
      chaz_ConfWriter_add_def("alloca", "alloca");
    }
  }
  if (!(has_alloca || has_builtin_alloca)) {
    sprintf(code_buf, alloca_code, "malloc.h", "_alloca");
    if (chaz_CC_test_link(code_buf)) {
      chaz_ConfWriter_add_def("HAS_MALLOC_H", NULL);
      chaz_ConfWriter_add_def("alloca", "_alloca");
    }
  }
}


x86 assembly (clang, -O0):
<chaz_Memory_probe_alloca>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0x2ca0(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0x2c9a(%rip),%rax
mov    %rax,-0xc8(%rbp)
mov    0x2c94(%rip),%rax
mov    %rax,-0xc0(%rbp)
lea    -0xd0(%rbp),%rdi
call   1030 <chaz_HeadCheck_check_many_headers@plt>
cmp    $0x0,%rax
je     11a9 <chaz_Memory_probe_alloca+0x69>
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    -0xb0(%rbp),%rdi
lea    0xe49(%rip),%rsi
lea    0xea3(%rip),%rdx
lea    0xee0(%rip),%rcx
call   1060 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <chaz_CC_test_link@plt>
cmp    $0x0,%rax
je     1206 <chaz_Memory_probe_alloca+0xc6>
movl   $0x1,-0x4(%rbp)
lea    0xe7c(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xea7(%rip),%rsi
mov    %rsi,%rdi
call   1040 <chaz_ConfWriter_add_def@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1272 <chaz_Memory_probe_alloca+0x132>
lea    -0xb0(%rbp),%rdi
lea    0xde2(%rip),%rsi
lea    0xe52(%rip),%rdx
lea    0xe79(%rip),%rcx
call   1060 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <chaz_CC_test_link@plt>
cmp    $0x0,%rax
je     126d <chaz_Memory_probe_alloca+0x12d>
movl   $0x1,-0x4(%rbp)
lea    0xe2b(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xe40(%rip),%rsi
mov    %rsi,%rdi
call   1040 <chaz_ConfWriter_add_def@plt>
jmp    1272 <chaz_Memory_probe_alloca+0x132>
cmpl   $0x0,-0x4(%rbp)
jne    12d2 <chaz_Memory_probe_alloca+0x192>
lea    -0xb0(%rbp),%rdi
lea    0xd76(%rip),%rsi
lea    0xe02(%rip),%rdx
lea    0xe03(%rip),%rcx
call   1060 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <chaz_CC_test_link@plt>
cmp    $0x0,%rax
je     12cd <chaz_Memory_probe_alloca+0x18d>
movl   $0x1,-0x8(%rbp)
lea    0xde4(%rip),%rdi
lea    0xdd3(%rip),%rsi
call   1040 <chaz_ConfWriter_add_def@plt>
jmp    12d2 <chaz_Memory_probe_alloca+0x192>
cmpl   $0x0,-0x4(%rbp)
jne    1348 <chaz_Memory_probe_alloca+0x208>
cmpl   $0x0,-0x8(%rbp)
jne    1348 <chaz_Memory_probe_alloca+0x208>
lea    -0xb0(%rbp),%rdi
lea    0xd0c(%rip),%rsi
lea    0xdb1(%rip),%rdx
lea    0xda3(%rip),%rcx
call   1060 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <chaz_CC_test_link@plt>
cmp    $0x0,%rax
je     1343 <chaz_Memory_probe_alloca+0x203>
movl   $0x1,-0x4(%rbp)
lea    0xd8a(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xd6a(%rip),%rsi
mov    %rsi,%rdi
call   1040 <chaz_ConfWriter_add_def@plt>
jmp    1348 <chaz_Memory_probe_alloca+0x208>
cmpl   $0x0,-0x4(%rbp)
jne    13bb <chaz_Memory_probe_alloca+0x27b>
cmpl   $0x0,-0x8(%rbp)
jne    13bb <chaz_Memory_probe_alloca+0x27b>
lea    -0xb0(%rbp),%rdi
lea    0xc96(%rip),%rsi
lea    0xd3b(%rip),%rdx
lea    0xd2c(%rip),%rcx
call   1060 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <chaz_CC_test_link@plt>
cmp    $0x0,%rax
je     13b6 <chaz_Memory_probe_alloca+0x276>
lea    0xd1b(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xcfb(%rip),%rdi
lea    0xcf3(%rip),%rsi
call   1040 <chaz_ConfWriter_add_def@plt>
jmp    13bb <chaz_Memory_probe_alloca+0x27b>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_Memory_probe_alloca>:
push   %r15
push   %r14
push   %rbx
sub    $0xa0,%rsp
mov    0x2cbd(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2ca1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <chaz_HeadCheck_check_many_headers@plt>
test   %rax,%rax
je     117e <chaz_Memory_probe_alloca+0x3e>
lea    0xedb(%rip),%rdi
xor    %esi,%esi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xe7b(%rip),%rsi
lea    0xed5(%rip),%rdx
lea    0xf12(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rcx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <chaz_CC_test_link@plt>
test   %rax,%rax
je     11b7 <chaz_Memory_probe_alloca+0x77>
lea    0xeb5(%rip),%r14
jmp    11ee <chaz_Memory_probe_alloca+0xae>
lea    0xe42(%rip),%rsi
lea    0xeb2(%rip),%rdx
lea    0xed9(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rcx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <chaz_CC_test_link@plt>
test   %rax,%rax
je     1214 <chaz_Memory_probe_alloca+0xd4>
lea    0xe92(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xea6(%rip),%rdi
mov    %r15,%rsi
call   1040 <chaz_ConfWriter_add_def@plt>
add    $0xa0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xde5(%rip),%rsi
lea    0xe71(%rip),%rdx
lea    0xe72(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rcx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <chaz_CC_test_link@plt>
test   %rax,%rax
jne    11f8 <chaz_Memory_probe_alloca+0xb8>
lea    0xdb5(%rip),%rsi
lea    0xe5a(%rip),%rdx
lea    0xe4c(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rcx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <chaz_CC_test_link@plt>
lea    0xe3f(%rip),%r14
test   %rax,%rax
jne    11ee <chaz_Memory_probe_alloca+0xae>
lea    0xd7a(%rip),%rsi
lea    0xe1f(%rip),%rdx
lea    0xe10(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rcx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <chaz_CC_test_link@plt>
test   %rax,%rax
jne    11ee <chaz_Memory_probe_alloca+0xae>
jmp    1207 <chaz_Memory_probe_alloca+0xc7>

LLVM IR (-O0):
@chaz_Memory_probe_alloca.alloca_code = internal constant [59 x i8] c"#include <%s>\0Aint main() {\0Avoid *foo = %s(1);\0Areturn 0;\0A}\0A\00"
@.str = [12 x i8] c"sys/types.h\00"
@.str.1 = [11 x i8] c"sys/mman.h\00"
@__const.chaz_Memory_probe_alloca.mman_headers = [3 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [15 x i8] c"HAS_SYS_MMAN_H\00"
@.str.3 = [9 x i8] c"alloca.h\00"
@.str.4 = [7 x i8] c"alloca\00"
@.str.5 = [13 x i8] c"HAS_ALLOCA_H\00"
@.str.6 = [9 x i8] c"stdlib.h\00"
@.str.7 = [19 x i8] c"ALLOCA_IN_STDLIB_H\00"
@.str.8 = [8 x i8] c"stdio.h\00"
@.str.9 = [17 x i8] c"__builtin_alloca\00"
@.str.10 = [9 x i8] c"malloc.h\00"
@.str.11 = [13 x i8] c"HAS_MALLOC_H\00"
@.str.12 = [8 x i8] c"_alloca\00"
define void @chaz_Memory_probe_alloca() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [159 x i8]
%4 = alloca [3 x i8*]
store i32 0, i32* %1
store i32 0, i32* %2
%5 = bitcast [3 x i8*]* %4 to i8*
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 0
%7 = call i64 @chaz_HeadCheck_check_many_headers(i8** %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* null)
br label %11
11: ; preds = %9, %0
%12 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%13 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%14 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%15 = call i64 @chaz_CC_test_link(i8* %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %11
store i32 1, i32* %1
%18 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* null)
%19 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %20
20: ; preds = %17, %11
%21 = load i32, i32* %1
%22 = icmp ne i32 %21, 0
br i1 %22, label %33, label %23
23: ; preds = %20
%24 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%25 = call i32 @sprintf(i8* %24, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%26 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%27 = call i64 @chaz_CC_test_link(i8* %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %23
store i32 1, i32* %1
%30 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8* null)
%31 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %32
32: ; preds = %29, %23
br label %33
33: ; preds = %32, %20
%34 = load i32, i32* %1
%35 = icmp ne i32 %34, 0
br i1 %35, label %45, label %36
36: ; preds = %33
%37 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%38 = call i32 @sprintf(i8* %37, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%39 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%40 = call i64 @chaz_CC_test_link(i8* %39)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %36
store i32 1, i32* %2
%43 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
br label %44
44: ; preds = %42, %36
br label %45
45: ; preds = %44, %33
%46 = load i32, i32* %1
%47 = icmp ne i32 %46, 0
br i1 %47, label %61, label %48
48: ; preds = %45
%49 = load i32, i32* %2
%50 = icmp ne i32 %49, 0
br i1 %50, label %61, label %51
51: ; preds = %48
%52 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%53 = call i32 @sprintf(i8* %52, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%54 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%55 = call i64 @chaz_CC_test_link(i8* %54)
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %51
store i32 1, i32* %1
%58 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* null)
%59 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %60
60: ; preds = %57, %51
br label %61
61: ; preds = %60, %48, %45
%62 = load i32, i32* %1
%63 = icmp ne i32 %62, 0
br i1 %63, label %77, label %64
64: ; preds = %61
%65 = load i32, i32* %2
%66 = icmp ne i32 %65, 0
br i1 %66, label %77, label %67
67: ; preds = %64
%68 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%69 = call i32 @sprintf(i8* %68, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%70 = getelementptr inbounds [159 x i8], [159 x i8]* %3, i64 0, i64 0
%71 = call i64 @chaz_CC_test_link(i8* %70)
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %67
%74 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* null)
%75 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
br label %76
76: ; preds = %73, %67
br label %77
77: ; preds = %76, %64, %61
ret void
}

LLVM IR (-O2):
@chaz_Memory_probe_alloca.alloca_code = internal constant [59 x i8] c"#include <%s>\0Aint main() {\0Avoid *foo = %s(1);\0Areturn 0;\0A}\0A\00"
@.str = [12 x i8] c"sys/types.h\00"
@.str.1 = [11 x i8] c"sys/mman.h\00"
@__const.chaz_Memory_probe_alloca.mman_headers = [3 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [15 x i8] c"HAS_SYS_MMAN_H\00"
@.str.3 = [9 x i8] c"alloca.h\00"
@.str.4 = [7 x i8] c"alloca\00"
@.str.5 = [13 x i8] c"HAS_ALLOCA_H\00"
@.str.6 = [9 x i8] c"stdlib.h\00"
@.str.7 = [19 x i8] c"ALLOCA_IN_STDLIB_H\00"
@.str.8 = [8 x i8] c"stdio.h\00"
@.str.9 = [17 x i8] c"__builtin_alloca\00"
@.str.10 = [9 x i8] c"malloc.h\00"
@.str.11 = [13 x i8] c"HAS_MALLOC_H\00"
@.str.12 = [8 x i8] c"_alloca\00"
define void @chaz_Memory_probe_alloca() {
%1 = alloca [159 x i8]
%2 = alloca [3 x i8*]
%3 = getelementptr inbounds [159 x i8], [159 x i8]* %1, i64 0, i64 0
%4 = bitcast [3 x i8*]* %2 to i8*
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%6 = call i64 @chaz_HeadCheck_check_many_headers(i8** %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* null)
br label %10
10: ; preds = %8, %0
%11 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%12 = call i64 @chaz_CC_test_link(i8* %3)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %30
14: ; preds = %10
%15 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%16 = call i64 @chaz_CC_test_link(i8* %3)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%20 = call i64 @chaz_CC_test_link(i8* %3)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %34
22: ; preds = %18
%23 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%24 = call i64 @chaz_CC_test_link(i8* %3)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @chaz_Memory_probe_alloca.alloca_code, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%28 = call i64 @chaz_CC_test_link(i8* %3)
%29 = icmp eq i64 %28, 0
br i1 %29, label %37, label %30
30: ; preds = %26, %22, %14, %10
%31 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), %10 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), %14 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), %22 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), %26 ]
%32 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), %10 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), %14 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), %22 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), %26 ]
%33 = call i32 @chaz_ConfWriter_add_def(i8* %31, i8* null)
br label %34
34: ; preds = %30, %18
%35 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), %18 ], [ %32, %30 ]
%36 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %35)
br label %37
37: ; preds = %34, %26
ret void
}