	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function needs_srgb_write
_needs_srgb_write:                      ## @needs_srgb_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	_WINED3D_SRGB_READ_WRITE_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	(%rsi), %rax
	movq	_WINED3D_RS_SRGBWRITEENABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_5
LBB0_2:
	movq	(%rdx), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.3:
	movq	_WINED3DFMT_FLAG_SRGB_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%eax, %eax
	testl	%edx, (%rcx)
	setne	%al
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SRGB_READ_WRITE_CONTROL,4,2 ## @WINED3D_SRGB_READ_WRITE_CONTROL
	.comm	_WINED3D_RS_SRGBWRITEENABLE,8,3 ## @WINED3D_RS_SRGBWRITEENABLE
	.comm	_WINED3DFMT_FLAG_SRGB_WRITE,4,2 ## @WINED3DFMT_FLAG_SRGB_WRITE
	.no_dead_strip	_needs_srgb_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function needs_srgb_write
_needs_srgb_write:                      ; @needs_srgb_write
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _WINED3D_SRGB_READ_WRITE_CONTROL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3D_SRGB_READ_WRITE_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x1]
Lloh3:
	adrp	x9, _WINED3D_RS_SRGBWRITEENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_RS_SRGBWRITEENABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_4
LBB0_2:
	ldr	x8, [x2]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _WINED3DFMT_FLAG_SRGB_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3DFMT_FLAG_SRGB_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	ret
LBB0_4:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SRGB_READ_WRITE_CONTROL,4,2 ; @WINED3D_SRGB_READ_WRITE_CONTROL
	.comm	_WINED3D_RS_SRGBWRITEENABLE,8,3 ; @WINED3D_RS_SRGBWRITEENABLE
	.comm	_WINED3DFMT_FLAG_SRGB_WRITE,4,2 ; @WINED3DFMT_FLAG_SRGB_WRITE
	.no_dead_strip	_needs_srgb_write
.subsections_via_symbols
