#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *malloc(size_t);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int /*<<< orphan*/ strncat(char *, char *, size_t);
char *strtok(char *, char *);
int /*<<< orphan*/ system(char *);
void one_part_compile(void) {
  char *left_command = "gcc -g -Wall ";
  char *right_command = " -o ";
  char *combined1;
  char *link_math = " -lm";
  char *math_option = malloc(1024);
  char buf[1024];
  char *program_name = malloc(1024);
  printf("Input program name without file extension: ");
  fgets(program_name, 1024, stdin);
  program_name = strtok(program_name, "\n");
  char *c = ".c";
  char *c_program = malloc(1024);
  size_t c_len = strlen(program_name);
  strncat(c_program, program_name, c_len);
  strncat(c_program, c, c_len);
  size_t len = strlen(left_command) + strlen(right_command) +
               strlen(program_name) + strlen(c_program) + strlen(link_math) + 3;
  combined1 = malloc(len * sizeof(char));
  strncat(combined1, left_command, len);
  strncat(combined1, c_program, len);
  strncat(combined1, right_command, len);
  strncat(combined1, program_name, len);
  printf("Math linking needed? (y/n): ");
  fgets(buf, 1024, stdin);
  sscanf(buf, "%c", math_option);
LOOP:
  while (1) {
    if (math_option[0] == 'y') {
      strncat(combined1, link_math, len);
      printf("%s\n", combined1);
      break;
    } else if (math_option[0] == 'n') {
      printf("%s\n", combined1);
      break;
    } else {
      printf("Invalid input, retrying\n");
      goto LOOP;
    }
  }
  char *run = "./";
  char *combined2;
  size_t run_len = strlen(program_name) + 5;
  combined2 = malloc(run_len * sizeof(char));
  strncat(combined2, run, run_len);
  strncat(combined2, program_name, run_len);
  system(combined1);
  system(combined2);
  free(program_name);
  free(c_program);
  free(math_option);
  free(combined1);
  free(combined2);
}


x86 assembly (clang, -O0):
<one_part_compile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x480,%rsp
lea    0xe5e(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xe61(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xe5b(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    $0x400,%edi
call   1090 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x400,%edi
call   1090 <malloc@plt>
mov    %rax,-0x438(%rbp)
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x438(%rbp),%rdi
mov    0x2df1(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1080 <fgets@plt>
mov    -0x438(%rbp),%rdi
lea    0xe71(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x438(%rbp)
lea    0xe20(%rip),%rax
mov    %rax,-0x440(%rbp)
mov    $0x400,%edi
call   1090 <malloc@plt>
mov    %rax,-0x448(%rbp)
mov    -0x438(%rbp),%rdi
call   1040 <strlen@plt>
cltq
mov    %rax,-0x450(%rbp)
mov    -0x448(%rbp),%rdi
mov    -0x438(%rbp),%rsi
mov    -0x450(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x448(%rbp),%rdi
mov    -0x440(%rbp),%rsi
mov    -0x450(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x480(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x480(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x47c(%rbp)
mov    -0x438(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x47c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x478(%rbp)
mov    -0x448(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x478(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x474(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x474(%rbp),%eax
add    %ecx,%eax
add    $0x3,%eax
cltq
mov    %rax,-0x458(%rbp)
mov    -0x458(%rbp),%rdi
shl    $0x0,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x458(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x448(%rbp),%rsi
mov    -0x458(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x458(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x438(%rbp),%rsi
mov    -0x458(%rbp),%rdx
call   1070 <strncat@plt>
lea    0xcd2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x430(%rbp),%rdi
mov    0x2c5e(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1080 <fgets@plt>
lea    -0x430(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xcbc(%rip),%rsi
call   10a0 <sscanf@plt>
jmp    13b2 <one_part_compile+0x222>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x79,%eax
jne    13ed <one_part_compile+0x25d>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x458(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x18(%rbp),%rsi
lea    0xc86(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1427 <one_part_compile+0x297>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6e,%eax
jne    1414 <one_part_compile+0x284>
mov    -0x18(%rbp),%rsi
lea    0xc5f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1427 <one_part_compile+0x297>
lea    0xc50(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13ad <one_part_compile+0x21d>
lea    0xc56(%rip),%rax
mov    %rax,-0x460(%rbp)
mov    -0x438(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x5,%eax
cltq
mov    %rax,-0x470(%rbp)
mov    -0x470(%rbp),%rdi
shl    $0x0,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x468(%rbp)
mov    -0x468(%rbp),%rdi
mov    -0x460(%rbp),%rsi
mov    -0x470(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x468(%rbp),%rdi
mov    -0x438(%rbp),%rsi
mov    -0x470(%rbp),%rdx
call   1070 <strncat@plt>
mov    -0x18(%rbp),%rdi
call   1050 <system@plt>
mov    -0x468(%rbp),%rdi
call   1050 <system@plt>
mov    -0x438(%rbp),%rdi
call   1030 <free@plt>
mov    -0x448(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x468(%rbp),%rdi
call   1030 <free@plt>
add    $0x480,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_part_compile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    $0x400,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbx
mov    $0x400,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbp
lea    0xe46(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
mov    $0x400,%esi
call   1090 <fgets@plt>
lea    0xe4e(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strtok@plt>
mov    %rax,%r13
mov    $0x400,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    %r13,%rdi
call   1050 <strlen@plt>
movslq %eax,%r15
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r13,(%rsp)
mov    %r15,%rdx
call   1080 <strncat@plt>
lea    0xe14(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
call   1080 <strncat@plt>
lea    0xdbc(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,%r12d
lea    0xdbb(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
mov    %r13,%rdi
call   1050 <strlen@plt>
mov    %eax,%r13d
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,%r15d
lea    0xd9c(%rip),%rdi
call   1050 <strlen@plt>
add    %r12d,%ebp
add    %r13d,%ebp
add    %r15d,%ebp
add    %ebp,%eax
add    $0x3,%eax
movslq %eax,%r13
mov    %r13,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r12
mov    %rax,%rdi
lea    0xd5e(%rip),%rsi
mov    %r13,%rdx
call   1080 <strncat@plt>
mov    %r12,%rdi
mov    %r14,0x8(%rsp)
mov    %r14,%rsi
mov    (%rsp),%r14
mov    %r13,%rdx
call   1080 <strncat@plt>
mov    %r12,%rdi
lea    0xd43(%rip),%rsi
mov    %r13,%rdx
call   1080 <strncat@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
call   1080 <strncat@plt>
lea    0xd61(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2cf2(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x400,%esi
call   1090 <fgets@plt>
lea    0xd55(%rip),%rsi
mov    %rbp,%rdi
mov    %rbx,%rdx
call   10b0 <sscanf@plt>
lea    0xd49(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rbx),%eax
cmp    $0x6e,%al
je     1357 <one_part_compile+0x1b7>
cmp    $0x79,%al
je     1345 <one_part_compile+0x1a5>
mov    %rbp,%rdi
call   1040 <puts@plt>
jmp    1330 <one_part_compile+0x190>
lea    0xcc7(%rip),%rsi
mov    %r12,%rdi
mov    %r13,%rdx
call   1080 <strncat@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
add    $0x5,%eax
movslq %eax,%rbp
mov    %rbp,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r15
lea    0xcea(%rip),%rsi
mov    %rax,%rdi
mov    %rbp,%rdx
call   1080 <strncat@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1080 <strncat@plt>
mov    %r12,%rdi
call   1060 <system@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"gcc -g -Wall \00"
@.str.1 = [5 x i8] c" -o \00"
@.str.2 = [5 x i8] c" -lm\00"
@.str.3 = [44 x i8] c"Input program name without file extension: \00"
@stdin = global i32 0
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [3 x i8] c".c\00"
@.str.6 = [29 x i8] c"Math linking needed? (y/n): \00"
@.str.7 = [3 x i8] c"%c\00"
@.str.8 = [4 x i8] c"%s\0A\00"
@.str.9 = [25 x i8] c"Invalid input, retrying\0A\00"
@.str.10 = [3 x i8] c"./\00"
define void @one_part_compile() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [1024 x i8]
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i64
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %4
%15 = call i8* @malloc(i64 1024)
store i8* %15, i8** %5
%16 = call i8* @malloc(i64 1024)
store i8* %16, i8** %7
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%18 = load i8*, i8** %7
%19 = load i32, i32* @stdin
%20 = call i32 @fgets(i8* %18, i32 1024, i32 %19)
%21 = load i8*, i8** %7
%22 = call i8* @strtok(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %22, i8** %7
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %8
%23 = call i8* @malloc(i64 1024)
store i8* %23, i8** %9
%24 = load i8*, i8** %7
%25 = call i32 @strlen(i8* %24)
%26 = sext i32 %25 to i64
store i64 %26, i64* %10
%27 = load i8*, i8** %9
%28 = load i8*, i8** %7
%29 = load i64, i64* %10
%30 = call i32 @strncat(i8* %27, i8* %28, i64 %29)
%31 = load i8*, i8** %9
%32 = load i8*, i8** %8
%33 = load i64, i64* %10
%34 = call i32 @strncat(i8* %31, i8* %32, i64 %33)
%35 = load i8*, i8** %1
%36 = call i32 @strlen(i8* %35)
%37 = load i8*, i8** %2
%38 = call i32 @strlen(i8* %37)
%39 = add nsw i32 %36, %38
%40 = load i8*, i8** %7
%41 = call i32 @strlen(i8* %40)
%42 = add nsw i32 %39, %41
%43 = load i8*, i8** %9
%44 = call i32 @strlen(i8* %43)
%45 = add nsw i32 %42, %44
%46 = load i8*, i8** %4
%47 = call i32 @strlen(i8* %46)
%48 = add nsw i32 %45, %47
%49 = add nsw i32 %48, 3
%50 = sext i32 %49 to i64
store i64 %50, i64* %11
%51 = load i64, i64* %11
%52 = mul i64 %51, 1
%53 = call i8* @malloc(i64 %52)
store i8* %53, i8** %3
%54 = load i8*, i8** %3
%55 = load i8*, i8** %1
%56 = load i64, i64* %11
%57 = call i32 @strncat(i8* %54, i8* %55, i64 %56)
%58 = load i8*, i8** %3
%59 = load i8*, i8** %9
%60 = load i64, i64* %11
%61 = call i32 @strncat(i8* %58, i8* %59, i64 %60)
%62 = load i8*, i8** %3
%63 = load i8*, i8** %2
%64 = load i64, i64* %11
%65 = call i32 @strncat(i8* %62, i8* %63, i64 %64)
%66 = load i8*, i8** %3
%67 = load i8*, i8** %7
%68 = load i64, i64* %11
%69 = call i32 @strncat(i8* %66, i8* %67, i64 %68)
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%71 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%72 = load i32, i32* @stdin
%73 = call i32 @fgets(i8* %71, i32 1024, i32 %72)
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%75 = load i8*, i8** %5
%76 = call i32 @sscanf(i8* %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %75)
br label %77
77: ; preds = %100, %0
br label %78
78: ; preds = %77
%79 = load i8*, i8** %5
%80 = getelementptr inbounds i8, i8* %79, i64 0
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 121
br i1 %83, label %84, label %91
84: ; preds = %78
%85 = load i8*, i8** %3
%86 = load i8*, i8** %4
%87 = load i64, i64* %11
%88 = call i32 @strncat(i8* %85, i8* %86, i64 %87)
%89 = load i8*, i8** %3
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %89)
br label %102
91: ; preds = %78
%92 = load i8*, i8** %5
%93 = getelementptr inbounds i8, i8* %92, i64 0
%94 = load i8, i8* %93
%95 = sext i8 %94 to i32
%96 = icmp eq i32 %95, 110
br i1 %96, label %97, label %100
97: ; preds = %91
%98 = load i8*, i8** %3
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %98)
br label %102
100: ; preds = %91
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
br label %77
102: ; preds = %97, %84
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8** %12
%103 = load i8*, i8** %7
%104 = call i32 @strlen(i8* %103)
%105 = add nsw i32 %104, 5
%106 = sext i32 %105 to i64
store i64 %106, i64* %14
%107 = load i64, i64* %14
%108 = mul i64 %107, 1
%109 = call i8* @malloc(i64 %108)
store i8* %109, i8** %13
%110 = load i8*, i8** %13
%111 = load i8*, i8** %12
%112 = load i64, i64* %14
%113 = call i32 @strncat(i8* %110, i8* %111, i64 %112)
%114 = load i8*, i8** %13
%115 = load i8*, i8** %7
%116 = load i64, i64* %14
%117 = call i32 @strncat(i8* %114, i8* %115, i64 %116)
%118 = load i8*, i8** %3
%119 = call i32 @system(i8* %118)
%120 = load i8*, i8** %13
%121 = call i32 @system(i8* %120)
%122 = load i8*, i8** %7
%123 = call i32 @free(i8* %122)
%124 = load i8*, i8** %9
%125 = call i32 @free(i8* %124)
%126 = load i8*, i8** %5
%127 = call i32 @free(i8* %126)
%128 = load i8*, i8** %3
%129 = call i32 @free(i8* %128)
%130 = load i8*, i8** %13
%131 = call i32 @free(i8* %130)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"gcc -g -Wall \00"
@.str.1 = [5 x i8] c" -o \00"
@.str.2 = [5 x i8] c" -lm\00"
@.str.3 = [44 x i8] c"Input program name without file extension: \00"
@stdin = global i32 0
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [3 x i8] c".c\00"
@.str.6 = [29 x i8] c"Math linking needed? (y/n): \00"
@.str.7 = [3 x i8] c"%c\00"
@.str.10 = [3 x i8] c"./\00"
@str = [24 x i8] c"Invalid input, retrying\00"
define void @one_part_compile() {
%1 = alloca [1024 x i8]
%2 = tail call dereferenceable_or_null(1024) i8* @malloc(i64 1024)
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = tail call dereferenceable_or_null(1024) i8* @malloc(i64 1024)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = tail call i32 @fgets(i8* %4, i32 1024, i32 %6)
%8 = tail call i8* @strtok(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call dereferenceable_or_null(1024) i8* @malloc(i64 1024)
%10 = tail call i32 @strlen(i8* %8)
%11 = sext i32 %10 to i64
%12 = tail call i32 @strncat(i8* %9, i8* %8, i64 %11)
%13 = tail call i32 @strncat(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i64 %11)
%14 = tail call i32 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%15 = tail call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 @strlen(i8* %8)
%17 = tail call i32 @strlen(i8* %9)
%18 = tail call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%19 = add i32 %14, 3
%20 = add i32 %19, %15
%21 = add i32 %20, %16
%22 = add i32 %21, %17
%23 = add i32 %22, %18
%24 = sext i32 %23 to i64
%25 = tail call i8* @malloc(i64 %24)
%26 = tail call i32 @strncat(i8* %25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %24)
%27 = tail call i32 @strncat(i8* %25, i8* %9, i64 %24)
%28 = tail call i32 @strncat(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %24)
%29 = tail call i32 @strncat(i8* %25, i8* %8, i64 %24)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%31 = load i32, i32* @stdin
%32 = call i32 @fgets(i8* %3, i32 1024, i32 %31)
%33 = call i32 @sscanf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %2)
br label %34
34: ; preds = %38, %0
%35 = load i8, i8* %2
switch i8 %35, label %38 [
i8 121, label %36
i8 110, label %40
]
36: ; preds = %34
%37 = call i32 @strncat(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %24)
br label %40
38: ; preds = %34
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %34
40: ; preds = %34, %36
%41 = call i32 @puts(i8* dereferenceable(1) %25)
%42 = call i32 @strlen(i8* %8)
%43 = add nsw i32 %42, 5
%44 = sext i32 %43 to i64
%45 = call i8* @malloc(i64 %44)
%46 = call i32 @strncat(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i64 %44)
%47 = call i32 @strncat(i8* %45, i8* %8, i64 %44)
%48 = call i32 @system(i8* %25)
%49 = call i32 @system(i8* %45)
%50 = call i32 @free(i8* %8)
%51 = call i32 @free(i8* %9)
%52 = call i32 @free(i8* %2)
%53 = call i32 @free(i8* %25)
%54 = call i32 @free(i8* %45)
ret void
}