#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*/ fatal_error(char *, char const *);
int set_metadata_string(int, unsigned char **, float *, unsigned int, char *,
                        void **, char const *);
int f_set_metadata_str(int mode, unsigned char **sec, float *data,
                       unsigned int ndata, char *inv_out, void **local,
                       const char *arg1) {
  int i;
  if (mode < 0)
    return 0;
  i = set_metadata_string(mode, sec, data, ndata, inv_out, local, arg1);
  if (i != 0)
    fatal_error("set_metadata_str: %s", arg1);
  return 0;
}


x86 assembly (clang, -O0):
<f_set_metadata_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1158 <f_set_metadata_str+0x38>
movl   $0x0,-0x4(%rbp)
jmp    119f <f_set_metadata_str+0x7f>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <set_metadata_string@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1198 <f_set_metadata_str+0x78>
mov    0x10(%rbp),%rsi
lea    0xe6d(%rip),%rdi
call   1040 <fatal_error@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_set_metadata_str>:
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
js     114a <f_set_metadata_str+0x2a>
mov    0x20(%rsp),%rbx
mov    %rbx,(%rsp)
call   1030 <set_metadata_string@plt>
test   %eax,%eax
je     114a <f_set_metadata_str+0x2a>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1040 <fatal_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"set_metadata_str: %s\00"
define i32 @f_set_metadata_str(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5, i8* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8**
%11 = alloca float*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8**
%15 = alloca i8*
%16 = alloca i32
store i32 %0, i32* %9
store i8** %1, i8*** %10
store float* %2, float** %11
store i32 %3, i32* %12
store i8* %4, i8** %13
store i8** %5, i8*** %14
store i8* %6, i8** %15
%17 = load i32, i32* %9
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %7
store i32 0, i32* %8
br label %35
20: ; preds = %7
%21 = load i32, i32* %9
%22 = load i8**, i8*** %10
%23 = load float*, float** %11
%24 = load i32, i32* %12
%25 = load i8*, i8** %13
%26 = load i8**, i8*** %14
%27 = load i8*, i8** %15
%28 = call i32 @set_metadata_string(i32 %21, i8** %22, float* %23, i32 %24, i8* %25, i8** %26, i8* %27)
store i32 %28, i32* %16
%29 = load i32, i32* %16
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %20
%32 = load i8*, i8** %15
%33 = call i32 @fatal_error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %32)
br label %34
34: ; preds = %31, %20
store i32 0, i32* %8
br label %35
35: ; preds = %34, %19
%36 = load i32, i32* %8
ret i32 %36
}

LLVM IR (-O2):
@.str = [21 x i8] c"set_metadata_str: %s\00"
define i32 @f_set_metadata_str(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5, i8* %6) {
%8 = icmp slt i32 %0, 0
br i1 %8, label %14, label %9
9: ; preds = %7
%10 = tail call i32 @set_metadata_string(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5, i8* %6)
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = tail call i32 @fatal_error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %14
14: ; preds = %9, %12, %7
ret i32 0
}