	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_tcp_send_query            ## -- Begin function ldns_tcp_send_query
	.p2align	4, 0x90
_ldns_tcp_send_query:                   ## @ldns_tcp_send_query
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	_uint8_t@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_ldns_buffer_position
                                        ## kill: def $eax killed $eax def $rax
	leal	2(%rax), %esi
	movl	%ebx, %edi
	callq	_LDNS_XMALLOC
	movq	_sendbuf@GOTPCREL(%rip), %r15
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_ldns_buffer_position
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ldns_write_uint16
	movl	(%r15), %ebx
	addl	$2, %ebx
	movq	%r13, %rdi
	callq	_ldns_buffer_begin
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_ldns_buffer_position
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_memcpy
	movslq	(%r15), %r14
	movq	%r13, %rdi
	callq	_ldns_buffer_position
                                        ## kill: def $eax killed $eax def $rax
	leal	2(%rax), %edx
	xorl	%ebx, %ebx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	movq	%r12, %r8
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_sendto
	movl	%eax, %r14d
	movl	(%r15), %edi
	callq	_LDNS_FREE
	cmpl	$-1, %r14d
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_ldns_buffer_position
	addl	$2, %eax
	xorl	%ebx, %ebx
	cmpl	%eax, %r14d
	cmovel	%r14d, %ebx
	jmp	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_uint8_t,4,2                    ## @uint8_t
	.comm	_sendbuf,4,2                    ## @sendbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_tcp_send_query            ; -- Begin function ldns_tcp_send_query
	.p2align	2
_ldns_tcp_send_query:                   ; @ldns_tcp_send_query
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _uint8_t@GOTPAGE
Lloh1:
	ldr	x8, [x8, _uint8_t@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	bl	_ldns_buffer_position
	add	w1, w0, #2
	mov	x0, x23
	bl	_LDNS_XMALLOC
Lloh3:
	adrp	x25, _sendbuf@GOTPAGE
Lloh4:
	ldr	x25, [x25, _sendbuf@GOTPAGEOFF]
	str	w0, [x25]
	cbz	w0, LBB0_4
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	bl	_ldns_buffer_position
	mov	x1, x0
	mov	x0, x23
	bl	_ldns_write_uint16
	ldr	w8, [x25]
	add	w23, w8, #2
	mov	x0, x19
	bl	_ldns_buffer_begin
	mov	x24, x0
	mov	x0, x19
	bl	_ldns_buffer_position
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_memcpy
	ldrsw	x23, [x25]
	mov	x0, x19
	bl	_ldns_buffer_position
	add	w2, w0, #2
	mov	x0, x22
	mov	x1, x23
	mov	w3, #0
	mov	x4, x21
	mov	x5, x20
	bl	_sendto
	mov	x20, x0
	ldr	w0, [x25]
	bl	_LDNS_FREE
	cmn	w20, #1
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ldns_buffer_position
	add	w8, w0, #2
	cmp	w20, w8
	csel	w0, w20, wzr, eq
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_uint8_t,4,2                    ; @uint8_t
	.comm	_sendbuf,4,2                    ; @sendbuf
.subsections_via_symbols
