#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);
void prt_not_mcn(int n) {
  for (int i = 1; i <= n; i++) {
    int d = i;
    while (d >= 0) {
      if (d != 3 && (d > 43 || d % 3 == 0))
        break;
      d -= 20;
    }
    if (d < 0)
      printf("%d\n", i);
  }
}


x86 assembly (clang, -O0):
<prt_not_mcn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     11a5 <prt_not_mcn+0x95>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1179 <prt_not_mcn+0x69>
cmpl   $0x3,-0xc(%rbp)
je     116b <prt_not_mcn+0x5b>
cmpl   $0x2b,-0xc(%rbp)
jg     1166 <prt_not_mcn+0x56>
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116b <prt_not_mcn+0x5b>
jmp    1179 <prt_not_mcn+0x69>
mov    -0xc(%rbp),%eax
sub    $0x14,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <prt_not_mcn+0x24>
cmpl   $0x0,-0xc(%rbp)
jge    1192 <prt_not_mcn+0x82>
mov    -0x8(%rbp),%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <prt_not_mcn+0x87>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <prt_not_mcn+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prt_not_mcn>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edi,%edi
jle    118f <prt_not_mcn+0x7f>
mov    %edi,%r15d
mov    $0x1,%ebx
mov    $0x15,%ebp
mov    $0xaaaaaaab,%r12d
lea    0xeca(%rip),%r14
jmp    1157 <prt_not_mcn+0x47>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%eax
add    $0x1,%ebp
cmp    %r15d,%ebx
mov    %eax,%ebx
je     118f <prt_not_mcn+0x7f>
mov    %ebp,%ecx
mov    %ebx,%eax
nopl   0x0(%rax,%rax,1)
cmp    $0x17,%ecx
je     1140 <prt_not_mcn+0x30>
lea    -0x14(%rcx),%edx
cmp    $0x2b,%edx
ja     114a <prt_not_mcn+0x3a>
mov    %eax,%esi
imul   %r12,%rsi
shr    $0x21,%rsi
lea    (%rsi,%rsi,2),%esi
neg    %esi
add    %esi,%ecx
cmp    $0x14,%ecx
je     114a <prt_not_mcn+0x3a>
add    $0xffffffec,%eax
mov    %edx,%ecx
cmp    $0x13,%edx
ja     1160 <prt_not_mcn+0x50>
jmp    1140 <prt_not_mcn+0x30>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @prt_not_mcn(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %5
5: ; preds = %35, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %38
9: ; preds = %5
%10 = load i32, i32* %3
store i32 %10, i32* %4
br label %11
11: ; preds = %25, %9
%12 = load i32, i32* %4
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %28
14: ; preds = %11
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %25
17: ; preds = %14
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 43
br i1 %19, label %24, label %20
20: ; preds = %17
%21 = load i32, i32* %4
%22 = srem i32 %21, 3
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %20, %17
br label %28
25: ; preds = %20, %14
%26 = load i32, i32* %4
%27 = sub nsw i32 %26, 20
store i32 %27, i32* %4
br label %11
28: ; preds = %24, %11
%29 = load i32, i32* %4
%30 = icmp slt i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load i32, i32* %3
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %31, %28
br label %35
35: ; preds = %34
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
br label %5
38: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @prt_not_mcn(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %5, label %3
3: ; preds = %1, %19
%4 = phi i32 [ %20, %19 ], [ 1, %1 ]
br label %6
5: ; preds = %19, %1
ret void
6: ; preds = %3, %14
%7 = phi i32 [ %15, %14 ], [ %4, %3 ]
%8 = icmp eq i32 %7, 3
br i1 %8, label %17, label %9
9: ; preds = %6
%10 = icmp ugt i32 %7, 43
%11 = urem i32 %7, 3
%12 = icmp eq i32 %11, 0
%13 = or i1 %10, %12
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = add nsw i32 %7, -20
%16 = icmp ugt i32 %7, 19
br i1 %16, label %6, label %17
17: ; preds = %6, %14
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %19
19: ; preds = %9, %17
%20 = add nuw i32 %4, 1
%21 = icmp eq i32 %4, %0
br i1 %21, label %5, label %3
}