#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*/ sprintf(char *, char *, int, unsigned int);
int uint4(unsigned char *);
int f_Sec6(int mode, unsigned char **sec, float *data, unsigned int ndata,
           char *inv_out, void **local) {
  if (mode >= 0) {
    sprintf(inv_out, "Sec6 length %u bitmap indicator %u", uint4(sec[6]),
            (unsigned int)sec[6][5]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<f_Sec6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     117b <f_Sec6+0x5b>
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1030 <uint4@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rax
movzbl 0x5(%rax),%ecx
lea    0xe8a(%rip),%rsi
call   1040 <sprintf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_Sec6>:
test   %edi,%edi
js     1157 <f_Sec6+0x37>
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rsi,%rbx
mov    0x30(%rsi),%rdi
call   1030 <uint4@plt>
mov    0x30(%rbx),%rcx
movzbl 0x5(%rcx),%ecx
lea    0xeba(%rip),%rsi
mov    %r14,%rdi
mov    %eax,%edx
call   1040 <sprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Sec6 length %u bitmap indicator %u\00"
define i32 @f_Sec6(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca float*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8**
store i32 %0, i32* %7
store i8** %1, i8*** %8
store float* %2, float** %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i8** %5, i8*** %12
%13 = load i32, i32* %7
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %28
15: ; preds = %6
%16 = load i8*, i8** %11
%17 = load i8**, i8*** %8
%18 = getelementptr inbounds i8*, i8** %17, i64 6
%19 = load i8*, i8** %18
%20 = call i32 @uint4(i8* %19)
%21 = load i8**, i8*** %8
%22 = getelementptr inbounds i8*, i8** %21, i64 6
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i8, i8* %23, i64 5
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = call i32 @sprintf(i8* %16, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %26)
br label %28
28: ; preds = %15, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Sec6 length %u bitmap indicator %u\00"
define i32 @f_Sec6(i32 %0, i8** nocapture %1, float* nocapture readnone %2, i32 %3, i8* nocapture writeonly %4, i8** nocapture readnone %5) {
%7 = icmp sgt i32 %0, -1
br i1 %7, label %8, label %17
8: ; preds = %6
%9 = getelementptr inbounds i8*, i8** %1, i64 6
%10 = load i8*, i8** %9
%11 = tail call i32 @uint4(i8* %10)
%12 = load i8*, i8** %9
%13 = getelementptr inbounds i8, i8* %12, i64 5
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %15)
br label %17
17: ; preds = %8, %6
ret i32 0
}