	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_set_window_size
_ioctl_set_window_size:                 ## @ioctl_set_window_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdi)
	jne	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	cmpq	$0, 24(%rdi)
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %r14
	leaq	60(%rsi), %rdi
	movq	_V4L2_PRIORITY_RECORD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rdx, %rsi
	movl	%eax, %edx
	callq	_v4l2_prio_change
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	_V4L2_PIX_FMT_JPEG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	movq	$0, 32(%r14)
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	cmpq	40(%r14), %rax
	jne	LBB0_6
## %bb.5:
	cmpq	48(%r14), %rcx
	je	LBB0_7
LBB0_6:
	movq	%rax, 40(%r14)
	movq	%rcx, 48(%r14)
	movq	%rax, 16(%r14)
	movq	%rcx, 24(%r14)
	movq	%r14, %rdi
	callq	_cpia2_set_format
LBB0_7:
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.9:
	movq	8(%r14), %rdx
	xorl	%ebx, %ebx
	movq	_FRAME_READING@GOTPCREL(%rip), %r15
	movq	_FRAME_EMPTY@GOTPCREL(%rip), %r12
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r14), %rdx
	movl	(%r14), %ecx
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12), %rax
	movq	%rax, (%rdx,%rbx,8)
	incq	%rbx
	movslq	%ecx, %rsi
	xorl	%eax, %eax
	cmpq	%rsi, %rbx
	jge	LBB0_14
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rbx,8), %rax
	cmpq	(%r15), %rax
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_sync
	testl	%eax, %eax
	jns	LBB0_12
	jmp	LBB0_14
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_PRIORITY_RECORD,4,2       ## @V4L2_PRIORITY_RECORD
	.comm	_V4L2_PIX_FMT_JPEG,4,2          ## @V4L2_PIX_FMT_JPEG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Requested width = %d, height = %d\n"

	.comm	_FRAME_READING,8,3              ## @FRAME_READING
	.comm	_FRAME_EMPTY,8,3                ## @FRAME_EMPTY
	.no_dead_strip	_ioctl_set_window_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_set_window_size
_ioctl_set_window_size:                 ; @ioctl_set_window_size
	.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
	ldr	x8, [x0]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
LBB0_4:
	mov	x19, x1
	add	x0, x1, #60
Lloh3:
	adrp	x8, _V4L2_PRIORITY_RECORD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_PRIORITY_RECORD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x1, x2
	mov	x2, x8
	bl	_v4l2_prio_change
	cbnz	w0, LBB0_3
; %bb.5:
Lloh6:
	adrp	x8, _V4L2_PIX_FMT_JPEG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_PIX_FMT_JPEG@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #56]
	str	xzr, [x19, #32]
	ldp	x1, x2, [x20, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldr	x10, [x19, #40]
	ldp	x9, x8, [x20, #8]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.6:
	ldr	x10, [x19, #48]
	cmp	x8, x10
	b.eq	LBB0_8
LBB0_7:
	stp	x9, x8, [x19, #40]
	stp	x9, x8, [x19, #16]
	mov	x0, x19
	bl	_cpia2_set_format
LBB0_8:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.9:
	mov	x20, #0
	ldr	x9, [x19, #8]
Lloh11:
	adrp	x21, _FRAME_READING@GOTPAGE
Lloh12:
	ldr	x21, [x21, _FRAME_READING@GOTPAGEOFF]
Lloh13:
	adrp	x22, _FRAME_EMPTY@GOTPAGE
Lloh14:
	ldr	x22, [x22, _FRAME_EMPTY@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x9, [x19, #8]
	ldr	w8, [x19]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #0
	ldr	x10, [x22]
	str	x10, [x9, x20, lsl #3]
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_3
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x20, lsl #3]
	ldr	x11, [x21]
	cmp	x10, x11
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_sync
	tbz	w0, #31, LBB0_10
	b	LBB0_3
LBB0_14:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_PRIORITY_RECORD,4,2       ; @V4L2_PRIORITY_RECORD
	.comm	_V4L2_PIX_FMT_JPEG,4,2          ; @V4L2_PIX_FMT_JPEG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Requested width = %d, height = %d\n"

	.comm	_FRAME_READING,8,3              ; @FRAME_READING
	.comm	_FRAME_EMPTY,8,3                ; @FRAME_EMPTY
	.no_dead_strip	_ioctl_set_window_size
.subsections_via_symbols
