#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*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcpy(char *, char *const);
int /*<<< orphan*/ sys_deluser(char *);
int stdin_delete(int _argc, char *const *_argv) {
  char user_name[10];
  puts("delete users from input\n");
  int i = 2;
  printf("argc is: %d i is: %d, value: %s\n", _argc, i, _argv[i]);
  printf("argc is: %d \n", _argc);
  printf("del these users:\n");
  while (i <= _argc) {
    printf("argc is: %d i is: %d, value: %s\n", _argc, i, _argv[i]);
    strcpy(user_name, _argv[i++]);
    sys_deluser(user_name);
  }
  return 0;
}


x86 assembly (clang, -O0):
<stdin_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
movl   $0x2,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     11fa <stdin_delete+0xba>
mov    -0x4(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
lea    -0x1a(%rbp),%rdi
call   1060 <sys_deluser@plt>
jmp    11a1 <stdin_delete+0x61>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdin_delete>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r15
mov    %edi,%r14d
lea    0xea5(%rip),%rdi
call   1040 <puts@plt>
mov    0x10(%r15),%rcx
lea    0xeae(%rip),%rdi
mov    %r14d,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb6(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x2,%r14d
jl     11f0 <stdin_delete+0xb0>
lea    0x1(%r14),%ebp
mov    $0x2,%ebx
lea    0xe6c(%rip),%r12
lea    0xe(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rcx
mov    %r12,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r15,%rbx,8),%rsi
add    $0x1,%rbx
mov    %r13,%rdi
call   1030 <strcpy@plt>
mov    %r13,%rdi
call   1060 <sys_deluser@plt>
cmp    %rbx,%rbp
jne    11c0 <stdin_delete+0x80>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"delete users from input\0A\00"
@.str.1 = [33 x i8] c"argc is: %d i is: %d, value: %s\0A\00"
@.str.2 = [14 x i8] c"argc is: %d \0A\00"
@.str.3 = [18 x i8] c"del these users:\0A\00"
define i32 @stdin_delete(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [10 x i8]
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %6
%8 = load i32, i32* %3
%9 = load i32, i32* %6
%10 = load i8**, i8*** %4
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %10, i64 %12
%14 = load i8*, i8** %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9, i8* %14)
%16 = load i32, i32* %3
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %23, %2
%20 = load i32, i32* %6
%21 = load i32, i32* %3
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %42
23: ; preds = %19
%24 = load i32, i32* %3
%25 = load i32, i32* %6
%26 = load i8**, i8*** %4
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %24, i32 %25, i8* %30)
%32 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%33 = load i8**, i8*** %4
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 1
store i32 %35, i32* %6
%36 = sext i32 %34 to i64
%37 = getelementptr inbounds i8*, i8** %33, i64 %36
%38 = load i8*, i8** %37
%39 = call i32 @strcpy(i8* %32, i8* %38)
%40 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%41 = call i32 @sys_deluser(i8* %40)
br label %19
42: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"delete users from input\0A\00"
@.str.1 = [33 x i8] c"argc is: %d i is: %d, value: %s\0A\00"
@.str.2 = [14 x i8] c"argc is: %d \0A\00"
@str = [17 x i8] c"del these users:\00"
define i32 @stdin_delete(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 2, i8* %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%11 = icmp slt i32 %0, 2
br i1 %11, label %26, label %12
12: ; preds = %2
%13 = add nuw i32 %0, 1
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %12, %15
%16 = phi i64 [ 2, %12 ], [ %21, %15 ]
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = load i8*, i8** %17
%19 = trunc i64 %16 to i32
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %19, i8* %18)
%21 = add nuw nsw i64 %16, 1
%22 = load i8*, i8** %17
%23 = call i32 @strcpy(i8* %4, i8* %22)
%24 = call i32 @sys_deluser(i8* %4)
%25 = icmp eq i64 %21, %14
br i1 %25, label %26, label %15
26: ; preds = %15, %2
ret i32 0
}