	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9t001_s_stream
_mt9t001_s_stream:                      ## @mt9t001_s_stream
	.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
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	_MT9T001_OUTPUT_CONTROL_CHIP_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_v4l2_get_subdevdata
	movq	%rax, %r12
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_to_mt9t001
	movq	%rax, %rbx
	testl	%r13d, %r13d
	je	LBB0_1
## %bb.3:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.4:
	movq	_MT9T001_PIXEL_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT9T001_PIXEL_CLOCK_INVERT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_mt9t001_write
	testl	%eax, %eax
	js	LBB0_12
LBB0_5:
	movl	(%rbx), %edi
	movl	20(%rbx), %esi
	callq	_DIV_ROUND_CLOSEST
	movq	%rbx, %rcx
	movl	%eax, %ebx
	movl	4(%rcx), %edi
	movq	%rcx, %r14
	movl	16(%rcx), %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %r13d
	movq	_MT9T001_ROW_ADDRESS_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	decl	%ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_mt9t001_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movq	_MT9T001_COLUMN_ADDRESS_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	decl	%r13d
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_mt9t001_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.7:
	movq	_MT9T001_COLUMN_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rbx
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_mt9t001_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.8:
	movq	_MT9T001_ROW_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %edx
	movq	%r12, %rdi
	callq	_mt9t001_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:
	movq	_MT9T001_WINDOW_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	decl	%edx
	movq	%r12, %rdi
	callq	_mt9t001_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.10:
	movq	_MT9T001_WINDOW_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	decl	%edx
	movq	%r12, %rdi
	callq	_mt9t001_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_2
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt9t001_set_output_control     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9T001_OUTPUT_CONTROL_CHIP_ENABLE,4,2 ## @MT9T001_OUTPUT_CONTROL_CHIP_ENABLE
	.comm	_MT9T001_PIXEL_CLOCK,4,2        ## @MT9T001_PIXEL_CLOCK
	.comm	_MT9T001_PIXEL_CLOCK_INVERT,4,2 ## @MT9T001_PIXEL_CLOCK_INVERT
	.comm	_MT9T001_ROW_ADDRESS_MODE,4,2   ## @MT9T001_ROW_ADDRESS_MODE
	.comm	_MT9T001_COLUMN_ADDRESS_MODE,4,2 ## @MT9T001_COLUMN_ADDRESS_MODE
	.comm	_MT9T001_COLUMN_START,4,2       ## @MT9T001_COLUMN_START
	.comm	_MT9T001_ROW_START,4,2          ## @MT9T001_ROW_START
	.comm	_MT9T001_WINDOW_WIDTH,4,2       ## @MT9T001_WINDOW_WIDTH
	.comm	_MT9T001_WINDOW_HEIGHT,4,2      ## @MT9T001_WINDOW_HEIGHT
	.no_dead_strip	_mt9t001_s_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9t001_s_stream
_mt9t001_s_stream:                      ; @mt9t001_s_stream
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MT9T001_OUTPUT_CONTROL_CHIP_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT9T001_OUTPUT_CONTROL_CHIP_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bl	_v4l2_get_subdevdata
	mov	x21, x0
	ldr	x23, [x0]
	mov	x0, x20
	bl	_to_mt9t001
	mov	x20, x0
	cbz	w22, LBB0_11
; %bb.1:
	ldr	x8, [x23]
	cbz	x8, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _MT9T001_PIXEL_CLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT9T001_PIXEL_CLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _MT9T001_PIXEL_CLOCK_INVERT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT9T001_PIXEL_CLOCK_INVERT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_mt9t001_write
	tbnz	w0, #31, LBB0_10
LBB0_3:
	ldr	w0, [x20]
	ldr	w1, [x20, #20]
	bl	_DIV_ROUND_CLOSEST
	mov	x23, x0
	ldr	w0, [x20, #4]
	ldr	w1, [x20, #16]
	bl	_DIV_ROUND_CLOSEST
	mov	x22, x0
Lloh9:
	adrp	x8, _MT9T001_ROW_ADDRESS_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT9T001_ROW_ADDRESS_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	sub	w2, w23, #1
	mov	x0, x21
	bl	_mt9t001_write
	tbnz	w0, #31, LBB0_10
; %bb.4:
Lloh12:
	adrp	x8, _MT9T001_COLUMN_ADDRESS_MODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT9T001_COLUMN_ADDRESS_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	sub	w2, w22, #1
	mov	x0, x21
	bl	_mt9t001_write
	tbnz	w0, #31, LBB0_10
; %bb.5:
Lloh15:
	adrp	x8, _MT9T001_COLUMN_START@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT9T001_COLUMN_START@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x21
	bl	_mt9t001_write
	tbnz	w0, #31, LBB0_10
; %bb.6:
Lloh18:
	adrp	x8, _MT9T001_ROW_START@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MT9T001_ROW_START@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
	mov	x0, x21
	bl	_mt9t001_write
	tbnz	w0, #31, LBB0_10
; %bb.7:
Lloh21:
	adrp	x8, _MT9T001_WINDOW_WIDTH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MT9T001_WINDOW_WIDTH@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w8, [x20]
	sub	w2, w8, #1
	mov	x0, x21
	bl	_mt9t001_write
	tbnz	w0, #31, LBB0_10
; %bb.8:
Lloh24:
	adrp	x8, _MT9T001_WINDOW_HEIGHT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MT9T001_WINDOW_HEIGHT@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	sub	w2, w8, #1
	mov	x0, x21
	bl	_mt9t001_write
	tbnz	w0, #31, LBB0_10
; %bb.9:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	b	LBB0_12
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
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
LBB0_12:
	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
	b	_mt9t001_set_output_control
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9T001_OUTPUT_CONTROL_CHIP_ENABLE,4,2 ; @MT9T001_OUTPUT_CONTROL_CHIP_ENABLE
	.comm	_MT9T001_PIXEL_CLOCK,4,2        ; @MT9T001_PIXEL_CLOCK
	.comm	_MT9T001_PIXEL_CLOCK_INVERT,4,2 ; @MT9T001_PIXEL_CLOCK_INVERT
	.comm	_MT9T001_ROW_ADDRESS_MODE,4,2   ; @MT9T001_ROW_ADDRESS_MODE
	.comm	_MT9T001_COLUMN_ADDRESS_MODE,4,2 ; @MT9T001_COLUMN_ADDRESS_MODE
	.comm	_MT9T001_COLUMN_START,4,2       ; @MT9T001_COLUMN_START
	.comm	_MT9T001_ROW_START,4,2          ; @MT9T001_ROW_START
	.comm	_MT9T001_WINDOW_WIDTH,4,2       ; @MT9T001_WINDOW_WIDTH
	.comm	_MT9T001_WINDOW_HEIGHT,4,2      ; @MT9T001_WINDOW_HEIGHT
	.no_dead_strip	_mt9t001_s_stream
.subsections_via_symbols
