	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvb_dmxdev_set_buffer_size
_dvb_dmxdev_set_buffer_size:            ## @dvb_dmxdev_set_buffer_size
	.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
	xorl	%r14d, %r14d
	cmpq	%rsi, 16(%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.4:
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	_DMXDEV_STATE_GO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	leaq	16(%r15), %r13
	movq	8(%r15), %rdi
	movq	24(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irq
	movq	%r12, 24(%r15)
	movq	%rbx, 16(%r15)
	movq	%r13, %rdi
	callq	_dvb_ringbuffer_reset
	movq	8(%r15), %rdi
	callq	_spin_unlock_irq
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vfree
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMXDEV_STATE_GO,8,3            ## @DMXDEV_STATE_GO
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_dvb_dmxdev_set_buffer_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvb_dmxdev_set_buffer_size
_dvb_dmxdev_set_buffer_size:            ; @dvb_dmxdev_set_buffer_size
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldr	x8, [x21, #16]!
	cmp	x8, x1
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_10
LBB0_2:
	mov	x20, x1
	cbz	x1, LBB0_6
; %bb.3:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _DMXDEV_STATE_GO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMXDEV_STATE_GO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_vmalloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	ldr	x23, [x19, #24]
	ldr	x0, [x19, #8]
	bl	_spin_lock_irq
	stp	x20, x22, [x19, #16]
	mov	x0, x21
	bl	_dvb_ringbuffer_reset
	ldr	x0, [x19, #8]
	bl	_spin_unlock_irq
	mov	x0, x23
	bl	_vfree
	b	LBB0_1
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMXDEV_STATE_GO,8,3            ; @DMXDEV_STATE_GO
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_dvb_dmxdev_set_buffer_size
.subsections_via_symbols
