#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 */
scalar_t__ C(int, int);
int atoi(char *);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char **argv) {
  int multi = atoi(argv[1]);
  int n = atoi(argv[2]);
  int dim = (int)(C(n, (n - multi + 1) / 2) - C(n, (n - multi - 1) / 2));
  printf("multi=%d nelec=%d dim=%d\n", multi, n, dim);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1040 <C@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1040 <C@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%r14d
mov    0x10(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,%r15d
mov    %eax,%ebp
sub    %r14d,%ebp
lea    0x1(%rbp),%eax
shr    $0x1f,%eax
lea    (%rax,%rbp,1),%esi
add    $0x1,%esi
sar    %esi
mov    %r15d,%edi
call   1040 <C@plt>
mov    %rax,%rbx
mov    %ebp,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
lea    (%rax,%rbp,1),%esi
add    $0xffffffff,%esi
sar    %esi
mov    %r15d,%edi
call   1040 <C@plt>
sub    %eax,%ebx
lea    0xe6f(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"multi=%d nelec=%d dim=%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = load i32, i32* %7
%19 = load i32, i32* %6
%20 = sub nsw i32 %18, %19
%21 = add nsw i32 %20, 1
%22 = sdiv i32 %21, 2
%23 = call i64 @C(i32 %17, i32 %22)
%24 = load i32, i32* %7
%25 = load i32, i32* %7
%26 = load i32, i32* %6
%27 = sub nsw i32 %25, %26
%28 = sub nsw i32 %27, 1
%29 = sdiv i32 %28, 2
%30 = call i64 @C(i32 %24, i32 %29)
%31 = sub nsw i64 %23, %30
%32 = trunc i64 %31 to i32
store i32 %32, i32* %8
%33 = load i32, i32* %6
%34 = load i32, i32* %7
%35 = load i32, i32* %8
%36 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %33, i32 %34, i32 %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"multi=%d nelec=%d dim=%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = sub nsw i32 %8, %5
%10 = add nsw i32 %9, 1
%11 = sdiv i32 %10, 2
%12 = tail call i64 @C(i32 %8, i32 %11)
%13 = add nsw i32 %9, -1
%14 = sdiv i32 %13, 2
%15 = tail call i64 @C(i32 %8, i32 %14)
%16 = sub nsw i64 %12, %15
%17 = trunc i64 %16 to i32
%18 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %17)
ret i32 0
}