	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_umad_recv                      ## -- Begin function umad_recv
	.p2align	4, 0x90
_umad_recv:                             ## @umad_recv
	.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, %ebx
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, %r12d
	movq	_errno@GOTPCREL(%rip), %r13
	movl	$0, (%r13)
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_TRACE
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	testq	%r14, %r14
	je	LBB0_2
## %bb.3:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.4:
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_dev_poll
	testl	%eax, %eax
	js	LBB0_5
LBB0_7:
	xorl	%eax, %eax
	callq	_umad_size
	addl	(%r14), %eax
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_read
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_umad_size
	addl	(%r14), %eax
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_VALGRIND_MAKE_MEM_DEFINED
	testl	%ebx, %ebx
	js	LBB0_12
## %bb.8:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_umad_size
	addl	(%r14), %eax
	cmpl	%eax, %ebx
	jle	LBB0_9
LBB0_12:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %ecx
	addl	%eax, %ecx
	jne	LBB0_15
## %bb.13:
	cmpl	$0, (%r13)
	jne	LBB0_19
## %bb.14:
	movl	%eax, (%r13)
	jmp	LBB0_19
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %ebx
	movl	%ebx, (%r13)
LBB0_18:
	negl	%ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	4(%r15), %ebx
	xorl	%eax, %eax
	callq	_umad_size
	subl	%eax, %ebx
	xorl	%eax, %eax
	callq	_umad_size
	movl	(%r14), %ecx
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DEBUG
	movl	4(%r15), %ebx
	xorl	%eax, %eax
	callq	_umad_size
	subl	%eax, %ebx
	movl	%ebx, (%r14)
	movl	(%r13), %ebx
	testl	%ebx, %ebx
	jne	LBB0_18
## %bb.16:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_5:
	movl	%eax, %ebx
	cmpl	$0, (%r13)
	jne	LBB0_19
## %bb.6:
	movl	%ebx, %eax
	negl	%eax
	movl	%eax, (%r13)
	jmp	LBB0_19
LBB0_9:
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DEBUG
	xorl	%eax, %eax
	callq	_umad_size
	cmpl	%eax, %ebx
	jle	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_umad_size
	subl	%eax, %ebx
	movl	%ebx, %r12d
LBB0_11:
	movl	%r12d, (%r14)
	movl	(%r15), %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fd %d umad %p timeout %u"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"mad received by agent %d length %d"

	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
L_.str.2:                               ## @.str.2
	.asciz	"read returned %zu > sizeof umad %zu + length %d (%m)"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_umad_recv                      ; -- Begin function umad_recv
	.p2align	2
_umad_recv:                             ; @umad_recv
	.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	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _errno@GOTPAGE
Lloh1:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	str	wzr, [x23]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x20
	bl	_TRACE
	cbz	x20, LBB0_9
; %bb.1:
	cbz	x19, LBB0_9
; %bb.2:
	cbz	w21, LBB0_4
; %bb.3:
	mov	x0, x22
	mov	x1, x21
	bl	_dev_poll
	tbnz	w0, #31, LBB0_15
LBB0_4:
	bl	_umad_size
	ldr	w8, [x19]
	add	w2, w8, w0
	mov	x0, x22
	mov	x1, x20
	bl	_read
	mov	x21, x0
	bl	_umad_size
	ldr	w8, [x19]
	add	w1, w8, w0
	mov	x0, x20
	bl	_VALGRIND_MAKE_MEM_DEFINED
	tbnz	w21, #31, LBB0_6
; %bb.5:
	bl	_umad_size
	ldr	w8, [x19]
	add	w8, w8, w0
	cmp	w21, w8
	b.le	LBB0_17
LBB0_6:
Lloh4:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmn	w21, w8
	b.ne	LBB0_13
; %bb.7:
	ldr	w9, [x23]
	cbnz	w9, LBB0_12
; %bb.8:
	str	w8, [x23]
	b	LBB0_12
LBB0_9:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	str	w8, [x23]
LBB0_11:
	neg	w21, w8
LBB0_12:
	mov	x0, x21
	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:
	ldr	w21, [x20, #4]
	bl	_umad_size
	sub	w21, w21, w0
	bl	_umad_size
	mov	x2, x0
	ldr	w8, [x19]
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_DEBUG
	ldr	w20, [x20, #4]
	bl	_umad_size
	sub	w8, w20, w0
	str	w8, [x19]
	ldr	w8, [x23]
	cbnz	w8, LBB0_11
; %bb.14:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_15:
	mov	x21, x0
	ldr	w8, [x23]
	cbnz	w8, LBB0_12
; %bb.16:
	neg	w8, w21
	str	w8, [x23]
	b	LBB0_12
LBB0_17:
	ldr	w1, [x20]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_DEBUG
	bl	_umad_size
	cmp	w21, w0
	b.le	LBB0_19
; %bb.18:
	bl	_umad_size
	sub	w8, w21, w0
	b	LBB0_20
LBB0_19:
	mov	w8, #0
LBB0_20:
	str	w8, [x19]
	ldr	w21, [x20]
	b	LBB0_12
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fd %d umad %p timeout %u"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"mad received by agent %d length %d"

	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
l_.str.2:                               ; @.str.2
	.asciz	"read returned %zu > sizeof umad %zu + length %d (%m)"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
