#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*/ assert(int);
char *calloc(int, int);
int check_hyphenation(char *, char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ lou_free();
int main(int argc, char **argv) {
  int ret = 0;
  char *tables = "tables/cs-g1.ctb,tables/hyph_cs_CZ.dic";
  char *word = "xxx";
  char *hyphens = calloc(5, sizeof(char));
  hyphens[0] = '0';
  hyphens[1] = '0';
  hyphens[2] = '0';
  ret = check_hyphenation(tables, word, hyphens);
  assert(hyphens[3] == '\0');
  assert(hyphens[4] == '\0');
  free(hyphens);
  lou_free();
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xe8c(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xea8(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    $0x5,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movb   $0x30,(%rax)
mov    -0x30(%rbp),%rax
movb   $0x30,0x1(%rax)
mov    -0x30(%rbp),%rax
movb   $0x30,0x2(%rax)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <check_hyphenation@plt>
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x30(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x30(%rbp),%rdi
call   1040 <free@plt>
mov    $0x0,%al
call   1060 <lou_free@plt>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x5,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
movw   $0x3030,(%rax)
movb   $0x30,0x2(%rax)
lea    0xe8b(%rip),%rdi
lea    0xeab(%rip),%rsi
mov    %rax,%rdx
call   1030 <check_hyphenation@plt>
mov    %eax,%ebp
xor    %edi,%edi
cmpb   $0x0,0x3(%rbx)
sete   %dil
call   1070 <assert@plt>
xor    %edi,%edi
cmpb   $0x0,0x4(%rbx)
sete   %dil
call   1070 <assert@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
xor    %eax,%eax
call   1060 <lou_free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"tables/cs-g1.ctb,tables/hyph_cs_CZ.dic\00"
@.str.1 = [4 x i8] c"xxx\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %8
%10 = call i8* @calloc(i32 5, i32 1)
store i8* %10, i8** %9
%11 = load i8*, i8** %9
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 48, i8* %12
%13 = load i8*, i8** %9
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 48, i8* %14
%15 = load i8*, i8** %9
%16 = getelementptr inbounds i8, i8* %15, i64 2
store i8 48, i8* %16
%17 = load i8*, i8** %7
%18 = load i8*, i8** %8
%19 = load i8*, i8** %9
%20 = call i32 @check_hyphenation(i8* %17, i8* %18, i8* %19)
store i32 %20, i32* %6
%21 = load i8*, i8** %9
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 0
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i8*, i8** %9
%29 = getelementptr inbounds i8, i8* %28, i64 4
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i8*, i8** %9
%36 = call i32 @free(i8* %35)
%37 = call i32 (...) @lou_free()
%38 = load i32, i32* %6
ret i32 %38
}

LLVM IR (-O2):
@.str = [39 x i8] c"tables/cs-g1.ctb,tables/hyph_cs_CZ.dic\00"
@.str.1 = [4 x i8] c"xxx\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(5) i8* @calloc(i32 5, i32 1)
store i8 48, i8* %3
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8 48, i8* %4
%5 = getelementptr inbounds i8, i8* %3, i64 2
store i8 48, i8* %5
%6 = tail call i32 @check_hyphenation(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = getelementptr inbounds i8, i8* %3, i64 3
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = getelementptr inbounds i8, i8* %3, i64 4
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @free(i8* %3)
%18 = tail call i32 (...) @lou_free()
ret i32 %6
}