#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*/ get_config();
int /*<<< orphan*/ get_config_value(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ puts(char *);
int config_command(int argc, char **argv) {
  char dest[255];
  if (argv[0] > 0) {
    get_config_value(get_config(), argv[0], dest, 255);
    printf("%s '%s'\n", argv[0], dest);
  } else {
    puts("Usage: 2do config <directive> [new_value]");
  }
  return 0;
}


x86 assembly (clang, -O0):
<config_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jbe    11a0 <config_command+0x60>
mov    $0x0,%al
call   1050 <get_config@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    -0x110(%rbp),%rdx
mov    $0xff,%ecx
call   1060 <get_config_value@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    -0x110(%rbp),%rdx
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
jmp    11ac <config_command+0x6c>
lea    0xe62(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_command>:
push   %r14
push   %rbx
sub    $0x108,%rsp
cmpq   $0x0,(%rsi)
je     1183 <config_command+0x43>
mov    %rsi,%rbx
xor    %eax,%eax
call   1050 <get_config@plt>
mov    (%rbx),%rsi
mov    %rsp,%r14
mov    %eax,%edi
mov    %r14,%rdx
mov    $0xff,%ecx
call   1060 <get_config_value@plt>
mov    (%rbx),%rsi
lea    0xe87(%rip),%rdi
mov    %r14,%rdx
call   1040 <printf@plt>
jmp    118f <config_command+0x4f>
lea    0xe7f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s '%s'\0A\00"
@.str.1 = [42 x i8] c"Usage: 2do config <directive> [new_value]\00"
define i32 @config_command(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [255 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = icmp ugt i8* %8, null
br i1 %9, label %10, label %22
10: ; preds = %2
%11 = call i32 (...) @get_config()
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%16 = call i32 @get_config_value(i32 %11, i8* %14, i8* %15, i32 255)
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%21 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %19, i8* %20)
br label %24
22: ; preds = %2
%23 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s '%s'\0A\00"
@.str.1 = [42 x i8] c"Usage: 2do config <directive> [new_value]\00"
define i32 @config_command(i32 %0, i8** nocapture %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %1
%6 = icmp eq i8* %5, null
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = tail call i32 (...) @get_config()
%9 = load i8*, i8** %1
%10 = call i32 @get_config_value(i32 %8, i8* %9, i8* %4, i32 255)
%11 = load i8*, i8** %1
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %4)
br label %15
13: ; preds = %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %7
ret i32 0
}