	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s3c_camif_set_defaults         ## -- Begin function s3c_camif_set_defaults
	.p2align	4, 0x90
_s3c_camif_set_defaults:                ## @s3c_camif_set_defaults
	.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
	movq	%rdi, %r14
	movq	_CAMIF_VP_NUM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.1:
	movq	96(%r14), %rax
	movl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	104(%r14), %r15
	leaq	(%r15,%rbx), %rdi
	movq	%r14, 32(%r15,%rbx)
	movl	%r12d, (%r15,%rbx)
	movl	4(%rax), %eax
	movl	%eax, 24(%r15,%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	_S3C244X_CAMIF_IP_REV@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FMT_FL_S3C24XX_PREVIEW@GOTPCREL(%rip), %rax
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FMT_FL_S3C24XX_CODEC@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_FMT_FL_S3C64XX@GOTPCREL(%rip), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %eax
	leaq	(%r15,%rbx), %r13
	addq	$40, %r13
	movl	%eax, 20(%r15,%rbx)
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_s3c_camif_find_format
	movq	%rax, 8(%r15,%rbx)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_CAMIF_DEF_WIDTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%eax, 40(%r15,%rbx)
	movq	_CAMIF_DEF_HEIGHT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, 44(%r15,%rbx)
	movq	%rax, 80(%r15,%rbx)
	movq	(%rdx), %rdx
	movq	%rdx, 72(%r15,%rbx)
	movl	$1, 16(%r15,%rbx)
	imull	%eax, %ecx
	movq	8(%r15,%rbx), %rax
	imull	(%rax), %ecx
	leal	7(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	movl	%eax, 4(%r15,%rbx)
	incq	%r12
	movq	_CAMIF_VP_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	96(%r14), %rax
	addq	$88, %rbx
	jmp	LBB0_2
LBB0_8:
	leaq	48(%r14), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_CAMIF_DEF_WIDTH@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, 64(%r14)
	movq	_CAMIF_DEF_HEIGHT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, 56(%r14)
	movq	_camif_mbus_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	(%r15), %rax
	movq	%rax, 16(%r14)
	movq	(%rbx), %rax
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAMIF_VP_NUM,4,2               ## @CAMIF_VP_NUM
	.comm	_S3C244X_CAMIF_IP_REV,4,2       ## @S3C244X_CAMIF_IP_REV
	.comm	_FMT_FL_S3C24XX_PREVIEW,4,2     ## @FMT_FL_S3C24XX_PREVIEW
	.comm	_FMT_FL_S3C24XX_CODEC,4,2       ## @FMT_FL_S3C24XX_CODEC
	.comm	_FMT_FL_S3C64XX,4,2             ## @FMT_FL_S3C64XX
	.comm	_CAMIF_DEF_WIDTH,8,3            ## @CAMIF_DEF_WIDTH
	.comm	_CAMIF_DEF_HEIGHT,8,3           ## @CAMIF_DEF_HEIGHT
	.comm	_camif_mbus_formats,8,3         ## @camif_mbus_formats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s3c_camif_set_defaults         ; -- Begin function s3c_camif_set_defaults
	.p2align	2
_s3c_camif_set_defaults:                ; @s3c_camif_set_defaults
	.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	x19, x0
Lloh0:
	adrp	x23, _CAMIF_VP_NUM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CAMIF_VP_NUM@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x21, _CAMIF_DEF_HEIGHT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _CAMIF_DEF_HEIGHT@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x24, #0
	mov	x25, #0
	ldr	x8, [x19, #96]
Lloh4:
	adrp	x26, _S3C244X_CAMIF_IP_REV@GOTPAGE
Lloh5:
	ldr	x26, [x26, _S3C244X_CAMIF_IP_REV@GOTPAGEOFF]
	ldr	w28, [x8]
	mov	w27, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #104]
	add	x0, x9, x24
	str	x19, [x0, #32]
	str	w25, [x0]
	ldr	w8, [x8, #4]
	str	w8, [x0, #24]
	ldr	w8, [x26]
	cmp	w28, w8
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x24, #0
Lloh6:
	adrp	x8, _FMT_FL_S3C24XX_PREVIEW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FMT_FL_S3C24XX_PREVIEW@GOTPAGEOFF]
Lloh8:
	adrp	x10, _FMT_FL_S3C24XX_CODEC@GOTPAGE
Lloh9:
	ldr	x10, [x10, _FMT_FL_S3C24XX_CODEC@GOTPAGEOFF]
	csel	x8, x10, x8, eq
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh10:
	adrp	x8, _FMT_FL_S3C64XX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FMT_FL_S3C64XX@GOTPAGEOFF]
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x8]
	add	x20, x0, #40
	add	x22, x9, x24
	str	w8, [x22, #20]
	mov	x1, #0
	mov	w2, #0
	bl	_s3c_camif_find_format
	str	x0, [x22, #8]
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x20
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh12:
	adrp	x8, _CAMIF_DEF_WIDTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAMIF_DEF_WIDTH@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w9, [x21]
	stp	w8, w9, [x22, #40]
	str	x8, [x22, #80]
	ldr	x10, [x21]
	str	x10, [x22, #72]
	str	w27, [x22, #16]
	mul	w8, w9, w8
	ldr	x9, [x22, #8]
	ldr	w9, [x9]
	mul	w8, w8, w9
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x22, #4]
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #96]
	add	x24, x24, #88
	b	LBB0_2
LBB0_7:
	add	x0, x19, #48
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh15:
	adrp	x20, _CAMIF_DEF_WIDTH@GOTPAGE
Lloh16:
	ldr	x20, [x20, _CAMIF_DEF_WIDTH@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x21]
	stp	x9, x8, [x19, #56]
Lloh17:
	adrp	x8, _camif_mbus_formats@GOTPAGE
Lloh18:
	ldr	x8, [x8, _camif_mbus_formats@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x19, #72]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	ldr	x8, [x20]
	ldr	x9, [x21]
	stp	x9, x8, [x19, #8]
	mov	w0, #0
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CAMIF_VP_NUM,4,2               ; @CAMIF_VP_NUM
	.comm	_S3C244X_CAMIF_IP_REV,4,2       ; @S3C244X_CAMIF_IP_REV
	.comm	_FMT_FL_S3C24XX_PREVIEW,4,2     ; @FMT_FL_S3C24XX_PREVIEW
	.comm	_FMT_FL_S3C24XX_CODEC,4,2       ; @FMT_FL_S3C24XX_CODEC
	.comm	_FMT_FL_S3C64XX,4,2             ; @FMT_FL_S3C64XX
	.comm	_CAMIF_DEF_WIDTH,8,3            ; @CAMIF_DEF_WIDTH
	.comm	_CAMIF_DEF_HEIGHT,8,3           ; @CAMIF_DEF_HEIGHT
	.comm	_camif_mbus_formats,8,3         ; @camif_mbus_formats
.subsections_via_symbols
