#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*/ exxit();
int /*<<< orphan*/ foo(char *, int, int);
scalar_t__ mpn_cmp(long *, long *, long);
int mpn_mul_1(long *, long *, long);
int /*<<< orphan*/ mpn_print(long *, long);
int /*<<< orphan*/ mpn_random2(long *, long);
main() {
  long dx[2055 + 1];
  long dy[2055 + 1];
  long s1[2055];
  int cyx, cyy;
  int i;
  long size;
  for (;;) {
    size = 2055;
    mpn_random2(s1, size);
    for (i = 0; i < 1; i++)
      ;
    dy[size] = 0x12345678;
    for (i = 0; i < 1; i++)
      cyy = mpn_mul_1(dy, s1, size);
    if (cyx != cyy || mpn_cmp(dx, dy, size + 1) != 0 ||
        dx[size] != 0x12345678) {
      foo("", 8, cyy);
      mpn_print(dy, size);
    }
    exxit();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0f0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x807,-0xc0e8(%rbp)
lea    -0xc0d0(%rbp),%rdi
mov    -0xc0e8(%rbp),%rsi
call   1080 <mpn_random2@plt>
movl   $0x0,-0xc0dc(%rbp)
cmpl   $0x1,-0xc0dc(%rbp)
jge    11c0 <main+0x60>
jmp    11ac <main+0x4c>
mov    -0xc0dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0dc(%rbp)
jmp    119a <main+0x3a>
mov    -0xc0e8(%rbp),%rax
movq   $0x12345678,-0x8090(%rbp,%rax,8)
ff 78 56 34 12
movl   $0x0,-0xc0dc(%rbp)
cmpl   $0x1,-0xc0dc(%rbp)
jge    121e <main+0xbe>
lea    -0x8090(%rbp),%rdi
lea    -0xc0d0(%rbp),%rsi
mov    -0xc0e8(%rbp),%rdx
call   1030 <mpn_mul_1@plt>
mov    %eax,-0xc0d8(%rbp)
mov    -0xc0dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0dc(%rbp)
jmp    11dd <main+0x7d>
mov    -0xc0d4(%rbp),%eax
cmp    -0xc0d8(%rbp),%eax
jne    1271 <main+0x111>
lea    -0x4050(%rbp),%rdi
lea    -0x8090(%rbp),%rsi
mov    -0xc0e8(%rbp),%rdx
add    $0x1,%rdx
call   1060 <mpn_cmp@plt>
cmp    $0x0,%rax
jne    1271 <main+0x111>
mov    -0xc0e8(%rbp),%rax
cmpq   $0x12345678,-0x4050(%rbp,%rax,8)
ff 78 56 34 12
je     129b <main+0x13b>
mov    -0xc0d8(%rbp),%edx
lea    0xd82(%rip),%rdi
mov    $0x8,%esi
call   1070 <foo@plt>
lea    -0x8090(%rbp),%rdi
mov    -0xc0e8(%rbp),%rsi
call   1040 <mpn_print@plt>
mov    $0x0,%al
call   1050 <exxit@plt>
jmp    1172 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xc0c0,%rsp
lea    0x8080(%rsp),%r14
mov    %rsp,%rbx
lea    0x4040(%rsp),%r15
lea    0xe77(%rip),%r12
jmp    11b3 <main+0x53>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    $0x8,%esi
mov    %ebp,%edx
call   1070 <foo@plt>
mov    $0x807,%esi
mov    %rbx,%rdi
call   1040 <mpn_print@plt>
xor    %eax,%eax
call   1050 <exxit@plt>
mov    $0x807,%esi
mov    %r14,%rdi
call   1080 <mpn_random2@plt>
movq   $0x12345678,0x4038(%rsp)
mov    $0x807,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <mpn_mul_1@plt>
mov    %eax,%ebp
mov    $0x808,%edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <mpn_cmp@plt>
test   %rax,%rax
jne    1190 <main+0x30>
cmpq   $0x12345678,0x8078(%rsp)
je     11ac <main+0x4c>
jmp    1190 <main+0x30>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca [2056 x i64]
%3 = alloca [2056 x i64]
%4 = alloca [2055 x i64]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 0, i32* %1
br label %9
9: ; preds = %56, %0
store i64 2055, i64* %8
%10 = getelementptr inbounds [2055 x i64], [2055 x i64]* %4, i64 0, i64 0
%11 = load i64, i64* %8
%12 = call i32 @mpn_random2(i64* %10, i64 %11)
store i32 0, i32* %7
br label %13
13: ; preds = %17, %9
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 1
br i1 %15, label %16, label %20
16: ; preds = %13
br label %17
17: ; preds = %16
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
br label %13
20: ; preds = %13
%21 = load i64, i64* %8
%22 = getelementptr inbounds [2056 x i64], [2056 x i64]* %3, i64 0, i64 %21
store i64 305419896, i64* %22
store i32 0, i32* %7
br label %23
23: ; preds = %31, %20
%24 = load i32, i32* %7
%25 = icmp slt i32 %24, 1
br i1 %25, label %26, label %34
26: ; preds = %23
%27 = getelementptr inbounds [2056 x i64], [2056 x i64]* %3, i64 0, i64 0
%28 = getelementptr inbounds [2055 x i64], [2055 x i64]* %4, i64 0, i64 0
%29 = load i64, i64* %8
%30 = call i32 @mpn_mul_1(i64* %27, i64* %28, i64 %29)
store i32 %30, i32* %6
br label %31
31: ; preds = %26
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
store i32 %33, i32* %7
br label %23
34: ; preds = %23
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = icmp ne i32 %35, %36
br i1 %37, label %50, label %38
38: ; preds = %34
%39 = getelementptr inbounds [2056 x i64], [2056 x i64]* %2, i64 0, i64 0
%40 = getelementptr inbounds [2056 x i64], [2056 x i64]* %3, i64 0, i64 0
%41 = load i64, i64* %8
%42 = add nsw i64 %41, 1
%43 = call i64 @mpn_cmp(i64* %39, i64* %40, i64 %42)
%44 = icmp ne i64 %43, 0
br i1 %44, label %50, label %45
45: ; preds = %38
%46 = load i64, i64* %8
%47 = getelementptr inbounds [2056 x i64], [2056 x i64]* %2, i64 0, i64 %46
%48 = load i64, i64* %47
%49 = icmp ne i64 %48, 305419896
br i1 %49, label %50, label %56
50: ; preds = %45, %38, %34
%51 = load i32, i32* %6
%52 = call i32 @foo(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 8, i32 %51)
%53 = getelementptr inbounds [2056 x i64], [2056 x i64]* %3, i64 0, i64 0
%54 = load i64, i64* %8
%55 = call i32 @mpn_print(i64* %53, i64 %54)
br label %56
56: ; preds = %50, %45
%57 = call i32 (...) @exxit()
br label %9
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca [2056 x i64]
%2 = alloca [2056 x i64]
%3 = alloca [2055 x i64]
%4 = bitcast [2056 x i64]* %1 to i8*
%5 = bitcast [2056 x i64]* %2 to i8*
%6 = bitcast [2055 x i64]* %3 to i8*
%7 = getelementptr inbounds [2055 x i64], [2055 x i64]* %3, i64 0, i64 0
%8 = getelementptr inbounds [2056 x i64], [2056 x i64]* %2, i64 0, i64 2055
%9 = getelementptr inbounds [2056 x i64], [2056 x i64]* %2, i64 0, i64 0
%10 = getelementptr inbounds [2056 x i64], [2056 x i64]* %1, i64 0, i64 0
%11 = getelementptr inbounds [2056 x i64], [2056 x i64]* %1, i64 0, i64 2055
br label %12
12: ; preds = %23, %0
%13 = call i32 @mpn_random2(i64* %7, i64 2055)
store i64 305419896, i64* %8
%14 = call i32 @mpn_mul_1(i64* %9, i64* %7, i64 2055)
%15 = call i64 @mpn_cmp(i64* %10, i64* %9, i64 2056)
%16 = icmp eq i64 %15, 0
%17 = load i64, i64* %11
%18 = icmp eq i64 %17, 305419896
%19 = select i1 %16, i1 %18, i1 false
br i1 %19, label %23, label %20
20: ; preds = %12
%21 = call i32 @foo(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 8, i32 %14)
%22 = call i32 @mpn_print(i64* %9, i64 2055)
br label %23
23: ; preds = %12, %20
%24 = call i32 (...) @exxit()
br label %12
}