#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 */
scalar_t__ _tc_snprintf(char *, int, char *, int, char *, char const *,
                        char const *, char const *, char const *, char const *,
                        char const *);
int strlen(char *);
int optstr_filter_desc(char *buf, const char *filter_name,
                       const char *filter_comment, const char *filter_version,
                       const char *filter_author, const char *capabilities,
                       const char *frames_needed) {
  int len = strlen(buf);
  if (_tc_snprintf("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/BackupTheBerlios/tcforge/"
                   "refs/heads/master/libtcutil/optstr.c",
                   179, buf + len, 8192 - len,
                   "\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"\n",
                   filter_name, filter_comment, filter_version, filter_author,
                   capabilities, frames_needed) <= 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<optstr_filter_desc>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x20(%rbp),%rdx
movslq -0x4c(%rbp),%rax
add    %rax,%rdx
mov    $0x2000,%ecx
sub    -0x4c(%rbp),%ecx
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r14
mov    -0x38(%rbp),%rbx
mov    -0x40(%rbp),%r11
mov    -0x48(%rbp),%r10
mov    0x10(%rbp),%rax
lea    0xe7b(%rip),%rdi
mov    $0xb3,%esi
lea    0xf07(%rip),%r8
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1040 <_tc_snprintf@plt>
cmp    $0x0,%rax
jg     11c4 <optstr_filter_desc+0xa4>
movl   $0x1,-0x14(%rbp)
jmp    11cb <optstr_filter_desc+0xab>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<optstr_filter_desc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r13
mov    %r8,%r12
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <strlen@plt>
cltq
add    %rax,%rbp
mov    $0x2000,%ecx
sub    %eax,%ecx
sub    $0x8,%rsp
lea    0xea7(%rip),%rdi
lea    0xf38(%rip),%r8
mov    $0xb3,%esi
mov    %rbp,%rdx
mov    %rbx,%r9
push   0x48(%rsp)
push   %r13
push   %r12
push   %r15
push   %r14
call   1040 <_tc_snprintf@plt>
add    $0x30,%rsp
xor    %ecx,%ecx
test   %rax,%rax
setle  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BackupTheBerlios/tcforge/refs/heads/master/libtcutil/optstr.c\00"
@.str.1 = [36 x i8] c"\22%s\22, \22%s\22, \22%s\22, \22%s\22, \22%s\22, \22%s\22\0A\00"
define i32 @optstr_filter_desc(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
%17 = load i8*, i8** %9
%18 = call i32 @strlen(i8* %17)
store i32 %18, i32* %16
%19 = load i8*, i8** %9
%20 = load i32, i32* %16
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i32, i32* %16
%24 = sub nsw i32 8192, %23
%25 = load i8*, i8** %10
%26 = load i8*, i8** %11
%27 = load i8*, i8** %12
%28 = load i8*, i8** %13
%29 = load i8*, i8** %14
%30 = load i8*, i8** %15
%31 = call i64 @_tc_snprintf(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i32 179, i8* %22, i32 %24, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %25, i8* %26, i8* %27, i8* %28, i8* %29, i8* %30)
%32 = icmp sle i64 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %7
store i32 1, i32* %8
br label %35
34: ; preds = %7
store i32 0, i32* %8
br label %35
35: ; preds = %34, %33
%36 = load i32, i32* %8
ret i32 %36
}

LLVM IR (-O2):
@.str = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BackupTheBerlios/tcforge/refs/heads/master/libtcutil/optstr.c\00"
@.str.1 = [36 x i8] c"\22%s\22, \22%s\22, \22%s\22, \22%s\22, \22%s\22, \22%s\22\0A\00"
define i32 @optstr_filter_desc(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = tail call i32 @strlen(i8* %0)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = sub nsw i32 8192, %8
%12 = tail call i64 @_tc_snprintf(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i32 179, i8* %10, i32 %11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6)
%13 = icmp slt i64 %12, 1
%14 = zext i1 %13 to i32
ret i32 %14
}