#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ free_arg(char **);
int /*<<< orphan*/ logger(int, int /*<<< orphan*/, char *, int);
int run_script(char *, char **, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned int);
char *strdup(char *);
int quota_ctl(unsigned int veid, int cmd) {
  int i, ret;
  char buf[64];
  char *arg[6];
  int quiet = 0;
  i = 0;
  arg[i++] = strdup("/usr/sbin/vzquota");
  switch (cmd) {
  case 9:
    arg[i++] = strdup("setlimit");
    snprintf(buf, sizeof(buf), "%d", veid);
    arg[i++] = strdup(buf);
    arg[i++] = strdup("-f");
    quiet = 1;
    break;
  case 1:
    arg[i++] = strdup("drop");
    snprintf(buf, sizeof(buf), "%d", veid);
    arg[i++] = strdup(buf);
    quiet = 1;
    break;
  case 2:
    arg[i++] = strdup("stat");
    snprintf(buf, sizeof(buf), "%d", veid);
    arg[i++] = strdup(buf);
    arg[i++] = strdup("-f");
    quiet = 1;
    break;
  case 3:
    arg[i++] = strdup("stat");
    snprintf(buf, sizeof(buf), "%d", veid);
    arg[i++] = strdup(buf);
    arg[i++] = strdup("-f");
    arg[i++] = strdup("-t");
    quiet = 1;
    break;
  case 5:
    arg[i++] = strdup("show");
    snprintf(buf, sizeof(buf), "%d", veid);
    arg[i++] = strdup(buf);
    quiet = 1;
    break;
  default:
    logger(-1, 0, "quota_ctl: Unknown action %d", cmd);
    return 3;
  }
  arg[i] = NULL;
  ret = run_script("/usr/sbin/vzquota", arg, NULL, quiet);
  free_arg(arg);
  return ret;
}


x86 assembly (clang, -O0):
<quota_ctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeab(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
movslq -0x10(%rbp),%rax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x90(%rbp,%rax,8)
ff
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0xa0(%rbp)
sub    $0x8,%eax
ja     1470 <quota_ctl+0x320>
mov    -0xa0(%rbp),%rax
lea    0xe45(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe6b(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    $0x40,%esi
lea    0xe73(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x60(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    0xe17(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
movl   $0x1,-0x94(%rbp)
jmp    1492 <quota_ctl+0x342>
lea    0xde7(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    $0x40,%esi
lea    0xde3(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x60(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
movl   $0x1,-0x94(%rbp)
jmp    1492 <quota_ctl+0x342>
lea    0xd80(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    $0x40,%esi
lea    0xd77(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x60(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    0xd1b(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
movl   $0x1,-0x94(%rbp)
jmp    1492 <quota_ctl+0x342>
lea    0xcf0(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    $0x40,%esi
lea    0xce7(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x60(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    0xc8b(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    0xc74(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
movl   $0x1,-0x94(%rbp)
jmp    1492 <quota_ctl+0x342>
lea    0xc44(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    $0x40,%esi
lea    0xc33(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x60(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %rcx,-0x90(%rbp,%rax,8)
ff
movl   $0x1,-0x94(%rbp)
jmp    1492 <quota_ctl+0x342>
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
lea    0xbd3(%rip),%rdx
call   1050 <logger@plt>
movl   $0x3,-0x4(%rbp)
jmp    14d4 <quota_ctl+0x384>
movslq -0x10(%rbp),%rax
movq   $0x0,-0x90(%rbp,%rax,8)
lea    -0x90(%rbp),%rsi
mov    -0x94(%rbp),%ecx
lea    0xb6e(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <run_script@plt>
mov    %eax,-0x14(%rbp)
lea    -0x90(%rbp),%rdi
call   1060 <free_arg@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quota_ctl>:
push   %rbp
push   %rbx
sub    $0x78,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec3(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,(%rsp)
lea    -0x1(%rbx),%eax
cmp    $0x8,%eax
ja     1203 <quota_ctl+0xb3>
lea    0xe83(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb5(%rip),%rdi
jmp    1229 <quota_ctl+0xd9>
lea    0xeae(%rip),%rdi
jmp    1269 <quota_ctl+0x119>
lea    0xea2(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,0x8(%rsp)
lea    0xeb8(%rip),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
mov    %ebp,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1070 <strdup@plt>
mov    %rax,0x10(%rsp)
lea    0xe61(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,0x18(%rsp)
lea    0xe5d(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,0x20(%rsp)
mov    $0x5,%eax
jmp    12b1 <quota_ctl+0x161>
lea    0xe4a(%rip),%rdx
mov    $0xffffffff,%edi
xor    %esi,%esi
mov    %ebx,%ecx
call   1050 <logger@plt>
mov    $0x3,%ebx
jmp    12dc <quota_ctl+0x18c>
lea    0xe26(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,0x8(%rsp)
lea    0xe34(%rip),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
mov    %ebp,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1070 <strdup@plt>
mov    %rax,0x10(%rsp)
mov    $0x3,%eax
jmp    12b1 <quota_ctl+0x161>
lea    0xdcd(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,0x8(%rsp)
lea    0xdf4(%rip),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
mov    %ebp,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1070 <strdup@plt>
mov    %rax,0x10(%rsp)
lea    0xd9d(%rip),%rdi
call   1070 <strdup@plt>
mov    %rax,0x18(%rsp)
mov    $0x4,%eax
movq   $0x0,(%rsp,%rax,8)
lea    0xd64(%rip),%rdi
mov    %rsp,%rbp
mov    %rbp,%rsi
xor    %edx,%edx
mov    $0x1,%ecx
call   1040 <run_script@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1060 <free_arg@plt>
mov    %ebx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"/usr/sbin/vzquota\00"
@.str.1 = [9 x i8] c"setlimit\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"-f\00"
@.str.4 = [5 x i8] c"drop\00"
@.str.5 = [5 x i8] c"stat\00"
@.str.6 = [3 x i8] c"-t\00"
@.str.7 = [5 x i8] c"show\00"
@.str.8 = [29 x i8] c"quota_ctl: Unknown action %d\00"
define i32 @quota_ctl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [64 x i8]
%9 = alloca [6 x i8*]
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 0, i32* %10
store i32 0, i32* %6
%11 = call i8* @strdup(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %6
%13 = add nsw i32 %12, 1
store i32 %13, i32* %6
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %14
store i8* %11, i8** %15
%16 = load i32, i32* %5
switch i32 %16, label %112 [
i32 9, label %17
i32 1, label %37
i32 2, label %52
i32 3, label %72
i32 5, label %97
]
17: ; preds = %2
%18 = call i8* @strdup(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
%21 = sext i32 %19 to i64
%22 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %21
store i8* %18, i8** %22
%23 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%24 = load i32, i32* %4
%25 = call i32 @snprintf(i8* %23, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%27 = call i8* @strdup(i8* %26)
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
%30 = sext i32 %28 to i64
%31 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %30
store i8* %27, i8** %31
%32 = call i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
%35 = sext i32 %33 to i64
%36 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %35
store i8* %32, i8** %36
store i32 1, i32* %10
br label %115
37: ; preds = %2
%38 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
store i32 %40, i32* %6
%41 = sext i32 %39 to i64
%42 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %41
store i8* %38, i8** %42
%43 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%44 = load i32, i32* %4
%45 = call i32 @snprintf(i8* %43, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %44)
%46 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%47 = call i8* @strdup(i8* %46)
%48 = load i32, i32* %6
%49 = add nsw i32 %48, 1
store i32 %49, i32* %6
%50 = sext i32 %48 to i64
%51 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %50
store i8* %47, i8** %51
store i32 1, i32* %10
br label %115
52: ; preds = %2
%53 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%54 = load i32, i32* %6
%55 = add nsw i32 %54, 1
store i32 %55, i32* %6
%56 = sext i32 %54 to i64
%57 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %56
store i8* %53, i8** %57
%58 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%59 = load i32, i32* %4
%60 = call i32 @snprintf(i8* %58, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %59)
%61 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%62 = call i8* @strdup(i8* %61)
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
%65 = sext i32 %63 to i64
%66 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %65
store i8* %62, i8** %66
%67 = call i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 1
store i32 %69, i32* %6
%70 = sext i32 %68 to i64
%71 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %70
store i8* %67, i8** %71
store i32 1, i32* %10
br label %115
72: ; preds = %2
%73 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%74 = load i32, i32* %6
%75 = add nsw i32 %74, 1
store i32 %75, i32* %6
%76 = sext i32 %74 to i64
%77 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %76
store i8* %73, i8** %77
%78 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%79 = load i32, i32* %4
%80 = call i32 @snprintf(i8* %78, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%82 = call i8* @strdup(i8* %81)
%83 = load i32, i32* %6
%84 = add nsw i32 %83, 1
store i32 %84, i32* %6
%85 = sext i32 %83 to i64
%86 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %85
store i8* %82, i8** %86
%87 = call i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%88 = load i32, i32* %6
%89 = add nsw i32 %88, 1
store i32 %89, i32* %6
%90 = sext i32 %88 to i64
%91 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %90
store i8* %87, i8** %91
%92 = call i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%93 = load i32, i32* %6
%94 = add nsw i32 %93, 1
store i32 %94, i32* %6
%95 = sext i32 %93 to i64
%96 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %95
store i8* %92, i8** %96
store i32 1, i32* %10
br label %115
97: ; preds = %2
%98 = call i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%99 = load i32, i32* %6
%100 = add nsw i32 %99, 1
store i32 %100, i32* %6
%101 = sext i32 %99 to i64
%102 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %101
store i8* %98, i8** %102
%103 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%104 = load i32, i32* %4
%105 = call i32 @snprintf(i8* %103, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %104)
%106 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%107 = call i8* @strdup(i8* %106)
%108 = load i32, i32* %6
%109 = add nsw i32 %108, 1
store i32 %109, i32* %6
%110 = sext i32 %108 to i64
%111 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %110
store i8* %107, i8** %111
store i32 1, i32* %10
br label %115
112: ; preds = %2
%113 = load i32, i32* %5
%114 = call i32 @logger(i32 -1, i32 0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 %113)
store i32 3, i32* %3
br label %125
115: ; preds = %97, %72, %52, %37, %17
%116 = load i32, i32* %6
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %117
store i8* null, i8** %118
%119 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 0
%120 = load i32, i32* %10
%121 = call i32 @run_script(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %119, i32* null, i32 %120)
store i32 %121, i32* %7
%122 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 0
%123 = call i32 @free_arg(i8** %122)
%124 = load i32, i32* %7
store i32 %124, i32* %3
br label %125
125: ; preds = %115, %112
%126 = load i32, i32* %3
ret i32 %126
}

LLVM IR (-O2):
@.str = [18 x i8] c"/usr/sbin/vzquota\00"
@.str.1 = [9 x i8] c"setlimit\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"-f\00"
@.str.4 = [5 x i8] c"drop\00"
@.str.5 = [5 x i8] c"stat\00"
@.str.6 = [3 x i8] c"-t\00"
@.str.7 = [5 x i8] c"show\00"
@.str.8 = [29 x i8] c"quota_ctl: Unknown action %d\00"
define i32 @quota_ctl(i32 %0, i32 %1) {
%3 = alloca [64 x i8]
%4 = alloca [6 x i8*]
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%6 = bitcast [6 x i8*]* %4 to i8*
%7 = tail call dereferenceable_or_null(18) i8* @strdup(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 0
store i8* %7, i8** %8
switch i32 %1, label %47 [
i32 9, label %9
i32 1, label %17
i32 2, label %23
i32 3, label %31
i32 5, label %41
]
9: ; preds = %2
%10 = tail call dereferenceable_or_null(9) i8* @strdup(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 1
store i8* %10, i8** %11
%12 = call i32 @snprintf(i8* %5, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%13 = call i8* @strdup(i8* %5)
%14 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 2
store i8* %13, i8** %14
%15 = call dereferenceable_or_null(3) i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%16 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 3
store i8* %15, i8** %16
br label %49
17: ; preds = %2
%18 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%19 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 1
store i8* %18, i8** %19
%20 = call i32 @snprintf(i8* %5, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%21 = call i8* @strdup(i8* %5)
%22 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 2
store i8* %21, i8** %22
br label %49
23: ; preds = %2
%24 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%25 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 1
store i8* %24, i8** %25
%26 = call i32 @snprintf(i8* %5, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%27 = call i8* @strdup(i8* %5)
%28 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 2
store i8* %27, i8** %28
%29 = call dereferenceable_or_null(3) i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%30 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 3
store i8* %29, i8** %30
br label %49
31: ; preds = %2
%32 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%33 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 1
store i8* %32, i8** %33
%34 = call i32 @snprintf(i8* %5, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%35 = call i8* @strdup(i8* %5)
%36 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 2
store i8* %35, i8** %36
%37 = call dereferenceable_or_null(3) i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%38 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 3
store i8* %37, i8** %38
%39 = call dereferenceable_or_null(3) i8* @strdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%40 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 4
store i8* %39, i8** %40
br label %49
41: ; preds = %2
%42 = tail call dereferenceable_or_null(5) i8* @strdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%43 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 1
store i8* %42, i8** %43
%44 = call i32 @snprintf(i8* %5, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%45 = call i8* @strdup(i8* %5)
%46 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 2
store i8* %45, i8** %46
br label %49
47: ; preds = %2
%48 = tail call i32 @logger(i32 -1, i32 0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 %1)
br label %54
49: ; preds = %41, %31, %23, %17, %9
%50 = phi i64 [ 3, %41 ], [ 5, %31 ], [ 4, %23 ], [ 3, %17 ], [ 4, %9 ]
%51 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 %50
store i8* null, i8** %51
%52 = call i32 @run_script(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %8, i32* null, i32 1)
%53 = call i32 @free_arg(i8** %8)
br label %54
54: ; preds = %49, %47
%55 = phi i32 [ 3, %47 ], [ %52, %49 ]
ret i32 %55
}