#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*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ add_numbers(int, int);
int atoi(char *);
int /*<<< orphan*/ divide_numbers(int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ multiply_numbers(int, int);
int /*<<< orphan*/ print_usage(char *);
int /*<<< orphan*/ subtract_numbers(int, int);
int main(int argc, char **argv) {
  ((void)0);
  if (argc < 3) {
    ((void)0);
    print_usage(argv[0]);
    exit(EXIT_FAILURE);
  } else if (argc > 3) {
    ((void)0);
  }
  ((void)0);
  int a = atoi(argv[1]);
  ((void)0);
  int b = atoi(argv[2]);
  ((void)0);
  add_numbers(a, b);
  subtract_numbers(a, b);
  multiply_numbers(a, b);
  divide_numbers(a, b);
  ((void)0);
  exit(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   $0x3,-0x8(%rbp)
jge    11aa <main+0x3a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1090 <print_usage@plt>
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
cmpl   $0x3,-0x8(%rbp)
jle    11b9 <main+0x49>
jmp    11b9 <main+0x49>
jmp    11be <main+0x4e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <add_numbers@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <subtract_numbers@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <multiply_numbers@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <divide_numbers@plt>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     1191 <main+0x21>
mov    (%rbx),%rdi
call   1090 <print_usage@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    0x8(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <add_numbers@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <subtract_numbers@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <multiply_numbers@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1060 <divide_numbers@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @print_usage(i8* %13)
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %2
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 3
br i1 %19, label %20, label %21
20: ; preds = %17
br label %21
21: ; preds = %20, %17
br label %22
22: ; preds = %21
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @atoi(i8* %25)
store i32 %26, i32* %6
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 2
%29 = load i8*, i8** %28
%30 = call i32 @atoi(i8* %29)
store i32 %30, i32* %7
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = call i32 @add_numbers(i32 %31, i32 %32)
%34 = load i32, i32* %6
%35 = load i32, i32* %7
%36 = call i32 @subtract_numbers(i32 %34, i32 %35)
%37 = load i32, i32* %6
%38 = load i32, i32* %7
%39 = call i32 @multiply_numbers(i32 %37, i32 %38)
%40 = load i32, i32* %6
%41 = load i32, i32* %7
%42 = call i32 @divide_numbers(i32 %40, i32 %41)
%43 = load i32, i32* @EXIT_SUCCESS
%44 = call i32 @exit(i32 %43)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @print_usage(i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
%16 = tail call i32 @add_numbers(i32 %12, i32 %15)
%17 = tail call i32 @subtract_numbers(i32 %12, i32 %15)
%18 = tail call i32 @multiply_numbers(i32 %12, i32 %15)
%19 = tail call i32 @divide_numbers(i32 %12, i32 %15)
%20 = load i32, i32* @EXIT_SUCCESS
%21 = tail call i32 @exit(i32 %20)
unreachable
}