#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*/ dsaq_2048;
typedef int /*<<< orphan*/ dsap_2048;
typedef int /*<<< orphan*/ dsag_2048;
typedef int /*<<< orphan*/ DSA;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *BN_bin2bn(unsigned char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ DSA_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *DSA_new();
int /*<<< orphan*/ DSA_set0_pqg(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ *, int /*<<< orphan*/ *);
DSA *load_dsa_params(void) {
  static unsigned char dsap_2048[] = {
      0xAE, 0x35, 0x7D, 0x4E, 0x1D, 0x96, 0xE2, 0x9F, 0x00, 0x96, 0x60, 0x5A,
      0x6E, 0x4D, 0x07, 0x8D, 0xA5, 0x7C, 0xBC, 0xF9, 0xAD, 0xD7, 0x9F, 0xD5,
      0xE9, 0xEE, 0xA6, 0x33, 0x51, 0xDE, 0x7B, 0x72, 0xD2, 0x75, 0xAA, 0x71,
      0x77, 0xF1, 0x63, 0xFB, 0xB6, 0xEC, 0x5A, 0xBA, 0x0D, 0x72, 0xA2, 0x1A,
      0x1C, 0x64, 0xB8, 0xE5, 0x89, 0x09, 0x6D, 0xC9, 0x6F, 0x0B, 0x7F, 0xD2,
      0xCE, 0x9F, 0xEF, 0x87, 0x5A, 0xB6, 0x67, 0x2F, 0xEF, 0xEE, 0xEB, 0x59,
      0xF5, 0x5E, 0xFF, 0xA8, 0x28, 0x84, 0x9E, 0x5B, 0x37, 0x09, 0x11, 0x80,
      0x7C, 0x08, 0x5C, 0xD5, 0xE1, 0x48, 0x4B, 0xD2, 0x68, 0xFB, 0x3F, 0x9F,
      0x2B, 0x6B, 0x6C, 0x0D, 0x48, 0x1B, 0x1A, 0x80, 0xC2, 0xEB, 0x11, 0x1B,
      0x37, 0x79, 0xD6, 0x8C, 0x8B, 0x72, 0x3E, 0x67, 0xA5, 0x05, 0x0E, 0x41,
      0x8A, 0x9E, 0x35, 0x50, 0xB4, 0xD2, 0x40, 0x27, 0x6B, 0xFD, 0xE0, 0x64,
      0x6B, 0x5B, 0x38, 0x42, 0x94, 0xB5, 0x49, 0xDA, 0xEF, 0x6E, 0x78, 0x37,
      0xCD, 0x30, 0x89, 0xC3, 0x45, 0x50, 0x7B, 0x9C, 0x8C, 0xE7, 0x1C, 0x98,
      0x70, 0x71, 0x5D, 0x79, 0x5F, 0xEF, 0xE8, 0x94, 0x85, 0x53, 0x3E, 0xEF,
      0xA3, 0x2C, 0xCE, 0x1A, 0xAB, 0x7D, 0xD6, 0x5E, 0x14, 0xCD, 0x51, 0x54,
      0x89, 0x9D, 0x77, 0xE4, 0xF8, 0x22, 0xF0, 0x35, 0x10, 0x75, 0x05, 0x71,
      0x51, 0x4F, 0x8C, 0x4C, 0x5C, 0x0D, 0x2C, 0x2C, 0xBE, 0x6C, 0x34, 0xEE,
      0x12, 0x82, 0x87, 0x03, 0x19, 0x06, 0x12, 0xA8, 0xAA, 0xF4, 0x0D, 0x3C,
      0x49, 0xCC, 0x70, 0x5A, 0xD8, 0x32, 0xEE, 0x32, 0x50, 0x85, 0x70, 0xE8,
      0x18, 0xFD, 0x74, 0x80, 0x53, 0x32, 0x57, 0xEE, 0x50, 0xC9, 0xAE, 0xEB,
      0xAE, 0xB6, 0x22, 0x32, 0x16, 0x6B, 0x8C, 0x59, 0xDA, 0xEE, 0x1D, 0x33,
      0xDF, 0x4C, 0xA2, 0x3D};
  static unsigned char dsaq_2048[] = {
      0xAD, 0x2D, 0x6E, 0x17, 0xB0, 0xF3, 0xEB, 0xC7, 0xB8, 0xEE, 0x95,
      0x78, 0xF2, 0x17, 0xF5, 0x33, 0x01, 0x67, 0xBC, 0xDE, 0x93, 0xFF,
      0xEE, 0x40, 0xE8, 0x7F, 0xF1, 0x93, 0x6D, 0x4B, 0x87, 0x13};
  static unsigned char dsag_2048[] = {
      0x66, 0x6F, 0xDA, 0x63, 0xA5, 0x8E, 0xD2, 0x4C, 0xD5, 0x45, 0x2D, 0x76,
      0x5D, 0x5F, 0xCD, 0x4A, 0xB4, 0x1A, 0x42, 0x35, 0x86, 0x3A, 0x6F, 0xA9,
      0xFA, 0x27, 0xAB, 0xDE, 0x03, 0x21, 0x36, 0x0A, 0x07, 0x29, 0xC9, 0x2F,
      0x6D, 0x49, 0xA8, 0xF7, 0xC6, 0xF4, 0x92, 0xD7, 0x73, 0xC1, 0xD8, 0x76,
      0x0E, 0x61, 0xA7, 0x0B, 0x6E, 0x96, 0xB8, 0xC8, 0xCB, 0x38, 0x35, 0x12,
      0x20, 0x79, 0xA5, 0x08, 0x28, 0x35, 0x5C, 0xBC, 0x52, 0x16, 0xAF, 0x52,
      0xBA, 0x0F, 0xC3, 0xB1, 0x63, 0x12, 0x27, 0x0B, 0x74, 0xA4, 0x47, 0x43,
      0xD6, 0x30, 0xB8, 0x9C, 0x2E, 0x40, 0x14, 0xCD, 0x99, 0x7F, 0xE8, 0x8E,
      0x37, 0xB0, 0xA9, 0x3F, 0x54, 0xE9, 0x66, 0x22, 0x61, 0x4C, 0xF8, 0x49,
      0x03, 0x57, 0x14, 0x32, 0x1D, 0x37, 0x3D, 0xE2, 0x92, 0xF8, 0x8E, 0xA0,
      0x6A, 0x66, 0x63, 0xF0, 0xB0, 0x6E, 0x07, 0x2B, 0x3D, 0xBF, 0xD0, 0x84,
      0x6A, 0xAA, 0x1F, 0x30, 0x77, 0x65, 0xE5, 0xFC, 0xF5, 0xEC, 0x55, 0xCE,
      0x73, 0xDB, 0xBE, 0xA7, 0x8D, 0x3A, 0x9F, 0x7A, 0xED, 0x4F, 0xAF, 0xA2,
      0x80, 0x4C, 0x30, 0x9E, 0x28, 0x49, 0x65, 0x40, 0xF0, 0x03, 0x45, 0x56,
      0x99, 0xA2, 0x93, 0x1B, 0x9C, 0x46, 0xDE, 0xBD, 0xA8, 0xAB, 0x5F, 0x90,
      0x3F, 0xB7, 0x3F, 0xD4, 0x6F, 0x8D, 0x5A, 0x30, 0xE1, 0xD4, 0x63, 0x3A,
      0x6A, 0x7C, 0x8F, 0x24, 0xFC, 0xD9, 0x14, 0x28, 0x09, 0xE4, 0x84, 0x4E,
      0x17, 0x43, 0x56, 0xB8, 0xD4, 0x4B, 0xA2, 0x29, 0x45, 0xD3, 0x13, 0xF0,
      0xC2, 0x76, 0x9B, 0x01, 0xA0, 0x80, 0x6E, 0x93, 0x63, 0x5E, 0x87, 0x24,
      0x20, 0x2A, 0xFF, 0xBB, 0x9F, 0xA8, 0x99, 0x6C, 0xA7, 0x9A, 0x00, 0xB9,
      0x7D, 0xDA, 0x66, 0xC9, 0xC0, 0x72, 0x72, 0x22, 0x0F, 0x1A, 0xCC, 0x23,
      0xD9, 0xB7, 0x5F, 0x1B};
  DSA *dsa = DSA_new();
  BIGNUM *p, *q, *g;
  if (dsa == NULL)
    return NULL;
  if (!DSA_set0_pqg(dsa, p = BN_bin2bn(dsap_2048, sizeof(dsap_2048), NULL),
                    q = BN_bin2bn(dsaq_2048, sizeof(dsaq_2048), NULL),
                    g = BN_bin2bn(dsag_2048, sizeof(dsag_2048), NULL))) {
    DSA_free(dsa);
    BN_free(p);
    BN_free(q);
    BN_free(g);
    return NULL;
  }
  return dsa;
}


x86 assembly (clang, -O0):
<load_dsa_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1030 <DSA_new@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <load_dsa_params+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    122c <load_dsa_params+0xdc>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    0x2ec6(%rip),%rdi
mov    $0x100,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <BN_bin2bn@plt>
mov    %rax,-0x38(%rbp)
mov    %rax,-0x18(%rbp)
lea    0x2fa9(%rip),%rdi
mov    $0x20,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <BN_bin2bn@plt>
mov    %rax,-0x30(%rbp)
mov    %rax,-0x20(%rbp)
lea    0x2fac(%rip),%rdi
mov    $0x100,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <BN_bin2bn@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    %rax,%rcx
mov    %rcx,-0x28(%rbp)
call   1070 <DSA_set0_pqg@plt>
cmp    $0x0,%eax
jne    1224 <load_dsa_params+0xd4>
mov    -0x10(%rbp),%rdi
call   1050 <DSA_free@plt>
mov    -0x18(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x20(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x28(%rbp),%rdi
call   1060 <BN_free@plt>
movq   $0x0,-0x8(%rbp)
jmp    122c <load_dsa_params+0xdc>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_dsa_params>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <DSA_new@plt>
test   %rax,%rax
je     11de <load_dsa_params+0x8e>
mov    %rax,%rbx
lea    0x2ee2(%rip),%rdi
mov    $0x100,%esi
xor    %edx,%edx
call   1040 <BN_bin2bn@plt>
mov    %rax,%r14
lea    0x2fcc(%rip),%rdi
mov    $0x20,%esi
xor    %edx,%edx
call   1040 <BN_bin2bn@plt>
mov    %rax,%r15
lea    0x2fd6(%rip),%rdi
mov    $0x100,%esi
xor    %edx,%edx
call   1040 <BN_bin2bn@plt>
mov    %rax,%r12
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
call   1070 <DSA_set0_pqg@plt>
test   %eax,%eax
jne    11e0 <load_dsa_params+0x90>
mov    %rbx,%rdi
call   1050 <DSA_free@plt>
mov    %r14,%rdi
call   1060 <BN_free@plt>
mov    %r15,%rdi
call   1060 <BN_free@plt>
mov    %r12,%rdi
call   1060 <BN_free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@load_dsa_params.dsap_2048 = internal global [256 x i8] c"\AE5}N\1D\96\E2\9F\00\96`ZnM\07\8D\A5|\BC\F9\AD\D7\9F\D5\E9\EE\A63Q\DE{r\D2u\AAqw\F1c\FB\B6\ECZ\BA\0Dr\A2\1A\1Cd\B8\E5\89\09m\C9o\0B\7F\D2\CE\9F\EF\87Z\B6g/\EF\EE\EBY\F5^\FF\A8(\84\9E[7\09\11\80|\08\\\D5\E1HK\D2h\FB?\9F+kl\0DH\1B\1A\80\C2\EB\11\1B7y\D6\8C\8Br>g\A5\05\0EA\8A\9E5P\B4\D2@'k\FD\E0dk[8B\94\B5I\DA\EFnx7\CD0\89\C3EP{\9C\8C\E7\1C\98pq]y_\EF\E8\94\85S>\EF\A3,\CE\1A\AB}\D6^\14\CDQT\89\9Dw\E4\F8\22\F05\10u\05qQO\8CL\\\0D,,\BEl4\EE\12\82\87\03\19\06\12\A8\AA\F4\0D<I\CCpZ\D82\EE2P\85p\E8\18\FDt\80S2W\EEP\C9\AE\EB\AE\B6\222\16k\8CY\DA\EE\1D3\DFL\A2="
@load_dsa_params.dsaq_2048 = internal global [32 x i8] c"\AD-n\17\B0\F3\EB\C7\B8\EE\95x\F2\17\F53\01g\BC\DE\93\FF\EE@\E8\7F\F1\93mK\87\13"
@load_dsa_params.dsag_2048 = internal global [256 x i8] c"fo\DAc\A5\8E\D2L\D5E-v]_\CDJ\B4\1AB5\86:o\A9\FA'\AB\DE\03!6\0A\07)\C9/mI\A8\F7\C6\F4\92\D7s\C1\D8v\0Ea\A7\0Bn\96\B8\C8\CB85\12 y\A5\08(5\\\BCR\16\AFR\BA\0F\C3\B1c\12'\0Bt\A4GC\D60\B8\9C.@\14\CD\99\7F\E8\8E7\B0\A9?T\E9f\22aL\F8I\03W\142\1D7=\E2\92\F8\8E\A0jfc\F0\B0n\07+=\BF\D0\84j\AA\1F0we\E5\FC\F5\ECU\CEs\DB\BE\A7\8D:\9Fz\EDO\AF\A2\80L0\9E(Ie@\F0\03EV\99\A2\93\1B\9CF\DE\BD\A8\AB_\90?\B7?\D4o\8DZ0\E1\D4c:j|\8F$\FC\D9\14(\09\E4\84N\17CV\B8\D4K\A2)E\D3\13\F0\C2v\9B\01\A0\80n\93c^\87$ *\FF\BB\9F\A8\99l\A7\9A\00\B9}\DAf\C9\C0rr\22\0F\1A\CC#\D9\B7_\1B"
define i32* @load_dsa_params() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = call i32* (...) @DSA_new()
store i32* %6, i32** %2
%7 = load i32*, i32** %2
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %10
9: ; preds = %0
store i32* null, i32** %1
br label %28
10: ; preds = %0
%11 = load i32*, i32** %2
%12 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @load_dsa_params.dsap_2048, i64 0, i64 0), i32 256, i32* null)
store i32* %12, i32** %3
%13 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @load_dsa_params.dsaq_2048, i64 0, i64 0), i32 32, i32* null)
store i32* %13, i32** %4
%14 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @load_dsa_params.dsag_2048, i64 0, i64 0), i32 256, i32* null)
store i32* %14, i32** %5
%15 = call i32 @DSA_set0_pqg(i32* %11, i32* %12, i32* %13, i32* %14)
%16 = icmp ne i32 %15, 0
br i1 %16, label %26, label %17
17: ; preds = %10
%18 = load i32*, i32** %2
%19 = call i32 @DSA_free(i32* %18)
%20 = load i32*, i32** %3
%21 = call i32 @BN_free(i32* %20)
%22 = load i32*, i32** %4
%23 = call i32 @BN_free(i32* %22)
%24 = load i32*, i32** %5
%25 = call i32 @BN_free(i32* %24)
store i32* null, i32** %1
br label %28
26: ; preds = %10
%27 = load i32*, i32** %2
store i32* %27, i32** %1
br label %28
28: ; preds = %26, %17, %9
%29 = load i32*, i32** %1
ret i32* %29
}

LLVM IR (-O2):
@load_dsa_params.dsap_2048 = internal global [256 x i8] c"\AE5}N\1D\96\E2\9F\00\96`ZnM\07\8D\A5|\BC\F9\AD\D7\9F\D5\E9\EE\A63Q\DE{r\D2u\AAqw\F1c\FB\B6\ECZ\BA\0Dr\A2\1A\1Cd\B8\E5\89\09m\C9o\0B\7F\D2\CE\9F\EF\87Z\B6g/\EF\EE\EBY\F5^\FF\A8(\84\9E[7\09\11\80|\08\\\D5\E1HK\D2h\FB?\9F+kl\0DH\1B\1A\80\C2\EB\11\1B7y\D6\8C\8Br>g\A5\05\0EA\8A\9E5P\B4\D2@'k\FD\E0dk[8B\94\B5I\DA\EFnx7\CD0\89\C3EP{\9C\8C\E7\1C\98pq]y_\EF\E8\94\85S>\EF\A3,\CE\1A\AB}\D6^\14\CDQT\89\9Dw\E4\F8\22\F05\10u\05qQO\8CL\\\0D,,\BEl4\EE\12\82\87\03\19\06\12\A8\AA\F4\0D<I\CCpZ\D82\EE2P\85p\E8\18\FDt\80S2W\EEP\C9\AE\EB\AE\B6\222\16k\8CY\DA\EE\1D3\DFL\A2="
@load_dsa_params.dsaq_2048 = internal global [32 x i8] c"\AD-n\17\B0\F3\EB\C7\B8\EE\95x\F2\17\F53\01g\BC\DE\93\FF\EE@\E8\7F\F1\93mK\87\13"
@load_dsa_params.dsag_2048 = internal global [256 x i8] c"fo\DAc\A5\8E\D2L\D5E-v]_\CDJ\B4\1AB5\86:o\A9\FA'\AB\DE\03!6\0A\07)\C9/mI\A8\F7\C6\F4\92\D7s\C1\D8v\0Ea\A7\0Bn\96\B8\C8\CB85\12 y\A5\08(5\\\BCR\16\AFR\BA\0F\C3\B1c\12'\0Bt\A4GC\D60\B8\9C.@\14\CD\99\7F\E8\8E7\B0\A9?T\E9f\22aL\F8I\03W\142\1D7=\E2\92\F8\8E\A0jfc\F0\B0n\07+=\BF\D0\84j\AA\1F0we\E5\FC\F5\ECU\CEs\DB\BE\A7\8D:\9Fz\EDO\AF\A2\80L0\9E(Ie@\F0\03EV\99\A2\93\1B\9CF\DE\BD\A8\AB_\90?\B7?\D4o\8DZ0\E1\D4c:j|\8F$\FC\D9\14(\09\E4\84N\17CV\B8\D4K\A2)E\D3\13\F0\C2v\9B\01\A0\80n\93c^\87$ *\FF\BB\9F\A8\99l\A7\9A\00\B9}\DAf\C9\C0rr\22\0F\1A\CC#\D9\B7_\1B"
define i32* @load_dsa_params() {
%1 = tail call i32* (...) @DSA_new()
%2 = icmp eq i32* %1, null
br i1 %2, label %14, label %3
3: ; preds = %0
%4 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @load_dsa_params.dsap_2048, i64 0, i64 0), i32 256, i32* null)
%5 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @load_dsa_params.dsaq_2048, i64 0, i64 0), i32 32, i32* null)
%6 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @load_dsa_params.dsag_2048, i64 0, i64 0), i32 256, i32* null)
%7 = tail call i32 @DSA_set0_pqg(i32* %1, i32* %4, i32* %5, i32* %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = tail call i32 @DSA_free(i32* %1)
%11 = tail call i32 @BN_free(i32* %4)
%12 = tail call i32 @BN_free(i32* %5)
%13 = tail call i32 @BN_free(i32* %6)
br label %14
14: ; preds = %3, %0, %9
%15 = phi i32* [ null, %9 ], [ null, %0 ], [ %1, %3 ]
ret i32* %15
}