#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*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  int b0 = (rand() % 60) + 1;
  int b1 = (rand() % 60) + 1;
  if (b0 == b1) {
    printf("Bingo: sorteie novamente.\n");
  } else if (b0 < b1) {
    printf("Bingo 01: %d\n", b0);
    printf("Bingo 02: %d\n", b1);
  } else {
    printf("Bingo 01: %d\n", b1);
    printf("Bingo 02: %d\n", b0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x3c,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x3c,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11a8 <main+0x68>
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1202 <main+0xc2>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11db <main+0x9b>
mov    -0x8(%rbp),%esi
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fd <main+0xbd>
mov    -0xc(%rbp),%esi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1202 <main+0xc2>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1070 <rand@plt>
mov    %eax,%r14d
movslq %eax,%rbp
imul   $0xffffffff88888889,%rbp,%rax
shr    $0x20,%rax
add    %r14d,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
add    %ecx,%eax
imul   $0x3c,%eax,%ebx
sub    %ebx,%ebp
neg    %ebx
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rdx
imul   $0xffffffff88888889,%rdx,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%esi
shr    $0x1f,%esi
sar    $0x5,%ecx
add    %esi,%ecx
imul   $0x3c,%ecx,%ecx
sub    %ecx,%edx
neg    %ecx
cmp    %edx,%ebp
jne    11c8 <main+0x78>
lea    0xe5b(%rip),%rdi
call   1030 <puts@plt>
jmp    1207 <main+0xb7>
lea    0x1(%r14,%rbx,1),%ebx
lea    0x1(%rax,%rcx,1),%ebp
lea    0xe28(%rip),%rdi
jge    11ee <main+0x9e>
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe24(%rip),%rdi
mov    %ebp,%esi
jmp    1200 <main+0xb0>
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe10(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Bingo: sorteie novamente.\0A\00"
@.str.1 = [14 x i8] c"Bingo 01: %d\0A\00"
@.str.2 = [14 x i8] c"Bingo 02: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
%6 = call i32 (...) @rand()
%7 = srem i32 %6, 60
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = call i32 (...) @rand()
%10 = srem i32 %9, 60
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %32
17: ; preds = %0
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i32, i32* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %3
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %24)
br label %31
26: ; preds = %17
%27 = load i32, i32* %3
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %2
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %26, %21
br label %32
32: ; preds = %31, %15
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Bingo 01: %d\0A\00"
@.str.2 = [14 x i8] c"Bingo 02: %d\0A\00"
@str = [26 x i8] c"Bingo: sorteie novamente.\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 60
%5 = add nsw i32 %4, 1
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 60
%8 = add nsw i32 %7, 1
%9 = icmp eq i32 %4, %7
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %20
12: ; preds = %0
%13 = icmp slt i32 %4, %7
br i1 %13, label %14, label %17
14: ; preds = %12
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %8)
br label %20
17: ; preds = %12
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %20
20: ; preds = %14, %17, %10
ret i32 0
}