#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int main(int argc, char *argv[]) {
  int fizzbuzz;
  if (argc < 2) {
    printf("Missing argument(s). Usage: %s <op1>\n", argv[0]);
    return EXIT_FAILURE;
  }
  sscanf(argv[1], "%d", &fizzbuzz);
  if (fizzbuzz % 3 == 0)
    printf("Fizz");
  if (fizzbuzz % 5 == 0)
    printf("Buzz");
  if ((fizzbuzz % 3 != 0) && (fizzbuzz % 5 != 0))
    printf("%d", fizzbuzz);
  printf("\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1166 <main+0x46>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1215 <main+0xf5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb1(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x14(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a0 <main+0x80>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c2 <main+0xa2>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11fb <main+0xdb>
mov    -0x14(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11fb <main+0xdb>
mov    -0x14(%rbp),%esi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1153 <main+0x23>
mov    (%rsi),%rsi
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e92(%rip),%rax
jmp    1213 <main+0xe3>
mov    0x8(%rsi),%rdi
lea    0xec8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1050 <sscanf@plt>
mov    0x4(%rsp),%esi
imul   $0xaaaaaaab,%esi,%eax
add    $0x2aaaaaaa,%eax
cmp    $0x55555554,%eax
ja     1190 <main+0x60>
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
movslq %esi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
jne    11dc <main+0xac>
lea    0xe79(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%ecx
mov    %esi,%eax
sub    %ecx,%eax
imul   $0xaaaaaaab,%esi,%ecx
add    $0x2aaaaaaa,%ecx
cmp    $0x55555555,%ecx
jb     1202 <main+0xd2>
test   %eax,%eax
je     1202 <main+0xd2>
lea    0xe2b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2dc5(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Missing argument(s). Usage: %s <op1>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"Fizz\00"
@.str.3 = [5 x i8] c"Buzz\00"
@.str.4 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
store i32 %14, i32* %3
br label %45
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @sscanf(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%20 = load i32, i32* %6
%21 = srem i32 %20, 3
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %15
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %15
%26 = load i32, i32* %6
%27 = srem i32 %26, 5
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %31
31: ; preds = %29, %25
%32 = load i32, i32* %6
%33 = srem i32 %32, 3
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %42
35: ; preds = %31
%36 = load i32, i32* %6
%37 = srem i32 %36, 5
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = load i32, i32* %6
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %39, %35, %31
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%44 = load i32, i32* @EXIT_SUCCESS
store i32 %44, i32* %3
br label %45
45: ; preds = %42, %9
%46 = load i32, i32* %3
ret i32 %46
}

LLVM IR (-O2):
@.str = [38 x i8] c"Missing argument(s). Usage: %s <op1>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"Fizz\00"
@.str.3 = [5 x i8] c"Buzz\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %38
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @sscanf(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %3
%14 = srem i32 %13, 3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %9
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%18 = load i32, i32* %3
br label %19
19: ; preds = %16, %9
%20 = phi i32 [ %18, %16 ], [ %13, %9 ]
%21 = srem i32 %20, 5
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%25 = load i32, i32* %3
%26 = srem i32 %25, 5
br label %27
27: ; preds = %23, %19
%28 = phi i32 [ %26, %23 ], [ %21, %19 ]
%29 = phi i32 [ %25, %23 ], [ %20, %19 ]
%30 = srem i32 %29, 3
%31 = icmp eq i32 %30, 0
%32 = icmp eq i32 %28, 0
%33 = or i1 %31, %32
br i1 %33, label %36, label %34
34: ; preds = %27
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %29)
br label %36
36: ; preds = %34, %27
%37 = call i32 @putchar(i32 10)
br label %38
38: ; preds = %36, %6
%39 = phi i32* [ @EXIT_FAILURE, %6 ], [ @EXIT_SUCCESS, %36 ]
%40 = load i32, i32* %39
ret i32 %40
}