	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function vulkan_set_viewport
LCPI0_0:
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
LCPI0_4:
	.long	1258291200                      ## 0x4b000000
	.long	1258291200                      ## 0x4b000000
	.long	1258291200                      ## 0x4b000000
	.long	1258291200                      ## 0x4b000000
LCPI0_5:
	.long	1392508928                      ## 0x53000000
	.long	1392508928                      ## 0x53000000
	.long	1392508928                      ## 0x53000000
	.long	1392508928                      ## 0x53000000
LCPI0_6:
	.long	0x53000080                      ## float 5.49764202E+11
	.long	0x53000080                      ## float 5.49764202E+11
	.long	0x53000080                      ## float 5.49764202E+11
	.long	0x53000080                      ## float 5.49764202E+11
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_1:
	.long	0x38d1b717                      ## float 9.99999974E-5
LCPI0_2:
	.long	0xbf800000                      ## float -1
LCPI0_3:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_vulkan_set_viewport:                   ## @vulkan_set_viewport
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r13d
	movl	%esi, %eax
	cvtsi2ss	%rax, %xmm0
	movl	%edx, %eax
	cvtsi2ss	%rax, %xmm1
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movq	%rdi, %rbx
	movss	%xmm0, -64(%rbp)                ## 4-byte Spill
	movss	%xmm1, -48(%rbp)                ## 4-byte Spill
	divss	%xmm1, %xmm0
	movss	%xmm0, -52(%rbp)
	movq	l___const.vulkan_set_viewport.ortho+16(%rip), %rax
	movq	%rax, -96(%rbp)
	movups	l___const.vulkan_set_viewport.ortho(%rip), %xmm0
	movaps	%xmm0, -112(%rbp)
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r15
	leaq	-52(%rbp), %rax
	movq	%rax, -88(%rbp)
	movl	%r13d, -80(%rbp)
	movl	%r12d, -76(%rbp)
	leaq	-88(%rbp), %rdi
	callq	_video_context_driver_translate_aspect
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.2:
	leaq	44(%rbx), %r15
	xorl	%eax, %eax
	callq	_video_driver_get_aspect_ratio
	movq	64(%rbx), %rcx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_video_viewport_get_scaled_integer
	movl	44(%rbx), %r13d
	movl	48(%rbx), %r12d
	jmp	LBB0_12
LBB0_3:
	testl	%r14d, %r14d
	jne	LBB0_11
## %bb.4:
	cmpq	$0, 64(%rbx)
	je	LBB0_11
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_video_driver_get_aspect_ratio
	movaps	%xmm0, %xmm2
	movss	-52(%rbp), %xmm3                ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm0
	subss	%xmm2, %xmm0
	andps	LCPI0_0(%rip), %xmm0
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_11:
	movq	$0, 52(%rbx)
	movl	%r13d, 44(%rbx)
	movl	%r12d, 48(%rbx)
LBB0_12:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_7:
	ucomiss	%xmm2, %xmm3
	jbe	LBB0_9
## %bb.8:
	divss	%xmm3, %xmm2
	addss	LCPI0_2(%rip), %xmm2
	movss	LCPI0_3(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm2
	addss	%xmm0, %xmm2
	movss	%xmm2, -48(%rbp)                ## 4-byte Spill
	subss	%xmm2, %xmm0
	mulss	-64(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_roundf
	movq	%rax, %r15
	movss	-64(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm0
	mulss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_roundf
	movq	%rax, %r13
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_9:
	divss	%xmm2, %xmm3
	addss	LCPI0_2(%rip), %xmm3
	movss	LCPI0_3(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm3
	addss	%xmm0, %xmm3
	movss	%xmm3, -68(%rbp)                ## 4-byte Spill
	subss	%xmm3, %xmm0
	mulss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_roundf
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm0
	mulss	-68(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_roundf
	movq	%rax, %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
LBB0_10:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, 52(%rbx)
	movl	%eax, 56(%rbx)
	movl	%r13d, 44(%rbx)
	movl	%r12d, 48(%rbx)
LBB0_13:
	leaq	-112(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_vulkan_set_projection
	testl	%r14d, %r14d
	jne	LBB0_15
## %bb.14:
	movl	%r13d, 8(%rbx)
	movl	%r12d, 12(%rbx)
LBB0_15:
	movups	44(%rbx), %xmm0
	cvtdq2ps	%xmm0, %xmm1
	movdqa	LCPI0_4(%rip), %xmm2            ## xmm2 = [1258291200,1258291200,1258291200,1258291200]
	pblendw	$85, %xmm0, %xmm2               ## xmm2 = xmm0[0],xmm2[1],xmm0[2],xmm2[3],xmm0[4],xmm2[5],xmm0[6],xmm2[7]
	psrld	$16, %xmm0
	pblendw	$170, LCPI0_5(%rip), %xmm0      ## xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
	subps	LCPI0_6(%rip), %xmm0
	addps	%xmm2, %xmm0
	shufps	$78, %xmm0, %xmm1               ## xmm1 = xmm1[2,3],xmm0[0,1]
	movups	%xmm1, 20(%rbx)
	movabsq	$4575657221408423936, %rax      ## imm = 0x3F80000000000000
	movq	%rax, 36(%rbx)
	movq	_VULKAN_DIRTY_DYNAMIC_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.vulkan_set_viewport.ortho
l___const.vulkan_set_viewport.ortho:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	4294967295                      ## 0xffffffff
	.long	1                               ## 0x1

	.comm	_VULKAN_DIRTY_DYNAMIC_BIT,4,2   ## @VULKAN_DIRTY_DYNAMIC_BIT
	.comm	_ASPECT_RATIO_CUSTOM,8,3        ## @ASPECT_RATIO_CUSTOM
	.no_dead_strip	_vulkan_set_viewport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vulkan_set_viewport
lCPI0_0:
	.long	0x00000000                      ; float 0
	.long	0x3f800000                      ; float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vulkan_set_viewport:                   ; @vulkan_set_viewport
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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 b8, -88
	.cfi_offset b9, -96
	mov	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ucvtf	s8, w1
	ucvtf	s9, w2
	fdiv	s0, s8, s9
	str	s0, [sp, #28]
Lloh0:
	adrp	x8, l___const.vulkan_set_viewport.ortho@PAGE
Lloh1:
	add	x8, x8, l___const.vulkan_set_viewport.ortho@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp]
	ldr	x8, [x8, #16]
	str	x8, [sp, #16]
	bl	_config_get_ptr
	mov	x24, x0
	add	x8, sp, #28
	str	x8, [sp, #32]
	stp	w23, w22, [sp, #40]
	add	x0, sp, #32
	bl	_video_context_driver_translate_aspect
	cbnz	w20, LBB0_3
; %bb.1:
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_3
; %bb.2:
	add	x24, x19, #44
	bl	_video_driver_get_aspect_ratio
	ldr	x3, [x19, #64]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	bl	_video_viewport_get_scaled_integer
	ldp	w23, w22, [x19, #44]
	b	LBB0_14
LBB0_3:
	cbnz	w20, LBB0_7
; %bb.4:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_7
; %bb.5:
	bl	_video_driver_get_aspect_ratio
	ldr	s1, [sp, #28]
	fabd	s2, s1, s0
	mov	w8, #46871
	movk	w8, #14545, lsl #16
	fmov	s3, w8
	fcmp	s2, s3
	b.pl	LBB0_8
; %bb.6:
	mov	w24, #0
	b	LBB0_11
LBB0_7:
	stp	wzr, wzr, [x19, #52]
	b	LBB0_13
LBB0_8:
	fcmp	s1, s0
	b.le	LBB0_10
; %bb.9:
	fdiv	s0, s0, s1
	fmov	s1, #-1.00000000
	fadd	s0, s0, s1
	fmov	s1, #0.50000000
	fmul	s0, s0, s1
	fadd	s9, s0, s1
	fsub	s0, s1, s9
	fmul	s0, s0, s8
	bl	_roundf
	mov	x25, x0
	fadd	s0, s8, s8
	fmul	s0, s0, s9
	bl	_roundf
	mov	x23, x0
	mov	w24, #0
	b	LBB0_12
LBB0_10:
	fdiv	s0, s1, s0
	fmov	s1, #-1.00000000
	fadd	s0, s0, s1
	fmov	s1, #0.50000000
	fmul	s0, s0, s1
	fadd	s8, s0, s1
	fsub	s0, s1, s8
	fmul	s0, s0, s9
	bl	_roundf
	mov	x24, x0
	fadd	s0, s9, s9
	fmul	s0, s0, s8
	bl	_roundf
	mov	x22, x0
LBB0_11:
	mov	w25, #0
LBB0_12:
	stp	w25, w24, [x19, #52]
LBB0_13:
	stp	w23, w22, [x19, #44]
LBB0_14:
	mov	x1, sp
	mov	x0, x19
	mov	x2, x21
	bl	_vulkan_set_projection
	cbnz	w20, LBB0_16
; %bb.15:
	stp	w23, w22, [x19, #8]
LBB0_16:
	ldur	q0, [x19, #44]
	scvtf.4s	v1, v0
	ucvtf.4s	v0, v0
	ext.16b	v0, v1, v0, #8
	stur	q0, [x19, #20]
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #36]
Lloh4:
	adrp	x8, _VULKAN_DIRTY_DYNAMIC_BIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VULKAN_DIRTY_DYNAMIC_BIT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.vulkan_set_viewport.ortho
l___const.vulkan_set_viewport.ortho:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.long	1                               ; 0x1

	.comm	_VULKAN_DIRTY_DYNAMIC_BIT,4,2   ; @VULKAN_DIRTY_DYNAMIC_BIT
	.comm	_ASPECT_RATIO_CUSTOM,8,3        ; @ASPECT_RATIO_CUSTOM
	.no_dead_strip	_vulkan_set_viewport
.subsections_via_symbols
