#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 uint64_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ hex_out(int /*<<< orphan*/, int *, int);
int /*<<< orphan*/ mp_mod_256v1(int *, int *);
int /*<<< orphan*/ mp_mul_256(int *, int *, int *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  uint64_t a[4], b[4], c[8], r[4];
  a[3] = 0x6b17d1f2e12c4247;
  a[2] = 0xf8bce6e563a440f2;
  a[1] = 0x77037d812deb33a0;
  a[0] = 0xf4a13945d898c296;
  b[3] = 0x4fe342e2fe1a7f9b;
  b[2] = 0x8ee7eb4a7c0f9e16;
  b[1] = 0x2bce33576b315ece;
  b[0] = 0xcbb6406837bf51f5;
  mp_mul_256(c, a, b);
  mp_mod_256v1(r, c);
  hex_out(stdout, c, 8);
  hex_out(stdout, r, 4);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xe12c4247,-0x14(%rbp)
movl   $0x63a440f2,-0x18(%rbp)
movl   $0x2deb33a0,-0x1c(%rbp)
movl   $0xd898c296,-0x20(%rbp)
movl   $0xfe1a7f9b,-0x24(%rbp)
movl   $0x7c0f9e16,-0x28(%rbp)
movl   $0x6b315ece,-0x2c(%rbp)
movl   $0x37bf51f5,-0x30(%rbp)
lea    -0x50(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1050 <mp_mul_256@plt>
lea    -0x60(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <mp_mod_256v1@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
mov    $0x8,%edx
call   1040 <hex_out@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%edi
lea    -0x60(%rbp),%rsi
mov    $0x4,%edx
call   1040 <hex_out@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
movaps 0xeb0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rbx
lea    0x10(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1050 <mp_mul_256@plt>
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <mp_mod_256v1@plt>
mov    0x2e54(%rip),%r15
mov    (%r15),%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <hex_out@plt>
mov    (%r15),%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <hex_out@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = 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 [4 x i32]
%7 = alloca [4 x i32]
%8 = alloca [8 x i32]
%9 = alloca [4 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 3
store i32 -517193145, i32* %10
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 2
store i32 1671708914, i32* %11
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 1
store i32 770388896, i32* %12
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
store i32 -661077354, i32* %13
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 3
store i32 -31817829, i32* %14
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 2
store i32 2081398294, i32* %15
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 1
store i32 1798397646, i32* %16
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
store i32 935285237, i32* %17
%18 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i64 0, i64 0
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%21 = call i32 @mp_mul_256(i32* %18, i32* %19, i32* %20)
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 0
%23 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i64 0, i64 0
%24 = call i32 @mp_mod_256v1(i32* %22, i32* %23)
%25 = load i32, i32* @stdout
%26 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i64 0, i64 0
%27 = call i32 @hex_out(i32 %25, i32* %26, i32 8)
%28 = load i32, i32* @stdout
%29 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 0
%30 = call i32 @hex_out(i32 %28, i32* %29, i32 4)
%31 = load i32, i32* @EXIT_SUCCESS
%32 = call i32 @exit(i32 %31)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca <4 x i32>
%4 = alloca <4 x i32>
%5 = alloca [8 x i32]
%6 = alloca [4 x i32]
%7 = bitcast <4 x i32>* %3 to i8*
%8 = bitcast <4 x i32>* %4 to i8*
%9 = bitcast [8 x i32]* %5 to i8*
%10 = bitcast [4 x i32]* %6 to i8*
%11 = getelementptr inbounds <4 x i32>, <4 x i32>* %3, i64 0, i64 0
store <4 x i32> <i32 -661077354, i32 770388896, i32 1671708914, i32 -517193145>, <4 x i32>* %3
%12 = getelementptr inbounds <4 x i32>, <4 x i32>* %4, i64 0, i64 0
store <4 x i32> <i32 935285237, i32 1798397646, i32 2081398294, i32 -31817829>, <4 x i32>* %4
%13 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%14 = call i32 @mp_mul_256(i32* %13, i32* %11, i32* %12)
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%16 = call i32 @mp_mod_256v1(i32* %15, i32* %13)
%17 = load i32, i32* @stdout
%18 = call i32 @hex_out(i32 %17, i32* %13, i32 8)
%19 = load i32, i32* @stdout
%20 = call i32 @hex_out(i32 %19, i32* %15, i32 4)
%21 = load i32, i32* @EXIT_SUCCESS
%22 = call i32 @exit(i32 %21)
unreachable
}