	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8000_set_layer
_dib8000_set_layer:                     ## @dib8000_set_layer
	.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, %r14d
	movq	%rsi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	8(%r15), %rax
	movq	%rsi, %r13
	shlq	$4, %r13
	movl	(%rax,%r13), %ecx
	cmpl	$136, %ecx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	cmpl	$130, %ecx
	je	LBB0_5
## %bb.3:
	cmpl	$128, %ecx
	jne	LBB0_6
## %bb.4:
	movl	$1024, %ecx                     ## imm = 0x400
	jmp	LBB0_7
LBB0_1:
	xorl	%ecx, %ecx
	jmp	LBB0_7
LBB0_5:
	movl	$2048, %ecx                     ## imm = 0x800
	jmp	LBB0_7
LBB0_6:
	movl	$3072, %ecx                     ## imm = 0xC00
LBB0_7:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	$-132, %ecx
	addl	4(%rax,%r13), %ecx
	movl	$56, %ebx
	cmpl	$3, %ecx
	ja	LBB0_9
## %bb.8:
	movslq	%ecx, %rcx
	leaq	l_switch.table.dib8000_set_layer(%rip), %rdx
	movq	(%rdx,%rcx,8), %rbx
LBB0_9:
	movl	12(%rax,%r13), %edi
	callq	_fls
	cmpq	$4, %rax
	jb	LBB0_13
## %bb.10:
	jne	LBB0_12
## %bb.11:
	movl	$4, %eax
	cmpl	$1, (%r15)
	je	LBB0_13
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addl	$2, %r12d
	movq	8(%r15), %rcx
	movl	8(%rcx,%r13), %ecx
	andl	$15, %ecx
	shlq	$6, %rcx
	orq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	orq	%rax, %rbx
	orq	%rcx, %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_dib8000_write_word
	movq	8(%r15), %rax
	cmpl	$0, 8(%rax,%r13)
	jle	LBB0_19
## %bb.14:
	cmpl	$136, %r14d
	je	LBB0_17
## %bb.15:
	cmpl	$130, %r14d
	je	LBB0_18
## %bb.16:
	cmpl	$128, %r14d
	jne	LBB0_19
LBB0_17:
	movl	(%rax,%r13), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	cmovbl	%eax, %r14d
	jmp	LBB0_19
LBB0_18:
	xorl	%ecx, %ecx
	cmpl	$129, (%rax,%r13)
	sete	%cl
	movl	$130, %r14d
	subl	%ecx, %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dib8000_set_layer
	.section	__TEXT,__const
	.p2align	3                               ## @switch.table.dib8000_set_layer
l_switch.table.dib8000_set_layer:
	.quad	40                              ## 0x28
	.quad	24                              ## 0x18
	.quad	16                              ## 0x10
	.quad	8                               ## 0x8

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8000_set_layer
_dib8000_set_layer:                     ; @dib8000_set_layer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x23, [x8]
	ldr	x8, [x23, #8]
	lsl	x22, x1, #4
	ldr	w9, [x8, x22]
	mov	w10, #2048
	cmp	w9, #128
	mov	w11, #3072
	mov	w12, #1024
	csel	x11, x11, x12, ne
	cmp	w9, #130
	csel	x10, x10, x11, eq
	cmp	w9, #136
	csel	x24, xzr, x10, eq
	add	x8, x8, x1, lsl #4
	ldr	w9, [x8, #4]
	sub	w9, w9, #132
	cmp	w9, #3
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x10, l_switch.table.dib8000_set_layer@PAGE
Lloh1:
	add	x10, x10, l_switch.table.dib8000_set_layer@PAGEOFF
	ldr	x25, [x10, w9, sxtw #3]
	b	LBB0_3
LBB0_2:
	mov	w25, #56
LBB0_3:
	ldr	w0, [x8, #12]
	bl	_fls
	cmp	x0, #4
	b.lo	LBB0_8
; %bb.4:
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [x23]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #4
	b	LBB0_8
LBB0_7:
	mov	x0, #0
LBB0_8:
	add	w1, w21, #2
	ldr	x8, [x23, #8]
	add	x8, x8, x22
	ldr	w8, [x8, #8]
	lsl	w8, w8, #6
	and	x8, x8, #0x3c0
	orr	x9, x25, x24
	orr	x9, x9, x0
	orr	x2, x9, x8
	mov	x0, x20
	bl	_dib8000_write_word
	ldr	x8, [x23, #8]
	add	x9, x8, x22
	ldr	w9, [x9, #8]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.9:
	cmp	w19, #136
	b.eq	LBB0_12
; %bb.10:
	cmp	w19, #130
	b.eq	LBB0_13
; %bb.11:
	cmp	w19, #128
	b.ne	LBB0_14
LBB0_12:
	ldr	w8, [x8, x22]
	sub	w9, w8, #129
	cmp	w9, #2
	csel	w19, w8, w19, lo
	b	LBB0_14
LBB0_13:
	ldr	w8, [x8, x22]
	cmp	w8, #129
	mov	w8, #129
	cinc	w19, w8, ne
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dib8000_set_layer
	.section	__TEXT,__const
	.p2align	3                               ; @switch.table.dib8000_set_layer
l_switch.table.dib8000_set_layer:
	.quad	40                              ; 0x28
	.quad	24                              ; 0x18
	.quad	16                              ; 0x10
	.quad	8                               ; 0x8

.subsections_via_symbols
