xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int initialize_dobldobl_solution(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(504, &k, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_dobldobl_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1f8,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_dobldobl_solution>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1f8,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_dobldobl_solution(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 504, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_dobldobl_solution(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 504, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ lexinit();
int /*<<< orphan*/ yyparse();
main() {
  while (1) {
    lexinit();
    yyparse();
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <lexinit@plt>
mov    $0x0,%al
call   1030 <yyparse@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <lexinit@plt>
xor    %eax,%eax
call   1030 <yyparse@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @lexinit()
%4 = call i32 (...) @yyparse()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @lexinit()
%3 = tail call i32 (...) @yyparse()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ GetErrMsg(int, char *, int);
void GetDtreeError(int nErrno, char *pBuf, int nMaxBufLen) {
  GetErrMsg(nErrno, pBuf, nMaxBufLen);
}


x86 assembly (clang, -O0):
<GetDtreeError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <GetErrMsg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDtreeError>:
jmp    1030 <GetErrMsg@plt>

LLVM IR (-O0):
define void @GetDtreeError(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 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @GetErrMsg(i32 %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @GetDtreeError(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @GetErrMsg(i32 %0, i8* %1, i32 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int same_screen;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
void set_XEnterWindowEvent_same_screen(void *_p, int _v) {
  ((XEnterWindowEvent *)_p)->same_screen = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEnterWindowEvent_same_screen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEnterWindowEvent_same_screen>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XEnterWindowEvent_same_screen(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XEnterWindowEvent_same_screen(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ ui32Base;

/* Variables and functions */
void PWMGenIntClear(uint32_t ui32Base, uint32_t ui32Gen, uint32_t ui32Ints) {
  ;
  ;

  ;
  (*((volatile uint32_t *)(((ui32Base) + (ui32Gen)) + 0x0000000C))) = ui32Ints;
}


x86 assembly (clang, -O0):
<PWMGenIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenIntClear>:
mov    %rdx,0xc(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @PWMGenIntClear(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = add nsw i64 %8, %9
%11 = add nsw i64 %10, 12
%12 = inttoptr i64 %11 to i64*
store volatile i64 %7, i64* %12
ret void
}

LLVM IR (-O2):
define void @PWMGenIntClear(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 12
%5 = add i64 %4, %1
%6 = inttoptr i64 %5 to i64*
store volatile i64 %2, i64* %6
ret void
}
/* Type definitions */
struct sembuf {
  int sem_op;
  int /*<<< orphan*/ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
int /*<<< orphan*/ perror(char *);
int semop(int, struct sembuf *, int);
void pv(int id, int operation) {
  static struct sembuf semaphor;
  semaphor.sem_op = operation;
  semaphor.sem_flg = SEM_UNDO;
  if (semop(id, &semaphor, 1) == -1)
    perror("semop-Fehler");
}


x86 assembly (clang, -O0):
<pv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,0x2efd(%rip)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x2ef2(%rip)
mov    -0x4(%rbp),%edi
lea    0x2ee4(%rip),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
jne    116f <pv+0x4f>
lea    0xe96(%rip),%rdi
call   1030 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pv>:
push   %rax
mov    %esi,0x2f0d(%rip)
lea    0x2f06(%rip),%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x2efb(%rip)
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
je     114e <pv+0x2e>
pop    %rax
ret
lea    0xeab(%rip),%rdi
pop    %rax
jmp    1030 <perror@plt>

LLVM IR (-O0):
%struct.sembuf = type { i32, i32 }
@pv.semaphor = internal global %struct.sembuf zeroinitializer
@SEM_UNDO = global i32 0
@.str = [13 x i8] c"semop-Fehler\00"
define void @pv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
store i32 %5, i32* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i32 0, i32 0)
%6 = load i32, i32* @SEM_UNDO
store i32 %6, i32* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i32 0, i32 1)
%7 = load i32, i32* %3
%8 = call i32 @semop(i32 %7, %struct.sembuf* @pv.semaphor, i32 1)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32 }
@pv.semaphor = internal global %struct.sembuf zeroinitializer
@SEM_UNDO = global i32 0
@.str = [13 x i8] c"semop-Fehler\00"
define void @pv(i32 %0, i32 %1) {
store i32 %1, i32* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i64 0, i32 0)
%3 = load i32, i32* @SEM_UNDO
store i32 %3, i32* getelementptr inbounds (%struct.sembuf, %struct.sembuf* @pv.semaphor, i64 0, i32 1)
%4 = tail call i32 @semop(i32 %0, %struct.sembuf* @pv.semaphor, i32 1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
double log(double);
double f(double x) { return log(x) / (1.0 + 100.0 * x * x); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  0xed9(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xebb(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <log@plt>
movsd  0xedd(%rip),%xmm1
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
%5 = load double, double* %2
%6 = fmul double 1.000000e+02, %5
%7 = load double, double* %2
%8 = call double @llvm.fmuladd.f64(double %6, double %7, double 1.000000e+00)
%9 = fdiv double %4, %8
ret double %9
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = tail call double @log(double %0)
%3 = fmul double %0, 1.000000e+02
%4 = tail call double @llvm.fmuladd.f64(double %3, double %0, double 1.000000e+00)
%5 = fdiv double %2, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xe3() {
  Assert_real((islower(227) == 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_islower.c",
              1140, ("islower should be 0 for 0xe3"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xe3>:
push   %rax
mov    $0xe3,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x474,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xe3\00"
define void @t_islower_0xe3() {
%1 = call i64 @islower(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xe3\00"
define void @t_islower_0xe3() {
%1 = tail call i64 @islower(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *intel_flash_init(int);
void *intel_flash_bxb_ami_init() { return intel_flash_init(2 | 1); }


x86 assembly (clang, -O0):
<intel_flash_bxb_ami_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <intel_flash_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_flash_bxb_ami_init>:
mov    $0x3,%edi
jmp    1030 <intel_flash_init@plt>

LLVM IR (-O0):
define i8* @intel_flash_bxb_ami_init() {
%1 = call i8* @intel_flash_init(i32 3)
ret i8* %1
}

LLVM IR (-O2):
define i8* @intel_flash_bxb_ami_init() {
%1 = tail call i8* @intel_flash_init(i32 3)
ret i8* %1
}
int test_01(short *x, short *y) { return *x & *y ? -40 : 60; }


x86 assembly (clang, -O0):
<test_01>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
mov    -0x10(%rbp),%rax
movswl (%rax),%eax
and    %eax,%edx
mov    $0x3c,%eax
mov    $0xffffffd8,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_01>:
movzwl (%rsi),%eax
test   %ax,(%rdi)
mov    $0x3c,%ecx
mov    $0xffffffd8,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_01(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %3
%6 = load i16, i16* %5
%7 = sext i16 %6 to i32
%8 = load i16*, i16** %4
%9 = load i16, i16* %8
%10 = sext i16 %9 to i32
%11 = and i32 %7, %10
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 -40, i32 60
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_01(i16* nocapture %0, i16* nocapture %1) {
%3 = load i16, i16* %0
%4 = load i16, i16* %1
%5 = and i16 %4, %3
%6 = icmp eq i16 %5, 0
%7 = select i1 %6, i32 60, i32 -40
ret i32 %7
}
int callback3_short_short_int(short (*f)(short)) { return f(3); }


x86 assembly (clang, -O0):
<callback3_short_short_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3,%edi
call   *-0x8(%rbp)
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback3_short_short_int>:
push   %rax
mov    %rdi,%rax
mov    $0x3,%edi
call   *%rax
cwtl
pop    %rcx
ret

LLVM IR (-O0):
define i32 @callback3_short_short_int(i16 (i16)* %0) {
%2 = alloca i16 (i16)*
store i16 (i16)* %0, i16 (i16)** %2
%3 = load i16 (i16)*, i16 (i16)** %2
%4 = call signext i16 %3(i16 signext 3)
%5 = sext i16 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @callback3_short_short_int(i16 (i16)* nocapture %0) {
%2 = tail call signext i16 %0(i16 signext 3)
%3 = sext i16 %2 to i32
ret i32 %3
}
void ff_hevc_put_hevc_bi_qpel_h24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h24_8_sse4() {
ret void
}
/* Variables and functions */
int aa_cla_ilaenv(int, char *, char *, int /*<<< orphan*/, int /*<<< orphan*/,
                  int /*<<< orphan*/, int /*<<< orphan*/);
int aa_cla_sgelsd_smlsiz() {
  return aa_cla_ilaenv(9,
                       "S"
                       "GELSD",
                       "", 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<aa_cla_sgelsd_smlsiz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x9,%edi
lea    0xedc(%rip),%rsi
lea    0xedb(%rip),%rdx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <aa_cla_ilaenv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_sgelsd_smlsiz>:
push   %rax
movl   $0x0,(%rsp)
lea    0xee1(%rip),%rsi
lea    0xee0(%rip),%rdx
mov    $0x9,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <aa_cla_ilaenv@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"SGELSD\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @aa_cla_sgelsd_smlsiz() {
%1 = call i32 @aa_cla_ilaenv(i32 9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
@.str = [7 x i8] c"SGELSD\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @aa_cla_sgelsd_smlsiz() {
%1 = tail call i32 @aa_cla_ilaenv(i32 9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xd4() {
  Assert_real((isspace(212) == 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_isspace.c",
              1065, ("isspace should be 0 for 0xd4"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xd4>:
push   %rax
mov    $0xd4,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x429,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xd4\00"
define void @t_isspace_0xd4() {
%1 = call i64 @isspace(i32 212)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xd4\00"
define void @t_isspace_0xd4() {
%1 = tail call i64 @isspace(i32 212)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long int __arch_atomic_swap(long int *p, long int replace) {
  long temp = *p;
  int success = 0;
  do {
    temp = *p;
    success = __sync_bool_compare_and_swap(p, temp, replace);
  } while (!success);
  return temp;
}


x86 assembly (clang, -O0):
<__arch_atomic_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    111e <__arch_atomic_swap+0x1e>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__arch_atomic_swap>:
mov    (%rdi),%rcx
mov    %rcx,%rax
lock cmpxchg %rsi,(%rdi)
jne    1100 <__arch_atomic_swap>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @__arch_atomic_swap(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store i64* %0, i64** %3
store i64 %1, i64* %4
%7 = load i64*, i64** %3
%8 = load i64, i64* %7
store i64 %8, i64* %5
store i32 0, i32* %6
br label %9
9: ; preds = %18, %2
%10 = load i64*, i64** %3
%11 = load i64, i64* %10
store i64 %11, i64* %5
%12 = load i64*, i64** %3
%13 = load i64, i64* %5
%14 = load i64, i64* %4
%15 = cmpxchg i64* %12, i64 %13, i64 %14 seq_cst seq_cst
%16 = extractvalue { i64, i1 } %15, 1
%17 = zext i1 %16 to i32
store i32 %17, i32* %6
br label %18
18: ; preds = %9
%19 = load i32, i32* %6
%20 = icmp ne i32 %19, 0
%21 = xor i1 %20, true
br i1 %21, label %9, label %22
22: ; preds = %18
%23 = load i64, i64* %5
ret i64 %23
}

LLVM IR (-O2):
define i64 @__arch_atomic_swap(i64* nocapture %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = load i64, i64* %0
%5 = cmpxchg i64* %0, i64 %4, i64 %1 seq_cst seq_cst
%6 = extractvalue { i64, i1 } %5, 1
br i1 %6, label %7, label %3
7: ; preds = %3
ret i64 %4
}
/* Variables and functions */
int SIGCONT;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void handle(int sig) {
  if (sig == SIGCONT)
    printf("Got signal CONT\n");
  else
    printf("Got signal %d\n", sig);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1150 <handle+0x30>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1161 <handle+0x41>
mov    -0x4(%rbp),%esi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle>:
push   %rax
mov    0x2eb0(%rip),%rax
cmp    %edi,(%rax)
jne    114a <handle+0x1a>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
jmp    115a <handle+0x2a>
mov    %edi,%esi
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1050 <fflush@plt>

LLVM IR (-O0):
@SIGCONT = global i32 0
@.str = [17 x i8] c"Got signal CONT\0A\00"
@.str.1 = [15 x i8] c"Got signal %d\0A\00"
@stdout = global i32 0
define void @handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGCONT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %6
%12 = load i32, i32* @stdout
%13 = call i32 @fflush(i32 %12)
ret void
}

LLVM IR (-O2):
@SIGCONT = global i32 0
@.str.1 = [15 x i8] c"Got signal %d\0A\00"
@stdout = global i32 0
@str = [16 x i8] c"Got signal CONT\00"
define void @handle(i32 %0) {
%2 = load i32, i32* @SIGCONT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* @stdout
%10 = tail call i32 @fflush(i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xfa() {
  Assert_real((isalnum(250) == 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_isalnum.c",
              1255, ("isalnum should be 0 for 0xfa"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xfa>:
push   %rax
mov    $0xfa,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xfa\00"
define void @t_isalnum_0xfa() {
%1 = call i64 @isalnum(i32 250)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xfa\00"
define void @t_isalnum_0xfa() {
%1 = tail call i64 @isalnum(i32 250)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t gte_int32_t(int32_t a, int32_t b) { return a >= b; }


x86 assembly (clang, -O0):
<gte_int32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gte_int32_t>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @gte_int32_t(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 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @gte_int32_t(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void fat_boot_signature(uint8_t *block) {
  block[0x1fe] = 0x55;
  block[0x1ff] = 0xAA;
}


x86 assembly (clang, -O0):
<fat_boot_signature>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x55,0x7f8(%rax)
mov    -0x8(%rbp),%rax
movl   $0xaa,0x7fc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fat_boot_signature>:
movabs $0xaa00000055,%rax
mov    %rax,0x7f8(%rdi)
ret

LLVM IR (-O0):
define void @fat_boot_signature(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 510
store i32 85, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 511
store i32 170, i32* %6
ret void
}

LLVM IR (-O2):
define void @fat_boot_signature(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 510
store i32 85, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 511
store i32 170, i32* %3
ret void
}
void test46() {
  int i;
  int j = i ?: 1;
}


x86 assembly (clang, -O0):
<test46>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     111e <test46+0x1e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    112b <test46+0x2b>
mov    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112b <test46+0x2b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test46() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %7
6: ; preds = %0
br label %7
7: ; preds = %6, %5
%8 = phi i32 [ %3, %5 ], [ 1, %6 ]
store i32 %8, i32* %2
ret void
}

LLVM IR (-O2):
define void @test46() {
ret void
}
void chomp(char *s) {
  while (*s && *s != '\n' && *s != '\r')
    s++;
  *s = 0;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1142 <chomp+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
je     1142 <chomp+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <chomp+0x52>
jmp    1163 <chomp+0x63>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <chomp+0x8>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
mov    $0x2401,%eax
jmp    1114 <chomp+0x14>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0xd,%rcx
ja     1110 <chomp+0x10>
bt     %rcx,%rax
jae    1110 <chomp+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @chomp(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 10, label %7
i8 13, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
store i8 0, i8* %3
ret void
}
/* Variables and functions */
scalar_t__ strtol(char const *, int /*<<< orphan*/ *, int);
int atoi(const char *str) { return (int)strtol(str, NULL, 10); }


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i32* null, i32 10)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i32* null, i32 10)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void fc255(int n) {
a : {
  typedef int(*b)[n];
  {
    typedef int(*c)[n];
    0;
  }
  {
    typedef int(*d)[n];
    0;
  };
  typedef int(*e)[n];
  0;
};
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  goto a;
  0;
}


x86 assembly (clang, -O0):
<fc255>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc255+0x7>

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

LLVM IR (-O0):
define void @fc255(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %3
}

LLVM IR (-O2):
define void @fc255(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Usage: midi2raw [-cfg /path/to/your/timidity.cfg]\n"
         "                [-r rate] [-s sample_width] [-c channels]\n"
         "                [-v volume] [-o output_file] [midifile]\n");
}


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

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

LLVM IR (-O0):
@.str = [165 x i8] c"Usage: midi2raw [-cfg /path/to/your/timidity.cfg]\0A [-r rate] [-s sample_width] [-c channels]\0A [-v volume] [-o output_file] [midifile]\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [164 x i8] c"Usage: midi2raw [-cfg /path/to/your/timidity.cfg]\0A [-r rate] [-s sample_width] [-c channels]\0A [-v volume] [-o output_file] [midifile]\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([164 x i8], [164 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
int /*<<< orphan*/ dot();
void sB() {
  dash();
  dot();
  dot();
  dot();
  cBreak();
}


x86 assembly (clang, -O0):
<sB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1050 <cBreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sB>:
push   %rax
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cBreak@plt>

LLVM IR (-O0):
define void @sB() {
%1 = call i32 (...) @dash()
%2 = call i32 (...) @dot()
%3 = call i32 (...) @dot()
%4 = call i32 (...) @dot()
%5 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sB() {
%1 = tail call i32 (...) @dash()
%2 = tail call i32 (...) @dot()
%3 = tail call i32 (...) @dot()
%4 = tail call i32 (...) @dot()
%5 = tail call i32 (...) @cBreak()
ret void
}
const char *ftrunc_get_description(void) {
  return "Create a file named ftrunc_test_file. "
         "Truncate the file to reduce its length by 1. "
         "Then remove the truncated file. "
         "The size is given by the -z or --size option, "
         "otherwise it defaults to 1000000.";
}


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

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

LLVM IR (-O0):
@.str = [195 x i8] c"Create a file named ftrunc_test_file. Truncate the file to reduce its length by 1. Then remove the truncated file. The size is given by the -z or --size option, otherwise it defaults to 1000000.\00"
define i8* @ftrunc_get_description() {
ret i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [195 x i8] c"Create a file named ftrunc_test_file. Truncate the file to reduce its length by 1. Then remove the truncated file. The size is given by the -z or --size option, otherwise it defaults to 1000000.\00"
define i8* @ftrunc_get_description() {
ret i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void checkLiterals() { printf("Literals: %d %d\n", 1, -1); }


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

x86 assembly (clang, -O2):
<checkLiterals>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
mov    $0xffffffff,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Literals: %d %d\0A\00"
define void @checkLiterals() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 1, i32 -1)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Literals: %d %d\0A\00"
define void @checkLiterals() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 1, i32 -1)
ret void
}
void testfunc2() {}


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

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

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

LLVM IR (-O2):
define void @testfunc2() {
ret void
}
int SPUshutdown(void) { return 0; }


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

x86 assembly (clang, -O2):
<SPUshutdown>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @SPUshutdown() {
ret i32 0
}

LLVM IR (-O2):
define i32 @SPUshutdown() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void ClearBitUInt8(uint8_t *x, const uint8_t bitNum) { *x &= ~(1 << bitNum); }


x86 assembly (clang, -O0):
<ClearBitUInt8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearBitUInt8>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
and    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @ClearBitUInt8(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = xor i32 %6, -1
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = and i32 %9, %7
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @ClearBitUInt8(i32* nocapture %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = load i32, i32* %0
%6 = and i32 %5, %4
store i32 %6, i32* %0
ret void
}
int f(int a) {
  unsigned int b = __builtin_bswap32(a);
  return __builtin_bswap32(b);
  return b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
bswap  %eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
bswap  %eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @llvm.bswap.i32(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @llvm.bswap.i32(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void testLocalInt() {
  int a[3];
  a[0] = 1;
  a[1] = 2;
  a[2] = a[0] + a[1];
  printf("localInt: %d\n", a[2]);
}


x86 assembly (clang, -O0):
<testLocalInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testLocalInt>:
lea    0xee9(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"localInt: %d\0A\00"
define void @testLocalInt() {
%1 = alloca [3 x i32]
%2 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32 1, i32* %2
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
store i32 2, i32* %3
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%7 = load i32, i32* %6
%8 = add nsw i32 %5, %7
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
store i32 %8, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"localInt: %d\0A\00"
define void @testLocalInt() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf(
      "Please type: <ip> <port> <tcp/udp> <data_size_bytes> <delay_in_sec>\n");
}


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

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

LLVM IR (-O0):
@.str = [69 x i8] c"Please type: <ip> <port> <tcp/udp> <data_size_bytes> <delay_in_sec>\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [68 x i8] c"Please type: <ip> <port> <tcp/udp> <data_size_bytes> <delay_in_sec>\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void spi_release_bus(void) { *(volatile uint32_t *)(0x01E12000 + 0x0) = 0; }


x86 assembly (clang, -O0):
<spi_release_bus>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e12000,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_release_bus>:
movq   $0x0,0x1e12000
ret

LLVM IR (-O0):
define void @spi_release_bus() {
store volatile i64 0, i64* inttoptr (i64 31531008 to i64*)
ret void
}

LLVM IR (-O2):
define void @spi_release_bus() {
store volatile i64 0, i64* inttoptr (i64 31531008 to i64*)
ret void
}
int conditional(int x, int y, int z) {
  int a = !!x;
  --a;
  return (a & (y ^ z)) ^ y;
}


x86 assembly (clang, -O0):
<conditional>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    -0xc(%rbp),%ecx
and    %ecx,%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conditional>:
mov    %esi,%eax
test   %edi,%edi
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @conditional(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = add nsw i32 %13, -1
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = xor i32 %16, %17
%19 = and i32 %15, %18
%20 = load i32, i32* %5
%21 = xor i32 %19, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @conditional(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 %2, i32 %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ coo_test_for_block();
int /*<<< orphan*/ coo_test_for_link();
int coo_main(void *rtime, int argc, char **argv) {
  (void)rtime;
  (void)argc;
  (void)argv;
  coo_test_for_block();
  coo_test_for_link();
  return 0;
}


x86 assembly (clang, -O0):
<coo_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <coo_test_for_block@plt>
mov    $0x0,%al
call   1040 <coo_test_for_link@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coo_main>:
push   %rax
xor    %eax,%eax
call   1030 <coo_test_for_block@plt>
xor    %eax,%eax
call   1040 <coo_test_for_link@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @coo_main(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 = load i8**, i8*** %6
%10 = call i32 (...) @coo_test_for_block()
%11 = call i32 (...) @coo_test_for_link()
ret i32 0
}

LLVM IR (-O2):
define i32 @coo_main(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @coo_test_for_block()
%5 = tail call i32 (...) @coo_test_for_link()
ret i32 0
}
void areaCircle(float radius, double *area) {
  double Pi = 22 / 7;
  *area = Pi * radius * radius;
}


x86 assembly (clang, -O0):
<areaCircle>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  0xeeb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<areaCircle>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @areaCircle(float %0, double* %1) {
%3 = alloca float
%4 = alloca double*
%5 = alloca double
store float %0, float* %3
store double* %1, double** %4
store double 3.000000e+00, double* %5
%6 = load double, double* %5
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fmul double %6, %8
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fmul double %9, %11
%13 = load double*, double** %4
store double %12, double* %13
ret void
}

LLVM IR (-O2):
define void @areaCircle(float %0, double* nocapture writeonly %1) {
%3 = fpext float %0 to double
%4 = fmul double %3, 3.000000e+00
%5 = fmul double %4, %3
store double %5, double* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int access(const char *pathname __attribute__((unused)),
           int mode __attribute__((unused))) {
  printf("access\n");
  errno = ENOENT;
  return (-1);
}


x86 assembly (clang, -O0):
<access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea5(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"access\0A\00"
@ENOENT = global i32 0
@errno = global i32 0
define i32 @access(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @ENOENT
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
@str = [7 x i8] c"access\00"
define i32 @access(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @ENOENT
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void free() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

LLVM IR (-O0):
define void @free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}

LLVM IR (-O2):
define void @free(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}