	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_to_saa6588
	addl	$-128, %ebx
	cmpl	$3, %ebx
	ja	LBB0_3
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_read_from_buf
	jmp	LBB0_9
LBB0_3:
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_10
LBB0_4:
	movl	$0, (%r14)
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	movq	_POLLRDNORM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, (%r14)
LBB0_6:
	movl	4(%r14), %edx
	movl	8(%r14), %edi
	addq	$4, %rax
	movq	%rax, %rsi
	callq	_poll_wait
	jmp	LBB0_9
LBB0_7:
	movl	$1, (%rax)
	addq	$4, %rax
	movq	%rax, %rdi
	callq	_wake_up_interruptible
LBB0_8:
	movl	$0, (%r14)
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_8
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.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	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	bl	_to_saa6588
	sub	w8, w20, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x1, x19
	bl	_read_from_buf
	mov	x0, #0
	b	LBB0_9
LBB0_3:
Lloh2:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_9
LBB0_4:
	str	wzr, [x19]
	ldr	w8, [x0]
	cbz	w8, LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _POLLIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	add	x1, x0, #4
	ldp	w2, w0, [x19, #4]
	bl	_poll_wait
	mov	x0, #0
	b	LBB0_9
LBB0_7:
	mov	w8, #1
	str	w8, [x0], #4
	bl	_wake_up_interruptible
LBB0_8:
	mov	x0, #0
	str	wzr, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.comm	_ENOIOCTLCMD,8,3                ; @ENOIOCTLCMD
	.no_dead_strip	_saa6588_ioctl
.subsections_via_symbols
