	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ldns_tcp_start
_ldns_tcp_start:                        ## @ldns_tcp_start
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	$0, -48(%rbp)
	movq	8(%rdi), %rax
	movslq	%edx, %rcx
	movl	(%rax,%rcx,4), %ebx
	callq	_ldns_resolver_port
	leaq	-48(%rbp), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ldns_rdf2native_sockaddr_storage
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	-48(%rbp), %ebx
	movq	%r13, %rdi
	callq	_ldns_resolver_timeout
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ldns_tcp_connect
	movl	%eax, (%r13)
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:
	movq	_LDNS_MAX_PACKETLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ldns_buffer_new
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_ldns_pkt2buffer_wire
	movq	_LDNS_STATUS_OK@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_7
## %bb.8:
	movl	(%r13), %esi
	movl	-48(%rbp), %ecx
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_ldns_tcp_send_query
	testq	%rax, %rax
	je	LBB0_9
## %bb.13:
	movq	%r15, %rdi
	callq	_ldns_buffer_free
	movq	%r14, %rdi
	callq	_free
	movq	(%rbx), %r12
	jmp	LBB0_12
LBB0_1:
	movq	_LDNS_STATUS_MEM_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_LDNS_STATUS_ADDRESS_ERR@GOTPCREL(%rip), %rax
LBB0_2:
	movq	(%rax), %r12
	xorl	%r15d, %r15d
LBB0_10:
	movq	%r15, %rdi
	callq	_ldns_buffer_free
	movq	%r14, %rdi
	callq	_free
	movl	(%r13), %edi
	testl	%edi, %edi
	jle	LBB0_12
## %bb.11:
	callq	_close
	movl	$0, (%r13)
LBB0_12:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rax, %r12
	jmp	LBB0_10
LBB0_9:
	movq	_LDNS_STATUS_NETWORK_ERR@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_STATUS_MEM_ERR,8,3        ## @LDNS_STATUS_MEM_ERR
	.comm	_LDNS_STATUS_ADDRESS_ERR,8,3    ## @LDNS_STATUS_ADDRESS_ERR
	.comm	_LDNS_MAX_PACKETLEN,4,2         ## @LDNS_MAX_PACKETLEN
	.comm	_LDNS_STATUS_OK,8,3             ## @LDNS_STATUS_OK
	.comm	_LDNS_STATUS_NETWORK_ERR,8,3    ## @LDNS_STATUS_NETWORK_ERR
	.no_dead_strip	_ldns_tcp_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ldns_tcp_start
_ldns_tcp_start:                        ; @ldns_tcp_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	x8, [x0, #8]
	ldr	w20, [x8, w2, sxtw #2]
	bl	_ldns_resolver_port
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x20
	bl	_ldns_rdf2native_sockaddr_storage
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w21, [sp, #8]
	mov	x0, x19
	bl	_ldns_resolver_timeout
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_ldns_tcp_connect
	str	w0, [x19]
	cmp	w0, #0
	b.le	LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, _LDNS_MAX_PACKETLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_MAX_PACKETLEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ldns_buffer_new
	mov	x21, x0
	cbz	x0, LBB0_7
; %bb.3:
	mov	x0, x21
	mov	x1, x22
	bl	_ldns_pkt2buffer_wire
Lloh3:
	adrp	x23, _LDNS_STATUS_OK@GOTPAGE
Lloh4:
	ldr	x23, [x23, _LDNS_STATUS_OK@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.4:
	ldr	w1, [x19]
	ldr	w3, [sp, #8]
	mov	x0, x21
	mov	x2, x20
	bl	_ldns_tcp_send_query
	cbz	x0, LBB0_14
; %bb.5:
	mov	x0, x21
	bl	_ldns_buffer_free
	mov	x0, x20
	bl	_free
	ldr	x22, [x23]
	b	LBB0_12
LBB0_6:
	mov	x21, #0
LBB0_7:
Lloh5:
	adrp	x8, _LDNS_STATUS_MEM_ERR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LDNS_STATUS_MEM_ERR@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	mov	x21, #0
Lloh7:
	adrp	x8, _LDNS_STATUS_ADDRESS_ERR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LDNS_STATUS_ADDRESS_ERR@GOTPAGEOFF]
LBB0_9:
	ldr	x22, [x8]
LBB0_10:
	mov	x0, x21
	bl	_ldns_buffer_free
	mov	x0, x20
	bl	_free
	ldr	w0, [x19]
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.11:
	bl	_close
	str	wzr, [x19]
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
	mov	x22, x0
	b	LBB0_10
LBB0_14:
Lloh9:
	adrp	x8, _LDNS_STATUS_NETWORK_ERR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LDNS_STATUS_NETWORK_ERR@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_STATUS_MEM_ERR,8,3        ; @LDNS_STATUS_MEM_ERR
	.comm	_LDNS_STATUS_ADDRESS_ERR,8,3    ; @LDNS_STATUS_ADDRESS_ERR
	.comm	_LDNS_MAX_PACKETLEN,4,2         ; @LDNS_MAX_PACKETLEN
	.comm	_LDNS_STATUS_OK,8,3             ; @LDNS_STATUS_OK
	.comm	_LDNS_STATUS_NETWORK_ERR,8,3    ; @LDNS_STATUS_NETWORK_ERR
	.no_dead_strip	_ldns_tcp_start
.subsections_via_symbols
