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


x86 assembly (clang, -O0):
<create_rabbitmq_user>:
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)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x7,%edi
lea    0xeb5(%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_user>:
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)
mov    %rdi,0x18(%rsp)
movq   $0x0,0x20(%rsp)
lea    0xec7(%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 = [9 x i8] c"add_user\00"
@.str.2 = [28 x i8] c"Creating rabbitmq user \22%s\22\00"
define i32 @create_rabbitmq_user(i8* %0) {
%2 = alloca i8*
%3 = alloca [5 x i8*]
store i8* %0, i8** %2
%4 = getelementptr inbounds [5 x i8*], [5 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 ([9 x i8], [9 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
%9 = load i8*, i8** %2
store i8* %9, i8** %8
%10 = getelementptr inbounds i8*, i8** %8, i64 1
store i8* null, i8** %10
%11 = load i8*, i8** %2
%12 = call i32 @Log(i32 7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i64 0, i64 0
%14 = call i32 @run_rabbitmqctl(i8** %13)
ret i32 %14
}

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