	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_udp
_test_udp:                              ## @test_udp
	.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
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	callq	_fcntl
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_bzero
	movl	$32, -80(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	_UDP_PORT@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_htons
	movq	%rax, -64(%rbp)
	movq	_TEST_MADDR@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_inet_addr
	movq	%rax, -72(%rbp)
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_6:
	movq	(%r13), %rdi
	callq	_inet_addr
	movq	%rax, %r14
	leaq	L_.str.3(%rip), %rbx
	movq	%rbx, %rdi
	callq	_inet_addr
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_inet_addr
	movq	%rax, -88(%rbp)
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IP_MULTICAST_IF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-88(%rbp), %rcx
	movl	%r12d, %edi
	movl	$8, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_8:
	leaq	L_.str.5(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_test_add_multi
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_bzero
	movl	$32, -80(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	_UDP_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movq	%rax, -64(%rbp)
	movq	(%r13), %rdi
	callq	_inet_addr
	movq	%rax, -72(%rbp)
	movb	$65, -41(%rbp)
	leaq	-41(%rbp), %rsi
	movl	%r12d, %edi
	movl	$1, %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movl	$32, %r9d
	callq	_sendto
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	cmpl	$1, %ebx
	jne	LBB0_11
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.6(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_11:
	leaq	L_.str.7(%rip), %rsi
	movl	$-1, %edi
	movl	$1, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_errx
LBB0_12:
	movb	$66, -41(%rbp)
	movl	$32, -48(%rbp)
	leaq	-41(%rbp), %rsi
	leaq	-80(%rbp), %r8
	leaq	-48(%rbp), %r9
	movl	%r12d, %edi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_recvfrom
	movl	%eax, -48(%rbp)
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	cmpl	$1, %eax
	je	LBB0_16
LBB0_15:
	movsbl	%al, %edx
	leaq	L_.str.9(%rip), %rsi
	movl	$1, %ecx
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_16:
	movb	-41(%rbp), %al
	cmpb	$65, %al
	je	LBB0_18
## %bb.17:
	movsbl	%al, %edx
	leaq	L_.str.10(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_18:
	leaq	L_.str.5(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_test_drop_multi
	movl	%r12d, %edi
	callq	_close
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str.8(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
	movl	-48(%rbp), %eax
	cmpl	$1, %eax
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FAIL: test_udp: socket(PF_INET, SOCK_DGRAM)"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.1:                               ## @.str.1
	.asciz	"FAIL: test_udp: fcntl(F_SETFL, O_NONBLOCK)"

	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_UDP_PORT,4,2                   ## @UDP_PORT
	.comm	_TEST_MADDR,8,3                 ## @TEST_MADDR
L_.str.2:                               ## @.str.2
	.asciz	"FAIL: test_udp: bind(udp_sock, 127.0.0.1:%d"

L_.str.3:                               ## @.str.3
	.asciz	"127.0.0.1"

	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_MULTICAST_IF,4,2            ## @IP_MULTICAST_IF
L_.str.4:                               ## @.str.4
	.asciz	"test_udp: setsockopt(IPPROTO_IP, IP_MULTICAST_IF)"

L_.str.5:                               ## @.str.5
	.asciz	"udp_sock"

L_.str.6:                               ## @.str.6
	.asciz	"test_udp: sendto"

L_.str.7:                               ## @.str.7
	.asciz	"test_udp: sendto: expected to send %d, instead %d"

L_.str.8:                               ## @.str.8
	.asciz	"test_udp: recvfrom"

L_.str.9:                               ## @.str.9
	.asciz	"test_udp: recvfrom: len %d != message len %d"

L_.str.10:                              ## @.str.10
	.asciz	"test_udp: recvfrom: expected 'A', got '%c'"

	.no_dead_strip	_test_udp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_udp
_test_udp:                              ; @test_udp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
Lloh0:
	adrp	x8, _PF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_2:
Lloh8:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_fcntl
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_4:
	mov	w20, #32
	add	x0, sp, #32
	mov	w1, #32
	bl	_bzero
Lloh16:
	adrp	x23, _AF_INET@GOTPAGE
Lloh17:
	ldr	x23, [x23, _AF_INET@GOTPAGEOFF]
	str	w20, [sp, #32]
	ldr	x8, [x23]
	str	x8, [sp, #56]
Lloh18:
	adrp	x24, _UDP_PORT@GOTPAGE
Lloh19:
	ldr	x24, [x24, _UDP_PORT@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_htons
	str	x0, [sp, #48]
Lloh20:
	adrp	x25, _TEST_MADDR@GOTPAGE
Lloh21:
	ldr	x25, [x25, _TEST_MADDR@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_inet_addr
	str	x0, [sp, #40]
	add	x1, sp, #32
	mov	x0, x19
	mov	w2, #32
	bl	_bind
	tbz	x0, #63, LBB0_6
; %bb.5:
	ldr	w8, [x24]
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_6:
	ldr	x0, [x25]
	bl	_inet_addr
	mov	x20, x0
Lloh24:
	adrp	x22, l_.str.3@PAGE
Lloh25:
	add	x22, x22, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_inet_addr
	mov	x21, x0
	mov	x0, x22
	bl	_inet_addr
	str	x0, [sp, #24]
Lloh26:
	adrp	x8, _IPPROTO_IP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IPPROTO_IP@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _IP_MULTICAST_IF@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IP_MULTICAST_IF@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	add	x3, sp, #24
	mov	x0, x19
	mov	w4, #8
	bl	_setsockopt
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_8:
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	mov	w4, #0
	bl	_test_add_multi
	mov	w22, #32
	add	x0, sp, #32
	mov	w1, #32
	bl	_bzero
	str	w22, [sp, #32]
	ldr	x8, [x23]
	str	x8, [sp, #56]
	ldr	w0, [x24]
	bl	_htons
	str	x0, [sp, #48]
	ldr	x0, [x25]
	bl	_inet_addr
	str	x0, [sp, #40]
	mov	w8, #65
	strb	w8, [sp, #23]
	add	x1, sp, #23
	add	x4, sp, #32
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	mov	w5, #32
	bl	_sendto
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
; %bb.9:
	cmp	w22, #1
	b.ne	LBB0_11
	b	LBB0_12
LBB0_10:
Lloh36:
	adrp	x1, l_.str.6@PAGE
Lloh37:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_11:
	str	x22, [sp]
Lloh38:
	adrp	x1, l_.str.7@PAGE
Lloh39:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #-1
	mov	w2, #1
	bl	_errx
LBB0_12:
	mov	w8, #66
	strb	w8, [sp, #23]
	mov	w8, #32
	str	w8, [sp, #16]
	add	x1, sp, #23
	add	x4, sp, #32
	add	x5, sp, #16
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	bl	_recvfrom
	str	w0, [sp, #16]
	tbnz	w0, #31, LBB0_18
; %bb.13:
	cmp	w0, #1
	b.eq	LBB0_15
LBB0_14:
	mov	w8, #1
	str	x8, [sp]
	sxtb	w2, w0
Lloh40:
	adrp	x1, l_.str.9@PAGE
Lloh41:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_15:
	ldrb	w8, [sp, #23]
	cmp	w8, #65
	b.eq	LBB0_17
; %bb.16:
	sxtb	w2, w8
Lloh42:
	adrp	x1, l_.str.10@PAGE
Lloh43:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_17:
Lloh44:
	adrp	x1, l_.str.5@PAGE
Lloh45:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	mov	w4, #0
	bl	_test_drop_multi
	mov	x0, x19
	bl	_close
	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
	add	sp, sp, #144
	ret
LBB0_18:
Lloh46:
	adrp	x1, l_.str.8@PAGE
Lloh47:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #-1
	bl	_err
	ldr	w0, [sp, #16]
	cmp	w0, #1
	b.ne	LBB0_14
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FAIL: test_udp: socket(PF_INET, SOCK_DGRAM)"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.1:                               ; @.str.1
	.asciz	"FAIL: test_udp: fcntl(F_SETFL, O_NONBLOCK)"

	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_UDP_PORT,4,2                   ; @UDP_PORT
	.comm	_TEST_MADDR,8,3                 ; @TEST_MADDR
l_.str.2:                               ; @.str.2
	.asciz	"FAIL: test_udp: bind(udp_sock, 127.0.0.1:%d"

l_.str.3:                               ; @.str.3
	.asciz	"127.0.0.1"

	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_MULTICAST_IF,4,2            ; @IP_MULTICAST_IF
l_.str.4:                               ; @.str.4
	.asciz	"test_udp: setsockopt(IPPROTO_IP, IP_MULTICAST_IF)"

l_.str.5:                               ; @.str.5
	.asciz	"udp_sock"

l_.str.6:                               ; @.str.6
	.asciz	"test_udp: sendto"

l_.str.7:                               ; @.str.7
	.asciz	"test_udp: sendto: expected to send %d, instead %d"

l_.str.8:                               ; @.str.8
	.asciz	"test_udp: recvfrom"

l_.str.9:                               ; @.str.9
	.asciz	"test_udp: recvfrom: len %d != message len %d"

l_.str.10:                              ; @.str.10
	.asciz	"test_udp: recvfrom: expected 'A', got '%c'"

	.no_dead_strip	_test_udp
.subsections_via_symbols
