xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *, ...);
void gcspy_raiseError(const char *file, int line, const char *mesg) {
  printf("## GCspy Error  (%s, line %d)\n", file, line);
  printf("## %s\n", mesg);
  exit(-1);
}


x86 assembly (clang, -O0):
<gcspy_raiseError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<gcspy_raiseError>:
push   %rbx
mov    %rdx,%rbx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"## GCspy Error (%s, line %d)\0A\00"
@.str.1 = [7 x i8] c"## %s\0A\00"
define void @gcspy_raiseError(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%10 = load i8*, i8** %6
%11 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"## GCspy Error (%s, line %d)\0A\00"
@.str.1 = [7 x i8] c"## %s\0A\00"
define void @gcspy_raiseError(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%5 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
float atan2f(float, float);
float dtMathAtan2f(float y, float x) { return atan2f(y, x); }


x86 assembly (clang, -O0):
<dtMathAtan2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <atan2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtMathAtan2f>:
jmp    1030 <atan2f@plt>

LLVM IR (-O0):
define float @dtMathAtan2f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @atan2f(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @dtMathAtan2f(float %0, float %1) {
%3 = tail call float @atan2f(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ debugPrintStr(char *, char *);
void newContactInfoRecvd(char *line) {
  debugPrintStr("command parser: newContactInfoRecvd: ", line);
}


x86 assembly (clang, -O0):
<newContactInfoRecvd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <debugPrintStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newContactInfoRecvd>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <debugPrintStr@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"command parser: newContactInfoRecvd: \00"
define void @newContactInfoRecvd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @debugPrintStr(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"command parser: newContactInfoRecvd: \00"
define void @newContactInfoRecvd(i8* %0) {
%2 = tail call i32 @debugPrintStr(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef union OutputStreamInfo {
  int dummy;
} OutputStreamInfo;

/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned char);
void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream) {
  if (OutCh == '\n')
    putchar('\r');
  putchar(OutCh);
}


x86 assembly (clang, -O0):
<PlatformPutc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1139 <PlatformPutc+0x29>
mov    $0xd,%edi
call   1030 <putchar@plt>
movzbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PlatformPutc>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%bl
jne    1122 <PlatformPutc+0x12>
mov    $0xd,%edi
call   1030 <putchar@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
%union.OutputStreamInfo = type { i32 }
define void @PlatformPutc(i8 zeroext %0, %union.OutputStreamInfo* %1) {
%3 = alloca i8
%4 = alloca %union.OutputStreamInfo*
store i8 %0, i8* %3
store %union.OutputStreamInfo* %1, %union.OutputStreamInfo** %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @putchar(i8 zeroext 13)
br label %10
10: ; preds = %8, %2
%11 = load i8, i8* %3
%12 = call i32 @putchar(i8 zeroext %11)
ret void
}

LLVM IR (-O2):
%union.OutputStreamInfo = type { i32 }
define void @PlatformPutc(i8 zeroext %0, %union.OutputStreamInfo* nocapture readnone %1) {
%3 = icmp eq i8 %0, 10
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @putchar(i8 zeroext 13)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @putchar(i8 zeroext %0)
ret void
}
const char *ip_eth(void) { return ""; }


x86 assembly (clang, -O0):
<ip_eth>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_eth>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @ip_eth() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @ip_eth() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeGPIOInput(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000000);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeGPIOInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeGPIOInput>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edx,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeGPIOInput(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @GPIODirModeSet(i32 %5, i32 %6, i32 0)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeGPIOInput(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 0)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 8)
ret void
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int vec2_is_near_zero(float *, float);
__attribute__((always_)) bool psvec2_is_near_zero(struct vec2 *a,
                                                  float epsilon) {
  return vec2_is_near_zero((float *)a, epsilon);
}


x86 assembly (clang, -O0):
<psvec2_is_near_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
call   1030 <vec2_is_near_zero@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2_is_near_zero>:
jmp    1030 <vec2_is_near_zero@plt>

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define i32 @psvec2_is_near_zero(%struct.vec2* %0, float %1) {
%3 = alloca %struct.vec2*
%4 = alloca float
store %struct.vec2* %0, %struct.vec2** %3
store float %1, float* %4
%5 = load %struct.vec2*, %struct.vec2** %3
%6 = bitcast %struct.vec2* %5 to float*
%7 = load float, float* %4
%8 = call i32 @vec2_is_near_zero(float* %6, float %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define i32 @psvec2_is_near_zero(%struct.vec2* %0, float %1) {
%3 = bitcast %struct.vec2* %0 to float*
%4 = tail call i32 @vec2_is_near_zero(float* %3, float %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\n\n"
         "----------------------------------------------\n"
         "|       Unified2 Anonymizer usage()          |\n"
         "----------------------------------------------\n"
         "| -r:  \t[Unified2 Input file (single)]\n"
         "| -o:  \t[Unified2 Output File (single)]\n"
         "| -R:  \t[Unified2 Input Directory]\n"
         "| -O:  \t[Unified2 Output Directory]\n"
         "| -s:  \t[Unified2 File Prefix]\n"
         "| -eE: \t[Anonymize Event]\n"
         "| -lL: \t[Anonymize LinkLayer (ethernet)]\n"
         "| -pP: \t[Anonymize Packet data]\n"
         "| -xX: \t[Anonymize Extra DATA event]\n"
         "| -v:  \t[Verbose flag]\n"
         "| -h:  \t[Show Usage]\n"
         "----------------------------------------------\n"
         "----------------------------------------------\n\n");
  return;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [600 x i8] c"\0A\0A----------------------------------------------\0A| Unified2 Anonymizer usage() |\0A----------------------------------------------\0A| -r: \09[Unified2 Input file (single)]\0A| -o: \09[Unified2 Output File (single)]\0A| -R: \09[Unified2 Input Directory]\0A| -O: \09[Unified2 Output Directory]\0A| -s: \09[Unified2 File Prefix]\0A| -eE: \09[Anonymize Event]\0A| -lL: \09[Anonymize LinkLayer (ethernet)]\0A| -pP: \09[Anonymize Packet data]\0A| -xX: \09[Anonymize Extra DATA event]\0A| -v: \09[Verbose flag]\0A| -h: \09[Show Usage]\0A----------------------------------------------\0A----------------------------------------------\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([600 x i8], [600 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [599 x i8] c"\0A\0A----------------------------------------------\0A| Unified2 Anonymizer usage() |\0A----------------------------------------------\0A| -r: \09[Unified2 Input file (single)]\0A| -o: \09[Unified2 Output File (single)]\0A| -R: \09[Unified2 Input Directory]\0A| -O: \09[Unified2 Output Directory]\0A| -s: \09[Unified2 File Prefix]\0A| -eE: \09[Anonymize Event]\0A| -lL: \09[Anonymize LinkLayer (ethernet)]\0A| -pP: \09[Anonymize Packet data]\0A| -xX: \09[Anonymize Extra DATA event]\0A| -v: \09[Verbose flag]\0A| -h: \09[Show Usage]\0A----------------------------------------------\0A----------------------------------------------\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([599 x i8], [599 x i8]* @str, i64 0, i64 0))
ret void
}
void list_install_fork_handlers(void) { return; }


x86 assembly (clang, -O0):
<list_install_fork_handlers>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_install_fork_handlers>:
ret

LLVM IR (-O0):
define void @list_install_fork_handlers() {
ret void
}

LLVM IR (-O2):
define void @list_install_fork_handlers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x29() {
  Assert_real((isodigit(41) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              210, ("isodigit should be 0 for )"));
}


x86 assembly (clang, -O0):
<t_isodigit_0x29>:
push   %rbp
mov    %rsp,%rbp
mov    $0x29,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xd2,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0x29>:
push   %rax
mov    $0x29,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xd2,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for )\00"
define void @t_isodigit_0x29() {
%1 = call i64 @isodigit(i32 41)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 210, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for )\00"
define void @t_isodigit_0x29() {
%1 = tail call i64 @isodigit(i32 41)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 210, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void copy1(char *const s1, const char *const s2) {
  int c;
  for (c = 0; (s1[c] = s2[c]) != '\0'; c++) {
    ;
  }
}


x86 assembly (clang, -O0):
<copy1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1148 <copy1+0x48>
jmp    113a <copy1+0x3a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copy1+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy1>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy1+0x10>
ret

LLVM IR (-O0):
define void @copy1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 %11, i8* %15
%16 = sext i8 %11 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %6
br label %19
19: ; preds = %18
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @copy1(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret void
}
unsigned add_sat_ul(unsigned long augend, unsigned long addend,
                    unsigned long limit) {
  if ((augend > limit) || ((limit - augend) < addend))
    return limit;
  return (addend + augend);
}


x86 assembly (clang, -O0):
<add_sat_ul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
ja     1130 <add_sat_ul+0x30>
mov    -0x20(%rbp),%rax
sub    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    113c <add_sat_ul+0x3c>
mov    -0x20(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1147 <add_sat_ul+0x47>
mov    -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_sat_ul>:
mov    %rdx,%rcx
sub    %rdi,%rcx
lea    (%rsi,%rdi,1),%eax
cmp    %rsi,%rcx
cmovb  %edx,%eax
cmp    %rdi,%rdx
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define i32 @add_sat_ul(i64 %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %5
%9 = load i64, i64* %7
%10 = icmp ugt i64 %8, %9
br i1 %10, label %17, label %11
11: ; preds = %3
%12 = load i64, i64* %7
%13 = load i64, i64* %5
%14 = sub i64 %12, %13
%15 = load i64, i64* %6
%16 = icmp ult i64 %14, %15
br i1 %16, label %17, label %20
17: ; preds = %11, %3
%18 = load i64, i64* %7
%19 = trunc i64 %18 to i32
store i32 %19, i32* %4
br label %25
20: ; preds = %11
%21 = load i64, i64* %6
%22 = load i64, i64* %5
%23 = add i64 %21, %22
%24 = trunc i64 %23 to i32
store i32 %24, i32* %4
br label %25
25: ; preds = %20, %17
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @add_sat_ul(i64 %0, i64 %1, i64 %2) {
%4 = icmp ult i64 %2, %0
%5 = sub i64 %2, %0
%6 = icmp ult i64 %5, %1
%7 = or i1 %4, %6
%8 = add i64 %1, %0
%9 = select i1 %7, i64 %2, i64 %8
%10 = trunc i64 %9 to i32
ret i32 %10
}
/* Variables and functions */
void *string_dup(char *);
void *avrasm_rawnamenode_hook_copy(void *hook) {
  char *rawname = (char *)hook;
  if (rawname) {
    return string_dup(rawname);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<avrasm_rawnamenode_hook_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1141 <avrasm_rawnamenode_hook_copy+0x31>
mov    -0x18(%rbp),%rdi
call   1030 <string_dup@plt>
mov    %rax,-0x8(%rbp)
jmp    1149 <avrasm_rawnamenode_hook_copy+0x39>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avrasm_rawnamenode_hook_copy>:
test   %rdi,%rdi
je     111a <avrasm_rawnamenode_hook_copy+0xa>
jmp    1030 <string_dup@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @avrasm_rawnamenode_hook_copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %4
%10 = call i8* @string_dup(i8* %9)
store i8* %10, i8** %2
br label %12
11: ; preds = %1
store i8* null, i8** %2
br label %12
12: ; preds = %11, %8
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @avrasm_rawnamenode_hook_copy(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @string_dup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
int library_func2(void) { return 3; }


x86 assembly (clang, -O0):
<library_func2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<library_func2>:
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @library_func2() {
ret i32 3
}

LLVM IR (-O2):
define i32 @library_func2() {
ret i32 3
}
char *make_backup_filename(p)
char *p;
{
  char *bakname = (char *)xmalloc(strlen(p) + 2);
  strcpy(bakname, p);
  return (strcat(bakname, "~"));
}


x86 assembly (clang, -O0):
<make_backup_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x2,%rdi
mov    $0x0,%al
call   1050 <xmalloc@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1060 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_backup_filename>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x2(%rax),%rdi
xor    %eax,%eax
call   1050 <xmalloc@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movw   $0x7e,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"~\00"
define i8* @make_backup_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 2
%7 = call i32 (i64, ...) bitcast (i32 (...)* @xmalloc to i32 (i64, ...)*)(i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = call i8* @strcat(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %14
}

LLVM IR (-O2):
define i8* @make_backup_filename(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 2
%4 = tail call i32 (i64, ...) bitcast (i32 (...)* @xmalloc to i32 (i64, ...)*)(i64 %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i8* @strcpy(i8* dereferenceable(1) %6, i8* dereferenceable(1) %0)
%8 = tail call i64 @strlen(i8* dereferenceable(1) %6)
%9 = getelementptr i8, i8* %6, i64 %8
%10 = bitcast i8* %9 to i16*
store i16 126, i16* %10
ret i8* %6
}
/* Variables and functions */
int lenlist(char **);
int /*<<< orphan*/ puts(char *);
void fmtlist(char **list) {
  int i, len = lenlist(list);
  for (i = 0; i < len; i++)
    puts(list[i]);
}


x86 assembly (clang, -O0):
<fmtlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <lenlist@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    116a <fmtlist+0x4a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <puts@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <fmtlist+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmtlist>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <lenlist@plt>
test   %eax,%eax
jle    1152 <fmtlist+0x32>
mov    %eax,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1040 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <fmtlist+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @fmtlist(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i32
store i8** %0, i8*** %2
%5 = load i8**, i8*** %2
%6 = call i32 @lenlist(i8** %5)
store i32 %6, i32* %4
store i32 0, i32* %3
br label %7
7: ; preds = %18, %1
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @puts(i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %7
21: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @fmtlist(i8** %0) {
%2 = tail call i32 @lenlist(i8** %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ block_begin();
int /*<<< orphan*/ output(char *, char const *);
void open_if_block(const char *c_cond) {
  output("if (%s)", c_cond);
  block_begin();
}


x86 assembly (clang, -O0):
<open_if_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <output@plt>
mov    $0x0,%al
call   1030 <block_begin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_if_block>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <output@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <block_begin@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"if (%s)\00"
define void @open_if_block(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @block_begin()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"if (%s)\00"
define void @open_if_block(i8* %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @block_begin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
int /*<<< orphan*/ WriteNumber(short);
void CR_ArgA(short int nNum) {
  WriteInstruction("ld a,");
  WriteNumber(nNum);
}


x86 assembly (clang, -O0):
<CR_ArgA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <WriteInstruction@plt>
movswl -0x2(%rbp),%edi
call   1030 <WriteNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CR_ArgA>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <WriteInstruction@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <WriteNumber@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ld a,\00"
define void @CR_ArgA(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @WriteInstruction(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i16, i16* %2
%5 = call i32 @WriteNumber(i16 signext %4)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ld a,\00"
define void @CR_ArgA(i16 signext %0) {
%2 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @WriteNumber(i16 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int lio_listio(int mode, void *aiocb_list[], int nitems, void *sevp) {
  fprintf(stderr, "lio_listio not implemented!\n");
  abort();
}


x86 assembly (clang, -O0):
<lio_listio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<lio_listio>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"lio_listio not implemented!\0A\00"
define i32 @lio_listio(i32 %0, i8** %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"lio_listio not implemented!\0A\00"
define i32 @lio_listio(i32 %0, i8** nocapture readnone %1, i32 %2, i8* nocapture readnone %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ check_vect();
int /*<<< orphan*/ main1(float *);
int /*<<< orphan*/ main2(float *);
int main(void) {
  int i;
  float a[256] __attribute__((__aligned__(16)));
  check_vect();
  main1(a);
  main2(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <check_vect@plt>
lea    -0x410(%rbp),%rdi
call   1040 <main1@plt>
lea    -0x410(%rbp),%rdi
call   1050 <main2@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
xor    %eax,%eax
call   1030 <check_vect@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <main1@plt>
mov    %rbx,%rdi
call   1050 <main2@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [256 x float]
store i32 0, i32* %1
%4 = call i32 (...) @check_vect()
%5 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 0
%6 = call i32 @main1(float* %5)
%7 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 0
%8 = call i32 @main2(float* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [256 x float]
%2 = bitcast [256 x float]* %1 to i8*
%3 = tail call i32 (...) @check_vect()
%4 = getelementptr inbounds [256 x float], [256 x float]* %1, i64 0, i64 0
%5 = call i32 @main1(float* %4)
%6 = call i32 @main2(float* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void inband_free_buf(char *data_buf, int data_len) {
  if ((data_buf != NULL) && (data_len > 1480))
    free(data_buf);
}


x86 assembly (clang, -O0):
<inband_free_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <inband_free_buf+0x30>
cmpl   $0x5c8,-0xc(%rbp)
jle    1140 <inband_free_buf+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inband_free_buf>:
test   %rdi,%rdi
je     1122 <inband_free_buf+0x12>
cmp    $0x5c9,%esi
jl     1122 <inband_free_buf+0x12>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @inband_free_buf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1480
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
br label %13
13: ; preds = %10, %7, %2
ret void
}

LLVM IR (-O2):
define void @inband_free_buf(i8* %0, i32 %1) {
%3 = icmp ne i8* %0, null
%4 = icmp sgt i32 %1, 1480
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
void do_die_if(int b, char *msg, int line) {
  if (!b)
    return;
  fprintf(stderr, "Error at line %d: %s\n", line, msg);
  exit(1);
}


x86 assembly (clang, -O0):
<do_die_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1142 <do_die_if+0x22>
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xea7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<do_die_if>:
test   %edi,%edi
jne    1125 <do_die_if+0x5>
ret
push   %rax
mov    %rsi,%rcx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Error at line %d: %s\0A\00"
define void @do_die_if(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %3
ret void
10: ; preds = %3
%11 = load i32, i32* @stderr
%12 = load i32, i32* %6
%13 = load i8*, i8** %5
%14 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Error at line %d: %s\0A\00"
define void @do_die_if(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %6
5: ; preds = %3
ret void
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %1)
%9 = tail call i32 @exit(i32 1)
unreachable
}
void RTVfsObjRetain(void) {}


x86 assembly (clang, -O0):
<RTVfsObjRetain>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTVfsObjRetain>:
ret

LLVM IR (-O0):
define void @RTVfsObjRetain() {
ret void
}

LLVM IR (-O2):
define void @RTVfsObjRetain() {
ret void
}
int main() {
  int c1, c2, k0;
  int r, w, k;
  r = 0;
  w = 0;
  k = k0;
  while (1) {
    if (w == 0) {
      r = r + 1;
      k = k - c1;
    } else if (r == 0) {
      w = w + 1;
      k = k - c2;
    } else if (w == 0) {
      r = r - 1;
      k = k + c1;
    } else {
      w = w - 1;
      k = k + c2;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1140 <main+0x40>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    119e <main+0x9e>
cmpl   $0x0,-0x14(%rbp)
jne    1161 <main+0x61>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1199 <main+0x99>
cmpl   $0x0,-0x18(%rbp)
jne    1182 <main+0x82>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1194 <main+0x94>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1199 <main+0x99>
jmp    119e <main+0x9e>
jmp    111f <main+0x1f>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %6
%8 = load i32, i32* %4
store i32 %8, i32* %7
br label %9
9: ; preds = %0, %44
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
%15 = load i32, i32* %7
%16 = load i32, i32* %2
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %7
br label %44
18: ; preds = %9
%19 = load i32, i32* %5
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
%24 = load i32, i32* %7
%25 = load i32, i32* %3
%26 = sub nsw i32 %24, %25
store i32 %26, i32* %7
br label %43
27: ; preds = %18
%28 = load i32, i32* %6
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %36
30: ; preds = %27
%31 = load i32, i32* %5
%32 = sub nsw i32 %31, 1
store i32 %32, i32* %5
%33 = load i32, i32* %7
%34 = load i32, i32* %2
%35 = add nsw i32 %33, %34
store i32 %35, i32* %7
br label %42
36: ; preds = %27
%37 = load i32, i32* %6
%38 = sub nsw i32 %37, 1
store i32 %38, i32* %6
%39 = load i32, i32* %7
%40 = load i32, i32* %3
%41 = add nsw i32 %39, %40
store i32 %41, i32* %7
br label %42
42: ; preds = %36, %30
br label %43
43: ; preds = %42, %21
br label %44
44: ; preds = %43, %12
br label %9
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_xml_comment_entities() {
  test_parser_verify_entity(test_parser_sourcefile("xml", " <!--comment-->"),
                            "comment", "<!--comment-->");
}


x86 assembly (clang, -O0):
<test_xml_comment_entities>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xed4(%rip),%rsi
lea    0xebe(%rip),%rdx
call   1040 <test_parser_verify_entity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_xml_comment_entities>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xed9(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    %eax,%edi
pop    %rax
jmp    1040 <test_parser_verify_entity@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"xml\00"
@.str.1 = [16 x i8] c" <!--comment-->\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [15 x i8] c"<!--comment-->\00"
define void @test_xml_comment_entities() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"xml\00"
@.str.1 = [16 x i8] c" <!--comment-->\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [15 x i8] c"<!--comment-->\00"
define void @test_xml_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
main() {
  f(1);
  for (register int i = 0; i < 10; i++)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <f@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114d <main+0x3d>
jmp    113f <main+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <main+0x20>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @f(i32 1)
store i32 0, i32* %2
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1)
ret i32 0
}
void TestAppP$Leds$led2Off(void) { LedsP$Leds$led2Off(); }


x86 assembly (clang, -O0):
<TestAppP$Leds$led2Off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <LedsP$Leds$led2Off@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestAppP$Leds$led2Off>:
xor    %eax,%eax
jmp    1030 <LedsP$Leds$led2Off@plt>

LLVM IR (-O0):
define void @"TestAppP$Leds$led2Off"() {
%1 = call i32 (...) @"LedsP$Leds$led2Off"()
ret void
}

LLVM IR (-O2):
define void @"TestAppP$Leds$led2Off"() {
%1 = tail call i32 (...) @"LedsP$Leds$led2Off"()
ret void
}
/* Variables and functions */
char *dlerror();
char *dlwrap_dlerror() {
  char *err;
  err = dlerror();
  return err;
}


x86 assembly (clang, -O0):
<dlwrap_dlerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlwrap_dlerror>:
xor    %eax,%eax
jmp    1030 <dlerror@plt>

LLVM IR (-O0):
define i8* @dlwrap_dlerror() {
%1 = alloca i8*
%2 = call i8* (...) @dlerror()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @dlwrap_dlerror() {
%1 = tail call i8* (...) @dlerror()
ret i8* %1
}
void free_submatrix(b, nrl, nrh, ncl, nch) float **b;
long nch, ncl, nrh, nrl;
{ free((char *)(b + nrl - 1)); }


x86 assembly (clang, -O0):
<free_submatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_submatrix>:
lea    (%rdi,%rsi,8),%rdi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_submatrix(float** %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca float**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store float** %0, float*** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load float**, float*** %6
%12 = load i64, i64* %7
%13 = getelementptr inbounds float*, float** %11, i64 %12
%14 = getelementptr inbounds float*, float** %13, i64 -1
%15 = bitcast float** %14 to i8*
ret void
}

LLVM IR (-O2):
define void @free_submatrix(float** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds float*, float** %0, i64 %1
%7 = getelementptr inbounds float*, float** %6, i64 -1
%8 = bitcast float** %7 to i8*
tail call void @free(i8* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void Sys_Exit(int code) { exit(code); }


x86 assembly (clang, -O0):
<Sys_Exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<Sys_Exit>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define void @Sys_Exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @Sys_Exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
scalar_t__ pthread_self();
int /*<<< orphan*/ stderr;
void thread_deinit() {
  fprintf(stderr, "CTRAPS: SFI Plugin Thread Deinit (T=%lu)\n",
          (unsigned long)pthread_self());
}


x86 assembly (clang, -O0):
<thread_deinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_deinit>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xec8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"CTRAPS: SFI Plugin Thread Deinit (T=%lu)\0A\00"
define void @thread_deinit() {
%1 = load i32, i32* @stderr
%2 = call i64 (...) @pthread_self()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"CTRAPS: SFI Plugin Thread Deinit (T=%lu)\0A\00"
define void @thread_deinit() {
%1 = load i32, i32* @stderr
%2 = tail call i64 (...) @pthread_self()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
/* Variables and functions */
int getc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
bool runUseCustomGridMenu() {
  printf("Do you want to use a custom grid?[y/n]:  ");
  int useCustom;
  do {
    useCustom = getc(stdin);
  } while (useCustom != 'y' && useCustom != 'n');
  return useCustom == 'y';
}


x86 assembly (clang, -O0):
<runUseCustomGridMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x79,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115e <runUseCustomGridMenu+0x3e>
cmpl   $0x6e,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1134 <runUseCustomGridMenu+0x14>
cmpl   $0x79,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runUseCustomGridMenu>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb4(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx),%edi
call   1040 <getc@plt>
cmp    $0x79,%eax
je     1151 <runUseCustomGridMenu+0x31>
cmp    $0x6e,%eax
jne    1140 <runUseCustomGridMenu+0x20>
xor    %ecx,%ecx
cmp    $0x79,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Do you want to use a custom grid?[y/n]: \00"
@stdin = global i32 0
define i32 @runUseCustomGridMenu() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* @stdin
%5 = call i32 @getc(i32 %4)
store i32 %5, i32* %1
br label %6
6: ; preds = %3
%7 = load i32, i32* %1
%8 = icmp ne i32 %7, 121
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %1
%11 = icmp ne i32 %10, 110
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %3, label %14
14: ; preds = %12
%15 = load i32, i32* %1
%16 = icmp eq i32 %15, 121
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
@.str = [42 x i8] c"Do you want to use a custom grid?[y/n]: \00"
@stdin = global i32 0
define i32 @runUseCustomGridMenu() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = load i32, i32* @stdin
%4 = tail call i32 @getc(i32 %3)
switch i32 %4, label %2 [
i32 121, label %5
i32 110, label %5
]
5: ; preds = %2, %2
%6 = icmp eq i32 %4, 121
%7 = zext i1 %6 to i32
ret i32 %7
}
void openlog(const char *ident, int logopt, int facility) {}


x86 assembly (clang, -O0):
<openlog>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<openlog>:
ret

LLVM IR (-O0):
define void @openlog(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @openlog(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
void TXHAL_InitMicroGpios(void) {}


x86 assembly (clang, -O0):
<TXHAL_InitMicroGpios>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TXHAL_InitMicroGpios>:
ret

LLVM IR (-O0):
define void @TXHAL_InitMicroGpios() {
ret void
}

LLVM IR (-O2):
define void @TXHAL_InitMicroGpios() {
ret void
}