#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 */
unsigned int op_arg_cnt(char const *);
scalar_t__ op_args(char const *);
scalar_t__ op_is_set(char const *);
int /*<<< orphan*/ printf(char *, ...);
void info(const char **keys) {
  printf("%s, %s: ", keys[0], keys[1]);
  if (op_is_set(keys[0]))
    printf("set");
  else
    printf("not set");
  unsigned int i = op_arg_cnt(keys[0]);
  char **args;
  if (i) {
    printf(" with %i arguments:\n\t", i);
    args = (char **)op_args(keys[0]);
    do {
      printf("%s ", args[i - 1]);
      i--;
    } while (i);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1060 <op_is_set@plt>
cmp    $0x0,%rax
je     1192 <info+0x52>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <info+0x60>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <op_arg_cnt@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1210 <info+0xd0>
mov    -0xc(%rbp),%esi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1050 <op_args@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,8),%rsi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11da <info+0x9a>
jmp    1210 <info+0xd0>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<info>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rsi
mov    0x8(%rdi),%rdx
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rdi
call   1070 <op_is_set@plt>
test   %rax,%rax
lea    0xe8b(%rip),%rax
lea    0xe88(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rdi
call   1050 <op_arg_cnt@plt>
test   %eax,%eax
je     11e5 <info+0x95>
mov    %eax,%ebp
lea    0xe6c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rdi
call   1060 <op_args@plt>
mov    %rax,%rbx
mov    %ebp,%ebp
lea    0xe65(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    -0x8(%rbx,%rbp,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbp
jne    11d0 <info+0x80>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s, %s: \00"
@.str.1 = [4 x i8] c"set\00"
@.str.2 = [8 x i8] c"not set\00"
@.str.3 = [22 x i8] c" with %i arguments:\0A\09\00"
@.str.4 = [4 x i8] c"%s \00"
@.str.5 = [2 x i8] c"\0A\00"
define void @info(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i8**
store i8** %0, i8*** %2
%5 = load i8**, i8*** %2
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %2
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %10)
%12 = load i8**, i8*** %2
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i64 @op_is_set(i8* %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %21
19: ; preds = %1
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = load i8**, i8*** %2
%23 = getelementptr inbounds i8*, i8** %22, i64 0
%24 = load i8*, i8** %23
%25 = call i32 @op_arg_cnt(i8* %24)
store i32 %25, i32* %3
%26 = load i32, i32* %3
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %50
28: ; preds = %21
%29 = load i32, i32* %3
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = load i8**, i8*** %2
%32 = getelementptr inbounds i8*, i8** %31, i64 0
%33 = load i8*, i8** %32
%34 = call i64 @op_args(i8* %33)
%35 = inttoptr i64 %34 to i8**
store i8** %35, i8*** %4
br label %36
36: ; preds = %46, %28
%37 = load i8**, i8*** %4
%38 = load i32, i32* %3
%39 = sub i32 %38, 1
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %37, i64 %40
%42 = load i8*, i8** %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %42)
%44 = load i32, i32* %3
%45 = add i32 %44, -1
store i32 %45, i32* %3
br label %46
46: ; preds = %36
%47 = load i32, i32* %3
%48 = icmp ne i32 %47, 0
br i1 %48, label %36, label %49
49: ; preds = %46
br label %50
50: ; preds = %49, %21
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s, %s: \00"
@.str.1 = [4 x i8] c"set\00"
@.str.2 = [8 x i8] c"not set\00"
@.str.3 = [22 x i8] c" with %i arguments:\0A\09\00"
@.str.4 = [4 x i8] c"%s \00"
define void @info(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8*, i8** %0, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %4)
%6 = load i8*, i8** %0
%7 = tail call i64 @op_is_set(i8* %6)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %9)
%11 = load i8*, i8** %0
%12 = tail call i32 @op_arg_cnt(i8* %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %27, label %14
14: ; preds = %1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%16 = load i8*, i8** %0
%17 = tail call i64 @op_args(i8* %16)
%18 = inttoptr i64 %17 to i8**
%19 = zext i32 %12 to i64
br label %20
20: ; preds = %20, %14
%21 = phi i64 [ %22, %20 ], [ %19, %14 ]
%22 = add nsw i64 %21, -1
%23 = getelementptr inbounds i8*, i8** %18, i64 %22
%24 = load i8*, i8** %23
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %24)
%26 = icmp eq i64 %22, 0
br i1 %26, label %27, label %20
27: ; preds = %20, %1
%28 = tail call i32 @putchar(i32 10)
ret void
}