Untitled diff

Created Diff never expires
37 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
122 lines
56 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
138 lines
.text
.text
.file ""
.file ""
.globl foo # -- Begin function foo
.globl foo # -- Begin function foo
.p2align 4, 0x90
.p2align 4, 0x90
.type foo,@function
.type foo,@function
foo: # @foo
foo: # @foo
.cfi_startproc
.cfi_startproc
# %bb.0: # %entry
# %bb.0: # %entry
pushq %rbp
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_def_cfa_offset 16
pushq %rbx
pushq %rbx
.cfi_def_cfa_offset 24
.cfi_def_cfa_offset 24
pushq %rax
pushq %rax
.cfi_def_cfa_offset 32
.cfi_def_cfa_offset 32
.cfi_offset %rbx, -24
.cfi_offset %rbx, -24
.cfi_offset %rbp, -16
.cfi_offset %rbp, -16
movl $1, %eax
movl $1, %eax
cmpl $1, %edi
cmpl $1, %edi
je .LBB0_3
je .LBB0_3
# %bb.1: # %lor.lhs.false
# %bb.1: # %lor.lhs.false
movl %edi, %ebx
movl %edi, %ebx
testl %edi, %edi
testl %edi, %edi
je .LBB0_3
je .LBB0_3
# %bb.2: # %if.else
# %bb.2: # %if.else
leal -1(%rbx), %edi
leal -1(%rbx), %edi
callq foo
callq foo
movl %eax, %ebp
movl %eax, %ebp
addl $-2, %ebx
addl $-2, %ebx
movl %ebx, %edi
movl %ebx, %edi
callq foo
callq foo
addl %ebp, %eax
addl %ebp, %eax
.LBB0_3: # %return
.LBB0_3: # %return
addq $8, %rsp
addq $8, %rsp
.cfi_def_cfa_offset 24
.cfi_def_cfa_offset 24
popq %rbx
popq %rbx
.cfi_def_cfa_offset 16
.cfi_def_cfa_offset 16
popq %rbp
popq %rbp
.cfi_def_cfa_offset 8
.cfi_def_cfa_offset 8
retq
retq
.Lfunc_end0:
.Lfunc_end0:
.size foo, .Lfunc_end0-foo
.size foo, .Lfunc_end0-foo
.cfi_endproc
.cfi_endproc
# -- End function
# -- End function
.globl main # -- Begin function main
.globl main # -- Begin function main
.p2align 4, 0x90
.p2align 4, 0x90
.type main,@function
.type main,@function
main: # @main
main: # @main
.cfi_startproc
.cfi_startproc
# %bb.0: # %entry
# %bb.0: # %entry
pushq %rbp
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_def_cfa_offset 16
pushq %r14
pushq %r15
.cfi_def_cfa_offset 24
.cfi_def_cfa_offset 24
pushq %rbx
pushq %r14
.cfi_def_cfa_offset 32
.cfi_def_cfa_offset 32
.cfi_offset %rbx, -32
pushq %r13
.cfi_offset %r14, -24
.cfi_def_cfa_offset 40
pushq %r12
.cfi_def_cfa_offset 48
pushq %rbx
.cfi_def_cfa_offset 56
pushq %rax
.cfi_def_cfa_offset 64
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
.cfi_offset %rbp, -16
.cfi_offset %rbp, -16
movl $50000, %r14d # imm = 0xC350
xorl %r13d, %r13d
xorl %ebx, %ebx
movl $50000, %r15d # imm = 0xC350
movl $9999, %ebp # imm = 0x270F
movl $9999, %r14d # imm = 0x270F
.p2align 4, 0x90
.p2align 4, 0x90
.LBB1_1: # %while.cond
.LBB1_1: # %while.cond
# =>This Inner Loop Header: Depth=1
# =>This Inner Loop Header: Depth=1
movl %ebp, %eax
movl %r14d, %eax
cltd
cltd
idivl %r14d
idivl %r15d
movl %edx, %r12d
movl %r13d, 4(%rsp) # 4-byte Spill
movslq %edx, %rdi
movslq %edx, %rdi
imulq $1717986919, %rdi, %rcx # imm = 0x66666667
imulq $1717986919, %rdi, %rbp # imm = 0x66666667
movq %rcx, %rdx
movq %rbp, %rbx
shrq $63, %rdx
shrq $63, %rbx
sarq $33, %rcx
sarq $33, %rbp
addl %edx, %ecx
leal (%rbx,%rbp), %ecx
leal (%rcx,%rcx,4), %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %edi
subl %ecx, %edi
movl %eax, %ebp
movl %eax, %r14d
# kill: def $edi killed $edi killed $rdi
# kill: def $edi killed $edi killed $rdi
callq foo
callq foo
cmpl $1, %r14d
movl %eax, %r13d
jne .LBB1_3
addl 4(%rsp), %r13d # 4-byte Folded Reload
# %bb.2: # in Loop: Header=BB1_1 Depth=1
cmpl $1, %r15d
movl $3, %ecx
je .LBB1_2
jmp .LBB1_4
# %bb.3: # %if.end
.p2align 4, 0x90
.LBB1_3: # %if.end
# in Loop: Header=BB1_1 Depth=1
imull %eax, %ebp
xorl %ecx, %ecx
.LBB1_4: # %cleanup
# in Loop: Header=BB1_1 Depth=1
addl %eax, %ebx
testl %ecx, %ecx
jne .LBB1_6
# %bb.5: # %cleanup.cont
# in Loop: Header=BB1_1 Depth=1
# in Loop: Header=BB1_1 Depth=1
addl $-1, %r14d
addl %ebx, %ebp
leal (%rbp,%rbp,4), %eax
subl %eax, %r12d
movl %r12d, %edi
callq foo
imull %eax, %r14d
addl $-1, %r15d
jmp .LBB1_1
jmp .LBB1_1
.LBB1_6: # %while.end
.LBB1_2: # %if.then
movl $.L.str, %edi
movl $.L.str, %edi
movl %ebx, %esi
movl %r13d, %esi
xorl %eax, %eax
xorl %eax, %eax
callq printf
callq printf
xorl %eax, %eax
xorl %eax, %eax
addq $8, %rsp
.cfi_def_cfa_offset 56
popq %rbx
popq %rbx
.cfi_def_cfa_offset 48
popq %r12
.cfi_def_cfa_offset 40
popq %r13
.cfi_def_cfa_offset 32
popq %r14
.cfi_def_cfa_offset 24
.cfi_def_cfa_offset 24
popq %r14
popq %r15
.cfi_def_cfa_offset 16
.cfi_def_cfa_offset 16
popq %rbp
popq %rbp
.cfi_def_cfa_offset 8
.cfi_def_cfa_offset 8
retq
retq
.Lfunc_end1:
.Lfunc_end1:
.size main, .Lfunc_end1-main
.size main, .Lfunc_end1-main
.cfi_endproc
.cfi_endproc
# -- End function
# -- End function
.type .L.str,@object # @.str
.type .L.str,@object # @.str
.section .rodata.str1.1,"aMS",@progbits,1
.section .rodata.str1.1,"aMS",@progbits,1
.L.str:
.L.str:
.asciz "%d\n"
.asciz "%d\n"
.size .L.str, 4
.size .L.str, 4


.ident "clang version 14.0.0 (https://github.com/llvm/llvm-project edff0070a126d9a27263958dbb22133f4ed6526e)"
.ident "clang version 14.0.0 (https://github.com/llvm/llvm-project edff0070a126d9a27263958dbb22133f4ed6526e)"
.section ".note.GNU-stack","",@progbits
.section ".note.GNU-stack","",@progbits