	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_format_depth_bias_scale
_init_format_depth_bias_scale:          ## @init_format_depth_bias_scale
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	cmpl	$0, (%r13)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r12
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %eax
	movl	%eax, 8(%r14,%rbx)
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movl	(%r13), %eax
	addq	$24, %rbx
	cmpq	%rax, %r15
	jae	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r14
	movq	(%r14,%rbx), %rax
	movq	_WINED3D_GL_RES_TYPE_RB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_WINED3DFMT_FLAG_DEPTH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	20(%r14,%rbx), %edi
	callq	_debug_d3dformat
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_TRACE
	movl	16(%r14,%rbx), %esi
	movq	%r12, %rdi
	callq	_wined3d_adapter_find_polyoffset_scale
	movl	%eax, 8(%r14,%rbx)
	movq	_WINED3D_NORMALIZED_DEPTH_BIAS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testl	%ecx, (%rdx)
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14,%rbx), %rdx
	movq	_WINED3D_GL_RES_TYPE_TEX_2D@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	_WINED3DFMT_FLAG_FLOAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	$24, %ecx
	testl	%edi, (%rdx,%rsi,4)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r14,%rbx), %ecx
	jmp	LBB0_6
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_GL_RES_TYPE_RB,8,3     ## @WINED3D_GL_RES_TYPE_RB
	.comm	_WINED3DFMT_FLAG_DEPTH,4,2      ## @WINED3DFMT_FLAG_DEPTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Testing depth bias scale for format %s.\n"

	.comm	_WINED3D_NORMALIZED_DEPTH_BIAS,4,2 ## @WINED3D_NORMALIZED_DEPTH_BIAS
	.comm	_WINED3D_GL_RES_TYPE_TEX_2D,8,3 ## @WINED3D_GL_RES_TYPE_TEX_2D
	.comm	_WINED3DFMT_FLAG_FLOAT,4,2      ## @WINED3DFMT_FLAG_FLOAT
	.no_dead_strip	_init_format_depth_bias_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_format_depth_bias_scale
_init_format_depth_bias_scale:          ; @init_format_depth_bias_scale
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x22, [x0]
	ldr	w8, [x22]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x23, #0
	mov	x24, #0
Lloh0:
	adrp	x25, _WINED3D_GL_RES_TYPE_RB@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WINED3D_GL_RES_TYPE_RB@GOTPAGEOFF]
Lloh2:
	adrp	x26, _WINED3DFMT_FLAG_DEPTH@GOTPAGE
Lloh3:
	ldr	x26, [x26, _WINED3DFMT_FLAG_DEPTH@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #24
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	lsr	w8, w0, w8
	str	w8, [x28, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	w8, [x22]
	add	x23, x23, #24
	cmp	x24, x8
	b.hs	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x22, #8]
	ldr	x8, [x27, x23]
	ldr	x9, [x25]
	ldr	w8, [x8, x9, lsl #2]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x28, x27, x23
	ldr	w0, [x28, #20]
	bl	_debug_d3dformat
	mov	x1, x0
	mov	x0, x21
	bl	_TRACE
	ldr	w1, [x28, #16]
	mov	x0, x20
	bl	_wined3d_adapter_find_polyoffset_scale
	str	w0, [x28, #8]
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _WINED3D_NORMALIZED_DEPTH_BIAS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3D_NORMALIZED_DEPTH_BIAS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x27, x23]
Lloh9:
	adrp	x9, _WINED3D_GL_RES_TYPE_TEX_2D@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WINED3D_GL_RES_TYPE_TEX_2D@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh12:
	adrp	x9, _WINED3DFMT_FLAG_FLOAT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WINED3DFMT_FLAG_FLOAT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x27, x23
	ldr	w8, [x8, #12]
	b	LBB0_3
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_GL_RES_TYPE_RB,8,3     ; @WINED3D_GL_RES_TYPE_RB
	.comm	_WINED3DFMT_FLAG_DEPTH,4,2      ; @WINED3DFMT_FLAG_DEPTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Testing depth bias scale for format %s.\n"

	.comm	_WINED3D_NORMALIZED_DEPTH_BIAS,4,2 ; @WINED3D_NORMALIZED_DEPTH_BIAS
	.comm	_WINED3D_GL_RES_TYPE_TEX_2D,8,3 ; @WINED3D_GL_RES_TYPE_TEX_2D
	.comm	_WINED3DFMT_FLAG_FLOAT,4,2      ; @WINED3DFMT_FLAG_FLOAT
	.no_dead_strip	_init_format_depth_bias_scale
.subsections_via_symbols
