#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*/ EC_POINT;
typedef int /*<<< orphan*/ EC_GROUP;
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_CTX_end(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_CTX_get(int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_CTX_start(int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_add(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *);
scalar_t__ BN_is_negative(int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_mod_mul(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_mod_sqr(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_sub(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *);
int /*<<< orphan*/ EC_GROUP_get_curve_GFp(int /*<<< orphan*/ const *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *);
int /*<<< orphan*/ EC_POINT_get_Jprojective_coordinates_GFp(
    int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *);
int /*<<< orphan*/ EC_POINT_set_Jprojective_coordinates_GFp(
    int /*<<< orphan*/ const *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void BN_EC_Point_Add_Affine(const EC_GROUP *group, EC_POINT *r,
                            const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx) {
  BIGNUM *X13, *Y13;
  BIGNUM *Y2;
  BIGNUM *Z3;
  BIGNUM *H23;
  BIGNUM *R1;
  BIGNUM *Calc;
  BIGNUM *field;
  BN_CTX_start(ctx);
  X13 = BN_CTX_get(ctx);
  Y13 = BN_CTX_get(ctx);
  Y2 = BN_CTX_get(ctx);
  Z3 = BN_CTX_get(ctx);
  H23 = BN_CTX_get(ctx);
  R1 = BN_CTX_get(ctx);
  Calc = BN_CTX_get(ctx);
  field = BN_CTX_get(ctx);
  EC_POINT_get_Jprojective_coordinates_GFp(group, a, X13, Y13, NULL, ctx);
  EC_POINT_get_Jprojective_coordinates_GFp(group, b, Z3, Y2, NULL, ctx);
  EC_GROUP_get_curve_GFp(group, field, NULL, NULL, ctx);
  BN_sub(Z3, Z3, X13);
  if (BN_is_negative(Z3))
    BN_add(Z3, Z3, field);
  BN_mod_sqr(H23, Z3, field, ctx);
  BN_sub(R1, Y2, Y13);
  if (BN_is_negative(R1))
    BN_add(R1, R1, field);
  BN_mod_mul(Y2, X13, H23, field, ctx);
  BN_mod_mul(H23, H23, Z3, field, ctx);
  BN_mod_sqr(X13, R1, field, ctx);
  BN_add(Calc, Y2, Y2);
  BN_add(Calc, Calc, H23);
  BN_sub(X13, X13, Calc);
  if (BN_is_negative(X13))
    BN_add(X13, X13, field);
  BN_mod_mul(Calc, Y13, H23, field, ctx);
  BN_sub(Y13, Y2, X13);
  if (BN_is_negative(X13))
    BN_add(X13, X13, field);
  BN_mod_mul(Y13, Y13, R1, field, ctx);
  BN_sub(Y13, Y13, Calc);
  if (BN_is_negative(Y13))
    BN_add(Y13, Y13, field);
  EC_POINT_set_Jprojective_coordinates_GFp(group, r, X13, Y13, Z3, ctx);
  BN_CTX_end(ctx);
}


x86 assembly (clang, -O0):
<BN_EC_Point_Add_Affine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1090 <BN_CTX_start@plt>
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x28(%rbp),%r9
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <EC_POINT_get_Jprojective_coordinates_GFp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x28(%rbp),%r9
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <EC_POINT_get_Jprojective_coordinates_GFp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x28(%rbp),%r8
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1070 <EC_GROUP_get_curve_GFp@plt>
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1060 <BN_sub@plt>
mov    -0x48(%rbp),%rdi
call   10d0 <BN_is_negative@plt>
cmp    $0x0,%rax
je     12c6 <BN_EC_Point_Add_Affine+0x116>
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1030 <BN_add@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   10c0 <BN_mod_sqr@plt>
mov    -0x58(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1060 <BN_sub@plt>
mov    -0x58(%rbp),%rdi
call   10d0 <BN_is_negative@plt>
cmp    $0x0,%rax
je     1310 <BN_EC_Point_Add_Affine+0x160>
mov    -0x58(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1030 <BN_add@plt>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   10b0 <BN_mod_mul@plt>
mov    -0x50(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   10b0 <BN_mod_mul@plt>
mov    -0x30(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   10c0 <BN_mod_sqr@plt>
mov    -0x60(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x40(%rbp),%rdx
call   1030 <BN_add@plt>
mov    -0x60(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x50(%rbp),%rdx
call   1030 <BN_add@plt>
mov    -0x30(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x60(%rbp),%rdx
call   1060 <BN_sub@plt>
mov    -0x30(%rbp),%rdi
call   10d0 <BN_is_negative@plt>
cmp    $0x0,%rax
je     13ae <BN_EC_Point_Add_Affine+0x1fe>
mov    -0x30(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1030 <BN_add@plt>
mov    -0x60(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   10b0 <BN_mod_mul@plt>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1060 <BN_sub@plt>
mov    -0x30(%rbp),%rdi
call   10d0 <BN_is_negative@plt>
cmp    $0x0,%rax
je     13fc <BN_EC_Point_Add_Affine+0x24c>
mov    -0x30(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1030 <BN_add@plt>
mov    -0x38(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   10b0 <BN_mod_mul@plt>
mov    -0x38(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x60(%rbp),%rdx
call   1060 <BN_sub@plt>
mov    -0x38(%rbp),%rdi
call   10d0 <BN_is_negative@plt>
cmp    $0x0,%rax
je     144a <BN_EC_Point_Add_Affine+0x29a>
mov    -0x38(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1030 <BN_add@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x28(%rbp),%r9
call   10a0 <EC_POINT_set_Jprojective_coordinates_GFp@plt>
mov    -0x28(%rbp),%rdi
call   1080 <BN_CTX_end@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BN_EC_Point_Add_Affine>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8,%r14
mov    %rcx,0x8(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rsi,0x40(%rsp)
mov    %rdi,%r13
mov    %r8,%rdi
call   1090 <BN_CTX_start@plt>
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,%rbp
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,0x10(%rsp)
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,0x20(%rsp)
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,0x28(%rsp)
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,0x30(%rsp)
mov    %r14,%rdi
call   1050 <BN_CTX_get@plt>
mov    %rax,%rbx
mov    %r13,%rdi
mov    0x18(%rsp),%rsi
mov    %r12,%rdx
mov    %rbp,0x18(%rsp)
mov    %rbp,%rcx
xor    %r8d,%r8d
mov    %r14,%r9
call   1040 <EC_POINT_get_Jprojective_coordinates_GFp@plt>
mov    %r13,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rbp
mov    %rbp,%rdx
mov    %r15,0x8(%rsp)
mov    %r15,%rcx
mov    %rbx,%r15
xor    %r8d,%r8d
mov    %r14,%r9
call   1040 <EC_POINT_get_Jprojective_coordinates_GFp@plt>
mov    %r13,0x38(%rsp)
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %r14,%r8
call   1070 <EC_GROUP_get_curve_GFp@plt>
mov    %rbp,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
call   1060 <BN_sub@plt>
mov    %rbp,%rdi
call   10d0 <BN_is_negative@plt>
test   %rax,%rax
je     12c1 <BN_EC_Point_Add_Affine+0x111>
mov    0x10(%rsp),%rdi
mov    %rdi,%rsi
mov    %r15,%rdx
call   1030 <BN_add@plt>
mov    %r12,%rbx
mov    0x20(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   10c0 <BN_mod_sqr@plt>
mov    0x28(%rsp),%rbp
mov    %rbp,%rdi
mov    0x8(%rsp),%rsi
mov    0x18(%rsp),%rdx
call   1060 <BN_sub@plt>
mov    %rbp,%rdi
call   10d0 <BN_is_negative@plt>
test   %rax,%rax
je     130b <BN_EC_Point_Add_Affine+0x15b>
mov    %rbp,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
call   1030 <BN_add@plt>
mov    0x8(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
mov    0x20(%rsp),%r13
mov    %r13,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   10b0 <BN_mod_mul@plt>
mov    %r13,%rdi
mov    %r13,%rsi
mov    0x10(%rsp),%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   10b0 <BN_mod_mul@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   10c0 <BN_mod_sqr@plt>
mov    0x30(%rsp),%rdi
mov    %r12,%rsi
mov    %r12,%rdx
mov    %rdi,%r12
call   1030 <BN_add@plt>
mov    %r12,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1030 <BN_add@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1060 <BN_sub@plt>
mov    %rbx,%rdi
call   10d0 <BN_is_negative@plt>
test   %rax,%rax
je     139a <BN_EC_Point_Add_Affine+0x1ea>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <BN_add@plt>
mov    %r12,%rdi
mov    0x18(%rsp),%rbp
mov    %rbp,%rsi
mov    0x20(%rsp),%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   10b0 <BN_mod_mul@plt>
mov    %rbp,%rdi
mov    0x8(%rsp),%rsi
mov    %rbx,%rdx
call   1060 <BN_sub@plt>
mov    %rbx,%rdi
call   10d0 <BN_is_negative@plt>
test   %rax,%rax
je     13e0 <BN_EC_Point_Add_Affine+0x230>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <BN_add@plt>
mov    %rbp,%rdi
mov    %rbp,%rsi
mov    0x28(%rsp),%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   10b0 <BN_mod_mul@plt>
mov    %rbp,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
call   1060 <BN_sub@plt>
mov    %rbp,%rdi
call   10d0 <BN_is_negative@plt>
test   %rax,%rax
je     141f <BN_EC_Point_Add_Affine+0x26f>
mov    %rbp,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
call   1030 <BN_add@plt>
mov    0x38(%rsp),%rdi
mov    0x40(%rsp),%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    0x10(%rsp),%r8
mov    %r14,%r9
call   10a0 <EC_POINT_set_Jprojective_coordinates_GFp@plt>
mov    %r14,%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <BN_CTX_end@plt>

LLVM IR (-O0):
define void @BN_EC_Point_Add_Affine(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%19 = load i32*, i32** %10
%20 = call i32 @BN_CTX_start(i32* %19)
%21 = load i32*, i32** %10
%22 = call i32* @BN_CTX_get(i32* %21)
store i32* %22, i32** %11
%23 = load i32*, i32** %10
%24 = call i32* @BN_CTX_get(i32* %23)
store i32* %24, i32** %12
%25 = load i32*, i32** %10
%26 = call i32* @BN_CTX_get(i32* %25)
store i32* %26, i32** %13
%27 = load i32*, i32** %10
%28 = call i32* @BN_CTX_get(i32* %27)
store i32* %28, i32** %14
%29 = load i32*, i32** %10
%30 = call i32* @BN_CTX_get(i32* %29)
store i32* %30, i32** %15
%31 = load i32*, i32** %10
%32 = call i32* @BN_CTX_get(i32* %31)
store i32* %32, i32** %16
%33 = load i32*, i32** %10
%34 = call i32* @BN_CTX_get(i32* %33)
store i32* %34, i32** %17
%35 = load i32*, i32** %10
%36 = call i32* @BN_CTX_get(i32* %35)
store i32* %36, i32** %18
%37 = load i32*, i32** %6
%38 = load i32*, i32** %8
%39 = load i32*, i32** %11
%40 = load i32*, i32** %12
%41 = load i32*, i32** %10
%42 = call i32 @EC_POINT_get_Jprojective_coordinates_GFp(i32* %37, i32* %38, i32* %39, i32* %40, i32* null, i32* %41)
%43 = load i32*, i32** %6
%44 = load i32*, i32** %9
%45 = load i32*, i32** %14
%46 = load i32*, i32** %13
%47 = load i32*, i32** %10
%48 = call i32 @EC_POINT_get_Jprojective_coordinates_GFp(i32* %43, i32* %44, i32* %45, i32* %46, i32* null, i32* %47)
%49 = load i32*, i32** %6
%50 = load i32*, i32** %18
%51 = load i32*, i32** %10
%52 = call i32 @EC_GROUP_get_curve_GFp(i32* %49, i32* %50, i32* null, i32* null, i32* %51)
%53 = load i32*, i32** %14
%54 = load i32*, i32** %14
%55 = load i32*, i32** %11
%56 = call i32 @BN_sub(i32* %53, i32* %54, i32* %55)
%57 = load i32*, i32** %14
%58 = call i64 @BN_is_negative(i32* %57)
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %65
60: ; preds = %5
%61 = load i32*, i32** %14
%62 = load i32*, i32** %14
%63 = load i32*, i32** %18
%64 = call i32 @BN_add(i32* %61, i32* %62, i32* %63)
br label %65
65: ; preds = %60, %5
%66 = load i32*, i32** %15
%67 = load i32*, i32** %14
%68 = load i32*, i32** %18
%69 = load i32*, i32** %10
%70 = call i32 @BN_mod_sqr(i32* %66, i32* %67, i32* %68, i32* %69)
%71 = load i32*, i32** %16
%72 = load i32*, i32** %13
%73 = load i32*, i32** %12
%74 = call i32 @BN_sub(i32* %71, i32* %72, i32* %73)
%75 = load i32*, i32** %16
%76 = call i64 @BN_is_negative(i32* %75)
%77 = icmp ne i64 %76, 0
br i1 %77, label %78, label %83
78: ; preds = %65
%79 = load i32*, i32** %16
%80 = load i32*, i32** %16
%81 = load i32*, i32** %18
%82 = call i32 @BN_add(i32* %79, i32* %80, i32* %81)
br label %83
83: ; preds = %78, %65
%84 = load i32*, i32** %13
%85 = load i32*, i32** %11
%86 = load i32*, i32** %15
%87 = load i32*, i32** %18
%88 = load i32*, i32** %10
%89 = call i32 @BN_mod_mul(i32* %84, i32* %85, i32* %86, i32* %87, i32* %88)
%90 = load i32*, i32** %15
%91 = load i32*, i32** %15
%92 = load i32*, i32** %14
%93 = load i32*, i32** %18
%94 = load i32*, i32** %10
%95 = call i32 @BN_mod_mul(i32* %90, i32* %91, i32* %92, i32* %93, i32* %94)
%96 = load i32*, i32** %11
%97 = load i32*, i32** %16
%98 = load i32*, i32** %18
%99 = load i32*, i32** %10
%100 = call i32 @BN_mod_sqr(i32* %96, i32* %97, i32* %98, i32* %99)
%101 = load i32*, i32** %17
%102 = load i32*, i32** %13
%103 = load i32*, i32** %13
%104 = call i32 @BN_add(i32* %101, i32* %102, i32* %103)
%105 = load i32*, i32** %17
%106 = load i32*, i32** %17
%107 = load i32*, i32** %15
%108 = call i32 @BN_add(i32* %105, i32* %106, i32* %107)
%109 = load i32*, i32** %11
%110 = load i32*, i32** %11
%111 = load i32*, i32** %17
%112 = call i32 @BN_sub(i32* %109, i32* %110, i32* %111)
%113 = load i32*, i32** %11
%114 = call i64 @BN_is_negative(i32* %113)
%115 = icmp ne i64 %114, 0
br i1 %115, label %116, label %121
116: ; preds = %83
%117 = load i32*, i32** %11
%118 = load i32*, i32** %11
%119 = load i32*, i32** %18
%120 = call i32 @BN_add(i32* %117, i32* %118, i32* %119)
br label %121
121: ; preds = %116, %83
%122 = load i32*, i32** %17
%123 = load i32*, i32** %12
%124 = load i32*, i32** %15
%125 = load i32*, i32** %18
%126 = load i32*, i32** %10
%127 = call i32 @BN_mod_mul(i32* %122, i32* %123, i32* %124, i32* %125, i32* %126)
%128 = load i32*, i32** %12
%129 = load i32*, i32** %13
%130 = load i32*, i32** %11
%131 = call i32 @BN_sub(i32* %128, i32* %129, i32* %130)
%132 = load i32*, i32** %11
%133 = call i64 @BN_is_negative(i32* %132)
%134 = icmp ne i64 %133, 0
br i1 %134, label %135, label %140
135: ; preds = %121
%136 = load i32*, i32** %11
%137 = load i32*, i32** %11
%138 = load i32*, i32** %18
%139 = call i32 @BN_add(i32* %136, i32* %137, i32* %138)
br label %140
140: ; preds = %135, %121
%141 = load i32*, i32** %12
%142 = load i32*, i32** %12
%143 = load i32*, i32** %16
%144 = load i32*, i32** %18
%145 = load i32*, i32** %10
%146 = call i32 @BN_mod_mul(i32* %141, i32* %142, i32* %143, i32* %144, i32* %145)
%147 = load i32*, i32** %12
%148 = load i32*, i32** %12
%149 = load i32*, i32** %17
%150 = call i32 @BN_sub(i32* %147, i32* %148, i32* %149)
%151 = load i32*, i32** %12
%152 = call i64 @BN_is_negative(i32* %151)
%153 = icmp ne i64 %152, 0
br i1 %153, label %154, label %159
154: ; preds = %140
%155 = load i32*, i32** %12
%156 = load i32*, i32** %12
%157 = load i32*, i32** %18
%158 = call i32 @BN_add(i32* %155, i32* %156, i32* %157)
br label %159
159: ; preds = %154, %140
%160 = load i32*, i32** %6
%161 = load i32*, i32** %7
%162 = load i32*, i32** %11
%163 = load i32*, i32** %12
%164 = load i32*, i32** %14
%165 = load i32*, i32** %10
%166 = call i32 @EC_POINT_set_Jprojective_coordinates_GFp(i32* %160, i32* %161, i32* %162, i32* %163, i32* %164, i32* %165)
%167 = load i32*, i32** %10
%168 = call i32 @BN_CTX_end(i32* %167)
ret void
}

LLVM IR (-O2):
define void @BN_EC_Point_Add_Affine(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = tail call i32 @BN_CTX_start(i32* %4)
%7 = tail call i32* @BN_CTX_get(i32* %4)
%8 = tail call i32* @BN_CTX_get(i32* %4)
%9 = tail call i32* @BN_CTX_get(i32* %4)
%10 = tail call i32* @BN_CTX_get(i32* %4)
%11 = tail call i32* @BN_CTX_get(i32* %4)
%12 = tail call i32* @BN_CTX_get(i32* %4)
%13 = tail call i32* @BN_CTX_get(i32* %4)
%14 = tail call i32* @BN_CTX_get(i32* %4)
%15 = tail call i32 @EC_POINT_get_Jprojective_coordinates_GFp(i32* %0, i32* %2, i32* %7, i32* %8, i32* null, i32* %4)
%16 = tail call i32 @EC_POINT_get_Jprojective_coordinates_GFp(i32* %0, i32* %3, i32* %10, i32* %9, i32* null, i32* %4)
%17 = tail call i32 @EC_GROUP_get_curve_GFp(i32* %0, i32* %14, i32* null, i32* null, i32* %4)
%18 = tail call i32 @BN_sub(i32* %10, i32* %10, i32* %7)
%19 = tail call i64 @BN_is_negative(i32* %10)
%20 = icmp eq i64 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %5
%22 = tail call i32 @BN_add(i32* %10, i32* %10, i32* %14)
br label %23
23: ; preds = %21, %5
%24 = tail call i32 @BN_mod_sqr(i32* %11, i32* %10, i32* %14, i32* %4)
%25 = tail call i32 @BN_sub(i32* %12, i32* %9, i32* %8)
%26 = tail call i64 @BN_is_negative(i32* %12)
%27 = icmp eq i64 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %23
%29 = tail call i32 @BN_add(i32* %12, i32* %12, i32* %14)
br label %30
30: ; preds = %28, %23
%31 = tail call i32 @BN_mod_mul(i32* %9, i32* %7, i32* %11, i32* %14, i32* %4)
%32 = tail call i32 @BN_mod_mul(i32* %11, i32* %11, i32* %10, i32* %14, i32* %4)
%33 = tail call i32 @BN_mod_sqr(i32* %7, i32* %12, i32* %14, i32* %4)
%34 = tail call i32 @BN_add(i32* %13, i32* %9, i32* %9)
%35 = tail call i32 @BN_add(i32* %13, i32* %13, i32* %11)
%36 = tail call i32 @BN_sub(i32* %7, i32* %7, i32* %13)
%37 = tail call i64 @BN_is_negative(i32* %7)
%38 = icmp eq i64 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %30
%40 = tail call i32 @BN_add(i32* %7, i32* %7, i32* %14)
br label %41
41: ; preds = %39, %30
%42 = tail call i32 @BN_mod_mul(i32* %13, i32* %8, i32* %11, i32* %14, i32* %4)
%43 = tail call i32 @BN_sub(i32* %8, i32* %9, i32* %7)
%44 = tail call i64 @BN_is_negative(i32* %7)
%45 = icmp eq i64 %44, 0
br i1 %45, label %48, label %46
46: ; preds = %41
%47 = tail call i32 @BN_add(i32* %7, i32* %7, i32* %14)
br label %48
48: ; preds = %46, %41
%49 = tail call i32 @BN_mod_mul(i32* %8, i32* %8, i32* %12, i32* %14, i32* %4)
%50 = tail call i32 @BN_sub(i32* %8, i32* %8, i32* %13)
%51 = tail call i64 @BN_is_negative(i32* %8)
%52 = icmp eq i64 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %48
%54 = tail call i32 @BN_add(i32* %8, i32* %8, i32* %14)
br label %55
55: ; preds = %53, %48
%56 = tail call i32 @EC_POINT_set_Jprojective_coordinates_GFp(i32* %0, i32* %1, i32* %7, i32* %8, i32* %10, i32* %4)
%57 = tail call i32 @BN_CTX_end(i32* %4)
ret void
}