	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetChanCtrl                 ## -- Begin function GX_SetChanCtrl
	.p2align	4, 0x90
_GX_SetChanCtrl:                        ## @GX_SetChanCtrl
	.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
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbp), %rcx
	movq	_GX_AF_SPEC@GOTPCREL(%rip), %rax
	andl	$1, %ebx
	cmpq	%rcx, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_GX_DF_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_3
LBB0_1:
	movq	%r9, %r13
LBB0_3:
	movl	%esi, %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movq	%rax, %r14
	orq	%rbx, %r14
	movl	%r15d, %edi
	movl	$2, %esi
	movl	$4, %edx
	callq	__SHIFTL
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	movl	%r12d, %edi
	movl	$6, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movq	%rax, %rbx
	orq	%r15, %rbx
	orq	%r14, %rbx
	movl	%r13d, %edi
	movl	$7, %esi
	movl	$2, %edx
	callq	__SHIFTL
	movq	%rax, %r14
	movq	_GX_AF_NONE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movq	16(%rbp), %r12
	cmpq	%r12, (%rax)
	setg	%dil
	movl	$9, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movq	%rax, %r15
	orq	%rbx, %r15
	xorl	%edi, %edi
	testq	%r12, %r12
	setg	%dil
	movl	$10, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movq	%rax, %rbx
	orq	%r15, %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %esi
	movl	$4, %edx
	callq	__SHIFTR
	movl	%eax, %edi
	movl	$11, %esi
	movl	$4, %edx
	callq	__SHIFTL
	orq	%rbx, %rax
	orq	%r14, %rax
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r8d, %ecx
	andl	$3, %ecx
	movq	___gx@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	$4096, %esi                     ## imm = 0x1000
	shll	%cl, %esi
	movq	(%rdx), %rdi
	movq	%rax, (%rdi,%rcx,8)
	orl	8(%rdx), %esi
	movq	_GX_COLOR0A0@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	%r8d, (%rcx)
	movl	$20480, %r8d                    ## imm = 0x5000
	movl	$40960, %ecx                    ## imm = 0xA000
	cmovel	%r8d, %ecx
	setne	%bl
	movq	%rax, 16(%rdi,%rbx,8)
	orl	%esi, %ecx
	movl	%ecx, 8(%rdx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GX_AF_SPEC,8,3                 ## @GX_AF_SPEC
	.comm	_GX_DF_NONE,8,3                 ## @GX_DF_NONE
	.comm	_GX_AF_NONE,8,3                 ## @GX_AF_NONE
	.comm	___gx,8,3                       ## @__gx
	.comm	_GX_COLOR0A0,4,2                ## @GX_COLOR0A0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetChanCtrl                 ; -- Begin function GX_SetChanCtrl
	.p2align	2
_GX_SetChanCtrl:                        ; @GX_SetChanCtrl
	.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	x21, x6
	mov	x22, x5
	mov	x20, x4
	mov	x23, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _GX_AF_SPEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GX_AF_SPEC@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
Lloh3:
	adrp	x8, _GX_DF_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GX_DF_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	and	x26, x3, #0x1
	mov	x0, x1
	mov	w1, #1
	mov	w2, #1
	bl	__SHIFTL
	orr	x26, x0, x26
	mov	x0, x20
	mov	w1, #2
	mov	w2, #4
	bl	__SHIFTL
	orr	x26, x26, x0
	mov	x0, x23
	mov	w1, #6
	mov	w2, #1
	bl	__SHIFTL
	orr	x23, x26, x0
	cmp	x24, x21
	csel	w0, w25, w22, eq
	mov	w1, #7
	mov	w2, #2
	bl	__SHIFTL
	orr	x22, x23, x0
Lloh6:
	adrp	x8, _GX_AF_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GX_AF_NONE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x21
	cset	w0, gt
	mov	w1, #9
	mov	w2, #1
	bl	__SHIFTL
	orr	x22, x22, x0
	cmp	x21, #0
	cset	w0, gt
	mov	w1, #10
	mov	w2, #1
	bl	__SHIFTL
	orr	x21, x22, x0
	mov	x0, x20
	mov	w1, #4
	mov	w2, #4
	bl	__SHIFTR
	mov	w1, #11
	mov	w2, #4
	bl	__SHIFTL
	orr	x8, x21, x0
	and	w9, w19, #0x3
Lloh9:
	adrp	x10, ___gx@GOTPAGE
Lloh10:
	ldr	x10, [x10, ___gx@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	ldr	x11, [x10]
	str	x8, [x11, w9, uxtw #3]
	mov	w12, #4096
	lsl	w9, w12, w9
	ldr	w12, [x10, #8]
	orr	w9, w12, w9
Lloh12:
	adrp	x12, _GX_COLOR0A0@GOTPAGE
Lloh13:
	ldr	x12, [x12, _GX_COLOR0A0@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	mov	w13, #24
	mov	w14, #40960
	mov	w15, #20480
	cmp	w12, w19
	csel	w12, w15, w14, eq
	mov	w14, #16
	csel	x13, x14, x13, eq
	str	x8, [x11, x13]
	orr	w8, w9, w12
	str	w8, [x10, #8]
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GX_AF_SPEC,8,3                 ; @GX_AF_SPEC
	.comm	_GX_DF_NONE,8,3                 ; @GX_DF_NONE
	.comm	_GX_AF_NONE,8,3                 ; @GX_AF_NONE
	.comm	___gx,8,3                       ; @__gx
	.comm	_GX_COLOR0A0,4,2                ; @GX_COLOR0A0
.subsections_via_symbols
