Skip to content

Instantly share code, notes, and snippets.

@mshockwave
Created June 1, 2022 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshockwave/cb154793ba19496c0ea96be99fe7e38f to your computer and use it in GitHub Desktop.
Save mshockwave/cb154793ba19496c0ea96be99fe7e38f to your computer and use it in GitHub Desktop.
; ModuleID = './sqlite3.O2.ll'
source_filename = "./sqlite3.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.sqlite3StatType = type { [10 x i64], [10 x i64] }
%struct.Sqlite3Config = type { i32, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, %struct.sqlite3_mem_methods, %struct.sqlite3_mutex_methods, %struct.sqlite3_pcache_methods2, i8*, i32, i32, i32, i64, i64, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.sqlite3_mutex*, void (i8*, i32, i8*)*, i8*, i64, i32 (i32)*, i32, i32, i32, i32 }
%struct.sqlite3_mem_methods = type { i8* (i32)*, void (i8*)*, i8* (i8*, i32)*, i32 (i8*)*, i32 (i32)*, i32 (i8*)*, void (i8*)*, i8* }
%struct.sqlite3_mutex_methods = type { i32 ()*, i32 ()*, %struct.sqlite3_mutex* (i32)*, void (%struct.sqlite3_mutex*)*, void (%struct.sqlite3_mutex*)*, i32 (%struct.sqlite3_mutex*)*, void (%struct.sqlite3_mutex*)*, i32 (%struct.sqlite3_mutex*)*, i32 (%struct.sqlite3_mutex*)* }
%struct.sqlite3_pcache_methods2 = type { i32, i8*, i32 (i8*)*, void (i8*)*, %struct.sqlite3_pcache* (i32, i32, i32)*, void (%struct.sqlite3_pcache*, i32)*, i32 (%struct.sqlite3_pcache*)*, %struct.sqlite3_pcache_page* (%struct.sqlite3_pcache*, i32, i32)*, void (%struct.sqlite3_pcache*, %struct.sqlite3_pcache_page*, i32)*, void (%struct.sqlite3_pcache*, %struct.sqlite3_pcache_page*, i32, i32)*, void (%struct.sqlite3_pcache*, i32)*, void (%struct.sqlite3_pcache*)*, void (%struct.sqlite3_pcache*)* }
%struct.sqlite3_pcache = type opaque
%struct.sqlite3_pcache_page = type { i8*, i8* }
%struct.sqlite3_mutex = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { %struct.__pthread_internal_list*, %struct.__pthread_internal_list* }
%struct.Mem0Global = type { %struct.sqlite3_mutex*, i64, i64, i32 }
%struct.sqlite3 = type { %struct.sqlite3_vfs*, %struct.Vdbe*, %struct.CollSeq*, %struct.sqlite3_mutex*, %struct.Db*, i32, i32, i64, i64, i64, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, [12 x i32], i32, %struct.sqlite3InitInfo, i32, i32, i32, i32, i32, i32, i8**, %union.anon.10, i8*, void (i8*, i8*, i64)*, i8*, i8*, i32 (i8*)*, i8*, void (i8*)*, i8*, void (i8*, i32, i8*, i8*, i64)*, %struct.Parse*, i32 (i8*, %struct.sqlite3*, i8*, i32)*, i8*, void (i8*, %struct.sqlite3*, i32, i8*)*, void (i8*, %struct.sqlite3*, i32, i8*)*, i8*, %struct.sqlite3_value*, %union.anon.11, %struct.Lookaside, i32 (i8*, i32, i8*, i8*, i8*, i8*)*, i8*, i32 (i8*)*, i8*, i32, i32, %struct.Hash, %struct.VtabCtx*, %struct.VTable**, %struct.VTable*, %struct.Hash, %struct.Hash, %struct.BusyHandler, [2 x %struct.Db], %struct.Savepoint*, i32, i32, i32, i32, i64, i64, i32* }
%struct.sqlite3_vfs = type { i32, i32, i32, %struct.sqlite3_vfs*, i8*, i8*, i32 (%struct.sqlite3_vfs*, i8*, %struct.sqlite3_file*, i32, i32*)*, i32 (%struct.sqlite3_vfs*, i8*, i32)*, i32 (%struct.sqlite3_vfs*, i8*, i32, i32*)*, i32 (%struct.sqlite3_vfs*, i8*, i32, i8*)*, i8* (%struct.sqlite3_vfs*, i8*)*, void (%struct.sqlite3_vfs*, i32, i8*)*, void ()* (%struct.sqlite3_vfs*, i8*, i8*)*, void (%struct.sqlite3_vfs*, i8*)*, i32 (%struct.sqlite3_vfs*, i32, i8*)*, i32 (%struct.sqlite3_vfs*, i32)*, i32 (%struct.sqlite3_vfs*, double*)*, i32 (%struct.sqlite3_vfs*, i32, i8*)*, i32 (%struct.sqlite3_vfs*, i64*)*, i32 (%struct.sqlite3_vfs*, i8*, void ()*)*, void ()* (%struct.sqlite3_vfs*, i8*)*, i8* (%struct.sqlite3_vfs*, i8*)* }
%struct.sqlite3_file = type { %struct.sqlite3_io_methods* }
%struct.sqlite3_io_methods = type { i32, i32 (%struct.sqlite3_file*)*, i32 (%struct.sqlite3_file*, i8*, i32, i64)*, i32 (%struct.sqlite3_file*, i8*, i32, i64)*, i32 (%struct.sqlite3_file*, i64)*, i32 (%struct.sqlite3_file*, i32)*, i32 (%struct.sqlite3_file*, i64*)*, i32 (%struct.sqlite3_file*, i32)*, i32 (%struct.sqlite3_file*, i32)*, i32 (%struct.sqlite3_file*, i32*)*, i32 (%struct.sqlite3_file*, i32, i8*)*, i32 (%struct.sqlite3_file*)*, i32 (%struct.sqlite3_file*)*, i32 (%struct.sqlite3_file*, i32, i32, i32, i8**)*, i32 (%struct.sqlite3_file*, i32, i32, i32)*, void (%struct.sqlite3_file*)*, i32 (%struct.sqlite3_file*, i32)*, i32 (%struct.sqlite3_file*, i64, i32, i8**)*, i32 (%struct.sqlite3_file*, i64, i8*)* }
%struct.Vdbe = type { %struct.sqlite3*, %struct.Vdbe*, %struct.Vdbe*, %struct.Parse*, i16, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, %struct.sqlite3_value*, %struct.sqlite3_value**, %struct.VdbeCursor**, %struct.sqlite3_value*, %struct.VdbeOp*, i32, i32, %struct.sqlite3_value*, %struct.sqlite3_value*, i8*, i32*, i64, i16, i8, i8, i8, i8, i16, i32, i32, [7 x i32], i8*, i8*, %struct.VdbeFrame*, %struct.VdbeFrame*, i32, i32, %struct.SubProgram*, %struct.AuxData* }
%struct.VdbeCursor = type { i8, i8, i8, i8, i8, i8, i16, %struct.Btree*, i64, i32*, i32, i32, %struct.VdbeCursor*, %union.anon.9, %struct.KeyInfo*, i32, i32, i16, i16, i64, i32*, i8*, i32, i32, [1 x i32] }
%struct.Btree = type { %struct.sqlite3*, %struct.BtShared*, i8, i8, i8, i8, i32, i32, i32, %struct.Btree*, %struct.Btree*, %struct.BtLock }
%struct.BtShared = type { %struct.Pager*, %struct.sqlite3*, %struct.BtCursor*, %struct.MemPage*, i8, i8, i8, i8, i8, i8, i8, i16, i16, i16, i16, i16, i32, i32, i32, i32, i8*, void (i8*)*, %struct.sqlite3_mutex*, %struct.Bitvec*, i32, %struct.BtShared*, %struct.BtLock*, %struct.Btree*, i8*, i32 }
%struct.Pager = type { %struct.sqlite3_vfs*, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, %struct.Bitvec*, %struct.sqlite3_file*, %struct.sqlite3_file*, %struct.sqlite3_file*, i64, i64, %struct.sqlite3_backup*, %struct.PagerSavepoint*, i32, i32, [16 x i8], i32, i64, %struct.PgHdr*, i16, i16, i32, i32, i32, i32, i64, i8*, i8*, i32 (i8*)*, i8*, [4 x i32], void (%struct.PgHdr*)*, i32 (%struct.Pager*, i32, %struct.PgHdr**, i32)*, i8*, %struct.PCache*, %struct.Wal*, i8* }
%struct.sqlite3_backup = type { %struct.sqlite3*, %struct.Btree*, i32, i32, i32, %struct.sqlite3*, %struct.Btree*, i32, i32, i32, i32, %struct.sqlite3_backup* }
%struct.PagerSavepoint = type { i64, i64, %struct.Bitvec*, i32, i32, i32, [4 x i32] }
%struct.PgHdr = type { %struct.sqlite3_pcache_page*, i8*, i8*, %struct.PCache*, %struct.PgHdr*, %struct.Pager*, i32, i16, i16, %struct.PgHdr*, %struct.PgHdr* }
%struct.PCache = type { %struct.PgHdr*, %struct.PgHdr*, %struct.PgHdr*, i32, i32, i32, i32, i32, i8, i8, i32 (i8*, %struct.PgHdr*)*, i8*, %struct.sqlite3_pcache* }
%struct.Wal = type { %struct.sqlite3_vfs*, %struct.sqlite3_file*, %struct.sqlite3_file*, i32, i64, i32, i32, i32**, i32, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, %struct.WalIndexHdr, i32, i32, i8*, i32 }
%struct.WalIndexHdr = type { i32, i32, i32, i8, i8, i16, i32, i32, [2 x i32], [2 x i32], [2 x i32] }
%struct.BtCursor = type { i8, i8, i8, i8, i32, %struct.Btree*, i32*, i8*, %struct.BtShared*, %struct.BtCursor*, %struct.CellInfo, i64, i32, i8, i8, i16, [19 x i16], %struct.KeyInfo*, %struct.MemPage*, [19 x %struct.MemPage*] }
%struct.CellInfo = type { i64, i8*, i32, i16, i16 }
%struct.MemPage = type { i8, i8, i8, i8, i32, i8, i8, i8, i8, i8, i16, i16, i16, i32, i16, i16, [4 x i16], [4 x i8*], %struct.BtShared*, i8*, i8*, i8*, i8*, %struct.PgHdr*, i16 (%struct.MemPage*, i8*)*, void (%struct.MemPage*, i8*, %struct.CellInfo*)* }
%struct.Bitvec = type { i32, i32, i32, %union.anon.12 }
%union.anon.12 = type { [62 x %struct.Bitvec*] }
%struct.BtLock = type { %struct.Btree*, i32, i8, %struct.BtLock* }
%union.anon.9 = type { %struct.BtCursor* }
%struct.KeyInfo = type { i32, i8, i16, i16, %struct.sqlite3*, i8*, [1 x %struct.CollSeq*] }
%struct.VdbeOp = type { i8, i8, i16, i32, i32, i32, %union.p4union }
%union.p4union = type { i8* }
%struct.VdbeFrame = type { %struct.Vdbe*, %struct.VdbeFrame*, %struct.VdbeOp*, i64*, %struct.sqlite3_value*, %struct.VdbeCursor**, i8*, i8*, i64, %struct.AuxData*, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.SubProgram = type { %struct.VdbeOp*, i32, i32, i32, i8*, i8*, %struct.SubProgram* }
%struct.AuxData = type { i32, i32, i8*, void (i8*)*, %struct.AuxData* }
%struct.CollSeq = type { i8*, i8, i8*, i32 (i8*, i32, i8*, i32, i8*)*, void (i8*)* }
%struct.Db = type { i8*, %struct.Btree*, i8, i8, %struct.Schema* }
%struct.Schema = type { i32, i32, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Table*, i8, i8, i16, i32 }
%struct.Table = type { i8*, %struct.Column*, %struct.Index*, %struct.Select*, %struct.FKey*, i8*, %struct.ExprList*, i32, i32, i32, i16, i16, i16, i16, i16, i8, i32, i32, i8**, %struct.VTable*, %struct.Trigger*, %struct.Schema* }
%struct.Column = type { i8*, %struct.Expr*, i8*, i8, i8, i8, i8, i16 }
%struct.Expr = type { i8, i8, i8, i32, %union.anon, %struct.Expr*, %struct.Expr*, %union.anon.0, i32, i32, i16, i16, i32, %struct.AggInfo*, %union.anon.4 }
%union.anon = type { i8* }
%union.anon.0 = type { %struct.ExprList* }
%struct.AggInfo = type { i8, i8, i32, i32, i32, i32, i32, %struct.ExprList*, %struct.AggInfo_col*, i32, i32, %struct.AggInfo_func*, i32, i32 }
%struct.AggInfo_col = type { %struct.Table*, %struct.Expr*, i32, i32, i16, i16 }
%struct.AggInfo_func = type { %struct.Expr*, %struct.FuncDef*, i32, i32, i32 }
%struct.FuncDef = type { i8, i32, i8*, %struct.FuncDef*, void (%struct.sqlite3_context*, i32, %struct.sqlite3_value**)*, void (%struct.sqlite3_context*)*, void (%struct.sqlite3_context*)*, void (%struct.sqlite3_context*, i32, %struct.sqlite3_value**)*, i8*, %union.anon.1 }
%struct.sqlite3_context = type { %struct.sqlite3_value*, %struct.FuncDef*, %struct.sqlite3_value*, %struct.Vdbe*, i32, i32, i8, i8, [1 x %struct.sqlite3_value*] }
%union.anon.1 = type { %struct.FuncDef* }
%union.anon.4 = type { %struct.Table* }
%struct.Index = type <{ i8*, i16*, i16*, %struct.Table*, i8*, %struct.Index*, %struct.Schema*, i8*, i8**, %struct.Expr*, %struct.ExprList*, i32, i16, i16, i16, i8, i16, [3 x i8], i64 }>
%struct.Select = type { i8, i16, i32, i32, i32, i32, [2 x i32], %struct.ExprList*, %struct.SrcList*, %struct.Expr*, %struct.ExprList*, %struct.Expr*, %struct.ExprList*, %struct.Select*, %struct.Select*, %struct.Expr*, %struct.With*, %struct.Window*, %struct.Window* }
%struct.SrcList = type { i32, i32, [1 x %struct.SrcItem] }
%struct.SrcItem = type { %struct.Schema*, i8*, i8*, i8*, %struct.Table*, %struct.Select*, i32, i32, i32, %struct.anon, i32, %struct.Expr*, %struct.IdList*, i64, %union.anon.2, %union.anon.3 }
%struct.anon = type <{ i8, i16, i8 }>
%struct.IdList = type { %struct.IdList_item*, i32 }
%struct.IdList_item = type { i8*, i32 }
%union.anon.2 = type { i8* }
%union.anon.3 = type { %struct.Index* }
%struct.With = type { i32, i32, %struct.With*, [1 x %struct.Cte] }
%struct.Cte = type { i8*, %struct.ExprList*, %struct.Select*, i8*, %struct.CteUse*, i8 }
%struct.CteUse = type { i32, i32, i32, i32, i16, i8 }
%struct.Window = type { i8*, i8*, %struct.ExprList*, %struct.ExprList*, i8, i8, i8, i8, i8, %struct.Expr*, %struct.Expr*, %struct.Window**, %struct.Window*, %struct.Expr*, %struct.FuncDef*, i32, i32, i32, i32, i32, i32, %struct.Expr*, i32, i32, i32, i32, i32, i8 }
%struct.FKey = type { %struct.Table*, %struct.FKey*, i8*, %struct.FKey*, %struct.FKey*, i32, i8, [2 x i8], [2 x %struct.Trigger*], [1 x %struct.sColMap] }
%struct.sColMap = type { i32, i8* }
%struct.ExprList = type { i32, i32, [1 x %struct.ExprList_item] }
%struct.ExprList_item = type { %struct.Expr*, i8*, i8, i8, %union.anon.6 }
%union.anon.6 = type { i32 }
%struct.sqlite3InitInfo = type { i32, i8, i8, i8, i8** }
%union.anon.10 = type { void (i8*, i8*)* }
%struct.Parse = type { %struct.sqlite3*, i8*, %struct.Vdbe*, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, %struct.ExprList*, %struct.Token, i32, i32, i32, i32, i32, i32, i32, %struct.TableLock*, %struct.AutoincInfo*, %struct.Parse*, %struct.Table*, %struct.Parse*, %union.anon.8, i32, i32, i32, i8, i8, i8, i8, [8 x i32], %struct.Token, %struct.Token, i16, i8, i8, i8, i32, i32, i32, i32*, %struct.Vdbe*, i8*, %struct.Table*, %struct.Index*, %struct.Trigger*, i8*, %struct.Token, %struct.Table**, %struct.TriggerPrg*, %struct.With*, %struct.ParseCleanup*, %struct.RenameToken* }
%struct.TableLock = type { i32, i32, i8, i8* }
%struct.AutoincInfo = type { %struct.AutoincInfo*, %struct.Table*, i32, i32 }
%union.anon.8 = type { %struct.Returning* }
%struct.Returning = type { %struct.Parse*, %struct.ExprList*, %struct.Trigger, %struct.TriggerStep, i32, i32, i32 }
%struct.Trigger = type { i8*, i8*, i8, i8, i8, %struct.Expr*, %struct.IdList*, %struct.Schema*, %struct.Schema*, %struct.TriggerStep*, %struct.Trigger* }
%struct.TriggerStep = type { i8, i8, %struct.Trigger*, %struct.Select*, i8*, %struct.SrcList*, %struct.Expr*, %struct.ExprList*, %struct.IdList*, %struct.Upsert*, i8*, %struct.TriggerStep*, %struct.TriggerStep* }
%struct.Upsert = type { %struct.ExprList*, %struct.Expr*, %struct.ExprList*, %struct.Expr*, %struct.Upsert*, i8, i8*, %struct.Index*, %struct.SrcList*, i32, i32, i32 }
%struct.Token = type { i8*, i32 }
%struct.TriggerPrg = type { %struct.Trigger*, %struct.TriggerPrg*, %struct.SubProgram*, i32, [2 x i32] }
%struct.ParseCleanup = type { %struct.ParseCleanup*, i8*, void (%struct.sqlite3*, i8*)* }
%struct.RenameToken = type { i8*, %struct.Token, %struct.RenameToken* }
%struct.sqlite3_value = type { %union.MemValue, i16, i8, i8, i32, i8*, i8*, i32, i32, %struct.sqlite3*, void (i8*)* }
%union.MemValue = type { double }
%union.anon.11 = type { double }
%struct.Lookaside = type { i32, i16, i16, i8, i32, [3 x i32], %struct.LookasideSlot*, %struct.LookasideSlot*, %struct.LookasideSlot*, %struct.LookasideSlot*, i8*, i8*, i8* }
%struct.LookasideSlot = type { %struct.LookasideSlot* }
%struct.VtabCtx = type { %struct.VTable*, %struct.Table*, %struct.VtabCtx*, i32 }
%struct.VTable = type { %struct.sqlite3*, %struct.Module*, %struct.sqlite3_vtab*, i32, i8, i8, i32, %struct.VTable* }
%struct.Module = type { %struct.sqlite3_module*, i8*, i32, i8*, void (i8*)*, %struct.Table* }
%struct.sqlite3_module = type { i32, i32 (%struct.sqlite3*, i8*, i32, i8**, %struct.sqlite3_vtab**, i8**)*, i32 (%struct.sqlite3*, i8*, i32, i8**, %struct.sqlite3_vtab**, i8**)*, i32 (%struct.sqlite3_vtab*, %struct.sqlite3_index_info*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*, %struct.sqlite3_vtab_cursor**)*, i32 (%struct.sqlite3_vtab_cursor*)*, i32 (%struct.sqlite3_vtab_cursor*, i32, i8*, i32, %struct.sqlite3_value**)*, i32 (%struct.sqlite3_vtab_cursor*)*, i32 (%struct.sqlite3_vtab_cursor*)*, i32 (%struct.sqlite3_vtab_cursor*, %struct.sqlite3_context*, i32)*, i32 (%struct.sqlite3_vtab_cursor*, i64*)*, i32 (%struct.sqlite3_vtab*, i32, %struct.sqlite3_value**, i64*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*, i32, i8*, void (%struct.sqlite3_context*, i32, %struct.sqlite3_value**)**, i8**)*, i32 (%struct.sqlite3_vtab*, i8*)*, i32 (%struct.sqlite3_vtab*, i32)*, i32 (%struct.sqlite3_vtab*, i32)*, i32 (%struct.sqlite3_vtab*, i32)*, i32 (i8*)* }
%struct.sqlite3_index_info = type { i32, %struct.sqlite3_index_constraint*, i32, %struct.sqlite3_index_orderby*, %struct.sqlite3_index_constraint_usage*, i32, i8*, i32, i32, double, i64, i32, i64 }
%struct.sqlite3_index_constraint = type { i32, i8, i8, i32 }
%struct.sqlite3_index_orderby = type { i32, i8 }
%struct.sqlite3_index_constraint_usage = type { i32, i8 }
%struct.sqlite3_vtab_cursor = type { %struct.sqlite3_vtab* }
%struct.sqlite3_vtab = type { %struct.sqlite3_module*, i32, i8* }
%struct.Hash = type { i32, i32, %struct.HashElem*, %struct._ht* }
%struct.HashElem = type { %struct.HashElem*, %struct.HashElem*, i8*, i8* }
%struct._ht = type { i32, %struct.HashElem* }
%struct.BusyHandler = type { i32 (i8*, i32)*, i8*, i32 }
%struct.Savepoint = type { i8*, i64, i64, %struct.Savepoint* }
@sqlite3Stat = external hidden unnamed_addr global %struct.sqlite3StatType, align 8
@sqlite3Config = external hidden global %struct.Sqlite3Config, align 8
@mem0 = external hidden unnamed_addr global %struct.Mem0Global, align 8
; Function Attrs: nounwind uwtable
define hidden fastcc void @sqlite3DeleteTrigger(%struct.sqlite3* %0, %struct.Trigger* %1) unnamed_addr #0 {
%3 = icmp eq %struct.Trigger* %1, null
br i1 %3, label %102, label %4
4: ; preds = %2
%5 = getelementptr inbounds %struct.Trigger, %struct.Trigger* %1, i64 0, i32 4
%6 = load i8, i8* %5, align 2, !tbaa !2
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %102
8: ; preds = %4
%9 = getelementptr inbounds %struct.Trigger, %struct.Trigger* %1, i64 0, i32 9
%10 = load %struct.TriggerStep*, %struct.TriggerStep** %9, align 8, !tbaa !7
tail call fastcc void @sqlite3DeleteTriggerStep(%struct.sqlite3* %0, %struct.TriggerStep* %10)
%11 = getelementptr inbounds %struct.Trigger, %struct.Trigger* %1, i64 0, i32 0
%12 = load i8*, i8** %11, align 8, !tbaa !8
tail call void @sqlite3DbFree(%struct.sqlite3* %0, i8* %12)
%13 = getelementptr inbounds %struct.Trigger, %struct.Trigger* %1, i64 0, i32 1
%14 = load i8*, i8** %13, align 8, !tbaa !9
tail call void @sqlite3DbFree(%struct.sqlite3* %0, i8* %14)
%15 = getelementptr inbounds %struct.Trigger, %struct.Trigger* %1, i64 0, i32 5
%16 = load %struct.Expr*, %struct.Expr** %15, align 8, !tbaa !10
%17 = icmp eq %struct.Expr* %16, null
br i1 %17, label %19, label %18
18: ; preds = %8
tail call fastcc void @sqlite3ExprDeleteNN(%struct.sqlite3* %0, %struct.Expr* nonnull %16) #2
br label %19
19: ; preds = %18, %8
%20 = getelementptr inbounds %struct.Trigger, %struct.Trigger* %1, i64 0, i32 6
%21 = load %struct.IdList*, %struct.IdList** %20, align 8, !tbaa !11
%22 = icmp eq %struct.IdList* %21, null
br i1 %22, label %100, label %23
23: ; preds = %19
%24 = getelementptr inbounds %struct.IdList, %struct.IdList* %21, i64 0, i32 1
%25 = load i32, i32* %24, align 8, !tbaa !12
%26 = icmp sgt i32 %25, 0
%27 = getelementptr inbounds %struct.IdList, %struct.IdList* %21, i64 0, i32 0
%28 = load %struct.IdList_item*, %struct.IdList_item** %27, align 8, !tbaa !15
br i1 %26, label %29, label %39
29: ; preds = %29, %23
%30 = phi i64 [ %34, %29 ], [ 0, %23 ]
%31 = phi %struct.IdList_item* [ %38, %29 ], [ %28, %23 ]
%32 = getelementptr inbounds %struct.IdList_item, %struct.IdList_item* %31, i64 %30, i32 0
%33 = load i8*, i8** %32, align 8, !tbaa !16
tail call void @sqlite3DbFree(%struct.sqlite3* %0, i8* %33) #2
%34 = add nuw nsw i64 %30, 1
%35 = load i32, i32* %24, align 8, !tbaa !12
%36 = sext i32 %35 to i64
%37 = icmp slt i64 %34, %36
%38 = load %struct.IdList_item*, %struct.IdList_item** %27, align 8, !tbaa !15
br i1 %37, label %29, label %39
39: ; preds = %29, %23
%40 = phi %struct.IdList_item* [ %28, %23 ], [ %38, %29 ]
%41 = bitcast %struct.IdList_item* %40 to i8*
tail call void @sqlite3DbFree(%struct.sqlite3* %0, i8* %41) #2
%42 = bitcast %struct.IdList* %21 to i8*
%43 = icmp eq %struct.sqlite3* %0, null
br i1 %43, label %77, label %44
44: ; preds = %39
%45 = getelementptr inbounds %struct.sqlite3, %struct.sqlite3* %0, i64 0, i32 83
%46 = load i32*, i32** %45, align 8, !tbaa !18
%47 = icmp eq i32* %46, null
br i1 %47, label %49, label %48
48: ; preds = %44
tail call fastcc void @measureAllocationSize(%struct.sqlite3* nonnull %0, i8* nonnull %42) #2
br label %100
49: ; preds = %44
%50 = ptrtoint %struct.IdList* %21 to i64
%51 = getelementptr inbounds %struct.sqlite3, %struct.sqlite3* %0, i64 0, i32 61, i32 12
%52 = bitcast i8** %51 to i64*
%53 = load i64, i64* %52, align 8, !tbaa !26
%54 = icmp ugt i64 %53, %50
br i1 %54, label %55, label %77
55: ; preds = %49
%56 = getelementptr inbounds %struct.sqlite3, %struct.sqlite3* %0, i64 0, i32 61, i32 10
%57 = bitcast i8** %56 to i64*
%58 = load i64, i64* %57, align 8, !tbaa !27
%59 = icmp ugt i64 %58, %50
br i1 %59, label %66, label %60
60: ; preds = %55
%61 = getelementptr inbounds %struct.sqlite3, %struct.sqlite3* %0, i64 0, i32 61, i32 9
%62 = bitcast %struct.LookasideSlot** %61 to i64*
%63 = load i64, i64* %62, align 8, !tbaa !28
%64 = bitcast %struct.IdList* %21 to i64*
store i64 %63, i64* %64, align 8, !tbaa !29
%65 = bitcast %struct.LookasideSlot** %61 to %struct.IdList**
store %struct.IdList* %21, %struct.IdList** %65, align 8, !tbaa !28
br label %100
66: ; preds = %55
%67 = getelementptr inbounds %struct.sqlite3, %struct.sqlite3* %0, i64 0, i32 61, i32 11
%68 = bitcast i8** %67 to i64*
%69 = load i64, i64* %68, align 8, !tbaa !31
%70 = icmp ugt i64 %69, %50
br i1 %70, label %77, label %71
71: ; preds = %66
%72 = getelementptr inbounds %struct.sqlite3, %struct.sqlite3* %0, i64 0, i32 61, i32 7
%73 = bitcast %struct.LookasideSlot** %72 to i64*
%74 = load i64, i64* %73, align 8, !tbaa !32
%75 = bitcast %struct.IdList* %21 to i64*
store i64 %74, i64* %75, align 8, !tbaa !29
%76 = bitcast %struct.LookasideSlot** %72 to %struct.IdList**
store %struct.IdList* %21, %struct.IdList** %76, align 8, !tbaa !32
br label %100
77: ; preds = %66, %49, %39
%78 = load i32, i32* getelementptr inbounds (%struct.Sqlite3Config, %struct.Sqlite3Config* @sqlite3Config, i64 0, i32 0), align 8, !tbaa !33
%79 = icmp eq i32 %78, 0
br i1 %79, label %98, label %80
80: ; preds = %77
%81 = load %struct.sqlite3_mutex*, %struct.sqlite3_mutex** getelementptr inbounds (%struct.Mem0Global, %struct.Mem0Global* @mem0, i64 0, i32 0), align 8, !tbaa !38
%82 = icmp eq %struct.sqlite3_mutex* %81, null
br i1 %82, label %85, label %83
83: ; preds = %80
%84 = load void (%struct.sqlite3_mutex*)*, void (%struct.sqlite3_mutex*)** getelementptr inbounds (%struct.Sqlite3Config, %struct.Sqlite3Config* @sqlite3Config, i64 0, i32 13, i32 4), align 8, !tbaa !40
tail call void %84(%struct.sqlite3_mutex* nonnull %81) #2
br label %85
85: ; preds = %83, %80
%86 = load i32 (i8*)*, i32 (i8*)** getelementptr inbounds (%struct.Sqlite3Config, %struct.Sqlite3Config* @sqlite3Config, i64 0, i32 12, i32 3), align 8, !tbaa !41
%87 = tail call i32 %86(i8* nonnull %42) #2
%88 = sext i32 %87 to i64
%89 = load i64, i64* getelementptr inbounds (%struct.sqlite3StatType, %struct.sqlite3StatType* @sqlite3Stat, i64 0, i32 0, i64 0), align 8, !tbaa !42
%90 = sub nsw i64 %89, %88
store i64 %90, i64* getelementptr inbounds (%struct.sqlite3StatType, %struct.sqlite3StatType* @sqlite3Stat, i64 0, i32 0, i64 0), align 8, !tbaa !42
%91 = load i64, i64* getelementptr inbounds (%struct.sqlite3StatType, %struct.sqlite3StatType* @sqlite3Stat, i64 0, i32 0, i64 9), align 8, !tbaa !42
%92 = add nsw i64 %91, -1
store i64 %92, i64* getelementptr inbounds (%struct.sqlite3StatType, %struct.sqlite3StatType* @sqlite3Stat, i64 0, i32 0, i64 9), align 8, !tbaa !42
%93 = load void (i8*)*, void (i8*)** getelementptr inbounds (%struct.Sqlite3Config, %struct.Sqlite3Config* @sqlite3Config, i64 0, i32 12, i32 1), align 8, !tbaa !43
tail call void %93(i8* nonnull %42) #2
%94 = load %struct.sqlite3_mutex*, %struct.sqlite3_mutex** getelementptr inbounds (%struct.Mem0Global, %struct.Mem0Global* @mem0, i64 0, i32 0), align 8, !tbaa !38
%95 = icmp eq %struct.sqlite3_mutex* %94, null
br i1 %95, label %100, label %96
96: ; preds = %85
%97 = load void (%struct.sqlite3_mutex*)*, void (%struct.sqlite3_mutex*)** getelementptr inbounds (%struct.Sqlite3Config, %struct.Sqlite3Config* @sqlite3Config, i64 0, i32 13, i32 6), align 8, !tbaa !44
tail call void %97(%struct.sqlite3_mutex* nonnull %94) #2
br label %100
98: ; preds = %77
%99 = load void (i8*)*, void (i8*)** getelementptr inbounds (%struct.Sqlite3Config, %struct.Sqlite3Config* @sqlite3Config, i64 0, i32 12, i32 1), align 8, !tbaa !43
tail call void %99(i8* nonnull %42) #2
br label %100
100: ; preds = %98, %96, %85, %71, %60, %48, %19
%101 = bitcast %struct.Trigger* %1 to i8*
tail call void @sqlite3DbFree(%struct.sqlite3* %0, i8* nonnull %101)
br label %102
102: ; preds = %100, %4, %2
ret void
}
; Function Attrs: nounwind uwtable
declare hidden void @sqlite3DbFree(%struct.sqlite3*, i8*) #0
; Function Attrs: noinline nounwind uwtable
declare hidden fastcc void @measureAllocationSize(%struct.sqlite3* readonly, i8*) unnamed_addr #1
; Function Attrs: noinline nounwind uwtable
declare hidden fastcc void @sqlite3ExprDeleteNN(%struct.sqlite3*, %struct.Expr*) unnamed_addr #1
; Function Attrs: nounwind uwtable
declare hidden fastcc void @sqlite3DeleteTriggerStep(%struct.sqlite3*, %struct.TriggerStep*) unnamed_addr #0
attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #2 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 10.0.0-4ubuntu1 "}
!2 = !{!3, !5, i64 18}
!3 = !{!"Trigger", !4, i64 0, !4, i64 8, !5, i64 16, !5, i64 17, !5, i64 18, !4, i64 24, !4, i64 32, !4, i64 40, !4, i64 48, !4, i64 56, !4, i64 64}
!4 = !{!"any pointer", !5, i64 0}
!5 = !{!"omnipotent char", !6, i64 0}
!6 = !{!"Simple C/C++ TBAA"}
!7 = !{!3, !4, i64 56}
!8 = !{!3, !4, i64 0}
!9 = !{!3, !4, i64 8}
!10 = !{!3, !4, i64 24}
!11 = !{!3, !4, i64 32}
!12 = !{!13, !14, i64 8}
!13 = !{!"IdList", !4, i64 0, !14, i64 8}
!14 = !{!"int", !5, i64 0}
!15 = !{!13, !4, i64 0}
!16 = !{!17, !4, i64 0}
!17 = !{!"IdList_item", !4, i64 0, !14, i64 8}
!18 = !{!19, !4, i64 728}
!19 = !{!"sqlite3", !4, i64 0, !4, i64 8, !4, i64 16, !4, i64 24, !4, i64 32, !14, i64 40, !14, i64 44, !20, i64 48, !20, i64 56, !20, i64 64, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !5, i64 96, !5, i64 97, !5, i64 98, !5, i64 99, !5, i64 100, !5, i64 101, !5, i64 102, !5, i64 103, !5, i64 104, !5, i64 105, !5, i64 106, !5, i64 107, !5, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !5, i64 128, !14, i64 176, !21, i64 184, !14, i64 200, !14, i64 204, !14, i64 208, !14, i64 212, !14, i64 216, !14, i64 220, !4, i64 224, !5, i64 232, !4, i64 240, !4, i64 248, !4, i64 256, !4, i64 264, !4, i64 272, !4, i64 280, !4, i64 288, !4, i64 296, !4, i64 304, !4, i64 312, !4, i64 320, !4, i64 328, !4, i64 336, !4, i64 344, !4, i64 352, !4, i64 360, !5, i64 368, !22, i64 376, !4, i64 464, !4, i64 472, !4, i64 480, !4, i64 488, !14, i64 496, !14, i64 500, !24, i64 504, !4, i64 528, !4, i64 536, !4, i64 544, !24, i64 552, !24, i64 576, !25, i64 600, !5, i64 624, !4, i64 688, !14, i64 696, !14, i64 700, !14, i64 704, !14, i64 708, !20, i64 712, !20, i64 720, !4, i64 728}
!20 = !{!"long long", !5, i64 0}
!21 = !{!"sqlite3InitInfo", !14, i64 0, !5, i64 4, !5, i64 5, !14, i64 6, !14, i64 6, !14, i64 6, !4, i64 8}
!22 = !{!"Lookaside", !14, i64 0, !23, i64 4, !23, i64 6, !5, i64 8, !14, i64 12, !5, i64 16, !4, i64 32, !4, i64 40, !4, i64 48, !4, i64 56, !4, i64 64, !4, i64 72, !4, i64 80}
!23 = !{!"short", !5, i64 0}
!24 = !{!"Hash", !14, i64 0, !14, i64 4, !4, i64 8, !4, i64 16}
!25 = !{!"BusyHandler", !4, i64 0, !4, i64 8, !14, i64 16}
!26 = !{!19, !4, i64 456}
!27 = !{!19, !4, i64 440}
!28 = !{!19, !4, i64 432}
!29 = !{!30, !4, i64 0}
!30 = !{!"LookasideSlot", !4, i64 0}
!31 = !{!19, !4, i64 448}
!32 = !{!19, !4, i64 416}
!33 = !{!34, !14, i64 0}
!34 = !{!"Sqlite3Config", !14, i64 0, !5, i64 4, !5, i64 5, !5, i64 6, !5, i64 7, !5, i64 8, !5, i64 9, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !35, i64 32, !36, i64 96, !37, i64 168, !4, i64 272, !14, i64 280, !14, i64 284, !14, i64 288, !20, i64 296, !20, i64 304, !4, i64 312, !14, i64 320, !14, i64 324, !14, i64 328, !14, i64 332, !14, i64 336, !14, i64 340, !14, i64 344, !14, i64 348, !14, i64 352, !14, i64 356, !14, i64 360, !4, i64 368, !4, i64 376, !4, i64 384, !20, i64 392, !4, i64 400, !14, i64 408, !14, i64 412, !14, i64 416, !14, i64 420}
!35 = !{!"sqlite3_mem_methods", !4, i64 0, !4, i64 8, !4, i64 16, !4, i64 24, !4, i64 32, !4, i64 40, !4, i64 48, !4, i64 56}
!36 = !{!"sqlite3_mutex_methods", !4, i64 0, !4, i64 8, !4, i64 16, !4, i64 24, !4, i64 32, !4, i64 40, !4, i64 48, !4, i64 56, !4, i64 64}
!37 = !{!"sqlite3_pcache_methods2", !14, i64 0, !4, i64 8, !4, i64 16, !4, i64 24, !4, i64 32, !4, i64 40, !4, i64 48, !4, i64 56, !4, i64 64, !4, i64 72, !4, i64 80, !4, i64 88, !4, i64 96}
!38 = !{!39, !4, i64 0}
!39 = !{!"Mem0Global", !4, i64 0, !20, i64 8, !20, i64 16, !14, i64 24}
!40 = !{!34, !4, i64 128}
!41 = !{!34, !4, i64 56}
!42 = !{!20, !20, i64 0}
!43 = !{!34, !4, i64 40}
!44 = !{!34, !4, i64 144}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment