	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldapclient                     ## -- Begin function ldapclient
	.p2align	4, 0x90
_ldapclient:                            ## @ldapclient
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_20
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_fatal
LBB0_3:
	leaq	-72(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	-56(%rbp), %rdi
	callq	_TAILQ_INIT
	movq	_YPLDAP_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getpwnam
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_fatal
LBB0_5:
	movq	_AF_UNIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PF_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	callq	_socketpair
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	callq	_fatal
LBB0_7:
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_ypldap_dns
	movl	-44(%rbp), %edi
	callq	_close
	movl	8(%r12), %edi
	callq	_chroot
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	callq	_fatal
LBB0_9:
	leaq	L_.str.4(%rip), %rdi
	callq	_chdir
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rdi
	callq	_fatal
LBB0_11:
	leaq	L_.str.6(%rip), %rdi
	callq	_setproctitle
	movq	_PROC_CLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ypldap_process@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r12, %rbx
	addq	$4, %rbx
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	_setgroups
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:
	movl	(%rbx), %edi
	movl	%edi, %esi
	movl	%edi, %edx
	callq	_setresgid
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movl	(%r12), %edi
	movl	%edi, %esi
	movl	%edi, %edx
	callq	_setresuid
	testq	%rax, %rax
	je	LBB0_15
LBB0_14:
	leaq	L_.str.7(%rip), %rdi
	callq	_fatal
LBB0_15:
	xorl	%eax, %eax
	callq	_event_init
	movq	_SIGPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SIG_IGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_client_sig_handler@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	-88(%rbp), %r12
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_signal_set
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_signal_set
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_signal_add
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_signal_add
	movl	(%r15), %edi
	callq	_close
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	xorl	%edi, %edi
	callq	_fatal
LBB0_17:
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	movq	%rax, -72(%rbp)
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	xorl	%edi, %edi
	callq	_fatal
LBB0_19:
	movq	_EV_READ@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	-64(%rbp), %rdi
	movq	%rax, 8(%rdi)
	movq	%r14, 24(%rdi)
	addq	$16, %rdi
	movl	4(%r15), %esi
	callq	_imsg_init
	movq	_client_dispatch_parent@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %rdi
	movl	%ecx, 4(%rdi)
	movl	16(%rdi), %esi
	movq	8(%rdi), %rdx
	movq	%r14, %r8
	callq	_event_set
	movq	-64(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_event_add
	movq	(%r12), %rax
	movq	-72(%rbp), %rdi
	movq	%rax, 8(%rdi)
	movq	%r14, 24(%rdi)
	addq	$16, %rdi
	movl	-48(%rbp), %esi
	callq	_imsg_init
	movq	_client_dispatch_dns@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi
	movl	%ecx, 4(%rdi)
	movl	16(%rdi), %esi
	movq	8(%rdi), %rdx
	movq	%r14, %r8
	callq	_event_set
	movq	-72(%rbp), %rdi
	xorl	%esi, %esi
	callq	_event_add
	xorl	%eax, %eax
	callq	_event_dispatch
	xorl	%eax, %eax
	callq	_client_shutdown
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%ebx, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot fork"

	.comm	_YPLDAP_USER,4,2                ## @YPLDAP_USER
L_.str.1:                               ## @.str.1
	.asciz	"getpwnam"

	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_PF_UNSPEC,4,2                  ## @PF_UNSPEC
L_.str.2:                               ## @.str.2
	.asciz	"socketpair"

L_.str.3:                               ## @.str.3
	.asciz	"chroot"

L_.str.4:                               ## @.str.4
	.asciz	"/"

L_.str.5:                               ## @.str.5
	.asciz	"chdir"

L_.str.6:                               ## @.str.6
	.asciz	"ldap client"

	.comm	_PROC_CLIENT,4,2                ## @PROC_CLIENT
	.comm	_ypldap_process,4,2             ## @ypldap_process
L_.str.7:                               ## @.str.7
	.asciz	"cannot drop privileges"

	.comm	_SIGPIPE,4,2                    ## @SIGPIPE
	.comm	_SIG_IGN,4,2                    ## @SIG_IGN
	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_client_sig_handler,4,2         ## @client_sig_handler
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.comm	_EV_READ,8,3                    ## @EV_READ
	.comm	_client_dispatch_parent,4,2     ## @client_dispatch_parent
	.comm	_client_dispatch_dns,4,2        ## @client_dispatch_dns
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldapclient                     ; -- Begin function ldapclient
	.p2align	2
_ldapclient:                            ; @ldapclient
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_fork
	cbz	w0, LBB0_3
; %bb.1:
	cmn	w0, #1
	b.ne	LBB0_20
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_3:
	add	x20, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	add	x0, x20, #16
	bl	_TAILQ_INIT
Lloh5:
	adrp	x8, _YPLDAP_USER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _YPLDAP_USER@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_getpwnam
	mov	x20, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fatal
LBB0_5:
Lloh10:
	adrp	x8, _AF_UNIX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AF_UNIX@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _PF_UNSPEC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PF_UNSPEC@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x3, sp, #48
	bl	_socketpair
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.6:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fatal
LBB0_7:
	add	x0, sp, #48
	mov	x1, x20
	bl	_ypldap_dns
	ldr	w0, [sp, #52]
	bl	_close
	ldr	w0, [x20, #8]
	bl	_chroot
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.8:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_fatal
LBB0_9:
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_chdir
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:
Lloh25:
	adrp	x0, l_.str.5@PAGE
Lloh26:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_fatal
LBB0_11:
Lloh27:
	adrp	x0, l_.str.6@PAGE
Lloh28:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_setproctitle
Lloh29:
	adrp	x8, _PROC_CLIENT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PROC_CLIENT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _ypldap_process@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ypldap_process@GOTPAGEOFF]
Lloh34:
	str	w8, [x9]
	add	x21, x20, #4
	mov	w0, #1
	mov	x1, x21
	bl	_setgroups
	cbnz	x0, LBB0_14
; %bb.12:
	ldr	w0, [x21]
	mov	x1, x0
	mov	x2, x0
	bl	_setresgid
	cbnz	x0, LBB0_14
; %bb.13:
	ldr	w0, [x20]
	mov	x1, x0
	mov	x2, x0
	bl	_setresuid
	cbz	x0, LBB0_15
LBB0_14:
Lloh35:
	adrp	x0, l_.str.7@PAGE
Lloh36:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_fatal
LBB0_15:
	bl	_event_init
Lloh37:
	adrp	x8, _SIGPIPE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SIGPIPE@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
Lloh40:
	adrp	x8, _SIG_IGN@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SIG_IGN@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	bl	_signal
Lloh43:
	adrp	x8, _SIGINT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x20, _client_sig_handler@GOTPAGE
Lloh47:
	ldr	x20, [x20, _client_sig_handler@GOTPAGEOFF]
	ldr	w2, [x20]
	add	x0, sp, #40
	mov	x3, #0
	bl	_signal_set
Lloh48:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh49:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	ldr	w2, [x20]
	add	x0, sp, #32
	mov	x3, #0
	bl	_signal_set
	add	x0, sp, #40
	mov	x1, #0
	bl	_signal_add
	add	x0, sp, #32
	mov	x1, #0
	bl	_signal_add
	ldr	w0, [x19]
	bl	_close
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	str	x0, [sp, #16]
	cbnz	x0, LBB0_17
; %bb.16:
	bl	_fatal
LBB0_17:
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	str	x0, [sp, #8]
	cbnz	x0, LBB0_19
; %bb.18:
	bl	_fatal
LBB0_19:
Lloh51:
	adrp	x20, _EV_READ@GOTPAGE
Lloh52:
	ldr	x20, [x20, _EV_READ@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [sp, #16]
	str	x8, [x9, #8]
	add	x21, sp, #8
	str	x21, [x9, #24]
	add	x0, x9, #16
	ldr	w1, [x19, #4]
	bl	_imsg_init
Lloh53:
	adrp	x8, _client_dispatch_parent@GOTPAGE
Lloh54:
	ldr	x8, [x8, _client_dispatch_parent@GOTPAGEOFF]
Lloh55:
	ldr	w3, [x8]
	ldr	x0, [sp, #16]
	str	w3, [x0, #4]
	ldr	w1, [x0, #16]
	ldr	x2, [x0, #8]
	add	x4, sp, #8
	bl	_event_set
	ldr	x0, [sp, #16]
	mov	x1, #0
	bl	_event_add
	ldr	x8, [x20]
	ldr	x9, [sp, #8]
	str	x8, [x9, #8]
	str	x21, [x9, #24]
	add	x0, x9, #16
	ldr	w1, [sp, #48]
	bl	_imsg_init
Lloh56:
	adrp	x8, _client_dispatch_dns@GOTPAGE
Lloh57:
	ldr	x8, [x8, _client_dispatch_dns@GOTPAGEOFF]
Lloh58:
	ldr	w3, [x8]
	ldr	x0, [sp, #8]
	str	w3, [x0, #4]
	ldr	w1, [x0, #16]
	ldr	x2, [x0, #8]
	add	x4, sp, #8
	bl	_event_set
	ldr	x0, [sp, #8]
	mov	x1, #0
	bl	_event_add
	bl	_event_dispatch
	bl	_client_shutdown
	mov	w0, #0
LBB0_20:
	ldur	x8, [x29, #-40]
Lloh59:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh60:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh61:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot fork"

	.comm	_YPLDAP_USER,4,2                ; @YPLDAP_USER
l_.str.1:                               ; @.str.1
	.asciz	"getpwnam"

	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_PF_UNSPEC,4,2                  ; @PF_UNSPEC
l_.str.2:                               ; @.str.2
	.asciz	"socketpair"

l_.str.3:                               ; @.str.3
	.asciz	"chroot"

l_.str.4:                               ; @.str.4
	.asciz	"/"

l_.str.5:                               ; @.str.5
	.asciz	"chdir"

l_.str.6:                               ; @.str.6
	.asciz	"ldap client"

	.comm	_PROC_CLIENT,4,2                ; @PROC_CLIENT
	.comm	_ypldap_process,4,2             ; @ypldap_process
l_.str.7:                               ; @.str.7
	.asciz	"cannot drop privileges"

	.comm	_SIGPIPE,4,2                    ; @SIGPIPE
	.comm	_SIG_IGN,4,2                    ; @SIG_IGN
	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_client_sig_handler,4,2         ; @client_sig_handler
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.comm	_EV_READ,8,3                    ; @EV_READ
	.comm	_client_dispatch_parent,4,2     ; @client_dispatch_parent
	.comm	_client_dispatch_dns,4,2        ; @client_dispatch_dns
.subsections_via_symbols
