	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_testloan                       ## -- Begin function testloan
	.p2align	4, 0x90
_testloan:                              ## @testloan
	.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	%ecx, %r14d
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BUFSIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memcpy
LBB0_2:
	movq	_AF_LOCAL@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	-56(%rbp), %rcx
	callq	_socketpair
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_atf_tc_fail
LBB0_4:
	movl	(%r13), %eax
	movl	%eax, -60(%rbp)
	movl	-52(%rbp), %edi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_SO_RCVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-60(%rbp), %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_atf_tc_fail
LBB0_6:
	movl	(%r13), %eax
	movl	%eax, -60(%rbp)
	movl	-56(%rbp), %edi
	movl	(%rbx), %esi
	movq	_SO_SNDBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-60(%rbp), %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_atf_tc_fail
LBB0_8:
	movl	-56(%rbp), %edi
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_fcntl
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	callq	_atf_tc_fail
LBB0_10:
	movl	-56(%rbp), %edi
	movq	_page@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	addq	%rax, %r15
	movl	(%r13), %edx
	subl	%eax, %edx
	movq	%r15, %rsi
	callq	_write
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	callq	_atf_tc_fail
LBB0_12:
	movl	(%r13), %edx
	movsbl	-64(%rbp), %esi                 ## 1-byte Folded Reload
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_memset
	movl	-52(%rbp), %edi
	movslq	(%r14), %rsi
	movl	(%r13), %edx
	subl	%esi, %edx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	addq	%r13, %rsi
	callq	_read
	movl	%eax, %ebx
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.14:
	cmpl	%r15d, %ebx
	jne	LBB0_15
LBB0_16:
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_17
	jmp	LBB0_19
LBB0_13:
	leaq	L_.str.5(%rip), %rdi
	callq	_atf_tc_fail
	cmpl	%r15d, %ebx
	je	LBB0_16
LBB0_15:
	leaq	L_.str.6(%rip), %rdi
	callq	_atf_tc_fail
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_19
LBB0_17:
	movslq	(%r14), %rax
	addq	%rax, %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.7(%rip), %rdi
	callq	_atf_tc_fail
LBB0_19:
	movl	-56(%rbp), %edi
	callq	_close
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_REQUIRE
	movl	-52(%rbp), %edi
	callq	_close
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_REQUIRE
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFSIZE,4,2                    ## @BUFSIZE
	.comm	_AF_LOCAL,4,2                   ## @AF_LOCAL
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_PF_UNSPEC,4,2                  ## @PF_UNSPEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socketpair() failed"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_RCVBUF,4,2                  ## @SO_RCVBUF
L_.str.1:                               ## @.str.1
	.asciz	"setsockopt() failed, SO_RCVBUF"

	.comm	_SO_SNDBUF,4,2                  ## @SO_SNDBUF
L_.str.2:                               ## @.str.2
	.asciz	"setsockopt() failed, SO_SNDBUF"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.3:                               ## @.str.3
	.asciz	"fcntl() failed"

	.comm	_page,4,2                       ## @page
L_.str.4:                               ## @.str.4
	.asciz	"write() failed"

L_.str.5:                               ## @.str.5
	.asciz	"read() failed"

L_.str.6:                               ## @.str.6
	.asciz	"too short read"

L_.str.7:                               ## @.str.7
	.asciz	"data mismatch"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_testloan                       ; -- Begin function testloan
	.p2align	2
_testloan:                              ; @testloan
	.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
	sub	sp, sp, #32
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _BUFSIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _BUFSIZE@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x9, x2
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x12, x9, #0x1fffffff0
	sub	x24, x8, x12
	mov	sp, x24
	mov	x9, x2
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x20, x8, x12
	mov	sp, x20
	cbz	w3, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x23
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
LBB0_2:
Lloh9:
	adrp	x8, _AF_LOCAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AF_LOCAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _PF_UNSPEC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PF_UNSPEC@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	sub	x3, x29, #80
	bl	_socketpair
	cbz	x0, LBB0_4
; %bb.3:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_atf_tc_fail
LBB0_4:
	ldr	w8, [x25]
	stur	w8, [x29, #-84]
	ldur	w0, [x29, #-76]
Lloh20:
	adrp	x26, _SOL_SOCKET@GOTPAGE
Lloh21:
	ldr	x26, [x26, _SOL_SOCKET@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh22:
	adrp	x8, _SO_RCVBUF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SO_RCVBUF@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	sub	x3, x29, #84
	mov	w4, #4
	bl	_setsockopt
	cbz	x0, LBB0_6
; %bb.5:
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_atf_tc_fail
LBB0_6:
	ldr	w8, [x25]
	stur	w8, [x29, #-84]
	ldur	w0, [x29, #-80]
	ldr	w1, [x26]
Lloh27:
	adrp	x8, _SO_SNDBUF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SO_SNDBUF@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	sub	x3, x29, #84
	mov	w4, #4
	bl	_setsockopt
	cbz	x0, LBB0_8
; %bb.7:
Lloh30:
	adrp	x0, l_.str.2@PAGE
Lloh31:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_atf_tc_fail
LBB0_8:
	ldur	w0, [x29, #-80]
Lloh32:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	bl	_fcntl
	cbz	x0, LBB0_10
; %bb.9:
Lloh38:
	adrp	x0, l_.str.3@PAGE
Lloh39:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_atf_tc_fail
LBB0_10:
	ldur	w0, [x29, #-80]
Lloh40:
	adrp	x26, _page@GOTPAGE
Lloh41:
	ldr	x26, [x26, _page@GOTPAGEOFF]
	ldrsw	x8, [x26]
	add	x1, x23, x8
	ldr	w9, [x25]
	sub	w2, w9, w8
	bl	_write
	mov	x23, x0
	cmn	w0, #1
	b.ne	LBB0_12
; %bb.11:
Lloh42:
	adrp	x0, l_.str.4@PAGE
Lloh43:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_atf_tc_fail
LBB0_12:
	ldr	w2, [x25]
	mov	x0, x22
	mov	x1, x21
	bl	_memset
	ldur	w0, [x29, #-76]
	ldrsw	x8, [x26]
	add	x1, x24, x8
	ldr	w9, [x25]
	sub	w2, w9, w8
	bl	_read
	mov	x21, x0
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.13:
	cmp	w21, w23
	b.ne	LBB0_16
LBB0_14:
	cbnz	w19, LBB0_17
	b	LBB0_19
LBB0_15:
Lloh44:
	adrp	x0, l_.str.5@PAGE
Lloh45:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_atf_tc_fail
	cmp	w21, w23
	b.eq	LBB0_14
LBB0_16:
Lloh46:
	adrp	x0, l_.str.6@PAGE
Lloh47:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_atf_tc_fail
	cbz	w19, LBB0_19
LBB0_17:
	ldrsw	x8, [x26]
	add	x1, x24, x8
	mov	x0, x20
	mov	x2, x21
	bl	_memcmp
	cbz	x0, LBB0_19
; %bb.18:
Lloh48:
	adrp	x0, l_.str.7@PAGE
Lloh49:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_atf_tc_fail
LBB0_19:
	ldur	w0, [x29, #-80]
	bl	_close
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	ldur	w0, [x29, #-76]
	bl	_close
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	ldur	x8, [x29, #-72]
Lloh50:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh51:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	sub	sp, x29, #64
	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
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFSIZE,4,2                    ; @BUFSIZE
	.comm	_AF_LOCAL,4,2                   ; @AF_LOCAL
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_PF_UNSPEC,4,2                  ; @PF_UNSPEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socketpair() failed"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_RCVBUF,4,2                  ; @SO_RCVBUF
l_.str.1:                               ; @.str.1
	.asciz	"setsockopt() failed, SO_RCVBUF"

	.comm	_SO_SNDBUF,4,2                  ; @SO_SNDBUF
l_.str.2:                               ; @.str.2
	.asciz	"setsockopt() failed, SO_SNDBUF"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.3:                               ; @.str.3
	.asciz	"fcntl() failed"

	.comm	_page,4,2                       ; @page
l_.str.4:                               ; @.str.4
	.asciz	"write() failed"

l_.str.5:                               ; @.str.5
	.asciz	"read() failed"

l_.str.6:                               ; @.str.6
	.asciz	"too short read"

l_.str.7:                               ; @.str.7
	.asciz	"data mismatch"

.subsections_via_symbols
