	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dns_find_realm
_dns_find_realm:                        ## @dns_find_realm
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXHOSTNAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_krb5_config_get_strings
	testq	%rax, %rax
	leaq	_dns_find_realm.default_labels(%rip), %r12
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmovneq	%rax, %r12
	xorl	%eax, %eax
	cmpb	$46, (%rbx)
	sete	%dl
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.1:
	movb	%dl, %al
	addq	%rax, %rbx
	addq	$8, %r12
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rcx
	addq	$8, %r12
	testq	%rcx, %rcx
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %r8
	callq	_snprintf
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cltq
	cmpq	%r13, %rax
	jae	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_rk_dns_lookup
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	movl	(%rax), %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_copy_txt_to_realms
	movq	%r13, %rbx
	movq	%r15, %r13
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_rk_dns_free_data
	testl	%r15d, %r15d
	movq	%r13, %r15
	movq	%rbx, %r13
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_7
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_8:
	movl	$-1, %ebx
LBB0_9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_krb5_config_free_strings
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__const
	.p2align	4                               ## @dns_find_realm.default_labels
_dns_find_realm.default_labels:
	.quad	L_.str
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_kerberos"

	.comm	_MAXHOSTNAMELEN,4,2             ## @MAXHOSTNAMELEN
L_.str.1:                               ## @.str.1
	.asciz	"libdefaults"

L_.str.2:                               ## @.str.2
	.asciz	"dns_lookup_realm_labels"

L_.str.3:                               ## @.str.3
	.asciz	"%s.%s."

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

	.no_dead_strip	_dns_find_realm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dns_find_realm
_dns_find_realm:                        ; @dns_find_realm
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x19, x2
	mov	x23, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXHOSTNAMELEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXHOSTNAMELEN@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
Lloh10:
	adrp	x3, l_.str.2@PAGE
Lloh11:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x1, #0
	mov	x4, #0
	bl	_krb5_config_get_strings
	mov	x20, x0
Lloh12:
	adrp	x8, _dns_find_realm.default_labels@PAGE
Lloh13:
	add	x8, x8, _dns_find_realm.default_labels@PAGEOFF
	cmp	x0, #0
	csel	x8, x8, x0, eq
	mov	x9, x23
	ldrb	w10, [x9], #1
	cmp	w10, #46
	csel	x23, x23, x9, ne
	ldr	x3, [x8]
	cbz	x3, LBB0_8
; %bb.1:
	add	x28, x8, #8
Lloh14:
	adrp	x24, l_.str.3@PAGE
Lloh15:
	add	x24, x24, l_.str.3@PAGEOFF
Lloh16:
	adrp	x25, l_.str.4@PAGE
Lloh17:
	add	x25, x25, l_.str.4@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x3, [x28], #8
	cbz	x3, LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	mov	x4, x23
	bl	_snprintf
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w0
	cmp	x8, x21
	b.hs	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x25
	bl	_rk_dns_lookup
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x0
	ldr	w0, [x0]
	mov	x1, x19
	bl	_copy_txt_to_realms
	mov	x27, x0
	mov	x0, x26
	bl	_rk_dns_free_data
	cbnz	w27, LBB0_2
; %bb.7:
	mov	w19, #0
	cbnz	x20, LBB0_9
	b	LBB0_10
LBB0_8:
	mov	w19, #-1
	cbz	x20, LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_krb5_config_free_strings
LBB0_10:
	ldur	x8, [x29, #-88]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__const
	.p2align	3                               ; @dns_find_realm.default_labels
_dns_find_realm.default_labels:
	.quad	l_.str
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_kerberos"

	.comm	_MAXHOSTNAMELEN,4,2             ; @MAXHOSTNAMELEN
l_.str.1:                               ; @.str.1
	.asciz	"libdefaults"

l_.str.2:                               ; @.str.2
	.asciz	"dns_lookup_realm_labels"

l_.str.3:                               ; @.str.3
	.asciz	"%s.%s."

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

	.no_dead_strip	_dns_find_realm
.subsections_via_symbols
