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

/* Variables and functions */
int /*<<< orphan*/ LOG_DEBUG;
int /*<<< orphan*/ _debug(char *, int, int /*<<< orphan*/, char *, ...);
int auth_client_unblock(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void ndsctl_unblock(FILE *fp, char *arg) {
  int rc;
  _debug("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/lynxis/nodogsplash/refs/heads/master/src/"
         "ndsctl_thread.c",
         377, LOG_DEBUG, "Entering ndsctl_unblock [%s]", arg);
  rc = auth_client_unblock(arg);
  if (rc == 0) {
    fprintf(fp, "Yes");
  } else {
    fprintf(fp, "No");
  }
  _debug("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/lynxis/nodogsplash/refs/heads/master/src/"
         "ndsctl_thread.c",
         386, LOG_DEBUG, "Exiting ndsctl_unblock.");
}


x86 assembly (clang, -O0):
<ndsctl_unblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%r8
lea    0xeac(%rip),%rdi
mov    $0x179,%esi
lea    0xf33(%rip),%rcx
mov    $0x0,%al
call   1050 <_debug@plt>
mov    -0x10(%rbp),%rdi
call   1030 <auth_client_unblock@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1192 <ndsctl_unblock+0x62>
mov    -0x8(%rbp),%rdi
lea    0xf28(%rip),%rsi
call   1040 <fprintf@plt>
jmp    11a2 <ndsctl_unblock+0x72>
mov    -0x8(%rbp),%rdi
lea    0xf17(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e37(%rip),%rax
mov    (%rax),%edx
lea    0xe4e(%rip),%rdi
mov    $0x182,%esi
lea    0xef9(%rip),%rcx
mov    $0x0,%al
call   1050 <_debug@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndsctl_unblock>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2e9e(%rip),%r15
mov    (%r15),%edx
lea    0xeb4(%rip),%rdi
lea    0xf40(%rip),%rcx
mov    $0x179,%esi
mov    %rbx,%r8
xor    %eax,%eax
call   1040 <_debug@plt>
mov    %rbx,%rdi
call   1030 <auth_client_unblock@plt>
test   %eax,%eax
je     117c <ndsctl_unblock+0x4c>
lea    0xf3f(%rip),%rdi
mov    $0x2,%esi
jmp    1188 <ndsctl_unblock+0x58>
lea    0xf2d(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1050 <fwrite@plt>
mov    (%r15),%edx
lea    0xe61(%rip),%rdi
lea    0xf11(%rip),%rcx
mov    $0x182,%esi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <_debug@plt>

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/lynxis/nodogsplash/refs/heads/master/src/ndsctl_thread.c\00"
@LOG_DEBUG = global i32 0
@.str.1 = [29 x i8] c"Entering ndsctl_unblock [%s]\00"
@.str.2 = [4 x i8] c"Yes\00"
@.str.3 = [3 x i8] c"No\00"
@.str.4 = [24 x i8] c"Exiting ndsctl_unblock.\00"
define void @ndsctl_unblock(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32, i32* @LOG_DEBUG
%7 = load i8*, i8** %4
%8 = call i32 (i8*, i32, i32, i8*, ...) @_debug(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 377, i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 @auth_client_unblock(i8* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32*, i32** %3
%15 = call i32 @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %19
16: ; preds = %2
%17 = load i32*, i32** %3
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %16, %13
%20 = load i32, i32* @LOG_DEBUG
%21 = call i32 (i8*, i32, i32, i8*, ...) @_debug(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 386, i32 %20, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/lynxis/nodogsplash/refs/heads/master/src/ndsctl_thread.c\00"
@LOG_DEBUG = global i32 0
@.str.1 = [29 x i8] c"Entering ndsctl_unblock [%s]\00"
@.str.2 = [4 x i8] c"Yes\00"
@.str.3 = [3 x i8] c"No\00"
@.str.4 = [24 x i8] c"Exiting ndsctl_unblock.\00"
define void @ndsctl_unblock(i32* nocapture %0, i8* %1) {
%3 = load i32, i32* @LOG_DEBUG
%4 = tail call i32 (i8*, i32, i32, i8*, ...) @_debug(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 377, i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i32 @auth_client_unblock(i8* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %11
9: ; preds = %2
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %0)
br label %11
11: ; preds = %9, %7
%12 = load i32, i32* @LOG_DEBUG
%13 = tail call i32 (i8*, i32, i32, i8*, ...) @_debug(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 386, i32 %12, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
ret void
}