Skip to content

Instantly share code, notes, and snippets.

@carlos4242
Created February 6, 2021 17:31
Show Gist options
  • Save carlos4242/f1cfc203244fa031da7048f933b8e612 to your computer and use it in GitHub Desktop.
Save carlos4242/f1cfc203244fa031da7048f933b8e612 to your computer and use it in GitHub Desktop.
; ModuleID = 'main.ll'
source_filename = "main.ll"
target datalayout = "e-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8"
target triple = "avr-atmel-linux-gnueabihf"
%TSf = type <{ float }>
%T4main8TestModeO = type <{ i8 }>
%T4main4iLEDV = type <{ %Ts5UInt8V, [3 x i8], %T4main4iLEDV13Configuration33_2F33BF8CAB42E877BE364AC90BA6E106LLV, [2 x i8], %T4main4iLEDV5State33_2F33BF8CAB42E877BE364AC90BA6E106LLV }>
%Ts5UInt8V = type <{ i8 }>
%T4main4iLEDV13Configuration33_2F33BF8CAB42E877BE364AC90BA6E106LLV = type <{ %Ts6UInt16V, %TSb, %TSb, %Ts6UInt16V, [2 x i8], %T4main4iLEDV13AnimationModeO, %TSb, [2 x i8], %Ts6UInt32V, %Ts6UInt16V }>
%T4main4iLEDV13AnimationModeO = type <{ [17 x i8] }>
%TSb = type <{ i1 }>
%Ts6UInt32V = type <{ i32 }>
%Ts6UInt16V = type <{ i16 }>
%T4main4iLEDV5State33_2F33BF8CAB42E877BE364AC90BA6E106LLV = type <{ %TSb, [1 x i8], %TSay4main5ColorVG, %TSays6UInt32VG, %TSb, [1 x i8], %Ts6UInt16V, [2 x i8], %Ts6UInt32V }>
%TSay4main5ColorVG = type <{ %Ts15_AVRArrayBufferVy4main5ColorVG }>
%Ts15_AVRArrayBufferVy4main5ColorVG = type <{ %Ts10_ArrayBodyV, %TSry4main5ColorVG }>
%Ts10_ArrayBodyV = type <{ %TSo22_SwiftArrayBodyStorageV }>
%TSo22_SwiftArrayBodyStorageV = type <{ %Ts5Int16V, %Ts6UInt16V }>
%Ts5Int16V = type <{ i16 }>
%TSry4main5ColorVG = type <{ %TSpy4main5ColorVGSg, %TSi }>
%TSpy4main5ColorVGSg = type <{ [2 x i8] }>
%TSi = type <{ i16 }>
%TSays6UInt32VG = type <{ %Ts15_AVRArrayBufferVys6UInt32VG }>
%Ts15_AVRArrayBufferVys6UInt32VG = type <{ %Ts10_ArrayBodyV, %TSrys6UInt32VG }>
%TSrys6UInt32VG = type <{ %TSpys6UInt32VGSg, %TSi }>
%TSpys6UInt32VGSg = type <{ [2 x i8] }>
%T4main12DigitalInputV = type <{ %Ts5UInt8V, [3 x i8], %T4main12DigitalInputV13Configuration33_17CFA3273C585E55D9920B2EE0325569LLV, %T4main12DigitalInputV5State33_17CFA3273C585E55D9920B2EE0325569LLV }>
%T4main12DigitalInputV13Configuration33_17CFA3273C585E55D9920B2EE0325569LLV = type <{ %TSb, %TSb, i8*, %T4main12UnitIntervalVySfG, %Ts5UInt8V, %Ts5UInt8V }>
%T4main12UnitIntervalVySfG = type <{ %T4main8ClampingVySfG }>
%T4main8ClampingVySfG = type <{ %TSf, %TSNySfG }>
%TSNySfG = type <{ %TSf, %TSf }>
%T4main12DigitalInputV5State33_17CFA3273C585E55D9920B2EE0325569LLV = type <{ %TSb, %TSb, %Ts5UInt8V, %Ts5UInt8V }>
%T4main3LEDV = type <{ %Ts5UInt8V, [3 x i8], %T4main3LEDV13Configuration33_3D6DD764995AD91A57AF078F63C5A433LLV, %T4main3LEDV5State33_3D6DD764995AD91A57AF078F63C5A433LLV }>
%T4main3LEDV13Configuration33_3D6DD764995AD91A57AF078F63C5A433LLV = type <{ %Ts5UInt8V, %Ts5UInt8V, [2 x i8], %Ts6UInt32V, %Ts6UInt32V, %Ts6UInt32V, %Ts6UInt32V }>
%T4main3LEDV5State33_3D6DD764995AD91A57AF078F63C5A433LLV = type <{ %TSb, %T4main3LEDV9UserStateO, [2 x i8], %Ts6UInt32V, %Ts5UInt8V, %Ts5UInt8V, %Ts5UInt8V, %TSb, %TSb }>
%T4main3LEDV9UserStateO = type <{ i8 }>
%T4main11AnalogInputV = type <{ %Ts5UInt8V, [3 x i8], %T4main11AnalogInputV13Configuration33_7F57748A1D302A4EFB2BF2F604494FF8LLV, [2 x i8], %T4main11AnalogInputV5State33_7F57748A1D302A4EFB2BF2F604494FF8LLV }>
%T4main11AnalogInputV13Configuration33_7F57748A1D302A4EFB2BF2F604494FF8LLV = type <{ %TSb, [3 x i8], %T4main12UnitIntervalVySfG, i8* }>
%T4main11AnalogInputV5State33_7F57748A1D302A4EFB2BF2F604494FF8LLV = type <{ %TSb, [1 x i8], %Ts6UInt16V, %Ts6UInt16V, [2 x i8], %TSf }>
%T4main5BoardV = type <{ %T4main5BoardV0B4TypeO, [1 x i8], i8* }>
%T4main5BoardV0B4TypeO = type <{ i8 }>
%swift.enum_vwtable = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i16, i16, i32, i32, i8*, i8*, i8* }
%swift.protocol_conformance_descriptor = type { i16, i16, i16, i32 }
%swift.type = type { i16 }
%swift.protocol = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, i32, i16, i16 }
%swift.type_metadata_record = type { i16 }
%Ts6HasherV = type <{ %Ts6HasherV5_CoreV }>
%Ts6HasherV5_CoreV = type <{ %Ts6HasherV11_TailBufferV, %Ts6HasherV6_StateV }>
%Ts6HasherV11_TailBufferV = type <{ %Ts6UInt64V }>
%Ts6UInt64V = type <{ i64 }>
%Ts6HasherV6_StateV = type <{ %Ts6UInt64V, %Ts6UInt64V, %Ts6UInt64V, %Ts6UInt64V, %Ts6UInt64V, %Ts6UInt64V, %Ts6UInt64V, %Ts6UInt64V }>
%TSay4main8TestModeOG = type <{ %Ts15_AVRArrayBufferVy4main8TestModeOG }>
%Ts15_AVRArrayBufferVy4main8TestModeOG = type <{ %Ts10_ArrayBodyV, %TSry4main8TestModeOG }>
%TSry4main8TestModeOG = type <{ %TSpy4main8TestModeOGSg, %TSi }>
%TSpy4main8TestModeOGSg = type <{ [2 x i8] }>
%swift.opaque = type opaque
%swift.metadata_response = type { %swift.type*, i16 }
@"$s4main9sliderHueSfvp" = hidden local_unnamed_addr global %TSf zeroinitializer, align 4
@"$s4main16sliderSaturationSfvp" = hidden local_unnamed_addr global %TSf zeroinitializer, align 4
@"$s4main16sliderBrightnessSfvp" = hidden local_unnamed_addr global %TSf zeroinitializer, align 4
@"$s4main10sliderTimeSfvp" = hidden local_unnamed_addr global %TSf zeroinitializer, align 4
@"$s4main4modeAA8TestModeOvp" = hidden local_unnamed_addr global %T4main8TestModeO zeroinitializer, align 1
@"$s4main6rgbLEDAA01iC0Vvp" = hidden global %T4main4iLEDV zeroinitializer, align 4
@"$s4main9dsButton1AA12DigitalInputVvp" = hidden global %T4main12DigitalInputV zeroinitializer, align 4
@"$s4main9dsButton2AA12DigitalInputVvp" = hidden global %T4main12DigitalInputV zeroinitializer, align 4
@"$s4main9dsButton3AA12DigitalInputVvp" = hidden global %T4main12DigitalInputV zeroinitializer, align 4
@"$s4main6dsLED1AA3LEDVvp" = hidden global %T4main3LEDV zeroinitializer, align 4
@"$s4main6dsLED2AA3LEDVvp" = hidden global %T4main3LEDV zeroinitializer, align 4
@"$s4main12dsSliderLED1AA3LEDVvp" = hidden global %T4main3LEDV zeroinitializer, align 4
@"$s4main12dsSliderLED2AA3LEDVvp" = hidden global %T4main3LEDV zeroinitializer, align 4
@"$s4main12dsSliderLED3AA3LEDVvp" = hidden global %T4main3LEDV zeroinitializer, align 4
@"$s4main9dsSlider1AA11AnalogInputVvp" = hidden global %T4main11AnalogInputV zeroinitializer, align 4
@"$s4main9dsSlider2AA11AnalogInputVvp" = hidden global %T4main11AnalogInputV zeroinitializer, align 4
@"$s4main9dsSlider3AA11AnalogInputVvp" = hidden global %T4main11AnalogInputV zeroinitializer, align 4
@"$s4main5boardAA5BoardVvp" = hidden local_unnamed_addr global %T4main5BoardV zeroinitializer, align 2
@"$s4main20lastBoardUpdateTickss6UInt32Vvp" = external hidden local_unnamed_addr global %Ts6UInt32V, align 4
@"$s4main8TestModeOWV" = linkonce_odr hidden constant %swift.enum_vwtable { i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy1_1 to i8*), i8* bitcast (void (i8*, %swift.type*)* @__swift_noop_void_return to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy1_1 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy1_1 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy1_1 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy1_1 to i8*), i8* bitcast (i32 (%swift.opaque*, i32, %swift.type*)* @"$s4main8TestModeOwet" to i8*), i8* bitcast (void (%swift.opaque*, i32, i32, %swift.type*)* @"$s4main8TestModeOwst" to i8*), i16 1, i16 1, i32 2097152, i32 251, i8* bitcast (i32 (%swift.opaque*, %swift.type*)* @"$s4main8TestModeOwug" to i8*), i8* bitcast (void (%swift.opaque*, %swift.type*)* @"$s4main8TestModeOwup" to i8*), i8* bitcast (void (%swift.opaque*, i32, %swift.type*)* @"$s4main8TestModeOwui" to i8*) }, align 2
@0 = private constant [5 x i8] c"main\00"
@"$s4mainMXM" = linkonce_odr hidden constant <{ i32, i32, i16 }> <{ i32 0, i32 0, i16 sub (i16 ptrtoint ([5 x i8]* @0 to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ i32, i32, i16 }>, <{ i32, i32, i16 }>* @"$s4mainMXM", i32 0, i32 2) to i16)) }>, section ".rodata", align 4
@1 = private constant [9 x i8] c"TestMode\00"
@"$s4main8TestModeOMn" = hidden constant <{ i32, i16, i16, i16, i16, i32, i32 }> <{ i32 82, i16 sub (i16 ptrtoint (<{ i32, i32, i16 }>* @"$s4mainMXM" to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ i32, i16, i16, i16, i16, i32, i32 }>, <{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn", i32 0, i32 1) to i16)), i16 sub (i16 ptrtoint ([9 x i8]* @1 to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ i32, i16, i16, i16, i16, i32, i32 }>, <{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn", i32 0, i32 2) to i16)), i16 sub (i16 ptrtoint (%swift.metadata_response (i16)* @"$s4main8TestModeOMa" to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ i32, i16, i16, i16, i16, i32, i32 }>, <{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn", i32 0, i32 3) to i16)), i16 sub (i16 ptrtoint ({ i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }* @"$s4main8TestModeOMF" to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ i32, i16, i16, i16, i16, i32, i32 }>, <{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn", i32 0, i32 4) to i16)), i32 0, i32 5 }>, section ".rodata", align 4
@"$s4main8TestModeOMf" = linkonce_odr hidden constant <{ i8**, i16, <{ i32, i16, i16, i16, i16, i32, i32 }>* }> <{ i8** getelementptr inbounds (%swift.enum_vwtable, %swift.enum_vwtable* @"$s4main8TestModeOWV", i32 0, i32 0), i16 513, <{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn" }>, align 2
@"symbolic _____ 4main8TestModeO" = linkonce_odr hidden constant <{ i8, i16, i8 }> <{ i8 1, i16 sub (i16 ptrtoint (<{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn" to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ i8, i16, i8 }>, <{ i8, i16, i8 }>* @"symbolic _____ 4main8TestModeO", i32 0, i32 1) to i16)), i8 0 }>, section "swift5_typeref", align 2
@2 = private constant [17 x i8] c"allStandardColor\00", section "swift5_reflstr"
@3 = private constant [15 x i8] c"allCustomColor\00", section "swift5_reflstr"
@4 = private constant [11 x i8] c"allRainbow\00", section "swift5_reflstr"
@5 = private constant [14 x i8] c"colorGradient\00", section "swift5_reflstr"
@6 = private constant [13 x i8] c"randomColors\00", section "swift5_reflstr"
@"$s4main8TestModeOMF" = linkonce_odr hidden constant { i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 } { i16 sub (i16 ptrtoint (<{ i8, i16, i8 }>* @"symbolic _____ 4main8TestModeO" to i16), i16 ptrtoint ({ i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }* @"$s4main8TestModeOMF" to i16)), i32 0, i16 2, i16 12, i32 5, i32 0, i32 0, i16 sub (i16 ptrtoint ([17 x i8]* @2 to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }, { i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }* @"$s4main8TestModeOMF", i32 0, i32 7) to i16)), i32 0, i32 0, i16 sub (i16 ptrtoint ([15 x i8]* @3 to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }, { i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }* @"$s4main8TestModeOMF", i32 0, i32 10) to i16)), i32 0, i32 0, i16 sub (i16 ptrtoint ([11 x i8]* @4 to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }, { i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }* @"$s4main8TestModeOMF", i32 0, i32 13) to i16)), i32 0, i32 0, i16 sub (i16 ptrtoint ([14 x i8]* @5 to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }, { i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }* @"$s4main8TestModeOMF", i32 0, i32 16) to i16)), i32 0, i32 0, i16 sub (i16 ptrtoint ([13 x i8]* @6 to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }, { i16, i32, i16, i16, i32, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16, i32, i32, i16 }* @"$s4main8TestModeOMF", i32 0, i32 19) to i16)) }, section "swift5_fieldmd", align 4
@"$sSay4main8TestModeOGSayxGSlsWL" = linkonce_odr hidden local_unnamed_addr global i8** null, align 2
@"$sSayxGSlsMc" = external global %swift.protocol_conformance_descriptor, align 4
@"$sSay4main8TestModeOGML" = linkonce_odr hidden local_unnamed_addr global %swift.type* null, align 2
@"associated conformance 4main8TestModeOs12CaseIterableAA8AllCasessADP_Sl" = linkonce_odr hidden constant <{ i8, i8, i16, i8 }> <{ i8 -1, i8 7, i16 sub (i16 ptrtoint (i8** (%swift.type*, %swift.type*, i8**)* @"$s4main8TestModeOs12CaseIterableAA8AllCasessADP_SlWT" to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ i8, i8, i16, i8 }>, <{ i8, i8, i16, i8 }>* @"associated conformance 4main8TestModeOs12CaseIterableAA8AllCasessADP_Sl", i32 0, i32 2) to i16)), i8 0 }>, section "swift5_typeref", align 2
@"symbolic Say_____G 4main8TestModeO" = linkonce_odr hidden constant <{ [3 x i8], i8, i16, [1 x i8], i8 }> <{ [3 x i8] c"Say", i8 1, i16 sub (i16 ptrtoint (<{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn" to i16), i16 ptrtoint (i16* getelementptr inbounds (<{ [3 x i8], i8, i16, [1 x i8], i8 }>, <{ [3 x i8], i8, i16, [1 x i8], i8 }>* @"symbolic Say_____G 4main8TestModeO", i32 0, i32 2) to i16)), [1 x i8] c"G", i8 0 }>, section "swift5_typeref", align 2
@"$s4main8TestModeOs12CaseIterableAAWP" = hidden global [4 x i8*] [i8* bitcast ({ i16, i16, i16, i32, i16, i16, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMc" to i8*), i8* getelementptr (i8, i8* getelementptr inbounds (<{ i8, i8, i16, i8 }>, <{ i8, i8, i16, i8 }>* @"associated conformance 4main8TestModeOs12CaseIterableAA8AllCasessADP_Sl", i32 0, i32 0), i16 1), i8* getelementptr inbounds (<{ [3 x i8], i8, i16, [1 x i8], i8 }>, <{ [3 x i8], i8, i16, [1 x i8], i8 }>* @"symbolic Say_____G 4main8TestModeO", i32 0, i32 0, i64 1), i8* bitcast (void (%TSay4main8TestModeOG*, %swift.type*, %swift.type*, i8**)* @"$s4main8TestModeOs12CaseIterableAAsADP8allCases03AllG0QzvgZTW" to i8*)], align 2
@"$s4main8TestModeOSHAAMc" = hidden constant %swift.protocol_conformance_descriptor { i16 add (i16 sub (i16 ptrtoint (%swift.protocol** @"got.$sSHMp" to i16), i16 ptrtoint (%swift.protocol_conformance_descriptor* @"$s4main8TestModeOSHAAMc" to i16)), i16 1), i16 sub (i16 ptrtoint (<{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn" to i16), i16 ptrtoint (i16* getelementptr inbounds (%swift.protocol_conformance_descriptor, %swift.protocol_conformance_descriptor* @"$s4main8TestModeOSHAAMc", i32 0, i32 1) to i16)), i16 sub (i16 ptrtoint ([5 x i8*]* @"$s4main8TestModeOSHAAWP" to i16), i16 ptrtoint (i16* getelementptr inbounds (%swift.protocol_conformance_descriptor, %swift.protocol_conformance_descriptor* @"$s4main8TestModeOSHAAMc", i32 0, i32 2) to i16)), i32 0 }, section ".rodata", align 4
@"$s4main8TestModeOSHAAWP" = hidden constant [5 x i8*] [i8* bitcast (%swift.protocol_conformance_descriptor* @"$s4main8TestModeOSHAAMc" to i8*), i8* bitcast ([2 x i8*]* @"$s4main8TestModeOSQAAWP" to i8*), i8* bitcast (i16 (%T4main8TestModeO*, %swift.type*, i8**)* @"$s4main8TestModeOSHAASH9hashValueSivgTW" to i8*), i8* bitcast (void (%Ts6HasherV*, %T4main8TestModeO*, %swift.type*, i8**)* @"$s4main8TestModeOSHAASH4hash4intoys6HasherVz_tFTW" to i8*), i8* bitcast (i16 (i16, %T4main8TestModeO*, %swift.type*, i8**)* @"$s4main8TestModeOSHAASH13_rawHashValue4seedS2i_tFTW" to i8*)], align 2
@"$s4main8TestModeOSQAAMc" = hidden constant %swift.protocol_conformance_descriptor { i16 add (i16 sub (i16 ptrtoint (%swift.protocol** @"got.$sSQMp" to i16), i16 ptrtoint (%swift.protocol_conformance_descriptor* @"$s4main8TestModeOSQAAMc" to i16)), i16 1), i16 sub (i16 ptrtoint (<{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn" to i16), i16 ptrtoint (i16* getelementptr inbounds (%swift.protocol_conformance_descriptor, %swift.protocol_conformance_descriptor* @"$s4main8TestModeOSQAAMc", i32 0, i32 1) to i16)), i16 sub (i16 ptrtoint ([2 x i8*]* @"$s4main8TestModeOSQAAWP" to i16), i16 ptrtoint (i16* getelementptr inbounds (%swift.protocol_conformance_descriptor, %swift.protocol_conformance_descriptor* @"$s4main8TestModeOSQAAMc", i32 0, i32 2) to i16)), i32 0 }, section ".rodata", align 4
@"$s4main8TestModeOSQAAWP" = hidden constant [2 x i8*] [i8* bitcast (%swift.protocol_conformance_descriptor* @"$s4main8TestModeOSQAAMc" to i8*), i8* bitcast (i1 (%T4main8TestModeO*, %T4main8TestModeO*, %swift.type*, %swift.type*, i8**)* @"$s4main8TestModeOSQAASQ2eeoiySbx_xtFZTW" to i8*)], align 2
@"symbolic $ss12CaseIterableP" = linkonce_odr hidden constant <{ [18 x i8], i8 }> <{ [18 x i8] c"$ss12CaseIterableP", i8 0 }>, section "swift5_typeref", align 2
@7 = private constant [9 x i8] c"AllCases\00", section "swift5_reflstr"
@"$s4main8TestModeOs12CaseIterableAAMA" = linkonce_odr hidden constant { i16, i16, i32, i32, i16, i16 } { i16 sub (i16 ptrtoint (<{ i8, i16, i8 }>* @"symbolic _____ 4main8TestModeO" to i16), i16 ptrtoint ({ i16, i16, i32, i32, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMA" to i16)), i16 sub (i16 ptrtoint (<{ [18 x i8], i8 }>* @"symbolic $ss12CaseIterableP" to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i16, i32, i32, i16, i16 }, { i16, i16, i32, i32, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMA", i32 0, i32 1) to i16)), i32 1, i32 8, i16 sub (i16 ptrtoint ([9 x i8]* @7 to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i16, i32, i32, i16, i16 }, { i16, i16, i32, i32, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMA", i32 0, i32 4) to i16)), i16 sub (i16 ptrtoint (<{ [3 x i8], i8, i16, [1 x i8], i8 }>* @"symbolic Say_____G 4main8TestModeO" to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i16, i32, i32, i16, i16 }, { i16, i16, i32, i32, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMA", i32 0, i32 5) to i16)) }, section "swift5_assocty", align 4
@"$ss12CaseIterableMp" = external global %swift.protocol, align 4
@"got.$ss12CaseIterableMp" = private unnamed_addr constant %swift.protocol* @"$ss12CaseIterableMp"
@"$s4main8TestModeOs12CaseIterableAAMcMK" = internal global [16 x i8*] zeroinitializer
@"$s4main8TestModeOs12CaseIterableAAMc" = hidden constant { i16, i16, i16, i32, i16, i16, i16, i16 } { i16 add (i16 sub (i16 ptrtoint (%swift.protocol** @"got.$ss12CaseIterableMp" to i16), i16 ptrtoint ({ i16, i16, i16, i32, i16, i16, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMc" to i16)), i16 1), i16 sub (i16 ptrtoint (<{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn" to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i16, i16, i32, i16, i16, i16, i16 }, { i16, i16, i16, i32, i16, i16, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMc", i32 0, i32 1) to i16)), i16 sub (i16 ptrtoint ([4 x i8*]* @"$s4main8TestModeOs12CaseIterableAAWP" to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i16, i16, i32, i16, i16, i16, i16 }, { i16, i16, i16, i32, i16, i16, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMc", i32 0, i32 2) to i16)), i32 131072, i16 4, i16 1, i16 0, i16 sub (i16 ptrtoint ([16 x i8*]* @"$s4main8TestModeOs12CaseIterableAAMcMK" to i16), i16 ptrtoint (i16* getelementptr inbounds ({ i16, i16, i16, i32, i16, i16, i16, i16 }, { i16, i16, i16, i32, i16, i16, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMc", i32 0, i32 7) to i16)) }, section ".rodata", align 4
@"$sSHMp" = external global %swift.protocol, align 4
@"got.$sSHMp" = private unnamed_addr constant %swift.protocol* @"$sSHMp"
@"$sSQMp" = external global %swift.protocol, align 4
@"got.$sSQMp" = private unnamed_addr constant %swift.protocol* @"$sSQMp"
@"\01l_protocol_conformances" = private constant [3 x i16] [i16 sub (i16 ptrtoint ({ i16, i16, i16, i32, i16, i16, i16, i16 }* @"$s4main8TestModeOs12CaseIterableAAMc" to i16), i16 ptrtoint ([3 x i16]* @"\01l_protocol_conformances" to i16)), i16 sub (i16 ptrtoint (%swift.protocol_conformance_descriptor* @"$s4main8TestModeOSHAAMc" to i16), i16 ptrtoint (i16* getelementptr inbounds ([3 x i16], [3 x i16]* @"\01l_protocol_conformances", i32 0, i32 1) to i16)), i16 sub (i16 ptrtoint (%swift.protocol_conformance_descriptor* @"$s4main8TestModeOSQAAMc" to i16), i16 ptrtoint (i16* getelementptr inbounds ([3 x i16], [3 x i16]* @"\01l_protocol_conformances", i32 0, i32 2) to i16))], section "swift5_protocol_conformances", align 4
@"\01l_type_metadata_table" = private constant [1 x %swift.type_metadata_record] [%swift.type_metadata_record { i16 sub (i16 ptrtoint (<{ i32, i16, i16, i16, i16, i32, i32 }>* @"$s4main8TestModeOMn" to i16), i16 ptrtoint ([1 x %swift.type_metadata_record]* @"\01l_type_metadata_table" to i16)) }], section "swift5_type_metadata", align 4
; this is the function that cant compile...
define linkonce_odr hidden swiftcc void @"$s4main4modeAA8TestModeOvW"() local_unnamed_addr #1 {
entry:
%0 = tail call swiftcc i32 @"$ss6UInt32V4mainE16fromTimeIntervalABSf_tcfCTf4nd_n"(float 0x3FB99999A0000000)
tail call swiftcc void @"$s4main4iLEDV7animate33_2F33BF8CAB42E877BE364AC90BA6E106LL_9tickCount6frames8reversesyAC13AnimationModeO_s6UInt32Vs6UInt16VSbtF"(i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i8 -96, i32 %0, i16 0, i1 false, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
%1 = load i8, i8* getelementptr inbounds (%T4main8TestModeO, %T4main8TestModeO* @"$s4main4modeAA8TestModeOvp", i16 0, i32 0), align 1
switch i8 %1, label %2 [
i8 0, label %3
i8 1, label %20
i8 2, label %9
i8 3, label %20
i8 4, label %14
]
2: ; preds = %entry
unreachable
3: ; preds = %entry
%4 = tail call swiftcc i16 @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtFfA0_"()
%5 = tail call swiftcc { i16, i8 } @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtFfA1_"()
%6 = extractvalue { i16, i8 } %5, 0
%7 = extractvalue { i16, i8 } %5, 1
%8 = and i8 %7, 1
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 true, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, i16 %4, i16 %6, i8 %8, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, i16 0, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FB5555560000000, float 1.000000e+00, float 1.000000e+00, i16 1, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FC5555560000000, float 1.000000e+00, float 1.000000e+00, i16 2, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 2.500000e-01, float 1.000000e+00, float 1.000000e+00, i16 3, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FD5555560000000, float 1.000000e+00, float 1.000000e+00, i16 4, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FDAAAAAA0000000, float 1.000000e+00, float 1.000000e+00, i16 5, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 5.000000e-01, float 1.000000e+00, float 1.000000e+00, i16 6, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FE2AAAAA0000000, float 1.000000e+00, float 1.000000e+00, i16 7, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FE5555560000000, float 1.000000e+00, float 1.000000e+00, i16 8, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 7.500000e-01, float 1.000000e+00, float 1.000000e+00, i16 9, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FEAAAAAA0000000, float 1.000000e+00, float 1.000000e+00, i16 10, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
tail call swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1 false, float 0x3FED555560000000, float 1.000000e+00, float 1.000000e+00, i16 11, i16 1, i8 0, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
br label %20
9: ; preds = %entry
%10 = load float, float* getelementptr inbounds (%TSf, %TSf* @"$s4main16sliderBrightnessSfvp", i16 0, i32 0), align 4
%11 = fcmp ogt float %10, 1.000000e+00
%. = select i1 %11, float 1.000000e+00, float %10
%12 = fcmp oge float %., 0.000000e+00
%13 = select i1 %12, float %., float 0.000000e+00
tail call swiftcc void @"$s4main4iLEDV13colorGradient5first4last5index5countyAA5ColorV_AJs6UInt16VALSgtF"(i1 false, float 0.000000e+00, float 1.000000e+00, float %13, i1 false, float 0x3FED555560000000, float 1.000000e+00, float %13, i16 0, i16 0, i8 1, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
br label %20
14: ; preds = %entry
%15 = load i32, i32* bitcast (%TSf* @"$s4main16sliderBrightnessSfvp" to i32*), align 4
%16 = trunc i32 %15 to i16
%17 = lshr i32 %15, 16
%18 = trunc i32 %17 to i16
%19 = tail call swiftcc i32 @"$ss6UInt32V4mainE16fromTimeIntervalABSf_tcfCTf4nd_n"(float 1.000000e+00)
tail call swiftcc void @"$s4main4iLEDV7animate33_2F33BF8CAB42E877BE364AC90BA6E106LL_9tickCount6frames8reversesyAC13AnimationModeO_s6UInt32Vs6UInt16VSbtF"(i16 %16, i16 %18, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i8 -128, i32 %19, i16 0, i1 false, %T4main4iLEDV* nocapture nonnull swiftself dereferenceable(68) @"$s4main6rgbLEDAA01iC0Vvp")
br label %20
20: ; preds = %entry, %entry, %3, %9, %14
ret void
}
; the rest is support..
declare hidden swiftcc void @"$s4main8TestModeOSHAASH4hash4intoys6HasherVz_tFTW"(%Ts6HasherV* nocapture dereferenceable(72) %0, %T4main8TestModeO* noalias nocapture swiftself dereferenceable(1) %1, %swift.type* %Self, i8** %SelfWitnessTable) #1
declare i16 @"$s4main8TestModeOSHAASH9hashValueSivgTW"(%T4main8TestModeO* noalias nocapture swiftself dereferenceable(1) %0, %swift.type* %Self, i8** %SelfWitnessTable) #1
declare hidden swiftcc i1 @"$s4main8TestModeOSQAASQ2eeoiySbx_xtFZTW"(%T4main8TestModeO* noalias nocapture dereferenceable(1) %0, %T4main8TestModeO* noalias nocapture dereferenceable(1) %1, %swift.type* swiftself %2, %swift.type* %Self, i8** %SelfWitnessTable) #1
declare hidden swiftcc void @"$s4main8TestModeOs12CaseIterableAAsADP8allCases03AllG0QzvgZTW"(%TSay4main8TestModeOG* noalias nocapture sret %0, %swift.type* swiftself %1, %swift.type* %Self, i8** %SelfWitnessTable) #1
declare hidden swiftcc i16 @"$s4main8TestModeOSHAASH13_rawHashValue4seedS2i_tFTW"(i16 %0, %T4main8TestModeO* noalias nocapture swiftself dereferenceable(1) %1, %swift.type* %Self, i8** %SelfWitnessTable) #1
declare hidden swiftcc void @"$s4mainyycfU5_"() local_unnamed_addr #1
declare hidden swiftcc void @"$s4main12DigitalInputV6updateyyF"(%T4main12DigitalInputV* nocapture swiftself dereferenceable(26)) local_unnamed_addr #1
declare hidden swiftcc void @"$s4main3LEDV6updateyyF"(%T4main3LEDV* nocapture swiftself dereferenceable(37)) local_unnamed_addr #1
declare hidden swiftcc void @"$s4main11AnalogInputV6updateyyF"(%T4main11AnalogInputV* nocapture swiftself dereferenceable(36)) local_unnamed_addr #1
declare hidden swiftcc void @"$s4main4iLEDV6updateyyF"(%T4main4iLEDV* nocapture swiftself dereferenceable(68)) local_unnamed_addr #1
declare hidden swiftcc void @"$s4main4iLEDV13setBrightnessyySfF"(float, %T4main4iLEDV* nocapture swiftself dereferenceable(68)) local_unnamed_addr #1
declare hidden swiftcc void @"$s4main4iLEDV13setSaturationyySfF"(float, %T4main4iLEDV* nocapture swiftself dereferenceable(68)) local_unnamed_addr #1
declare hidden swiftcc void @"$s4main4iLEDV13colorGradient5first4last5index5countyAA5ColorV_AJs6UInt16VALSgtF"(i1, float, float, float, i1, float, float, float, i16, i16, i8, %T4main4iLEDV* nocapture swiftself dereferenceable(68)) local_unnamed_addr #1
declare hidden void @"$s4mainyycfU5_To"() #1
declare hidden void @"$s4main11AnalogInputV13Configuration33_7F57748A1D302A4EFB2BF2F604494FF8LLV14onValueChangedyySfXCvpfiySfcfU_To"(float) #1
declare hidden swiftcc i16 @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtFfA0_"() local_unnamed_addr #2
declare hidden swiftcc { i16, i8 } @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtFfA1_"() local_unnamed_addr #2
declare hidden swiftcc void @"$s4main4iLEDV9setPixels33_2F33BF8CAB42E877BE364AC90BA6E106LL5color5index5countyAA5ColorV_s6UInt16VALSgtF"(i1, float, float, float, i16, i16, i8, %T4main4iLEDV* nocapture swiftself dereferenceable(68)) local_unnamed_addr #2
declare hidden swiftcc void @"$s4main4iLEDV7animate33_2F33BF8CAB42E877BE364AC90BA6E106LL_9tickCount6frames8reversesyAC13AnimationModeO_s6UInt32Vs6UInt16VSbtF"(i16, i16, i16, i16, i16, i16, i16, i16, i8, i32, i16, i1, %T4main4iLEDV* nocapture swiftself dereferenceable(68)) local_unnamed_addr #1
declare hidden swiftcc { i8, i16, i8*, float, float, float, i16, i16, i16 } @"$s4main12DigitalInputV3pin6pullup8debounceACs5UInt8V_S2btcfCTf4nnnd_n"(i8, i1, i1) local_unnamed_addr #1
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #3
declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #3
declare hidden swiftcc { i8, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i32, i16, i1, i16, i16, i16, i16, i16, i16, i16, i16, i1, i16, i32 } @"$s4main4iLEDV3pin10pixelCount12hasWhiteChip12grbDataOrder10latchDelayACs5UInt8V_s6UInt16VS2bALtcfCTf4nnnnnd_n"(i8, i16, i1, i1, i16) local_unnamed_addr #1
declare i32 @_ticks() local_unnamed_addr #4
declare hidden swiftcc i32 @"$ss6UInt32V4mainE16fromTimeIntervalABSf_tcfCTf4nd_n"(float) local_unnamed_addr #1
declare hidden swiftcc { i16, i16, i16, i16 } @"$s4main8TestModeO8allCasesSayACGvgZTf4d_n"() local_unnamed_addr #1
declare i8* @swift_slowAlloc(i16, i16) local_unnamed_addr #5
declare hidden i8* @__swift_memcpy1_1(i8* %0, i8* %1, %swift.type* %2) #5
declare hidden void @__swift_noop_void_return(i8* %0, %swift.type* %1) #5
declare hidden i32 @"$s4main8TestModeOwet"(%swift.opaque* noalias %value, i32 %numEmptyCases, %swift.type* %TestMode) #6
declare hidden void @"$s4main8TestModeOwst"(%swift.opaque* noalias %value, i32 %whichCase, i32 %numEmptyCases, %swift.type* %TestMode) #7
declare hidden i32 @"$s4main8TestModeOwug"(%swift.opaque* noalias %value, %swift.type* %TestMode) #7
declare hidden void @"$s4main8TestModeOwup"(%swift.opaque* noalias %value, %swift.type* %TestMode) #7
declare hidden void @"$s4main8TestModeOwui"(%swift.opaque* noalias %value, i32 %tag, %swift.type* %TestMode) #7
declare swiftcc %swift.metadata_response @"$s4main8TestModeOMa"(i16 %0) #8
declare hidden swiftcc i8** @"$s4main8TestModeOs12CaseIterableAA8AllCasessADP_SlWT"(%swift.type* %TestMode.AllCases, %swift.type* %TestMode, i8** %TestMode.CaseIterable) #7
declare hidden i8** @"$sSay4main8TestModeOGSayxGSlsWl"() local_unnamed_addr #9; Function Attrs: noinline nounwind readnone
declare hidden swiftcc %swift.metadata_response @"$sSay4main8TestModeOGMa"(i16 %0) local_unnamed_addr #9
declare swiftcc %swift.metadata_response @"$sSaMa"(i16, %swift.type*) local_unnamed_addr #1
declare i8** @swift_getWitnessTable(%swift.protocol_conformance_descriptor*, %swift.type*, i8***) local_unnamed_addr #10
declare swiftcc { i64, i64, i64, i64, i64, i64, i64, i64, i64 } @"$ss6HasherV5_seedABSi_tcfC"(i16) local_unnamed_addr #1
declare swiftcc void @"$ss6HasherV8_combineyySuF"(i16, %Ts6HasherV* nocapture swiftself dereferenceable(72)) local_unnamed_addr #1
declare swiftcc i16 @"$ss6HasherV9_finalizeSiyF"(%Ts6HasherV* nocapture swiftself dereferenceable(72)) local_unnamed_addr #1
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment