#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 */
scalar_t__ reconfigure_ssl();
int /*<<< orphan*/ wall_status(char *);
void sig_reconfigure(int i) {
  wall_status("Configuration reload requested remotely.");
  if (reconfigure_ssl()) {
    wall_status("Certificate reload was successful.");
  } else {
    wall_status("Certificate reload failed!");
  }
  wall_status("Configuration reload complete.");
}


x86 assembly (clang, -O0):
<sig_reconfigure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <wall_status@plt>
mov    $0x0,%al
call   1030 <reconfigure_ssl@plt>
cmp    $0x0,%rax
je     1159 <sig_reconfigure+0x39>
lea    0xeda(%rip),%rdi
call   1040 <wall_status@plt>
jmp    1165 <sig_reconfigure+0x45>
lea    0xeec(%rip),%rdi
call   1040 <wall_status@plt>
lea    0xefb(%rip),%rdi
call   1040 <wall_status@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_reconfigure>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <wall_status@plt>
xor    %eax,%eax
call   1030 <reconfigure_ssl@plt>
test   %rax,%rax
lea    0xf0e(%rip),%rax
lea    0xee4(%rip),%rdi
cmove  %rax,%rdi
call   1040 <wall_status@plt>
lea    0xf12(%rip),%rdi
pop    %rax
jmp    1040 <wall_status@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Configuration reload requested remotely.\00"
@.str.1 = [35 x i8] c"Certificate reload was successful.\00"
@.str.2 = [27 x i8] c"Certificate reload failed!\00"
@.str.3 = [31 x i8] c"Configuration reload complete.\00"
define void @sig_reconfigure(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @wall_status(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%4 = call i64 (...) @reconfigure_ssl()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @wall_status(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @wall_status(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = call i32 @wall_status(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"Configuration reload requested remotely.\00"
@.str.1 = [35 x i8] c"Certificate reload was successful.\00"
@.str.2 = [27 x i8] c"Certificate reload failed!\00"
@.str.3 = [31 x i8] c"Configuration reload complete.\00"
define void @sig_reconfigure(i32 %0) {
%2 = tail call i32 @wall_status(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 (...) @reconfigure_ssl()
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @wall_status(i8* %5)
%7 = tail call i32 @wall_status(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
ret void
}