	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7180_set_pad_format
_adv7180_set_pad_format:                ## @adv7180_set_pad_format
	.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	%rdx, %r15
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_to_state
	movq	%rax, %r12
	leaq	8(%r15), %rbx
	cmpl	$128, 8(%r15)
	jne	LBB0_2
## %bb.1:
	movq	8(%r12), %rax
	movq	_ADV7180_FLAG_I2P@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_3
LBB0_2:
	movq	_V4L2_FIELD_ALTERNATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_3:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_adv7180_mbus_fmt
	movl	%eax, %r14d
	movq	(%r15), %rax
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movl	(%rbx), %eax
	cmpl	%eax, (%r12)
	je	LBB0_7
## %bb.5:
	movl	%eax, (%r12)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_adv7180_set_power
	movq	%r12, %rdi
	callq	_adv7180_set_field_mode
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_adv7180_set_power
	jmp	LBB0_7
LBB0_6:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_v4l2_subdev_get_try_format
	movl	(%rbx), %ecx
	movl	%ecx, (%rax)
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADV7180_FLAG_I2P,4,2           ## @ADV7180_FLAG_I2P
	.comm	_V4L2_FIELD_ALTERNATE,4,2       ## @V4L2_FIELD_ALTERNATE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_adv7180_set_pad_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7180_set_pad_format
_adv7180_set_pad_format:                ; @adv7180_set_pad_format
	.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	x24, x2
	mov	x21, x1
	mov	x23, x0
	bl	_to_state
	mov	x19, x0
	mov	x22, x24
	ldr	w8, [x22, #8]!
	cmp	w8, #128
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _ADV7180_FLAG_I2P@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADV7180_FLAG_I2P@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _V4L2_FIELD_ALTERNATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_FIELD_ALTERNATE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x22]
LBB0_3:
	mov	x0, x23
	mov	x1, x22
	bl	_adv7180_mbus_fmt
	mov	x20, x0
	ldr	x8, [x24]
Lloh6:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	w9, [x19]
	ldr	w8, [x22]
	cmp	w9, w8
	b.eq	LBB0_7
; %bb.5:
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_adv7180_set_power
	mov	x0, x19
	bl	_adv7180_set_field_mode
	mov	x0, x19
	mov	w1, #1
	bl	_adv7180_set_power
	b	LBB0_7
LBB0_6:
	mov	x0, x23
	mov	x1, x21
	mov	w2, #0
	bl	_v4l2_subdev_get_try_format
	ldr	w8, [x22]
	str	w8, [x0]
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV7180_FLAG_I2P,4,2           ; @ADV7180_FLAG_I2P
	.comm	_V4L2_FIELD_ALTERNATE,4,2       ; @V4L2_FIELD_ALTERNATE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_adv7180_set_pad_format
.subsections_via_symbols
