#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*/ flon_configure(char *);
char *flon_generate_exid(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int print_usage();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
int exid(char **args) {
  if (args[1] == NULL) {
    fprintf(stderr, "\n ** missing domain **\n\n");
    return print_usage();
  }
  flon_configure(".");
  printf("%s\n", flon_generate_exid(args[1]));
  return 0;
}


x86 assembly (clang, -O0):
<exid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    118f <exid+0x3f>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
lea    0xe85(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1070 <print_usage@plt>
mov    %eax,-0x4(%rbp)
jmp    11be <exid+0x6e>
lea    0xe83(%rip),%rdi
call   1040 <flon_configure@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <flon_generate_exid@plt>
mov    %rax,%rsi
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exid>:
push   %rbx
cmpq   $0x0,0x8(%rdi)
je     1183 <exid+0x33>
mov    %rdi,%rbx
lea    0xeb7(%rip),%rdi
call   1040 <flon_configure@plt>
mov    0x8(%rbx),%rdi
call   1050 <flon_generate_exid@plt>
lea    0xea4(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
lea    0xe6d(%rip),%rsi
call   1060 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
jmp    1070 <print_usage@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"\0A ** missing domain **\0A\0A\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @exid(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = getelementptr inbounds i8*, i8** %4, i64 1
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @print_usage()
store i32 %11, i32* %2
br label %19
12: ; preds = %1
%13 = call i32 @flon_configure(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = load i8**, i8*** %3
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i8* @flon_generate_exid(i8* %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %17)
store i32 0, i32* %2
br label %19
19: ; preds = %12, %8
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"\0A ** missing domain **\0A\0A\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @exid(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 1
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @print_usage()
br label %14
9: ; preds = %1
%10 = tail call i32 @flon_configure(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %2
%12 = tail call i8* @flon_generate_exid(i8* %11)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %9, %5
%15 = phi i32 [ %8, %5 ], [ 0, %9 ]
ret i32 %15
}