#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ stderr;
int confirm_action() {
  fprintf(stderr,
          "\n"
          "____________________________WARNING____________________________\n"
          "Erroneously writing to a system EEPROM (like DIMM SPD modules)\n"
          "can break your system.  It will NOT boot anymore so you'll not\n"
          "be able to fix it.\n"
          "\n"
          "Reading from 8bit EEPROMs (like that in your DIMM) without using\n"
          "the -8 switch can also UNEXPECTEDLY write to them, so be sure to\n"
          "use the -8 command param when required.\n"
          "\n"
          "Use -f to disable this warning message\n"
          "\n"
          "Press ENTER to continue or hit CTRL-C to exit\n"
          "\n");
  getchar();
  return 1;
}


x86 assembly (clang, -O0):
<confirm_action>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<confirm_action>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [470 x i8] c"\0A____________________________WARNING____________________________\0AErroneously writing to a system EEPROM (like DIMM SPD modules)\0Acan break your system. It will NOT boot anymore so you'll not\0Abe able to fix it.\0A\0AReading from 8bit EEPROMs (like that in your DIMM) without using\0Athe -8 switch can also UNEXPECTEDLY write to them, so be sure to\0Ause the -8 command param when required.\0A\0AUse -f to disable this warning message\0A\0APress ENTER to continue or hit CTRL-C to exit\0A\0A\00"
define i32 @confirm_action() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([470 x i8], [470 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [470 x i8] c"\0A____________________________WARNING____________________________\0AErroneously writing to a system EEPROM (like DIMM SPD modules)\0Acan break your system. It will NOT boot anymore so you'll not\0Abe able to fix it.\0A\0AReading from 8bit EEPROMs (like that in your DIMM) without using\0Athe -8 switch can also UNEXPECTEDLY write to them, so be sure to\0Ause the -8 command param when required.\0A\0AUse -f to disable this warning message\0A\0APress ENTER to continue or hit CTRL-C to exit\0A\0A\00"
define i32 @confirm_action() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([470 x i8], [470 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret i32 1
}