#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*/ goldbach_number(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int i, disproven = 0;
  for (i = 8; i < 2000000; i += 2) {
    if (!goldbach_number(i)) {
      printf("Tallet %d modbeviser det\n", i);
      disproven = 1;
    }
  }
  if (!disproven) {
    printf("kunne ikke finde et tal mellem 7 og 2000000 der mod beviser\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x8,-0x8(%rbp)
cmpl   $0x1e8480,-0x8(%rbp)
jge    1186 <main+0x66>
mov    -0x8(%rbp),%edi
call   1040 <goldbach_number@plt>
cmp    $0x0,%eax
jne    1173 <main+0x53>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
jmp    1178 <main+0x58>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
cmpl   $0x0,-0xc(%rbp)
jne    119e <main+0x7e>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x8,%ebx
mov    $0x1,%bpl
lea    0xebd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1050 <goldbach_number@plt>
test   %eax,%eax
je     116a <main+0x3a>
lea    0x2(%rbx),%eax
cmp    $0x1e847e,%ebx
mov    %eax,%ebx
jb     1150 <main+0x20>
jmp    1187 <main+0x57>
xor    %ebp,%ebp
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2(%rbx),%eax
cmp    $0x1e847e,%ebx
mov    %eax,%ebx
jb     1150 <main+0x20>
jmp    1199 <main+0x69>
test   $0x1,%bpl
je     1199 <main+0x69>
lea    0xe86(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Tallet %d modbeviser det\0A\00"
@.str.1 = [61 x i8] c"kunne ikke finde et tal mellem 7 og 2000000 der mod beviser\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 8, i32* %2
br label %4
4: ; preds = %15, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 2000000
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @goldbach_number(i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %12)
store i32 1, i32* %3
br label %14
14: ; preds = %11, %7
br label %15
15: ; preds = %14
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 2
store i32 %17, i32* %2
br label %4
18: ; preds = %4
%19 = load i32, i32* %3
%20 = icmp ne i32 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Tallet %d modbeviser det\0A\00"
@str = [60 x i8] c"kunne ikke finde et tal mellem 7 og 2000000 der mod beviser\00"
define i32 @main() {
br label %1
1: ; preds = %11, %0
%2 = phi i1 [ false, %11 ], [ true, %0 ]
%3 = phi i32 [ %13, %11 ], [ 8, %0 ]
br label %4
4: ; preds = %1, %8
%5 = phi i32 [ %9, %8 ], [ %3, %1 ]
%6 = tail call i32 @goldbach_number(i32 %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = add nuw nsw i32 %5, 2
%10 = icmp ult i32 %5, 1999998
br i1 %10, label %4, label %15
11: ; preds = %4
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %5)
%13 = add nuw nsw i32 %5, 2
%14 = icmp ult i32 %5, 1999998
br i1 %14, label %1, label %18
15: ; preds = %8
br i1 %2, label %16, label %18
16: ; preds = %15
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
br label %18
18: ; preds = %11, %16, %15
ret i32 0
}