#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*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init2(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_init_set_str(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ mpz_mod(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_out_str(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  mpz_t a, b, c, p, r;
  mpz_init2(a, 256);
  mpz_init2(b, 256);
  mpz_init2(c, 512);
  mpz_init2(p, 256);
  mpz_init2(r, 256);
  mpz_init_set_str(
      a, "6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",
      16);
  mpz_init_set_str(
      b, "4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5",
      16);
  mpz_init_set_str(
      p, "ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
      16);
  mpz_mul(c, a, b);
  mpz_mod(r, c, p);
  mpz_out_str(stdout, 16, c);
  fprintf(stdout, "\r\n");
  mpz_out_str(stdout, 16, r);
  fprintf(stdout, "\r\n");
  mpz_clear(a);
  mpz_clear(b);
  mpz_clear(c);
  mpz_clear(p);
  exit(EXIT_SUCCESS);
}


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    -0x14(%rbp),%edi
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
mov    -0x18(%rbp),%edi
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
mov    -0x1c(%rbp),%edi
mov    $0x200,%esi
call   1090 <mpz_init2@plt>
mov    -0x20(%rbp),%edi
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
mov    -0x24(%rbp),%edi
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
mov    -0x14(%rbp),%edi
lea    0xe1f(%rip),%rsi
mov    $0x10,%edx
call   1030 <mpz_init_set_str@plt>
mov    -0x18(%rbp),%edi
lea    0xe4c(%rip),%rsi
mov    $0x10,%edx
call   1030 <mpz_init_set_str@plt>
mov    -0x20(%rbp),%edi
lea    0xe79(%rip),%rsi
mov    $0x10,%edx
call   1030 <mpz_init_set_str@plt>
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1050 <mpz_mul@plt>
mov    -0x24(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1070 <mpz_mod@plt>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
mov    $0x10,%esi
call   1060 <mpz_out_str@plt>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
lea    0xe6e(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2d7f(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
mov    $0x10,%esi
call   1060 <mpz_out_str@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
lea    0xe43(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1080 <mpz_clear@plt>
mov    -0x18(%rbp),%edi
call   1080 <mpz_clear@plt>
mov    -0x1c(%rbp),%edi
call   1080 <mpz_clear@plt>
mov    -0x20(%rbp),%edi
call   1080 <mpz_clear@plt>
mov    0x2d2c(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
mov    $0x200,%esi
call   1090 <mpz_init2@plt>
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
mov    $0x100,%esi
call   1090 <mpz_init2@plt>
lea    0xe43(%rip),%rsi
mov    $0x10,%edx
call   1030 <mpz_init_set_str@plt>
lea    0xe73(%rip),%rsi
mov    $0x10,%edx
call   1030 <mpz_init_set_str@plt>
lea    0xea3(%rip),%rsi
mov    $0x10,%edx
call   1030 <mpz_init_set_str@plt>
call   1050 <mpz_mul@plt>
call   1070 <mpz_mod@plt>
mov    0x2de6(%rip),%rbx
mov    (%rbx),%edi
mov    $0x10,%esi
call   1060 <mpz_out_str@plt>
mov    (%rbx),%edi
lea    0xeb4(%rip),%r14
mov    %r14,%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
mov    $0x10,%esi
call   1060 <mpz_out_str@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
call   1040 <fprintf@plt>
call   1080 <mpz_clear@plt>
call   1080 <mpz_clear@plt>
call   1080 <mpz_clear@plt>
call   1080 <mpz_clear@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\00"
@.str.1 = [65 x i8] c"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\00"
@.str.2 = [65 x i8] c"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff\00"
@stdout = global i32 0
@.str.3 = [3 x i8] c"\0D\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
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %6
%12 = call i32 @mpz_init2(i32 %11, i32 256)
%13 = load i32, i32* %7
%14 = call i32 @mpz_init2(i32 %13, i32 256)
%15 = load i32, i32* %8
%16 = call i32 @mpz_init2(i32 %15, i32 512)
%17 = load i32, i32* %9
%18 = call i32 @mpz_init2(i32 %17, i32 256)
%19 = load i32, i32* %10
%20 = call i32 @mpz_init2(i32 %19, i32 256)
%21 = load i32, i32* %6
%22 = call i32 @mpz_init_set_str(i32 %21, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 16)
%23 = load i32, i32* %7
%24 = call i32 @mpz_init_set_str(i32 %23, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0), i32 16)
%25 = load i32, i32* %9
%26 = call i32 @mpz_init_set_str(i32 %25, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i32 16)
%27 = load i32, i32* %8
%28 = load i32, i32* %6
%29 = load i32, i32* %7
%30 = call i32 @mpz_mul(i32 %27, i32 %28, i32 %29)
%31 = load i32, i32* %10
%32 = load i32, i32* %8
%33 = load i32, i32* %9
%34 = call i32 @mpz_mod(i32 %31, i32 %32, i32 %33)
%35 = load i32, i32* @stdout
%36 = load i32, i32* %8
%37 = call i32 @mpz_out_str(i32 %35, i32 16, i32 %36)
%38 = load i32, i32* @stdout
%39 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%40 = load i32, i32* @stdout
%41 = load i32, i32* %10
%42 = call i32 @mpz_out_str(i32 %40, i32 16, i32 %41)
%43 = load i32, i32* @stdout
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%45 = load i32, i32* %6
%46 = call i32 @mpz_clear(i32 %45)
%47 = load i32, i32* %7
%48 = call i32 @mpz_clear(i32 %47)
%49 = load i32, i32* %8
%50 = call i32 @mpz_clear(i32 %49)
%51 = load i32, i32* %9
%52 = call i32 @mpz_clear(i32 %51)
%53 = load i32, i32* @EXIT_SUCCESS
%54 = call i32 @exit(i32 %53)
unreachable
}

LLVM IR (-O2):
@.str = [65 x i8] c"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\00"
@.str.1 = [65 x i8] c"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\00"
@.str.2 = [65 x i8] c"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff\00"
@stdout = global i32 0
@.str.3 = [3 x i8] c"\0D\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mpz_init2(i32 undef, i32 256)
%4 = tail call i32 @mpz_init2(i32 undef, i32 256)
%5 = tail call i32 @mpz_init2(i32 undef, i32 512)
%6 = tail call i32 @mpz_init2(i32 undef, i32 256)
%7 = tail call i32 @mpz_init2(i32 undef, i32 256)
%8 = tail call i32 @mpz_init_set_str(i32 undef, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 16)
%9 = tail call i32 @mpz_init_set_str(i32 undef, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0), i32 16)
%10 = tail call i32 @mpz_init_set_str(i32 undef, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i32 16)
%11 = tail call i32 @mpz_mul(i32 undef, i32 undef, i32 undef)
%12 = tail call i32 @mpz_mod(i32 undef, i32 undef, i32 undef)
%13 = load i32, i32* @stdout
%14 = tail call i32 @mpz_out_str(i32 %13, i32 16, i32 undef)
%15 = load i32, i32* @stdout
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = tail call i32 @mpz_out_str(i32 %17, i32 16, i32 undef)
%19 = load i32, i32* @stdout
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%21 = tail call i32 @mpz_clear(i32 undef)
%22 = tail call i32 @mpz_clear(i32 undef)
%23 = tail call i32 @mpz_clear(i32 undef)
%24 = tail call i32 @mpz_clear(i32 undef)
%25 = load i32, i32* @EXIT_SUCCESS
%26 = tail call i32 @exit(i32 %25)
unreachable
}