#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*/ SIGCHLD;
void *SIG_DFL;
int _condor_config_val(char *, char *, size_t, char const *);
void *signal(int /*<<< orphan*/, void *);
int condor_config_val(char *var, char *val, size_t valsize,
                      const char *default_val) {
  void *sigchld_handler = signal(SIGCHLD, SIG_DFL);
  int result = _condor_config_val(var, val, valsize, default_val);
  signal(SIGCHLD, sigchld_handler);
  return result;
}


x86 assembly (clang, -O0):
<condor_config_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2e90(%rip),%rax
mov    (%rax),%rsi
call   1030 <signal@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <_condor_config_val@plt>
mov    %eax,-0x2c(%rbp)
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rsi
call   1030 <signal@plt>
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<condor_config_val>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    0x2eaa(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2e90(%rip),%rax
mov    (%rax),%rsi
call   1030 <signal@plt>
mov    %rax,%r13
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <_condor_config_val@plt>
mov    %eax,%ebx
mov    0x0(%rbp),%edi
mov    %r13,%rsi
call   1030 <signal@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIG_DFL = global i8* null
define i32 @condor_config_val(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%11 = load i32, i32* @SIGCHLD
%12 = load i8*, i8** @SIG_DFL
%13 = call i8* @signal(i32 %11, i8* %12)
store i8* %13, i8** %9
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = load i64, i64* %7
%17 = load i8*, i8** %8
%18 = call i32 @_condor_config_val(i8* %14, i8* %15, i64 %16, i8* %17)
store i32 %18, i32* %10
%19 = load i32, i32* @SIGCHLD
%20 = load i8*, i8** %9
%21 = call i8* @signal(i32 %19, i8* %20)
%22 = load i32, i32* %10
ret i32 %22
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIG_DFL = global i8* null
define i32 @condor_config_val(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = load i32, i32* @SIGCHLD
%6 = load i8*, i8** @SIG_DFL
%7 = tail call i8* @signal(i32 %5, i8* %6)
%8 = tail call i32 @_condor_config_val(i8* %0, i8* %1, i64 %2, i8* %3)
%9 = load i32, i32* @SIGCHLD
%10 = tail call i8* @signal(i32 %9, i8* %7)
ret i32 %8
}