	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function media_request_ioctl_reinit
_media_request_ioctl_reinit:            ## @media_request_ioctl_reinit
	.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
	movq	%rdi, %rbx
	movq	24(%rdi), %r12
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	movq	_MEDIA_REQUEST_STATE_IDLE@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_4
## %bb.1:
	movq	_MEDIA_REQUEST_STATE_COMPLETE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movl	(%r12), %edi
	movl	12(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	cmpq	$0, 16(%rbx)
	je	LBB0_6
## %bb.5:
	movl	(%r12), %edi
	movl	12(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_MEDIA_REQUEST_STATE_CLEANING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_media_request_clean
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_REQUEST_STATE_IDLE,8,3   ## @MEDIA_REQUEST_STATE_IDLE
	.comm	_MEDIA_REQUEST_STATE_COMPLETE,8,3 ## @MEDIA_REQUEST_STATE_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"request: %s not in idle or complete state, cannot reinit\n"

	.comm	_EBUSY,8,3                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"request: %s is being accessed, cannot reinit\n"

	.comm	_MEDIA_REQUEST_STATE_CLEANING,8,3 ## @MEDIA_REQUEST_STATE_CLEANING
	.no_dead_strip	_media_request_ioctl_reinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function media_request_ioctl_reinit
_media_request_ioctl_reinit:            ; @media_request_ioctl_reinit
	.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
	mov	x20, x0
	ldr	x22, [x0, #24]
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
Lloh0:
	adrp	x21, _MEDIA_REQUEST_STATE_IDLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MEDIA_REQUEST_STATE_IDLE@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh2:
	adrp	x10, _MEDIA_REQUEST_STATE_COMPLETE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MEDIA_REQUEST_STATE_COMPLETE@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	w0, [x22]
	ldr	w2, [x20, #12]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	w0, [x22]
	ldr	w2, [x20, #12]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_dbg
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _MEDIA_REQUEST_STATE_CLEANING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MEDIA_REQUEST_STATE_CLEANING@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x20]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_media_request_clean
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x21]
	str	x8, [x20]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, #0
LBB0_6:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_REQUEST_STATE_IDLE,8,3   ; @MEDIA_REQUEST_STATE_IDLE
	.comm	_MEDIA_REQUEST_STATE_COMPLETE,8,3 ; @MEDIA_REQUEST_STATE_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"request: %s not in idle or complete state, cannot reinit\n"

	.comm	_EBUSY,8,3                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"request: %s is being accessed, cannot reinit\n"

	.comm	_MEDIA_REQUEST_STATE_CLEANING,8,3 ; @MEDIA_REQUEST_STATE_CLEANING
	.no_dead_strip	_media_request_ioctl_reinit
.subsections_via_symbols
