#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*/ assert(int);
int smallest_multiple(int);
int smallest_multiple_efficient(int);
int main() {
  assert(60 == smallest_multiple(5));
  assert(2520 == smallest_multiple(10));
  assert(232792560 == smallest_multiple(20));
  assert(2329089562800 == smallest_multiple(30));
  assert(60 == smallest_multiple_efficient(5));
  assert(2520 == smallest_multiple_efficient(10));
  assert(232792560 == smallest_multiple_efficient(20));
  assert(2329089562800 == smallest_multiple_efficient(30));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1040 <smallest_multiple@plt>
mov    %eax,%ecx
mov    $0x3c,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xa,%edi
call   1040 <smallest_multiple@plt>
mov    %eax,%ecx
mov    $0x9d8,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x14,%edi
call   1040 <smallest_multiple@plt>
mov    %eax,%ecx
mov    $0xde021f0,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1e,%edi
call   1040 <smallest_multiple@plt>
movslq %eax,%rcx
movabs $0x21e488e58b0,%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x5,%edi
call   1050 <smallest_multiple_efficient@plt>
mov    %eax,%ecx
mov    $0x3c,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xa,%edi
call   1050 <smallest_multiple_efficient@plt>
mov    %eax,%ecx
mov    $0x9d8,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x14,%edi
call   1050 <smallest_multiple_efficient@plt>
mov    %eax,%ecx
mov    $0xde021f0,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1e,%edi
call   1050 <smallest_multiple_efficient@plt>
movslq %eax,%rcx
movabs $0x21e488e58b0,%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <smallest_multiple@plt>
xor    %edi,%edi
cmp    $0x3c,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xa,%edi
call   1040 <smallest_multiple@plt>
xor    %edi,%edi
cmp    $0x9d8,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x14,%edi
call   1040 <smallest_multiple@plt>
xor    %edi,%edi
cmp    $0xde021f0,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x1e,%edi
call   1040 <smallest_multiple@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x5,%edi
call   1050 <smallest_multiple_efficient@plt>
xor    %edi,%edi
cmp    $0x3c,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xa,%edi
call   1050 <smallest_multiple_efficient@plt>
xor    %edi,%edi
cmp    $0x9d8,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x14,%edi
call   1050 <smallest_multiple_efficient@plt>
xor    %edi,%edi
cmp    $0xde021f0,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x1e,%edi
call   1050 <smallest_multiple_efficient@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @smallest_multiple(i32 5)
%3 = icmp eq i32 60, %2
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call i32 @smallest_multiple(i32 10)
%7 = icmp eq i32 2520, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 @smallest_multiple(i32 20)
%11 = icmp eq i32 232792560, %10
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @smallest_multiple(i32 30)
%15 = sext i32 %14 to i64
%16 = icmp eq i64 2329089562800, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i32 @smallest_multiple_efficient(i32 5)
%20 = icmp eq i32 60, %19
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i32 @smallest_multiple_efficient(i32 10)
%24 = icmp eq i32 2520, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = call i32 @smallest_multiple_efficient(i32 20)
%28 = icmp eq i32 232792560, %27
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = call i32 @smallest_multiple_efficient(i32 30)
%32 = sext i32 %31 to i64
%33 = icmp eq i64 2329089562800, %32
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @smallest_multiple(i32 5)
%2 = icmp eq i32 %1, 60
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @smallest_multiple(i32 10)
%6 = icmp eq i32 %5, 2520
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @smallest_multiple(i32 20)
%10 = icmp eq i32 %9, 232792560
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @smallest_multiple(i32 30)
%14 = tail call i32 @assert(i32 0)
%15 = tail call i32 @smallest_multiple_efficient(i32 5)
%16 = icmp eq i32 %15, 60
%17 = zext i1 %16 to i32
%18 = tail call i32 @assert(i32 %17)
%19 = tail call i32 @smallest_multiple_efficient(i32 10)
%20 = icmp eq i32 %19, 2520
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = tail call i32 @smallest_multiple_efficient(i32 20)
%24 = icmp eq i32 %23, 232792560
%25 = zext i1 %24 to i32
%26 = tail call i32 @assert(i32 %25)
%27 = tail call i32 @smallest_multiple_efficient(i32 30)
%28 = tail call i32 @assert(i32 0)
ret i32 0
}