#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*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_print_fp(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void bug(char *m, BIGNUM *a, BIGNUM *b) {
  printf("%s!\na=", m);
  BN_print_fp(stdout, a);
  printf("\nb=");
  BN_print_fp(stdout, b);
  printf("\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<bug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1040 <BN_print_fp@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
call   1040 <BN_print_fp@plt>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bug>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e7d(%rip),%r15
mov    (%r15),%edi
mov    %rbx,%rsi
call   1050 <BN_print_fp@plt>
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%edi
mov    %r14,%rsi
call   1050 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%r15),%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <fflush@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s!\0Aa=\00"
@stdout = global i32 0
@.str.1 = [4 x i8] c"\0Ab=\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @bug(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @stdout
%10 = load i32*, i32** %5
%11 = call i32 @BN_print_fp(i32 %9, i32* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = load i32*, i32** %6
%15 = call i32 @BN_print_fp(i32 %13, i32* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = call i32 @fflush(i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s!\0Aa=\00"
@stdout = global i32 0
@.str.1 = [4 x i8] c"\0Ab=\00"
define void @bug(i8* %0, i32* %1, i32* %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stdout
%6 = tail call i32 @BN_print_fp(i32 %5, i32* %1)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = tail call i32 @BN_print_fp(i32 %8, i32* %2)
%10 = tail call i32 @putchar(i32 10)
%11 = load i32, i32* @stdout
%12 = tail call i32 @fflush(i32 %11)
ret void
}