	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_media_request_get_by_fd        ## -- Begin function media_request_get_by_fd
	.p2align	4, 0x90
_media_request_get_by_fd:               ## @media_request_get_by_fd
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpl	$0, 4(%rax)
	je	LBB0_4
## %bb.3:
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.6:
	movl	%esi, %r14d
	movl	%esi, %edi
	callq	_fdget
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %r15
	movq	8(%rax), %rax
	cmpq	_request_fops@GOTPCREL(%rip), %rax
	jne	LBB0_9
## %bb.8:
	movq	(%r15), %r12
	cmpq	%rbx, (%r12)
	je	LBB0_11
LBB0_9:
	movq	%r15, %rdi
	callq	_fdput
LBB0_10:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EBADR@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_11:
	movq	%r12, %rdi
	callq	_media_request_get
	movq	%r15, %rdi
	callq	_fdput
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADR,4,2                      ## @EBADR
	.comm	_request_fops,4,2               ## @request_fops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot find request_fd %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_media_request_get_by_fd        ; -- Begin function media_request_get_by_fd
	.p2align	2
_media_request_get_by_fd:               ; @media_request_get_by_fd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_9
; %bb.2:
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_9
; %bb.3:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.4:
	mov	x19, x1
	mov	x0, x1
	bl	_fdget
	cbz	x0, LBB0_8
; %bb.5:
	mov	x21, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _request_fops@GOTPAGE
Lloh1:
	ldr	x9, [x9, _request_fops@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x22, [x21]
	ldr	x8, [x22]
	cmp	x8, x20
	b.eq	LBB0_11
LBB0_7:
	mov	x0, x21
	bl	_fdput
LBB0_8:
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _EBADR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBADR@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_11:
	mov	x0, x22
	bl	_media_request_get
	mov	x0, x21
	bl	_fdput
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADR,4,2                      ; @EBADR
	.comm	_request_fops,4,2               ; @request_fops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot find request_fd %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
