	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_search_idm              ## -- Begin function client_search_idm
	.p2align	4, 0x90
_client_search_idm:                     ## @client_search_idm
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movq	%r8, %r15
	movq	%rcx, %r8
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movl	24(%rbp), %ecx
	movq	(%rsi), %rsi
	movq	_IMSG_GRP_ENTRY@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	movq	8(%r13), %rax
	cmpb	$0, (%rax)
	cmovneq	%rax, %rsi
LBB0_2:
	movq	_LDAP_SCOPE_SUBTREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rcx
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_aldap_search
	addq	$32, %rsp
	cmpl	$-1, %eax
	je	LBB0_18
## %bb.3:
	xorl	%r12d, %r12d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_aldap_freepage
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_aldap_parse
	movq	%rax, %r15
	xorl	%eax, %eax
	testq	%r15, %r15
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_7
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	%r15, %rdi
	callq	_aldap_freemsg
	movq	%rbx, %rdi
	callq	_aldap_parse
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_16
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	8(%r15), %rax
	movq	_LDAP_RES_SEARCH_RESULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	_LDAP_RES_SEARCH_ENTRY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	16(%rbp), %r8d
	callq	_client_build_req
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r12), %edi
	subq	$8, %rsp
	movl	24(%rbp), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$-1, %r8d
	leaq	-48(%rbp), %r9
	pushq	$4
	callq	_imsg_compose_event
	addq	$16, %rsp
	jmp	LBB0_15
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r15), %r12
	testq	%r12, %r12
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%r12)
	je	LBB0_11
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_aldap_freemsg
	movq	_LDAP_SCOPE_SUBTREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	$0
	pushq	$0
	callq	_aldap_search
	addq	$32, %rsp
	cmpl	$-1, %eax
	jne	LBB0_4
LBB0_18:
	leaq	-88(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_aldap_get_errno
	movq	-88(%rbp), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_log_debug
	jmp	LBB0_20
LBB0_19:
	movq	%r15, %rdi
	callq	_aldap_freemsg
LBB0_20:
	movl	$-1, %eax
LBB0_21:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_11:
	movq	%r15, %rdi
	callq	_aldap_freemsg
	xorl	%eax, %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_IMSG_GRP_ENTRY,4,2             ## @IMSG_GRP_ENTRY
	.comm	_LDAP_SCOPE_SUBTREE,4,2         ## @LDAP_SCOPE_SUBTREE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_LDAP_RES_SEARCH_RESULT,8,3     ## @LDAP_RES_SEARCH_RESULT
	.comm	_LDAP_RES_SEARCH_ENTRY,8,3      ## @LDAP_RES_SEARCH_ENTRY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_search_idm              ; -- Begin function client_search_idm
	.p2align	2
_client_search_idm:                     ; @client_search_idm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x21, x6
	mov	x22, x5
	mov	x28, x4
	mov	x10, x3
	mov	x20, x2
	mov	x25, x1
	mov	x26, x0
	ldr	x1, [x1]
Lloh0:
	adrp	x8, _IMSG_GRP_ENTRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMSG_GRP_ENTRY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w7
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x25, #8]
	ldrb	w9, [x8]
	cmp	w9, #0
	csel	x1, x1, x8, eq
LBB0_2:
Lloh3:
	adrp	x8, _LDAP_SCOPE_SUBTREE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDAP_SCOPE_SUBTREE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	str	xzr, [sp]
	mov	x0, x20
	stp	x1, x10, [sp, #16]              ; 16-byte Folded Spill
	mov	x3, x28
	mov	x4, x10
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_aldap_search
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.3:
	mov	x23, #0
Lloh6:
	adrp	x24, _LDAP_RES_SEARCH_RESULT@GOTPAGE
Lloh7:
	ldr	x24, [x24, _LDAP_RES_SEARCH_RESULT@GOTPAGEOFF]
Lloh8:
	adrp	x27, _LDAP_RES_SEARCH_ENTRY@GOTPAGE
Lloh9:
	ldr	x27, [x27, _LDAP_RES_SEARCH_ENTRY@GOTPAGEOFF]
	str	x28, [sp, #8]                   ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cbz	x23, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_aldap_freepage
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_aldap_parse
	cbz	x0, LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x28
	bl	_aldap_freemsg
	mov	x0, x20
	bl	_aldap_parse
	mov	x28, x0
	cbz	x0, LBB0_20
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x28, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x1, sp, #40
	mov	x0, x25
	mov	x2, x28
	mov	x3, x22
	mov	x4, x21
	bl	_client_build_req
	cbnz	x0, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w0, [x26]
	add	x5, sp, #40
	mov	x1, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #-1
	mov	w6, #4
	bl	_imsg_compose_event
	b	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [x28, #16]
	cbz	x23, LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x28
	bl	_aldap_freemsg
Lloh10:
	adrp	x8, _LDAP_SCOPE_SUBTREE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LDAP_SCOPE_SUBTREE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	str	x23, [sp]
	mov	x0, x20
	ldp	x3, x1, [sp, #8]                ; 16-byte Folded Reload
	ldr	x4, [sp, #24]                   ; 8-byte Folded Reload
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_aldap_search
	cmn	w0, #1
	b.ne	LBB0_4
LBB0_17:
	add	x1, sp, #32
	mov	x0, x20
	bl	_aldap_get_errno
	ldr	x1, [sp, #32]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_debug
	b	LBB0_19
LBB0_18:
	mov	x0, x28
	bl	_aldap_freemsg
LBB0_19:
	mov	w0, #-1
LBB0_20:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_21:
	mov	x0, x28
	bl	_aldap_freemsg
	mov	w0, #0
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IMSG_GRP_ENTRY,4,2             ; @IMSG_GRP_ENTRY
	.comm	_LDAP_SCOPE_SUBTREE,4,2         ; @LDAP_SCOPE_SUBTREE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_LDAP_RES_SEARCH_RESULT,8,3     ; @LDAP_RES_SEARCH_RESULT
	.comm	_LDAP_RES_SEARCH_ENTRY,8,3      ; @LDAP_RES_SEARCH_ENTRY
.subsections_via_symbols
