	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_image_convert_adjust       ## -- Begin function ipu_image_convert_adjust
	.p2align	4, 0x90
_ipu_image_convert_adjust:              ## @ipu_image_convert_adjust
	.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	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_get_format
	movq	%rax, %r15
	movq	(%r13), %rdi
	callq	_get_format
	movq	%rax, %rbx
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_3
LBB0_4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movl	%eax, 24(%r14)
	movl	%r12d, %edi
	callq	_ipu_rot_mode_is_irt
	movq	___u32@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	testq	%rax, %rax
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.5:
	movl	8(%r13), %esi
	movl	12(%r14), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	callq	_max_t
	movl	%eax, 8(%r13)
	movl	(%rbx), %edi
	movl	12(%r13), %esi
	movl	8(%r14), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	callq	_max_t
	movl	%eax, 12(%r13)
	jmp	LBB0_7
LBB0_1:
	movq	_V4L2_PIX_FMT_RGB24@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%r14)
	movq	(%rax), %rdi
	callq	_get_format
	movq	%rax, %r15
	testq	%rbx, %rbx
	jne	LBB0_4
LBB0_3:
	movq	_V4L2_PIX_FMT_RGB24@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%r13)
	movq	(%rax), %rdi
	callq	_get_format
	movq	%rax, %rbx
	jmp	LBB0_4
LBB0_6:
	movl	12(%r13), %esi
	movl	12(%r14), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	callq	_max_t
	movl	%eax, 12(%r13)
	movl	(%rbx), %edi
	movl	8(%r13), %esi
	movl	8(%r14), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	callq	_max_t
	movl	%eax, 8(%r13)
LBB0_7:
	movq	_IMAGE_CONVERT_IN@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_tile_width_align
	movl	%eax, %edi
	callq	_ilog2
	movq	%r15, %rbx
	movl	%eax, %r15d
	movl	(%r13), %edi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_tile_height_align
	movl	%eax, %edi
	callq	_ilog2
	movl	%r12d, %r13d
	movl	%eax, %r12d
	movl	12(%r14), %edi
	movq	_MIN_W@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_W@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %ecx
	callq	_clamp_align
	movl	%eax, 12(%r14)
	movl	8(%r14), %edi
	movq	_MIN_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %ecx
	callq	_clamp_align
	movl	%eax, 8(%r14)
	movq	_IMAGE_CONVERT_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_tile_width_align
	movl	%eax, %edi
	callq	_ilog2
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_IMAGE_CONVERT_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movq	%rbx, %r15
	movl	%r13d, %edx
	callq	_tile_height_align
	movl	%eax, %edi
	callq	_ilog2
	movl	%eax, %r12d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rbx), %edi
	movq	_MIN_W@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_W@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_clamp_align
	movl	%eax, 12(%rbx)
	movl	8(%rbx), %edi
	movq	_MIN_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %ecx
	callq	_clamp_align
	movl	%eax, 8(%rbx)
	cmpq	$0, 8(%r15)
	movl	12(%r14), %edi
	je	LBB0_9
## %bb.8:
	movl	$2, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %esi
	movq	_MAX_W@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_10
LBB0_9:
	movl	(%r15), %edx
	imull	%edx, %edi
	sarl	$3, %edi
	movl	$2, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %esi
	imull	%edx, %esi
	sarl	$3, %esi
	movq	_MAX_W@GOTPCREL(%rip), %rax
	imull	(%rax), %edx
	sarl	$3, %edx
LBB0_10:
	callq	_clamp_align
	movl	%eax, 16(%r14)
	imull	8(%r14), %eax
	cmpq	$0, 8(%r15)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_12
## %bb.11:
	imull	(%r15), %eax
	sarl	$3, %eax
LBB0_12:
	movl	%eax, 20(%r14)
	cmpq	$0, 8(%rdx)
	movl	12(%rbx), %eax
	je	LBB0_14
## %bb.13:
	movl	8(%rbx), %ecx
	imull	%eax, %ecx
	imull	(%rdx), %ecx
	sarl	$3, %ecx
	jmp	LBB0_15
LBB0_14:
	imull	(%rdx), %eax
	sarl	$3, %eax
	movl	8(%rbx), %ecx
	imull	%eax, %ecx
LBB0_15:
	movl	%eax, 16(%rbx)
	movl	%ecx, 20(%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_PIX_FMT_RGB24,8,3         ## @V4L2_PIX_FMT_RGB24
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	___u32,4,2                      ## @__u32
	.comm	_IMAGE_CONVERT_IN,4,2           ## @IMAGE_CONVERT_IN
	.comm	_MIN_W,4,2                      ## @MIN_W
	.comm	_MAX_W,4,2                      ## @MAX_W
	.comm	_MIN_H,4,2                      ## @MIN_H
	.comm	_MAX_H,4,2                      ## @MAX_H
	.comm	_IMAGE_CONVERT_OUT,4,2          ## @IMAGE_CONVERT_OUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_image_convert_adjust       ; -- Begin function ipu_image_convert_adjust
	.p2align	2
_ipu_image_convert_adjust:              ; @ipu_image_convert_adjust
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x0]
	bl	_get_format
	mov	x22, x0
	ldr	x0, [x19]
	bl	_get_format
	mov	x21, x0
	cbz	x22, LBB0_4
; %bb.1:
	cbz	x21, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	str	w8, [x20, #24]
	mov	x0, x23
	bl	_ipu_rot_mode_is_irt
	mov	x8, x0
Lloh3:
	adrp	x24, ___u32@GOTPAGE
Lloh4:
	ldr	x24, [x24, ___u32@GOTPAGEOFF]
	ldr	w0, [x24]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w1, [x19, #8]
	ldr	w8, [x20, #12]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #2
	bl	_max_t
	str	w0, [x19, #8]
	ldr	w0, [x24]
	ldr	w1, [x19, #12]
	ldr	w8, [x20, #8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #2
	bl	_max_t
	str	w0, [x19, #12]
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x8, _V4L2_PIX_FMT_RGB24@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_PIX_FMT_RGB24@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x20]
	ldr	x0, [x8]
	bl	_get_format
	mov	x22, x0
	cbnz	x21, LBB0_2
LBB0_5:
Lloh7:
	adrp	x8, _V4L2_PIX_FMT_RGB24@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V4L2_PIX_FMT_RGB24@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x19]
	ldr	x0, [x8]
	bl	_get_format
	mov	x21, x0
	b	LBB0_2
LBB0_6:
	ldr	w1, [x19, #12]
	ldr	w8, [x20, #12]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #2
	bl	_max_t
	str	w0, [x19, #12]
	ldr	w0, [x24]
	ldr	w1, [x19, #8]
	ldr	w8, [x20, #8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #2
	bl	_max_t
	str	w0, [x19, #8]
LBB0_7:
Lloh9:
	adrp	x25, _IMAGE_CONVERT_IN@GOTPAGE
Lloh10:
	ldr	x25, [x25, _IMAGE_CONVERT_IN@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x22
	mov	x2, x23
	bl	_tile_width_align
	bl	_ilog2
	mov	x24, x0
	ldr	w0, [x25]
	mov	x1, x22
	mov	x2, x23
	bl	_tile_height_align
	bl	_ilog2
	mov	x25, x0
	ldr	w0, [x20, #12]
Lloh11:
	adrp	x8, _MIN_W@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MIN_W@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x28, _MAX_W@GOTPAGE
Lloh15:
	ldr	x28, [x28, _MAX_W@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x3, x24
	bl	_clamp_align
	str	w0, [x20, #12]
	ldr	w0, [x20, #8]
Lloh16:
	adrp	x8, _MIN_H@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MIN_H@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x26, _MAX_H@GOTPAGE
Lloh20:
	ldr	x26, [x26, _MAX_H@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x3, x25
	bl	_clamp_align
	str	w0, [x20, #8]
Lloh21:
	adrp	x27, _IMAGE_CONVERT_OUT@GOTPAGE
Lloh22:
	ldr	x27, [x27, _IMAGE_CONVERT_OUT@GOTPAGEOFF]
	ldr	w0, [x27]
	mov	x1, x21
	mov	x2, x23
	bl	_tile_width_align
	bl	_ilog2
	mov	x25, x0
	ldr	w0, [x27]
	mov	x1, x21
	mov	x2, x23
	bl	_tile_height_align
	bl	_ilog2
	mov	x23, x0
	ldr	w0, [x19, #12]
Lloh23:
	adrp	x8, _MIN_W@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MIN_W@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w2, [x28]
	mov	x3, x25
	bl	_clamp_align
	str	w0, [x19, #12]
	ldr	w0, [x19, #8]
Lloh26:
	adrp	x8, _MIN_H@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MIN_H@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	w2, [x26]
	mov	x3, x23
	bl	_clamp_align
	str	w0, [x19, #8]
	ldr	x8, [x22, #8]
	ldr	w0, [x20, #12]
	cbz	x8, LBB0_9
; %bb.8:
	mov	w8, #2
	lsl	w1, w8, w24
	ldr	w2, [x28]
	b	LBB0_10
LBB0_9:
	ldr	w8, [x22]
	mul	w9, w8, w0
	asr	w0, w9, #3
	mov	w9, #2
	lsl	w9, w9, w24
	mul	w9, w8, w9
	asr	w1, w9, #3
	ldr	w9, [x28]
	mul	w8, w9, w8
	asr	w2, w8, #3
LBB0_10:
	mov	x3, x24
	bl	_clamp_align
	str	w0, [x20, #16]
	ldr	x9, [x22, #8]
	ldr	w8, [x20, #8]
	mul	w8, w8, w0
	cbz	x9, LBB0_12
; %bb.11:
	ldr	w9, [x22]
	mul	w8, w8, w9
	asr	w8, w8, #3
LBB0_12:
	str	w8, [x20, #20]
	ldr	x9, [x21, #8]
	ldr	w8, [x19, #12]
	cbz	x9, LBB0_14
; %bb.13:
	ldr	w9, [x19, #8]
	mul	w9, w9, w8
	ldr	w10, [x21]
	mul	w9, w9, w10
	asr	w9, w9, #3
	b	LBB0_15
LBB0_14:
	ldr	w9, [x21]
	mul	w8, w9, w8
	asr	w8, w8, #3
	ldr	w9, [x19, #8]
	mul	w9, w9, w8
LBB0_15:
	stp	w8, w9, [x19, #16]
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_PIX_FMT_RGB24,8,3         ; @V4L2_PIX_FMT_RGB24
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	___u32,4,2                      ; @__u32
	.comm	_IMAGE_CONVERT_IN,4,2           ; @IMAGE_CONVERT_IN
	.comm	_MIN_W,4,2                      ; @MIN_W
	.comm	_MAX_W,4,2                      ; @MAX_W
	.comm	_MIN_H,4,2                      ; @MIN_H
	.comm	_MAX_H,4,2                      ; @MAX_H
	.comm	_IMAGE_CONVERT_OUT,4,2          ; @IMAGE_CONVERT_OUT
.subsections_via_symbols
