	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa6588_ioctl
_saa6588_ioctl:                         ## @saa6588_ioctl
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_to_saa6588
	movq	%rax, %r15
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$130, %ebx
	jne	LBB0_8
## %bb.3:
	movl	$1, (%r15)
	movq	%r15, %rdi
	addq	$4, %rdi
	callq	_wake_up_interruptible
	movl	$0, (%r15)
	movl	$0, 12(%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_read_from_buf
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	movl	$0, (%r14)
	cmpl	$0, (%r15)
	je	LBB0_7
## %bb.6:
	movq	_EPOLLIN@GOTPCREL(%rip), %rax
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
LBB0_7:
	movl	4(%r14), %edx
	movl	8(%r14), %edi
	addq	$4, %r15
	movq	%r15, %rsi
	callq	_poll_wait
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
	.comm	_ENOIOCTLCMD,8,3                ## @ENOIOCTLCMD
	.no_dead_strip	_saa6588_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa6588_ioctl
_saa6588_ioctl:                         ; @saa6588_ioctl
	.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	x19, x2
	mov	x21, x1
	bl	_to_saa6588
	mov	x20, x0
	cmp	w21, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #130
	b.ne	LBB0_8
; %bb.3:
	mov	w8, #1
	str	w8, [x20]
	add	x0, x20, #4
	bl	_wake_up_interruptible
	mov	x0, #0
	str	wzr, [x20]
	str	wzr, [x19, #12]
	b	LBB0_9
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_read_from_buf
	mov	x0, #0
	b	LBB0_9
LBB0_5:
	str	wzr, [x19]
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.6:
Lloh0:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EPOLLRDNORM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EPOLLRDNORM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_7:
	add	x1, x20, #4
	ldp	w2, w0, [x19, #4]
	bl	_poll_wait
	mov	x0, #0
	b	LBB0_9
LBB0_8:
Lloh6:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_9:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_ENOIOCTLCMD,8,3                ; @ENOIOCTLCMD
	.no_dead_strip	_saa6588_ioctl
.subsections_via_symbols
