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

/* Variables and functions */
int /*<<< orphan*/ memset(char const **, int /*<<< orphan*/, int);
const char **build_conversions(const char *const *in, const char **conv) {
  unsigned char c;
  memset(conv, 0, sizeof(char *) * 256);
  if (in != NULL)
    while (*in != NULL && *(in + 1) != NULL) {
      c = **in;
      in++;
      conv[c] = *in;
      in++;
    }
  return conv;
}


x86 assembly (clang, -O0):
<build_conversions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1030 <memset@plt>
cmpq   $0x0,-0x8(%rbp)
je     11b3 <build_conversions+0xa3>
jmp    1140 <build_conversions+0x30>
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpq   $0x0,(%rcx)
mov    %al,-0x12(%rbp)
je     1162 <build_conversions+0x52>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
test   $0x1,%al
jne    1172 <build_conversions+0x62>
jmp    11ae <build_conversions+0x9e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
movzbl -0x11(%rbp),%ecx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1140 <build_conversions+0x30>
jmp    11b3 <build_conversions+0xa3>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_conversions>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1030 <memset@plt>
test   %rbx,%rbx
je     115c <build_conversions+0x4c>
mov    (%rbx),%rax
test   %rax,%rax
je     115c <build_conversions+0x4c>
add    $0x10,%rbx
nopw   0x0(%rax,%rax,1)
mov    -0x8(%rbx),%rcx
test   %rcx,%rcx
je     115c <build_conversions+0x4c>
movzbl (%rax),%eax
mov    %rcx,(%r14,%rax,8)
mov    (%rbx),%rax
add    $0x10,%rbx
test   %rax,%rax
jne    1140 <build_conversions+0x30>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8** @build_conversions(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = call i32 @memset(i8** %6, i32 0, i32 2048)
%8 = load i8**, i8*** %3
%9 = icmp ne i8** %8, null
br i1 %9, label %10, label %37
10: ; preds = %2
br label %11
11: ; preds = %22, %10
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8**, i8*** %3
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = icmp ne i8* %18, null
br label %20
20: ; preds = %15, %11
%21 = phi i1 [ false, %11 ], [ %19, %15 ]
br i1 %21, label %22, label %36
22: ; preds = %20
%23 = load i8**, i8*** %3
%24 = load i8*, i8** %23
%25 = load i8, i8* %24
store i8 %25, i8* %5
%26 = load i8**, i8*** %3
%27 = getelementptr inbounds i8*, i8** %26, i32 1
store i8** %27, i8*** %3
%28 = load i8**, i8*** %3
%29 = load i8*, i8** %28
%30 = load i8**, i8*** %4
%31 = load i8, i8* %5
%32 = zext i8 %31 to i64
%33 = getelementptr inbounds i8*, i8** %30, i64 %32
store i8* %29, i8** %33
%34 = load i8**, i8*** %3
%35 = getelementptr inbounds i8*, i8** %34, i32 1
store i8** %35, i8*** %3
br label %11
36: ; preds = %20
br label %37
37: ; preds = %36, %2
%38 = load i8**, i8*** %4
ret i8** %38
}

LLVM IR (-O2):
define i8** @build_conversions(i8** %0, i8** returned %1) {
%3 = tail call i32 @memset(i8** %1, i32 0, i32 2048)
%4 = icmp eq i8** %0, null
br i1 %4, label %21, label %5
5: ; preds = %2
%6 = load i8*, i8** %0
%7 = icmp eq i8* %6, null
br i1 %7, label %21, label %8
8: ; preds = %5, %14
%9 = phi i8* [ %19, %14 ], [ %6, %5 ]
%10 = phi i8** [ %18, %14 ], [ %0, %5 ]
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %21, label %14
14: ; preds = %8
%15 = load i8, i8* %9
%16 = zext i8 %15 to i64
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
store i8* %12, i8** %17
%18 = getelementptr inbounds i8*, i8** %10, i64 2
%19 = load i8*, i8** %18
%20 = icmp eq i8* %19, null
br i1 %20, label %21, label %8
21: ; preds = %14, %8, %5, %2
ret i8** %1
}