#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 */
struct cli {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ asprintf(char **, char *, ...);
int /*<<< orphan*/ cli_send(struct cli *, char *, scalar_t__);
int /*<<< orphan*/ free(char *);
scalar_t__ strlen(char *);
int _set_mix(struct cli *cli, int argc, char *argv[]) {
  {
    char *__tmp;
    asprintf(&__tmp,
             "argc = %d"
             "\n\r",
             argc);
    cli_send(cli, __tmp, strlen(__tmp) + 1);
    free(__tmp);
  };
  {
    char *__tmp;
    asprintf(&__tmp,
             "integer = %s"
             "\n\r",
             argv[0]);
    cli_send(cli, __tmp, strlen(__tmp) + 1);
    free(__tmp);
  };
  {
    char *__tmp;
    asprintf(&__tmp,
             "ipv4 = %s"
             "\n\r",
             argv[1]);
    cli_send(cli, __tmp, strlen(__tmp) + 1);
    free(__tmp);
  };
  {
    char *__tmp;
    asprintf(&__tmp,
             "LALALA = %s"
             "\n\r",
             argv[2]);
    cli_send(cli, __tmp, strlen(__tmp) + 1);
    free(__tmp);
  };
  {
    char *__tmp;
    asprintf(&__tmp,
             "LULULU = %s"
             "\n\r",
             argv[3]);
    cli_send(cli, __tmp, strlen(__tmp) + 1);
    free(__tmp);
  };
  if (argc == 4) {
    {
      char *__tmp;
      asprintf(&__tmp, "no alternative"
                       "\n\r");
      cli_send(cli, __tmp, strlen(__tmp) + 1);
      free(__tmp);
    };
  } else if (argc == 5) {
    {
      char *__tmp;
      asprintf(&__tmp,
               "alternative = %s"
               "\n\r",
               argv[4]);
      cli_send(cli, __tmp, strlen(__tmp) + 1);
      free(__tmp);
    };
  }
  return (0);
}


x86 assembly (clang, -O0):
<_set_mix>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edx
lea    -0x20(%rbp),%rdi
lea    0xe9c(%rip),%rsi
mov    $0x0,%al
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x98(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    -0x28(%rbp),%rdi
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x90(%rbp),%rdi
mov    -0x88(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdx
lea    -0x30(%rbp),%rdi
lea    0xe00(%rip),%rsi
mov    $0x0,%al
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdx
lea    -0x38(%rbp),%rdi
lea    0xdbc(%rip),%rsi
mov    $0x0,%al
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x38(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rdx
lea    -0x40(%rbp),%rdi
lea    0xd7a(%rip),%rsi
mov    $0x0,%al
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x60(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x4,-0xc(%rbp)
jne    135b <_set_mix+0x21b>
lea    -0x48(%rbp),%rdi
lea    0xd36(%rip),%rsi
mov    $0x0,%al
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x48(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0xb0(%rbp),%rdi
mov    -0xa8(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
jmp    13c6 <_set_mix+0x286>
cmpl   $0x5,-0xc(%rbp)
jne    13c1 <_set_mix+0x281>
mov    -0x18(%rbp),%rax
mov    0x20(%rax),%rdx
lea    -0x50(%rbp),%rdi
lea    0xcdc(%rip),%rsi
mov    $0x0,%al
call   1050 <asprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0xc0(%rbp),%rdi
mov    -0xb8(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1060 <cli_send@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
jmp    13c6 <_set_mix+0x286>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_mix>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbx
lea    0xea9(%rip),%rsi
mov    %rsp,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <asprintf@plt>
mov    (%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <cli_send@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    (%r14),%rdx
lea    0xe7a(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <asprintf@plt>
mov    (%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <cli_send@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%r14),%rdx
lea    0xe50(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <asprintf@plt>
mov    (%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <cli_send@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%r14),%rdx
lea    0xe23(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <asprintf@plt>
mov    (%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <cli_send@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%r14),%rdx
lea    0xdf8(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <asprintf@plt>
mov    (%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <cli_send@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
cmp    $0x5,%r15d
je     128a <_set_mix+0x14a>
cmp    $0x4,%r15d
jne    12c3 <_set_mix+0x183>
lea    0xdc5(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <asprintf@plt>
jmp    129f <_set_mix+0x15f>
mov    0x20(%r14),%rdx
lea    0xdbf(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <asprintf@plt>
mov    (%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <cli_send@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.cli = type { i32 }
@.str = [12 x i8] c"argc = %d\0A\0D\00"
@.str.1 = [15 x i8] c"integer = %s\0A\0D\00"
@.str.2 = [12 x i8] c"ipv4 = %s\0A\0D\00"
@.str.3 = [14 x i8] c"LALALA = %s\0A\0D\00"
@.str.4 = [14 x i8] c"LULULU = %s\0A\0D\00"
@.str.5 = [17 x i8] c"no alternative\0A\0D\00"
@.str.6 = [19 x i8] c"alternative = %s\0A\0D\00"
define i32 @_set_mix(%struct.cli* %0, i32 %1, i8** %2) {
%4 = alloca %struct.cli*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
store %struct.cli* %0, %struct.cli** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%14 = load i32, i32* %5
%15 = call i32 (i8**, i8*, ...) @asprintf(i8** %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load %struct.cli*, %struct.cli** %4
%17 = load i8*, i8** %7
%18 = load i8*, i8** %7
%19 = call i64 @strlen(i8* %18)
%20 = add nsw i64 %19, 1
%21 = call i32 @cli_send(%struct.cli* %16, i8* %17, i64 %20)
%22 = load i8*, i8** %7
%23 = call i32 @free(i8* %22)
%24 = load i8**, i8*** %6
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 (i8**, i8*, ...) @asprintf(i8** %8, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %26)
%28 = load %struct.cli*, %struct.cli** %4
%29 = load i8*, i8** %8
%30 = load i8*, i8** %8
%31 = call i64 @strlen(i8* %30)
%32 = add nsw i64 %31, 1
%33 = call i32 @cli_send(%struct.cli* %28, i8* %29, i64 %32)
%34 = load i8*, i8** %8
%35 = call i32 @free(i8* %34)
%36 = load i8**, i8*** %6
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i32 (i8**, i8*, ...) @asprintf(i8** %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %38)
%40 = load %struct.cli*, %struct.cli** %4
%41 = load i8*, i8** %9
%42 = load i8*, i8** %9
%43 = call i64 @strlen(i8* %42)
%44 = add nsw i64 %43, 1
%45 = call i32 @cli_send(%struct.cli* %40, i8* %41, i64 %44)
%46 = load i8*, i8** %9
%47 = call i32 @free(i8* %46)
%48 = load i8**, i8*** %6
%49 = getelementptr inbounds i8*, i8** %48, i64 2
%50 = load i8*, i8** %49
%51 = call i32 (i8**, i8*, ...) @asprintf(i8** %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %50)
%52 = load %struct.cli*, %struct.cli** %4
%53 = load i8*, i8** %10
%54 = load i8*, i8** %10
%55 = call i64 @strlen(i8* %54)
%56 = add nsw i64 %55, 1
%57 = call i32 @cli_send(%struct.cli* %52, i8* %53, i64 %56)
%58 = load i8*, i8** %10
%59 = call i32 @free(i8* %58)
%60 = load i8**, i8*** %6
%61 = getelementptr inbounds i8*, i8** %60, i64 3
%62 = load i8*, i8** %61
%63 = call i32 (i8**, i8*, ...) @asprintf(i8** %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %62)
%64 = load %struct.cli*, %struct.cli** %4
%65 = load i8*, i8** %11
%66 = load i8*, i8** %11
%67 = call i64 @strlen(i8* %66)
%68 = add nsw i64 %67, 1
%69 = call i32 @cli_send(%struct.cli* %64, i8* %65, i64 %68)
%70 = load i8*, i8** %11
%71 = call i32 @free(i8* %70)
%72 = load i32, i32* %5
%73 = icmp eq i32 %72, 4
br i1 %73, label %74, label %84
74: ; preds = %3
%75 = call i32 (i8**, i8*, ...) @asprintf(i8** %12, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%76 = load %struct.cli*, %struct.cli** %4
%77 = load i8*, i8** %12
%78 = load i8*, i8** %12
%79 = call i64 @strlen(i8* %78)
%80 = add nsw i64 %79, 1
%81 = call i32 @cli_send(%struct.cli* %76, i8* %77, i64 %80)
%82 = load i8*, i8** %12
%83 = call i32 @free(i8* %82)
br label %101
84: ; preds = %3
%85 = load i32, i32* %5
%86 = icmp eq i32 %85, 5
br i1 %86, label %87, label %100
87: ; preds = %84
%88 = load i8**, i8*** %6
%89 = getelementptr inbounds i8*, i8** %88, i64 4
%90 = load i8*, i8** %89
%91 = call i32 (i8**, i8*, ...) @asprintf(i8** %13, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* %90)
%92 = load %struct.cli*, %struct.cli** %4
%93 = load i8*, i8** %13
%94 = load i8*, i8** %13
%95 = call i64 @strlen(i8* %94)
%96 = add nsw i64 %95, 1
%97 = call i32 @cli_send(%struct.cli* %92, i8* %93, i64 %96)
%98 = load i8*, i8** %13
%99 = call i32 @free(i8* %98)
br label %100
100: ; preds = %87, %84
br label %101
101: ; preds = %100, %74
ret i32 0
}

LLVM IR (-O2):
%struct.cli = type { i32 }
@.str = [12 x i8] c"argc = %d\0A\0D\00"
@.str.1 = [15 x i8] c"integer = %s\0A\0D\00"
@.str.2 = [12 x i8] c"ipv4 = %s\0A\0D\00"
@.str.3 = [14 x i8] c"LALALA = %s\0A\0D\00"
@.str.4 = [14 x i8] c"LULULU = %s\0A\0D\00"
@.str.5 = [17 x i8] c"no alternative\0A\0D\00"
@.str.6 = [19 x i8] c"alternative = %s\0A\0D\00"
define i32 @_set_mix(%struct.cli* %0, i32 %1, i8** nocapture %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = bitcast i8** %4 to i8*
%12 = call i32 (i8**, i8*, ...) @asprintf(i8** %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%13 = load i8*, i8** %4
%14 = call i64 @strlen(i8* dereferenceable(1) %13)
%15 = add nsw i64 %14, 1
%16 = call i32 @cli_send(%struct.cli* %0, i8* %13, i64 %15)
%17 = load i8*, i8** %4
%18 = call i32 @free(i8* %17)
%19 = bitcast i8** %5 to i8*
%20 = load i8*, i8** %2
%21 = call i32 (i8**, i8*, ...) @asprintf(i8** %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = load i8*, i8** %5
%23 = call i64 @strlen(i8* dereferenceable(1) %22)
%24 = add nsw i64 %23, 1
%25 = call i32 @cli_send(%struct.cli* %0, i8* %22, i64 %24)
%26 = load i8*, i8** %5
%27 = call i32 @free(i8* %26)
%28 = bitcast i8** %6 to i8*
%29 = getelementptr inbounds i8*, i8** %2, i64 1
%30 = load i8*, i8** %29
%31 = call i32 (i8**, i8*, ...) @asprintf(i8** %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %30)
%32 = load i8*, i8** %6
%33 = call i64 @strlen(i8* dereferenceable(1) %32)
%34 = add nsw i64 %33, 1
%35 = call i32 @cli_send(%struct.cli* %0, i8* %32, i64 %34)
%36 = load i8*, i8** %6
%37 = call i32 @free(i8* %36)
%38 = bitcast i8** %7 to i8*
%39 = getelementptr inbounds i8*, i8** %2, i64 2
%40 = load i8*, i8** %39
%41 = call i32 (i8**, i8*, ...) @asprintf(i8** %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %40)
%42 = load i8*, i8** %7
%43 = call i64 @strlen(i8* dereferenceable(1) %42)
%44 = add nsw i64 %43, 1
%45 = call i32 @cli_send(%struct.cli* %0, i8* %42, i64 %44)
%46 = load i8*, i8** %7
%47 = call i32 @free(i8* %46)
%48 = bitcast i8** %8 to i8*
%49 = getelementptr inbounds i8*, i8** %2, i64 3
%50 = load i8*, i8** %49
%51 = call i32 (i8**, i8*, ...) @asprintf(i8** %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %50)
%52 = load i8*, i8** %8
%53 = call i64 @strlen(i8* dereferenceable(1) %52)
%54 = add nsw i64 %53, 1
%55 = call i32 @cli_send(%struct.cli* %0, i8* %52, i64 %54)
%56 = load i8*, i8** %8
%57 = call i32 @free(i8* %56)
switch i32 %1, label %78 [
i32 4, label %58
i32 5, label %67
]
58: ; preds = %3
%59 = bitcast i8** %9 to i8*
%60 = call i32 (i8**, i8*, ...) @asprintf(i8** %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%61 = load i8*, i8** %9
%62 = call i64 @strlen(i8* dereferenceable(1) %61)
%63 = add nsw i64 %62, 1
%64 = call i32 @cli_send(%struct.cli* %0, i8* %61, i64 %63)
%65 = load i8*, i8** %9
%66 = call i32 @free(i8* %65)
br label %78
67: ; preds = %3
%68 = bitcast i8** %10 to i8*
%69 = getelementptr inbounds i8*, i8** %2, i64 4
%70 = load i8*, i8** %69
%71 = call i32 (i8**, i8*, ...) @asprintf(i8** %10, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* %70)
%72 = load i8*, i8** %10
%73 = call i64 @strlen(i8* dereferenceable(1) %72)
%74 = add nsw i64 %73, 1
%75 = call i32 @cli_send(%struct.cli* %0, i8* %72, i64 %74)
%76 = load i8*, i8** %10
%77 = call i32 @free(i8* %76)
br label %78
78: ; preds = %3, %67, %58
ret i32 0
}