#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ init_will_initialise_display();
int /*<<< orphan*/ init_will_register_interrupt_gpio2();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ setup();
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ when_empty_lines_write_line_doesnt_clear_screen();
int /*<<< orphan*/
when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display();
int /*<<< orphan*/ when_no_irq_then_missed_irq_counter_zero();
int /*<<< orphan*/ when_one_irq_and_no_handler_then_missed_irq_counter_one();
int /*<<< orphan*/ when_one_irq_and_valid_callback_then_callback_called();
int /*<<< orphan*/
when_one_irq_and_valid_callback_then_missed_irq_counter_zero();
int /*<<< orphan*/ when_string_longer_than_26_then_truncated_string_output();
int /*<<< orphan*/ write_line_outputs_lines_to_display();
int main() {
  setbuf(stdout, NULL);
  fprintf(stdout, "-------------\n");
  fprintf(stdout, "Running Tests\n");
  fprintf(stdout, "-------------\n\n");
  fflush(0);
  printf(" Running %s.%s: \n", "UITests", "init_will_initialise_display");
  setup();
  init_will_initialise_display();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests", "init_will_register_interrupt_gpio2");
  setup();
  init_will_register_interrupt_gpio2();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "when_no_irq_then_missed_irq_counter_zero");
  setup();
  when_no_irq_then_missed_irq_counter_zero();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "when_one_irq_and_no_handler_then_missed_irq_counter_one");
  setup();
  when_one_irq_and_no_handler_then_missed_irq_counter_one();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "when_one_irq_and_valid_callback_then_missed_irq_counter_zero");
  setup();
  when_one_irq_and_valid_callback_then_missed_irq_counter_zero();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "when_one_irq_and_valid_callback_then_callback_called");
  setup();
  when_one_irq_and_valid_callback_then_callback_called();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "write_line_outputs_lines_to_display");
  setup();
  write_line_outputs_lines_to_display();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_"
         "display");
  setup();
  when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "when_empty_lines_write_line_doesnt_clear_screen");
  setup();
  when_empty_lines_write_line_doesnt_clear_screen();
  printf(" SUCCESS\n");
  ;
  printf(" Running %s.%s: \n", "UITests",
         "when_string_longer_than_26_then_truncated_string_output");
  setup();
  when_string_longer_than_26_then_truncated_string_output();
  printf(" SUCCESS\n");
  ;
  printf("\n-------------\n");
  printf("Complete\n");
  printf("-------------\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <setbuf@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
lea    0x100c(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
lea    0xdca(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
lea    0xdc4(%rip),%rsi
call   10a0 <fprintf@plt>
xor    %edi,%edi
call   10b0 <fflush@plt>
lea    0xdc1(%rip),%rdi
lea    0xdcc(%rip),%rsi
lea    0xdcd(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   10c0 <init_will_initialise_display@plt>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd89(%rip),%rdi
lea    0xd94(%rip),%rsi
lea    0xdbc(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   1040 <init_will_register_interrupt_gpio2@plt>
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd51(%rip),%rdi
lea    0xd5c(%rip),%rsi
lea    0xda7(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   1030 <when_no_irq_then_missed_irq_counter_zero@plt>
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd19(%rip),%rdi
lea    0xd24(%rip),%rsi
lea    0xd98(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   10d0 <when_one_irq_and_no_handler_then_missed_irq_counter_one@plt>
lea    0xd26(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xce1(%rip),%rdi
lea    0xcec(%rip),%rsi
lea    0xd98(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   1100 <when_one_irq_and_valid_callback_then_missed_irq_counter_zero@plt>
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xca9(%rip),%rdi
lea    0xcb4(%rip),%rsi
lea    0xd9d(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   10f0 <when_one_irq_and_valid_callback_then_callback_called@plt>
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xc71(%rip),%rdi
lea    0xc7c(%rip),%rsi
lea    0xd9a(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   1060 <write_line_outputs_lines_to_display@plt>
lea    0xc7e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xc39(%rip),%rdi
lea    0xc44(%rip),%rsi
lea    0xd86(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   10e0 <when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display@plt>
lea    0xc46(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xc01(%rip),%rdi
lea    0xc0c(%rip),%rsi
lea    0xd98(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   1050 <when_empty_lines_write_line_doesnt_clear_screen@plt>
lea    0xc0e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xbc9(%rip),%rdi
lea    0xbd4(%rip),%rsi
lea    0xd90(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1110 <setup@plt>
mov    $0x0,%al
call   1090 <when_string_longer_than_26_then_truncated_string_output@plt>
lea    0xbd6(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd9e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xda0(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xb65(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2dd1(%rip),%rbx
mov    (%rbx),%edi
xor    %esi,%esi
call   1080 <setbuf@plt>
mov    (%rbx),%edi
lea    0x1022(%rip),%r14
mov    %r14,%rsi
call   10b0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdce(%rip),%rsi
call   10b0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdcf(%rip),%rsi
call   10b0 <fprintf@plt>
xor    %edi,%edi
call   10c0 <fflush@plt>
lea    0xdcc(%rip),%r12
lea    0xdd7(%rip),%r15
lea    0xdd8(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   10d0 <init_will_initialise_display@plt>
lea    0xf9f(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xdc4(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   1050 <init_will_register_interrupt_gpio2@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xdbd(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   1030 <when_no_irq_then_missed_irq_counter_zero@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xdbc(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   10e0 <when_one_irq_and_no_handler_then_missed_irq_counter_one@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xdca(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   1110 <when_one_irq_and_valid_callback_then_missed_irq_counter_zero@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xddd(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   1100 <when_one_irq_and_valid_callback_then_callback_called@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xde8(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   1070 <write_line_outputs_lines_to_display@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xde2(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   10f0 <when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe02(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   1060 <when_empty_lines_write_line_doesnt_clear_screen@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe08(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   1120 <setup@plt>
xor    %eax,%eax
call   10a0 <when_string_longer_than_26_then_truncated_string_output@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe1f(%rip),%rdi
call   1040 <puts@plt>
lea    0xe22(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [15 x i8] c"-------------\0A\00"
@.str.1 = [15 x i8] c"Running Tests\0A\00"
@.str.2 = [16 x i8] c"-------------\0A\0A\00"
@.str.3 = [18 x i8] c" Running %s.%s: \0A\00"
@.str.4 = [8 x i8] c"UITests\00"
@.str.5 = [29 x i8] c"init_will_initialise_display\00"
@.str.6 = [10 x i8] c" SUCCESS\0A\00"
@.str.7 = [35 x i8] c"init_will_register_interrupt_gpio2\00"
@.str.8 = [41 x i8] c"when_no_irq_then_missed_irq_counter_zero\00"
@.str.9 = [56 x i8] c"when_one_irq_and_no_handler_then_missed_irq_counter_one\00"
@.str.10 = [61 x i8] c"when_one_irq_and_valid_callback_then_missed_irq_counter_zero\00"
@.str.11 = [53 x i8] c"when_one_irq_and_valid_callback_then_callback_called\00"
@.str.12 = [36 x i8] c"write_line_outputs_lines_to_display\00"
@.str.13 = [74 x i8] c"when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display\00"
@.str.14 = [48 x i8] c"when_empty_lines_write_line_doesnt_clear_screen\00"
@.str.15 = [56 x i8] c"when_string_longer_than_26_then_truncated_string_output\00"
@.str.16 = [16 x i8] c"\0A-------------\0A\00"
@.str.17 = [10 x i8] c"Complete\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @setbuf(i32 %2, i32* null)
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @fflush(i32 0)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (...) @setup()
%13 = call i32 (...) @init_will_initialise_display()
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (...) @setup()
%17 = call i32 (...) @init_will_register_interrupt_gpio2()
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 (...) @setup()
%21 = call i32 (...) @when_no_irq_then_missed_irq_counter_zero()
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0))
%24 = call i32 (...) @setup()
%25 = call i32 (...) @when_one_irq_and_no_handler_then_missed_irq_counter_one()
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.10, i64 0, i64 0))
%28 = call i32 (...) @setup()
%29 = call i32 (...) @when_one_irq_and_valid_callback_then_missed_irq_counter_zero()
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.11, i64 0, i64 0))
%32 = call i32 (...) @setup()
%33 = call i32 (...) @when_one_irq_and_valid_callback_then_callback_called()
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0))
%36 = call i32 (...) @setup()
%37 = call i32 (...) @write_line_outputs_lines_to_display()
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.13, i64 0, i64 0))
%40 = call i32 (...) @setup()
%41 = call i32 (...) @when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display()
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%44 = call i32 (...) @setup()
%45 = call i32 (...) @when_empty_lines_write_line_doesnt_clear_screen()
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0))
%48 = call i32 (...) @setup()
%49 = call i32 (...) @when_string_longer_than_26_then_truncated_string_output()
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0))
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str.1 = [15 x i8] c"Running Tests\0A\00"
@.str.2 = [16 x i8] c"-------------\0A\0A\00"
@.str.3 = [18 x i8] c" Running %s.%s: \0A\00"
@.str.4 = [8 x i8] c"UITests\00"
@.str.5 = [29 x i8] c"init_will_initialise_display\00"
@.str.7 = [35 x i8] c"init_will_register_interrupt_gpio2\00"
@.str.8 = [41 x i8] c"when_no_irq_then_missed_irq_counter_zero\00"
@.str.9 = [56 x i8] c"when_one_irq_and_no_handler_then_missed_irq_counter_one\00"
@.str.10 = [61 x i8] c"when_one_irq_and_valid_callback_then_missed_irq_counter_zero\00"
@.str.11 = [53 x i8] c"when_one_irq_and_valid_callback_then_callback_called\00"
@.str.12 = [36 x i8] c"write_line_outputs_lines_to_display\00"
@.str.13 = [74 x i8] c"when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display\00"
@.str.14 = [48 x i8] c"when_empty_lines_write_line_doesnt_clear_screen\00"
@.str.15 = [56 x i8] c"when_string_longer_than_26_then_truncated_string_output\00"
@str.26 = [9 x i8] c" SUCCESS\00"
@str.27 = [15 x i8] c"\0A-------------\00"
@str.28 = [9 x i8] c"Complete\00"
@str.29 = [15 x i8] c"-------------\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32* null)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.29, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @fflush(i32 0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 (...) @setup()
%12 = tail call i32 (...) @init_will_initialise_display()
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%15 = tail call i32 (...) @setup()
%16 = tail call i32 (...) @init_will_register_interrupt_gpio2()
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0))
%19 = tail call i32 (...) @setup()
%20 = tail call i32 (...) @when_no_irq_then_missed_irq_counter_zero()
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0))
%23 = tail call i32 (...) @setup()
%24 = tail call i32 (...) @when_one_irq_and_no_handler_then_missed_irq_counter_one()
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.10, i64 0, i64 0))
%27 = tail call i32 (...) @setup()
%28 = tail call i32 (...) @when_one_irq_and_valid_callback_then_missed_irq_counter_zero()
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.11, i64 0, i64 0))
%31 = tail call i32 (...) @setup()
%32 = tail call i32 (...) @when_one_irq_and_valid_callback_then_callback_called()
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0))
%35 = tail call i32 (...) @setup()
%36 = tail call i32 (...) @write_line_outputs_lines_to_display()
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.13, i64 0, i64 0))
%39 = tail call i32 (...) @setup()
%40 = tail call i32 (...) @when_no_empty_lines_write_line_clears_screen_and_outputs_lines_to_display()
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%43 = tail call i32 (...) @setup()
%44 = tail call i32 (...) @when_empty_lines_write_line_doesnt_clear_screen()
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0))
%47 = tail call i32 (...) @setup()
%48 = tail call i32 (...) @when_string_longer_than_26_then_truncated_string_output()
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.27, i64 0, i64 0))
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.28, i64 0, i64 0))
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.29, i64 0, i64 0))
ret i32 0
}