#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*/ print_assembly_code();
int /*<<< orphan*/ print_lexmes();
int /*<<< orphan*/ print_vm_execution();
void run_appropiate_sections(int flag) {
  if (flag % 3 == 0) {
    print_lexmes();
  }
  if (flag % 5 == 0) {
    print_assembly_code();
  }
  if (flag % 7 == 0) {
    print_vm_execution();
  }
}


x86 assembly (clang, -O0):
<run_appropiate_sections>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1156 <run_appropiate_sections+0x26>
mov    $0x0,%al
call   1030 <print_lexmes@plt>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1171 <run_appropiate_sections+0x41>
mov    $0x0,%al
call   1040 <print_assembly_code@plt>
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    118c <run_appropiate_sections+0x5c>
mov    $0x0,%al
call   1050 <print_vm_execution@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_appropiate_sections>:
push   %rbx
mov    %edi,%ebx
imul   $0xaaaaaaab,%edi,%eax
add    $0x2aaaaaaa,%eax
cmp    $0x55555554,%eax
ja     114c <run_appropiate_sections+0x1c>
xor    %eax,%eax
call   1030 <print_lexmes@plt>
imul   $0xcccccccd,%ebx,%eax
add    $0x19999999,%eax
cmp    $0x33333332,%eax
ja     1165 <run_appropiate_sections+0x35>
xor    %eax,%eax
call   1040 <print_assembly_code@plt>
imul   $0xb6db6db7,%ebx,%eax
add    $0x12492492,%eax
cmp    $0x24924924,%eax
jbe    1179 <run_appropiate_sections+0x49>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1050 <print_vm_execution@plt>

LLVM IR (-O0):
define void @run_appropiate_sections(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @print_lexmes()
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
%10 = srem i32 %9, 5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @print_assembly_code()
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* %2
%16 = srem i32 %15, 7
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 (...) @print_vm_execution()
br label %20
20: ; preds = %18, %14
ret void
}

LLVM IR (-O2):
define void @run_appropiate_sections(i32 %0) {
%2 = srem i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @print_lexmes()
br label %6
6: ; preds = %4, %1
%7 = srem i32 %0, 5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @print_assembly_code()
br label %11
11: ; preds = %9, %6
%12 = srem i32 %0, 7
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = tail call i32 (...) @print_vm_execution()
br label %16
16: ; preds = %14, %11
ret void
}