	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_camera_subwin
_get_camera_subwin:                     ## @get_camera_subwin
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %r13
	movl	(%r13), %edi
	testl	%edi, %edi
	jne	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_soc_camera_to_subdev
	movq	(%rbx), %rbx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -56(%rbp)
	movq	_video@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_g_fmt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-56(%rbp), %rcx
	movq	%rax, %rdi
	callq	_v4l2_subdev_call
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%ebx, %ebx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_dev_geo
	movl	-52(%rbp), %edx
	cmpl	$2561, %edx                     ## imm = 0xA01
	jl	LBB0_4
## %bb.3:
	movl	$2560, (%r13)                   ## imm = 0xA00
	addl	$-2560, %edx                    ## imm = 0xF600
	movl	%edx, %ebx
	shrl	%ebx
	movl	$2560, %edx                     ## imm = 0xA00
	jmp	LBB0_5
LBB0_4:
	movl	%edx, (%r13)
LBB0_5:
	movl	%ebx, 4(%r13)
	movl	-48(%rbp), %eax
	leal	-1920(%rax), %r9d
	shrl	%r9d
	xorl	%esi, %esi
	cmpl	$1920, %eax                     ## imm = 0x780
	movl	$1920, %ecx                     ## imm = 0x780
	cmovll	%eax, %ecx
	cmovlel	%esi, %r9d
	movl	%ecx, 8(%r13)
	movl	%r9d, 12(%r13)
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_dev_geo
	movl	(%r13), %edi
LBB0_6:
	movl	%r15d, %esi
	callq	_scale_up
	movl	%eax, (%r12)
	movl	4(%r13), %edi
	movl	%r15d, %esi
	callq	_scale_up
	movl	%eax, 4(%r12)
	movl	8(%r13), %edi
	movl	%r14d, %esi
	callq	_scale_up
	movl	%eax, 8(%r12)
	movl	12(%r13), %edi
	movl	%r14d, %esi
	callq	_scale_up
	movl	%eax, 12(%r12)
	xorl	%eax, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_video,4,2                      ## @video
	.comm	_g_fmt,4,2                      ## @g_fmt
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"camera fmt %ux%u\n"

L_.str.1:                               ## @.str.1
	.asciz	"initialised CEU rect %ux%u@%u:%u\n"

	.no_dead_strip	_get_camera_subwin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_camera_subwin
_get_camera_subwin:                     ; @get_camera_subwin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	ldr	x23, [x0, #8]
	ldr	w0, [x23]
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x22
	bl	_soc_camera_to_subdev
	ldr	x22, [x22]
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh3:
	adrp	x8, _video@GOTPAGE
Lloh4:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _g_fmt@GOTPAGE
Lloh7:
	ldr	x8, [x8, _g_fmt@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #16
	bl	_v4l2_subdev_call
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldp	w2, w3, [sp, #20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_geo
	ldr	w9, [sp, #20]
	cmp	w9, #2561
	b.lt	LBB0_4
; %bb.3:
	mov	w2, #2560
	str	w2, [x23]
	sub	w8, w9, #2560
	lsr	w8, w8, #1
	b	LBB0_5
LBB0_4:
	mov	w8, #0
	str	w9, [x23]
	mov	x2, x9
LBB0_5:
	str	w8, [x23, #4]
	ldr	w9, [sp, #24]
	subs	w10, w9, #1920
	lsr	w10, w10, #1
	mov	w11, #1920
	csel	w3, w9, w11, lt
	csel	w9, w10, wzr, gt
	stp	w3, w9, [x23, #8]
	stp	x8, x9, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_geo
	ldr	w0, [x23]
LBB0_6:
	mov	x1, x21
	bl	_scale_up
	str	w0, [x19]
	ldr	w0, [x23, #4]
	mov	x1, x21
	bl	_scale_up
	str	w0, [x19, #4]
	ldr	w0, [x23, #8]
	mov	x1, x20
	bl	_scale_up
	str	w0, [x19, #8]
	ldr	w0, [x23, #12]
	mov	x1, x20
	bl	_scale_up
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #12]
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_video,4,2                      ; @video
	.comm	_g_fmt,4,2                      ; @g_fmt
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"camera fmt %ux%u\n"

l_.str.1:                               ; @.str.1
	.asciz	"initialised CEU rect %ux%u@%u:%u\n"

	.no_dead_strip	_get_camera_subwin
.subsections_via_symbols
