#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *, char *,
                           char *, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
void newRow(FILE *f) {
  char buying[6], maint[6], doors[5], persons[5], lug_boot[6], safety[5];
  do {
    printf("Insert value buying: ");
    scanf("%s", buying);
  } while (strlen(buying) > 6);
  do {
    printf("Insert value maint: ");
    scanf("%s", maint);
  } while (strlen(maint) > 6);
  do {
    printf("Insert value doors: ");
    scanf("%s", doors);
  } while (strlen(doors) > 5);
  do {
    printf("Insert value persons: ");
    scanf("%s", persons);
  } while (strlen(persons) > 5);
  do {
    printf("Insert value lug_boot: ");
    scanf("%s", lug_boot);
  } while (strlen(lug_boot) > 6);
  do {
    printf("Insert value safety: ");
    scanf("%s", safety);
  } while (strlen(safety) > 5);
  fprintf(f, "%s,%s,%s,%s,%s,%s,-1", buying, maint, doors, persons, lug_boot,
          safety);
  printf("Appended to file: %s,%s,%s,%s,%s,%s,-1\n", buying, maint, doors,
         persons, lug_boot, safety);
}


x86 assembly (clang, -O0):
<newRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xe(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1060 <scanf@plt>
lea    -0xe(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x6,%eax
jg     114c <newRow+0xc>
jmp    1181 <newRow+0x41>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x14(%rbp),%rsi
lea    0xe7c(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x14(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x6,%eax
jg     1181 <newRow+0x41>
jmp    11b6 <newRow+0x76>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x19(%rbp),%rsi
lea    0xe47(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x19(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jg     11b6 <newRow+0x76>
jmp    11eb <newRow+0xab>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1e(%rbp),%rsi
lea    0xe12(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x1e(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jg     11eb <newRow+0xab>
jmp    1220 <newRow+0xe0>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x24(%rbp),%rsi
lea    0xddd(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x24(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x6,%eax
jg     1220 <newRow+0xe0>
jmp    1255 <newRow+0x115>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x29(%rbp),%rsi
lea    0xda8(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x29(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jg     1255 <newRow+0x115>
mov    -0x8(%rbp),%rdi
lea    -0xe(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x19(%rbp),%r8
lea    -0x1e(%rbp),%r9
lea    -0x24(%rbp),%r10
lea    -0x29(%rbp),%rax
lea    0xde0(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <fprintf@plt>
lea    -0xe(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
lea    -0x1e(%rbp),%r8
lea    -0x24(%rbp),%r9
lea    -0x29(%rbp),%rax
lea    0xdc8(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newRow>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,0x20(%rsp)
lea    0xea6(%rip),%r15
lea    0xeb5(%rip),%r12
lea    0x1a(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x6,%eax
jg     1170 <newRow+0x30>
lea    0xe80(%rip),%r15
lea    0xe76(%rip),%r12
lea    0x14(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x6,%eax
jg     11b0 <newRow+0x70>
lea    0xe55(%rip),%r15
lea    0xe36(%rip),%r12
lea    0xf(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jg     11f0 <newRow+0xb0>
lea    0xe2a(%rip),%r15
lea    0xdf6(%rip),%r12
lea    0xa(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jg     1230 <newRow+0xf0>
lea    0xe01(%rip),%r12
lea    0xdb6(%rip),%rbx
lea    0x32(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    %r15,%rdi
call   1030 <strlen@plt>
cmp    $0x6,%eax
jg     1270 <newRow+0x130>
lea    0xdd9(%rip),%r12
lea    0xd76(%rip),%r13
lea    0x2d(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jg     12b0 <newRow+0x170>
lea    0xdaf(%rip),%rsi
lea    0x1a(%rsp),%r12
lea    0x14(%rsp),%r13
lea    0xf(%rsp),%rbp
lea    0xa(%rsp),%r14
mov    0x20(%rsp),%rdi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbp,%r8
mov    %r14,%r9
push   %rbx
push   %r15
call   1050 <fprintf@plt>
add    $0x8,%rsp
lea    0xd8c(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
mov    %r15,%r9
xor    %eax,%eax
push   %rbx
call   1040 <printf@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Insert value buying: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [21 x i8] c"Insert value maint: \00"
@.str.3 = [21 x i8] c"Insert value doors: \00"
@.str.4 = [23 x i8] c"Insert value persons: \00"
@.str.5 = [24 x i8] c"Insert value lug_boot: \00"
@.str.6 = [22 x i8] c"Insert value safety: \00"
@.str.7 = [21 x i8] c"%s,%s,%s,%s,%s,%s,-1\00"
@.str.8 = [40 x i8] c"Appended to file: %s,%s,%s,%s,%s,%s,-1\0A\00"
define void @newRow(i32* %0) {
%2 = alloca i32*
%3 = alloca [6 x i8]
%4 = alloca [6 x i8]
%5 = alloca [5 x i8]
%6 = alloca [5 x i8]
%7 = alloca [6 x i8]
%8 = alloca [5 x i8]
store i32* %0, i32** %2
br label %9
9: ; preds = %13, %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%15 = call i32 @strlen(i8* %14)
%16 = icmp sgt i32 %15, 6
br i1 %16, label %9, label %17
17: ; preds = %13
br label %18
18: ; preds = %22, %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %20)
br label %22
22: ; preds = %18
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%24 = call i32 @strlen(i8* %23)
%25 = icmp sgt i32 %24, 6
br i1 %25, label %18, label %26
26: ; preds = %22
br label %27
27: ; preds = %31, %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%29 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %29)
br label %31
31: ; preds = %27
%32 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%33 = call i32 @strlen(i8* %32)
%34 = icmp sgt i32 %33, 5
br i1 %34, label %27, label %35
35: ; preds = %31
br label %36
36: ; preds = %40, %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%38 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %38)
br label %40
40: ; preds = %36
%41 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%42 = call i32 @strlen(i8* %41)
%43 = icmp sgt i32 %42, 5
br i1 %43, label %36, label %44
44: ; preds = %40
br label %45
45: ; preds = %49, %44
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%47 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %47)
br label %49
49: ; preds = %45
%50 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%51 = call i32 @strlen(i8* %50)
%52 = icmp sgt i32 %51, 6
br i1 %52, label %45, label %53
53: ; preds = %49
br label %54
54: ; preds = %58, %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%56 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %56)
br label %58
58: ; preds = %54
%59 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%60 = call i32 @strlen(i8* %59)
%61 = icmp sgt i32 %60, 5
br i1 %61, label %54, label %62
62: ; preds = %58
%63 = load i32*, i32** %2
%64 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%65 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%66 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%67 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%68 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%69 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%70 = call i32 @fprintf(i32* %63, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* %64, i8* %65, i8* %66, i8* %67, i8* %68, i8* %69)
%71 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%72 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%73 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%74 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%75 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%76 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %71, i8* %72, i8* %73, i8* %74, i8* %75, i8* %76)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Insert value buying: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [21 x i8] c"Insert value maint: \00"
@.str.3 = [21 x i8] c"Insert value doors: \00"
@.str.4 = [23 x i8] c"Insert value persons: \00"
@.str.5 = [24 x i8] c"Insert value lug_boot: \00"
@.str.6 = [22 x i8] c"Insert value safety: \00"
@.str.7 = [21 x i8] c"%s,%s,%s,%s,%s,%s,-1\00"
@.str.8 = [40 x i8] c"Appended to file: %s,%s,%s,%s,%s,%s,-1\0A\00"
define void @newRow(i32* nocapture %0) {
%2 = alloca [6 x i8]
%3 = alloca [6 x i8]
%4 = alloca [5 x i8]
%5 = alloca [5 x i8]
%6 = alloca [6 x i8]
%7 = alloca [5 x i8]
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
br label %14
14: ; preds = %14, %1
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%17 = call i32 @strlen(i8* %8)
%18 = icmp sgt i32 %17, 6
br i1 %18, label %14, label %19
19: ; preds = %14, %19
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%22 = call i32 @strlen(i8* %9)
%23 = icmp sgt i32 %22, 6
br i1 %23, label %19, label %24
24: ; preds = %19, %24
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%27 = call i32 @strlen(i8* %10)
%28 = icmp sgt i32 %27, 5
br i1 %28, label %24, label %29
29: ; preds = %24, %29
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%32 = call i32 @strlen(i8* %11)
%33 = icmp sgt i32 %32, 5
br i1 %33, label %29, label %34
34: ; preds = %29, %34
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%37 = call i32 @strlen(i8* %12)
%38 = icmp sgt i32 %37, 6
br i1 %38, label %34, label %39
39: ; preds = %34, %39
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%42 = call i32 @strlen(i8* %13)
%43 = icmp sgt i32 %42, 5
br i1 %43, label %39, label %44
44: ; preds = %39
%45 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* %8, i8* %9, i8* %10, i8* %11, i8* %12, i8* %13)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %8, i8* %9, i8* %10, i8* %11, i8* %12, i8* %13)
ret void
}