#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 GetFromSave(int, char);
int /*<<< orphan*/ printf(char *, ...);
void EndHTML(int _userId, int _cash) {
  printf("</tbody>");
  printf("<tr><th>Round %d</th><th></th><th>Fundos: R$ %d</th></tr>",
         GetFromSave(_userId, 'r'), GetFromSave(_userId, 'c'));
  printf("</table>");
  printf("<div id=\"botao\">");
  if (_cash) {
    printf("<input type=\"submit\" value=\"GO!\" class=\"botaoEnviar\" />");
  } else {
    printf("<input type=\"submit\" value=\"Aceito a derrota\" "
           "class=\"botaoEnviar\" />");
  }
  printf("</div>");
  printf("</form>");
  printf("<div id=\"warning\">");
  printf("<p>Nenhum campo deve estar vazio. Caso não queira apostar<br>em "
         "algum time, preencha seu campo com um zero.</p>");
  printf("</div>");
  printf("</body>");
  printf("</html>");
}


x86 assembly (clang, -O0):
<EndHTML>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x72,%esi
call   1040 <GetFromSave@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x63,%esi
call   1040 <GetFromSave@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     11a5 <EndHTML+0x85>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b3 <EndHTML+0x93>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EndHTML>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%edi
mov    $0x72,%esi
call   1040 <GetFromSave@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0x63,%esi
call   1040 <GetFromSave@plt>
lea    0xeb1(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %r14d,%r14d
lea    0xf0c(%rip),%rax
lea    0xecd(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf38(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf2e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf2d(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf86(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"</tbody>\00"
@.str.1 = [58 x i8] c"<tr><th>Round %d</th><th></th><th>Fundos: R$ %d</th></tr>\00"
@.str.2 = [9 x i8] c"</table>\00"
@.str.3 = [17 x i8] c"<div id=\22botao\22>\00"
@.str.4 = [56 x i8] c"<input type=\22submit\22 value=\22GO!\22 class=\22botaoEnviar\22 />\00"
@.str.5 = [69 x i8] c"<input type=\22submit\22 value=\22Aceito a derrota\22 class=\22botaoEnviar\22 />\00"
@.str.6 = [7 x i8] c"</div>\00"
@.str.7 = [8 x i8] c"</form>\00"
@.str.8 = [19 x i8] c"<div id=\22warning\22>\00"
@.str.9 = [113 x i8] c"<p>Nenhum campo deve estar vazio. Caso n\C3\A3o queira apostar<br>em algum time, preencha seu campo com um zero.</p>\00"
@.str.10 = [8 x i8] c"</body>\00"
@.str.11 = [8 x i8] c"</html>\00"
define void @EndHTML(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = call i32 @GetFromSave(i32 %6, i8 signext 114)
%8 = load i32, i32* %3
%9 = call i32 @GetFromSave(i32 %8, i8 signext 99)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
br label %19
17: ; preds = %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.5, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.9, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"</tbody>\00"
@.str.1 = [58 x i8] c"<tr><th>Round %d</th><th></th><th>Fundos: R$ %d</th></tr>\00"
@.str.2 = [9 x i8] c"</table>\00"
@.str.3 = [17 x i8] c"<div id=\22botao\22>\00"
@.str.4 = [56 x i8] c"<input type=\22submit\22 value=\22GO!\22 class=\22botaoEnviar\22 />\00"
@.str.5 = [69 x i8] c"<input type=\22submit\22 value=\22Aceito a derrota\22 class=\22botaoEnviar\22 />\00"
@.str.6 = [7 x i8] c"</div>\00"
@.str.7 = [8 x i8] c"</form>\00"
@.str.8 = [19 x i8] c"<div id=\22warning\22>\00"
@.str.9 = [113 x i8] c"<p>Nenhum campo deve estar vazio. Caso n\C3\A3o queira apostar<br>em algum time, preencha seu campo com um zero.</p>\00"
@.str.10 = [8 x i8] c"</body>\00"
@.str.11 = [8 x i8] c"</html>\00"
define void @EndHTML(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @GetFromSave(i32 %0, i8 signext 114)
%5 = tail call i32 @GetFromSave(i32 %0, i8 signext 99)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%9 = icmp eq i32 %1, 0
%10 = select i1 %9, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %10)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([113 x i8], [113 x i8]* @.str.9, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
ret void
}