#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *, char *, char *, int *);
int main(void) {
  int intDump, id = 0;
  char word[64], stringDump[64];
  while (scanf("%d %s %s %d", &intDump, word, stringDump, &intDump) != EOF) {
    printf("INSERT INTO Words VALUES (%d, '%s', 0, '0');\n", id++, word);
  }
  printf("INSERT INTO Essentials VALUES (0, 26, 0)\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x50(%rbp),%rdx
lea    -0x90(%rbp),%rcx
lea    0xeb5(%rip),%rdi
lea    -0x8(%rbp),%r8
mov    %r8,%rsi
call   1040 <scanf@plt>
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
je     1189 <main+0x69>
mov    -0xc(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    -0x50(%rbp),%rdx
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1139 <main+0x19>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
lea    0xeb8(%rip),%rdi
lea    0x50(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%rsi
mov    %rsi,%r8
call   1050 <scanf@plt>
mov    0x2e82(%rip),%r14
cmp    (%r14),%rax
je     11bf <main+0x8f>
lea    0x50(%rsp),%r13
lea    0xe89(%rip),%r15
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x1(%rsi),%ebp
lea    0xe72(%rip),%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %rbx,%r8
call   1050 <scanf@plt>
mov    %ebp,%esi
cmp    (%r14),%rax
jne    1190 <main+0x60>
lea    0xe74(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %s %s %d\00"
@EOF = global i64 0
@.str.1 = [46 x i8] c"INSERT INTO Words VALUES (%d, '%s', 0, '0');\0A\00"
@.str.2 = [42 x i8] c"INSERT INTO Essentials VALUES (0, 26, 0)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [64 x i8]
%5 = alloca [64 x i8]
store i32 0, i32* %1
store i32 0, i32* %3
br label %6
6: ; preds = %12, %0
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%9 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i8* %7, i8* %8, i32* %2)
%10 = load i64, i64* @EOF
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %6
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %13, i8* %15)
br label %6
17: ; preds = %6
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %s %s %d\00"
@EOF = global i64 0
@.str.1 = [46 x i8] c"INSERT INTO Words VALUES (%d, '%s', 0, '0');\0A\00"
@str = [41 x i8] c"INSERT INTO Essentials VALUES (0, 26, 0)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = alloca [64 x i8]
%4 = bitcast i32* %1 to i8*
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%7 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %5, i8* %6, i32* %1)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %17, label %10
10: ; preds = %0, %10
%11 = phi i32 [ %12, %10 ], [ 0, %0 ]
%12 = add nuw nsw i32 %11, 1
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %11, i8* %5)
%14 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %5, i8* %6, i32* %1)
%15 = load i64, i64* @EOF
%16 = icmp eq i64 %14, %15
br i1 %16, label %17, label %10
17: ; preds = %10, %0
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 0
}