	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk1160_set_fmt
_stk1160_set_fmt:                       ## @stk1160_set_fmt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	_STK1160_DEC_UNIT_SIZE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	$0, 32(%rsi)
	movl	$0, %ebx
	je	LBB0_4
## %bb.3:
	movq	_STK1160_H_DEC_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
LBB0_4:
	orl	(%rcx), %ebx
	cmpq	$0, 24(%r15)
	movl	$0, %ecx
	je	LBB0_6
## %bb.5:
	movq	_STK1160_V_DEC_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_6:
	orl	%ecx, %ebx
	movq	_STK1160_DECIMATE_MORE_THAN_HALF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	8(%r15), %rdx
	movl	$0, %esi
	cmpq	%rcx, (%r15)
	jne	LBB0_8
## %bb.7:
	movq	_STK1160_H_DEC_MODE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_8:
	orl	%esi, %ebx
	cmpq	%rcx, %rdx
	jne	LBB0_10
## %bb.9:
	movq	_STK1160_V_DEC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	orl	%eax, %ebx
	movq	_STK1160_DMCTRL_H_UNITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%r15), %edx
	movq	%r14, %rdi
	callq	_stk1160_write_reg
	movq	_STK1160_DMCTRL_V_UNITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r15), %edx
	movq	%r14, %rdi
	callq	_stk1160_write_reg
	movl	16(%r15), %ecx
	movl	20(%r15), %edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_stk1160_dbg
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
LBB0_11:
	movq	_STK1160_DMCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stk1160_write_reg              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STK1160_DEC_UNIT_SIZE,4,2      ## @STK1160_DEC_UNIT_SIZE
	.comm	_STK1160_H_DEC_EN,4,2           ## @STK1160_H_DEC_EN
	.comm	_STK1160_V_DEC_EN,4,2           ## @STK1160_V_DEC_EN
	.comm	_STK1160_DECIMATE_MORE_THAN_HALF,8,3 ## @STK1160_DECIMATE_MORE_THAN_HALF
	.comm	_STK1160_H_DEC_MODE,4,2         ## @STK1160_H_DEC_MODE
	.comm	_STK1160_V_DEC_MODE,4,2         ## @STK1160_V_DEC_MODE
	.comm	_STK1160_DMCTRL_H_UNITS,4,2     ## @STK1160_DMCTRL_H_UNITS
	.comm	_STK1160_DMCTRL_V_UNITS,4,2     ## @STK1160_DMCTRL_V_UNITS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"decimate 0x%x, column units %d, row units %d\n"

	.comm	_STK1160_DMCTRL,4,2             ## @STK1160_DMCTRL
	.no_dead_strip	_stk1160_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk1160_set_fmt
_stk1160_set_fmt:                       ; @stk1160_set_fmt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _STK1160_DEC_UNIT_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STK1160_DEC_UNIT_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _STK1160_H_DEC_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STK1160_H_DEC_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldp	x11, x10, [x1, #24]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _STK1160_V_DEC_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _STK1160_V_DEC_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x11, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _STK1160_DECIMATE_MORE_THAN_HALF@GOTPAGE
Lloh10:
	ldr	x9, [x9, _STK1160_DECIMATE_MORE_THAN_HALF@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldp	x10, x11, [x1]
	cmp	x10, x9
Lloh12:
	adrp	x10, _STK1160_H_DEC_MODE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _STK1160_H_DEC_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	csel	w10, w10, wzr, eq
	orr	w8, w8, w10
Lloh15:
	adrp	x10, _STK1160_V_DEC_MODE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _STK1160_V_DEC_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	cmp	x11, x9
	csel	w9, w10, wzr, eq
	orr	w21, w8, w9
Lloh18:
	adrp	x8, _STK1160_DMCTRL_H_UNITS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STK1160_DMCTRL_H_UNITS@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w2, [x20, #20]
	mov	x0, x19
	bl	_stk1160_write_reg
Lloh21:
	adrp	x8, _STK1160_DMCTRL_V_UNITS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STK1160_DMCTRL_V_UNITS@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w2, [x20, #16]
	mov	x0, x19
	bl	_stk1160_write_reg
	ldp	w3, w2, [x20, #16]
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_stk1160_dbg
	b	LBB0_3
LBB0_2:
	mov	w21, #0
LBB0_3:
Lloh26:
	adrp	x8, _STK1160_DMCTRL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STK1160_DMCTRL@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_stk1160_write_reg
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_STK1160_DEC_UNIT_SIZE,4,2      ; @STK1160_DEC_UNIT_SIZE
	.comm	_STK1160_H_DEC_EN,4,2           ; @STK1160_H_DEC_EN
	.comm	_STK1160_V_DEC_EN,4,2           ; @STK1160_V_DEC_EN
	.comm	_STK1160_DECIMATE_MORE_THAN_HALF,8,3 ; @STK1160_DECIMATE_MORE_THAN_HALF
	.comm	_STK1160_H_DEC_MODE,4,2         ; @STK1160_H_DEC_MODE
	.comm	_STK1160_V_DEC_MODE,4,2         ; @STK1160_V_DEC_MODE
	.comm	_STK1160_DMCTRL_H_UNITS,4,2     ; @STK1160_DMCTRL_H_UNITS
	.comm	_STK1160_DMCTRL_V_UNITS,4,2     ; @STK1160_DMCTRL_V_UNITS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"decimate 0x%x, column units %d, row units %d\n"

	.comm	_STK1160_DMCTRL,4,2             ; @STK1160_DMCTRL
	.no_dead_strip	_stk1160_set_fmt
.subsections_via_symbols
