#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 */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int /*<<< orphan*/ stderr;
void c64_set_freq_cia_a_nmi(uint32_t hz) {
  char b[4];
  sprintf(b, "t0%c%c", (hz >> 8) & 0x000000ff, hz & 0x000000ff);
  fprintf(stderr, "Exit at %s: %d\n",
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/jgilje/reveller/refs/heads/master/"
          "sidstreamer/c64emu-support-serial.c",
          45);
  exit(1);
}


x86 assembly (clang, -O0):
<c64_set_freq_cia_a_nmi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
mov    -0x4(%rbp),%edx
sar    $0x8,%edx
and    $0xff,%edx
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
lea    0xea5(%rip),%rsi
call   1040 <sprintf@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
lea    0xea0(%rip),%rdx
mov    $0x2d,%ecx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<c64_set_freq_cia_a_nmi>:
push   %rax
mov    %edi,%eax
movzbl %ah,%edx
movzbl %al,%ecx
lea    0xec0(%rip),%rsi
lea    0x4(%rsp),%rdi
call   1040 <sprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
lea    0xeb6(%rip),%rdx
mov    $0x2d,%ecx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"t0%c%c\00"
@stderr = global i32 0
@.str.1 = [16 x i8] c"Exit at %s: %d\0A\00"
@.str.2 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jgilje/reveller/refs/heads/master/sidstreamer/c64emu-support-serial.c\00"
define void @c64_set_freq_cia_a_nmi(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = and i32 %6, 255
%8 = load i32, i32* %2
%9 = and i32 %8, 255
%10 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.2, i64 0, i64 0), i32 45)
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"t0%c%c\00"
@stderr = global i32 0
@.str.1 = [16 x i8] c"Exit at %s: %d\0A\00"
@.str.2 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jgilje/reveller/refs/heads/master/sidstreamer/c64emu-support-serial.c\00"
define void @c64_set_freq_cia_a_nmi(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = and i32 %0, 255
%7 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.2, i64 0, i64 0), i32 45)
%10 = tail call i32 @exit(i32 1)
unreachable
}