	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetPixelFmt                 ## -- Begin function GX_SetPixelFmt
	.p2align	4, 0x90
_GX_SetPixelFmt:                        ## @GX_SetPixelFmt
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___gx@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	(%rax), %ecx
	andl	$-8, %ecx
	leaq	l___const.GX_SetPixelFmt.realfmt(%rip), %rdx
	movslq	(%rdx,%rdi,4), %r12
	movl	%r12d, %ebx
	andl	$7, %ebx
	orl	%ecx, %ebx
	movl	%ebx, (%rax)
	andl	$-57, %ebx
	movq	%rsi, %rdi
	movl	$3, %esi
	movl	$3, %edx
	callq	__SHIFTL
	orl	%eax, %ebx
	movq	(%r15), %rax
	movl	%ebx, (%rax)
	movl	%ebx, %edi
	callq	_GX_LOAD_BP_REG
	movq	(%r15), %rax
	orl	$4, 4(%rax)
	movq	_GX_PF_RGB565_Z16@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	%r14, (%rcx)
	sete	%dil
	movl	$-513, %ebx                     ## imm = 0xFDFF
	andl	8(%rax), %ebx
	movl	$9, %esi
	movl	$1, %edx
	callq	__SHIFTL
	orl	%ebx, %eax
	movq	(%r15), %rcx
	movl	%eax, 8(%rcx)
	movq	_GX_PF_Y8@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_1
## %bb.2:
	subq	%r12, %r14
	movl	$-3073, %ebx                    ## imm = 0xF3FF
	andl	12(%rcx), %ebx
	movq	%r14, %rdi
	movl	$10, %esi
	movl	$2, %edx
	callq	__SHIFTL
	orl	%eax, %ebx
	movq	(%r15), %rax
	movl	%ebx, 12(%rax)
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_GX_LOAD_BP_REG                 ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.GX_SetPixelFmt.realfmt
l___const.GX_SetPixelFmt.realfmt:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	5                               ## 0x5

	.comm	___gx,8,3                       ## @__gx
	.comm	_GX_PF_RGB565_Z16,8,3           ## @GX_PF_RGB565_Z16
	.comm	_GX_PF_Y8,4,2                   ## @GX_PF_Y8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetPixelFmt                 ; -- Begin function GX_SetPixelFmt
	.p2align	2
_GX_SetPixelFmt:                        ; @GX_SetPixelFmt
	.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
Lloh0:
	adrp	x20, ___gx@GOTPAGE
Lloh1:
	ldr	x20, [x20, ___gx@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x9, l___const.GX_SetPixelFmt.realfmt@PAGE
Lloh3:
	add	x9, x9, l___const.GX_SetPixelFmt.realfmt@PAGEOFF
	ldr	w10, [x8]
	ldrsw	x21, [x9, x0, lsl #2]
	bfxil	w10, w21, #0, #3
	str	w10, [x8]
	and	w22, w10, #0xffffffc7
	mov	x0, x1
	mov	w1, #3
	mov	w2, #3
	bl	__SHIFTL
	orr	w0, w22, w0
	ldr	x8, [x20]
	str	w0, [x8]
	bl	_GX_LOAD_BP_REG
	ldr	x8, [x20]
	ldp	w9, w10, [x8, #4]
	orr	w9, w9, #0x4
	str	w9, [x8, #4]
Lloh4:
	adrp	x8, _GX_PF_RGB565_Z16@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GX_PF_RGB565_Z16@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x8, x19
	cset	w0, eq
	and	w22, w10, #0xfffffdff
	mov	w1, #9
	mov	w2, #1
	bl	__SHIFTL
	orr	w9, w22, w0
	ldr	x8, [x20]
	str	w9, [x8, #8]
Lloh7:
	adrp	x9, _GX_PF_Y8@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GX_PF_Y8@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w21, w9
	b.ne	LBB0_2
; %bb.1:
	sub	x0, x19, x21
	ldr	w8, [x8, #12]
	and	w19, w8, #0xfffff3ff
	mov	w1, #10
	mov	w2, #2
	bl	__SHIFTL
	orr	w0, w19, w0
	ldr	x8, [x20]
	str	w0, [x8, #12]
	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	_GX_LOAD_BP_REG
LBB0_2:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.GX_SetPixelFmt.realfmt
l___const.GX_SetPixelFmt.realfmt:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	4                               ; 0x4
	.long	4                               ; 0x4
	.long	4                               ; 0x4
	.long	5                               ; 0x5

	.comm	___gx,8,3                       ; @__gx
	.comm	_GX_PF_RGB565_Z16,8,3           ; @GX_PF_RGB565_Z16
	.comm	_GX_PF_Y8,4,2                   ; @GX_PF_Y8
.subsections_via_symbols
