#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*/ sprintf(char *, char *, char *, char *);
scalar_t__ system(char *);
void process_execution_count_increment(char *process_name) {
  char sys_string[1024];
  if (!process_name || !*process_name)
    return;
  sprintf(sys_string,
          "echo \"update %s					 "
          "	set execution_count =				 "
          "		if(execution_count,execution_count+1,1)	 "
          "	where process = '%s';\"				|"
          "sql							 ",
          "process", process_name);
  if (system(sys_string)) {
  }
}


x86 assembly (clang, -O0):
<process_execution_count_increment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <process_execution_count_increment+0x27>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    114c <process_execution_count_increment+0x2c>
jmp    1185 <process_execution_count_increment+0x65>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xea2(%rip),%rsi
lea    0xf1e(%rip),%rdx
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     1185 <process_execution_count_increment+0x65>
jmp    1185 <process_execution_count_increment+0x65>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_execution_count_increment>:
push   %rbx
sub    $0x400,%rsp
test   %rdi,%rdi
je     1156 <process_execution_count_increment+0x36>
mov    %rdi,%rcx
cmpb   $0x0,(%rdi)
je     1156 <process_execution_count_increment+0x36>
lea    0xec4(%rip),%rsi
lea    0xf40(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [131 x i8] c"echo \22update %s\09\09\09\09\09 \09set execution_count =\09\09\09\09 \09\09if(execution_count,execution_count+1,1)\09 \09where process = '%s';\22\09\09\09\09|sql\09\09\09\09\09\09\09 \00"
@.str.1 = [8 x i8] c"process\00"
define void @process_execution_count_increment(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %6, %1
br label %19
11: ; preds = %6
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%13 = load i8*, i8** %2
%14 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%16 = call i64 @system(i8* %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %11
br label %19
19: ; preds = %10, %18, %11
ret void
}

LLVM IR (-O2):
@.str = [131 x i8] c"echo \22update %s\09\09\09\09\09 \09set execution_count =\09\09\09\09 \09\09if(execution_count,execution_count+1,1)\09 \09where process = '%s';\22\09\09\09\09|sql\09\09\09\09\09\09\09 \00"
@.str.1 = [8 x i8] c"process\00"
define void @process_execution_count_increment(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = icmp eq i8* %0, null
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i8, i8* %0
%7 = icmp eq i8 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%10 = call i64 @system(i8* %3)
br label %11
11: ; preds = %1, %5, %8
ret void
}