#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int main() {
  int i;
  char nome[45];
  for (i = 81; i <= 254; i++) {
    if (i < 10) {
      sprintf(nome, "./crosssums puzzle_prof/Kakuro_00%d.cfg", i);
    } else {
      if (i < 100) {
        sprintf(nome, "./crosssums puzzle_prof/Kakuro_0%d.cfg", i);
      } else {
        sprintf(nome, "./crosssums puzzle_prof/Kakuro_%d.cfg", i);
      }
    }
    system(nome);
    printf(" este foi o Kakuro #%d :)", i);
    getchar();
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x51,-0x8(%rbp)
cmpl   $0xfe,-0x8(%rbp)
jg     11fc <main+0xac>
cmpl   $0xa,-0x8(%rbp)
jge    1195 <main+0x45>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe75(%rip),%rsi
call   1060 <sprintf@plt>
jmp    11cf <main+0x7f>
cmpl   $0x64,-0x8(%rbp)
jge    11b7 <main+0x67>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe7b(%rip),%rsi
call   1060 <sprintf@plt>
jmp    11ca <main+0x7a>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe8a(%rip),%rsi
call   1060 <sprintf@plt>
jmp    11cf <main+0x7f>
lea    -0x40(%rbp),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <main+0x16>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    $0x51,%ebx
lea    0xe97(%rip),%r12
lea    0xeb7(%rip),%r13
mov    %rsp,%r14
lea    0xed3(%rip),%r15
nopw   0x0(%rax,%rax,1)
cmp    $0x64,%ebx
mov    %r13,%rsi
cmovb  %r12,%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1060 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
mov    %r15,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
add    $0x1,%ebx
cmp    $0xff,%ebx
jne    1180 <main+0x30>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"./crosssums puzzle_prof/Kakuro_00%d.cfg\00"
@.str.1 = [39 x i8] c"./crosssums puzzle_prof/Kakuro_0%d.cfg\00"
@.str.2 = [38 x i8] c"./crosssums puzzle_prof/Kakuro_%d.cfg\00"
@.str.3 = [26 x i8] c" este foi o Kakuro #%d :)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [45 x i8]
store i32 0, i32* %1
store i32 81, i32* %2
br label %4
4: ; preds = %32, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 254
br i1 %6, label %7, label %35
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = getelementptr inbounds [45 x i8], [45 x i8]* %3, i64 0, i64 0
%12 = load i32, i32* %2
%13 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %26
14: ; preds = %7
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 100
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = getelementptr inbounds [45 x i8], [45 x i8]* %3, i64 0, i64 0
%19 = load i32, i32* %2
%20 = call i32 @sprintf(i8* %18, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %25
21: ; preds = %14
%22 = getelementptr inbounds [45 x i8], [45 x i8]* %3, i64 0, i64 0
%23 = load i32, i32* %2
%24 = call i32 @sprintf(i8* %22, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %21, %17
br label %26
26: ; preds = %25, %10
%27 = getelementptr inbounds [45 x i8], [45 x i8]* %3, i64 0, i64 0
%28 = call i32 @system(i8* %27)
%29 = load i32, i32* %2
%30 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = call i32 (...) @getchar()
br label %32
32: ; preds = %26
%33 = load i32, i32* %2
%34 = add nsw i32 %33, 1
store i32 %34, i32* %2
br label %4
35: ; preds = %4
%36 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [39 x i8] c"./crosssums puzzle_prof/Kakuro_0%d.cfg\00"
@.str.2 = [38 x i8] c"./crosssums puzzle_prof/Kakuro_%d.cfg\00"
@.str.3 = [26 x i8] c" este foi o Kakuro #%d :)\00"
define i32 @main() {
%1 = alloca [45 x i8]
%2 = getelementptr inbounds [45 x i8], [45 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = phi i32 [ 81, %0 ], [ %11, %3 ]
%5 = icmp ult i32 %4, 100
%6 = select i1 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) %6, i32 %4)
%8 = call i32 @system(i8* %2)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%10 = tail call i32 (...) @getchar()
%11 = add nuw nsw i32 %4, 1
%12 = icmp eq i32 %11, 255
br i1 %12, label %13, label %3
13: ; preds = %3
%14 = tail call i32 @exit(i32 0)
unreachable
}