#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 */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ gmp_printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init_set_str(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  mpz_t a, b, p;
  if (argc != 3) {
    printf("Usage: %s <number> <number>\n", argv[0]);
    return 1;
  }
  mpz_init_set_str(a, argv[1], 10);
  mpz_init_set_str(b, argv[2], 10);
  mpz_init(p);
  mpz_mul(p, a, b);
  gmp_printf("Product is: %Zd\n", p);
  return 0;
}


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)
je     118f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11e5 <main+0x95>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    $0xa,%edx
call   1040 <mpz_init_set_str@plt>
mov    -0x18(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    $0xa,%edx
call   1040 <mpz_init_set_str@plt>
mov    -0x1c(%rbp),%edi
call   1050 <mpz_init@plt>
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1060 <mpz_mul@plt>
mov    -0x1c(%rbp),%esi
lea    0xe44(%rip),%rdi
call   1070 <gmp_printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    118f <main+0x3f>
mov    0x8(%rbx),%rsi
mov    $0xa,%edx
call   1040 <mpz_init_set_str@plt>
mov    0x10(%rbx),%rsi
mov    $0xa,%edx
call   1040 <mpz_init_set_str@plt>
call   1050 <mpz_init@plt>
call   1060 <mpz_mul@plt>
lea    0xe97(%rip),%rdi
call   1070 <gmp_printf@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    (%rbx),%rsi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Usage: %s <number> <number>\0A\00"
@.str.1 = [17 x i8] c"Product is: %Zd\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 i32, i32* %4
%10 = icmp ne i32 %9, 3
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %14)
store i32 1, i32* %3
br label %35
16: ; preds = %2
%17 = load i32, i32* %6
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i32 @mpz_init_set_str(i32 %17, i8* %20, i32 10)
%22 = load i32, i32* %7
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = call i32 @mpz_init_set_str(i32 %22, i8* %25, i32 10)
%27 = load i32, i32* %8
%28 = call i32 @mpz_init(i32 %27)
%29 = load i32, i32* %8
%30 = load i32, i32* %6
%31 = load i32, i32* %7
%32 = call i32 @mpz_mul(i32 %29, i32 %30, i32 %31)
%33 = load i32, i32* %8
%34 = call i32 @gmp_printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %33)
store i32 0, i32* %3
br label %35
35: ; preds = %16, %11
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
@.str = [29 x i8] c"Usage: %s <number> <number>\0A\00"
@.str.1 = [17 x i8] c"Product is: %Zd\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %17
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @mpz_init_set_str(i32 undef, i8* %9, i32 10)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @mpz_init_set_str(i32 undef, i8* %12, i32 10)
%14 = tail call i32 @mpz_init(i32 undef)
%15 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%16 = tail call i32 @gmp_printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 undef)
br label %17
17: ; preds = %7, %4
%18 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %18
}