#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*/ Log(int, char *, char *);
int run_rabbitmqctl(char **);
int create_rabbitmq_vhost(char *username) {
  char *args[] = {"/usr/sbin/rabbitmqctl", "add_vhost", username, NULL};
  Log(7, "Creating rabbitmq vhost \"%s\"", username);
  return run_rabbitmqctl(args);
}


x86 assembly (clang, -O0):
<create_rabbitmq_vhost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xed8(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x7,%edi
lea    0xebe(%rip),%rsi
call   1040 <Log@plt>
lea    -0x30(%rbp),%rdi
call   1030 <run_rabbitmqctl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_rabbitmq_vhost>:
sub    $0x28,%rsp
mov    %rdi,%rdx
lea    0xed2(%rip),%rax
mov    %rax,(%rsp)
lea    0xedd(%rip),%rax
mov    %rax,0x8(%rsp)
mov    %rdi,0x10(%rsp)
movq   $0x0,0x18(%rsp)
lea    0xecd(%rip),%rsi
mov    $0x7,%edi
call   1040 <Log@plt>
mov    %rsp,%rdi
call   1030 <run_rabbitmqctl@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"/usr/sbin/rabbitmqctl\00"
@.str.1 = [10 x i8] c"add_vhost\00"
@.str.2 = [29 x i8] c"Creating rabbitmq vhost \22%s\22\00"
define i32 @create_rabbitmq_vhost(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8*]
store i8* %0, i8** %2
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds i8*, i8** %4, i64 1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %2
store i8* %7, i8** %6
%8 = getelementptr inbounds i8*, i8** %6, i64 1
store i8* null, i8** %8
%9 = load i8*, i8** %2
%10 = call i32 @Log(i32 7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%12 = call i32 @run_rabbitmqctl(i8** %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [22 x i8] c"/usr/sbin/rabbitmqctl\00"
@.str.1 = [10 x i8] c"add_vhost\00"
@.str.2 = [29 x i8] c"Creating rabbitmq vhost \22%s\22\00"
define i32 @create_rabbitmq_vhost(i8* %0) {
%2 = alloca [4 x i8*]
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 2
store i8* %0, i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 3
store i8* null, i8** %7
%8 = tail call i32 @Log(i32 7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%9 = call i32 @run_rabbitmqctl(i8** %4)
ret i32 %9
}